Install and configure¶
Important
Attention! The module is released in beta version.
Install¶
Important
First need to do setting up the environment. All commands are executed only from superuser.
Mode superuser:
sudo -i
Install the FirstBoot package:
from Python package repository:
pip3 install firstboot
Add user:
useradd -m aos passwd aos
Partial installation of nodes using the FirstBoot utility¶
When partially installing AccentOS cloud nodes using the FirstBoot utility, a separate control or compute node can be installed. The installed node is automatically entered into the cloud (the hypervisor becomes available, the controller connects to the system, the cloud DBMS connects to the Galera cluster).
Since this procedure is lightweight and aimed at the rapid deployment of a single node, on the one hand, it does not require filling in the entire set of parameters for installing the cloud, but, on the other hand, it does not perform a number of actions performed by the full cloud deployment utility, in particular, the following:
Configuring host network adapters and controllers (for the control node) must be done by the administrator himself, since these parameters are not specified in the partial installation utility.
Configuration of network adapter aggregation protocols (Bonding, LACP, LAG/MLAG, and others) must be performed by the administrator himself, since network protocol configuration is required on the part of network switches.
Additional settings performed by administrators after installing the cloud, which are available on previously installed cloud controllers, must be copied to the appropriate directories of the new host by the administrator himself, since the partial installation utility does not know anything about them and cannot unequivocally decide on the need for such copying.
Thus, in order to ensure a unified configuration of the newly introduced controller after its reinstallation, it is necessary to copy the following directories from the controller in use:
/etc/keystone/
/etc/aos/
/etc/cinder/
(in thecinder.conf
andcinder.ceilometer.conf
files, specify the IP address of the new controller in the my_ip parameter)/etc/ceilometer/
/etc/glance/
/etc/gnocchi/
/etc/neutron/
/etc/openstack-dashboard/
/etc/placement/
/etc/nova/
(in thenova.conf
file, in the my_ip parameter, specify the iIP address of the new controller)
To check if the correct IP is specified in the configuration files, you can use the command:
grep -R "my_ip" /etc/
The command will print all lines with filenames containing my_ip in
/etc/
.After copying, you need to restart the VM controller with the command:
reboot
Configure¶
Create directory for logs with the required permissions:
mkdir -p /var/log/aos/firstboot chown -R aos:aos /var/log/aos/firstboot
Create directory with the required permissions:
mkdir /var/lib/firstboot chown -R aos:aos /var/lib/firstboot
Create directory for configuration files with the required permissions:
mkdir /etc/aos chown -R aos:aos /etc/aos
Perform the initial configuration of the module:
firstboot-configure
Copy sample configuration file, if using non-standard parameters, edit them:
cp /etc/aos/firstboot.conf.example /etc/aos/firstboot.conf
Create database using MySQL as an example, set rights, database type and other parameters:
CREATE DATABASE firstboot; GRANT ALL PRIVILEGES ON firstboot.* TO 'aos'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON firstboot.* TO 'aos'@'%' IDENTIFIED BY 'password';
Edit the config file
/etc/aos/firstboot.conf
adding information about the database to this:db_url = mysql+pymysql://aos:password@localhost:3306/firstboot
Migrate database:
FLASK_APP=firstboot.api.app flask db upgrade
Perform static collection:
FLASK_APP=firstboot.api.app flask collect
Enable and start systemd services:
systemctl daemon-reload systemctl enable firstboot.service systemctl start firstboot.service
Create symlinks to the firstboot configuration for Apache and restart its service:
ln -s /etc/apache2/conf-available/firstboot.conf /etc/apache2/conf-enabled/firstboot.conf systemctl restart apache2
Note
By default, the module will be accessible through any browser on port 8082.
Configuration file¶
Configuration file is presented in ini
format and consists of the following sections and parameters:
Section | Parameter | Description | Default value |
---|---|---|---|
DEFAULT |
log_level |
Logging level. | INFO |
DEFAULT |
api_logfile |
Path to log file of firstboot service. |
/var/log/aos/firstboot/api.log |
DEFAULT |
work_dir |
Working directory. | /var/lib/firstboot |
DEFAULT |
db_url |
Configuring connection to database. | mysql+pymysql://aos:password@localhost:3306/firstboot |
cobbler |
url |
Address where the Cobbler system API is located. | |
cobbler |
user |
Username for authorization in the Cobbler system. | |
cobbler |
password |
User password for authorization in the Cobbler system. |