Skip to content

Commit

Permalink
Merge pull request #80 from yfried-redhat/old_install
Browse files Browse the repository at this point in the history
Revert Installer to old OSPD
  • Loading branch information
tkammer-zz committed Mar 2, 2016
2 parents bc86ce4 + c4be975 commit ef8410e
Show file tree
Hide file tree
Showing 49 changed files with 325 additions and 345 deletions.
2 changes: 1 addition & 1 deletion playbooks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hosts: openstack_nodes
sudo: yes
tasks:
- debug: "var={{ installer.selinux | default('enforcing') }}"
- selinux: policy=targeted state={{ installer.selinux|default('enforcing') }}

- name: Ensure yum presence
hosts: openstack_nodes
Expand Down
4 changes: 2 additions & 2 deletions playbooks/installer/ospd/overcloud/pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
msg: "Stopping before building/importing the images per user request"
when: break is defined and break == "before_images"
roles:
- {role: ospd/overcloud/images/build, when: installer.overcloud.images is not defined installer.overcloud.images.server is not defined}
- {role: ospd/overcloud/images/import, when: installer.overcloud.images is defined and installer.overcloud.images.server is defined}
- {role: ospd/overcloud/images/build, when: installer.images.task == "build"}
- {role: ospd/overcloud/images/import, when: installer.images.task == "import"}
tasks:
- name: upload the overcloud images to glance
shell: "source ~/stackrc; openstack overcloud image upload"
Expand Down
4 changes: 2 additions & 2 deletions playbooks/installer/ospd/overcloud/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
dest: "~/overcloud_deploy.sh"
mode: 0755
roles:
- {role: "ospd/overcloud/storage/ceph/", when: provisioner.nodes.ceph is defined or installer.overcloud.storage.type == "external"}
- {role: "ospd/overcloud/storage/ceph/", when: provisioner.nodes.ceph is defined or installer.overcloud.storage.external == "yes"}
- {role: "ospd/overcloud/network/isolation/{{ installer.overcloud.network.isolation.type }}/", when: installer.overcloud.network.isolation.enable == "yes"}
- {role: "ospd/overcloud/ssl/", when: installer.overcloud.network.ssl == "yes"}
- {role: "ospd/overcloud/ssl/", when: installer.overcloud.use_ssl == "yes"}

- name: Install the overcloud
hosts: undercloud
Expand Down
14 changes: 6 additions & 8 deletions playbooks/installer/ospd/undercloud/pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,23 @@
command: "rm -f /etc/yum.repos.d/*"

- name: install the rhos-release RPM
shell: "yum localinstall -y {{ installer.product.rpm }}"
shell: "yum localinstall -y {{ product.rpm }}"

- debug:
msg: "rhos-release {{ installer.product.version }}-director -p {{ installer.product.build }}"
msg: "rhos-release {{ installer.version.major }}-director -p {{ installer.build }}"

- name: create necessary repos with for director using rhos-release
command: "rhos-release {{ installer.product.version }}-director -p {{ installer.product.build }}"
command: "rhos-release {{ installer.version.major }}-director -p {{ installer.build }}"
register: command_result
until: command_result.stderr.find('Connection reset by peer') == -1
retries: 40
delay: 5

- debug:
msg: "rhos-release {{ installer.productcore.version }} -p {{ installer.product.core.build }}"
when: prodcut.core is defined
msg: "rhos-release {{ product.version.major }} -p {{ product.build }}"

- name: create necessary repos for core using rhos-release
command: "rhos-release {{ installer.productcore.version }} -p {{ installer.product.core.build }}"
when: prodcut.core is defined
command: "rhos-release {{ product.version.major }} -p {{ product.build }}"

- name: update system packages
yum:
Expand All @@ -61,7 +59,7 @@
tasks:
- name: Install the oscplugin/tripleO client
yum:
name: "{% if installer.product.version == '7' %}python-rdomanager-oscplugin{% else %}python-tripleoclient{% endif %}"
name: "{% if installer.version.major == 7 %}python-rdomanager-oscplugin{% else %}python-tripleoclient{% endif %}"
state: present

- name: create user
Expand Down
6 changes: 3 additions & 3 deletions roles/ospd/overcloud/images/import/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
- name: download the pre-built overcloud images
get_url:
dest: "~/{{ item.value }}"
url: "{{ installer.overcloud.images.server }}/{{ item.value }}"
with_dict: "{{ installer.overcloud.images.files }}"
url: "{{ installer.images.base_url }}/{{ item.value }}"
with_dict: "{{ installer.images.overcloud.files }}"

- name: untar the images
shell: "tar -xvf ~/{{ item.value }}"
with_dict: "{{ installer.overcloud.images.files }}"
with_dict: "{{ installer.images.overcloud.files }}"
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
line: ' -e {{ installer.overcloud.template_base }}/{{ installer.overcloud.network.isolation.file }} \\'

- name: add port to br-ctlplane for ipv6 over vlan support
shell: "sudo ovs-vsctl add-port br-ctlplane vlan{{ installer.overcloud.network.template.parameter_defaults.ExternalNetworkVlanID }} tag={{ installer.overcloud.network.template.parameter_defaults.ExternalNetworkVlanID }} -- set interface vlan{{ installer.overcloud.network.template.parameter_defaults.ExternalNetworkVlanID }} type=internal"
shell: "sudo ovs-vsctl add-port br-ctlplane vlan{{ installer.overcloud.network.template.content.parameter_defaults.ExternalNetworkVlanID }} tag={{ installer.overcloud.network.template.content.parameter_defaults.ExternalNetworkVlanID }} -- set interface vlan{{ installer.overcloud.network.template.content.parameter_defaults.ExternalNetworkVlanID }} type=internal"
when: installer.overcloud.network.backend == 'vlan'

- name: add the ipv6 address
shell: "sudo ip l set dev vlan{{ installer.overcloud.network.template.parameter_defaults.ExternalNetworkVlanID }} up; sudo ip addr add {{ installer.overcloud.network.template.parameter_defaults.ExternalInterfaceDefaultRoute }}/64 dev vlan{{ installer.overcloud.network.template.parameter_defaults.ExternalNetworkVlanID }}"
shell: "sudo ip l set dev vlan{{ installer.overcloud.network.template.content.parameter_defaults.ExternalNetworkVlanID }} up; sudo ip addr add {{ installer.overcloud.network.template.content.parameter_defaults.ExternalInterfaceDefaultRoute }}/64 dev vlan{{ installer.overcloud.network.template.content.parameter_defaults.ExternalNetworkVlanID }}"
when: installer.overcloud.network.backend == 'vlan'
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ installer.overcloud.network.template | to_yaml }}
{{ installer.overcloud.network.template.content | to_yaml }}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ installer.overcloud.network.template | to_yaml }}
{{ installer.overcloud.network.template.content | to_yaml }}
2 changes: 1 addition & 1 deletion roles/ospd/overcloud/ssl/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
shell: "openssl genrsa -out {{ installer.overcloud.template_base }}/overcloud-privkey.pem 2048"

- name: create the self signed CA certificate
shell: "openssl req -new -x509 -key {{ installer.overcloud.template_base }}/overcloud-privkey.pem -out {{ installer.overcloud.template_base }}/overcloud-cacert.pem -days 365 -subj '/C=US/ST=NC/L=Raleigh/O=Red HAt/OU=QE/CN={{ installer.overcloud.network.template.parameter_defaults.ExternalAllocationPools[0].start }}'"
shell: "openssl req -new -x509 -key {{ installer.overcloud.template_base }}/overcloud-privkey.pem -out {{ installer.overcloud.template_base }}/overcloud-cacert.pem -days 365 -subj '/C=US/ST=NC/L=Raleigh/O=Red HAt/OU=QE/CN={{ installer.overcloud.network.template.content.parameter_defaults.ExternalAllocationPools[0].start }}'"

- name: update the tls template
shell: "sed -i 's/CLOUDNAME/IP_ADDRESS/' {{ installer.overcloud.template_base }}/environments/enable-tls.yaml"
Expand Down
6 changes: 3 additions & 3 deletions roles/ospd/overcloud/storage/ceph/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
lineinfile:
dest: "~/overcloud_deploy.sh"
line: ' --ceph-storage-scale {{ groups["ceph"]| length }} \\'
when: installer.overcloud.storage.type == "internal"
when: installer.overcloud.storage.external == "no"

