Merge "move deploy node to infra1 and make a LB node"

This commit is contained in:
Jenkins 2017-07-30 03:03:21 +00:00 committed by Gerrit Code Review
commit db5e151534
9 changed files with 109 additions and 62 deletions

View File

@ -19,7 +19,8 @@ source bootstrap.sh
source ansible-env.rc source ansible-env.rc
ansible-playbook -i playbooks/inventory \ ansible-playbook -vv \
-i playbooks/inventory \
-e setup_host=${SETUP_HOST:-"true"} \ -e setup_host=${SETUP_HOST:-"true"} \
-e setup_pxeboot=${SETUP_PXEBOOT:-"true"} \ -e setup_pxeboot=${SETUP_PXEBOOT:-"true"} \
-e setup_dhcpd=${SETUP_DHCPD:-"true"} \ -e setup_dhcpd=${SETUP_DHCPD:-"true"} \
@ -28,7 +29,7 @@ ansible-playbook -i playbooks/inventory \
-e osa_branch=${OSA_BRANCH:-"master"} \ -e osa_branch=${OSA_BRANCH:-"master"} \
-e default_network=${DEFAULT_NETWORK:-"eth0"} \ -e default_network=${DEFAULT_NETWORK:-"eth0"} \
-e default_image=${DEFAULT_IMAGE:-"ubuntu-16.04-amd64"} \ -e default_image=${DEFAULT_IMAGE:-"ubuntu-16.04-amd64"} \
-e vm_disk_size=${VM_DISK_SIZE:-61440} \ -e vm_disk_size=${VM_DISK_SIZE:-92160} \
-e http_proxy=${http_proxy:-''} \ -e http_proxy=${http_proxy:-''} \
-e run_osa=${RUN_OSA:-"true"} \ -e run_osa=${RUN_OSA:-"true"} \
-e pre_config_osa=${PRE_CONFIG_OSA:-"true"} \ -e pre_config_osa=${PRE_CONFIG_OSA:-"true"} \

View File

@ -13,6 +13,28 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- name: Setup cinder host volume
hosts: cinder_hosts:swift_hosts
gather_facts: false
tasks:
- name: un-mount deleteme mount
mount:
name: "/var/lib/lxc"
state: unmounted
- name: remote deleteme mount
mount:
name: "/var/lib/lxc"
state: absent
- name: Remove deleteme lv
lvol:
vg: vg00
lv: lxc00
force: true
state: absent
- name: Setup cinder host volume - name: Setup cinder host volume
hosts: cinder_hosts hosts: cinder_hosts
gather_facts: false gather_facts: false
@ -35,7 +57,7 @@
- deploy-osa - deploy-osa
- name: Setup cinder host volume - name: Setup swift host volume
hosts: swift_hosts hosts: swift_hosts
gather_facts: false gather_facts: false
tasks: tasks:

View File

@ -103,28 +103,6 @@
- src: /root/.ssh/id_rsa.pub - src: /root/.ssh/id_rsa.pub
dest: /root/.ssh/id_rsa.pub dest: /root/.ssh/id_rsa.pub
- name: un-mount deleteme mount
mount:
name: "/deleteme"
state: unmounted
- name: remote deleteme mount
mount:
name: "/deleteme"
state: absent
- name: Remove deleteme dir
file:
path: "/deleteme"
state: absent
- name: Remove deleteme lv
lvol:
vg: vg00
lv: deleteme00
force: true
state: absent
vars_files: vars_files:
- vars/main.yml - vars/main.yml
tags: tags:

View File

@ -13,6 +13,7 @@ cinder2 ansible_host=10.0.236.108
swift1 ansible_host=10.0.236.109 swift1 ansible_host=10.0.236.109
swift2 ansible_host=10.0.236.110 swift2 ansible_host=10.0.236.110
swift3 ansible_host=10.0.236.111 swift3 ansible_host=10.0.236.111
loadbalancer1 ansible_host=10.0.236.112
[pxe_hosts] [pxe_hosts]
mnaio1 mnaio1
@ -24,7 +25,7 @@ mnaio1
mnaio1 mnaio1
[deploy_hosts] [deploy_hosts]
log1 infra1
[swift_hosts] [swift_hosts]
swift1 swift1

