Remove the volume constraints.
This commit is contained in:
parent
330e0efc49
commit
397d2fcba4
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"ansible.python.interpreterPath": "/opt/local/bin/python3.10"
|
||||||
|
}
|
|
@ -18,7 +18,6 @@ bc_ufish_db_port: 3306
|
||||||
bc_ufish_db_name: 'bc_ufish'
|
bc_ufish_db_name: 'bc_ufish'
|
||||||
bc_ufish_db_user: 'bc_ufish_u'
|
bc_ufish_db_user: 'bc_ufish_u'
|
||||||
bc_ufish_db_volume: 'bc_ufish_db_data'
|
bc_ufish_db_volume: 'bc_ufish_db_data'
|
||||||
bc_ufish_db_constraints: 'node.labels.ufish_db_data == bc_ufish'
|
|
||||||
# Kb
|
# Kb
|
||||||
bc_ufish_phpmyadmin_upload_size: '51200000'
|
bc_ufish_phpmyadmin_upload_size: '51200000'
|
||||||
bc_ufish_phpmyadmin_url: 'https://ufish-phpmyadmin.d4science.org'
|
bc_ufish_phpmyadmin_url: 'https://ufish-phpmyadmin.d4science.org'
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: Andrea Dell'Amico
|
author: Andrea Dell'Amico
|
||||||
description: Systems Architect
|
namespace: adellam
|
||||||
|
role_name: bluecloud_ufish
|
||||||
|
description: Role that installs the Bluecloud ufish service
|
||||||
company: ISTI-CNR
|
company: ISTI-CNR
|
||||||
|
min_ansible_version: "2.8"
|
||||||
issue_tracker_url: https://support.d4science.org/projects/d4science-operation
|
|
||||||
|
|
||||||
license: EUPL 1.2+
|
|
||||||
|
|
||||||
min_ansible_version: 2.8
|
|
||||||
|
|
||||||
# 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 +15,7 @@ galaxy_info:
|
||||||
- bionic
|
- bionic
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 7
|
- "7"
|
||||||
|
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- mei-generator
|
- mei-generator
|
||||||
|
|
|
@ -1,45 +1,37 @@
|
||||||
---
|
---
|
||||||
- name: Manage the installation of the uFish configuration of the swarm service
|
- name: Manage the installation of the uFish configuration of the swarm service
|
||||||
|
run_once: true
|
||||||
|
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
||||||
|
tags: ['bc_ufish', 'bc_ufish_swarm']
|
||||||
block:
|
block:
|
||||||
- name: Add the label that will be used as a constraint for the uFish DB
|
|
||||||
docker_node:
|
|
||||||
hostname: '{{ bc_ufish_db_docker_host }}'
|
|
||||||
labels:
|
|
||||||
ufish_db_data: 'bc_ufish'
|
|
||||||
labels_state: 'merge'
|
|
||||||
|
|
||||||
- name: Create the directory where the compose will be stored
|
- name: Create the directory where the compose will be stored
|
||||||
file:
|
ansible.builtin.file:
|
||||||
dest: '{{ bc_ufish_compose_dir }}'
|
dest: '{{ bc_ufish_compose_dir }}'
|
||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0755'
|
mode: 0755
|
||||||
|
|
||||||
- name: Install the docker compose file of the ufish stack
|
- name: Install the docker compose file of the ufish stack
|
||||||
template:
|
ansible.builtin.template:
|
||||||
src: bluecloud-ufish-docker-compose.yml.j2
|
src: bluecloud-ufish-docker-compose.yml.j2
|
||||||
dest: '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack.yml'
|
dest: '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack.yml'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0400'
|
mode: 0400
|
||||||
|
|
||||||
- name: Install the docker compose file for the ufish db server and for phpmyadmin
|
- name: Install the docker compose file for the ufish db server and for phpmyadmin
|
||||||
template:
|
ansible.builtin.template:
|
||||||
src: bluecloud-ufish-db-docker-compose.yml.j2
|
src: bluecloud-ufish-db-docker-compose.yml.j2
|
||||||
dest: '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack-db.yml'
|
dest: '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack-db.yml'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0400'
|
mode: 0400
|
||||||
|
|
||||||
- name: Start the uFish stack
|
- name: Start the uFish stack
|
||||||
docker_stack:
|
community.docker.docker_stack:
|
||||||
name: bluecloud-ufish
|
name: bluecloud-ufish
|
||||||
state: present
|
state: present
|
||||||
compose:
|
compose:
|
||||||
- '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack-db.yml'
|
- '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack-db.yml'
|
||||||
- '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack.yml'
|
- '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack.yml'
|
||||||
|
|
||||||
run_once: True
|
|
||||||
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
|
||||||
tags: [ 'bc_ufish', 'bc_ufish_swarm' ]
|
|
||||||
|
|
|
@ -7,6 +7,11 @@ networks:
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
{{ bc_ufish_db_volume }}:
|
{{ bc_ufish_db_volume }}:
|
||||||
|
driver: local
|
||||||
|
driver_opts:
|
||||||
|
type: nfs4
|
||||||
|
o: "nfsvers=4,addr=146.48.123.250,rw"
|
||||||
|
device: ":/nfs/bluecloud_ufish_mysql_data"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
ufish-mysql:
|
ufish-mysql:
|
||||||
|
@ -23,7 +28,6 @@ services:
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
- node.role == worker
|
- node.role == worker
|
||||||
- {{ bc_ufish_db_constraints }}
|
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
delay: 5s
|
delay: 5s
|
||||||
|
|
|
@ -7,9 +7,6 @@ networks:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ bc_ufish_docker_network }}:
|
{{ bc_ufish_docker_network }}:
|
||||||
|
|
||||||
volumes:
|
|
||||||
{{ bc_ufish_db_volume }}:
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
{{ bc_ufish_docker_service_server_name }}:
|
{{ bc_ufish_docker_service_server_name }}:
|
||||||
image: {{ bc_ufish_docker_server_image }}
|
image: {{ bc_ufish_docker_server_image }}
|
||||||
|
@ -19,7 +16,7 @@ services:
|
||||||
- haproxy-public
|
- haproxy-public
|
||||||
{% endif %}
|
{% endif %}
|
||||||
environment:
|
environment:
|
||||||
MYSQL_HOST: {{ bc_ufish_db_host }}
|
MYSQL_HOST: {{ bc_ufish_docker_stack_name }}_{{ bc_ufish_db_host }}
|
||||||
MYSQL_PORT: 3306
|
MYSQL_PORT: 3306
|
||||||
MYSQL_PASSWORD: {{ bc_ufish_db_pwd }}
|
MYSQL_PASSWORD: {{ bc_ufish_db_pwd }}
|
||||||
MYSQL_USER: {{ bc_ufish_db_user }}
|
MYSQL_USER: {{ bc_ufish_db_user }}
|
||||||
|
|
Loading…
Reference in New Issue