ON THIS PAGE
Installing a Contrail Cluster Using Contrail Command
Use this example procedure to create a Contrail and OpenStack Kolla cluster using Contrail Command. The resulting cluster consists of Contrail containers deployed alongside OpenStack Kolla containers to provide an OpenStack installation that uses Contrail as the SDN.
Requirements
VMs or physical x86 servers as follows:
Contrail Controller — 8 vCPU, 64 GB memory, 300 GB storage
OpenStack Controller — 4 vCPU , 32 GB memory, 100 GB storage
Contrail Service Node (CSN) — 4 vCPU, 16 GB memory, 100 GB storage
Compute nodes — Dependent on the workloads
For a list of supported platforms including software requirements, see https://www.juniper.net/documentation/en_US/release-independent/contrail/topics/reference/contrail-supported-platforms.pdf.
User storage for all servers resides in the “/” partition (that is, remove the “/home” partition if it exists, and increase the “/” partition by the amount of freed storage).
An IP interface on each server attached to the management network. Each server is managed by Contrail Command over this interface. Ensure the name for this management interface is the same on all servers.
An IP interface on each server attached to the user data network. This is the interface that the overlay network will be set up on. Ensure the name for this user data interface is the same on all servers.
SSH access
Overview
A Contrail cluster consists of hosts that run the Contrail controller, the orchestrator (OpenStack, VMware or Kubernetes), and the compute nodes.
Before you begin, set up servers and/or VMs that meet the specified requirements. Also ensure that the Contrail Command server and all the hosts in the Contrail cluster have /etc/hosts entries for each other over the management network.
Topology
Consider a sample cluster topology, with a non-HA environment of one Contrail Controller and one OpenStack Controller, one compute node and one Contrail Service Node (CSN), as displayed in Figure 1.
Configuration
Procedure
Step-by-Step Procedure
The general workflow is for you to first add the servers and VMs that you want to make available for the cluster you’re creating, and then add the cluster.
-
Log in to Contrail Command at https://<Contrail-Command-Server-IP-Address>:9091.
If you used the sample command_servers.yml files when you installed Contrail Command, then the username is admin and the password is contrail123.
Note:Username and password combinations are provided in this document for illustrative purposes only. We suggest using unique passwords in accordance with your organization’s security guidelines in your environment.
Note:If no cluster exists, you are automatically placed into a wizard that guides you to set up a cluster. The left-nav bar shows your progress. If a cluster already exists, you will need to explicitly add a cluster. Regardless of whether you are using the wizard or not, the steps to set up a cluster are very similar. Differences are noted in the steps below.
Add the login credentials of the servers and VMs that you’re making available. In this step, you are adding the credentials to a floating list. You will explicitly associate each set of credentials to the proper server or VM at a later step. Contrail Command uses these credentials to log in to the servers and VMs when creating the cluster.
Step-by-Step Procedure
To see the list of credentials, navigate to Servers > Credentials. The set of credentials you specified during Contrail Command installation (in the
server1
section of the command_servers.yml file) is automatically listed.Click Create to add a new set of credentials.
Enter Name, SSH User, and SSH Password.
Add the servers or VMs, either one at a time or using the bulk import capability.
Navigate to Servers > Create.
To add servers one at a time, select Express or Detailed. In this example, we select Detailed.
Enter the following information:
Workload type - Select Physical/Virtual Node if you want the workload to run as a VM on the server or Baremetal if you want the workload to run directly on the server.
Hostname - Enter the hostname part of the FQDN.
Management IP - Enter the IP address for the management interface.
Management Interface - Enter the interface name for the management interface.
Credentials - Use the drop-down list to select the correct login credentials for this server. This is the set of credentials you added in step 2. Contrail Command uses the credentials you select to log in to the server.
MAC Address (optional) - Specify the MAC address for the management interface.
Disk Partition(s) (optional) - Specify the disk partitions you want to use.
Network Interfaces - Click Add to add the interfaces on the server. As a minimum, add the management and the user data interface.
Note:If you select the Express option, then you will need to edit the server afterwards to add in any missing information.
To add servers in bulk, select Bulk Import (csv).
Step-by-Step Procedure
Click Download to download the csv template to use. The downloaded file is a template with sample values.
Here is a sample csv file:
Workload Type,HostName,Management IP,Disk Partition,Network Interface,MAC address,IPMI Driver,IPMI Address,IPMI UserName,IPMI Password,Memory mb,CPU's,CPU Arch,Local gb,Capabilities,Number of Network Interfaces,Interface Name,Interface MAC Address,Interface IP,Enable PXE,Interface Name,Interface MAC Address,Interface IP,Enable PXE physical,5c10s9,10.87.74.69,,enp4s0f0,,,,,,,,,,,2,enp4s0f0,,10.87.74.69,,ens2f0,,10.1.0.2, physical,5c10s7-node1,10.87.74.65,,eno1,,,,,,,,,,,2,eno1,,10.87.74.65,,ens2f1,,10.1.0.3, physical,5c10s7-node3,10.87.74.67,,eno1,,,,,,,,,,,2,eno1,,10.87.74.67,,ens2f1,,10.1.0.67, physical,5c10s12,10.87.74.71,,eno1,,,,,,,,,,,2,eno1,,10.87.74.71,,ens1f0,,10.1.0.66,
Note:The demo topology above has only one compute node. If you are deploying additional compute nodes, you must include them in the CSV file.
Fill in the values for your servers, and save and upload the file by clicking Upload.
The added servers are now shown in the list of available servers.
You can now create the cluster. If you are in the wizard, click Next. Otherwise, select Clusters > Add Cluster.
Set the general parameters for the cluster.
Step-by-Step Procedure
Select Contrail Enterprise Multicloud as the Provisioning Manager.
Enter the required information.
Cluster Name - the name that you want to call the cluster
Container Registry, Container Registry Username, Container Registry Password, Contrail Version
See README Access to Contrail Registry 19XX for the correct values for these fields. The Contrail Version corresponds to the Contrail-Command (UI) container deployment value specified in that document.
Provisioner Type - Ansible
Domain Suffix - the domain name for the cluster
NTP Server - the FQDN or IP address of the NTP server you want to use
Default Vrouter Gateway - the default gateway for the compute nodes
The default that you specify here is made available in the Default Gateway fields in later steps. If a particular node has a different default gateway, you can always override the default at that later step.
Encapsulation Priority
Select
VXLAN, MPLSoUDP, MPLSoGRE
.
Ensure Insecure is not selected.
Click Enable ZTP.
Note:From Contrail Networking Release 1911 and later, Enable ZTP option is replaced by Fabric Management.
Click the drop-down arrow for Contrail Configuration.
Click Add and enter the following Key/Value pairs.
Key
Value
CONTROL_NODES
List of comma-separated user data interface IP addresses for the controller(s)
PHYSICAL_INTERFACE
The user data interface name
TSN_NODES
List of comma-separated user data interface IP addresses for the Contrail Service Node(s)
CONTRAIL_CONTAINER_TAG
The container tag for the desired Contrail and OpenStack release combination as specified in README Access to Contrail Registry 19XX
Click Next.
Assign the control nodes for the cluster.
Figure 2: Select Control NodesSelect High availability mode if you have HA setup for the controller node. Select all the control nodes from Available servers list.
Select the orchestrator and assign the orchestrator nodes.
Step-by-Step Procedure
Select Openstack from the Orchestrator type drop-down list.
Use the arrows to move one or more servers from the Available servers list to the Assigned Openstack nodes list.
Check the Show Advanced option to customize your deployment.
Set up the virtual IP addresses if you are deploying an HA cluster.
Control & Data Network Virtual IP address - this is an internal VIP (e.g. 10.87.74.100)
Management Network Virtual IP address - this is an external VIP (e.g. 10.1.0.100)
keepalived_virtual_router_id - (optional) it can be set to any value between 0-255. The default value is 51.
Add the following parameters under Customize configuration for a VM-based setup:
nova.conf: | [libvirt] virt_type=qemu cpu_mode=none
Note:Minimum 8 indent spaces are required for lines following the nova.conf.
Click Add under Kolla Globals and enter the following Key/Value pairs. These are the standard OpenStack Kolla globals.
Key
Value
Notes
enable_haproxy
no
enable_ironic
no
Set to no if you are not using Life Cycle Management in Contrail Command or PXE boot on Bare Metal Servers (BMS).
enable_swift
yes
Set to yes if you are using object store. This parameter is disabled by default.
openstack_release
queens (for example)
This must be one of the supported OpenStack releases.
swift_disk_partition_size
20GB
The default value is 5 GB. If you have two or more images, you must have at least 20 GB allocated for hitless image upload procedure.
Click Add under Kolla Passwords to explicitly add Kolla passwords if desired.
These passwords are placed into the etc/kolla/passwords.yml file. By default, all kolla passwords are set to
contrail123
.Note:We suggest changing the default password to a unique password in accordance with your organization’s security guidelines.
Click Next.
Assign the compute nodes.
Step-by-Step Procedure
Use the arrows to move one or more servers from the Available servers list to the Assigned Compute nodes list.
Enter the Default Vrouter Gateway for each node.
Select Kernel in the Type drop-down list. This is the only type supported in the current release.
Figure 3: Select Compute NodesClick Next.
Assign the Contrail Service nodes.
Step-by-Step Procedure
Use the arrows to move one or more servers from the Available servers list to the Assigned Service nodes list.
Enter the Default Vrouter Gateway for each node.
Figure 4: Select Contrail Service NodesClick Next.
(Optional) Assign the AppFormix nodes.
For details, refer to Installing AppFormix and AppFormix Flows using Contrail Command.
Click Next.
Verify your cluster configuration in the Cluster overview panel and your nodes configuration in the Nodes overview panel.
Figure 5: Verify SummaryIf the configuration is correct, click Provision. If not, click Previous to go back to fix any misconfigurations.
You can monitor the progress by running the following commands from Contrail Command server.
docker logs -f contrail_command
ordocker exec contrail_command tail -f /var/log/contrail/deploy.log
The Reprovision button does not support editing Kolla or Contrail configuration parameters. After each failed attempt to provision a fabric, you must destroy and rebuild all the VMs and repeat the process.