- name: append the ceph storage template line to the base overcloud deploy script
lineinfile:
dest: "~/overcloud_deploy.sh"
line: '{% for flavor in tagged_flavors %}{% if flavor.cmd is defined and "ceph" in flavor.cmd %} --ceph-storage-flavor {{ flavor.cmd.split() | last }} \\{% endif %}{% endfor %}'
when: installer.overcloud.storage.type == "internal"
when: installer.overcloud.storage.external == "no"

- name: append the storage template line to the base overcloud deploy script
lineinfile:
Expand All @@ -24,4 +24,4 @@
- name: append the storage ceph custom template line to the base overcloud deploy script
lineinfile:
dest: "~/overcloud_deploy.sh"
line: ' -e {{ installer.overcloud.template_base }}/custom-ceph.yaml \\'
line: ' -e {{ installer.overcloud.template_base }}/custom-ceph.yaml \\'
4 changes: 2 additions & 2 deletions roles/ospd/overcloud/storage/ceph/templates/ceph.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ parameters:
NovaEnableRbdBackend: true
GlanceBackend: rbd

{{ installer.overcloud.storage.template |to_nice_yaml }}
{% if installer.overcloud.storage.type == "external" %}
{{ installer.overcloud.storage.template.content |to_nice_yaml }}
{% if installer.overcloud.storage.external == "yes" %}
resource_registry:
OS::TripleO::CephClusterConfig::SoftwareConfig: /usr/share/openstack-tripleo-heat-templates/puppet/extraconfig/ceph/ceph-external-config.yaml
{% else %}
Expand Down
12 changes: 0 additions & 12 deletions settings/installer/base.spec

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ installer:
- ' -A INPUT -p udp --sport 123 -m comment --comment "006 QA incoming NTP" -j ACCEPT'
- ' -P INPUT DROP'

defaults:
build: latest
images: import
network: "no-isolation"
version: 7
ssl: "no"

workarounds:
rhbz1304367:
desc: "Overcloud deployment finished successfully and Ceph's OSDs are down"
Expand Down
4 changes: 4 additions & 0 deletions settings/installer/ospd/build/latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---

installer:
build: latest
9 changes: 9 additions & 0 deletions settings/installer/ospd/images/import.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---

installer:
images:
base_url: "{{ !lookup private.installer.images.{{ !lookup product.build }} }}"
task: import

defaults:
version: 7
9 changes: 9 additions & 0 deletions settings/installer/ospd/images/import/version/7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---

installer:
images:
overcloud:
files:
discovery: "discovery-ramdisk.tar"
deployment: "deploy-ramdisk-ironic.tar"
overcloud: "overcloud-full.tar"
8 changes: 8 additions & 0 deletions settings/installer/ospd/images/import/version/8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---

installer:
images:
overcloud:
files:
discovery: "ironic-python-agent.tar"
overcloud: "overcloud-full.tar"
12 changes: 12 additions & 0 deletions settings/installer/ospd/network/isolation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
#TODO: move everything out of isolation, have isolation as it's own option
installer:
overcloud:
network:
isolation:
enable: "yes"

defaults:
protocol: ipv4
type: "three-nics-vlan"
variant: vxlan
29 changes: 29 additions & 0 deletions settings/installer/ospd/network/isolation/protocol/ipv4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---

