Skip to content
Snippets Groups Projects
Commit 3b1e7793 authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

adding a parameter file

Former-commit-id: f04522ee
parent 0099a322
No related branches found
No related tags found
No related merge requests found
...@@ -114,12 +114,12 @@ resources: ...@@ -114,12 +114,12 @@ resources:
volume_id: { get_resource: DBVolume } volume_id: { get_resource: DBVolume }
instance_uuid: { get_resource: SQLNode0 } instance_uuid: { get_resource: SQLNode0 }
MgmtNodesC: MgmtNodesCentos7:
type: "OS::Heat::ResourceGroup" type: "OS::Heat::ResourceGroup"
properties: properties:
count: My::Server::MgmtNodeCountCentos7 count: 0
resource_def: resource_def:
type: My::Server::MgmtNode type: { get_param: MgmtNodeCountCentos7 }
properties: properties:
#avz: { get_param: avz } #avz: { get_param: avz }
image: { get_param: centos_7_image_id } image: { get_param: centos_7_image_id }
...@@ -133,7 +133,7 @@ resources: ...@@ -133,7 +133,7 @@ resources:
MgmtNodesU: MgmtNodesU:
type: "OS::Heat::ResourceGroup" type: "OS::Heat::ResourceGroup"
properties: properties:
count: My::Server::MgmtNodeCountUbuntu count: { get_param: MgmtNodeCountUbuntu }
resource_def: resource_def:
type: My::Server::MgmtNode type: My::Server::MgmtNode
properties: properties:
...@@ -149,7 +149,7 @@ resources: ...@@ -149,7 +149,7 @@ resources:
LoginNodesC: LoginNodesC:
type: "OS::Heat::ResourceGroup" type: "OS::Heat::ResourceGroup"
properties: properties:
count: My::Server::LoginNodeCountCentos count: { get_param: LoginNodeCountCentos7 }
resource_def: resource_def:
type: "OS::Nova::Server" type: "OS::Nova::Server"
properties: properties:
...@@ -170,7 +170,7 @@ resources: ...@@ -170,7 +170,7 @@ resources:
LoginNodesU: LoginNodesU:
type: "OS::Heat::ResourceGroup" type: "OS::Heat::ResourceGroup"
properties: properties:
count: My::Server::LoginNodeCountUbuntu count: { get_param: LoginNodeCountUbuntu }
resource_def: resource_def:
type: "OS::Nova::Server" type: "OS::Nova::Server"
properties: properties:
...@@ -212,7 +212,7 @@ resources: ...@@ -212,7 +212,7 @@ resources:
ComputeNodesU: ComputeNodesU:
type: "OS::Heat::ResourceGroup" type: "OS::Heat::ResourceGroup"
properties: properties:
count: My::Server::ComputeNodeCountUbuntu count: { get_param: ComputeNodeCountUbutnu }
resource_def: resource_def:
type: "OS::Nova::Server" type: "OS::Nova::Server"
properties: properties:
...@@ -230,10 +230,10 @@ resources: ...@@ -230,10 +230,10 @@ resources:
networks: networks:
- network: { get_param: NetID } - network: { get_param: NetID }
ComputeNodesC: ComputeNodesCentos7:
type: "OS::Heat::ResourceGroup" type: "OS::Heat::ResourceGroup"
properties: properties:
count: My::Server::ComputeNodeCountCentos count: { get_param: ComputeNodeCountCentos7 }
resource_def: resource_def:
type: "OS::Nova::Server" type: "OS::Nova::Server"
properties: properties:
......
...@@ -55,7 +55,7 @@ function create_stack { ...@@ -55,7 +55,7 @@ function create_stack {
echo "I will NOT create existing stack maybe use update" echo "I will NOT create existing stack maybe use update"
exit -44 exit -44
fi 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=$? createreturn=$?
if [ $createreturn -ne "0" ] if [ $createreturn -ne "0" ]
then then
...@@ -78,14 +78,14 @@ case "$1" in ...@@ -78,14 +78,14 @@ case "$1" in
echo "I cannot update a stack which does not exist" echo "I cannot update a stack which does not exist"
exit -45 exit -45
fi 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=$? ret=$?
exit $ret exit $ret
;; ;;
create_or_update) create_or_update)
if check_stack_exists if check_stack_exists
then 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=$? ret=$?
exit $ret exit $ret
fi fi
......
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
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment