-
Notifications
You must be signed in to change notification settings - Fork 34
Provisioning using SM for an all in one single node configuration
This documents describes step by step instructions to provision contrail docker containers using server manager. This WIKI describes provisioning all roles in one target node. A separate WIKI will cover the provisioning of roles across multiple nodes and including HA. The following steps are covered as part of the end-to-end deployment process. Some of the steps are needed to be done only once, some other steps would need to be repeated for every new provisioning and there are certain manual steps described below, which are primarily to work around issues present, which would be addressed either as part of bug fixes available in later builds or changes to the deployment process itself.
- Installing Server Manager
- Creating objects - clusters, servers, images, containers - in server manager database, using SM rest api calls.
- Preparing target systems for provisioning
- Provisioning Contrail
Installing contrail server manager can be accomplished using standard SM installation process on a server running Ubuntu distribution of linux.
Before you install the SM package please ensure that the sources.list is empty and present and /etc/apt/sources.list.d/ is not pointing to any external or local repos.
-
First install the Server Manager installer wrapper package which is of the form contrail-server-manager-installer_[version~sku].deb
dpkg -i contrail-server-manager-installer_[version~sku].deb
-
Install server manager using the following command:
cd /opt/contrail/contrail_server_manager/; ./setup.sh --all --hostip=[IP Address of SM]
This will install server manager and all its dependent packages including docker-engine and cobbler. -
After the install completes, modify the dhcp template located at /etc/cobbler/dhcp.template to have the details of the subnet you are trying to reimage/provision including DNS details. Please note: the container hosts are expected to have internet connectivity to launch the containers as of now.
-
Now you can start server manager process
service contrail-server-manager start
For further details about installing Server Manager please refer to the Server Manager Install documentation here: [Server Manager Install] (http://www.juniper.net/techpubs/en_US/contrail3.0/topics/task/installation/install-server-manager-vnc.html#jd0e93)
This will complete the server manager installation and we are ready to start using server-manager commands to proceed with container provisioning.
Once server manager is installed, create objects in SM database using following steps. For example purpose, we will use a 1 node target system, where on that node we install openstack components and also configured as controller, analytics, analyticsDB, and agent. The controller, analytics and analyticsDB services are all provisioned using contrail containers while the agent service is configured on the bare-metal target host.
Sample JSONs for all the below objects can be found here: Sample JSONs
1. Configure different images needed for reimaging and provisioning purpose as follows: i. Add Ubuntu Image from JSON (Used for reimaging). server-manager add image –f image-ubuntu-14.04.04.json ii. Add Contrail Debian Image and containers from JSON server-manager add image –f contrail_image.json Note: The above command continues in the background and might take up to 5 minutes depending on the CPU load/capability. For now, there is no command to track the status of the command other than to tail the contents of /var/log/contrail-server-manager/debug.log. Please wait for "Image add/Modify success" in the log before proceeding.
2. Configure cluster and server server-manager add cluster -f all_in_one_cluster.json Please note the keystone admin password if generated. server-manager add server -f contrail_server.json
This would involve reimaging the target systems (both openstack server and contrail server) with base Ubuntu OS. Please use following steps to accomplish this. i. server-manager reimage --server_id openstack_server ubuntu_image
Use following command to start the provisioning. i. server-manager provision —-cluster_id all_in_one_cluster combined_image_mainline After this step, SM will first provision the "openstack" role using the traditional SM model involving puppet manifests and following that, it will start provisioning contrail docker containers and computes. The provisioning logs can be monitored by following the /var/log/contrail-server-manager/debug.log
Provisioning is now complete. You can confirm this by creating VN and spawning VMs from the openstack node.