Added node role configuration 65/4765/4
authorViktor Tikkanen <viktor.tikkanen@nokia.com>
Thu, 17 Dec 2015 08:50:06 +0000 (10:50 +0200)
committerViktor Tikkanen <viktor.tikkanen@nokia.com>
Mon, 21 Dec 2015 10:16:51 +0000 (10:16 +0000)
If there are dedicated HW nodes for controller and compute nodes,
it should be possible to define node roles in configuration files.

This patch introduces "capabilities" property into
pod_example_settings.yaml so as adds needed flavor definitions
and overcloud deploy parameters into opnfv-deploy script.

Change-Id: Ie62d3fa215aa168390d074c73fdb2fa03ecc67f5
Signed-off-by: Viktor Tikkanen <viktor.tikkanen@nokia.com>
build/instackenv.json.example
ci/deploy.sh
config/inventory/intel_pod2_settings.yaml
config/inventory/pod_example_settings.yaml
docs/installation-instructions/installation-instructions.rst

index 949e07d..370ff20 100644 (file)
@@ -10,8 +10,9 @@
       ],
       "pm_type": "pxe_ipmitool",
       "pm_addr": "10.1.8.70",
-      "pm_user": "root"
+      "pm_user": "root",
       "pm_password": "password",
+      "capabilities": "profile:control"
     },
     {
       "cpu": "24",
@@ -23,8 +24,9 @@
       ],
       "pm_type": "pxe_ipmitool",
       "pm_addr": "10.1.8.73",
-      "pm_user": "root"
+      "pm_user": "root",
       "pm_password": "password",
+      "capabilities": "profile:control"
     },
     {
       "cpu": "24",
@@ -36,8 +38,9 @@
       ],
       "pm_type": "pxe_ipmitool",
       "pm_addr": "10.1.8.74",
-      "pm_user": "root"
+      "pm_user": "root",
       "pm_password": "password",
+      "capabilities": "profile:control"
     },
     {
       "cpu": "24",
@@ -49,8 +52,9 @@
       ],
       "pm_type": "pxe_ipmitool",
       "pm_addr": "10.1.8.76",
-      "pm_user": "root"
+      "pm_user": "root",
       "pm_password": "password",
+      "capabilities": "profile:compute"
     },
     {
       "cpu": "24",
@@ -62,8 +66,9 @@
       ],
       "pm_type": "pxe_ipmitool",
       "pm_addr": "10.1.8.78",
-      "pm_user": "root"
+      "pm_user": "root",
       "pm_password": "password",
+      "capabilities": "profile:compute"
     }
   ]
 }
