
Support Compass OpenStack installation with integrated PLUMgrid Open Networking Suite. PLUMgrid ONS is a comprehensive software-only networking solution for OpenStack which integrates with Neutron. The current implementation supports OpenStack Juno with a single controller. * add role for core plumgrid software * add role for plugin to neutron * add single-controller playbook to include plumgrid roles Change-Id: I4c320e9282bcafe450556e70020505fdb5aaf396
157 lines
3.8 KiB
YAML
157 lines
3.8 KiB
YAML
#
|
|
# Copyright (c) 2012-2015, PLUMgrid, http://plumgrid.com
|
|
#
|
|
|
|
#- include: plumgrid_packages.yml
|
|
# when: enable_plumgrid == True
|
|
|
|
# Create a PLUMgrid sources.list
|
|
- name: Create plumgrid sources.list
|
|
lineinfile:
|
|
dest: /etc/apt/sources.list.d/plumgrid.list
|
|
line: "deb {{ plumgrid_repo }}/plumgrid ./"
|
|
state: present
|
|
create: yes
|
|
|
|
# Create a PLUMgrid sources.list
|
|
- name: Add plumgrid-images to repo
|
|
lineinfile:
|
|
dest: /etc/apt/sources.list.d/plumgrid.list
|
|
line: "deb {{ plumgrid_repo }}/plumgrid-images ./"
|
|
state: present
|
|
|
|
# Copy GPG-key file to target nodes
|
|
- name: Copy Plumgrid GPG-key file
|
|
command: apt-key adv --keyserver keyserver.ubuntu.com --recv 63F65885554E46B2
|
|
|
|
# Update repositories
|
|
- name: Running apt-update
|
|
apt:
|
|
update_cache: yes
|
|
|
|
# for compute hosts
|
|
- name: Create nova ifc_ctl_sudoers file
|
|
lineinfile:
|
|
dest: /etc/sudoers.d/ifc_ctl_sudoers
|
|
line: "nova ALL=(root) NOPASSWD: /opt/pg/bin/ifc_ctl_pp *"
|
|
state: present
|
|
create: yes
|
|
owner: root
|
|
mode: "644"
|
|
when: inventory_hostname in groups['compute']
|
|
|
|
# Install package iovisor-dkms
|
|
- name: Install iovisor
|
|
apt:
|
|
name: iovisor-dkms
|
|
state: present
|
|
force: yes
|
|
|
|
# Install package plumgrid-lxc
|
|
- name: Install plumgrid-lxc
|
|
apt:
|
|
name: plumgrid-lxc
|
|
state: present
|
|
force: yes
|
|
|
|
# Install package nova-network
|
|
- name: Install nova-network
|
|
apt:
|
|
name: nova-network
|
|
state: present
|
|
force: yes
|
|
when: inventory_hostname in groups['compute']
|
|
|
|
- name: Disable nova-network
|
|
service:
|
|
name: nova-network
|
|
enabled: no
|
|
when: inventory_hostname in groups['compute']
|
|
|
|
- name: Stop nova-network
|
|
service:
|
|
name: nova-network
|
|
state: stopped
|
|
when: inventory_hostname in groups['compute']
|
|
|
|
# Remove openvswitch
|
|
- name: Remove openvswitch
|
|
apt:
|
|
state: absent
|
|
force: yes
|
|
name: "{{ item }}"
|
|
with_items:
|
|
- openvswitch-common
|
|
- openvswitch-datapath-dkms
|
|
|
|
# Modify template fies
|
|
- name: Setup Keepalived Config on Controller
|
|
template:
|
|
src: keepalived.conf
|
|
dest: /var/lib/libvirt/filesystems/plumgrid/etc/keepalived/keepalived.conf
|
|
when: inventory_hostname in groups['controller']
|
|
|
|
- name: Setup nginx Config
|
|
template:
|
|
src: default.conf
|
|
dest: /var/lib/libvirt/filesystems/plumgrid/opt/pg/sal/nginx/conf.d/default.conf
|
|
|
|
- name: Setup plumgrid Conf
|
|
template:
|
|
src: plumgrid.conf
|
|
dest: /var/lib/libvirt/filesystems/plumgrid/opt/pg/etc/plumgrid.conf
|
|
|
|
- name: Update qemu settings for compute hosts
|
|
template:
|
|
src: qemu.conf
|
|
dest: /etc/libvirt/qemu.conf
|
|
when: inventory_hostname in groups['compute']
|
|
|
|
# Update hostname
|
|
- name: Update Plumgrid hostname
|
|
replace:
|
|
dest: "/var/lib/libvirt/filesystems/plumgrid-data/conf/etc/hostname"
|
|
replace: "pg-{{ inventory_hostname }}"
|
|
regexp: "plumgrid"
|
|
|
|
# Update hosts
|
|
- name: Update /etc/hosts
|
|
replace:
|
|
dest: "/var/lib/libvirt/filesystems/plumgrid-data/conf/etc/hosts"
|
|
replace: "pg-{{ inventory_hostname }}"
|
|
regexp: "plumgrid"
|
|
|
|
- name: Create ifcs file
|
|
lineinfile:
|
|
dest: "/var/lib/libvirt/filesystems/plumgrid-data/conf/pg/ifcs.conf"
|
|
line: "{{ fabric_interface }} = fabric_core host"
|
|
create: yes
|
|
|
|
- name: Add gateway int to network node
|
|
lineinfile:
|
|
dest: "/var/lib/libvirt/filesystems/plumgrid-data/conf/pg/ifcs.conf"
|
|
line: "{{ ext_interface }} = access_phys"
|
|
create: yes
|
|
when: inventory_hostname in groups['network']
|
|
|
|
- name: Set mtu to 1580 in config file
|
|
lineinfile:
|
|
dest: "/etc/network/interfaces"
|
|
line: " mtu 1580"
|
|
create: yes
|
|
insertafter: "^iface {{ fabric_interface }}"
|
|
|
|
- name: Set mtu to 1580 now
|
|
command: "ifconfig {{ fabric_interface }} mtu 1580"
|
|
|
|
- name: Ensure PLUMgrid services are started
|
|
service:
|
|
name: plumgrid
|
|
state: started
|
|
|
|
- name: Restart libvirt-bin
|
|
service:
|
|
name: libvirt-bin
|
|
state: restarted
|
|
pattern: libvirt-bin
|