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:
Log in to the Salt Master node.
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
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'
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'
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.
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.
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.
In the global view, verify that the git-mirror-downstream-mk-pipelines and git-mirror-downstream-pipeline-library pipelines have successfully mirrored all content.
Find the Deploy - OpenStack job in the global view.
Select the Build with Parameters option from the drop-down menu of the Deploy - OpenStack job.
Specify the following 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:
|
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, To find out on which port Salt API listens:
netstat -tunelp | grep <PORT>
|
STACK_TYPE | Specifies the environment type. Use physical for a bare metal
deployment |
Click Build.
Once done, configure the Salt Master node password expiration as described in Modify Salt Master password expiration.