diff options
Diffstat (limited to 'deploy/adapters/ansible/roles')
15 files changed, 71 insertions, 32 deletions
diff --git a/deploy/adapters/ansible/roles/odl_cluster/files/install_jdk8.tar b/deploy/adapters/ansible/roles/odl_cluster/files/install_jdk8.tar Binary files differnew file mode 100755 index 00000000..faaaeb39 --- /dev/null +++ b/deploy/adapters/ansible/roles/odl_cluster/files/install_jdk8.tar diff --git a/deploy/adapters/ansible/roles/odl_cluster/handlers/main.yml b/deploy/adapters/ansible/roles/odl_cluster/handlers/main.yml index 81e6c658..81e6c658 100644..100755 --- a/deploy/adapters/ansible/roles/odl_cluster/handlers/main.yml +++ b/deploy/adapters/ansible/roles/odl_cluster/handlers/main.yml 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 diff --git a/deploy/adapters/ansible/roles/odl_cluster/templates/akka.conf b/deploy/adapters/ansible/roles/odl_cluster/templates/akka.conf index 318a8729..318a8729 100644..100755 --- a/deploy/adapters/ansible/roles/odl_cluster/templates/akka.conf +++ b/deploy/adapters/ansible/roles/odl_cluster/templates/akka.conf diff --git a/deploy/adapters/ansible/roles/odl_cluster/templates/ml2_conf.sh b/deploy/adapters/ansible/roles/odl_cluster/templates/ml2_conf.sh index 7f61d367..7f61d367 100644..100755 --- a/deploy/adapters/ansible/roles/odl_cluster/templates/ml2_conf.sh +++ b/deploy/adapters/ansible/roles/odl_cluster/templates/ml2_conf.sh diff --git a/deploy/adapters/ansible/roles/odl_cluster/templates/module-shards.conf b/deploy/adapters/ansible/roles/odl_cluster/templates/module-shards.conf index 9a5d4c38..9a5d4c38 100644..100755 --- a/deploy/adapters/ansible/roles/odl_cluster/templates/module-shards.conf +++ b/deploy/adapters/ansible/roles/odl_cluster/templates/module-shards.conf diff --git a/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight.conf b/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight.conf index c9a36f2e..d04cac22 100644..100755 --- a/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight.conf +++ b/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight.conf @@ -6,11 +6,12 @@ author "mskalski@miranits.com" start on runlevel [2345] stop on runlevel [!2345] -setgid odl -setuid odl +#setgid odl +#setuid odl env KARAF_HOME="/opt/opendaylight-0.3.0" -env JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64" +#env JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64" +env JAVA_HOME="/usr/lib/jvm/java-8-oracle" env JAVA_OPTS="-server -Xms128M -Xmx4096M -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:MaxPermSize=512M -Dcom.sun.management.jmxremote" env OPTS="-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true" env MAIN="org.apache.karaf.main.Main" @@ -35,6 +36,6 @@ script fi done - exec /usr/bin/java $JAVA_OPTS -Djava.endorsed.dirs="${JAVA_ENDORSED_DIRS}" -Djava.ext.dirs="${JAVA_EXT_DIRS}" -Dkaraf.instances="${KARAF_HOME}/instances" -Dkaraf.home="$KARAF_HOME" -Dkaraf.base="$KARAF_BASE" -Dkaraf.data="$KARAF_DATA" -Dkaraf.etc="$KARAF_ETC" -Djava.io.tmpdir="$KARAF_DATA/tmp" -Djava.util.logging.config.file="$KARAF_BASE/etc/java.util.logging.properties" $KARAF_OPTS $OPTS -classpath "$CLASSPATH" $MAIN + exec $JAVA_HOME/bin/java $JAVA_OPTS -Djava.endorsed.dirs="${JAVA_ENDORSED_DIRS}" -Djava.ext.dirs="${JAVA_EXT_DIRS}" -Dkaraf.instances="${KARAF_HOME}/instances" -Dkaraf.home="$KARAF_HOME" -Dkaraf.base="$KARAF_BASE" -Dkaraf.data="$KARAF_DATA" -Dkaraf.etc="$KARAF_ETC" -Djava.io.tmpdir="$KARAF_DATA/tmp" -Djava.util.logging.config.file="$KARAF_BASE/etc/java.util.logging.properties" $KARAF_OPTS $OPTS -classpath "$CLASSPATH" $MAIN end script diff --git a/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight.service b/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight.service index a4adeeec..a4adeeec 100644..100755 --- a/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight.service +++ b/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight.service diff --git a/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg b/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg index 4f439c25..4f439c25 100644..100755 --- a/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg +++ b/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg diff --git a/deploy/adapters/ansible/roles/odl_cluster/templates/tomcat-server.xml b/deploy/adapters/ansible/roles/odl_cluster/templates/tomcat-server.xml index bc7ab13d..bc7ab13d 100644..100755 --- a/deploy/adapters/ansible/roles/odl_cluster/templates/tomcat-server.xml +++ b/deploy/adapters/ansible/roles/odl_cluster/templates/tomcat-server.xml diff --git a/deploy/adapters/ansible/roles/odl_cluster/vars/Debian.yml b/deploy/adapters/ansible/roles/odl_cluster/vars/Debian.yml index a2a4795c..9f31190f 100644..100755 --- a/deploy/adapters/ansible/roles/odl_cluster/vars/Debian.yml +++ b/deploy/adapters/ansible/roles/odl_cluster/vars/Debian.yml @@ -1,7 +1,10 @@ --- -packages: - - openjdk-7-jdk +controller_packages: +# - openjdk-7-jdk + - crudini + +compute_packages: - crudini service_file: diff --git a/deploy/adapters/ansible/roles/odl_cluster/vars/RedHat.yml b/deploy/adapters/ansible/roles/odl_cluster/vars/RedHat.yml index 8becb8b6..c0dfede1 100644..100755 --- a/deploy/adapters/ansible/roles/odl_cluster/vars/RedHat.yml +++ b/deploy/adapters/ansible/roles/odl_cluster/vars/RedHat.yml @@ -1,9 +1,13 @@ --- -packages: - - java-1.7.0-openjdk +controller_packages: +# - java-1.7.0-openjdk - crudini +compute_packages: + - crudini + + service_file: - - src: opendaylight.service - dst: /usr/lib/systemd/system/opendaylight.service + src: opendaylight.service + dst: /usr/lib/systemd/system/opendaylight.service diff --git a/deploy/adapters/ansible/roles/odl_cluster/vars/main.yml b/deploy/adapters/ansible/roles/odl_cluster/vars/main.yml index 73a3b02e..450ee0d0 100644..100755 --- a/deploy/adapters/ansible/roles/odl_cluster/vars/main.yml +++ b/deploy/adapters/ansible/roles/odl_cluster/vars/main.yml @@ -12,4 +12,7 @@ odl_extra_features: ['odl-restconf-all','odl-mdsal-clustering','odl-openflowplug odl_features: "{{ odl_base_features + odl_extra_features }}" odl_api_port: 8080 -packages_noarch: [] +jdk8_pkg_name: jdk-8u51-linux-x64.tar.gz + +controller_packages_noarch: [] +compute_packages_noarch: [] |