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
{ "lCode": "en_US", "lName": "English", "folder": "en_US" }
English
 

Installing Contrail Command

Release: Contrail Networking 5.1
{}
Change Release
date_range 20-Nov-20

Contrail Networking supports Contrail Command user interface (UI). Contrail Command is an intuitive, wizard-based UI which provides automated work flows such as the following:

  • Contrail cluster deployment (Kolla-based OpenStack cluster).

  • Automating the data center IP fabric.

  • Orchestrating virtual machines and bare metal servers.

Requirements

The system requirements to install the Contrail Command server are:

  • 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 Supported Platforms Contrail 5.1.

Note

Email contrail-registry@juniper.net for Contrail container registry credentials.

Configuration

Prerequisite

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.

pip uninstall docker-py docker

Step-by-Step Procedure

Perform the following steps to configure and install Contrail Command.

  1. Install Docker to pull contrail-command-deployer container. This package is required 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.06.0.ce

    systemctl start docker

  2. Download the contrail-command-deployer Docker container image to deploy contrail-command (contrail_command, contrail_psql containers) from hub.juniper.net. Allow Docker to connect to the private secure registry.

    Access container_tag for contrail-command-deployer located at README Access to Contrail 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. Create the input configuration command_servers.yml file.

    Use the Minimal command_servers.yml file to create the minimal input configuration file. For an exhaustive list of supported parameters, use Complete command_servers.yml File.

  4. Start the contrail-command-deployer container to deploy the Contrail Command UI.

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

    <ABSOLUTE_PATH_TO_COMMAND_SERVERS_FILE>—absolute path to the command_servers.yml file that you created in step 3.

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

    docker run -td --net host -v /root/command_servers.yml:/command_servers.yml --privileged --name contrail_command_deployer hub.juniper.net/contrail/contrail-command-deployer:5.1.0-0.38

    The contrail_command and contrail_psql containers are deployed.

  5. (Optional) You can also upgrade Contrail-Command UI without deleting existing database information. To update contrail_command container and not make changes to the database container, use the following command.

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

    Note

    Code changes that involve schema modifications require updating the database container as well. Step 5 is recommended only if the UI application requires an update.

  6. (Optional) Track the progress of step 4.

    docker logs -f contrail_command_deployer

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

Sample command_servers.yml Files

Minimal command_servers.yml file

The following sample file has minimum configurations that you need when you install Contrail Command. You can also use this file for releases prior to Release 5.1.

content_copy zoom_out_map
---
command_servers:
    server1:
        ip: <IP Address>
        connection: ssh
        ssh_user: root
        ssh_pass: <contrail command server password>
        sudo_pass: <contrail command server root password>
        ntpserver: <NTP Server address>
 
        registry_insecure: false
        container_registry: hub.juniper.net/contrail
        container_tag: “<container_tag>”
        container_registry_username: <registry username>
        container_registry_password: <registry password>
        config_dir: /etc/contrail

        contrail_config:
            database:
                type: postgres
                dialect: postgres
                password: contrail123
            keystone:
                assignment:
                    data:
                      users:
                        admin:
                          password: contrail123
            insecure: true
            client:
              password: contrail123

Complete command_servers.yml File

The following sample file has an exhaustive list of configurations and supporting parameters that you need when you install Contrail Command.

content_copy zoom_out_map
---
# User defined volumes
#user_command_volumes:
#  - /var/tmp/contrail:/var/tmp/contrail

command_servers:
    server1:
        ip: <IP Address>
        connection: ssh
        ssh_user: root
        ssh_pass: <contrail command server password>
        sudo_pass: <contrail command server root password>
        ntpserver: <NTP Server address>

        # Specify either container_path
        #container_path: /root/contrail-command-051618.tar
        # or registry details and container_name
        registry_insecure: false
        container_registry: hub.juniper.net/contrail
        container_name: contrail-command
        container_tag: “<container_tag>”
        container_registry_username: <registry username>
        container_registry_password: <registry password>
        config_dir: /etc/contrail

        # contrail command container configurations given here go to /etc/contrail/contrail.yml
        contrail_config:
            # Database configuration. PostgreSQL supported
            database:
                type: postgres
                dialect: postgres
                host: localhost
                user: root
                password: contrail123
                name: contrail_test
                # Max Open Connections for DB Server
                max_open_conn: 100
                connection_retries: 10
                retry_period: 3s

            # Log Level
            log_level: debug

            # Cache configuration
            cache:
              enabled: true
              timeout: 10s
              max_history: 100000
              rdbms:
                enabled: true

            # Server configuration
            server:
              enabled: true
              read_timeout: 10
              write_timeout: 5
              log_api: true
              address: ":9091"

              # TLS Configuration
              tls:
                  enabled: true
                  key_file: /usr/share/contrail/ssl/cs-key.pem
                  cert_file: /usr/share/contrail/ssl/cs-cert.pem

              # Enable GRPC or not
              enable_grpc: false

              # Static file config
              # key: URL path
              # value: file path. (absolute path recommended in production)
              static_files:
                  /: /usr/share/contrail/public

              # API Proxy configuration
              # key: URL path
              # value: String list of backend host
              #proxy:
              #    /contrail:
              #    - http://localhost:8082

              notify_etcd: false

              # VNC Replication
              enable_vnc_replication: true

            # Keystone configuration
            keystone:
                local: true
                assignment:
                    type: static
                    data:
                      domains:
                        default: &default
                          id: default
                          name: default
                      projects:
                        admin: &admin
                          id: admin
                          name: admin
                          domain: *default
                        demo: &demo
                          id: demo
                          name: demo
                          domain: *default
                      users:
                        admin:
                          id: admin
                          name: Admin
                          domain: *default
                          password: contrail123
                          email: admin@juniper.nets
                          roles:
                          - id: admin
                            name: admin
                            project: *admin
                        bob:
                          id: bob
                          name: Bob
                          domain: *default
                          password: bob_password
                          email: bob@juniper.net
                          roles:
                          - id: Member
                            name: Member
                            project: *demo
                store:
                    type: memory
                    expire: 36000
                insecure: true
                authurl: https://localhost:9091/keystone/v3

            # disable authentication with no_auth true and comment out keystone configuraion.
            #no_auth: true
            insecure: true

            etcd:
              endpoints:
                - localhost:2379
              username: ""
              password: ""
              path: contrail

            watcher:
              enabled: false
              storage: json

            client:
              id: admin
              password: contrail123
              project_name: admin
              domain_id: default
              schema_root: /
              endpoint: https://localhost:9091

            compilation:
              enabled: false
              # Global configuration
              plugin_directory: 'etc/plugins/'
              number_of_workers: 4
              max_job_queue_len: 5
              msg_queue_lock_time: 30
              msg_index_string: 'MsgIndex'
              read_lock_string: "MsgReadLock"
              master_election: true

              # Plugin configuration
              plugin:
                  handlers:
                      create_handler: 'HandleCreate'
                      update_handler: 'HandleUpdate'
                      delete_handler: 'HandleDelete'

            agent:
              enabled: true
              backend: file
              watcher: polling
              log_level: debug

         # The following are optional parameters used to patch/cherrypick
         # revisions into the contrail-ansible-deployer sandbox. These configs
         # go into the /etc/contrail/contrail-deploy-config.tmpl file
#        cluster_config:
#            ansible_fetch_url: "https://review.opencontrail.org/Juniper/contrail-ansible-deployer refs/changes/80/40780/20"
#            ansible_cherry_pick_revision: FETCH_HEAD
#            ansible_revision: GIT_COMMIT_HASH
footer-navigation