Skip to content

Sample JSONS for single node with roles: controller, analytics, analyticsdb, bare metal compute and openstack

sgurumurthy edited this page Aug 21, 2017 · 45 revisions

The following JSON definitions are tested on build 3053. Replace the IP Addresses, interface names and password strings below according to your topology.

The JSON schema for provisioning containers for contrail 4.0 has been revamped. The contents under the "contrail_4" section follows the JSON representation of the contrail-ansible inventory here

Key-value pairs under the "contrail_4" section are passed directly to the contrail-ansible playbook used to provision the containers and compute. Most of the required parameters that were given explicitly in prior builds are now derived automatically from the existing legacy JSON definitions. Use the "contrail_4" section to override the calculated values if required.

Server level key-value pairs can also be specified by setting them under the "contrail_4" section in the server JSON.

For a comprehensive list of options available under the "contrail_4" section, refer new-cluster-contrail-4.x.json

For a comprehensive list of options available for server JSON, to add TOR switch config, IPMI config, Static Routes, etc please refer to new-server-contrail-4.x.json

The compute node can be a container or a bare-metal compute based on the value of the role - "contrail-compute" for bare-metal and "contrail-agent" for container. For 4.0, the default recommended and supported mode for the agent is as a bare-metal mode for 14.04 and as a container for ubuntu 16.04.

Contrail (Container) Cluster JSON

{
    "cluster" : [
        {
            "id": "<Cluster name>",
            "parameters" : {
                "domain": "<Domain name>",                                                
                "subnet_mask": "<Subnet mask>",
                "gateway": "<Gateway address of Cluster>",
                "provision": {
                    "contrail_4": {
                    },
                    "contrail": {
                    },
                    "openstack":{
                        "openstack_manage_amqp": true,
                        "keystone": {
                            "admin_password": <Contrail WebUI Login Password>
                        }
                    }
                }
            }
        }
    ]
}

Ubuntu 14.04 Image JSON

{
    "image": [
        {
            "category": "image",
            "id": "ubuntu-14_04_04",
            "parameters": {
                "kickseed": "/etc/contrail_smgr/kickstarts/contrail-ubuntu_trusty.seed",
                "kickstart": "/etc/contrail_smgr/kickstarts/contrail-ubuntu_trusty.ks"
            },
            "path": "/path/to/ubuntu-image.iso",
            "type": "ubuntu",
            "version": "14.04.04"
        }
    ]
}

Contrail-Cloud-Docker TGZ Image JSON

{
    "image": [
        {
            "category": "package",
            "id": "<ID.The image id cannot begin with a number and can contain only alphanumeric and _ characters in it>",
            "path": "< Path to contrail-cloud-docker tgz>",
            "type": "contrail-ubuntu-package",
            "version": "mainline"
        }
    ]
}

Server JSON

{
    "server": [
        {
            "cluster_id": "cluster1",
            "domain": "sm-domain.com",
            "id": "<Hostname of server>",
            "parameters" : {
                "partition": "/dev/vda",
                "provision": {
                    "contrail_4": {
                    }
                }
            },
            "contrail": {
                "control_data_interface": "eth2"
            },
            "network" : {
                "interfaces": [
                    {
                        "name": "eth1",
                        "dhcp": false,
                        "mac_address": "<MAC address of Server>",
                        "ip_address": "<IP address of Server>",
                        "default_gateway": "<Gateway address of Server>"
                    },
                    {
                        "name": "eth2",
                        "mac_address": "<MAC address of Server>",
                        "ip_address": "<IP address of Server>",
                        "default_gateway": "<Gateway address of Server>"
                    }
                ],
                "management_interface": "eth1",
                "provisioning": "kickstart"
            },
            "password": "<password>",
            "ipmi_address": "",
            "roles": [
                     "contrail-controller",
                     "contrail-analytics",
                     "contrail-analyticsdb",
                     "openstack",
                     "contrail-compute" ]
        }
    ]
}
Clone this wiki locally