diff --git a/CICD/heat/gc_HOT.yaml b/CICD/heat/gc_HOT.yaml index 006fd8b5a74d1ecab9822450f72651d99d7a4aa7..cacc7c7cbc5ed157d7e59d41b96b533b3806be5f 100644 --- a/CICD/heat/gc_HOT.yaml +++ b/CICD/heat/gc_HOT.yaml @@ -114,12 +114,12 @@ resources: volume_id: { get_resource: DBVolume } instance_uuid: { get_resource: SQLNode0 } - MgmtNodesC: + MgmtNodesCentos7: type: "OS::Heat::ResourceGroup" properties: - count: My::Server::MgmtNodeCountCentos7 + count: 0 resource_def: - type: My::Server::MgmtNode + type: { get_param: MgmtNodeCountCentos7 } properties: #avz: { get_param: avz } image: { get_param: centos_7_image_id } @@ -133,7 +133,7 @@ resources: MgmtNodesU: type: "OS::Heat::ResourceGroup" properties: - count: My::Server::MgmtNodeCountUbuntu + count: { get_param: MgmtNodeCountUbuntu } resource_def: type: My::Server::MgmtNode properties: @@ -149,7 +149,7 @@ resources: LoginNodesC: type: "OS::Heat::ResourceGroup" properties: - count: My::Server::LoginNodeCountCentos + count: { get_param: LoginNodeCountCentos7 } resource_def: type: "OS::Nova::Server" properties: @@ -170,7 +170,7 @@ resources: LoginNodesU: type: "OS::Heat::ResourceGroup" properties: - count: My::Server::LoginNodeCountUbuntu + count: { get_param: LoginNodeCountUbuntu } resource_def: type: "OS::Nova::Server" properties: @@ -212,7 +212,7 @@ resources: ComputeNodesU: type: "OS::Heat::ResourceGroup" properties: - count: My::Server::ComputeNodeCountUbuntu + count: { get_param: ComputeNodeCountUbutnu } resource_def: type: "OS::Nova::Server" properties: @@ -230,10 +230,10 @@ resources: networks: - network: { get_param: NetID } - ComputeNodesC: + ComputeNodesCentos7: type: "OS::Heat::ResourceGroup" properties: - count: My::Server::ComputeNodeCountCentos + count: { get_param: ComputeNodeCountCentos7 } resource_def: type: "OS::Nova::Server" properties: diff --git a/CICD/heat/heatcicdwrapper.sh b/CICD/heat/heatcicdwrapper.sh index 2d97a384009dbeedc94ce5f1087024b74051e0ea..607206279d128b018103a273af394875e10f2b29 100644 --- a/CICD/heat/heatcicdwrapper.sh +++ b/CICD/heat/heatcicdwrapper.sh @@ -55,7 +55,7 @@ function create_stack { echo "I will NOT create existing stack maybe use update" exit -44 fi - openstack stack create --wait --template ./heat/gc_HOT.yaml --parameter "project_name=$STACKNAME" -e ./resource_registry.${CI_PROJECT_NAME}.yaml $STACKNAME + openstack stack create --wait --template ./heat/gc_HOT.yaml --parameter "project_name=$STACKNAME" -e ./heat/resource_registry.yaml --parameter-file ./heat_parameters_${CI_PROJECT_NAME}.yaml $STACKNAME createreturn=$? if [ $createreturn -ne "0" ] then @@ -78,14 +78,14 @@ case "$1" in echo "I cannot update a stack which does not exist" exit -45 fi - openstack stack update --wait --template ./heat/gc_HOT.yaml --parameter "project_name=$STACKNAME" -e ./resource_registry.${CI_PROJECT_NAME}.yaml $STACKNAME + openstack stack update --wait --template ./heat/gc_HOT.yaml --parameter "project_name=$STACKNAME" -e ./heat/resource_registry.yaml --parameter-file ./heat_parameters_${CI_PROJECT_NAME}.yaml $STACKNAME ret=$? exit $ret ;; create_or_update) if check_stack_exists then - openstack stack update --wait --template ./heat/gc_HOT.yaml --parameter "project_name=$STACKNAME" -e ./resource_registry.${CI_PROJECT_NAME}.yaml $STACKNAME + openstack stack update --wait --template ./heat/gc_HOT.yaml --parameter "project_name=$STACKNAME" -e ./heat/resource_registry.yaml --parameter-file ./heat_parameters_${CI_PROJECT_NAME}.yaml $STACKNAME ret=$? exit $ret fi diff --git a/CICD/heat_parameters_ansible_cluster_in_a_box.yaml b/CICD/heat_parameters_ansible_cluster_in_a_box.yaml new file mode 100644 index 0000000000000000000000000000000000000000..91a98743306413955e5a6f0e990ed35637110aae --- /dev/null +++ b/CICD/heat_parameters_ansible_cluster_in_a_box.yaml @@ -0,0 +1,19 @@ +parameters: + MgmtNodeCountUbuntu: + type: number + default: 1 + MgmtNodeCountCentos7: + type: number + default: 1 + LoginNodeCountCentos7: + type: number + default: 1 + LoginNodeCountUbuntu: + type: number + default: 1 + ComputeNodeCountUbuntu: + type: number + default: 1 + ComputeNodeCountCentos7: + type: number + default: 1 diff --git a/CICD/resource_registry.ansible_cluster_in_a_box.yaml b/CICD/resource_registry.ansible_cluster_in_a_box.yaml deleted file mode 100644 index 8d9a15101e00ac3d96fcd1cfc02cb34d9f637060..0000000000000000000000000000000000000000 --- a/CICD/resource_registry.ansible_cluster_in_a_box.yaml +++ /dev/null @@ -1,8 +0,0 @@ -resource_registry: - My::Server::MgmtNode: ./heat/mgmtnode_HOT.yaml - My::Server::MgmtNodeCountUbuntu: 1 - My::Server::MgmtNodeCountCentos7: 1 - My::Server::LoginNodeCountCentos: 0 - My::Server::LoginNodeCountUbuntu: 1 - My::Server::ComputeNodeCountUbuntu: 1 - My::Server::ComputeNodeCountCentos: 1