Prepare the cluster model

Prepare the cluster model

After you complete the prerequisite steps, prepare your cluster model for the upgrade by configuring your Git project repository as described below.

To prepare the cluster model:

  1. Log in to the Salt Master node.

  2. In cluster/<name>/opencontrail/init.yml, change the OpenContrail repository component and version to 4.1:

    _param:
      linux_repo_contrail_component: oc41
      opencontrail_version: 4.1
    
  3. In cluster/<name>/openstack/dashboard.yml, add or update the OpenContrail version inside the parameters section:

    _param:
      opencontrail_version: 4.1
    
  4. In cluster/<name>/openstack/init.yml, define the following parameters:

    _param:
      opencontrail_admin_password: <contrail_user_password>
      opencontrail_admin_user: 'contrail'
    
  5. In cluster/<name>/openstack/control/init.yml, add the following class if not present:

    classes:
    ...
    - system.keystone.client.service.contrail
    ...
    
  6. In cluster/<name>/opencontrail/analytics.yml, change the system.opencontrail.control.analytics class to system.opencontrail.control.analytics4_0.

  7. In cluster/<name>/opencontrail/analytics.yml, add or change the opencontrail_kafka_config_dir and opencontrail_kafka_log_dir parameters. For example:

    _param:
      opencontrail_kafka_config_dir: '/etc/kafka'
      opencontrail_kafka_log_dir: '/var/log/kafka'
    
  8. In cluster/<name>/opencontrail/control.yml, change the system.opencontrail.control.control class to system.opencontrail.control.control4_0.

  9. In cluster/<name>/opencontrail/analytics.yml and cluster/<name>/opencontrail/control.yml, modify the classes and the parameters sections:

    classes:
    ...
    - system.linux.system.repo.docker_legacy
    ...
    - service.docker.host
    - system.docker.client.compose
    ...
    parameters:
      ...
      docker:
        host:
          pkgs:
            - docker-engine
            - python-docker
    
  10. In cluster/<name>/opencontrail/control.yml and cluster/<name>/opencontrail/analytics.yml, remove the following classes:

    classes:
    ...
    - system.linux.system.repo.mcp.apt_mirantis.contrail
    ...
    - system.linux.system.repo.mcp.apt_mirantis.cassandra
    ...
    

    Note

    These classes are related to the package repositories of OpenContrail and Cassandra and must be removed since the new version of the OpenContrail control plane is delivered as Docker containers.

  11. In cluster/<name>/opencontrail/compute.yml, change the system.opencontrail.compute.cluster class to system.opencontrail.compute.cluster4_0.

  12. Add the upgrade pipeline to DriveTrain:

    1. Add the OpenContrail upgrade class to cluster/cicd/control/leader.yml:

      classes:
      - system.jenkins.client.job.deploy.update.upgrade_opencontrail4_0
      
    2. Apply the changes:

      salt -C 'I@jenkins:client' state.sls jenkins.client
      

Now, proceed to Upgrade the OpenContrail nodes.