chore: restructure ansible plays & prod/dev paths fixes
This commit is contained in:
@@ -15,7 +15,8 @@ jobs:
|
||||
working-directory: ./bin
|
||||
|
||||
env:
|
||||
DEST_DIR: /sls/bd/hla/bin
|
||||
# TODO: prod/dev
|
||||
DEST_DIR: /sls/bd/hla/dev/bin
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
||||
@@ -16,7 +16,8 @@ jobs:
|
||||
working-directory: ./packages/agebd
|
||||
|
||||
env:
|
||||
DEST_DIR: /sls/bd/hla/packages/dev/agebd
|
||||
# TODO: prod/dev
|
||||
DEST_DIR: /sls/bd/hla/dev/packages/agebd
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
||||
@@ -15,7 +15,8 @@ jobs:
|
||||
working-directory: ./services
|
||||
|
||||
env:
|
||||
SVC_CURRRENT_DIR: /sls/bd/hla/services/dev/000-master/current
|
||||
# TODO: prod/dev
|
||||
SVC_CURRRENT_DIR: /sls/bd/hla/dev/services/000-master/current
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
||||
@@ -18,4 +18,4 @@ jobs:
|
||||
|
||||
- name: Restart master service
|
||||
run: |
|
||||
ansible-playbook restart-master-ioc.yml -i hosts.yml
|
||||
ansible-playbook add-new-service.yml -i hosts.yml
|
||||
@@ -0,0 +1,8 @@
|
||||
- name: Restart Master IOC
|
||||
import_playbook: plays/restart-master-ioc.yml
|
||||
|
||||
- name: Phase 2 - Provision and Render New Services
|
||||
import_playbook: plays/provision_services.yml
|
||||
|
||||
- name: Phase 3 - Restart and Verify IOCs
|
||||
import_playbook: plays/restart_iocs.yml
|
||||
@@ -2,22 +2,6 @@
|
||||
# TODO: dev/prod
|
||||
hosts: sls-lc
|
||||
gather_facts: false
|
||||
|
||||
#TODO: docs?
|
||||
# For the git clone and git push commands to work smoothly inside this playbook,
|
||||
# ensure your shell environment is passing your SSH key. Run ssh-add -l on your
|
||||
# terminal before firing up ansible-playbook.
|
||||
|
||||
# TODO
|
||||
# If the machine executing this playbook doesn't have a global Git user configured,
|
||||
# the git commit task will fail. You can explicitly bypass this by adding environment
|
||||
# variables directly to the commit task if needed:
|
||||
# environment:
|
||||
# GIT_COMMITTER_NAME: "Ansible Provisioner"
|
||||
# GIT_COMMITTER_EMAIL: "your-email@psi.ch"
|
||||
# GIT_AUTHOR_NAME: "Ansible Provisioner"
|
||||
# GIT_AUTHOR_EMAIL: "your-email@psi.ch"
|
||||
|
||||
|
||||
# TODO: checkout repo, cd to services/<svc>/ioc, 'ioc install -V --ioc AGEBD-CPCL-<SVC> –clean'
|
||||
vars:
|
||||
@@ -26,7 +10,6 @@
|
||||
- service_name_lower: "{{ service_name_lower }}"
|
||||
- service_name_upper: "{{ service_name_upper }}"
|
||||
|
||||
|
||||
tasks:
|
||||
- name: Clone this repository
|
||||
ansible.builtin.git:
|
||||
@@ -1,5 +1,6 @@
|
||||
- name: Auto-provision new service pipeline
|
||||
hosts: sls-lc
|
||||
- name: Start an IOC
|
||||
# TODO: env
|
||||
hosts: sls-vserv-bd-01-dev
|
||||
gather_facts: false
|
||||
|
||||
#TODO: docs?
|
||||
@@ -18,13 +19,9 @@
|
||||
# GIT_AUTHOR_EMAIL: "your-email@psi.ch"
|
||||
|
||||
tasks:
|
||||
- name: "Step 0: "
|
||||
ansible.builtin.import_tasks: tasks/00-create-service.yml
|
||||
# These variables are only visible inside this task
|
||||
vars:
|
||||
service_name: "OPTICSFF-X09L"
|
||||
sls_bd_repo_url: "git@gitea.psi.ch:autodeploy_bin/sls_bd.git"
|
||||
target_branch: "feature/add-{{ service_name | lower }}" # e.g., feature/add-tunefbx
|
||||
workspace_dir: "/tmp/sls_bd_workspace"
|
||||
tags:
|
||||
- step_00
|
||||
- name: Start IOC
|
||||
# TODO:
|
||||
# sudo shellbox status
|
||||
# sudo shellbox reload
|
||||
# sudo shellbox status
|
||||
# sudo shellbox start XXXXXXX
|
||||
@@ -3,21 +3,6 @@
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
|
||||
#TODO: docs?
|
||||
# For the git clone and git push commands to work smoothly inside this playbook,
|
||||
# ensure your shell environment is passing your SSH key. Run ssh-add -l on your
|
||||
# terminal before firing up ansible-playbook.
|
||||
|
||||
# TODO
|
||||
# If the machine executing this playbook doesn't have a global Git user configured,
|
||||
# the git commit task will fail. You can explicitly bypass this by adding environment
|
||||
# variables directly to the commit task if needed:
|
||||
# environment:
|
||||
# GIT_COMMITTER_NAME: "Ansible Provisioner"
|
||||
# GIT_COMMITTER_EMAIL: "your-email@psi.ch"
|
||||
# GIT_AUTHOR_NAME: "Ansible Provisioner"
|
||||
# GIT_AUTHOR_EMAIL: "your-email@psi.ch"
|
||||
|
||||
vars:
|
||||
- workspace_dir: "/tmp/hla_framework_bd"
|
||||
|
||||
Reference in New Issue
Block a user