Compare commits
9 Commits
fb2bdfe543
...
umcg-0.2
Author | SHA1 | Date | |
---|---|---|---|
0c605af3ae | |||
ca6adb44f6 | |||
c0d50d7444 | |||
f8a3179b74 | |||
84b901c8b3 | |||
e3f3d5d3b7 | |||
68ac7a0a6d | |||
8da96590ac | |||
fea7aaaff6 |
26
gcc-site.yml
26
gcc-site.yml
@ -1,14 +1,14 @@
|
||||
---
|
||||
- include: common.yml
|
||||
- include: rabbitmq.yml
|
||||
- include: memcached.yml
|
||||
- include: mariadb.yml
|
||||
- include: keystone.yml
|
||||
- include: glance-controller.yml
|
||||
- include: nova-controller.yml
|
||||
- include: neutron-controller.yml
|
||||
- include: cinder-controller.yml
|
||||
- include: cinder-storage.yml
|
||||
- include: nova-compute.yml
|
||||
- include: horizon.yml
|
||||
- include: gcc-post-install.yml
|
||||
- import_tasks: common.yml
|
||||
- import_tasks: rabbitmq.yml
|
||||
- import_tasks: memcached.yml
|
||||
- import_tasks: mariadb.yml
|
||||
- import_tasks: keystone.yml
|
||||
- import_tasks: glance-controller.yml
|
||||
- import_tasks: nova-controller.yml
|
||||
- import_tasks: neutron-controller.yml
|
||||
- import_tasks: cinder-controller.yml
|
||||
- import_tasks: cinder-storage.yml
|
||||
- import_tasks: nova-compute.yml
|
||||
- import_tasks: horizon.yml
|
||||
- import_tasks: gcc-post-install.yml
|
||||
|
5
nuke.yml
5
nuke.yml
@ -1,10 +1,13 @@
|
||||
---
|
||||
# This playbook will reset the instalation to facilitate a new installation.
|
||||
# All data is lost!
|
||||
- hosts: all
|
||||
become: True
|
||||
name: Dummy to gather facts
|
||||
tasks:
|
||||
- shell: "systemctl stop docker"
|
||||
- name: Stop docker service
|
||||
shell: "systemctl stop docker"
|
||||
- name: Verify docker is stopped.
|
||||
systemd:
|
||||
name: docker
|
||||
state: stopped
|
||||
|
@ -5,7 +5,7 @@
|
||||
- name: Passwordless sudo for admins
|
||||
lineinfile: dest=/etc/sudoers line="%admin ALL=(ALL:ALL) NOPASSWD:ALL"
|
||||
|
||||
- include: users.yml
|
||||
- import_tasks: users.yml
|
||||
|
||||
- name: common | install packages
|
||||
apt: pkg={{ item }} state=latest update_cache=yes
|
||||
@ -26,4 +26,4 @@
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- include: docker.yml
|
||||
- import_tasks: docker.yml
|
||||
|
@ -1,5 +1,5 @@
|
||||
[Unit]
|
||||
Description=Openstack Glance Container
|
||||
Description=Openstack Horizon Container
|
||||
After=docker.service
|
||||
Requires=docker.service
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
delay: 3
|
||||
ignore_errors: yes
|
||||
|
||||
- name: keystone manage commands to setup db
|
||||
- name: keystone manage commands to setup db_sync
|
||||
command: >
|
||||
/usr/bin/docker run --rm
|
||||
--add-host=mariadb:{{ listen_ip | default(hostvars[groups['databases'][0]]['ansible_default_ipv4']['address']) }}
|
||||
@ -69,6 +69,11 @@
|
||||
--bootstrap-internal-url http://{{ listen_ip | default(hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address']) }}:35357/v3/
|
||||
--bootstrap-public-url http://{{ listen_ip | default(hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address']) }}:5000/v3/
|
||||
--bootstrap-region-id RegionOne
|
||||
# sometimes the initial connect fails.
|
||||
# Retry until it succeeds.
|
||||
retries: 7
|
||||
delay: 3
|
||||
ignore_errors: yes
|
||||
|
||||
- name: make sure service is started
|
||||
systemd:
|
||||
@ -85,12 +90,18 @@
|
||||
-e "OS_AUTH_URL=http://${KEYSTONE_HOST}:35357/v3"
|
||||
-e "OS_PASSWORD={{ secrets['OS_PASSWORD'] }}"
|
||||
{{ docker_image }} bash /etc/bootstrap.sh
|
||||
register: result
|
||||
retries: 7
|
||||
delay: 3
|
||||
|
||||
- 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.
|
||||
command: >
|
||||
echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" > /etc/apt/sources.list.d/ocata.list &&
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5EDB1B62EC4926EA
|
||||
apt_repository:
|
||||
repo: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main"
|
||||
filename: ocata
|
||||
tags: openstackclient
|
||||
|
||||
- name: install openstack client for management
|
||||
|
@ -11,9 +11,9 @@
|
||||
state: directory
|
||||
mode: 0777
|
||||
with_items:
|
||||
- /srv/mariadb/lib/mysql
|
||||
- /srv/mariadb/etc/mysql
|
||||
- /srv/mariadb/etc/mysql/conf.d
|
||||
- /srv/mariadb/lib/mysql
|
||||
- /srv/mariadb/etc/mysql
|
||||
- /srv/mariadb/etc/mysql/conf.d
|
||||
|
||||
- name: place settings file
|
||||
copy:
|
||||
@ -21,12 +21,14 @@
|
||||
dest: /srv/mariadb/etc/mysql/conf.d/my.cnf
|
||||
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:
|
||||
src: files/galera.cnf
|
||||
dest: /srv/mariadb/etc/mysql/conf.d/galera.cnf
|
||||
mode: 660
|
||||
when: groups['databases'] | length >= 3
|
||||
when: "'databases' in group_names and groups['databases'] | length >= 3"
|
||||
|
||||
# This mimics galera_new_cluster.sh
|
||||
- name: Initialize a new cluster.
|
||||
@ -47,7 +49,8 @@
|
||||
name: mysql.service
|
||||
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.
|
||||
block:
|
||||
@ -61,12 +64,22 @@
|
||||
group: root
|
||||
|
||||
- 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
|
||||
systemd:
|
||||
name: mysql.service
|
||||
state: started
|
||||
daemon_reload: yes
|
||||
|
||||
- name: start service at boot.
|
||||
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"
|
||||
|
28
site.yml
28
site.yml
@ -1,15 +1,15 @@
|
||||
---
|
||||
- include: common.yml
|
||||
- include: rabbitmq.yml
|
||||
- include: memcached.yml
|
||||
- include: mariadb.yml
|
||||
- include: keystone.yml
|
||||
- include: glance-controller.yml
|
||||
- include: nova-controller.yml
|
||||
- include: neutron-controller.yml
|
||||
- include: cinder-controller.yml
|
||||
- include: cinder-storage.yml
|
||||
- include: nova-compute.yml
|
||||
- include: horizon.yml
|
||||
- include: heat.yml
|
||||
- include: post-install.yml
|
||||
- import_playbook: common.yml
|
||||
- import_playbook: rabbitmq.yml
|
||||
- import_playbook: memcached.yml
|
||||
- import_playbook: mariadb.yml
|
||||
- import_playbook: keystone.yml
|
||||
- import_playbook: glance-controller.yml
|
||||
- import_playbook: nova-controller.yml
|
||||
- import_playbook: neutron-controller.yml
|
||||
- import_playbook: cinder-controller.yml
|
||||
- import_playbook: cinder-storage.yml
|
||||
- import_playbook: nova-compute.yml
|
||||
- import_playbook: horizon.yml
|
||||
- import_playbook: heat.yml
|
||||
- import_playbook: post-install.yml
|
||||
|
48
test_hosts
48
test_hosts
@ -1,36 +1,48 @@
|
||||
[databases]
|
||||
ansible-test
|
||||
ansible-test-2
|
||||
ansible-test-3
|
||||
openstack-test05
|
||||
openstack-test06
|
||||
openstack-test07
|
||||
|
||||
[keystone]
|
||||
ansible-test-3
|
||||
openstack-test05
|
||||
|
||||
[glance-controller]
|
||||
ansible-test-2
|
||||
openstack-test05
|
||||
|
||||
[horizon]
|
||||
ansible-test-3
|
||||
openstack-test05
|
||||
|
||||
[rabbitmq]
|
||||
ansible-test
|
||||
ansible-test-2
|
||||
ansible-test-3
|
||||
|
||||
[cinder-storage]
|
||||
ansible-test
|
||||
openstack-test05
|
||||
openstack-test06
|
||||
openstack-test07
|
||||
|
||||
[memcached]
|
||||
ansible-test-3
|
||||
openstack-test05
|
||||
|
||||
[neutron-controller]
|
||||
ansible-test physical_interface_mappings=provider:ens10
|
||||
openstack-test05 physical_interface_mappings=provider:enp4s0f0
|
||||
|
||||
[nova-controller]
|
||||
ansible-test
|
||||
openstack-test05
|
||||
|
||||
[nova-compute]
|
||||
ansible-test-2 physical_interface_mappings=provider:ens10
|
||||
[cinder-controller]
|
||||
openstack-test05
|
||||
|
||||
[heat]
|
||||
ansible-test
|
||||
openstack-test05
|
||||
|
||||
[cinder-storage]
|
||||
openstack-test05 storage_volume=/dev/openstack-test05-vg/cinder
|
||||
openstack-test06 storage_volume=/dev/openstack-test06-vg/cinder
|
||||
openstack-test07 storage_volume=/dev/openstack-test07-vg/cinder
|
||||
openstack-test08 storage_volume=/dev/openstack-test08-vg/cinder
|
||||
openstack-test09 storage_volume=/dev/openstack-test09-vg/cinder
|
||||
openstack-test10 storage_volume=/dev/openstack-test10-vg/cinder
|
||||
|
||||
[nova-compute]
|
||||
openstack-test06 physical_interface_mappings=provider:enp4s0f0
|
||||
openstack-test07 physical_interface_mappings=provider:enp4s0f0
|
||||
openstack-test08 physical_interface_mappings=provider:enp4s0f0
|
||||
openstack-test09 physical_interface_mappings=provider:enp4s0f0
|
||||
openstack-test10 physical_interface_mappings=provider:enp4s0f0
|
||||
|
Reference in New Issue
Block a user