Compare commits
4 Commits
598cbeec9d
...
umcg-0.2
Author | SHA1 | Date | |
---|---|---|---|
|
0c605af3ae | ||
|
ca6adb44f6 | ||
|
c0d50d7444 | ||
|
f8a3179b74 |
26
gcc-site.yml
26
gcc-site.yml
@@ -1,14 +1,14 @@
|
|||||||
---
|
---
|
||||||
- include: common.yml
|
- import_tasks: common.yml
|
||||||
- include: rabbitmq.yml
|
- import_tasks: rabbitmq.yml
|
||||||
- include: memcached.yml
|
- import_tasks: memcached.yml
|
||||||
- include: mariadb.yml
|
- import_tasks: mariadb.yml
|
||||||
- include: keystone.yml
|
- import_tasks: keystone.yml
|
||||||
- include: glance-controller.yml
|
- import_tasks: glance-controller.yml
|
||||||
- include: nova-controller.yml
|
- import_tasks: nova-controller.yml
|
||||||
- include: neutron-controller.yml
|
- import_tasks: neutron-controller.yml
|
||||||
- include: cinder-controller.yml
|
- import_tasks: cinder-controller.yml
|
||||||
- include: cinder-storage.yml
|
- import_tasks: cinder-storage.yml
|
||||||
- include: nova-compute.yml
|
- import_tasks: nova-compute.yml
|
||||||
- include: horizon.yml
|
- import_tasks: horizon.yml
|
||||||
- include: gcc-post-install.yml
|
- import_tasks: gcc-post-install.yml
|
||||||
|
12
merlin
12
merlin
@@ -1,9 +1,9 @@
|
|||||||
[nova-compute]
|
[nova-compute]
|
||||||
merlin-managementnode002 physical_interface_mappings=provider:enp5s0f1 overlay_ip=172.23.43.102
|
merlin-managementnode002 physical_interface_mappings=provider:eno3
|
||||||
merlin-managementnode003 physical_interface_mappings=provider:enp5s0f1 overlay_ip=172.23.43.103
|
merlin-managementnode003 physical_interface_mappings=provider:eno3
|
||||||
merlin-node001 physical_interface_mappings=provider:enp130s0f1 overlay_ip=172.23.43.1
|
merlin-node001 physical_interface_mappings=provider:eno3
|
||||||
merlin-node003 physical_interface_mappings=provider:enp130s0f1 overlay_ip=172.23.43.3
|
merlin-node003 physical_interface_mappings=provider:eno3
|
||||||
merlin-node002 physical_interface_mappings=provider:enp130s0f1 overlay_ip=172.23.43.2
|
merlin-node004 physical_interface_mappings=provider:eno3
|
||||||
|
|
||||||
[databases]
|
[databases]
|
||||||
merlin-managementnode001
|
merlin-managementnode001
|
||||||
@@ -28,7 +28,7 @@ merlin-managementnode001
|
|||||||
merlin-managementnode001
|
merlin-managementnode001
|
||||||
|
|
||||||
[neutron-controller]
|
[neutron-controller]
|
||||||
merlin-managementnode001 physical_interface_mappings=provider:enp5s0f1 overlay_ip=172.23.43.101
|
merlin-managementnode001 physical_interface_mappings=provider:eno3
|
||||||
|
|
||||||
[heat]
|
[heat]
|
||||||
merlin-managementnode001
|
merlin-managementnode001
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
- name: Passwordless sudo for admins
|
- name: Passwordless sudo for admins
|
||||||
lineinfile: dest=/etc/sudoers line="%admin ALL=(ALL:ALL) NOPASSWD:ALL"
|
lineinfile: dest=/etc/sudoers line="%admin ALL=(ALL:ALL) NOPASSWD:ALL"
|
||||||
|
|
||||||
- include: users.yml
|
- import_tasks: users.yml
|
||||||
|
|
||||||
- name: common | install packages
|
- name: common | install packages
|
||||||
apt: pkg={{ item }} state=latest update_cache=yes
|
apt: pkg={{ item }} state=latest update_cache=yes
|
||||||
@@ -26,4 +26,4 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
||||||
- include: docker.yml
|
- import_tasks: docker.yml
|
||||||
|
@@ -52,7 +52,7 @@
|
|||||||
delay: 3
|
delay: 3
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: keystone manage commands to setup db
|
- name: keystone manage commands to setup db_sync
|
||||||
command: >
|
command: >
|
||||||
/usr/bin/docker run --rm
|
/usr/bin/docker run --rm
|
||||||
--add-host=mariadb:{{ listen_ip | default(hostvars[groups['databases'][0]]['ansible_default_ipv4']['address']) }}
|
--add-host=mariadb:{{ listen_ip | default(hostvars[groups['databases'][0]]['ansible_default_ipv4']['address']) }}
|
||||||
@@ -93,13 +93,15 @@
|
|||||||
register: result
|
register: result
|
||||||
retries: 7
|
retries: 7
|
||||||
delay: 3
|
delay: 3
|
||||||
ignore_errors: yes
|
|
||||||
|
|
||||||
|
- name: install openstack repo host key.
|
||||||
|
command: apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5EDB1B62EC4926EA
|
||||||
|
tags: openstackclient
|
||||||
|
|
||||||
- name: install openstack repo on host.
|
- name: install openstack repo on host.
|
||||||
command: >
|
apt_repository:
|
||||||
echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" > /etc/apt/sources.list.d/ocata.list &&
|
repo: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main"
|
||||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5EDB1B62EC4926EA
|
filename: ocata
|
||||||
tags: openstackclient
|
tags: openstackclient
|
||||||
|
|
||||||
- name: install openstack client for management
|
- name: install openstack client for management
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: 0777
|
mode: 0777
|
||||||
with_items:
|
with_items:
|
||||||
- /srv/mariadb/lib/mysql
|
- /srv/mariadb/lib/mysql
|
||||||
- /srv/mariadb/etc/mysql
|
- /srv/mariadb/etc/mysql
|
||||||
- /srv/mariadb/etc/mysql/conf.d
|
- /srv/mariadb/etc/mysql/conf.d
|
||||||
|
|
||||||
- name: place settings file
|
- name: place settings file
|
||||||
copy:
|
copy:
|
||||||
@@ -21,12 +21,14 @@
|
|||||||
dest: /srv/mariadb/etc/mysql/conf.d/my.cnf
|
dest: /srv/mariadb/etc/mysql/conf.d/my.cnf
|
||||||
mode: 660
|
mode: 660
|
||||||
|
|
||||||
- name: Set galara.cnf on node if we have at least three nodes.
|
- name: >
|
||||||
|
Set galara.cnf on node if we have at least three nodes.
|
||||||
|
And we're part of the cluster.
|
||||||
template:
|
template:
|
||||||
src: files/galera.cnf
|
src: files/galera.cnf
|
||||||
dest: /srv/mariadb/etc/mysql/conf.d/galera.cnf
|
dest: /srv/mariadb/etc/mysql/conf.d/galera.cnf
|
||||||
mode: 660
|
mode: 660
|
||||||
when: groups['databases'] | length >= 3
|
when: "'databases' in group_names and groups['databases'] | length >= 3"
|
||||||
|
|
||||||
# This mimics galera_new_cluster.sh
|
# This mimics galera_new_cluster.sh
|
||||||
- name: Initialize a new cluster.
|
- name: Initialize a new cluster.
|
||||||
@@ -47,7 +49,8 @@
|
|||||||
name: mysql.service
|
name: mysql.service
|
||||||
state: started
|
state: started
|
||||||
|
|
||||||
when: groups['databases'] | length >= 3 and ansible_hostname == hostname_node0
|
when: "'databases' in group_names and groups['databases'] \
|
||||||
|
| length >= 3 and ansible_hostname == hostname_node0"
|
||||||
|
|
||||||
- name: install service file.
|
- name: install service file.
|
||||||
block:
|
block:
|
||||||
@@ -61,12 +64,22 @@
|
|||||||
group: root
|
group: root
|
||||||
|
|
||||||
- name: Give the master node some time to initialize the cluster.
|
- name: Give the master node some time to initialize the cluster.
|
||||||
command: bash -c "sleep 60 && systemctl daemon-reload"
|
command: bash -c "sleep 60"
|
||||||
|
when: "'databases' in group_names and groups['databases'] \
|
||||||
|
| length >= 3"
|
||||||
|
|
||||||
|
- name: Daemon reload (the implicit doesn't work)
|
||||||
|
command: bash -c "systemctl daemon-reload"
|
||||||
|
|
||||||
- name: make sure service is started
|
- name: make sure service is started
|
||||||
systemd:
|
systemd:
|
||||||
name: mysql.service
|
name: mysql.service
|
||||||
state: started
|
state: started
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
- name: start service at boot.
|
- name: start service at boot.
|
||||||
command: systemctl reenable mysql.service
|
command: systemctl reenable mysql.service
|
||||||
|
|
||||||
|
- name: Give the cluster some time to initialize replication.
|
||||||
|
command: bash -c "sleep 60 && systemctl daemon-reload"
|
||||||
|
when: "'databases' in group_names and groups['databases'] | length >= 3"
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
name: secrets
|
name: secrets
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
docker_image: "registry.webhosting.rug.nl/hpc/openstack-neutron-controller-merlin:latest"
|
docker_image: "registry.webhosting.rug.nl/hpc/openstack-neutron-controller:latest"
|
||||||
|
|
||||||
- name: pull docker image
|
- name: pull docker image
|
||||||
docker_image:
|
docker_image:
|
||||||
@@ -29,7 +29,6 @@
|
|||||||
-e "NOVA_CONTROLLER_HOST={{ listen_ip | default(hostvars[groups['nova-controller'][0]]['ansible_default_ipv4']['address']) }}"
|
-e "NOVA_CONTROLLER_HOST={{ listen_ip | default(hostvars[groups['nova-controller'][0]]['ansible_default_ipv4']['address']) }}"
|
||||||
-e "NOVA_PLACEMENT_PASSWORD={{ secrets['NOVA_PLACEMENT_PASSWORD'] }}"
|
-e "NOVA_PLACEMENT_PASSWORD={{ secrets['NOVA_PLACEMENT_PASSWORD'] }}"
|
||||||
-e "NOVA_PLACEMENT_USER=placement"
|
-e "NOVA_PLACEMENT_USER=placement"
|
||||||
-e "OVERLAY_IP={{ overlay_ip }}"
|
|
||||||
-e "OS_PASSWORD={{ secrets['OS_PASSWORD'] }}"
|
-e "OS_PASSWORD={{ secrets['OS_PASSWORD'] }}"
|
||||||
-e "PHYSICAL_INTERFACE_MAPPINGS={{ physical_interface_mappings }}"
|
-e "PHYSICAL_INTERFACE_MAPPINGS={{ physical_interface_mappings }}"
|
||||||
-e "RABBIT_PASSWORD={{ secrets['RABBIT_PASSWORD'] }}"
|
-e "RABBIT_PASSWORD={{ secrets['RABBIT_PASSWORD'] }}"
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
tags: vars
|
tags: vars
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
docker_image: registry.webhosting.rug.nl/hpc/openstack-nova-compute-merlin:latest
|
docker_image: registry.webhosting.rug.nl/hpc/openstack-nova-compute:latest
|
||||||
tags: vars
|
tags: vars
|
||||||
|
|
||||||
- name: pull docker image
|
- name: pull docker image
|
||||||
|
28
site.yml
28
site.yml
@@ -1,15 +1,15 @@
|
|||||||
---
|
---
|
||||||
- include: common.yml
|
- import_playbook: common.yml
|
||||||
- include: rabbitmq.yml
|
- import_playbook: rabbitmq.yml
|
||||||
- include: memcached.yml
|
- import_playbook: memcached.yml
|
||||||
- include: mariadb.yml
|
- import_playbook: mariadb.yml
|
||||||
- include: keystone.yml
|
- import_playbook: keystone.yml
|
||||||
- include: glance-controller.yml
|
- import_playbook: glance-controller.yml
|
||||||
- include: nova-controller.yml
|
- import_playbook: nova-controller.yml
|
||||||
- include: neutron-controller.yml
|
- import_playbook: neutron-controller.yml
|
||||||
- include: cinder-controller.yml
|
- import_playbook: cinder-controller.yml
|
||||||
- include: cinder-storage.yml
|
- import_playbook: cinder-storage.yml
|
||||||
- include: nova-compute.yml
|
- import_playbook: nova-compute.yml
|
||||||
- include: horizon.yml
|
- import_playbook: horizon.yml
|
||||||
- include: heat.yml
|
- import_playbook: heat.yml
|
||||||
- include: post-install.yml
|
- import_playbook: post-install.yml
|
||||||
|
Reference in New Issue
Block a user