Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Installing Contrail Cluster using Contrail Command and instances.yml

date_range 28-Aug-23

Contrail Networking supports deploying Contrail cluster using Contrail Command and the instances.yml file.

A YAML file provides a concise format for specifying the instance settings.

Note:

We strongly recommend installing Contrail Command and deploying your Contrail cluster from Contrail Command in most Contrail Networking deployments. You should only use the procedure in this document if you have a strong reason to not use the recommended procedure.

See Installing Contrail Command and Installing a Contrail Cluster Using Contrail Command.

System Requirements

  • A VM or physical server with:

    • 4 vCPUs

    • 32 GB RAM

    • 100 GB disk

  • Internet access to and from the physical server, hereafter referred to as the Contrail Command server

  • (Recommended) x86 server with CentOS 7.6 as the base OS to install Contrail Command

For a list of supported platforms, see https://www.juniper.net/documentation/en_US/release-independent/contrail/topics/reference/contrail-supported-platforms.pdf.

Note:

Contrail Release 5.1 does not support AppFormix deployment from command line with Contrail Cluster instances.yml file.

Before you begin

docker-py Python module is superseded by docker Python module. You must remove docker-py and docker Python packages from all the nodes where you want to install the Contrail Command UI.

content_copy zoom_out_map
pip uninstall docker-py docker

Configuration

Perform the following steps to deploy a Contrail Cluster using Contrail Command and the instances.yml file.

  1. Install Docker to pull contrail-command-deployer container. This package is necessary to automate the deployment of Contrail Command software.

    yum install -y yum-utils device-mapper-persistent-data lvm2

    yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

    yum install -y docker-ce-18.03.1.ce

    systemctl start docker

  2. Download the contrail-command-deployer Docker container image from hub.juniper.net. To download these containers and for access to hub.juniper.net, refer to the Access to Contrail Registry topic on the Contrail software download page. Allow Docker to connect to the private secure registry.

    docker login hub.juniper.net --username <container_registry_username> --password <container_registry_password>

    Pull contrail-command-deployer container from the private secure registry.

    docker pull hub.juniper.net/contrail/contrail-command-deployer:<container_tag>

    Example, for container_tag: 5.1.0-0.38, use the following command:

    docker pull hub.juniper.net/contrail/contrail-command-deployer:5.1.0-0.38

  3. Edit the input configuration instances.yml file. See #installing-contrail-cluster-using-contrail-command-and-instances-yml__sample_instances_yml for a sample instances.yml file.
  4. Start the contrail_command_deployer container to deploy the Contrail Command (UI) server and provision Contrail Cluster using the instances.yml file provided.

    docker run -td --net host -e action=provision_cluster -v <ABSOLUTE_PATH_TO_COMMAND_SERVERS_FILE>:/command_servers.yml -v < ABSOLUTE_PATH_TO_INSTANCES_FILE>:/instances.yml --privileged --name contrail_command_deployer hub.juniper.net/contrail/contrail-command-deployer:<container_tag>

    The contrail_command and contrail_psql Contrail Command containers will be deployed. Contrail Cluster is also provisioned using the given instances.yml file.

  5. (Optional) Track the progress of 4.

    docker logs -f contrail_command_deployer

  6. Once the playbook execution completes, log in to Contrail Command using https://Contrail-Command-Server-IP-Address:9091. Use the same user name and password that was entered in 3. The default username is admin and password is contrail123.
    Note:

    We strongly recommend creating a unique username and password for Contrail Command. See Installing Contrail Command for additional information on creating username and password combinations.

Note:

Enable subscription on all the RedHat nodes.

content_copy zoom_out_map
sudo subscription-manager register --username <USERNAME> –-password <PASSWORD>
sudo subscription-manager attach --pool pool_id

sudo subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-rh-common-rpms --enable=rhel-ha-for-rhel-7-server-rpms --enable=rhel-7-server-extras-rpms

Sample instances.yml File

content_copy zoom_out_map
global_configuration:
  CONTAINER_REGISTRY: hub.juniper.net/contrail
  CONTAINER_REGISTRY_USERNAME: < container_registry_username >
  CONTAINER_REGISTRY_PASSWORD: < container_registry_password >
provider_config:
  bms:
    ssh_pwd: <Pwd>
    ssh_user: root
    ntpserver: <NTP Server>
    domainsuffix: local
instances:
  bms1:
    provider: bms
    ip: <BMS IP>
    roles:
      config_database:
      config:
      control:
      analytics_database:
      analytics:
      webui:
      vrouter:
      openstack:
      openstack_compute:
  bms2:
    provider: bms
    ip: <BMS2 IP>
    roles:
      openstack:
  bms3:
    provider: bms
    ip: <BMS3 IP>
    roles:
      openstack:
  bms4:
    provider: bms
    ip: <BMS4 IP>
    roles:
      config_database:
      config:
      control:
      analytics_database:
      analytics:
      webui:
  bms5:
    provider: bms
    ip: <BMS5 IP>
    roles:
      config_database:
      config:
      control:
      analytics_database:
      analytics:
      webui:
  bms6:
    provider: bms
    ip: <BMS6 IP>
    roles:
      config_database:
      config:
      control:
      analytics_database:
      analytics:
      webui:
  bms7:
    provider: bms
    ip: <BMS7 IP>
    roles:
      vrouter:
        PHYSICAL_INTERFACE: <Interface name>
        VROUTER_GATEWAY: <Gateway IP>
      openstack_compute:
  bms8:
    provider: bms
    ip: <BMS8 IP>
    roles:
      vrouter:
        # Add following line for TSN Compute Node
        TSN_EVPN_MODE: True
      openstack_compute:
contrail_configuration:
  CLOUD_ORCHESTRATOR: openstack
  CONTRAIL_VERSION: latest or <contrail_container_tag>
  CONTRAIL_CONTAINER_TAG: <contrail_container_tag>-queens
  RABBITMQ_NODE_PORT: 5673
  VROUTER_GATEWAY: <Gateway IP>
  ENCAP_PRIORITY: VXLAN,MPLSoUDP,MPLSoGRE
  AUTH_MODE: keystone
  KEYSTONE_AUTH_HOST: <Internal VIP>
  KEYSTONE_AUTH_URL_VERSION: /v3
  CONTROLLER_NODES: < list of mgmt. ip of control nodes >
  CONTROL_NODES: <list of control-data ip of control nodes>
  OPENSTACK_VERSION: queens
kolla_config:
  kolla_globals:
    openstack_release: queens
    kolla_internal_vip_address: <Internal VIP>
    kolla_external_vip_address: <External VIP>
    openstack_release: queens
    enable_haproxy: "no" 	 ("no" by default, set "yes" to enable)
    enable_ironic: "no"       ("no" by default, set "yes" to enable)
    enable_swift: "no"        ("no" by default, set "yes" to enable)
    swift_disk_partition_size = 10GB
    keepalived_virtual_router_id: <Value between 0-255>
  kolla_passwords:
    keystone_admin_password: <Keystone Admin Password>
footer-navigation