Deploy CI/CD

Deploy CI/CD

The automated deployment of the MCP components is performed through CI/CD that is a part of MCP DriveTrain along with SaltStack and Reclass. CI/CD, in its turn, includes Jenkins, Gerrit, and MCP Registry components. This section explains how to deploy a CI/CD infrastructure.

To deploy CI/CD automatically:

  1. Deploy a customer-specific CI/CD using Jenkins as part of, for example, an OpenStack cloud environment deployment:

    1. Log in to the Jenkins web UI available at salt_master_management_address:8081 with the following credentials:

      • Username: admin

      • Password: r00tme

    2. Use the Deploy - OpenStack pipeline to deploy cicd cluster nodes as described in Deploy an OpenStack environment. Start with Step 7 in case of the online deployment and with Step 8 in case of the offline deployment.

  2. Once the cloud environment is deployed, verify that the cicd cluster is up and running.

  3. Disable the Jenkins service on the Salt Master node:

    • For the MCP versions 2018.11.0 and below:

      systemctl stop jenkins
      systemctl disable jenkins
      
    • For the MCP versions 2019.2.0 and newer, add following pillars to infra/config/jenkins.yml:

      parameters:
        docker:
          client:
            stack:
              jenkins:
                service:
                  master:
                    deploy:
                      replicas: 0
                  slave01:
                    deploy:
                      replicas: 0
      
  4. Skip the jenkins.client state on the Salt Master node by adding the following pillars to infra/config/jenkins.yml:

    parameters:
      jenkins:
        client:
          enabled: false
    
  5. Refresh pillars on the Salt Master node:

    salt-call saltutil.clear_cache && salt-call saltutil.refresh_pillar
    
  6. For the MCP versions 2019.2.0 and newer, update the Jenkins service configuration in Docker on the Salt Master node:

    salt-call state.apply docker.client