From d6cdd9da20ca3337af9ec7bc3abc04221627c236 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Fri, 7 Aug 2015 18:07:11 +0000 Subject: Remove config-internal for nova Change-Id: I7dec09e46232f25fd396d1f2f4076f599833f5e5 Partially-implements: blueprint remove-config-internal --- docker/common/nova/nova-api/check.sh | 17 --- docker/common/nova/nova-api/config-internal.sh | 51 -------- docker/common/nova/nova-api/start.sh | 2 +- docker/common/nova/nova-base/config-nova.sh | 128 --------------------- docker/common/nova/nova-compute/config-internal.sh | 19 --- .../nova/nova-compute/config-nova-compute.sh | 28 ----- docker/common/nova/nova-compute/start.sh | 2 +- .../common/nova/nova-conductor/config-internal.sh | 28 ----- docker/common/nova/nova-conductor/start.sh | 2 +- .../nova/nova-consoleauth/config-internal.sh | 11 -- docker/common/nova/nova-consoleauth/start.sh | 2 +- docker/common/nova/nova-libvirt/config-internal.sh | 31 ----- docker/common/nova/nova-libvirt/start.sh | 5 +- docker/common/nova/nova-network/config-internal.sh | 8 -- .../nova/nova-network/config-nova-network.sh | 30 ----- docker/common/nova/nova-network/start.sh | 2 +- .../common/nova/nova-novncproxy/config-internal.sh | 25 ---- docker/common/nova/nova-novncproxy/start.sh | 2 +- .../common/nova/nova-scheduler/config-internal.sh | 15 --- docker/common/nova/nova-scheduler/start.sh | 2 +- 20 files changed, 9 insertions(+), 401 deletions(-) delete mode 100755 docker/common/nova/nova-api/check.sh delete mode 100755 docker/common/nova/nova-api/config-internal.sh delete mode 100755 docker/common/nova/nova-base/config-nova.sh delete mode 100755 docker/common/nova/nova-compute/config-internal.sh delete mode 100755 docker/common/nova/nova-compute/config-nova-compute.sh delete mode 100755 docker/common/nova/nova-conductor/config-internal.sh delete mode 100755 docker/common/nova/nova-consoleauth/config-internal.sh delete mode 100755 docker/common/nova/nova-libvirt/config-internal.sh delete mode 100755 docker/common/nova/nova-network/config-internal.sh delete mode 100755 docker/common/nova/nova-network/config-nova-network.sh delete mode 100755 docker/common/nova/nova-novncproxy/config-internal.sh delete mode 100755 docker/common/nova/nova-scheduler/config-internal.sh (limited to 'docker/common') diff --git a/docker/common/nova/nova-api/check.sh b/docker/common/nova/nova-api/check.sh deleted file mode 100755 index b250682d8..000000000 --- a/docker/common/nova/nova-api/check.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -RES=0 - -. /openrc -if ! keystone token-get > /dev/null; then - echo "ERROR: keystone token-get failed" >&2 - RES=1 -else - if ! nova list > /dev/null; then - echo "ERROR: nova list failed" >&2 - RES=1 - fi -fi - -exit $RES - diff --git a/docker/common/nova/nova-api/config-internal.sh b/docker/common/nova/nova-api/config-internal.sh deleted file mode 100755 index 86768a60d..000000000 --- a/docker/common/nova/nova-api/config-internal.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -set -e - -. /opt/kolla/config-nova.sh - -check_required_vars ADMIN_TENANT_NAME \ - KEYSTONE_ADMIN_SERVICE_HOST \ - KEYSTONE_ADMIN_TOKEN \ - NOVA_API_SERVICE_HOST \ - NOVA_DB_NAME \ - NOVA_EC2_API_SERVICE_HOST \ - NOVA_KEYSTONE_PASSWORD \ - NOVA_KEYSTONE_USER \ - PUBLIC_IP -fail_unless_os_service_running keystone -fail_unless_db $NOVA_DB_NAME - -export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}" -export SERVICE_ENDPOINT="http://${KEYSTONE_ADMIN_SERVICE_HOST}:35357/v2.0" - -cfg=/etc/nova/nova.conf - -# configure logging -crudini --set $cfg DEFAULT log_file "${NOVA_API_LOG_FILE}" - -crux user-create --update \ - -n "${NOVA_KEYSTONE_USER}" \ - -p "${NOVA_KEYSTONE_PASSWORD}" \ - -t "${ADMIN_TENANT_NAME}" \ - -r admin - -crux endpoint-create --remove-all \ - -n ec2 -t ec2 \ - -I "http://${NOVA_EC2_API_SERVICE_HOST}:8773/services/Cloud" \ - -P "http://${PUBLIC_IP}:8773/services/Cloud" \ - -A "http://${NOVA_EC2_API_SERVICE_HOST}:8773/services/Admin" - -crux endpoint-create --remove-all \ - -n nova -t compute \ - -I "http://${NOVA_API_SERVICE_HOST}:8774/v2/\$(tenant_id)s" \ - -P "http://${PUBLIC_IP}:8774/v2/\$(tenant_id)s" \ - -A "http://${NOVA_API_SERVICE_HOST}:8774/v2/\$(tenant_id)s" - -crux endpoint-create --remove-all \ - -n novav3 -t computev3 \ - -I "http://${NOVA_API_SERVICE_HOST}:8774/v3" \ - -P "http://${PUBLIC_IP}:8774/v3" \ - -A "http://${NOVA_API_SERVICE_HOST}:8774/v3" - -exec /usr/bin/nova-api --config-file /etc/nova/nova.conf diff --git a/docker/common/nova/nova-api/start.sh b/docker/common/nova/nova-api/start.sh index 0d7ffca9b..ad25ba65c 100755 --- a/docker/common/nova/nova-api/start.sh +++ b/docker/common/nova/nova-api/start.sh @@ -7,7 +7,7 @@ ARGS="" # Loading common functions. source /opt/kolla/kolla-common.sh -# Config-internal script exec out of this function, it does not return here. +# Execute config strategy set_configs # Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases diff --git a/docker/common/nova/nova-base/config-nova.sh b/docker/common/nova/nova-base/config-nova.sh deleted file mode 100755 index 6465d48a2..000000000 --- a/docker/common/nova/nova-base/config-nova.sh +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/bash - -. /opt/kolla/kolla-common.sh - -check_required_vars DEBUG_LOGGING \ - FLAT_INTERFACE \ - GLANCE_API_SERVICE_HOST \ - KEYSTONE_ADMIN_TOKEN \ - KEYSTONE_PUBLIC_SERVICE_HOST \ - NOVA_DB_PASSWORD \ - PUBLIC_INTERFACE \ - PUBLIC_IP \ - RABBITMQ_SERVICE_HOST \ - VERBOSE_LOGGING - -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 ${ENABLED_APIS} -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_host ${METADATA_HOST} -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 glance_api_servers ${GLANCE_API_SERVICE_HOST}:9292 -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 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 DEFAULT instances_path /var/lib/nova/instances -crudini --set $cfg DEFAULT lock_path /var/lib/nova/lock - -# This is not created by openstack-nova packaging -mkdir -p /var/lib/nova/lock - -# configure logging -crudini --set $cfg DEFAULT log_dir "${NOVA_LOG_DIR}" -crudini --set $cfg DEFAULT debug "${DEBUG_LOGGING}" -crudini --set $cfg DEFAULT verbose "${VERBOSE_LOGGING}" - -crudini --set $cfg DEFAULT admin_token "${KEYSTONE_ADMIN_TOKEN}" - -crudini --set $cfg conductor workers 8 - -if [ "${NETWORK_MANAGER}" == "nova" ] ; then - crudini --set $cfg DEFAULT network_manager nova.network.manager.FlatDHCPManager - crudini --set $cfg DEFAULT firewall_driver nova.virt.libvirt.firewall.IptablesFirewallDriver - crudini --set $cfg DEFAULT network_size 254 - crudini --set $cfg DEFAULT allow_same_net_traffic False - crudini --set $cfg DEFAULT multi_host True - crudini --set $cfg DEFAULT send_arp_for_ha True - crudini --set $cfg DEFAULT share_dhcp_address True - crudini --set $cfg DEFAULT force_dhcp_release True - crudini --set $cfg DEFAULT flat_interface $FLAT_INTERFACE - crudini --set $cfg DEFAULT flat_network_bridge br100 - crudini --set $cfg DEFAULT public_interface $PUBLIC_INTERFACE -elif [ "${NETWORK_MANAGER}" == "neutron" ] ; then - check_required_vars NEUTRON_SHARED_SECRET - crudini --set $cfg neutron service_metadata_proxy True - crudini --set $cfg neutron metadata_proxy_shared_secret ${NEUTRON_SHARED_SECRET} - crudini --set $cfg DEFAULT neutron_default_tenant_id default - crudini --set $cfg DEFAULT network_api_class nova.network.neutronv2.api.API - crudini --set $cfg DEFAULT security_group_api neutron - if [[ "${MECHANISM_DRIVERS}" =~ linuxbridge ]] ; then - crudini --set $cfg DEFAULT linuxnet_interface_driver nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver - elif [[ "${MECHANISM_DRIVERS}" =~ openvswitch ]] ; then - crudini --set $cfg DEFAULT linuxnet_interface_driver nova.network.linux_net.LinuxOVSInterfaceDriver - fi - crudini --set $cfg DEFAULT libvirt_vif_driver nova.virt.libvirt.vif.LibvirtGenericVIFDriver - crudini --set $cfg DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver - crudini --set $cfg neutron url http://${NEUTRON_SERVER_SERVICE_HOST}:${NEUTRON_SERVER_SERVICE_PORT} - crudini --set $cfg neutron auth_strategy keystone - crudini --set $cfg neutron admin_auth_url ${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0 - crudini --set $cfg neutron admin_tenant_name ${ADMIN_TENANT_NAME} - crudini --set $cfg neutron admin_username ${NEUTRON_KEYSTONE_USER} - crudini --set $cfg neutron admin_password ${NEUTRON_KEYSTONE_PASSWORD} -else - echo "Incorrect NETWORK_MANAGER ${NETWORK_MANAGER}. Supported options are nova and neutron." - exit 1 -fi - -# disabled pending answers to http://lists.openstack.org/pipermail/openstack/2014-October/009997.html -#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 auth_protocol http -crudini --set $cfg keystone_authtoken auth_host ${KEYSTONE_PUBLIC_SERVICE_HOST} -crudini --set $cfg keystone_authtoken auth_port 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 < /etc/sysconfig/network-scripts/ifcfg-$FLAT_INTERFACE <