4 Commits

Author SHA1 Message Date
99112894be Added mtu size variable 2018-04-18 10:46:42 +02:00
4e5c496862 Added configure_networks bool and mtu_size var 2018-04-16 17:07:17 +02:00
b4d14d0a1f Merge branch 'develop' 2018-01-19 09:24:39 +01:00
646e02ca9c Sanitized inventory examples 2018-01-19 09:24:28 +01:00
8 changed files with 43 additions and 21 deletions

21
hosts
View File

@ -1,5 +1,9 @@
# A demo cluster of three nodes.
[databases]
openstack01-node01
openstack01-node02
openstack01-node03
[keystone]
openstack01-node03
@ -15,24 +19,9 @@ openstack01-node01
openstack01-node02
openstack01-node03
#[cassandra]
#openstack01-node[01:03]
#openstack01-node01
#
#[next_cassandra]
#openstack01-node02
#openstack01-node03
[memcached]
openstack01-node03
#[first_cassandra:vars]
#run_options=""
#
#[next_cassandra:vars]
#run_options="-e CASSANDRA_SEEDS=172.23.41.1"
[neutron-controller]
openstack01-node01 physical_interface_mappings=provider:ens192
@ -46,4 +35,4 @@ openstack01-node03
openstack01-node01 storage_volume=/dev/loop0
[nova-compute]
openstack01-node04 physical_interface_mappings=provider:dummy0
openstack01-node04 physical_interface_mappings=provider:enp4s0f0

View File

@ -5,5 +5,7 @@
- hosts: neutron-controller
become: True
vars_files:
- settings.yml
roles:
- neutron-controller

View File

@ -5,5 +5,7 @@
- hosts: nova-compute
become: True
vars_files:
- settings.yml
roles:
- nova-compute

View File

@ -1,3 +1,5 @@
# An all in one
[databases]
os-test

View File

@ -20,7 +20,20 @@
openstack subnet create --network provider
--allocation-pool start={{ allocation_pool['start'] }},end={{ allocation_pool['end'] }}
--dns-nameserver {{ dns_nameserver }} --gateway {{ gateway }} --subnet-range {{ subnet_range }} providersub
when: "{{ configure_networks }}" == True
- hosts: keystone
become: True
vars_files:
- settings.yml
tasks:
- name: copy public key
copy:
content: "{{ rsa_pub }}"
dest: /srv/keystone/root/id_rsa.pub
- name: post install configuration
command: docker exec -i keystone.service bash -c "source /root/admin-openrc.sh && {{ item }}"
with_items:
- openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano
- openstack keypair create --public-key /root/id_rsa.pub adminkey

View File

@ -16,6 +16,7 @@
- set_fact:
env_vars: >
-e "GLOBAL_PHYSNET_MTU={{ global_physnet_mtu }}"
-e "KEYSTONE_HOST={{ listen_ip | default(hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address']) }}"
-e "MEMCACHED_HOST={{ listen_ip | default(hostvars[groups['memcached'][0]]['ansible_default_ipv4']['address']) }}"
-e "METADATA_SECRET={{ secrets['METADATA_SECRET'] }}"

View File

@ -10,6 +10,8 @@ ExecStartPre=-/usr/bin/docker kill %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStart=/usr/bin/docker run --name %n \
-e "GLANCE_CONTROLLER_HOST={{ hostvars[groups['glance-controller'][0]]['listen_ip'] | default(hostvars[groups['glance-controller'][0]]['ansible_default_ipv4']['address']) }}" \
-e "GLOBAL_PHYSNET_MTU={{ global_physnet_mtu }}" \
-e "GLOBAL_PHYSNET_MTU={{ global_physnet_mtu }}" \
-e "KEYSTONE_HOST={{ hostvars[groups['keystone'][0]]['listen_ip'] | default(hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address']) }}" \
-e "METADATA_SECRET={{ secrets['METADATA_SECRET'] }}" \
-e "MEMCACHED_HOST={{ hostvars[groups['memcached'][0]]['listen_ip'] | default(hostvars[groups['memcached'][0]]['ansible_default_ipv4']['address']) }}" \

View File

@ -1,4 +1,7 @@
---
- configure_networks: "True"
# Allocation pool for a flat provider network.
- allocation_pool:
start: 172.23.128.50
end: 172.23.128.249
@ -9,4 +12,12 @@
- subnet_range: 172.23.128.0/24
- rsa_pub: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDStPUPXkcu81onUm/le54JCu174yXJJDsthDr96Mv8irBVBWuy5FxnaASuDpmC4QE4s0UAIg1iq/SWrr8qdBQ4OVuYFiW0S7ZJvcoKr/40Wh+T5MeltGQfmkDp6kBsfaMSo6M4tF1c8i+XgOgxb4fxHYb8mFhseztRLx6McxJJJLB0nu+T12WQ01nl0XtwD+3EsZWfxRH0KA59VHZSe3Anc5z+Fm7WU+1Vzy6/pkiIhVReI1L6VVhZsIdSu3fQK6fHQcujtfuw6RKEpisZQqnxMUviWQ98yeQXHk6Nx840WCh3vvKveEAoC4Y/UEZa1TMe6PczfUaLjaidUkpulJsP egon@egon-pc
- global_physnet_mtu: 9000
- rsa_pub: >
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDStPUPXkcu81onUm/le54JCu174yXJJDsthDr9
6Mv8irBVBWuy5FxnaASuDpmC4QE4s0UAIg1iq/SWrr8qdBQ4OVuYFiW0S7ZJvcoKr/40Wh+T5Mel
tGQfmkDp6kBsfaMSo6M4tF1c8i+XgOgxb4fxHYb8mFhseztRLx6McxJJJLB0nu+T12WQ01nl0Xtw
D+3EsZWfxRH0KA59VHZSe3Anc5z+Fm7WU+1Vzy6/pkiIhVReI1L6VVhZsIdSu3fQK6fHQcujtfuw
6RKEpisZQqnxMUviWQ98yeQXHk6Nx840WCh3vvKveEAoC4Y/UEZa1TMe6PczfUaLjaidUkpulJsP
egon@egon-pc