summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clusters/openstack-one-node.morph4
-rw-r--r--openstack-nova.configure30
-rw-r--r--openstack/usr/share/openstack/nova/nova-compute.conf2
-rw-r--r--openstack/usr/share/openstack/nova/nova.conf20
4 files changed, 43 insertions, 13 deletions
diff --git a/clusters/openstack-one-node.morph b/clusters/openstack-one-node.morph
index 3c65959..0702ed2 100644
--- a/clusters/openstack-one-node.morph
+++ b/clusters/openstack-one-node.morph
@@ -31,6 +31,9 @@ description: |
system is being deployed to.
- We recommend changing all the PASSWORDs variables, also the
KEYSTONE_TEMPORARY_ADMIN_TOKEN and METADATA_PROXY_SHARED_SECRET.
+ - Setting NOVA_BAREMETAL_SCHEDULING with an YAML truth value will configure
+ Nova to schedule baremetal machines through the Ironic driver, instead of
+ sheduling virtual machines.
systems:
- morph: systems/openstack-system-x86_64.morph
@@ -67,6 +70,7 @@ systems:
NOVA_DB_USER: novaDB
NOVA_DB_PASSWORD: veryinsecure
NOVA_VIRT_TYPE: qemu
+ NOVA_BAREMETAL_SCHEDULING: yes
CINDER_SERVICE_USER: cinder
CINDER_SERVICE_PASSWORD: veryinsecure
diff --git a/openstack-nova.configure b/openstack-nova.configure
index b1ad237..2e22a49 100644
--- a/openstack-nova.configure
+++ b/openstack-nova.configure
@@ -27,7 +27,6 @@ enable(){
# Check variables
##########################################################################
-
if [ -z "$NOVA_SERVICE_USER" -a \
-z "$NOVA_SERVICE_PASSWORD" -a \
-z "$NOVA_DB_USER" -a \
@@ -35,6 +34,8 @@ if [ -z "$NOVA_SERVICE_USER" -a \
-z "$NOVA_VIRT_TYPE" -a \
-z "$NEUTRON_SERVICE_USER" -a \
-z "$NEUTRON_SERVICE_PASSWORD" -a \
+ -z "$IRONIC_SERVICE_USER" -a \
+ -z "$IRONIC_SERVICE_PASSWORD" -a \
-z "$METADATA_PROXY_SHARED_SECRET" -a \
-z "$RABBITMQ_HOST" -a \
-z "$RABBITMQ_USER" -a \
@@ -54,6 +55,8 @@ if [ -z "$NOVA_SERVICE_USER" -o \
-z "$NOVA_VIRT_TYPE" -o \
-z "$NEUTRON_SERVICE_USER" -o \
-z "$NEUTRON_SERVICE_PASSWORD" -o \
+ -z "$IRONIC_SERVICE_USER" -a \
+ -z "$IRONIC_SERVICE_PASSWORD" -a \
-z "$METADATA_PROXY_SHARED_SECRET" -o \
-z "$RABBITMQ_HOST" -o \
-z "$RABBITMQ_USER" -o \
@@ -126,11 +129,27 @@ fi
sed -i "s/192\.168\.122\./192\.168\.1\./g" \
"$ROOT"/etc/libvirt/qemu/networks/default.xml
-
##########################################################################
# Generate configuration file
##########################################################################
+case "$NOVA_BAREMETAL_SCHEDULING" in
+ True|true|yes)
+ export COMPUTE_MANAGER=ironic.nova.compute.manager.ClusteredComputeManager
+ export RESERVED_HOST_MEMORY_MB=0
+ export SCHEDULER_HOST_MANAGER=nova.scheduler.ironic_host_manager.IronicHostManager
+ export RAM_ALLOCATION_RATIO=1.0
+ export COMPUTE_DRIVER=nova.virt.ironic.IronicDriver
+ ;;
+ *)
+ export COMPUTE_MANAGER=nova.compute.manager.ComputeManager
+ export RESERVED_HOST_MEMORY_MB=512
+ export SCHEDULER_HOST_MANAGER=nova.scheduler.host_manager.HostManager
+ export RAM_ALLOCATION_RATIO=1.5
+ export COMPUTE_DRIVER=libvirt.LibvirtDriver
+ ;;
+esac
+
OPENSTACK_DATA="$ROOT/etc/openstack"
mkdir -p "$OPENSTACK_DATA"
@@ -143,8 +162,15 @@ nova_configuration={
'NOVA_DB_USER': os.environ['NOVA_DB_USER'],
'NOVA_DB_PASSWORD': os.environ['NOVA_DB_PASSWORD'],
'NOVA_VIRT_TYPE': os.environ['NOVA_VIRT_TYPE'],
+ 'COMPUTE_MANAGER': os.environ['COMPUTE_MANAGER'],
+ 'RESERVED_HOST_MEMORY_MB': os.environ['RESERVED_HOST_MEMORY_MB'],
+ 'SCHEDULER_HOST_MANAGER': os.environ['SCHEDULER_HOST_MANAGER'],
+ 'RAM_ALLOCATION_RATIO': os.environ['RAM_ALLOCATION_RATIO'],
+ 'COMPUTE_DRIVER': os.environ['COMPUTE_DRIVER'],
'NEUTRON_SERVICE_USER': os.environ['NEUTRON_SERVICE_USER'],
'NEUTRON_SERVICE_PASSWORD': os.environ['NEUTRON_SERVICE_PASSWORD'],
+ 'IRONIC_SERVICE_USER': os.environ['IRONIC_SERVICE_USER'],
+ 'IRONIC_SERVICE_PASSWORD': os.environ['IRONIC_SERVICE_PASSWORD'],
'METADATA_PROXY_SHARED_SECRET': os.environ['METADATA_PROXY_SHARED_SECRET'],
'RABBITMQ_HOST': os.environ['RABBITMQ_HOST'],
'RABBITMQ_USER': os.environ['RABBITMQ_USER'],
diff --git a/openstack/usr/share/openstack/nova/nova-compute.conf b/openstack/usr/share/openstack/nova/nova-compute.conf
index b19de1d..8d18621 100644
--- a/openstack/usr/share/openstack/nova/nova-compute.conf
+++ b/openstack/usr/share/openstack/nova/nova-compute.conf
@@ -1,4 +1,4 @@
[DEFAULT]
-compute_driver=libvirt.LibvirtDriver
+compute_driver={{ COMPUTE_DRIVER }}
[libvirt]
virt_type={{ NOVA_VIRT_TYPE }}
diff --git a/openstack/usr/share/openstack/nova/nova.conf b/openstack/usr/share/openstack/nova/nova.conf
index 04cec1c..6e49b4c 100644
--- a/openstack/usr/share/openstack/nova/nova.conf
+++ b/openstack/usr/share/openstack/nova/nova.conf
@@ -420,7 +420,7 @@ enabled_apis=ec2,osapi_compute,metadata
#metadata_workers=<None>
# Full class name for the Manager for compute (string value)
-#compute_manager=nova.compute.manager.ComputeManager
+compute_manager={{ COMPUTE_MANAGER }}
# Full class name for the Manager for console proxy (string
# value)
@@ -970,7 +970,7 @@ osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions
# Amount of memory in MB to reserve for the host (integer
# value)
-#reserved_host_memory_mb=512
+reserved_host_memory_mb={{ RESERVED_HOST_MEMORY_MB }}
# Class that will manage stats for the local compute host
# (string value)
@@ -1627,7 +1627,7 @@ use_syslog=True
#
# The scheduler host manager class to use (string value)
-#scheduler_host_manager=nova.scheduler.host_manager.HostManager
+scheduler_host_manager={{ SCHEDULER_HOST_MANAGER }}
#
@@ -1719,7 +1719,7 @@ use_syslog=True
# for RamFilter. For AggregateRamFilter, it will fall back to
# this configuration value if no per-aggregate setting found.
# (floating point value)
-#ram_allocation_ratio=1.5
+ram_allocation_ratio={{ RAM_ALLOCATION_RATIO }}
#
@@ -1867,7 +1867,7 @@ scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
# include: libvirt.LibvirtDriver, xenapi.XenAPIDriver,
# fake.FakeDriver, baremetal.BareMetalDriver,
# vmwareapi.VMwareVCDriver, hyperv.HyperVDriver (string value)
-compute_driver=libvirt.LibvirtDriver
+compute_driver={{ COMPUTE_DRIVER }}
# The default format an ephemeral_volume will be formatted
# with on creation. (string value)
@@ -2559,19 +2559,19 @@ api_servers=$host:$port
#api_version=1
# URL for Ironic API endpoint. (string value)
-#api_endpoint=<None>
+api_endpoint=http://{{ CONTROLLER_HOST_ADDRESS }}:6385/v1
# Ironic keystone admin name (string value)
-#admin_username=<None>
+admin_username={{ IRONIC_SERVICE_USER }}
# Ironic keystone admin password. (string value)
-#admin_password=<None>
+admin_password={{ IRONIC_SERVICE_PASSWORD }}
# Ironic keystone auth token. (string value)
#admin_auth_token=<None>
# Keystone public API endpoint. (string value)
-#admin_url=<None>
+admin_url=http://{{ CONTROLLER_HOST_ADDRESS }}:35357/v2.0
# Log level override for ironicclient. Set this in order to
# override the global "default_log_levels", "verbose", and
@@ -2579,7 +2579,7 @@ api_servers=$host:$port
#client_log_level=<None>
# Ironic keystone tenant name. (string value)
-#admin_tenant_name=<None>
+admin_tenant_name=service
# How many retries when a request does conflict. (integer
# value)