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
  1. Install the FirstBoot package:

    • from Python package repository:

      pip3 install firstboot
      
  2. 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:

  1. 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.

  2. 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.

  3. 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 the cinder.conf and cinder.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 the nova.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

  1. Create directory for logs with the required permissions:

    mkdir -p /var/log/aos/firstboot
    chown -R aos:aos /var/log/aos/firstboot
    
  2. Create directory with the required permissions:

    mkdir /var/lib/firstboot
    chown -R aos:aos /var/lib/firstboot
    
  3. Create directory for configuration files with the required permissions:

    mkdir /etc/aos
    chown -R aos:aos /etc/aos
    
  4. Perform the initial configuration of the module:

    firstboot-configure
    
  5. Copy sample configuration file, if using non-standard parameters, edit them:

    cp /etc/aos/firstboot.conf.example /etc/aos/firstboot.conf
    
  6. 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';
    
  7. Edit the config file /etc/aos/firstboot.conf adding information about the database to this:

    db_url = mysql+pymysql://aos:password@localhost:3306/firstboot
    
  8. Migrate database:

    FLASK_APP=firstboot.api.app flask db upgrade
    
  9. Perform static collection:

    FLASK_APP=firstboot.api.app flask collect
    
  10. Enable and start systemd services:

    systemctl daemon-reload
    systemctl enable firstboot.service
    systemctl start firstboot.service
    
  11. 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.