View File

@ -2,9 +2,10 @@
<name>{{ item.server_hostname }}</name> <name>{{ item.server_hostname }}</name>
<memory unit='MiB'>{{ item.server_vm_ram }}</memory> <memory unit='MiB'>{{ item.server_vm_ram }}</memory>
<currentMemory unit='MiB'>{{ item.server_vm_ram }}</currentMemory> <currentMemory unit='MiB'>{{ item.server_vm_ram }}</currentMemory>
{% set vcpus_threads = ((item.server_vm_vcpus | int) // 2) %} {% set _vcpus_threads = ((item.server_vm_vcpus | int) // 2) %}
{% set vcpus = (item.server_vm_vcpus | int) * vcpus_threads %} {% set vcpus_threads = (_vcpus_threads | int) == 0 | ternary('1', _vcpus_threads) %}
<vcpu placement='static' current='{{ vcpus }}'>{{ vcpus }}</vcpu> {% set vcpus = (item.server_vm_vcpus | int) * (vcpus_threads | int) %}
<vcpu placement='static' current='{{ vcpus | int }}'>{{ vcpus | int }}</vcpu>
<resource> <resource>
<partition>/machine</partition> <partition>/machine</partition>
</resource> </resource>
@ -17,7 +18,7 @@
<apic/> <apic/>
</features> </features>
<cpu mode='host-model'> <cpu mode='host-model'>
<topology sockets='1' cores='{{ item.server_vm_vcpus }}' threads='{{ vcpus_threads }}'/> <topology sockets='1' cores='{{ item.server_vm_vcpus | int }}' threads='{{ vcpus_threads | int }}'/>
</cpu> </cpu>
<clock offset='utc'> <clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/> <timer name='rtc' tickpolicy='catchup'/>

View File

@ -12,8 +12,8 @@ used_ips:
- "10.0.248.0,10.0.248.200" - "10.0.248.0,10.0.248.200"
global_overrides: global_overrides:
internal_lb_vip_address: "10.0.2.110" internal_lb_vip_address: "10.0.236.112"
external_lb_vip_address: "10.0.236.103" external_lb_vip_address: "10.0.2.142"
tunnel_bridge: "br-vxlan" tunnel_bridge: "br-vxlan"
management_bridge: "br-mgmt" management_bridge: "br-mgmt"
provider_networks: provider_networks:
@ -140,6 +140,11 @@ swift_block: &swift_block
swift1: swift1:
ip: 10.0.236.111 ip: 10.0.236.111
loadbalancer_block: &loadbalancer_block
loadbalancer1:
ip: 10.0.236.112
### ###
### Infrastructure ### Infrastructure
### ###
@ -153,9 +158,9 @@ repo-infra_hosts: *infra_block
# rsyslog server # rsyslog server
log_hosts: *log_block log_hosts: *log_block
# load balancer # load balancer
haproxy_hosts: *log_block haproxy_hosts: *loadbalancer_block
### ###
### OpenStack ### OpenStack

View File

@ -112,34 +112,34 @@ d-i partman-auto/choose_recipe select custompartitioning
d-i partman-auto/expert_recipe string \ d-i partman-auto/expert_recipe string \
custompartitioning :: \ custompartitioning :: \
1 1 1 free \ 1 1 1 free \
$gptonly{ } \ $gptonly{ } \
$primary{ } \ $primary{ } \
$bios_boot{ } \ $bios_boot{ } \
method{ biosgrub } \ method{ biosgrub } \
. \ . \
256 1 512 raid \ 256 1 512 raid \
$gptonly{ } \ $gptonly{ } \
$lvmignore{ } \ $lvmignore{ } \
$primary{ } \ $primary{ } \
$bootable{ } \ $bootable{ } \
method{ raid } \ method{ raid } \
raidid{ 1 } \ raidid{ 1 } \
. \ . \
204800 1 -1 raid \ 204800 1 -1 raid \
$gptonly{ } \ $gptonly{ } \
$lvmignore{ } \ $lvmignore{ } \
method{ raid } \ method{ raid } \
raidid{ 2 } \ raidid{ 2 } \
. \ . \
1024 512 400% linux-swap \ 1024 512 400% linux-swap \
$defaultignore{ } \ $defaultignore{ } \
$lvmok{ } \ $lvmok{ } \
method{ swap } \ method{ swap } \
format{ } \ format{ } \
. \ . \
16384 5000 100% ext4 \ 16384 5000 100% ext4 \
$defaultignore{ } \ $defaultignore{ } \
$lvmok{ } \ $lvmok{ } \
method{ format } \ method{ format } \
format{ } \ format{ } \
use_filesystem{ } \ use_filesystem{ } \
@ -147,8 +147,8 @@ d-i partman-auto/expert_recipe string \
mountpoint{ / } \ mountpoint{ / } \
. \ . \
81920 1000 100% ext4 \ 81920 1000 100% ext4 \
$defaultignore{ } \ $defaultignore{ } \
$lvmok{ } \ $lvmok{ } \
lv_name{ openstack00 } \ lv_name{ openstack00 } \
method{ format } \ method{ format } \
format{ } \ format{ } \
@ -158,8 +158,8 @@ d-i partman-auto/expert_recipe string \
mountpoint{ /openstack } \ mountpoint{ /openstack } \
. \ . \
81920 1000 100% btrfs \ 81920 1000 100% btrfs \
$defaultignore{ } \ $defaultignore{ } \
$lvmok{ } \ $lvmok{ } \
lv_name{ machines00 } \ lv_name{ machines00 } \
method{ format } \ method{ format } \
format{ } \ format{ } \

View File

@ -115,7 +115,7 @@ d-i partman-auto/expert_recipe string \
device{ /dev/vda2 } \ device{ /dev/vda2 } \
vg_name{ vg00 } \ vg_name{ vg00 } \
. \ . \
1024 1 4096 linux-swap \ 2048 1 4096 linux-swap \
$lvmok{ } in_vg{ vg00 } \ $lvmok{ } in_vg{ vg00 } \
lv_name{ swap00 } \ lv_name{ swap00 } \
method{ swap } format{ } \ method{ swap } format{ } \
@ -136,7 +136,7 @@ d-i partman-auto/expert_recipe string \
label{ openstack } \ label{ openstack } \
mountpoint{ /openstack } \ mountpoint{ /openstack } \
. \ . \
8192 1 16384 btrfs \ 4096 1 8192 btrfs \
$lvmok{ } in_vg{ vg00 } \ $lvmok{ } in_vg{ vg00 } \
lv_name{ machines00 } \ lv_name{ machines00 } \
method{ format } format{ } \ method{ format } format{ } \
@ -144,13 +144,13 @@ d-i partman-auto/expert_recipe string \
label{ machines } \ label{ machines } \
mountpoint{ /var/lib/machines } \ mountpoint{ /var/lib/machines } \
. \ . \
1024 1 1024000 ext4 \ 8192 1 10240000 ext4 \
$lvmok{ } in_vg{ vg00 } \ $lvmok{ } in_vg{ vg00 } \
lv_name{ deleteme00 } \ lv_name{ lxc00 } \
method{ format } format{ } \ method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \ use_filesystem{ } filesystem{ ext4 } \
label{ deleteme } \ label{ lxc } \
mountpoint{ /deleteme } \ mountpoint{ /var/lib/lxc } \
. \ . \
# This makes partman automatically partition without confirmation, provided # This makes partman automatically partition without confirmation, provided

View File

@ -2,7 +2,7 @@
############### DEFAULTS ############### ############### DEFAULTS ###############
default_interface: "{{ default_network | default('eth0') }}" default_interface: "{{ default_network | default('eth0') }}"
default_vm_image: "{{ default_image | default('ubuntu-16.04-amd64') }}" default_vm_image: "{{ default_image | default('ubuntu-16.04-amd64') }}"
default_vm_storage: "{{ vm_disk_size | default(61440) }}" default_vm_storage: "{{ vm_disk_size | default(92160) }}"
default_ubuntu_mirror_proxy: 'http://10.0.2.1:3142/' default_ubuntu_mirror_proxy: 'http://10.0.2.1:3142/'
default_ubuntu_mirror_hostname: archive.ubuntu.com default_ubuntu_mirror_hostname: archive.ubuntu.com
@ -138,7 +138,7 @@ pxelinux_short_name: "syslinux-6.03"
# List of servers to create specific mac address bound boot entries. # List of servers to create specific mac address bound boot entries.
servers: servers:
- server_hostname: 'infra1' # str - required, hostname of server - server_hostname: 'infra1' # str - required, hostname of server
server_vm_ram: 6144 # int - not required, used to specify ram when provisioning a VM server_vm_ram: 8192 # int - not required, used to specify ram when provisioning a VM
server_vm_vcpus: 4 # int - not required, used to specify vcpus when provisioning a VM server_vm_vcpus: 4 # int - not required, used to specify vcpus when provisioning a VM
server_vm_fixed_addr: '10.0.2.100' # str - not required, used to specify fixed address when using internal DHCPD server_vm_fixed_addr: '10.0.2.100' # str - not required, used to specify fixed address when using internal DHCPD
server_vm_primary_network: 'dhcp' # str - not required, primary network used to kick the VM server_vm_primary_network: 'dhcp' # str - not required, primary network used to kick the VM
@ -177,7 +177,7 @@ servers:
address: '10.0.244.100/22' # str - not required, must be in CIDR format address: '10.0.244.100/22' # str - not required, must be in CIDR format
vm_int_iface: vm-br-eth5 # str - not Required, used to specify an integration networks interface when provisioning a VM vm_int_iface: vm-br-eth5 # str - not Required, used to specify an integration networks interface when provisioning a VM
- server_hostname: 'infra2' - server_hostname: 'infra2'
server_vm_ram: 6144 server_vm_ram: 8192
server_vm_vcpus: 4 server_vm_vcpus: 4
server_vm_fixed_addr: '10.0.2.101' server_vm_fixed_addr: '10.0.2.101'
server_vm_primary_network: 'dhcp' server_vm_primary_network: 'dhcp'
@ -216,7 +216,7 @@ servers:
address: '10.0.244.101/22' address: '10.0.244.101/22'
vm_int_iface: vm-br-eth5 vm_int_iface: vm-br-eth5
- server_hostname: 'infra3' - server_hostname: 'infra3'
server_vm_ram: 6144 server_vm_ram: 8192
server_vm_vcpus: 4 server_vm_vcpus: 4
server_vm_fixed_addr: '10.0.2.102' server_vm_fixed_addr: '10.0.2.102'
server_vm_primary_network: 'dhcp' server_vm_primary_network: 'dhcp'
@ -255,7 +255,7 @@ servers:
address: '10.0.244.102/22' address: '10.0.244.102/22'
vm_int_iface: vm-br-eth5 vm_int_iface: vm-br-eth5
- server_hostname: 'logging1' - server_hostname: 'logging1'
server_vm_ram: 2048 server_vm_ram: 1024
server_vm_vcpus: 2 server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.110' server_vm_fixed_addr: '10.0.2.110'
server_vm_primary_network: 'dhcp' server_vm_primary_network: 'dhcp'
@ -566,6 +566,45 @@ servers:
inet_type: 'manual' inet_type: 'manual'
address: '10.0.244.111/22' address: '10.0.244.111/22'
vm_int_iface: vm-br-eth5 vm_int_iface: vm-br-eth5
- server_hostname: 'loadbalancer1'
server_vm_ram: 1024
server_vm_vcpus: 1
server_vm_fixed_addr: '10.0.2.142'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:12'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.112/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.112/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'manual'
address: '10.0.240.112/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'manual'
address: '10.0.244.112/22'
vm_int_iface: vm-br-eth5
############### SERVERS ############### ############### SERVERS ###############