diff options
10 files changed, 47 insertions, 85 deletions
diff --git a/ci/deploy_ci.sh b/ci/deploy_ci.sh index 64ae4f34..c309e53e 100755 --- a/ci/deploy_ci.sh +++ b/ci/deploy_ci.sh @@ -14,10 +14,6 @@ CI_DIR=$(cd $(dirname ${BASH_SOURCE:-$0});pwd) # FIXME: Some scenarios need to update. case $DEPLOY_SCENARIO in - os-odl_l3-nofeture-ha) - echo "os-odl_l3-nofeature-ha scenario supports mitaka only" - exit 1 - ;; os-odl_l2-moon-ha) echo "os-odl_l2-moon-ha scenario supports xenial mitaka only" exit 1 diff --git a/deploy/adapters/ansible/roles/odl_cluster/files/opendaylight.service b/deploy/adapters/ansible/roles/odl_cluster/files/opendaylight.service index 8773ee3c..c2cf84ff 100644 --- a/deploy/adapters/ansible/roles/odl_cluster/files/opendaylight.service +++ b/deploy/adapters/ansible/roles/odl_cluster/files/opendaylight.service @@ -7,10 +7,10 @@ After= User=root Group=root Type=simple -WorkingDirectory=/opt/opendaylight-0.5.0 +WorkingDirectory=/opt/opendaylight PermissionsStartOnly=true ExecStartPre= -ExecStart=/usr/lib/jvm/java-8-oracle/bin/java -Djava.security.properties=/opt/opendaylight-0.5.0/etc/odl.java.security -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote -Djava.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/endorsed:/usr/lib/jvm/java-8-oracle/lib/endorsed:/opt/opendaylight-0.5.0/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/lib/jvm/java-8-oracle/lib/ext:/opt/opendaylight-0.5.0/lib/ext -Dkaraf.instances=/opt/opendaylight-0.5.0/instances -Dkaraf.home=/opt/opendaylight-0.5.0 -Dkaraf.base=/opt/opendaylight-0.5.0 -Dkaraf.data=/opt/opendaylight-0.5.0/data -Dkaraf.etc=/opt/opendaylight-0.5.0/etc -Djava.io.tmpdir=/opt/opendaylight-0.5.0/data/tmp -Djava.util.logging.config.file=/opt/opendaylight-0.5.0/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /opt/opendaylight-0.5.0/lib/karaf.branding-1.7.0-Boron.jar:/opt/opendaylight-0.5.0/lib/karaf-jaas-boot.jar:/opt/opendaylight-0.5.0/lib/karaf.jar:/opt/opendaylight-0.5.0/lib/karaf-org.osgi.core.jar org.apache.karaf.main.Main +ExecStart=/usr/lib/jvm/java-8-oracle/bin/java -Djava.security.properties=/opt/opendaylight/etc/odl.java.security -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote -Djava.security.egd=file:/dev/./urandom -Djava.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/endorsed:/usr/lib/jvm/java-8-oracle/lib/endorsed:/opt/opendaylight/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/lib/jvm/java-8-oracle/lib/ext:/opt/opendaylight/lib/ext -Dkaraf.instances=/opt/opendaylight/instances -Dkaraf.home=/opt/opendaylight -Dkaraf.base=/opt/opendaylight -Dkaraf.data=/opt/opendaylight/data -Dkaraf.etc=/opt/opendaylight/etc -Djava.io.tmpdir=/opt/opendaylight/data/tmp -Djava.util.logging.config.file=/opt/opendaylight/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /opt/opendaylight/lib/karaf.branding-1.7.2-Boron-SR2.jar:/opt/opendaylight/lib/karaf-jaas-boot.jar:/opt/opendaylight/lib/karaf.jar:/opt/opendaylight/lib/karaf-org.osgi.core.jar org.apache.karaf.main.Main Restart=on-failure LimitNOFILE=65535 TimeoutStopSec=15 diff --git a/deploy/adapters/ansible/roles/odl_cluster/tasks/01_03_copy_odl_configuration_files.yml b/deploy/adapters/ansible/roles/odl_cluster/tasks/01_03_copy_odl_configuration_files.yml index f4e87955..41aca7ee 100644 --- a/deploy/adapters/ansible/roles/odl_cluster/tasks/01_03_copy_odl_configuration_files.yml +++ b/deploy/adapters/ansible/roles/odl_cluster/tasks/01_03_copy_odl_configuration_files.yml @@ -40,6 +40,15 @@ mode: 0775 when: ansible_os_family == "RedHat" +- name: copy acl configuration script + template: + src: acl_conf.sh + dest: "/opt/acl_conf.sh" + mode: 0777 + +- name: execute acl configuration script + command: su -s /bin/sh -c "/opt/acl_conf.sh;" + - name: create tomcat config template: src: tomcat-server.xml diff --git a/deploy/adapters/ansible/roles/odl_cluster/tasks/01_08_configure_neutron.yml b/deploy/adapters/ansible/roles/odl_cluster/tasks/01_08_configure_neutron.yml index 12c1fd25..5135c8cf 100644 --- a/deploy/adapters/ansible/roles/odl_cluster/tasks/01_08_configure_neutron.yml +++ b/deploy/adapters/ansible/roles/odl_cluster/tasks/01_08_configure_neutron.yml @@ -32,6 +32,24 @@ enable_isolated_metadata "True"; when: odl_l3_agent == "Enable" +- name: force metadata for l3 configuration + shell: | + crudini --set /etc/neutron/dhcp_agent.ini DEFAULT \ + force_metadata "True"; + when: odl_l3_agent == "Enable" + +- name: stop neutron l3 agent + service: name=neutron-l3-agent state=stopped enabled=no + when: odl_l3_agent == "Enable" and inventory_hostname in groups['odl'] + +- name: remove neutron l3 agent + shell: > + sed -i '/neutron-l3-agent/d' /opt/service; + rm -rf /lib/systemd/system/neutron-l3-agent.service; + rm -rf /etc/init/neutron-l3-agent.conf; + rm -rf /etc/init.d/neutron-l3-agent; + when: odl_l3_agent == "Enable" and inventory_hostname in groups['odl'] + - name: drop and recreate neutron database shell: | mysql -e "drop database if exists neutron;"; diff --git a/deploy/adapters/ansible/roles/odl_cluster/templates/acl_conf.sh b/deploy/adapters/ansible/roles/odl_cluster/templates/acl_conf.sh new file mode 100755 index 00000000..d05f33e5 --- /dev/null +++ b/deploy/adapters/ansible/roles/odl_cluster/templates/acl_conf.sh @@ -0,0 +1,12 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +mkdir -p {{ odl_home }}etc/opendaylight/datastore/initial/config/ +CONFFILE=$(find {{ odl_home }} -name "*aclservice*config.xml") +cp $CONFFILE {{ odl_home }}etc/opendaylight/datastore/initial/config/netvirt-aclservice-config.xml +sed -i s/stateful/transparent/ {{ odl_home }}etc/opendaylight/datastore/initial/config/netvirt-aclservice-config.xml diff --git a/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight b/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight deleted file mode 100755 index 90a267d6..00000000 --- a/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# chkconfig: 345 98 2 -# description: ODL controller -# OpenDaylight service controller script -export JAVA_HOME=/usr/lib/jvm/java-8-oracle -USER=odl - -cd /opt/opendaylight-0.3.0 -case "$1" in - start) - /bin/su -m $USER -s /bin/bash -c ./bin/start - ;; - stop) - /bin/su -m $USER -s /bin/bash -c ./bin/stop - ;; - status) - PID=`ps aux | grep java | grep karaf | awk '{print $2}'` - if test -z $PID - then - echo "ODL is down..." - exit 1 - else - echo "ODL is running... PID $PID" - exit 0 - fi - ;; - *) - echo "Usage: $0 {start|stop|status}" - exit 1 - ;; -esac diff --git a/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight.conf b/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight.conf deleted file mode 100755 index 105bb265..00000000 --- a/deploy/adapters/ansible/roles/odl_cluster/templates/opendaylight.conf +++ /dev/null @@ -1,42 +0,0 @@ - -# vim:set ft=upstart ts=2 et: -description "OpenDaylight controller" -author "mskalski@miranits.com" - -start on runlevel [2345] -stop on runlevel [!2345] - -#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-8-oracle" -env JAVA_OPTS="-server -Xms128M -Xmx4096M -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:MaxPermSize=512M -Dcom.sun.management.jmxremote" -env OPTS="-Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=true" -env MAIN="org.apache.karaf.main.Main" - - -chdir /opt/opendaylight-0.3.0 - -script - export KARAF_BASE="$KARAF_HOME" - export KARAF_DATA="$KARAF_BASE/data" - export KARAF_ETC="$KARAF_BASE/etc" - export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$KARAF_BASE/lib" - export JAVA_ENDORSED_DIRS="${JAVA_HOME}/jre/lib/endorsed:${JAVA_HOME}/lib/endorsed:${KARAF_HOME}/lib/endorsed" - export JAVA_EXT_DIRS="${JAVA_HOME}/jre/lib/ext:${JAVA_HOME}/lib/ext:${KARAF_HOME}/lib/ext" - export JAVA_SECURITY_PRO="${KARAF_HOME}/etc/odl.java.security" - - for file in "$KARAF_HOME"/lib/karaf*.jar - do - if [ -z "$CLASSPATH" ]; then - CLASSPATH="$file" - else - CLASSPATH="$CLASSPATH:$file" - fi - done - - exec $JAVA_HOME/bin/java -Djava.security.properties="${JAVA_SECURITY_PRO}" $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/org.apache.karaf.features.cfg.Debian b/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg.Debian index f3f6ad54..eebd47a6 100755 --- a/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg.Debian +++ b/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg.Debian @@ -36,12 +36,12 @@ # # Comma separated list of features repositories to register by default # -featuresRepositories = mvn:org.apache.karaf.features/standard/3.0.7/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.7/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.2.9/xml/features,mvn:org.apache.karaf.features/spring/3.0.7/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.5.0-Boron/xml/features +featuresRepositories = mvn:org.apache.karaf.features/standard/3.0.7/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.7/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.2.9/xml/features,mvn:org.apache.karaf.features/spring/3.0.7/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.5.2-Boron-SR2/xml/features # # Comma separated list of features to install at startup # -featuresBoot=config,standard,region,package,kar,ssh,management,odl-restconf-all,odl-aaa-authn,odl-dlux-all,odl-ovsdb-openstack,odl-base-all,odl-nsf-all,odl-adsal-northbound,odl-mdsal-apidocs,odl-ovsdb-northbound,odl-dlux-core +featuresBoot=config,standard,region,package,kar,ssh,management,odl-restconf-all,odl-aaa-authn,odl-dlux-all,odl-ovsdb-openstack,odl-mdsal-apidocs,odl-dlux-core,odl-openflowplugin-nxm-extensions # # Defines if the boot features are started in asynchronous mode (in a dedicated thread) diff --git a/deploy/adapters/ansible/roles/odl_cluster/vars/main.yml b/deploy/adapters/ansible/roles/odl_cluster/vars/main.yml index 4ee7ecf7..fac2a11e 100755 --- a/deploy/adapters/ansible/roles/odl_cluster/vars/main.yml +++ b/deploy/adapters/ansible/roles/odl_cluster/vars/main.yml @@ -14,9 +14,9 @@ odl_api_port: 8181 # odl_pkg_url: https://nexus.opendaylight.org/content/groups/public/org/ # opendaylight/integration/distribution-karaf/0.3.0-Lithium/ # distribution-karaf-0.3.0-Lithium.tar.gz -odl_pkg_url: distribution-karaf-0.5.0-Boron.tar.gz -odl_pkg_name: distribution-karaf-0.5.0-Boron.tar.gz -odl_home: "/opt/opendaylight-0.5.0/" +odl_pkg_url: distribution-karaf-0.5.2-Boron-SR2.tar.gz +odl_pkg_name: distribution-karaf-0.5.2-Boron-SR2.tar.gz +odl_home: "/opt/opendaylight/" odl_base_features: - config - standard diff --git a/repo/repo.conf b/repo/repo.conf index 21dee026..6f0e9cda 100644 --- a/repo/repo.conf +++ b/repo/repo.conf @@ -16,6 +16,6 @@ export PACKAGE_URL=${PACKAGE_URL:-http://205.177.226.237:9999} # feature packages export KVMFORNFV=${kvmfornfv:-https://gerrit.opnfv.org/gerrit/p/kvmfornfv.git} -export ODL_PKG="$PACKAGE_URL/distribution-karaf-0.5.0-Boron.tar.gz" +export ODL_PKG="$PACKAGE_URL/distribution-karaf-0.5.2-Boron.tar.gz" export JAVA_PKG="$PACKAGE_URL/jdk-8u51-linux-x64.tar.gz \ $PACKAGE_URL/install_jdk8.tar" |