diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2de2499 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "ansible.python.interpreterPath": "/opt/local/bin/python3.10" +} \ No newline at end of file diff --git a/group_vars/all/all.yml b/group_vars/all/all.yml index c15dfb4..a32c2f5 100644 --- a/group_vars/all/all.yml +++ b/group_vars/all/all.yml @@ -1,4 +1,4 @@ --- bluecloud_ontotagme_authorized_scopes: '/d4science.research-infrastructures.eu/SoBigData/TagMe' -bluecloud_ontotagme_service_host: 'ontotagme-bluecloud.d4science.org' +bluecloud_ontotagme_service_host: 'ontotagme-sobigdata.d4science.org' bluecloud_ontotagme_pep: false diff --git a/roles/ontagme/templates/ontagme-docker-compose.yml.j2 b/roles/ontagme/templates/ontagme-docker-compose.yml.j2 deleted file mode 100644 index 24df0c7..0000000 --- a/roles/ontagme/templates/ontagme-docker-compose.yml.j2 +++ /dev/null @@ -1,48 +0,0 @@ -version: '3.6' - -networks: - {{ ontotagme_docker_network }}: -{% if not ontotagme_pep %} - haproxy-public: - external: true -{% endif %} - -volumes: - {{ ontotagme_data_volume }}: - {% if ontotagme_data_volume_type == "nfs4" %} - - driver: local - driver_opts: - type: {{ ontotagme_data_volume_type }} - o: "{{ ontotagme_data_volume_o }}" - device: "{{ ontotagme_data_volume_device }}" - {% endif %} - -services: - {{ ontotagme_docker_catalogue_service_name }}: - image: {{ ontotagme_docker_catalogue_service_image }} - networks: - - {{ ontotagme_docker_network }} -{% if not ontotagme_pep %} - - haproxy-public -{% endif %} - environment: - JVM_ARGS: -Xmx2g - JAVA_OPTIONS: -Xmx2048m -Xms2048m - ADMIN_PASSWORD: {{ vault_ontotagme_admin_password }} - volumes: - - {{ ontotagme_data_volume }}:/fuseki-base - deploy: - mode: replicated - replicas: 1 - endpoint_mode: dnsrr - placement: - constraints: [node.role == worker] - restart_policy: - condition: on-failure - delay: 5s - max_attempts: 5 - window: 120s - logging: - driver: 'journald' - diff --git a/roles/ontagme/defaults/main.yml b/roles/ontotagme/defaults/main.yml similarity index 50% rename from roles/ontagme/defaults/main.yml rename to roles/ontotagme/defaults/main.yml index d9888c3..e2da4e1 100644 --- a/roles/ontagme/defaults/main.yml +++ b/roles/ontotagme/defaults/main.yml @@ -1,10 +1,10 @@ --- -ontotagme_compose_dir: '/srv/bluecloud_ontotagme_stack' -ontotagme_docker_stack_name: 'bluecloud-ontotagme' -ontotagme_docker_catalogue_service_name: 'ontotagme' -ontotagme_docker_catalogue_service_image: 'lorenzobellomosns/ontotagme-sobigdata/' -ontotagme_docker_network: 'bluecloud-ontotagme-network' -ontotagme_catalogue_ui_port: 8080 +ontotagme_compose_dir: '/srv/sobigdata_ontotagme_stack' +ontotagme_docker_stack_name: 'sobigdata-ontotagme' +ontotagme_docker_service_name: 'ontotagme' +ontotagme_docker_service_image: 'lorenzobellomosns/ontotagme-sobigdata:latest' +ontotagme_docker_network: 'sobigdata-ontotagme-network' +ontotagme_service_port: 5050 ontotagme_haproxy_public_net: 'haproxy-public' ontotagme_authorized_scopes: '/gcube' @@ -15,7 +15,7 @@ pep_replicas: 1 nginx_pep_debug_enabled: 'false' nginx_pep_max_body_size: 500M nginx_pep_body_timeout: 60s -nginx_pep_base_url: https://code-repo.d4science.org/gCubeSystem/d4s-nginx-pep-examples/raw/branch/master/bluecloud-ontotagme/ +nginx_pep_base_url: https://code-repo.d4science.org/gCubeSystem/d4s-nginx-pep-examples/raw/branch/master/sobigdata-ontotagme/ nginx_pep_templates: - nginx.conf - nginx.default.conf diff --git a/roles/ontagme/meta/main.yml b/roles/ontotagme/meta/main.yml similarity index 82% rename from roles/ontagme/meta/main.yml rename to roles/ontotagme/meta/main.yml index d2f5aec..ca26ef3 100644 --- a/roles/ontagme/meta/main.yml +++ b/roles/ontotagme/meta/main.yml @@ -1,6 +1,6 @@ galaxy_info: author: Andrea Dell'Amico - description: Role that deploys the JERICO CORE into a Docker Swarm + description: Role that deploys the OntoTAGME Sobigdata service into a Docker Swarm company: ISTI-CNR namespace: adellam role_name: ontotagme diff --git a/roles/ontagme/tasks/main.yml b/roles/ontotagme/tasks/main.yml similarity index 100% rename from roles/ontagme/tasks/main.yml rename to roles/ontotagme/tasks/main.yml diff --git a/roles/ontagme/tasks/ontagme.yml b/roles/ontotagme/tasks/ontotagme.yml similarity index 90% rename from roles/ontagme/tasks/ontagme.yml rename to roles/ontotagme/tasks/ontotagme.yml index 24849d7..9bc2c4a 100644 --- a/roles/ontagme/tasks/ontagme.yml +++ b/roles/ontotagme/tasks/ontotagme.yml @@ -1,5 +1,5 @@ --- -- name: ontotagme | Manage the installation of the Sobigdata REL project Docker stack +- name: ontotagme | Manage the installation of the Sobigdata OntoTAGME project Docker stack when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool tags: ['ontotagme'] run_once: true diff --git a/roles/ontagme/tasks/pep.yml b/roles/ontotagme/tasks/pep.yml similarity index 100% rename from roles/ontagme/tasks/pep.yml rename to roles/ontotagme/tasks/pep.yml diff --git a/roles/ontotagme/templates/ontotagme-docker-compose.yml.j2 b/roles/ontotagme/templates/ontotagme-docker-compose.yml.j2 new file mode 100644 index 0000000..a7e527d --- /dev/null +++ b/roles/ontotagme/templates/ontotagme-docker-compose.yml.j2 @@ -0,0 +1,31 @@ +version: '3.6' + +networks: + {{ ontotagme_docker_network }}: +{% if not ontotagme_pep %} + haproxy-public: + external: true +{% endif %} + +services: + {{ ontotagme_docker_service_name }}: + image: {{ ontotagme_docker_service_image }} + networks: + - {{ ontotagme_docker_network }} +{% if not ontotagme_pep %} + - haproxy-public +{% endif %} + deploy: + mode: replicated + replicas: 1 + endpoint_mode: dnsrr + placement: + constraints: [node.role == worker] + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 5 + window: 120s + logging: + driver: 'journald' + diff --git a/roles/ontagme/templates/pep-swarm.yml.j2 b/roles/ontotagme/templates/pep-swarm.yml.j2 similarity index 100% rename from roles/ontagme/templates/pep-swarm.yml.j2 rename to roles/ontotagme/templates/pep-swarm.yml.j2