Commit c4d974c9 authored by Ioan Vancea's avatar Ioan Vancea
Browse files

Added the new CentOS production machine as deployment option for GUI - right...

Added the new CentOS production machine as deployment option for GUI - right now manual only trigger
parent f27cab02
Pipeline #24153 passed with stages
in 7 seconds
stages:
- Deploy On Testing
- Deploy On Production
- Deploy On ProductionCentOS
- Deploy On ProductionSUSE
Deploy Testing:
stage: Deploy On Testing
......@@ -15,14 +16,26 @@ Deploy Testing:
only:
- master
Deploy Production:
stage: Deploy On Production
Deploy ProductionCentOS:
stage: Deploy On ProductionCentOS
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-production-centos.yml
- echo "Deployed On Production CentOS-> DONE"
- ls -al
- pwd
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]
[production-centos]
enc-production-hv-nomad.esc.rzg.mpg.de
[production-suse]
enc-production-nomad.esc.rzg.mpg.de
---
- hosts: production-centos
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:nomadapp {{ project_root }}
become: yes
- name: Restart NGINX
command: systemctl restart nginx
---
- 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