diff options
author | Viktor Tikkanen <viktor.tikkanen@nokia.com> | 2015-12-17 10:50:06 +0200 |
---|---|---|
committer | Viktor Tikkanen <viktor.tikkanen@nokia.com> | 2015-12-21 10:16:51 +0000 |
commit | 3c78ff4776a98ef9f69bdcbe506c56d4a456a80c (patch) | |
tree | 961269a6cc3ce2fc3108674787584eb0f559511d | |
parent | 9b006ff0e1bf4dbe0239bd7258eda999813bb96b (diff) |
Added node role configuration
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>
-rw-r--r-- | build/instackenv.json.example | 15 | ||||
-rwxr-xr-x | ci/deploy.sh | 11 | ||||
-rw-r--r-- | config/inventory/intel_pod2_settings.yaml | 5 | ||||
-rw-r--r-- | config/inventory/pod_example_settings.yaml | 5 | ||||
-rw-r--r-- | docs/installation-instructions/installation-instructions.rst | 1 |
5 files changed, 31 insertions, 6 deletions
diff --git a/build/instackenv.json.example b/build/instackenv.json.example index 949e07d5..370ff202 100644 --- a/build/instackenv.json.example +++ b/build/instackenv.json.example @@ -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" } ] } diff --git a/ci/deploy.sh b/ci/deploy.sh index d090280c..1d9a3bb9 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -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." diff --git a/config/inventory/intel_pod2_settings.yaml b/config/inventory/intel_pod2_settings.yaml index 5f933f1f..4545839f 100644 --- a/config/inventory/intel_pod2_settings.yaml +++ b/config/inventory/intel_pod2_settings.yaml @@ -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" diff --git a/config/inventory/pod_example_settings.yaml b/config/inventory/pod_example_settings.yaml index f24b8e1c..70fa50e7 100644 --- a/config/inventory/pod_example_settings.yaml +++ b/config/inventory/pod_example_settings.yaml @@ -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" diff --git a/docs/installation-instructions/installation-instructions.rst b/docs/installation-instructions/installation-instructions.rst index 72a7bb22..8703fdd3 100644 --- a/docs/installation-instructions/installation-instructions.rst +++ b/docs/installation-instructions/installation-instructions.rst @@ -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 |