Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
encyclopedia-gui
Commits
a9379daf
Commit
a9379daf
authored
Apr 11, 2018
by
Iker Hurtado
Browse files
Merge branch 'master' of
https://gitlab.mpcdf.mpg.de/nomad-lab/encyclopedia-gui
parents
2760047d
3a6c9e1e
Pipeline
#27193
passed with stages
in 6 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
a9379daf
stages
:
-
Deploy On Testing
-
Deploy On LB
-
Deploy On ProductionSUSE
-
Deployment staging
-
Deployment production
Deploy Test
ing
:
stage
:
Deploy
On Test
ing
Stag
ing
:
stage
:
Deploy
ment stag
ing
script
:
-
pwd
-
source /home/deploy/ansible-provision/ansible-venv/bin/activate
-
cd deploy
-
ansible-playbook -i hosts playbook-
te
sting.yml
-
echo "Deployed
O
n
Testing
-> DONE"
-
ansible-playbook -i hosts playbook-st
ag
ing.yml
-
echo "Deployed
o
n
enc-staging-nomad machine
-> DONE"
-
ls -al
-
pwd
only
:
-
master
Deploy LB
:
stage
:
Deploy
On LB
Production
:
stage
:
Deploy
ment production
script
:
-
pwd
-
source /home/deploy/ansible-provision/ansible-venv/bin/activate
-
cd deploy
-
ansible-playbook -i hosts playbook-
lb-centos
.yml
-
echo "Deployed
On LB
-> DONE"
-
ansible-playbook -i hosts playbook-
production
.yml
-
echo "Deployed
on production (enc-lb-nomad) machine
-> DONE"
-
ls -al
-
pwd
only
:
-
master
when
:
manual
Deploy ProductionSUSE
:
stage
:
Deploy On ProductionSUSE
script
:
-
pwd
-
source /home/deploy/ansible-provision/ansible-venv/bin/activate
-
cd deploy
-
ansible-playbook -i hosts playbook-production-suse.yml
-
echo "Deployed On Production SUSE -> DONE"
-
ls -al
-
pwd
when
:
manual
deploy/hosts
View file @
a9379daf
[
te
sting]
enc-
te
sting-nomad.esc.rzg.mpg.de
[st
ag
ing]
enc-st
ag
ing-nomad.esc.rzg.mpg.de
[
lb
]
[
production
]
enc-lb-nomad.esc.rzg.mpg.de
[production-suse]
enc-production-nomad.esc.rzg.mpg.de
deploy/playbook-production-suse.yml
deleted
100644 → 0
View file @
2760047d
---
-
hosts
:
production-suse
vars
:
project_root
:
/home/nomadapp/gui
project_repo
:
git@gitlab.mpcdf.mpg.de:nomad-lab/encyclopedia-gui.git
project_cloned_dir
:
/home/deploy/encyclopedia-gui-repo-cloned
tasks
:
-
name
:
Pull sources from the repository
git
:
repo={{ project_repo }} dest={{ project_cloned_dir }}
-
name
:
Copy only GUI source files from cloned repo to project directory
synchronize
:
src={{ project_cloned_dir }}/client/ dest={{ project_root}}/
delegate_to
:
"
{{
inventory_hostname
}}"
become
:
yes
-
name
:
Change permissions for project directory
shell
:
chown -R nomadapp:users {{ project_root }}
become
:
yes
handlers
:
-
name
:
restart nginx
service
:
name=nginx state=restarted
become_user
:
root
-
name
:
reload nginx
service
:
name=nginx state=reloaded
become_user
:
root
deploy/playbook-
lb-centos
.yml
→
deploy/playbook-
production
.yml
View file @
a9379daf
---
-
hosts
:
lb
-
hosts
:
production
vars
:
project_root
:
/home/nomadapp/gui
project_repo
:
git@gitlab.mpcdf.mpg.de:nomad-lab/encyclopedia-gui.git
...
...
deploy/playbook-
te
sting.yml
→
deploy/playbook-st
ag
ing.yml
View file @
a9379daf
---
-
hosts
:
te
sting
-
hosts
:
st
ag
ing
vars
:
project_root
:
/home/nomadapp/gui
project_repo
:
git@gitlab.mpcdf.mpg.de:nomad-lab/encyclopedia-gui.git
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment