summaryrefslogtreecommitdiffstats
path: root/lib/ansible/playbooks/deploy_dependencies.yml
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-08-02 23:49:00 -0400
committerTim Rozet <trozet@redhat.com>2018-08-23 18:01:16 -0400
commit4301e4cb3bd6f62caec575d30e8588b72ac626c7 (patch)
tree31f6ca88598c12d45f578a6a25b5c3b86c7d5dad /lib/ansible/playbooks/deploy_dependencies.yml
parentdc83fb1667a1a65ad333a3aab1c2843601180b23 (diff)
Adds deployment via snapshot
New arguments are added to allow snapshot deployment: --snapshot, --snap-cache The previous tripleo-quickstart code has been removed/replaced with the snapshot option. Snapshot deployments are supported on CentOS and Fedora, and snapshot artifacts use a similar caching system as the standard deployment. Snapshots are produced daily by Apex, and include latest as well as n-1 OpenStack versions. The os-odl-nofeature scenario is used for the snapshots. Additionally multiple topology verions of Snapshots are available. The Snapshot pulled at deploy time depends on the deploy-settings and number of virtual-computes used at deploy time. Since there is only one network used with snapshot deployments (admin), there is no reason to pass in network settings for snapshot deployments. That argument is now optional. Previously we required even in Standard virtual deployments that the network settings be provided. However that is also unnecessary, as we can default to the virtual network settings. Includes minor fix to the tox.ini to allow specifying test cases to run (useful for developers writing tests). Default behavior of tox is unchanged. JIRA: APEX-548 Change-Id: I1e08c4e54eac5aae99921f61ab7f69693ed12b47 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib/ansible/playbooks/deploy_dependencies.yml')
-rw-r--r--lib/ansible/playbooks/deploy_dependencies.yml27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/ansible/playbooks/deploy_dependencies.yml b/lib/ansible/playbooks/deploy_dependencies.yml
index 1cc304a5..ab09ff6e 100644
--- a/lib/ansible/playbooks/deploy_dependencies.yml
+++ b/lib/ansible/playbooks/deploy_dependencies.yml
@@ -10,10 +10,23 @@
- libguestfs-tools
- python-netaddr
- python2-pip
+ when: ansible_distribution == 'CentOS'
+ - dnf:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - libselinux-python
+ - python-lxml
+ - libvirt-python
+ - libguestfs-tools
+ - python-netaddr
+ - python2-pip
+ when: ansible_distribution == 'Fedora'
- pip:
name: ansible-modules-hashivault,hvac,Jinja2
state: latest
executable: pip2
+ when: not snapshot
- sysctl:
name: net.ipv4.ip_forward
state: present
@@ -38,20 +51,31 @@
xml: '{{ lookup("template", "virsh_network_default.xml.j2") }}'
state: active
autostart: yes
+ when: not snapshot
- openvswitch_bridge:
bridge: 'br-{{ item }}'
state: present
with_items: '{{ virsh_enabled_networks }}'
+ - name: 'Configure IP on bridge'
+ shell: 'ip addr add 192.0.2.99/24 dev br-{{ item }}'
+ with_items: '{{ virsh_enabled_networks }}'
+ when: snapshot
+ - name: 'Bring up bridge'
+ shell: 'ip link set up br-{{ item }}'
+ with_items: '{{ virsh_enabled_networks }}'
+ when: snapshot
- virt_net:
state: present
name: '{{ item }}'
xml: '{{ lookup("template", "virsh_network_ovs.xml.j2") }}'
with_items: '{{ virsh_enabled_networks }}'
+ when: not snapshot
- virt_net:
state: active
name: '{{ item }}'
autostart: yes
with_items: '{{ virsh_enabled_networks }}'
+ when: not snapshot
- virt_pool:
name: default
autostart: yes
@@ -87,16 +111,19 @@
state: present
- name: Generate SSH key for root if missing
shell: test -e ~/.ssh/id_rsa || ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
+ when: not snapshot
- name: Check that /u/l/python3.4/site-packages/virtualbmc/vbmc.py exists
stat:
path: /usr/lib/python3.4/site-packages/virtualbmc/vbmc.py
register: vbmc_py
+ when: not snapshot
- name: Manually patch vmbc to work with python3.x
lineinfile:
line: " conn.defineXML(ET.tostring(tree, encoding='unicode'))"
regexp: "tostring"
path: /usr/lib/python3.4/site-packages/virtualbmc/vbmc.py
when: vbmc_py.stat.exists == True
+ when: not snapshot
- name: Add ssh retry to Ansible config
ini_file:
path: /etc/ansible/ansible.cfg