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:
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:
......
......@@ -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
......
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