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_user: 'bc_ufish_u'
|
||||
bc_ufish_db_volume: 'bc_ufish_db_data'
|
||||
bc_ufish_db_constraints: 'node.labels.ufish_db_data == bc_ufish'
|
||||
# Kb
|
||||
bc_ufish_phpmyadmin_upload_size: '51200000'
|
||||
bc_ufish_phpmyadmin_url: 'https://ufish-phpmyadmin.d4science.org'
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
galaxy_info:
|
||||
author: Andrea Dell'Amico
|
||||
description: Systems Architect
|
||||
namespace: adellam
|
||||
role_name: bluecloud_ufish
|
||||
description: Role that installs the Bluecloud ufish service
|
||||
company: ISTI-CNR
|
||||
|
||||
issue_tracker_url: https://support.d4science.org/projects/d4science-operation
|
||||
|
||||
license: EUPL 1.2+
|
||||
|
||||
min_ansible_version: 2.8
|
||||
min_ansible_version: "2.8"
|
||||
|
||||
# To view available platforms and versions (or releases), visit:
|
||||
# https://galaxy.ansible.com/api/v1/platforms/
|
||||
|
@ -18,7 +15,7 @@ galaxy_info:
|
|||
- bionic
|
||||
- name: EL
|
||||
versions:
|
||||
- 7
|
||||
- "7"
|
||||
|
||||
galaxy_tags:
|
||||
- mei-generator
|
||||
|
|
|
@ -1,45 +1,37 @@
|
|||
---
|
||||
- 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:
|
||||
- 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
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
dest: '{{ bc_ufish_compose_dir }}'
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
mode: 0755
|
||||
|
||||
- name: Install the docker compose file of the ufish stack
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: bluecloud-ufish-docker-compose.yml.j2
|
||||
dest: '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack.yml'
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0400'
|
||||
mode: 0400
|
||||
|
||||
- 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
|
||||
dest: '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack-db.yml'
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0400'
|
||||
mode: 0400
|
||||
|
||||
- name: Start the uFish stack
|
||||
docker_stack:
|
||||
community.docker.docker_stack:
|
||||
name: bluecloud-ufish
|
||||
state: present
|
||||
compose:
|
||||
- '{{ bc_ufish_compose_dir }}/docker-bluecloud-ufish-stack-db.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:
|
||||
{{ 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:
|
||||
ufish-mysql:
|
||||
|
@ -23,7 +28,6 @@ services:
|
|||
placement:
|
||||
constraints:
|
||||
- node.role == worker
|
||||
- {{ bc_ufish_db_constraints }}
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
delay: 5s
|
||||
|
|
|
@ -7,9 +7,6 @@ networks:
|
|||
{% endif %}
|
||||
{{ bc_ufish_docker_network }}:
|
||||
|
||||
volumes:
|
||||
{{ bc_ufish_db_volume }}:
|
||||
|
||||
services:
|
||||
{{ bc_ufish_docker_service_server_name }}:
|
||||
image: {{ bc_ufish_docker_server_image }}
|
||||
|
@ -19,7 +16,7 @@ services:
|
|||
- haproxy-public
|
||||
{% endif %}
|
||||
environment:
|
||||
MYSQL_HOST: {{ bc_ufish_db_host }}
|
||||
MYSQL_HOST: {{ bc_ufish_docker_stack_name }}_{{ bc_ufish_db_host }}
|
||||
MYSQL_PORT: 3306
|
||||
MYSQL_PASSWORD: {{ bc_ufish_db_pwd }}
|
||||
MYSQL_USER: {{ bc_ufish_db_user }}
|
||||
|
|
Loading…
Reference in New Issue