summaryrefslogtreecommitdiffstats
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/database/tasks/mariadb_config.yml18
-rw-r--r--deploy/adapters/ansible/roles/heat/tasks/heat_install.yml21
-rw-r--r--deploy/adapters/ansible/roles/heat/templates/heat_debian.j228
-rw-r--r--deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml1
-rw-r--r--deploy/adapters/ansible/roles/keystone/templates/admin-openrc-v3.sh19
-rw-r--r--deploy/adapters/ansible/roles/keystone/vars/Debian.yml1
-rwxr-xr-xdeploy/adapters/ansible/roles/odl_cluster/tasks/odl_controller.yml16
-rwxr-xr-xdeploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg.Debian (renamed from deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg)0
-rwxr-xr-xdeploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg.Redhat59
9 files changed, 161 insertions, 2 deletions
diff --git a/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml b/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml
index b18ae8f7..780fc322 100644
--- a/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml
+++ b/deploy/adapters/ansible/roles/database/tasks/mariadb_config.yml
@@ -41,6 +41,24 @@
script: remove_user.sh
when: ansible_os_family == "RedHat"
+- name: restart mysql for centos noha
+ service:
+ name: mysql
+ state: restarted
+ when: >
+ inventory_hostname == haproxy_hosts.keys()[0]
+ and haproxy_hosts|length == 1
+ and ansible_os_family == "RedHat"
+
+- name: restart mysql second time for centos noha
+ service:
+ name: mysql
+ state: restarted
+ when: >
+ inventory_hostname == haproxy_hosts.keys()[0]
+ and haproxy_hosts|length == 1
+ and ansible_os_family == "RedHat"
+
- name: restart first nodes
service:
name: mysql
diff --git a/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml b/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml
index 1fbada8c..a6e76c74 100644
--- a/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml
+++ b/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml
@@ -17,6 +17,18 @@
lineinfile: dest=/opt/service create=yes line='{{ item }}'
with_items: services | union(services_noarch)
+# '
+
+- name: create heat user domain
+ shell: >
+ . /opt/admin-openrc-v3.sh;
+ openstack domain create --description "Stack projects and users" heat;
+ openstack user create --domain heat --password {{ HEAT_PASS }} heat_domain_admin;
+ openstack role add --domain heat --user-domain heat --user heat_domain_admin admin;
+ openstack role create heat_stack_owner;
+ openstack role add --project demo --user demo heat_stack_owner;
+ when: inventory_hostname == groups['controller'][0] and ansible_os_family == "Debian"
+
- name: update heat conf
template: src=heat.j2
dest=/etc/heat/heat.conf
@@ -24,4 +36,13 @@
notify:
- restart heat service
- remove heat-sqlite-db
+ when: ansible_os_family == "RedHat"
+- name: update heat conf
+ template: src=heat_debian.j2
+ dest=/etc/heat/heat.conf
+ backup=yes
+ notify:
+ - restart heat service
+ - remove heat-sqlite-db
+ when: ansible_os_family == "Debian"
diff --git a/deploy/adapters/ansible/roles/heat/templates/heat_debian.j2 b/deploy/adapters/ansible/roles/heat/templates/heat_debian.j2
new file mode 100644
index 00000000..62df9fd9
--- /dev/null
+++ b/deploy/adapters/ansible/roles/heat/templates/heat_debian.j2
@@ -0,0 +1,28 @@
+[DEFAULT]
+heat_metadata_server_url = http://{{ internal_vip.ip }}:8000
+heat_waitcondition_server_url = http://{{ internal_vip.ip }}:8000/v1/waitcondition
+rpc_backend = rabbit
+rabbit_host = {{ rabbit_host }}
+rabbit_userid = {{ RABBIT_USER }}
+rabbit_password = {{ RABBIT_PASS }}
+log_dir = /var/log/heat
+stack_domain_admin = heat_domain_admin
+stack_domain_admin_password = {{ HEAT_PASS }}
+stack_user_domain_name = heat
+
+[database]
+connection = mysql://heat:{{ HEAT_DBPASS }}@{{ db_host }}/heat
+idle_timeout = 30
+use_db_reconnect = True
+pool_timeout = 10
+
+[ec2authtoken]
+auth_uri = http://{{ internal_vip.ip }}:5000/v2.0
+
+[keystone_authtoken]
+auth_uri = http://{{ internal_vip.ip }}:5000/v2.0
+identity_uri = http://{{ internal_vip.ip }}:35357
+admin_tenant_name = service
+admin_user = heat
+admin_password = {{ HEAT_PASS }}
+
diff --git a/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml b/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml
index ffae8ff0..ea6926f4 100644
--- a/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml
+++ b/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml
@@ -83,5 +83,6 @@
with_items:
- admin-openrc.sh
- demo-openrc.sh
+ - admin-openrc-v3.sh
- meta: flush_handlers
diff --git a/deploy/adapters/ansible/roles/keystone/templates/admin-openrc-v3.sh b/deploy/adapters/ansible/roles/keystone/templates/admin-openrc-v3.sh
new file mode 100644
index 00000000..c3d863e8
--- /dev/null
+++ b/deploy/adapters/ansible/roles/keystone/templates/admin-openrc-v3.sh
@@ -0,0 +1,19 @@
+##############################################################################
+# 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
+##############################################################################
+# Verify the Identity Service installation
+export OS_PASSWORD={{ ADMIN_PASS }}
+export OS_TENANT_NAME=admin
+export OS_AUTH_URL=http://{{ internal_vip.ip }}:35357/v3
+export OS_IDENTITY_API_VERSION=3
+export OS_USERNAME=admin
+export OS_VOLUME_API_VERSION=2
+export OS_USER_DOMAIN_NAME=Default
+export OS_PROJECT_DOMAIN_NAME=Default
+
+
diff --git a/deploy/adapters/ansible/roles/keystone/vars/Debian.yml b/deploy/adapters/ansible/roles/keystone/vars/Debian.yml
index 67547277..b8d8e7c2 100644
--- a/deploy/adapters/ansible/roles/keystone/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/keystone/vars/Debian.yml
@@ -12,6 +12,7 @@ cron_path: "/var/spool/cron/crontabs"
packages:
- keystone
+ - python-openstackclient
services:
- apache2
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 15513b30..f0ca1054 100755
--- a/deploy/adapters/ansible/roles/odl_cluster/tasks/odl_controller.yml
+++ b/deploy/adapters/ansible/roles/odl_cluster/tasks/odl_controller.yml
@@ -89,11 +89,21 @@
- name: create karaf config
template:
- src: org.apache.karaf.features.cfg
+ src: org.apache.karaf.features.cfg.Debian
dest: "{{ odl_home }}/etc/org.apache.karaf.features.cfg"
owner: odl
group: odl
mode: 0775
+ when: ansible_os_family == "Debian"
+
+- name: create karaf config
+ template:
+ src: org.apache.karaf.features.cfg.Redhat
+ dest: "{{ odl_home }}/etc/org.apache.karaf.features.cfg"
+ owner: odl
+ group: odl
+ mode: 0775
+ when: ansible_os_family == "RedHat"
- name: create tomcat config
template:
@@ -256,7 +266,9 @@
shell: crudini --set /etc/neutron/neutron.conf DEFAULT service_plugins networking_odl.l3.l3_odl.OpenDaylightL3RouterPlugin;
when: odl_l3_agent == "Enable"
-
+- name: configure metadata for l3 configuration
+ shell: crudini --set /etc/neutron/dhcp_agent.ini DEFAULT enable_isolated_metadata True;
+ when: odl_l3_agent == "Enable"
- name: drop and recreate neutron database
shell: mysql -e "drop database if exists neutron;";
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.Debian
index 4bbd33c3..4bbd33c3 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.Debian
diff --git a/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg.Redhat b/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg.Redhat
new file mode 100755
index 00000000..0691a984
--- /dev/null
+++ b/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg.Redhat
@@ -0,0 +1,59 @@
+################################################################################
+#
+# 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.
+#
+################################################################################
+
+#
+# Defines if the startlvl should be respected during feature startup. The default value is true. The default
+# behavior for 2.x is false (!) for this property
+#
+# Be aware that this property is deprecated and will be removed in Karaf 4.0. So, if you need to
+# set this to false, please use this only as a temporary solution!
+#
+#respectStartLvlDuringFeatureStartup=true
+
+
+#
+# Defines if the startlvl should be respected during feature uninstall. The default value is true.
+# If true, means stop bundles respecting the descend order of start level in a certain feature.
+#
+#respectStartLvlDuringFeatureUninstall=true
+
+#
+# Comma separated list of features repositories to register by default
+#
+featuresRepositories = mvn:org.apache.karaf.features/standard/3.0.3/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.3/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.1.4/xml/features,mvn:org.apache.karaf.features/spring/3.0.3/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.4.2-Beryllium-SR2/xml/features
+#featuresRepositories = mvn:org.apache.karaf.features/standard/3.0.3/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.3/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.1.4/xml/features,mvn:org.apache.karaf.features/spring/3.0.3/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.4.0-Beryllium/xml/features
+#featuresRepositories = mvn:org.apache.karaf.features/standard/3.0.3/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.3/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.1.4/xml/features,mvn:org.apache.karaf.features/spring/3.0.3/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.4.0-Beryllium-RC1/xml/features
+#mvn:org.apache.karaf.features/standard/3.0.3/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.3/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.1.4/xml/features,mvn:org.apache.karaf.features/spring/3.0.3/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.3.3-Lithium-SR3/xml/features
+#mvn:org.apache.karaf.features/standard/3.0.3/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.3/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.1.4/xml/features,mvn:org.apache.karaf.features/spring/3.0.3/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.3.2-Lithium-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
+featuresBoot=config,standard,region,package,kar,ssh,management,odl-ovsdb-openstack
+
+#,odl-restconf-all,odl-aaa-authn,odl-dlux-all
+
+# odl-base-all,odl-restconf,odl-ovsdb-openstack,odl-dlux-all,odl-mdsal-apidocs
+#,odl-mdsal-clustering,odl-openflowplugin-flow-services
+
+#
+# Defines if the boot features are started in asynchronous mode (in a dedicated thread)
+#
+featuresBootAsynchronous=false