Add a couchbase image.

This commit is contained in:
Andrea Dell'Amico 2022-12-02 14:59:47 +01:00
parent 123727acf0
commit c4002a844e
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
5 changed files with 52 additions and 5 deletions

View File

@ -30,7 +30,12 @@ open_asfa_pgadmin_email: 'noreply@example.com'
#open_asfa_pgadmin_default_pwd: 'Use a vault' #open_asfa_pgadmin_default_pwd: 'Use a vault'
open_asfa_pgadmin_inactivity_timeout: '1200' open_asfa_pgadmin_inactivity_timeout: '1200'
open_asfa_keylocak_auth_url: http://localhost:8080/auth/ open_asfa_couchbase_image: 'couchbase:community'
open_asfa_couchbase_volume_type: 'local'
open_asfa_couchbase_volume_o: ""
open_asfa_couchbase_volume_device: ""
open_asfa_keycloak_auth_url: http://localhost:8080/auth/
open_asfa_keycloak_client_secret: 'use a vault' open_asfa_keycloak_client_secret: 'use a vault'
open_asfa_keycloak_realm: 'realm' open_asfa_keycloak_realm: 'realm'
open_asfa_keycloak_client_name: 'asfa_client_name' open_asfa_keycloak_client_name: 'asfa_client_name'

View File

@ -2,12 +2,13 @@ galaxy_info:
author: Andrea Dell'Amico author: Andrea Dell'Amico
description: Systems Architect description: Systems Architect
company: ISTI-CNR company: ISTI-CNR
role_name: open_asfa_test
issue_tracker_url: https://support.d4science.org/projects/d4science-operation issue_tracker_url: https://support.d4science.org/projects/d4science-operation
license: EUPL 1.2+ license: EUPL 1.2+
min_ansible_version: 2.8 min_ansible_version: '2.9'
# To view available platforms and versions (or releases), visit: # To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/ # https://galaxy.ansible.com/api/v1/platforms/
@ -18,7 +19,7 @@ galaxy_info:
- bionic - bionic
- name: EL - name: EL
versions: versions:
- 7 - '7'
galaxy_tags: galaxy_tags:
- open-asfa - open-asfa

View File

@ -35,7 +35,11 @@
template: src=open-asfa-db-docker-compose.yml.j2 dest={{ open_asfa_compose_dir }}/docker-open-asfa-stack-db-test.yml owner=root group=root mode='0400' template: src=open-asfa-db-docker-compose.yml.j2 dest={{ open_asfa_compose_dir }}/docker-open-asfa-stack-db-test.yml owner=root group=root mode='0400'
when: open_asfa_db_as_container when: open_asfa_db_as_container
- name: Install the docker compose file - name: Install the docker compose file of Couchbase
template: src=open-asfa-couchbase-docker-compose.yml.j2 dest={{ open_asfa_compose_dir }}/docker-open-asfa-stack-couchbase-test.yml owner=root group=root mode='0400'
when: open_asfa_db_as_container
- name: Install the docker compose file of the open-asfa service
template: src=open-asfa-docker-compose.yml.j2 dest={{ open_asfa_compose_dir }}/docker-open-asfa-stack-test.yml owner=root group=root mode='0400' template: src=open-asfa-docker-compose.yml.j2 dest={{ open_asfa_compose_dir }}/docker-open-asfa-stack-test.yml owner=root group=root mode='0400'
- name: Start the OpenAsfa stack - name: Start the OpenAsfa stack
@ -45,6 +49,7 @@
compose: compose:
- '{{ open_asfa_compose_dir }}/docker-open-asfa-stack-db-test.yml' - '{{ open_asfa_compose_dir }}/docker-open-asfa-stack-db-test.yml'
- '{{ open_asfa_compose_dir }}/docker-open-asfa-stack-test.yml' - '{{ open_asfa_compose_dir }}/docker-open-asfa-stack-test.yml'
- '{{ open_asfa_compose_dir }}/docker-open-asfa-stack-couchbase-test.yml'
run_once: True run_once: True
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool

View File

@ -0,0 +1,36 @@
version: '3.6'
networks:
{% if open_asfa_behind_haproxy %}
haproxy-public:
external: true
{% endif %}
{{ open_asfa_docker_network }}:
volumes:
{{ open_asfa_couchbase_volume }}:
{% if open_asfa_couchbase_volume_type == "nfs4" %}
driver: local
driver_opts:
type: {{ open_asfa_couchbase_volume_type }}
o: "{{ open_asfa_couchbase_volume_o }}"
device: "{{ open_asfa_couchbase_volume_device }}"
{% endif %}
services:
couchbase:
image: {{ open_asfa_couchbase_image }}
networks:
- {{ open_asfa_docker_network }}
volumes:
- {{ open_asfa_couchbase_volume }}:/opt/couchbase/var
deploy:
placement:
constraints: [node.role == worker]
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
logging:
driver: 'journald'

View File

@ -23,7 +23,7 @@ services:
SCHEMA: {{ open_asfa_db_name }} SCHEMA: {{ open_asfa_db_name }}
DB_USER: {{ open_asfa_db_user }} DB_USER: {{ open_asfa_db_user }}
DB_PASSWORD: {{ open_asfa_db_pwd }} DB_PASSWORD: {{ open_asfa_db_pwd }}
AUTH_URL: {{ open_asfa_keylocak_auth_url }} AUTH_URL: {{ open_asfa_keycloak_auth_url }}
SECRET: {{ open_asfa_keycloak_client_secret }} SECRET: {{ open_asfa_keycloak_client_secret }}
REALM: {{ open_asfa_keycloak_realm }} REALM: {{ open_asfa_keycloak_realm }}
CLIENT: {{ open_asfa_keycloak_client_name }} CLIENT: {{ open_asfa_keycloak_client_name }}