Skip to content

Provisioning using SM for an all in one single node configuration

Nitish Krishna edited this page Sep 14, 2017 · 33 revisions

Introduction

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.

  1. Installing Server Manager
  2. Creating objects - clusters, servers, images, containers - in server manager database, using SM rest api calls.
  3. Preparing target systems for provisioning
  4. Provisioning Contrail

Part 1: Installing Server Manager

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.

  1. 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

  2. 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.

  3. 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.

  4. 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.

Part 2: Creating objects

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

Part 3: Preparing target systems for provisioning

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

Part 4: Start provisioning

        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.

Known Issues

Clone this wiki locally