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

some refactoring in the heat templates to allow more diverse stacks

Former-commit-id: 7f85baf1
parent 2d790f59
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,7 @@ resources:
MgmtNodesC:
type: "OS::Heat::ResourceGroup"
properties:
count: 1
count: My::Server::MgmtNodeCountCentos7
resource_def:
type: My::Server::MgmtNode
properties:
......@@ -133,7 +133,7 @@ resources:
MgmtNodesU:
type: "OS::Heat::ResourceGroup"
properties:
count: 1
count: My::Server::MgmtNodeCountUbuntu
resource_def:
type: My::Server::MgmtNode
properties:
......@@ -149,7 +149,7 @@ resources:
LoginNodesC:
type: "OS::Heat::ResourceGroup"
properties:
count: 0
count: My::Server::LoginNodeCountCentos
resource_def:
type: "OS::Nova::Server"
properties:
......@@ -170,7 +170,7 @@ resources:
LoginNodesU:
type: "OS::Heat::ResourceGroup"
properties:
count: 1
count: My::Server::LoginNodeCountUbuntu
resource_def:
type: "OS::Nova::Server"
properties:
......@@ -212,7 +212,7 @@ resources:
ComputeNodesU:
type: "OS::Heat::ResourceGroup"
properties:
count: 1
count: My::Server::ComputeNodeCountUbuntu
resource_def:
type: "OS::Nova::Server"
properties:
......@@ -233,7 +233,7 @@ resources:
ComputeNodesC:
type: "OS::Heat::ResourceGroup"
properties:
count: 1
count: My::Server::ComputeNodeCountCentos
resource_def:
type: "OS::Nova::Server"
properties:
......
......@@ -4,17 +4,17 @@
function usage {
echo $"Usage: $0 {create|update|show|create_or_update,delete_if_exists} STACKNAME"
echo $"Usage: $0 {create|update|show|create_or_update,delete_if_exists} STACKNAME CI_PROJECT_NAME"
exit 1
}
if [ "$#" -ne 2 ]; then
echo "Illegal number of parameters expecting 2"
if [ "$#" -ne 3 ]; then
echo "Illegal number of parameters expecting 3"
usage
fi
STACKNAME=$2
CI_PROJECT_NAME=$3
if [[ "$STACKNAME" == "CICD"* ]]; then
echo "CICD found in stackname. doing nothing"
......@@ -60,7 +60,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 ./heat/resource_registry.yaml $STACKNAME
openstack stack create --wait --template ./heat/gc_HOT.yaml --parameter "project_name=$STACKNAME" -e ./resource_registry.${CI_PROJECT_NAME}.yaml $STACKNAME
createreturn=$?
if [ $createreturn -ne "0" ]
then
......@@ -83,14 +83,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 ./heat/resource_registry.yaml $STACKNAME
openstack stack update --wait --template ./heat/gc_HOT.yaml --parameter "project_name=$STACKNAME" -e ./resource_registry.${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 ./heat/resource_registry.yaml $STACKNAME
openstack stack update --wait --template ./heat/gc_HOT.yaml --parameter "project_name=$STACKNAME" -e ./resource_registry.${CI_PROJECT_NAME}.yaml $STACKNAME
ret=$?
exit $ret
fi
......
resource_registry:
My::Server::MgmtNode: mgmtnode_HOT.yaml
resource_registry:
My::Server::MgmtNode: 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
......@@ -3,7 +3,7 @@ desktopNodeList:
- { name : 'DesktopNodes', interface : 'eth0' }
clustername: "m3"
projectname: "m3"
slurm_version: 19.05.3-2
slurm_version: 19.05.4
munge_version: 0.5.13
nhc_version: 1.4.2
munge_dir: /opt/munge-{{ munge_version }}
......
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