Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
746a1a35
Commit
746a1a35
authored
5 years ago
by
Andreas Hamacher
Browse files
Options
Downloads
Patches
Plain Diff
fixing some issues from the first commit. mainly key handling and pathes
parent
2e6036f5
No related branches found
No related tags found
3 merge requests
!297
Cicd merge back
,
!284
Cicd
,
!282
CICD
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+4
-0
4 additions, 0 deletions
.gitignore
.gitlab-ci.yml
+43
-38
43 additions, 38 deletions
.gitlab-ci.yml
CICD/ansible_create_cluster_script.sh
+0
-1
0 additions, 1 deletion
CICD/ansible_create_cluster_script.sh
with
47 additions
and
39 deletions
.gitignore
+
4
−
0
View file @
746a1a35
*.swp
*.retry
*-openrc.sh
gc_key.pem
CICD/files/slurm.conf
CICD/files/slurmdbd.conf
CICD/files/ssh_known_hosts
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
43
−
38
View file @
746a1a35
...
...
@@ -7,12 +7,21 @@ stages:
# - integration_test_downstream # working but unwanted here
# - trigger_pipeline_in_B # working but unwanted here
-
yamllint
#
- heat
-
heat
-
ansible_create_cluster_stage
-
push_button_spawn_cluster
# - e2e
-
tests
# - clean # only on master
-
clean
# only on master
setup
:
stage
:
.pre
tags
:
-
ansible
script
:
-
echo $GC_KEY > gc_key.pem
-
chmod 400 gc_key.pem
-
echo $HPCCICD_openrc > ./$NECTAR_ALLOCATION-openrc.sh
#trigger_pipeline_in_B:
# stage: integration_test_downstream
...
...
@@ -21,33 +30,33 @@ stages:
# script:
# - "curl --request POST --form token=${CI_JOB_TOKEN} --form ref=master https://gitlab.erc.monash.edu.au/api/v4/projects/1085/trigger/pipeline" # ID is from pysshauthz
heat_test
:
stage
:
heat
allow_failure
:
false
tags
:
-
heat
before_script
:
-
source ./
keys/
$NECTAR_ALLOCATION-openrc.sh
-
export HEAT_TEST_STACKNAME=_TESTING_HEAT
-
bash -x ./heat/heatcicdwrapper.sh delete_if_exists $HEAT_TEST_STACKNAME
-
sleep
60
script
:
-
echo "heat_test stage"
-
source ./
keys/
$NECTAR_ALLOCATION-openrc.sh
-
bash -x ./heat/heatcicdwrapper.sh create $HEAT_TEST_STACKNAME
-
openstack stack list
-
bash -x ./heat/heatcicdwrapper.sh update $HEAT_TEST_STACKNAME
-
openstack stack list
-
bash -x ./heat/heatcicdwrapper.sh delete_if_exists $HEAT_TEST_STACKNAME
-
openstack stack list
after_script
:
-
sleep
20
# artifically wait a bit to make sure it is really dead
only
:
changes
:
#https://docs.gitlab.com/ee/ci/yaml/#onlychangesexceptchanges
-
"
heat/heatcicdwrapper.sh"
-
"
heat/*.{yml,yaml}"
-
schedules
#- CICD/.gitlab-ci.yml
#
heat_test:
#
stage: heat
#
allow_failure: false
#
tags:
#
- heat
#
before_script:
#
- source ./$NECTAR_ALLOCATION-openrc.sh
#
- export HEAT_TEST_STACKNAME=_TESTING_HEAT
#
- bash -x ./heat/heatcicdwrapper.sh delete_if_exists $HEAT_TEST_STACKNAME
#
- sleep 60
#
script:
#
- echo "heat_test stage"
#
- source ./$NECTAR_ALLOCATION-openrc.sh
#
- bash -x ./heat/heatcicdwrapper.sh create $HEAT_TEST_STACKNAME
#
- openstack stack list
#
- bash -x ./heat/heatcicdwrapper.sh update $HEAT_TEST_STACKNAME
#
- openstack stack list
#
- bash -x ./heat/heatcicdwrapper.sh delete_if_exists $HEAT_TEST_STACKNAME
#
- openstack stack list
#
after_script:
#
- sleep 20 # artifically wait a bit to make sure it is really dead
#
only:
#
changes: #https://docs.gitlab.com/ee/ci/yaml/#onlychangesexceptchanges
#
- "heat/heatcicdwrapper.sh"
#
- "heat/*.{yml,yaml}"
#
- schedules
#
#- CICD/.gitlab-ci.yml
yamllint
:
stage
:
yamllint
...
...
@@ -100,7 +109,7 @@ tests:
script
:
-
echo "tests stage"
-
export ANSIBLE_HOST_KEY_CHECKING=False
-
source ./
keys/
$NECTAR_ALLOCATION-openrc.sh
-
source ./$NECTAR_ALLOCATION-openrc.sh
-
python3 dependencies/ansible_cluster_in_a_box/scripts/make_inventory.py static CICD$STACKNAME | tee ./files/cicd_inventory
-
grep -qv "I could not find any resouces tagged with project_name:" ./files/cicd_inventory
#fail if inventory file is empty
-
chmod 755 ./files/cicd_inventory
...
...
@@ -131,7 +140,7 @@ manual_cluster_spawn:
-
echo I still need to handle os password
-
echo $MANUAL_STACKNAME
script
:
-
source ./
keys/
$NECTAR_ALLOCATION-openrc.sh
-
source ./$NECTAR_ALLOCATION-openrc.sh
-
bash -x ./heat/heatcicdwrapper.sh create $MANUAL_STACKNAME
-
git submodule update --init --remote --merge
-
openstack stack list
...
...
@@ -154,10 +163,6 @@ clean:
-
echo "cleanup master"
-
sleep
30
script
:
-
source ./keys/$NECTAR_ALLOCATION-openrc.sh
-
bash -x ./heat/heatcicdwrapper.sh delete_if_exists _reporefmaster
# hardcoding master stackname on purpose here
only
:
refs
:
-
"
master"
changes
:
-
schedules
-
source ./$NECTAR_ALLOCATION-openrc.sh
-
bash -x ./heat/heatcicdwrapper.sh delete_if_exists $STACKNAME
This diff is collapsed.
Click to expand it.
CICD/ansible_create_cluster_script.sh
+
0
−
1
View file @
746a1a35
...
...
@@ -9,7 +9,6 @@ cd CICD
echo
"[ansible_create_cluster_script] Prefixing the Stackname with CICD because heatcicdwrapper does he same"
python3 ../scripts/make_inventory.py static CICD
$STACKNAME
|
tee
./files/inventory.
$STACKNAME
&&
chmod
755 ./files/inventory.
$STACKNAME
grep
-qv
"I could not find any resouces tagged with project_name:"
./files/inventory.
$STACKNAME
#fail if inventory file is empty
chmod
400 ../gc_key.pem
ansible
-m
ping
-i
files/inventory.
$STACKNAME
--key-file
../gc_key.pem all
ansible
-i
files/inventory.
$STACKNAME
--key-file
../gc_key.pem
-a
"sudo ls"
all
...
...
This diff is collapsed.
Click to expand it.
Andreas Hamacher
@handreas
mentioned in commit
46f7409b
·
4 years ago
mentioned in commit
46f7409b
mentioned in commit 46f7409bb7108623c4650c95abc2f65c6abb2b8b
Toggle commit list
Andreas Hamacher
@handreas
mentioned in commit
7df62138
·
4 years ago
mentioned in commit
7df62138
mentioned in commit 7df62138d94bba110540c902fb0d45377aae1600
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment