Commit 208f2b3b authored by Iker Hurtado's avatar Iker Hurtado
Browse files
parents 0988e560 da97996f
Pipeline #24268 passed with stages
in 7 seconds
stages:
- Deploy On Testing
- Deploy On Production
- Deploy On LB
- Deploy On ProductionSUSE
Deploy Testing:
stage: Deploy On Testing
......@@ -15,14 +16,28 @@ Deploy Testing:
only:
- master
Deploy Production:
stage: Deploy On Production
Deploy LB:
stage: Deploy On LB
script:
- pwd
- source /home/deploy/ansible-provision/ansible-venv/bin/activate
- cd deploy
- ansible-playbook -i hosts playbook-production.yml
- echo "Deployed On Production -> DONE"
- ansible-playbook -i hosts playbook-lb-centos.yml
- echo "Deployed On LB -> 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
[testing]
enc-testing-nomad.esc.rzg.mpg.de
[production]
[lb]
enc-lb-nomad.esc.rzg.mpg.de
[production-suse]
enc-production-nomad.esc.rzg.mpg.de
---
- hosts: lb
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 }} accept_hostkey=yes
- 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:nomadapp {{ project_root }}
become: yes
- name: Restart NGINX
command: systemctl restart nginx
become: yes
---
- hosts: production
- hosts: production-suse
vars:
project_root: /home/nomadapp/gui
project_repo: git@gitlab.mpcdf.mpg.de:nomad-lab/encyclopedia-gui.git
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment