summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/odl_cluster/tasks
diff options
context:
space:
mode:
authorchenshuai@huawei.com <chenshuai@huawei.com>2015-09-09 05:24:11 -0400
committerchenshuai@huawei.com <chenshuai@huawei.com>2015-09-09 05:30:00 -0400
commit860506c03cf20ea27121a2031a3d81d0170b1f54 (patch)
tree7c25749337ac5b5ee20b602b4ffeb8572f136da3 /deploy/adapters/ansible/roles/odl_cluster/tasks
parentcf87d3067a63cb8be315a3addfd9c27d86be3b5a (diff)
Support OpenDayLight Lithium deployment
JIRA: COMPASS-35 Change-Id: I54763234ff4d708ae97e553372dd601fe9ea6fd4 Signed-off-by: chenshuai@huawei.com <chenshuai@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/odl_cluster/tasks')
-rwxr-xr-x[-rw-r--r--]deploy/adapters/ansible/roles/odl_cluster/tasks/main.yml6
-rwxr-xr-x[-rw-r--r--]deploy/adapters/ansible/roles/odl_cluster/tasks/odl_controller.yml32
-rwxr-xr-x[-rw-r--r--]deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml32
3 files changed, 49 insertions, 21 deletions
diff --git a/deploy/adapters/ansible/roles/odl_cluster/tasks/main.yml b/deploy/adapters/ansible/roles/odl_cluster/tasks/main.yml
index 5c6805c0..37dc1bd1 100644..100755
--- a/deploy/adapters/ansible/roles/odl_cluster/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/odl_cluster/tasks/main.yml
@@ -2,9 +2,9 @@
- include_vars: "{{ ansible_os_family }}.yml"
- name: Install ODL Cluster on Controller
- include: main_controller.yml
- when: inventory_hostname in groups['controller']
+ include: odl_controller.yml
+ when: inventory_hostname in groups['odl']
- name: Install ODL Cluster on Compute
- include: main_compute.yml
+ include: openvswitch.yml
when: groups['odl']|length !=0 and inventory_hostname not in groups['odl']
diff --git a/deploy/adapters/ansible/roles/odl_cluster/tasks/odl_controller.yml b/deploy/adapters/ansible/roles/odl_cluster/tasks/odl_controller.yml
index ea90b84e..e2af1459 100644..100755
--- a/deploy/adapters/ansible/roles/odl_cluster/tasks/odl_controller.yml
+++ b/deploy/adapters/ansible/roles/odl_cluster/tasks/odl_controller.yml
@@ -1,7 +1,21 @@
---
-- name: install java packages
+
+- name: install controller packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: controller_packages | union(controller_packages_noarch)
+
+- name: get image http server
+ shell: awk -F'=' '/compass_server/ {print $2}' /etc/compass.conf
+ register: http_server
+
+- name: download oracle-jdk8 package file
+ get_url: url="http://{{ http_server.stdout_lines[0] }}/packages/onos/{{ jdk8_pkg_name }}" dest=/opt/{{ jdk8_pkg_name }}
+
+- name: upload install_jdk8 scripts
+ unarchive: src=install_jdk8.tar dest=/opt/
+
+- name: install install_jdk8 package
+ command: su -s /bin/sh -c "/opt/install_jdk8/install_jdk8.sh"
#- name: install opendaylight packages
# apt: name={{ item }} state=present
@@ -28,9 +42,9 @@
system: "yes"
shell: "/bin/false"
-- name: get image http server
- shell: awk -F'=' '/compass_server/ {print $2}' /etc/compass.conf
- register: http_server
+#- name: get image http server
+# shell: awk -F'=' '/compass_server/ {print $2}' /etc/compass.conf
+# register: http_server
- name: download odl package
get_url: url="http://{{ http_server.stdout_lines[0] }}/packages/odl/{{ odl_pkg_url }}" dest=/opt/{{ odl_pkg_name }}
@@ -142,10 +156,10 @@
- name: Turn off neutron-server on control node
service: name=neutron-server state=stopped
-- name: Install Crudini
- apt: name={{ item }} state=present
- with_items:
- - crudini
+#- name: Install Crudini
+# apt: name={{ item }} state=present
+# with_items:
+# - crudini
- name: Run OpenVSwitch Script
include: openvswitch.yml
diff --git a/deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml b/deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml
index e59ca37e..33ab6841 100644..100755
--- a/deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml
+++ b/deploy/adapters/ansible/roles/odl_cluster/tasks/openvswitch.yml
@@ -1,16 +1,25 @@
---
-- name: Install Crudini
- apt: name={{ item }} state=present
- with_items:
- - crudini
+#- name: Install Crudini
+# apt: name={{ item }} state=present
+# with_items:
+# - crudini
+
+- name: install compute packages
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
+ with_items: compute_packages | union(compute_packages_noarch)
+
+- name: Adjust Service Daemon
+ shell: >
+ sed -i '/neutron-plugin-openvswitch-agent/d' /opt/service ;
+ echo opendaylight >> /opt/service ;
- name: shut down and disable Neutron's openvswitch agent services
service: name=neutron-plugin-openvswitch-agent state=stopped
-- name: remove Neutron's openvswitch agent services
- shell: >
- update-rc.d neutron-plugin-openvswitch-agent remove
+#- name: remove Neutron's openvswitch agent services
+# shell: >
+# update-rc.d neutron-plugin-openvswitch-agent remove
#- name: Stop the Open vSwitch service and clear existing OVSDB
# shell: >
@@ -22,14 +31,19 @@
- name: Set OpenDaylight as the manager
command: su -s /bin/sh -c "ovs-vsctl set-manager tcp:{{ HA_VIP }}:6640;"
-- name: start and disable Neutron's agent services
- service: name=neutron-plugin-openvswitch-agent state=started
+#- name: start and disable Neutron's agent services
+# service: name=neutron-plugin-openvswitch-agent state=started
- name: Configure Neutron1
shell: >
crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 mechanism_drivers opendaylight;
crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types vlan;
+#- name: Adjust Service Daemon
+# shell: >
+# sed -i '/neutron-plugin-openvswitch-agent/d' /opt/service ;
+# echo opendaylight >> /opt/service ;
+
- name: Create ML2 Configuration File
template:
src: ml2_conf.sh