Friday, April 6, 2018

JSON file to import the Overcloud Virtual Machines as the Undercloud Baremetal nodes on OpenStack PIke TripleO

JSON file for the import the overcloud nodes 


Creation of the JSON file for the overcloud nodes. 


This JSON File will be used to import the overcloud VirtualMachines as the baremetal nodes on the undercloud server.


And later on, to these machines the overcloud deploy will happen.


instackenv.json for 3 controllers, 3 compute and 3 ceph-storage baremetals


Please note that there is 1 to 1 mapping of the MAC addresses (hence the virtual machines) to the Ports(UDP).

{
    "nodes": [
        {
            "pm_type": "pxe_ipmitool",
            "mac": [
                "52:54:00:3e:58:cf"
            ],
            "pm_user": "stack",
            "pm_password": "XXXXXXXXX",
            "pm_addr": "172.16.0.1",
            "pm_port": "6231",
            "name": "overcloud-node1",
            "cpu": "2",
            "arch": "x86_64",
            "memory": "16384",
            "disk": "60"
        },
                        {
            "pm_type": "pxe_ipmitool",
            "mac": [
                "52:54:00:d5:12:5b"
            ],
            "pm_user": "stack",
            "pm_password": "XXXXXXXXX",
            "pm_addr": "172.16.0.1",
            "pm_port": "6232",
            "name": "overcloud-node2",
            "cpu": "2",
            "arch": "x86_64",
            "memory": "16384",
            "disk": "60"
        },
                        {
            "pm_type": "pxe_ipmitool",
            "mac": [
                "52:54:00:8d:ee:03"
            ],
            "pm_user": "stack",
            "pm_password": "XXXXXXXXX",
            "pm_addr": "172.16.0.1",
            "pm_port": "6233",
            "name": "overcloud-node3",
            "cpu": "2",
            "arch": "x86_64",
            "memory": "16384",
            "disk": "60"
        },
                        {
            "pm_type": "pxe_ipmitool",
            "mac": [
                "52:54:00:2d:3d:94"
            ],
            "pm_user": "stack",
            "pm_password": "XXXXXXXXX",
            "pm_addr": "172.16.0.1",
            "pm_port": "6234",
            "name": "overcloud-node4",
            "cpu": "2",
            "arch": "x86_64",
            "memory": "16384",
            "disk": "60"
        },
        {
            "pm_type": "pxe_ipmitool",
            "mac": [
                "52:54:00:8d:74:19"
            ],
            "pm_user": "stack",
            "pm_password": "XXXXXXXXX",
            "pm_addr": "172.16.0.1",
            "pm_port": "6235",
            "name": "overcloud-node5",
            "cpu": "2",
            "arch": "x86_64",
            "memory": "16384",
            "disk": "60"
        },
                        {
            "pm_type": "pxe_ipmitool",
            "mac": [
                "52:54:00:df:b3:56"
            ],
            "pm_user": "stack",
            "pm_password": "XXXXXXXXX",
            "pm_addr": "172.16.0.1",
            "pm_port": "6236",
            "name": "overcloud-node6",
            "cpu": "2",
            "arch": "x86_64",
            "memory": "16384",
            "disk": "60"
        },
                        {
            "pm_type": "pxe_ipmitool",
            "mac": [
                "52:54:00:71:5a:71"
            ],
            "pm_user": "stack",
            "pm_password": "XXXXXXXXX",
            "pm_addr": "172.16.0.1",
            "pm_port": "6237",
            "name": "overcloud-node7",
            "cpu": "2",
            "arch": "x86_64",
            "memory": "16384",
            "disk": "60"
            },
                                    {
            "pm_type": "pxe_ipmitool",
            "mac": [
                "52:54:00:cc:5c:f7"
            ],
            "pm_user": "stack",
            "pm_password": "XXXXXXXXX",
            "pm_addr": "172.16.0.1",
            "pm_port": "6238",
            "name": "overcloud-node8",
            "cpu": "2",
            "arch": "x86_64",
            "memory": "16384",
            "disk": "60"
            },
                                    {
            "pm_type": "pxe_ipmitool",
            "mac": [
                "52:54:00:35:5b:af"
            ],
            "pm_user": "stack",
            "pm_password": "XXXXXXXXX",
            "pm_addr": "172.16.0.1",
            "pm_port": "6239",
            "name": "overcloud-node9",
            "cpu": "2",
            "arch": "x86_64",
            "memory": "16384",
            "disk": "60"
            }
    ]
}


You should always validate the JSON for the syntax error and hence this file has to be a valid JSON.

You can validate it using 

cat instackenv.json | python -m json.tool 

In case the file has JSON Syntax error, it is going to error out. Else the JSON for the undercloud.conf is good.



Import the Virtual Servers as the baremetal nodes to the undercloud server .


Import of the overcloud VirtualMachines as the baremetal nodes in the undercloud. Please note After the successful import the nodes come in the manageable state.

openstack overcloud node import --run-validations --instance-boot-option lcoal instackenv.json 

Nodes set to managed.
Successfully registered node UUID ee2484bb-02a9-4380-9e87-39aeba537b77
Successfully registered node UUID 6b1cc13d-6da2-487a-92ba-744881acace1
Successfully registered node UUID fee38738-60ba-4db4-a84e-158ff3c65a4b
Successfully registered node UUID 64a367fe-03db-4780-a3b9-352665fd95d7
Successfully registered node UUID 5e734b8a-3b21-43f9-841f-60f1cb3c4af1
Successfully registered node UUID d2d31668-060b-4642-8c5c-298ddebbf4c1
Successfully registered node UUID fbd40010-c851-4df4-93a9-5f39c5c0921a
Successfully registered node UUID 303a53b2-79ca-40b8-b0a1-49a0cabfc14f

Successfully registered node UUID c3c63a3b-c596-48c9-bfd8-e3c7115a226d


You can validate that the nodes have been imported as they start showing up as the openstack baremetal servers.

Run the below and see the list and you can see that the servers are in the 'manageable' state

openstack baremetal node list



Go to the Main page of the OpenStack Tripleo on KVM : Openstack Pike TripleO undercloud deployment with overcloud controller HA on KVM (libvirt)

No comments:

Post a Comment