summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/openstack_mitaka/roles
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/openstack_mitaka/roles')
-rw-r--r--deploy/adapters/ansible/openstack_mitaka/roles/keystone/templates/admin-openrc-v3.sh19
-rw-r--r--deploy/adapters/ansible/openstack_mitaka/roles/keystone/vars/Debian.yml21
-rw-r--r--deploy/adapters/ansible/openstack_mitaka/roles/nova-compute/tasks/main.yml4
-rw-r--r--deploy/adapters/ansible/openstack_mitaka/roles/nova-compute/templates/nova-compute.conf11
-rw-r--r--deploy/adapters/ansible/openstack_mitaka/roles/secgroup/templates/neutron.j24
-rw-r--r--deploy/adapters/ansible/openstack_mitaka/roles/secgroup/templates/nova.j23
6 files changed, 22 insertions, 40 deletions
diff --git a/deploy/adapters/ansible/openstack_mitaka/roles/keystone/templates/admin-openrc-v3.sh b/deploy/adapters/ansible/openstack_mitaka/roles/keystone/templates/admin-openrc-v3.sh
deleted file mode 100644
index c3d863e8..00000000
--- a/deploy/adapters/ansible/openstack_mitaka/roles/keystone/templates/admin-openrc-v3.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-##############################################################################
-# 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/openstack_mitaka/roles/keystone/vars/Debian.yml b/deploy/adapters/ansible/openstack_mitaka/roles/keystone/vars/Debian.yml
deleted file mode 100644
index b8d8e7c2..00000000
--- a/deploy/adapters/ansible/openstack_mitaka/roles/keystone/vars/Debian.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-##############################################################################
-# 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
-##############################################################################
----
-
-cron_path: "/var/spool/cron/crontabs"
-
-packages:
- - keystone
- - python-openstackclient
-
-services:
- - apache2
-
-apache_config_dir: /etc/apache2
-http_service_name: apache2
diff --git a/deploy/adapters/ansible/openstack_mitaka/roles/nova-compute/tasks/main.yml b/deploy/adapters/ansible/openstack_mitaka/roles/nova-compute/tasks/main.yml
index 5d7f8b60..f49896bf 100644
--- a/deploy/adapters/ansible/openstack_mitaka/roles/nova-compute/tasks/main.yml
+++ b/deploy/adapters/ansible/openstack_mitaka/roles/nova-compute/tasks/main.yml
@@ -37,6 +37,10 @@
notify:
- restart nova-compute services
+- name: get number of cpu support virtualization
+ shell: egrep -c '(vmx|svm)' /proc/cpuinfo
+ register: kvm_cpu_num
+
- name: update nova-compute conf
template: src={{ item }} dest=/etc/nova/{{ item }}
with_items:
diff --git a/deploy/adapters/ansible/openstack_mitaka/roles/nova-compute/templates/nova-compute.conf b/deploy/adapters/ansible/openstack_mitaka/roles/nova-compute/templates/nova-compute.conf
new file mode 100644
index 00000000..305d408b
--- /dev/null
+++ b/deploy/adapters/ansible/openstack_mitaka/roles/nova-compute/templates/nova-compute.conf
@@ -0,0 +1,11 @@
+[DEFAULT]
+compute_driver=libvirt.LibvirtDriver
+force_raw_images = true
+[libvirt]
+{% if kvm_cpu_num.stdout_lines[0]|int == 0 %}
+virt_type=qemu
+{% else %}
+virt_type=kvm
+{% endif %}
+images_type = raw
+mem_stats_period_seconds=0
diff --git a/deploy/adapters/ansible/openstack_mitaka/roles/secgroup/templates/neutron.j2 b/deploy/adapters/ansible/openstack_mitaka/roles/secgroup/templates/neutron.j2
new file mode 100644
index 00000000..aac6c8a2
--- /dev/null
+++ b/deploy/adapters/ansible/openstack_mitaka/roles/secgroup/templates/neutron.j2
@@ -0,0 +1,4 @@
+[securitygroup]
+firewall_driver = neutron.agent.firewall.NoopFirewallDriver
+enable_security_group = True
+
diff --git a/deploy/adapters/ansible/openstack_mitaka/roles/secgroup/templates/nova.j2 b/deploy/adapters/ansible/openstack_mitaka/roles/secgroup/templates/nova.j2
new file mode 100644
index 00000000..7dbc216a
--- /dev/null
+++ b/deploy/adapters/ansible/openstack_mitaka/roles/secgroup/templates/nova.j2
@@ -0,0 +1,3 @@
+[DEFAULT]
+firewall_driver = nova.virt.firewall.NoopFirewallDriver
+security_group_api = neutron