summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'deploy')
-rw-r--r--deploy/adapters/ansible/roles/open-contrail/1201
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/install/install-collector.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/install/install-compute.yml6
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/install/install-config.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/install/install-control.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/install/install-database.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/install/install-kernel.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/install/install-webui.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-database.yml10
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-tsn.yml2
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/templates/provision/vrouter-nodemgr-param.j23
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/vars/Debian.yml20
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/vars/main.yml4
13 files changed, 28 insertions, 230 deletions
diff --git a/deploy/adapters/ansible/roles/open-contrail/1 b/deploy/adapters/ansible/roles/open-contrail/1
deleted file mode 100644
index 70159aff..00000000
--- a/deploy/adapters/ansible/roles/open-contrail/1
+++ /dev/null
@@ -1,201 +0,0 @@
----
-#- hosts: database
-# sudo: yes
-# tasks:
-
-
-- name: "enable supervisor database"
-# sudo: True
- file:
- path: "/etc/init/supervisor-database.override"
- state: "absent"
-
-
-- name: "-node-common"
-# sudo: True
- include: -node-common.yml
-
-
-- name: "update hosts"
-# sudo: True
- lineinfile:
- dest: "/etc/hosts"
-# regexp: "^{{ contrail_address }}\t{{ ansible_hostname }}( .*)?$"
-# line: "{{ contrail_address }}\t{{ ansible_hostname }}\\1"
- regexp: "^{{ contrail_address }}\t{{ inventory_hostname }}( .*)?$"
- line: "{{ contrail_address }}\t{{ inventory_hostname }}\\1"
- backrefs: yes
-
-
-- name: "make directory for contrail analytics"
-# sudo: True
- file:
- path: "/var/lib/cassandra/data/ContrailAnalytics"
- state: "directory"
-
-
-- name: "modify cassandra conf"
-# sudo: True
- lineinfile:
- dest: "/etc/cassandra/cassandra.yaml"
- regexp: "{{ item.regexp }}"
- line: "{{ item.line }}"
- with_items:
- - { regexp: "^(#(\\s*)?)?listen_address:", line: "listen_address: {{ contrail_address }}"}
- - { regexp: "^(#(\\s*)?)?cluster_name:", line: "cluster_name: \"Contrail\"" }
- - { regexp: "^(#(\\s*)?)?rpc_address:", line: "rpc_address: {{ contrail_address }}" }
- - { regexp: "^(#(\\s*)?)?num_tokens:", line: "num_tokens: 256" }
- - { regexp: "^(#(\\s*)?)?initial_token:", line: "# initial_token:" }
-
-
-
-- name: "set first database host seed"
-# sudo: True
- set_fact:
-# dbseeds: "{{ hostvars[item.1][ contrail_address ] }}"
- dbseeds: "{{ haproxy_hosts.values()[0] }}"
- with_indexed_items: groups['opencontrail_database']
- when: item.0 == 0
-
-
-
-
-
-- name: "set second database host seed"
-# sudo: True
- set_fact:
-# dbseeds: "{{ dbseeds }},{{ hostvars[item.1]['contrail_address'] }}"
- dbseeds: "{{ dbseeds }},{{ haproxy_hosts.values()[0] }}"
- with_indexed_items: groups['opencontrail_database']
- when: item.0 == 1
-
-
-- name: "modify seeds list in cassandra conf"
-# sudo: True
- replace:
- dest: "/etc/cassandra/cassandra.yaml"
- regexp: "- seeds:.*$"
- replace: "- seeds: {{ dbseeds }}"
-
-
-- name: "modify cassandra env"
-# sudo: True
- replace:
- dest: "/etc/cassandra/cassandra-env.sh"
- regexp: "{{ item.regexp }}"
- replace: "{{ item.replace }}"
- with_items:
- - { regexp: "(#(\\s*)?)?JVM_OPTS=\"\\$JVM_OPTS -XX:\\+PrintGCDetails\"", replace: "JVM_OPTS=\"$JVM_OPTS -XX:+PrintGCDetails\"" }
- - { regexp: "(#(\\s*)?)?JVM_OPTS=\"\\$JVM_OPTS -Xss\\d+k\"", replace: "JVM_OPTS=\"$JVM_OPTS -Xss512k\"" }
- - { regexp: "(#(\\s*)?)?JVM_OPTS=\"\\$JVM_OPTS -XX:\\+PrintGCDateStamps\"", replace: "JVM_OPTS=\"$JVM_OPTS -XX:+PrintGCDateStamps\"" }
- - { regexp: "(#(\\s*)?)?JVM_OPTS=\"\\$JVM_OPTS -XX:\\+PrintHeapAtGC\"", replace: "JVM_OPTS=\"$JVM_OPTS -XX:+PrintHeapAtGC\"" }
- - { regexp: "(#(\\s*)?)?JVM_OPTS=\"\\$JVM_OPTS -XX:\\+PrintTenuringDistribution\"", replace: "JVM_OPTS=\"$JVM_OPTS -XX:+PrintTenuringDistribution\"" }
- - { regexp: "(#(\\s*)?)?JVM_OPTS=\"\\$JVM_OPTS -XX:\\+PrintGCApplicationStoppedTime\"", replace: "JVM_OPTS=\"$JVM_OPTS -XX:+PrintGCApplicationStoppedTime\"" }
- - { regexp: "(#(\\s*)?)?JVM_OPTS=\"\\$JVM_OPTS -XX:\\+PrintPromotionFailure\"", replace: "JVM_OPTS=\"$JVM_OPTS -XX:+PrintPromotionFailure\"" }
- - { regexp: "(#(\\s*)?)?JVM_OPTS=\"\\$JVM_OPTS -XX:PrintFLSStatistics=1\"", replace: "JVM_OPTS=\"$JVM_OPTS -XX:PrintFLSStatistics=1\"" }
- - { regexp: "(#(\\s*)?)?JVM_OPTS=\"\\$JVM_OPTS -Xloggc:/var/log/cassandra/gc-`date \\+%s`\\.log\"", replace: "JVM_OPTS=\"$JVM_OPTS -Xloggc:/var/log/cassandra/gc-`date +%s`.log\"" }
-
-
-- name: "modify zookeeper conf"
-# sudo: True
- lineinfile:
- dest: "/etc/zookeeper/conf/zoo.cfg"
- line: "{{ item }}"
- with_items:
- - "maxSessionTimeout=120000"
- - "autopurge.purgeInterval=3"
-
-
-- name: "modify zookeeper log4j properties"
-# sudo: True
- lineinfile:
- dest: "/etc/zookeeper/conf/log4j.properties"
- regexp: "(log4j.appender.ROLLINGFILE.MaxBackupIndex=.*)$"
- line: "\\1"
- backrefs: yes
-
-
-- name: "add server addresses to zookeeper config"
-# sudo: True
- lineinfile:
- dest: "/etc/zookeeper/conf/zoo.cfg"
- regexp: "server.{{ item.0 + 1 }}="
-# line: "server.{{ item.0 + 1 }}={{ hostvars[item.1]['contrail_address'] }}:2888:3888"
- line: "server.{{ item.0 + 1 }}={{ haproxy_hosts.values()[0] }}:2888:3888"
- with_indexed_items: groups['opencontrail_database']
-
-
-- name: "set zookeeper unique id"
-# sudo: True
- template:
- src: "../../templates/provision/zookeeper-unique-id.j2"
- dest: "/var/lib/zookeeper/myid"
- with_indexed_items: groups['opencontrail_database']
- when: item.1 == inventory_hostname
-
-
-- name: "remove kafka ini file"
-# sudo: True
- file:
- path: "/etc/contrail/supervisord_database_files/kafka.ini"
- state: "absent"
-
-
-- name: "set first zookeeper host address"
-# sudo: True
- set_fact:
-# zkaddrs: "{{ hostvars[item.1]['contrail_address'] }}:2181"
- zkaddrs: "{{ haproxy_hosts.values()[0] }}:2181"
- with_indexed_items: groups['opencontrail_database']
- when: item.0 == 0
-
-
-- name: "set second or more zookeeper host addresses"
-# sudo: True
- set_fact:
-# zkaddrs: "{{ zkaddrs }},{{ hostvars[item.1]['contrail_address'] }}:2181"
- zkaddrs: "{{ zkaddrs }},{{ haproxy_hosts.values()[0] }}:2181"
- with_indexed_items: groups['opencontrail_database']
- when: item.0 > 0
-
-
-- name: "modify zookeeper host addresses in kafka properties"
-# sudo: True
- lineinfile:
- dest: "/usr/share/kafka/config/server.properties"
- regexp: "zookeeper.connect="
- line: "zookeeper.connect={{ zkaddrs }}"
-
-
-- name: "modify kafka properties"
-# sudo: True
- lineinfile:
- dest: "/usr/share/kafka/config/server.properties"
- regexp: "default.replication.factor="
- line: "default.replication.factor=2"
-
-
-- name: "fix up contrail database nodemgr config"
-# sudo: True
- ini_file:
- dest: "/etc/contrail/contrail-database-nodemgr.conf"
- section: "{{ item.section }}"
- option: "{{ item.option }}"
- value: "{{ item.value }}"
- with_items:
- - { section: "DEFAULT", option: "hostip", value: "{{ contrail_address }}" }
- - { section: "DISCOVERY", option: "server", value: "{{ contrail_haproxy_address }}" }
-
-
-- name: "restart zookeeper"
-# sudo: True
- service:
- name: "zookeeper"
- state: "restarted"
-
-
-- name: "restart supervisor database"
-# sudo: True
- service:
- name: "supervisor-database"
- state: "restarted"
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-collector.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-collector.yml
index cac370e4..ba6ccbc8 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-collector.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-collector.yml
@@ -13,4 +13,4 @@
# apt:
# name: "contrail-openstack-analytics"
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present force=yes"
- with_items: collector_packages
+ with_items: collector_package
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-compute.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-compute.yml
index 3703522d..d7f5c38b 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-compute.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-compute.yml
@@ -19,7 +19,7 @@
# when: ansible_kernel == "3.13.0-40-generic"
# sudo: True
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present force=yes"
- with_items: vrouter_packages
+ with_items: vrouter_package
when: ansible_kernel == kernel_required
- name: "install contrail vrouter dkms package"
@@ -28,7 +28,7 @@
# when: ansible_kernel != "3.13.0-40-generic"
# sudo: True
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present force=yes"
- with_items: dkms_packages
+ with_items: dkms_package
when: ansible_kernel != kernel_required
# - name: "install contrail vrouter common package"
@@ -42,6 +42,6 @@
- name: "install contrail vrouter common & nova vif package"
# sudo: True
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: compute_packages | union(compute_packages_noarch)
+ with_items: compute_package | union(compute_package_noarch)
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-config.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-config.yml
index e8d4f040..dbd542be 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-config.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-config.yml
@@ -21,4 +21,4 @@
# apt:
# name: "contrail-openstack-config"
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present force=yes"
- with_items: config_packages
+ with_items: config_package
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-control.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-control.yml
index a1f53076..51a713ec 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-control.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-control.yml
@@ -21,4 +21,4 @@
# apt:
# name: "contrail-openstack-control"
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present force=yes"
- with_items: control_packages
+ with_items: control_package
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-database.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-database.yml
index 364fc8e3..5b4875a7 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-database.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-database.yml
@@ -14,4 +14,4 @@
# apt:
# name: "contrail-openstack-database"
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present force=yes"
- with_items: database_packages
+ with_items: database_package
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-kernel.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-kernel.yml
index f1ccfede..ed638b6a 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-kernel.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-kernel.yml
@@ -12,7 +12,7 @@
# name: "linux-image-extra-3.13.0-40-generic"
# when: (kernel_install) and (ansible_kernel != "3.13.0-40-generic")
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present force=yes"
- with_items: kernel_packages | union(kernel_packages_noarch)
+ with_items: kernel_package | union(kernel_package_noarch)
when: (kernel_install) and (ansible_kernel != kernel_required)
- name: "setup grub"
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-webui.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-webui.yml
index 727c4947..665f2be2 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-webui.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/install/install-webui.yml
@@ -15,4 +15,4 @@
# apt:
# name: "contrail-openstack-webui"
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present force=yes"
- with_items: webui_packages
+ with_items: webui_package
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-database.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-database.yml
index 04a1c993..b20491b5 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-database.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-database.yml
@@ -53,7 +53,7 @@
# sudo: True
set_fact:
# dbseeds: "{{ hostvars[item.1][ contrail_address ] }}"
- dbseeds: "{{ haproxy_hosts[item] }}"
+ dbseeds: "{{ haproxy_hosts[item.1] }}"
with_indexed_items: groups['opencontrail_database']
when: item.0 == 0
@@ -65,7 +65,7 @@
# sudo: True
set_fact:
# dbseeds: "{{ dbseeds }},{{ hostvars[item.1]['contrail_address'] }}"
- dbseeds: "{{ dbseeds }},{{ haproxy_hosts[item] }}"
+ dbseeds: "{{ dbseeds }},{{ haproxy_hosts[item.1] }}"
with_indexed_items: groups['opencontrail_database']
when: item.0 == 1
@@ -121,7 +121,7 @@
dest: "/etc/zookeeper/conf/zoo.cfg"
regexp: "server.{{ item.0 + 1 }}="
# line: "server.{{ item.0 + 1 }}={{ hostvars[item.1]['contrail_address'] }}:2888:3888"
- line: "server.{{ item.0 + 1 }}={{ haproxy_hosts[item] }}:2888:3888"
+ line: "server.{{ item.0 + 1 }}={{ haproxy_hosts[item.1] }}:2888:3888"
with_indexed_items: groups['opencontrail_database']
@@ -145,7 +145,7 @@
# sudo: True
set_fact:
# zkaddrs: "{{ hostvars[item.1]['contrail_address'] }}:2181"
- zkaddrs: "{{ haproxy_hosts[item] }}:2181"
+ zkaddrs: "{{ haproxy_hosts[item.1] }}:2181"
with_indexed_items: groups['opencontrail_database']
when: item.0 == 0
@@ -154,7 +154,7 @@
# sudo: True
set_fact:
# zkaddrs: "{{ zkaddrs }},{{ hostvars[item.1]['contrail_address'] }}:2181"
- zkaddrs: "{{ zkaddrs }},{{ haproxy_hosts[item] }}:2181"
+ zkaddrs: "{{ zkaddrs }},{{ haproxy_hosts[item.1] }}:2181"
with_indexed_items: groups['opencontrail_database']
when: item.0 > 0
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-tsn.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-tsn.yml
index 058be18a..33ad6507 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-tsn.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-tsn.yml
@@ -39,7 +39,7 @@
- name: "fix up contrail vrouter agent config"
template:
- src: "provision/contrail-vrouter-agent-conf.j2"
+ src: "../../templates/provision/contrail-vrouter-agent-conf.j2"
dest: "/etc/contrail/contrail-vrouter-agent.conf"
- name: "delete lines for contrail interface"
diff --git a/deploy/adapters/ansible/roles/open-contrail/templates/provision/vrouter-nodemgr-param.j2 b/deploy/adapters/ansible/roles/open-contrail/templates/provision/vrouter-nodemgr-param.j2
index c81b07db..436967b7 100755
--- a/deploy/adapters/ansible/roles/open-contrail/templates/provision/vrouter-nodemgr-param.j2
+++ b/deploy/adapters/ansible/roles/open-contrail/templates/provision/vrouter-nodemgr-param.j2
@@ -1,2 +1 @@
-#DISCOVERY={{ ip_settings[haproxy_hosts.keys()[0]]['mgmt']['ip'] }}
-DISCOVERY={{ haproxy_hosts.value()[0] }}
+DISCOVERY={{ haproxy_hosts.values()[0] }}
diff --git a/deploy/adapters/ansible/roles/open-contrail/vars/Debian.yml b/deploy/adapters/ansible/roles/open-contrail/vars/Debian.yml
index d920eee8..62596917 100755
--- a/deploy/adapters/ansible/roles/open-contrail/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/vars/Debian.yml
@@ -2,10 +2,10 @@
package: "contrail-install-packages_2.21-102-ubuntu-14-04juno_all.deb"
-common_packages:
+common_package:
- contrail-setup
-kernel_packages:
+kernel_package:
- linux-headers-3.13.0-40
- linux-headers-3.13.0-40-generic
- linux-image-3.13.0-40-generic
@@ -13,28 +13,28 @@ kernel_packages:
kernel_required: "3.13.0-40-generic"
-database_packages:
+database_package:
- contrail-openstack-database
-config_packages:
+config_package:
- contrail-openstack-config
-control_packages:
+control_package:
- contrail-openstack-control
-collector_packages:
+collector_package:
- contrail-openstack-analytics
-webui_packages:
+webui_package:
- contrail-openstack-webui
-vrouter_packages:
+vrouter_package:
- contrail-vrouter-3.13.0-40-generic
-dkms_packages:
+dkms_package:
- contrail-vrouter-dkms
-compute_packages:
+compute_package:
- contrail-vrouter-common
- contrail-nova-vif
diff --git a/deploy/adapters/ansible/roles/open-contrail/vars/main.yml b/deploy/adapters/ansible/roles/open-contrail/vars/main.yml
index 0f47bd77..e19b1fbf 100755
--- a/deploy/adapters/ansible/roles/open-contrail/vars/main.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/vars/main.yml
@@ -55,9 +55,9 @@ contrail_tor_agents:
# adapter for compass
-kernel_packages_noarch: []
+kernel_package_noarch: []
-compute_packages_noarch: []
+compute_package_noarch: []
# network infor adapter for compass
contrail_device: "mgmt"