installer:
overcloud:
network:
protocol: ipv4
template:
content:
parameter_defaults:
InternalApiNetCidr: 172.17.1.0/24
InternalApiAllocationPools: [{'start': '172.17.1.10', 'end': '172.17.1.200'}]
InternalApiNetworkVlanID: 101
TenantNetCidr: 172.17.2.0/24
TenantAllocationPools: [{'start': '172.17.2.10', 'end': '172.17.2.200'}]
TenantNetworkVlanID: 201
StorageNetCidr: 172.17.3.0/24
StorageAllocationPools: [{'start': '172.17.3.10', 'end': '172.17.3.200'}]
StorageNetworkVlanID: 301
StorageMgmtNetCidr: 172.17.4.0/24
StorageMgmtAllocationPools: [{'start': '172.17.4.10', 'end': '172.17.4.200'}]
StorageMgmtNetworkVlanID: 401
ExternalNetCidr: 192.168.1.0/24
ExternalAllocationPools: [{'start': '192.168.1.101', 'end': '192.168.1.149'}]
ExternalInterfaceDefaultRoute: 192.168.1.1
ExternalNetworkVlanID: 501
ControlPlaneSubnetCidr: "24"
ControlPlaneDefaultRoute: 172.16.0.1
EC2MetadataIp: 172.16.0.1
DnsServers: ['192.168.1.1', '8.8.8.8']
30 changes: 30 additions & 0 deletions settings/installer/ospd/network/isolation/protocol/ipv6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---

installer:
overcloud:
network:
backend: vlan
protocol: ipv6
template:
content:
parameter_defaults:
InternalApiNetCidr: 'fd00:fd00:fd00:2000::/64'
InternalApiAllocationPools: [{'start': 'fd00:fd00:fd00:2000::10', 'end': 'fd00:fd00:fd00:2000:ffff:ffff:ffff:fffe'}]
InternalApiNetworkVlanID: 101
TenantNetCidr: 'fd00:fd00:fd00:5000::/64'
TenantAllocationPools: [{'start': 'fd00:fd00:fd00:5000::10', 'end': 'fd00:fd00:fd00:5000:ffff:ffff:ffff:fffe'}]
TenantNetworkVlanID: 201
StorageNetCidr: 'fd00:fd00:fd00:3000::/64'
StorageAllocationPools: [{'start': 'fd00:fd00:fd00:3000::10', 'end': 'fd00:fd00:fd00:3000:ffff:ffff:ffff:fffe'}]
StorageNetworkVlanID: 301
StorageMgmtNetCidr: 'fd00:fd00:fd00:4000::/64'
StorageMgmtAllocationPools: [{'start': 'fd00:fd00:fd00:4000::10', 'end': 'fd00:fd00:fd00:4000:ffff:ffff:ffff:fffe'}]
StorageMgmtNetworkVlanID: 401
ExternalNetCidr: '2620:52:0:13b8::/64'
ExternalAllocationPools: [{'start': '2620:52:0:13b8:5054:ff:fe3e:1', 'end': '2620:52:0:13b8:5054:ff:fe3e:9'}]
ExternalInterfaceDefaultRoute: 2620:52:0:13b8::fe
ExternalNetworkVlanID: 501
ControlPlaneSubnetCidr: "24"
ControlPlaneDefaultRoute: 172.16.0.1
EC2MetadataIp: 172.16.0.1
DnsServers: ['192.168.1.1', '8.8.8.8']
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---

installer:
overcloud:
network:
isolation:
enable: "yes"
type: "single-nic-vlans"
file: "environments/net-single-nic-with-vlans.yaml"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---

installer:
overcloud:
network:
isolation:
enable: "yes"
type: "three-nics-vlans"
file: "environments/net-single-nic-with-vlans.yaml"
6 changes: 6 additions & 0 deletions settings/installer/ospd/network/isolation/variant/gre.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---

installer:
overcloud:
network:
backend: gre
7 changes: 7 additions & 0 deletions settings/installer/ospd/network/isolation/variant/sriov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---

installer:
overcloud:
network:
backend: sriov

6 changes: 6 additions & 0 deletions settings/installer/ospd/network/isolation/variant/vlan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---

installer:
overcloud:
network:
backend: vlan
6 changes: 6 additions & 0 deletions settings/installer/ospd/network/isolation/variant/vxlan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---

installer:
overcloud:
network:
backend: vxlan
8 changes: 8 additions & 0 deletions settings/installer/ospd/network/no-isolation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---

installer:
overcloud:
network:
isolation:
enable: "no"
backend: vxlan
22 changes: 0 additions & 22 deletions settings/installer/ospd/network/templates/ipv4.yml

This file was deleted.

22 changes: 0 additions & 22 deletions settings/installer/ospd/network/templates/ipv6.yml

This file was deleted.

Loading

0 comments on commit ef8410e

Please sign in to comment.