From a5f6222da89b2515f63531597d7143bb54957ee9 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Fri, 17 Oct 2014 14:53:27 -0400 Subject: [PATCH] introduce a common base for compute and controller This moves nova-ctr-base one level up and renames it nova-base, so that we can share the same basic config between compute and controller pods. Change-Id: I325f70c278744a1e1fe99b891e05c59c4248c55f --- .../nova-ctr-base => nova-base}/Dockerfile | 2 +- docker/nova-base/build | 1 + .../config-nova.sh} | 0 docker/nova-compute/nova-compute/Dockerfile | 3 +- .../nova-compute/config-nova-compute.sh | 84 +------------------ docker/nova-controller/nova-api/Dockerfile | 2 +- .../nova-controller/nova-conductor/Dockerfile | 2 +- docker/nova-controller/nova-ctr-base/build | 1 - .../nova-controller/nova-ctr-base/nova.conf | 73 ---------------- .../nova-controller/nova-scheduler/Dockerfile | 2 +- 10 files changed, 10 insertions(+), 160 deletions(-) rename docker/{nova-controller/nova-ctr-base => nova-base}/Dockerfile (76%) create mode 120000 docker/nova-base/build rename docker/{nova-controller/nova-ctr-base/config-nova-controller.sh => nova-base/config-nova.sh} (100%) delete mode 120000 docker/nova-controller/nova-ctr-base/build delete mode 100644 docker/nova-controller/nova-ctr-base/nova.conf diff --git a/docker/nova-controller/nova-ctr-base/Dockerfile b/docker/nova-base/Dockerfile similarity index 76% rename from docker/nova-controller/nova-ctr-base/Dockerfile rename to docker/nova-base/Dockerfile index bad0799944..dfe4ce003b 100644 --- a/docker/nova-controller/nova-ctr-base/Dockerfile +++ b/docker/nova-base/Dockerfile @@ -6,5 +6,5 @@ RUN yum -y install openstack-nova-common \ python-cinderclient \ python-nova && yum clean all -ADD config-nova-controller.sh /opt/kolla/config-nova-controller.sh +ADD config-nova.sh /opt/kolla/config-nova.sh diff --git a/docker/nova-base/build b/docker/nova-base/build new file mode 120000 index 0000000000..d2accf7d39 --- /dev/null +++ b/docker/nova-base/build @@ -0,0 +1 @@ +../../tools/build-docker-image \ No newline at end of file diff --git a/docker/nova-controller/nova-ctr-base/config-nova-controller.sh b/docker/nova-base/config-nova.sh similarity index 100% rename from docker/nova-controller/nova-ctr-base/config-nova-controller.sh rename to docker/nova-base/config-nova.sh diff --git a/docker/nova-compute/nova-compute/Dockerfile b/docker/nova-compute/nova-compute/Dockerfile index 68ac9a3e02..ecd6b558fb 100644 --- a/docker/nova-compute/nova-compute/Dockerfile +++ b/docker/nova-compute/nova-compute/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM kollaglue/fedora-rdo-nova-base MAINTAINER Steven Dake # broken out by operation - we don't need libvirt and @@ -13,7 +13,6 @@ RUN yum -y install curl \ openssh-clients \ rsync \ lvm2 \ - python-cinderclient \ genisoimage \ bridge-utils \ openstack-nova-compute \ diff --git a/docker/nova-compute/nova-compute/config-nova-compute.sh b/docker/nova-compute/nova-compute/config-nova-compute.sh index 8dc05e7ba7..7ced0cac66 100755 --- a/docker/nova-compute/nova-compute/config-nova-compute.sh +++ b/docker/nova-compute/nova-compute/config-nova-compute.sh @@ -1,89 +1,13 @@ #!/bin/sh . /opt/kolla/kolla-common.sh +. /opt/kolla/config-nova.sh -: ${NOVA_DB_USER:=nova} -: ${NOVA_DB_NAME:=nova} -: ${NOVA_KEYSTONE_USER:=admin} -: ${NOVA_KEYSTONE_PASSWORD:=kolla} -: ${ADMIN_TENANT_NAME:=admin} -: ${RABBIT_USERID:=guest} -: ${RABBIT_PASSWORD:=guest} - -check_required_vars KEYSTONE_ADMIN_TOKEN \ - NOVA_DB_PASSWORD \ - NOVA_LIBVIRT_SERVICE_HOST +check_required_vars NOVA_LIBVIRT_SERVICE_HOST cfg=/etc/nova/nova.conf -crudini --set $cfg DEFAULT amqp_durable_queues False -crudini --set $cfg DEFAULT rabbit_host ${RABBITMQ_SERVICE_HOST} -crudini --set $cfg DEFAULT rabbit_port 5672 -crudini --set $cfg DEFAULT rabbit_hosts ${RABBITMQ_SERVICE_HOST}:5672 -crudini --set $cfg DEFAULT rabbit_use_ssl False -crudini --set $cfg DEFAULT rabbit_userid ${RABBIT_USERID} -crudini --set $cfg DEFAULT rabbit_password "${RABBIT_PASSWORD}" -crudini --set $cfg DEFAULT rabbit_virtual_host / -crudini --set $cfg DEFAULT rabbit_ha_queues False -crudini --set $cfg DEFAULT rpc_backend nova.openstack.common.rpc.impl_kombu - -crudini --set $cfg DEFAULT enabled_apis ec2,osapi_compute,metadata -crudini --set $cfg DEFAULT ec2_listen 0.0.0.0 -crudini --set $cfg DEFAULT osapi_compute_listen 0.0.0.0 -crudini --set $cfg DEFAULT osapi_compute_workers 8 -crudini --set $cfg DEFAULT metadata_listen 0.0.0.0 -crudini --set $cfg DEFAULT metadata_workers 8 -crudini --set $cfg DEFAULT service_down_time 60 -crudini --set $cfg DEFAULT rootwrap_config /etc/nova/rootwrap.conf -crudini --set $cfg DEFAULT auth_strategy keystone -crudini --set $cfg DEFAULT use_forwarded_for False -crudini --set $cfg DEFAULT service_neutron_metadata_proxy True -crudini --set $cfg DEFAULT neutron_default_tenant_id default -crudini --set $cfg DEFAULT novncproxy_host 0.0.0.0 -crudini --set $cfg DEFAULT novncproxy_port 6080 -crudini --set $cfg DEFAULT glance_api_servers ${GLANCE_API_SERVICE_HOST}:9292 -crudini --set $cfg DEFAULT network_api_class nova.network.neutronv2.api.API -crudini --set $cfg DEFAULT metadata_host ${MY_IP} -crudini --set $cfg DEFAULT cpu_allocation_ratio 16.0 -crudini --set $cfg DEFAULT ram_allocation_ratio 1.5 -crudini --set $cfg DEFAULT scheduler_default_filters RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,CoreFilter -crudini --set $cfg DEFAULT compute_driver nova.virt.libvirt.LibvirtDriver -crudini --set $cfg DEFAULT vif_plugging_is_fatal True -crudini --set $cfg DEFAULT vif_plugging_timeout 300 -crudini --set $cfg DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver -crudini --set $cfg DEFAULT novncproxy_base_url http://${PUBLIC_IP}:6080/vnc_auto.html -crudini --set $cfg DEFAULT vncserver_listen 0.0.0.0 -crudini --set $cfg DEFAULT vncserver_proxyclient_address ${MY_IP} -crudini --set $cfg DEFAULT vnc_enabled True -crudini --set $cfg DEFAULT volume_api_class nova.volume.cinder.API -crudini --set $cfg DEFAULT image_service nova.image.glance.GlanceImageService -crudini --set $cfg DEFAULT osapi_volume_listen 0.0.0.0 crudini --set $cfg libvirt virt_type kvm -crudini --set $cfg libvirt connection_uri qemu+tcp://${NOVA_LIBVIRT_SERVICE_HOS}/system - -# configure logging to stderr -crudini --del $cfg DEFAULT log_dir -crudini --set $cfg DEFAULT log_file "" -crudini --set $cfg DEFAULT use_stderr True -crudini --set $cfg DEFAULT admin_token "${KEYSTONE_ADMIN_TOKEN}" - -crudini --set $cfg conductor workers 8 - -for option in auth_protocol auth_host auth_port; do - crudini --del $cfg \ - keystone_authtoken \ - $option -done - -crudini --set $cfg keystone_authtoken auth_uri "http://${KEYSTONE_PUBLIC_SERVICE_HOST}:5000/" -crudini --set $cfg keystone_authtoken admin_user ${NOVA_KEYSTONE_USER} -crudini --set $cfg keystone_authtoken admin_password "${NOVA_KEYSTONE_PASSWORD}" -crudini --set $cfg keystone_authtoken admin_tenant_name ${ADMIN_TENANT_NAME} - -cat > /openrc < RUN yum -y install \ diff --git a/docker/nova-controller/nova-conductor/Dockerfile b/docker/nova-controller/nova-conductor/Dockerfile index 881081690c..018070c039 100644 --- a/docker/nova-controller/nova-conductor/Dockerfile +++ b/docker/nova-controller/nova-conductor/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-nova-ctr-base +FROM kollaglue/fedora-rdo-nova-base MAINTAINER Ryan Hallisey RUN yum -y install \ diff --git a/docker/nova-controller/nova-ctr-base/build b/docker/nova-controller/nova-ctr-base/build deleted file mode 120000 index 43944faa00..0000000000 --- a/docker/nova-controller/nova-ctr-base/build +++ /dev/null @@ -1 +0,0 @@ -../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/nova-controller/nova-ctr-base/nova.conf b/docker/nova-controller/nova-ctr-base/nova.conf deleted file mode 100644 index 0c29bd6838..0000000000 --- a/docker/nova-controller/nova-ctr-base/nova.conf +++ /dev/null @@ -1,73 +0,0 @@ - -crudini --set /etc/nova/nova.conf DEFAULT amqp_durable_queues False -crudini --set /etc/nova/nova.conf DEFAULT rabbit_host ${RABBITMQ_SERVICE_HOST} -crudini --set /etc/nova/nova.conf DEFAULT rabbit_port 5672 -crudini --set /etc/nova/nova.conf DEFAULT rabbit_hosts ${RABBITMQ_SERVICE_HOST}:5672 -crudini --set /etc/nova/nova.conf DEFAULT rabbit_use_ssl False -crudini --set /etc/nova/nova.conf DEFAULT rabbit_userid guest -crudini --set /etc/nova/nova.conf DEFAULT rabbit_password guest -crudini --set /etc/nova/nova.conf DEFAULT rabbit_virtual_host / -crudini --set /etc/nova/nova.conf DEFAULT rabbit_ha_queues False -crudini --set /etc/nova/nova.conf DEFAULT rpc_backend nova.openstack.common.rpc.impl_kombu - -crudini --set /etc/nova/nova.conf DEFAULT enabled_apis ec2,osapi_compute,metadata -crudini --set /etc/nova/nova.conf DEFAULT ec2_listen 0.0.0.0 -crudini --set /etc/nova/nova.conf DEFAULT osapi_compute_listen 0.0.0.0 -crudini --set /etc/nova/nova.conf DEFAULT osapi_compute_workers 8 -crudini --set /etc/nova/nova.conf DEFAULT metadata_listen 0.0.0.0 -crudini --set /etc/nova/nova.conf DEFAULT metadata_workers 8 -crudini --set /etc/nova/nova.conf DEFAULT service_down_time 60 -crudini --set /etc/nova/nova.conf DEFAULT rootwrap_config /etc/nova/rootwrap.conf -crudini --set /etc/nova/nova.conf DEFAULT auth_strategy keystone -crudini --set /etc/nova/nova.conf DEFAULT use_forwarded_for False -crudini --set /etc/nova/nova.conf DEFAULT service_neutron_metadata_proxy True -crudini --set /etc/nova/nova.conf DEFAULT neutron_metadata_proxy_shared_secret f699603f131747f5 -crudini --set /etc/nova/nova.conf DEFAULT neutron_default_tenant_id default -crudini --set /etc/nova/nova.conf DEFAULT novncproxy_host 0.0.0.0 -crudini --set /etc/nova/nova.conf DEFAULT novncproxy_port 6080 -crudini --set /etc/nova/nova.conf DEFAULT glance_api_servers ${GLANCE_API_SERVICE_HOST}:9292 -crudini --set /etc/nova/nova.conf DEFAULT network_api_class nova.network.neutronv2.api.API -crudini --set /etc/nova/nova.conf DEFAULT metadata_host ${MY_IP} -#crudini --set /etc/nova/nova.conf DEFAULT neutron_url http://${MY_IP}:9696 -#crudini --set /etc/nova/nova.conf DEFAULT neutron_url_timeout 30 -#crudini --set /etc/nova/nova.conf DEFAULT neutron_admin_username neutron -#crudini --set /etc/nova/nova.conf DEFAULT neutron_admin_password 289fe12be92c4dd8 -#crudini --set /etc/nova/nova.conf DEFAULT neutron_admin_tenant_name services -#crudini --set /etc/nova/nova.conf DEFAULT neutron_region_name RegionOne -#crudini --set /etc/nova/nova.conf DEFAULT neutron_admin_auth_url http://${MY_IP}:35357/v2.0 -#crudini --set /etc/nova/nova.conf DEFAULT neutron_auth_strategy keystone -#crudini --set /etc/nova/nova.conf DEFAULT neutron_ovs_bridge br-int -#crudini --set /etc/nova/nova.conf DEFAULT neutron_extension_sync_interval 600 -#crudini --set /etc/nova/nova.conf DEFAULT security_group_api neutron -#crudini --set /etc/nova/nova.conf DEFAULT lock_path /var/lib/nova/tmp -#crudini --set /etc/nova/nova.conf DEFAULT debug False -#crudini --set /etc/nova/nova.conf DEFAULT verbose True -#crudini --set /etc/nova/nova.conf DEFAULT use_syslog False -crudini --set /etc/nova/nova.conf DEFAULT cpu_allocation_ratio 16.0 -crudini --set /etc/nova/nova.conf DEFAULT ram_allocation_ratio 1.5 -crudini --set /etc/nova/nova.conf DEFAULT scheduler_default_filters RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,CoreFilter -crudini --set /etc/nova/nova.conf DEFAULT compute_driver nova.virt.libvirt.LibvirtDriver -crudini --set /etc/nova/nova.conf DEFAULT vif_plugging_is_fatal True -crudini --set /etc/nova/nova.conf DEFAULT vif_plugging_timeout 300 -crudini --set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver -crudini --set /etc/nova/nova.conf DEFAULT novncproxy_base_url http://${MY_IP}:6080/vnc_auto.html -crudini --set /etc/nova/nova.conf DEFAULT vncserver_listen 0.0.0.0 -crudini --set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address ${MY_IP} -crudini --set /etc/nova/nova.conf DEFAULT vnc_enabled True -crudini --set /etc/nova/nova.conf DEFAULT volume_api_class nova.volume.cinder.API -crudini --set /etc/nova/nova.conf DEFAULT image_service nova.image.glance.GlanceImageService -crudini --set /etc/nova/nova.conf DEFAULT osapi_volume_listen 0.0.0.0 -crudini --del /etc/nova/nova DEFAULT log_file -crudini --del /etc/nova/nova DEFAULT log_dir -crudini --set /etc/nova/nova DEFAULT use_stderr True -crudini --set /etc/nova/nova DEFAULT admin_token ${KEYSTONE_ADMIN_TOKEN} - -crudini --set /etc/nova/nova.conf conductor workers 8 - -crudini --set /etc/nova/nova.conf keystone_authtoken auth_host ${MY_IP} -crudini --set /etc/nova/nova.conf keystone_authtoken auth_port 35357 -crudini --set /etc/nova/nova.conf keystone_authtoken auth_protocol ${KEYSTONE_AUTH_PROTOCOL} -crudini --set /etc/nova/nova.conf keystone_authtoken auth_uri "http://${KEYSTONE_PUBLIC_SERVICE_HOST}:5000/" -crudini --set /etc/nova/nova.conf keystone_authtoken admin_user ${NOVA_KEYSTONE_USER} -crudini --set /etc/nova/nova.conf keystone_authtoken admin_password ${NOVA_ADMIN_PASSWORD} -crudini --set /etc/nova/nova.conf keystone_authtoken admin_tenant_name ${ADMIN_TENANT_NAME} diff --git a/docker/nova-controller/nova-scheduler/Dockerfile b/docker/nova-controller/nova-scheduler/Dockerfile index 4ff9b0b552..5dbb60cc4f 100644 --- a/docker/nova-controller/nova-scheduler/Dockerfile +++ b/docker/nova-controller/nova-scheduler/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-nova-ctr-base +FROM kollaglue/fedora-rdo-nova-base MAINTAINER Ryan Hallisey RUN yum -y install \