You can use this document to deploy Contrail Command and import
an existing cluster into Contrail Command with a single procedure
in environments that are using Redhat Director.
If you want to perform this procedure in an environment that
is using Contrail Networking but is not using Redhat Director, see Importing Contrail Cluster Data using Contrail Command.
Prerequisites
This document makes the following assumptions about your environment:
You are running Contrail Networking Release 21.4.L1 or
later with RHEL 8.4.
You have a VM or a BareMetal server available for running
Contrail Command, the contrail-command VM.
Your Contrail Command node is registered with a RedHat
subscription and you have a content lock on RHEL-8.4.
You have installed podman on the machine running Contrail
Command.
You can install podman by entering the yum install
podman command.
Contrail Command has access to the RedHat provision network
and a Keystone connection.
Your Contrail Command node is configured with the proper
DNS address in the /etc/resolv.conf file.
Example:
[root@command-vm-rcompute tmp]# cat /etc/resolv.conf
search 5b6s1.local
nameserver 192.168.24.252
Your Contrail Command VM has an updated keystone access
IP address in the /etc/hosts file.
Example:
[root@command-vm-rcompute tmp]# cat /etc/hosts
10.2.0.99 overcloud.5c7.local
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Import the Contrail Cluster
Perform the following steps to import the Contrail Cluster data.
- Create the command_servers.yml file.
Example:
[root@command-vm-rcompute ~]# cat command_servers.yml
command_servers:
server1:
ip: 10.87.86.111
connection: ssh
ssh_user: root
ssh_pass: password
sudo_pass: password
ntpserver: 10.84.5.100
registry_insecure: true
container_registry: svl-artifactory.juniper.net/contrail-nightly
container_tag: 21.4.L1.185
contrail_config:
database:
type: postgres
dialect: postgres
password: password
keystone:
assignment:
data:
users:
admin:
password: keystone-password
insecure: true
client:
password: password
- Import the Contrail cluster by entering this command from
the Contrail Command node:
podman run -td --net host -e orchestrator=tripleo -e undercloud=Undercloud-IP-address -e undercloud_user=stack
-e undercloud_password=Undercloud-password -e action=import_cluster -v /root/command_servers.yml:/command_servers.yml --privileged --name
contrail_command_deployer Container-Tag
You can obtain the Container-tag for your
version of Contrail Networking at README Access to Contrail Registry 21XX.
If you need to access the Contrail private secure registry,
e-mail contrail-registry@juniper.net to obtain credentials.
Example:
podman run -td --net host -e orchestrator=tripleo -e undercloud=192.168.24.1 -e undercloud_user=stack -e undercloud_password=contrail
-e action=import_cluster -v /root/command_servers.yml:/command_servers.yml --privileged --name contrail_command_deployer
enterprise-hub.juniper.net/contrail-container-prod/contrail-command-deployer:21.4.L1.185
[root@command-vm-rcompute ~]# podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
enterprise-hub.juniper.net/contrail-container-prod/contrail-command-deployer 21.4.L1.185 d500a3307c7f 4 weeks ago 1.13 GB
- Enter the docker ps command
to confirm that Contrail Command and other Contrail containers are
up and running.
[root@command-vm-rcompute ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8ce9ae465361 svl-artifactory.juniper.net/contrail-nightly/contrail-command:21.4.L1.184 "/bin/commandappserv…" 4 weeks ago Up 4 weeks contrail_command
6af5bd0bf432 circleci/postgres:10.3-alpine "docker-entrypoint.s…" 4 weeks ago Up 4 weeks contrail_psql