aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchenshuai@huawei.com <chenshuai@huawei.com>2016-08-04 10:39:56 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-04 10:39:56 +0000
commitc18985b42afe1468c245e3c1967d13e3b55d9b3c (patch)
tree91f132ae2d2dfea57926fedbcfa5e047fef13726
parent01273e04385dd07910e2f6473672ea1911a55b25 (diff)
parent961def4bf947094bc017d05de426fd1900bf7c83 (diff)
Merge "add moon switch in Compass4nfv"
-rw-r--r--deploy/adapters/ansible/openstack_mitaka_xenial/HA-ansible-multinodes.yml4
-rwxr-xr-xdeploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/tasks/odl_controller.yml5
-rwxr-xr-xdeploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/templates/jetty.xml106
-rwxr-xr-xdeploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/templates/ml2_conf.sh14
-rwxr-xr-xdeploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/templates/tomcat-server.xml61
-rwxr-xr-xdeploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/vars/main.yml29
-rw-r--r--deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml50
7 files changed, 224 insertions, 45 deletions
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack_mitaka_xenial/HA-ansible-multinodes.yml
index dbb170e5..dc7cbfd2 100644
--- a/deploy/adapters/ansible/openstack_mitaka_xenial/HA-ansible-multinodes.yml
+++ b/deploy/adapters/ansible/openstack_mitaka_xenial/HA-ansible-multinodes.yml
@@ -67,7 +67,7 @@
- keystone
- nova-controller
- neutron-controller
-# - cinder-controller
+ - cinder-controller
- glance
- neutron-common
- neutron-network
@@ -91,7 +91,7 @@
roles:
- nova-compute
- neutron-compute
-# - cinder-volume
+ - cinder-volume
- ceilometer_compute
- hosts: all
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/tasks/odl_controller.yml b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/tasks/odl_controller.yml
index 6de7da66..d4fa36fb 100755
--- a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/tasks/odl_controller.yml
+++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/tasks/odl_controller.yml
@@ -100,6 +100,11 @@
src: tomcat-server.xml
dest: "{{ odl_home }}/configuration/tomcat-server.xml"
+- name: create tomcat config
+ template:
+ src: jetty.xml
+ dest: "{{ odl_home }}/etc/jetty.xml"
+
- name: download odl pip package
get_url: url="http://{{ http_server.stdout_lines[0] }}/pip/{{ networking_odl_pkg_name }}" dest=/opt/{{ networking_odl_pkg_name }}
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/templates/jetty.xml b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/templates/jetty.xml
new file mode 100755
index 00000000..e151e85e
--- /dev/null
+++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/templates/jetty.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//
+DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+
+<Configure class="org.eclipse.jetty.server.Server">
+
+ <!-- =========================================================== -->
+ <!-- Set connectors -->
+ <!-- =========================================================== -->
+ <!-- One of each type! -->
+ <!-- =========================================================== -->
+
+ <!-- Use this connector for many frequently idle connections and for
+ threadless continuations. -->
+ <Call name="addConnector">
+ <Arg>
+ <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
+ <Set name="host">
+ <Property name="jetty.host" default="{{ internal_ip }}"/>
+ </Set>
+ <Set name="port">
+ <Property name="jetty.port" default="8181" />
+ </Set>
+ <Set name="maxIdleTime">300000</Set>
+ <Set name="Acceptors">2</Set>
+ <Set name="statsOn">false</Set>
+ <Set name="confidentialPort">8543</Set>
+ <Set name="lowResourcesConnections">20000</Set>
+ <Set name="lowResourcesMaxIdleTime">5000</Set>
+ </New>
+ </Arg>
+ </Call>
+ <Call name="addConnector">
+ <Arg>
+ <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
+ <Set name="host">
+ <Property name="jetty.host" default="{{ internal_ip }}"/>
+ </Set>
+ <Set name="port">
+ <Property name="jetty.port" default="8181" />
+ </Set>
+ <Set name="maxIdleTime">300000</Set>
+ <Set name="Acceptors">2</Set>
+ <Set name="statsOn">false</Set>
+ <Set name="confidentialPort">8443</Set>
+ <Set name="lowResourcesConnections">20000</Set>
+ <Set name="lowResourcesMaxIdleTime">5000</Set>
+ </New>
+ </Arg>
+ </Call>
+
+ <!-- =========================================================== -->
+ <!-- Configure Authentication Realms -->
+ <!-- Realms may be configured for the entire server here, or -->
+ <!-- they can be configured for a specific web app in a context -->
+ <!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
+ <!-- example). -->
+ <!-- =========================================================== -->
+ <Call name="addBean">
+ <Arg>
+ <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
+ <Set name="name">karaf</Set>
+ <Set name="loginModuleName">karaf</Set>
+ <Set name="roleClassNames">
+ <Array type="java.lang.String">
+ <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
+ </Item>
+ </Array>
+ </Set>
+ </New>
+ </Arg>
+ </Call>
+ <Call name="addBean">
+ <Arg>
+ <New class="org.eclipse.jetty.plus.jaas.JAASLoginService">
+ <Set name="name">default</Set>
+ <Set name="loginModuleName">karaf</Set>
+ <Set name="roleClassNames">
+ <Array type="java.lang.String">
+ <Item>org.apache.karaf.jaas.boot.principal.RolePrincipal
+ </Item>
+ </Array>
+ </Set>
+ </New>
+ </Arg>
+ </Call>
+
+</Configure>
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/templates/ml2_conf.sh b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/templates/ml2_conf.sh
new file mode 100755
index 00000000..5e3627bf
--- /dev/null
+++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/templates/ml2_conf.sh
@@ -0,0 +1,14 @@
+##############################################################################
+# 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
+##############################################################################
+cat <<EOT>> /etc/neutron/plugins/ml2/ml2_conf.ini
+[ml2_odl]
+password = admin
+username = admin
+url = http://{{ internal_vip.ip }}:8181/controller/nb/v2/neutron
+EOT
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/templates/tomcat-server.xml b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/templates/tomcat-server.xml
new file mode 100755
index 00000000..bc7ab13d
--- /dev/null
+++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/templates/tomcat-server.xml
@@ -0,0 +1,61 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<Server>
+ <!--APR library loader. Documentation at /docs/apr.html -->
+ <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
+ <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
+ <Listener className="org.apache.catalina.core.JasperListener" />
+ <!-- Prevent memory leaks due to use of particular java/javax APIs-->
+ <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
+ <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
+ <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
+
+ <Service name="Catalina">
+ <Connector port="{{ odl_api_port }}" protocol="HTTP/1.1"
+ connectionTimeout="20000"
+ redirectPort="8443" />
+
+<!--
+ Please remove the comments around the following Connector tag to enable HTTPS Authentication support.
+ Remember to add a valid keystore in the configuration folder.
+ More info : http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html#Configuration
+-->
+
+ <!--
+ <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
+ maxThreads="150" scheme="https" secure="true"
+ clientAuth="false" sslProtocol="TLS"
+ keystoreFile="configuration/keystore"
+ keystorePass="changeit"/>
+ -->
+
+ <Engine name="Catalina" defaultHost="localhost">
+ <Host name="localhost" appBase=""
+ unpackWARs="false" autoDeploy="false"
+ deployOnStartup="false" createDirs="false">
+ <Realm className="org.opendaylight.controller.karafsecurity.ControllerCustomRealm" />
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
+ <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
+ prefix="web_access_log_" suffix=".txt" resolveHosts="false"
+ rotatable="true" fileDateFormat="yyyy-MM"
+ pattern="%{yyyy-MM-dd HH:mm:ss.SSS z}t - [%a] - %r"/>
+ </Host>
+ </Engine>
+ </Service>
+</Server>
+
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/vars/main.yml b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/vars/main.yml
new file mode 100755
index 00000000..da0c9efd
--- /dev/null
+++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/odl_cluster/vars/main.yml
@@ -0,0 +1,29 @@
+##############################################################################
+# 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
+##############################################################################
+---
+odl_username: admin
+odl_password: admin
+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: karaf.tar.gz
+odl_pkg_name: karaf.tar.gz
+odl_home: "/opt/opendaylight-0.3.0/"
+odl_base_features: ['config', 'standard', 'region', 'package', 'kar', 'ssh', 'management', 'odl-restconf','odl-l2switch-switch','odl-openflowplugin-all','odl-mdsal-apidocs','odl-dlux-all','odl-adsal-northbound','odl-nsf-all','odl-ovsdb-openstack','odl-ovsdb-northbound','odl-dlux-core']
+odl_extra_features: ['odl-restconf-all','odl-mdsal-clustering','odl-openflowplugin-flow-services','http','jolokia-osgi']
+odl_features: "{{ odl_base_features + odl_extra_features }}"
+
+jdk8_pkg_name: jdk-8u51-linux-x64.tar.gz
+
+controller_packages_noarch: []
+compute_packages_noarch: []
+
+odl_pip:
+ - networking_odl
+
diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml
index 25c151a3..4e2651a7 100644
--- a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml
+++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/swift/tasks/main.yml
@@ -51,8 +51,8 @@
- name: wait 30 seconds
shell: sleep 30
-- name: stop tasks on compute
- service: name={{ item }} state=stop enabled=yes
+- name: create swift task script
+ shell: echo {{ item }} >> /opt/swift-service
with_items:
- swift-account
- swift-account-replicator
@@ -70,46 +70,10 @@
when: inventory_hostname in groups['compute']
ignore_errors: True
-- name: sleep 10 second
- shell: sleep 10
-
-- name: start tasks on compute
- service: name={{ item }} state=start enabled=yes
- with_items:
- - swift-account
- - swift-account-replicator
- - swift-container-replicator
- - swift-object
- - swift-object-updater
- - swift-account-auditor
- - swift-container
- - swift-container-sync
- - swift-object-auditor
- - swift-account-reaper
- - swift-container-auditor
- - swift-container-updater
- - swift-object-replicator
- when: inventory_hostname in groups['compute']
- ignore_errors: True
-
-- name: sleep 10 second
- shell: sleep 10
-
-- name: start tasks on compute
- service: name={{ item }} state=start enabled=yes
- with_items:
- - swift-account
- - swift-account-replicator
- - swift-container-replicator
- - swift-object
- - swift-object-updater
- - swift-account-auditor
- - swift-container
- - swift-container-sync
- - swift-object-auditor
- - swift-account-reaper
- - swift-container-auditor
- - swift-container-updater
- - swift-object-replicator
+- name: restart swift task
+ shell: >
+ for i in `cat /opt/swift-service`; do service $i start; done;
+ sleep 10;
+ for i in `cat /opt/swift-service`; do service $i restart; done;
when: inventory_hostname in groups['compute']
ignore_errors: True