index d090280..1d9a3bb 100755 (executable)
@@ -184,7 +184,8 @@ parse_inventory_file() {
           \"disk\": \"$(eval echo \${${node}disk})\",
           \"arch\": \"$(eval echo \${${node}arch})\",
           \"pm_user\": \"$(eval echo \${${node}ipmi_user})\",
-          \"pm_addr\": \"$(eval echo \${${node}ipmi_ip})\"
+          \"pm_addr\": \"$(eval echo \${${node}ipmi_ip})\",
+          \"capabilities\": \"$(eval echo \${${node}capabilities})\"
 "
     instack_env_output+=${node_output}
     if [ $node_count -lt $node_total ]; then
@@ -522,6 +523,10 @@ function undercloud_prep_overcloud_deploy {
      DEPLOY_OPTIONS+=" --ntp-server $ntp_server"
   fi
 
+  if [[ ! "$virtual" == "TRUE" ]]; then
+     DEPLOY_OPTIONS+=" --control-flavor control --compute-flavor compute"
+  fi
+
   ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
 source stackrc
 set -o errexit
@@ -533,7 +538,11 @@ openstack baremetal configure boot
 openstack baremetal introspection bulk start
 echo "Configuring flavors"
 openstack flavor list | grep baremetal || openstack flavor create --id auto --ram 4096 --disk 39 --vcpus 1 baremetal
+openstack flavor list | grep control || openstack flavor create --id auto --ram 4096 --disk 39 --vcpus 1 control
+openstack flavor list | grep compute || openstack flavor create --id auto --ram 4096 --disk 39 --vcpus 1 compute
 openstack flavor set --property "cpu_arch"="x86_64" --property "capabilities:boot_option"="local" baremetal
+openstack flavor set --property "cpu_arch"="x86_64" --property "capabilities:boot_option"="local" --property "capabilities:profile"="control" control
+openstack flavor set --property "cpu_arch"="x86_64" --property "capabilities:boot_option"="local" --property "capabilities:profile"="compute" compute
 echo "Configuring nameserver on ctlplane network"
 neutron subnet-update \$(neutron subnet-list | grep -v id | grep -v \\\\-\\\\- | awk {'print \$2'}) --dns-nameserver 8.8.8.8
 echo "Executing overcloud deployment, this should run for an extended period without output."
index 5f933f1..4545839 100644 (file)
@@ -8,6 +8,7 @@ nodes:
     memory: 2048
     disk: 40
     arch: "x86_64"
+    capabilities: "profile:control"
   node2:
     mac_address: "00:1e:67:4f:b7:b1"
     ipmi_ip: 10.4.7.3
@@ -17,6 +18,7 @@ nodes:
     memory: 2048
     disk: 40
     arch: "x86_64"
+    capabilities: "profile:control"
   node3:
     mac_address: "00:1e:67:4f:cc:f1"
     ipmi_ip: 10.4.7.4
@@ -26,6 +28,7 @@ nodes:
     memory: 2048
     disk: 40
     arch: "x86_64"
+    capabilities: "profile:control"
   node4:
     mac_address: "00:1e:67:4f:cc:0b"
     ipmi_ip: 10.4.7.5
@@ -35,6 +38,7 @@ nodes:
     memory: 2048
     disk: 40
     arch: "x86_64"
+    capabilities: "profile:compute"
   node5:
     mac_address: "00:1e:67:4f:b9:55"
     ipmi_ip: 10.4.7.6
@@ -44,3 +48,4 @@ nodes:
     memory: 2048
     disk: 40
     arch: "x86_64"
+    capabilities: "profile:compute"
index f24b8e1..70fa50e 100644 (file)
@@ -8,6 +8,7 @@ nodes:
     memory: 2048
     disk: 40
     arch: "x86_64"
+    capabilities: "profile:control"
   node2:
     mac_address: "10:23:45:67:89:AC"
     ipmi_ip: 10.4.17.3
@@ -17,6 +18,7 @@ nodes:
     memory: 2048
     disk: 40
     arch: "x86_64"
+    capabilities: "profile:control"
   node3:
     mac_address: "10:23:45:67:89:AD"
     ipmi_ip: 10.4.17.4
@@ -26,6 +28,7 @@ nodes:
     memory: 2048
     disk: 40
     arch: "x86_64"
+    capabilities: "profile:control"
   node4:
     mac_address: "10:23:45:67:89:AE"
     ipmi_ip: 10.4.17.5
@@ -35,6 +38,7 @@ nodes:
     memory: 2048
     disk: 40
     arch: "x86_64"
+    capabilities: "profile:compute"
   node5:
     mac_address: "10:23:45:67:89:AF"
     ipmi_ip: 10.4.17.6
@@ -44,3 +48,4 @@ nodes:
     memory: 2048
     disk: 40
     arch: "x86_64"
+    capabilities: "profile:compute"
index 72a7bb2..8703fdd 100644 (file)
@@ -288,6 +288,7 @@ IPMI configuration information gathered in section `Execution Requirements (Bare
     - ``pm_addr``: IPMI IP Address
     - ``pm_user``: IPMI username
     - ``pm_password``: IPMI password
+    - ``capabilities``: Intended node role (profile:control or profile:compute)
     - ``cpu``: CPU cores available
     - ``memory``: Memory available in Mib
     - ``disk``: Disk space available in Gb