Loading deploy/ansible/playbook.yml +1 −0 Original line number Diff line number Diff line Loading @@ -10,4 +10,5 @@ - docker - { name: data, tags: [data] } - { name: index, tags: [index] } - { name: idp, tags: [idp] } - proxy deploy/ansible/roles/idp/defaults/main.yml 0 → 100644 +27 −0 Original line number Diff line number Diff line --- ### # Default values used for all images # Each of these values can be overidden on a per-image basis if required ### # The image prefix to use # If using a private registry, change this, e.g. registry.ceda.ac.uk/esgfdeploy image_prefix: esgfdeploy # The image tag to use image_tag: latest # Indicates whether images should be pulled every time the playbook runs # When using mutable tags, like latest or branch names, this should be true # When using immutable tags, like commit shas or release tags, this can be false image_pull: true ### # Proxy configuration ### # Settings for the idp image idp_image_prefix: "{{ image_prefix }}" idp_image_tag: "{{ image_tag }}" idp_image_pull: "{{ image_pull }}" idp_image_repository: keycloak deploy/ansible/roles/idp/tasks/idp_install.yml 0 → 100644 +32 −0 Original line number Diff line number Diff line --- - name: Create Docker network docker_network: name: esgf - name: Make idp config directory file: path: /esg/config/idp state: directory - name: Write idp configuration template: src: "{{ item }}.j2" dest: "/esg/config/idp/{{ item }}" loop: ["realm.json"] - name: Start idp container docker_container: name: idp image: "{{ idp_image_prefix }}/{{ idp_image_repository }}:{{ idp_image_tag }}" pull: "{{ idp_image_pull }}" detach: yes restart_policy: unless-stopped exposed_ports: - "8080" networks: - name: esgf networks_cli_compatible: yes volumes: ["/esg/config/idp:/esg/config:ro"] state: started restart: yes deploy/ansible/roles/idp/tasks/idp_uninstall.yml 0 → 100644 +11 −0 Original line number Diff line number Diff line --- - name: Stop idp container docker_container: name: idp state: absent - name: Remove idp config directory file: path: /esg/config/idp state: absent deploy/ansible/roles/idp/tasks/main.yml 0 → 100644 +13 −0 Original line number Diff line number Diff line --- ##### ## Tasks to configure and deploy containers for an index node ##### - name: Install the IDP include: idp_install.yml when: "'idp' in group_names" - name: Uninstall the IDP include: solr_uninstall.yml when: "'idp' not in group_names" Loading
deploy/ansible/playbook.yml +1 −0 Original line number Diff line number Diff line Loading @@ -10,4 +10,5 @@ - docker - { name: data, tags: [data] } - { name: index, tags: [index] } - { name: idp, tags: [idp] } - proxy
deploy/ansible/roles/idp/defaults/main.yml 0 → 100644 +27 −0 Original line number Diff line number Diff line --- ### # Default values used for all images # Each of these values can be overidden on a per-image basis if required ### # The image prefix to use # If using a private registry, change this, e.g. registry.ceda.ac.uk/esgfdeploy image_prefix: esgfdeploy # The image tag to use image_tag: latest # Indicates whether images should be pulled every time the playbook runs # When using mutable tags, like latest or branch names, this should be true # When using immutable tags, like commit shas or release tags, this can be false image_pull: true ### # Proxy configuration ### # Settings for the idp image idp_image_prefix: "{{ image_prefix }}" idp_image_tag: "{{ image_tag }}" idp_image_pull: "{{ image_pull }}" idp_image_repository: keycloak
deploy/ansible/roles/idp/tasks/idp_install.yml 0 → 100644 +32 −0 Original line number Diff line number Diff line --- - name: Create Docker network docker_network: name: esgf - name: Make idp config directory file: path: /esg/config/idp state: directory - name: Write idp configuration template: src: "{{ item }}.j2" dest: "/esg/config/idp/{{ item }}" loop: ["realm.json"] - name: Start idp container docker_container: name: idp image: "{{ idp_image_prefix }}/{{ idp_image_repository }}:{{ idp_image_tag }}" pull: "{{ idp_image_pull }}" detach: yes restart_policy: unless-stopped exposed_ports: - "8080" networks: - name: esgf networks_cli_compatible: yes volumes: ["/esg/config/idp:/esg/config:ro"] state: started restart: yes
deploy/ansible/roles/idp/tasks/idp_uninstall.yml 0 → 100644 +11 −0 Original line number Diff line number Diff line --- - name: Stop idp container docker_container: name: idp state: absent - name: Remove idp config directory file: path: /esg/config/idp state: absent
deploy/ansible/roles/idp/tasks/main.yml 0 → 100644 +13 −0 Original line number Diff line number Diff line --- ##### ## Tasks to configure and deploy containers for an index node ##### - name: Install the IDP include: idp_install.yml when: "'idp' in group_names" - name: Uninstall the IDP include: solr_uninstall.yml when: "'idp' not in group_names"