Deploy an OpenStack environment

Deploy an OpenStack environment

This section explains how to configure and launch the OpenStack environment deployment pipeline. This job is run by Jenkins through the Salt API on the functioning Salt Master node and deployed hardware servers to set up your MCP OpenStack environment.

Run this Jenkins pipeline after you configure the basic infrastructure as described in Deploy MCP DriveTrain. Also, verify that you have successfully applied the linux and salt states to all physical and virtual nodes for them not to be disconnected during network and Salt Minion setup.

Note

For production environments, CI/CD should be deployed on a per-customer basis.

For testing purposes, you can use the central Jenkins lab that is available for Mirantis employees only. To be able to configure and execute Jenkins pipelines using the lab, you need to log in to the Jenkins web UI with your Launchpad credentials.

To automatically deploy an OpenStack environment:

  1. Log in to the Salt Master node.

  2. For the OpenContrail setup, add the version-specific parameters to the <cluster_name>/opencontrail/init.yml file of your Reclass model. For example:

    parameters:
      _param:
        opencontrail_version: 4.1
        linux_repo_contrail_component: oc41
    
  3. Set up network interfaces and the SSH access on all compute nodes:

    salt -C 'I@nova:compute' cmd.run 'salt-call state.sls \
       linux.system.user,openssh,linux.network;reboot'
    
  4. If you run OVS, run the same command on physical gateway nodes as well:

    salt -C 'I@neutron:gateway' cmd.run 'salt-call state.sls \
       linux.system.user,openssh,linux.network;reboot'
    
  5. Verify that all nodes are ready for deployment:

    salt '*' state.sls linux,ntp,openssh,salt.minion
    

    Caution

    If any of these states fails, fix the issue provided in the output and re-apply the state before you proceed to the next step. Otherwise, the Jenkins pipeline will fail.

  6. In a web browser, open http://<ip address>:8081 to access the Jenkins web UI.

    Note

    The IP address is defined in the classes/cluster/<cluster_name>/cicd/init.yml file of the Reclass model under the cicd_control_address parameter variable.

  7. Log in to the Jenkins web UI as admin.

    Note

    To obtain the password for the admin user, run the salt "cid*" pillar.data _param:jenkins_admin_password command from the Salt Master node.

  8. In the global view, verify that the git-mirror-downstream-mk-pipelines and git-mirror-downstream-pipeline-library pipelines have successfully mirrored all content.

  9. Find the Deploy - OpenStack job in the global view.

  10. Select the Build with Parameters option from the drop-down menu of the Deploy - OpenStack job.

  11. Specify the following parameters:

    Deploy - OpenStack environment parameters

    Parameter

    Description and values

    ASK_ON_ERROR

    If checked, Jenkins will ask either to stop a pipeline or continue execution in case of Salt state fails on any task

    STACK_INSTALL

    Specifies the components you need to install. The available values include:

    • core

    • kvm

    • cicd

    • openstack

    • ovs or contrail depending on the network plugin.

    • ceph

    • stacklight

    • oss

      Note

      For the details regarding StackLight LMA (stacklight) with the DevOps Portal (oss) deployment, see Deploy StackLight LMA with the DevOps Portal.

    BATCH_SIZE Added since 2019.2.6 update

    The batch size for Salt commands targeted for a large amount of nodes. Disabled by default. Set to an absolute number of nodes (integer) or percentage, for example, 20 or 20%. For details, see Configure Salt Master threads and batching.

    DIST_UPGRADE_NODES Added since 2019.2.8 update

    Select to run apt-get dist-upgrade on all cluster nodes before deployment. Disabled by default.

    SALT_MASTER_CREDENTIALS

    Specifies credentials to Salt API stored in Jenkins, included by default. See View credentials details used in Jenkins pipelines for details.

    SALT_MASTER_URL

    Specifies the reachable IP address of the Salt Master node and port on which Salt API listens. For example, http://172.18.170.28:6969

    To find out on which port Salt API listens:

    1. Log in to the Salt Master node.

    2. Search for the port in the /etc/salt/master.d/_api.conf file.

    3. Verify that the Salt Master node is listening on that port:

    netstat -tunelp | grep <PORT>
    

    STACK_TYPE

    Specifies the environment type. Use physical for a bare metal deployment

  12. Click Build.

  13. Once done, configure the Salt Master node password expiration as described in Modify Salt Master password expiration.