aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles')
-rw-r--r--deploy/adapters/ansible/roles/ceilometer_controller/tasks/main.yml8
-rw-r--r--deploy/adapters/ansible/roles/ha/templates/haproxy.cfg4
-rwxr-xr-xdeploy/adapters/ansible/roles/onos_cluster/tasks/main.yml1
-rwxr-xr-xdeploy/adapters/ansible/roles/onos_cluster/tasks/onos_controller.yml1
-rwxr-xr-xdeploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml32
5 files changed, 32 insertions, 14 deletions
diff --git a/deploy/adapters/ansible/roles/ceilometer_controller/tasks/main.yml b/deploy/adapters/ansible/roles/ceilometer_controller/tasks/main.yml
index a6ee0000..5ed7163e 100644
--- a/deploy/adapters/ansible/roles/ceilometer_controller/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/ceilometer_controller/tasks/main.yml
@@ -9,6 +9,7 @@
template: src={{ item.src}} dest=/opt/os_templates
with_items: "{{ ceilometer_configs_templates }}"
+
- name: update ceilometer configs
shell: crudini --merge {{ item.1 }} < /opt/os_templates/{{ item.0.src }}
with_subelements:
@@ -16,6 +17,13 @@
- dest
notify: restart ceilometer relation service
+- name: change meter polling interval to 300s
+ replace:
+ dest: /etc/ceilometer/pipeline.yaml
+ regexp: 'interval: .+'
+ replace: 'interval: 300'
+ notify: restart ceilometer relation service
+
- name: write services to monitor list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: ceilometer_services
diff --git a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
index 1bca5e39..3ff63689 100644
--- a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
+++ b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
@@ -56,7 +56,6 @@ listen proxy-glance_registry_cluster
bind {{ public_vip.ip }}:9191
option tcpka
option tcplog
- option httpchk
balance source
{% for host,ip in haproxy_hosts.items() %}
server {{ host }} {{ ip }}:9191 weight 1 check inter 2000 rise 2 fall 5
@@ -78,7 +77,6 @@ listen proxy-nova-novncproxy
bind {{ public_vip.ip }}:6080
option tcpka
option tcplog
- option httpchk
balance source
{% for host,ip in haproxy_hosts.items() %}
server {{ host }} {{ ip }}:6080 weight 1 check inter 2000 rise 2 fall 5
@@ -144,7 +142,6 @@ listen proxy-nova_metadata_api_cluster
bind {{ public_vip.ip }}:8775
option tcpka
option tcplog
- option httpchk
balance source
{% for host,ip in haproxy_hosts.items() %}
server {{ host }} {{ ip }}:8775 weight 1 check inter 2000 rise 2 fall 5
@@ -180,7 +177,6 @@ listen proxy-dashboarad
cookie SERVERID insert indirect nocache
option forwardfor
option httpchk
- option httpchk
option httpclose
rspidel ^Set-cookie:\ IP=
{% for host,ip in haproxy_hosts.items() %}
diff --git a/deploy/adapters/ansible/roles/onos_cluster/tasks/main.yml b/deploy/adapters/ansible/roles/onos_cluster/tasks/main.yml
index 3cd4421b..77e06586 100755
--- a/deploy/adapters/ansible/roles/onos_cluster/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/onos_cluster/tasks/main.yml
@@ -30,6 +30,7 @@
ovs-vsctl del-br br-int ;
ovs-vsctl del-br br-tun ;
ovs-vsctl del-manager ;
+ ip link delete onos_port1 type veth peer name onos_port2;
when: groups['onos']|length !=0
ignore_errors: True
diff --git a/deploy/adapters/ansible/roles/onos_cluster/tasks/onos_controller.yml b/deploy/adapters/ansible/roles/onos_cluster/tasks/onos_controller.yml
index 0606fad9..c22ba7cc 100755
--- a/deploy/adapters/ansible/roles/onos_cluster/tasks/onos_controller.yml
+++ b/deploy/adapters/ansible/roles/onos_cluster/tasks/onos_controller.yml
@@ -47,6 +47,7 @@
- name: create new jar repository
command: su -s /bin/sh -c "mkdir ~/.m2"
+ ignore_errors: True
- name: download jar repository
get_url: url="http://{{ http_server.stdout_lines[0] }}/packages/onos/repository.tar" dest=~/.m2/
diff --git a/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml b/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml
index f8ed551f..0e7c0eb6 100755
--- a/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml
+++ b/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml
@@ -29,8 +29,21 @@
# dpkg -i openvswitch-common_2.3.0-1_amd64.deb;
# dpkg -i openvswitch-switch_2.3.0-1_amd64.deb;
-- name: start up onos-external nic
- command: su -s /bin/sh -c "ifconfig eth2 0 up"
+#- name: start up onos-external nic
+# command: su -s /bin/sh -c "ifconfig eth2 0 up"
+- name: set veth port
+ shell: >
+ ip link add onos_port1 type veth peer name onos_port2;
+ ifconfig onos_port1 up;
+ ifconfig onos_port2 up;
+ ignore_errors: True
+
+- name: set veth to ovs
+ shell: >
+ export externamMac=`ifconfig eth1 | grep "HWaddr" | awk '{print $5}'`;
+ ifconfig onos_port2 hw ether $externamMac;
+ ovs-vsctl add-port br-prv onos_port1;
+ ignore_errors: True
#- name: wait for onos start time
# shell: "sleep 200"
@@ -41,20 +54,19 @@
- name: add openflow-base feature
command: su -s /bin/sh -c "/opt/onos/bin/onos 'feature:install onos-openflow-base'";
- when: inventory_hostname == groups['onos'][0]
+ when: inventory_hostname in groups['onos']
- name: add openflow feature
command: su -s /bin/sh -c "/opt/onos/bin/onos 'feature:install onos-openflow'";
- when: inventory_hostname == groups['onos'][0]
+ when: inventory_hostname in groups['onos']
- name: add vtn feature
command: su -s /bin/sh -c "/opt/onos/bin/onos 'feature:install onos-app-vtn-onosfw'";
- when: inventory_hostname == groups['onos'][0]
-
+ when: inventory_hostname in groups['onos']
- name: set public eth card start
- command: su -s /bin/sh -c "/opt/onos/bin/onos 'externalportname-set -n eth2'"
- when: inventory_hostname == groups['onos'][0]
+ command: su -s /bin/sh -c "/opt/onos/bin/onos 'externalportname-set -n onos_port2'"
+ when: inventory_hostname in groups['onos']
- name: Set ONOS as the manager
command: su -s /bin/sh -c "ovs-vsctl set-manager tcp:{{ ip_settings[groups['onos'][0]]['mgmt']['ip'] }}:6640;"
@@ -66,7 +78,7 @@
export OS_AUTH_URL=http://{{ internal_vip.ip }}:35357/v2.0;
export OS_USERNAME=ADMIN;
neutron net-create ext-net --shared --router:external=True;
- neutron subnet-create ext-net --name ext-subnet {{ public_net_info.floating_ip_cidr }};
+ neutron subnet-create ext-net {{ public_net_info.floating_ip_cidr }} --name ext-subnet --allocation-pool start={{ public_net_info.floating_ip_start }},end={{ public_net_info.floating_ip_end }};
when: inventory_hostname == groups['controller'][0]
- name: set gateway mac address
@@ -74,7 +86,7 @@
ping -c 1 {{ ansible_default_ipv4.gateway }};
gatewayMac=`arp -a {{ ansible_default_ipv4.gateway }} | awk '{print $4}'`;
/opt/onos/bin/onos "externalgateway-update -m $gatewayMac";
- when: inventory_hostname == groups['onos'][0]
+ when: inventory_hostname in groups['onos']
- name: delete default gateway
shell: >