Remove config-internal for nova

Change-Id: I7dec09e46232f25fd396d1f2f4076f599833f5e5
Partially-implements: blueprint remove-config-internal
This commit is contained in:
Sam Yaple 2015-08-07 18:07:11 +00:00
parent a5e907a8e9
commit d6cdd9da20
65 changed files with 47 additions and 509 deletions

View File

@ -4,9 +4,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
RUN yum -y install \ RUN yum -y install \
openstack-nova-api && yum clean all openstack-nova-api && yum clean all
COPY ./start.sh /start.sh COPY start.sh /
COPY ./check.sh /check.sh COPY config-external.sh /opt/kolla/
COPY config-internal.sh config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-api/check.sh

View File

@ -1 +0,0 @@
../../../../common/nova/nova-api/config-internal.sh

View File

@ -6,6 +6,3 @@ RUN yum -y install openstack-nova-common \
python-cinderclient \ python-cinderclient \
python-nova \ python-nova \
bridge-utils && yum clean all bridge-utils && yum clean all
COPY config-nova.sh /opt/kolla/config-nova.sh

View File

@ -1 +0,0 @@
../../../../common/nova/nova-base/config-nova.sh

View File

@ -5,11 +5,8 @@ RUN yum -y install openstack-nova-compute \
openvswitch \ openvswitch \
sysfsutils && yum clean all sysfsutils && yum clean all
COPY config-nova-compute.sh /opt/kolla/config-nova-compute.sh COPY start.sh /
COPY config-external.sh /opt/kolla/
COPY ./start.sh /start.sh
COPY config-internal.sh config-external.sh /opt/kolla/
VOLUME [ "/sys/fs/cgroup" ] VOLUME [ "/sys/fs/cgroup" ]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-compute/config-internal.sh

View File

@ -1 +0,0 @@
../../../../common/nova/nova-compute/config-nova-compute.sh

View File

@ -4,8 +4,8 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
RUN yum -y install \ RUN yum -y install \
openstack-nova-conductor && yum clean all openstack-nova-conductor && yum clean all
COPY ./start.sh /start.sh COPY start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/ COPY config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-conductor/config-internal.sh

View File

@ -3,8 +3,8 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
RUN yum -y install openstack-nova-console && yum clean all RUN yum -y install openstack-nova-console && yum clean all
COPY start.sh /start.sh COPY start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/ COPY config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-consoleauth/config-internal.sh

View File

@ -11,8 +11,8 @@ RUN yum -y install libvirt-daemon \
VOLUME [ "/sys/fs/cgroup" ] VOLUME [ "/sys/fs/cgroup" ]
COPY ./start.sh /start.sh COPY start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/ COPY config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-libvirt/config-internal.sh

View File

@ -4,9 +4,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
RUN yum -y install openstack-nova-network \ RUN yum -y install openstack-nova-network \
bridge-utils initscripts && yum clean all bridge-utils initscripts && yum clean all
COPY config-nova-network.sh /opt/kolla/config-nova-network.sh COPY start.sh /
COPY ./start.sh /start.sh COPY config-external.sh /opt/kolla/
COPY config-internal.sh config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-network/config-internal.sh

View File

@ -1 +0,0 @@
../../../../common/nova/nova-network/config-nova-network.sh

View File

@ -5,8 +5,8 @@ RUN yum -y install \
novnc openstack-nova-novncproxy && \ novnc openstack-nova-novncproxy && \
yum clean all yum clean all
COPY start.sh /start.sh COPY start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/ COPY config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-novncproxy/config-internal.sh

View File

@ -4,8 +4,8 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
RUN yum -y install \ RUN yum -y install \
openstack-nova-scheduler && yum clean all openstack-nova-scheduler && yum clean all
COPY ./start.sh /start.sh COPY start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/ COPY config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-scheduler/config-internal.sh

View File

@ -1,9 +1,7 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base:%%KOLLA_TAG%% FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla) MAINTAINER Kolla Project (https://launchpad.net/kolla)
ADD ./start.sh /start.sh COPY start.sh /
ADD ./check.sh /check.sh COPY config-external.sh /opt/kolla/
COPY config-internal.sh config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-api/check.sh

View File

@ -1 +0,0 @@
../../../../common/nova/nova-api/config-internal.sh

View File

@ -22,5 +22,3 @@ RUN cd /nova \
&& cp -r /nova/etc/nova/* /etc/nova/ \ && cp -r /nova/etc/nova/* /etc/nova/ \
&& chown -R nova: /etc/nova /var/log/nova \ && chown -R nova: /etc/nova /var/log/nova \
&& rm -rf /root/.cache && rm -rf /root/.cache
COPY config-nova.sh /opt/kolla/config-nova.sh

View File

@ -1 +0,0 @@
../../../../common/nova/nova-base/config-nova.sh

View File

@ -3,9 +3,8 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
RUN yum -y install sysfsutils && yum clean all RUN yum -y install sysfsutils && yum clean all
COPY ./start.sh /start.sh COPY start.sh /
COPY config-external.sh /opt/kolla/
COPY config-nova-compute.sh config-internal.sh config-external.sh /opt/kolla/
VOLUME [ "/sys/fs/cgroup" ] VOLUME [ "/sys/fs/cgroup" ]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-compute/config-internal.sh

View File

@ -1 +0,0 @@
../../../../common/nova/nova-compute/config-nova-compute.sh

View File

@ -1,8 +1,8 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base:%%KOLLA_TAG%% FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla) MAINTAINER Kolla Project (https://launchpad.net/kolla)
ADD ./start.sh /start.sh COPY start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/ COPY config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-conductor/config-internal.sh

View File

@ -1,8 +1,8 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base:%%KOLLA_TAG%% FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla) MAINTAINER Kolla Project (https://launchpad.net/kolla)
ADD start.sh /start.sh COPY start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/ COPY config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-consoleauth/config-internal.sh

View File

@ -11,8 +11,8 @@ RUN yum -y install libvirt-daemon \
VOLUME [ "/sys/fs/cgroup" ] VOLUME [ "/sys/fs/cgroup" ]
COPY ./start.sh /start.sh COPY start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/ COPY config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-libvirt/config-internal.sh

View File

@ -3,8 +3,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
RUN yum -y install initscripts && yum clean all RUN yum -y install initscripts && yum clean all
COPY ./start.sh /start.sh COPY start.sh /
COPY config-external.sh /opt/kolla/
COPY config-nova-network.sh config-internal.sh config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-network/config-internal.sh

View File

@ -1 +0,0 @@
../../../../common/nova/nova-network/config-nova-network.sh

View File

@ -6,8 +6,8 @@ RUN yum -y install \
novnc \ novnc \
&& yum clean all && yum clean all
COPY start.sh /start.sh COPY start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/ COPY config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-novncproxy/config-internal.sh

View File

@ -1,8 +1,8 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base:%%KOLLA_TAG%% FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla) MAINTAINER Kolla Project (https://launchpad.net/kolla)
COPY ./start.sh /start.sh COPY start.sh /
COPY config-internal.sh config-external.sh /opt/kolla/ COPY config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/nova/nova-scheduler/config-internal.sh

View File

@ -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

View File

@ -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

View File

@ -7,7 +7,7 @@ ARGS=""
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
# Config-internal script exec out of this function, it does not return here. # Execute config strategy
set_configs set_configs
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases # Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases

View File

@ -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 <<EOF
export OS_AUTH_URL="http://${KEYSTONE_PUBLIC_SERVICE_HOST}:5000/v2.0"
export OS_USERNAME="${NOVA_KEYSTONE_USER}"
export OS_PASSWORD="${NOVA_KEYSTONE_PASSWORD}"
export OS_TENANT_NAME="${ADMIN_TENANT_NAME}"
EOF
# Configure database connection
crudini --set $cfg \
database \
connection \
"mysql://${NOVA_DB_USER}:${NOVA_DB_PASSWORD}@${MARIADB_SERVICE_HOST}/${NOVA_DB_NAME}"

View File

@ -1,19 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/config-nova-compute.sh
sleep 6
# https://bugs.launchpad.net/kolla/+bug/1461635
# Cinder requires mounting /dev in the cinder-volume, nova-compute,
# and libvirt containers. If /dev/pts/ptmx does not have proper permissions
# on the host, then libvirt will fail to boot an instance.
# This is a bug in Docker where it is not correctly mounting /dev/pts
# Tech Debt tracker: https://bugs.launchpad.net/kolla/+bug/1468962
# **Temporary fix**
chmod 666 /dev/pts/ptmx
echo "Starting nova-compute."
exec /usr/bin/nova-compute --config-file /etc/nova/nova.conf

View File

@ -1,28 +0,0 @@
#!/bin/bash
. /opt/kolla/kolla-common.sh
. /opt/kolla/config-nova.sh
cfg=/etc/nova/nova.conf
check_required_vars NOVA_VNCSERVER_PROXYCLIENT_ADDRESS NOVA_NOVNC_PROXY_PORT \
NOVA_NOVNC_BASE_ADDRESS
# Configures novnc to listen on all interfaces and instructs nova-compute to
# announce PROXYCLIENT_IP to the nova-vncproxy. Clients like Horizon will
# connect with this address.
# As such, NOVA_VNCSERVER_PROXYCLIENT_ADDRESS is unique per compute node.
crudini --set $cfg DEFAULT vnc_enabled "True"
crudini --set $cfg DEFAULT vncserver_listen "0.0.0.0"
crudini --set $cfg DEFAULT vncserver_proxyclient_address "${NOVA_VNCSERVER_PROXYCLIENT_ADDRESS}"
crudini --set $cfg DEFAULT novncproxy_base_url "http://${NOVA_NOVNC_BASE_ADDRESS}:${NOVA_NOVNC_PROXY_PORT}/vnc_auto.html"
# configure logging
crudini --set $cfg DEFAULT log_file "${NOVA_COMPUTE_LOG_FILE}"
# set qmeu emulation if no hardware acceleration found
if [[ `egrep -c '(vmx|svm)' /proc/cpuinfo` == 0 ]]; then
crudini --set $cfg libvirt virt_type qemu
fi
mkdir -p /var/lib/nova/instances

View File

@ -7,7 +7,7 @@ ARGS=""
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
# Config-internal script exec out of this function, it does not return here. # Execute config strategy
set_configs set_configs
exec $CMD $ARGS exec $CMD $ARGS

View File

@ -1,28 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/config-nova.sh
check_required_vars INIT_NOVA_DB \
NOVA_DB_NAME \
NOVA_DB_PASSWORD \
NOVA_DB_USER
fail_unless_db
cfg=/etc/nova/nova.conf
# configure logging
crudini --set $cfg DEFAULT log_file "${NOVA_CONDUCTOR_LOG_FILE}"
if [ "${INIT_NOVA_DB}" == "true" ]; then
mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
CREATE DATABASE IF NOT EXISTS ${NOVA_DB_NAME};
GRANT ALL PRIVILEGES ON ${NOVA_DB_NAME}.* TO
'${NOVA_DB_USER}'@'%' IDENTIFIED BY '${NOVA_DB_PASSWORD}'
EOF
nova-manage db sync
fi
exec /usr/bin/nova-conductor --config-file /etc/nova/nova.conf

View File

@ -7,7 +7,7 @@ ARGS=""
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
# Config-internal script exec out of this function, it does not return here. # Execute config strategy
set_configs set_configs
exec $CMD $ARGS exec $CMD $ARGS

View File

@ -1,11 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/config-nova.sh
cfg=/etc/nova/nova.conf
crudini --set $cfg DEFAULT log_file "${NOVA_CONSOLEAUTH_LOG_FILE}"
echo Starting nova-consoleauth
exec /usr/bin/nova-consoleauth

View File

@ -7,7 +7,7 @@ ARGS=""
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
# Config-internal script exec out of this function, it does not return here. # Execute config strategy
set_configs set_configs
exec $CMD $ARGS exec $CMD $ARGS

View File

@ -1,31 +0,0 @@
#!/bin/bash
if [[ $(cat /proc/cpuinfo | grep vmx) ]]; then
modprobe kvm_intel
elif [[ $(cat /proc/cpuinfo | grep svm) ]]; then
modprobe kvm_amd
else
echo "WARNING: Your hardware does not support hardware virtualization -" \
"using qemu software virtualization instead"
fi
modprobe ip6_tables ip_tables ebtable_nat
# If libvirt is not installed on the host permissions need to be set
# If running in qemu, we don't need to set anything as /dev/kvm won't exist
if [[ -c /dev/kvm ]]; then
chmod 660 /dev/kvm
chown root:kvm /dev/kvm
fi
# https://bugs.launchpad.net/kolla/+bug/1461635
# Cinder requires mounting /dev in the cinder-volume, nova-compute,
# and libvirt containers. If /dev/pts/ptmx does not have proper permissions
# on the host, then libvirt will fail to boot an instance.
# This is a bug in Docker where it is not correctly mounting /dev/pts
# Tech Debt tracker: https://bugs.launchpad.net/kolla/+bug/1468962
# **Temporary fix**
chmod 666 /dev/pts/ptmx
echo "Starting libvirtd."
exec /usr/sbin/libvirtd

View File

@ -7,11 +7,10 @@ ARGS=""
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
# Config-internal script exec out of this function, it does not return here. # Execute config strategy
set_configs set_configs
# TODO(SamYaple): Unify this with config-internal. Tweak libvirt.conf rather # TODO(SamYaple): Tweak libvirt.conf rather than change permissions.
# than change permissions.
# Fix permissions for libvirt # Fix permissions for libvirt
if [[ -c /dev/kvm ]]; then if [[ -c /dev/kvm ]]; then
chmod 660 /dev/kvm chmod 660 /dev/kvm

View File

@ -1,8 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/config-nova-network.sh
# Start nova-network
exec /usr/bin/nova-network --config-file /etc/nova/nova.conf

View File

@ -1,30 +0,0 @@
#!/bin/bash
. /opt/kolla/config-nova.sh
cfg=/etc/nova/nova.conf
# configure logging
crudini --set $cfg DEFAULT log_file "${NOVA_NETWORK_LOG_FILE}"
# Configure eth1 as a physcial interface for nova flat network
cat > /etc/sysconfig/network-scripts/ifcfg-$FLAT_INTERFACE <<EOF
DEVICE="$FLAT_INTERFACE"
BOOTPROTO="none"
ONBOOT="yes"
TYPE="Ethernet"
EOF
/usr/sbin/ifup $FLAT_INTERFACE
cfg=/etc/nova/nova.conf
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_network_bridge br100

View File

@ -7,7 +7,7 @@ ARGS=""
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
# Config-internal script exec out of this function, it does not return here. # Execute config strategy
set_configs set_configs
exec $CMD $ARGS exec $CMD $ARGS

View File

@ -1,25 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/kolla-common.sh
cfg=/etc/nova/nova.conf
check_required_vars NOVA_NOVNC_BASE_ADDRESS \
NOVA_NOVNC_PROXY_PORT \
NOVA_NOVNC_PROXY_SERVICE_HOST \
NOVA_VNCSERVER_LISTEN_ADDRESS \
NOVA_VNCSERVER_PROXYCLIENT_ADDRESS \
PUBLIC_IP
crudini --set $cfg DEFAULT log_file "${NOVA_NOVNCPROXY_LOG_FILE}"
# Listen on all interfaces on port $NOVA_NOVNC_PROXY_PORT for incoming novnc
# requests.
# The base_url is given to clients to connect to, like Horizon, so this could
# very well be fancy DNS name.
echo Configuring VNC...
crudini --set $cfg DEFAULT vncserver_listen "${NOVA_VNCSERVER_LISTEN_ADDRESS}"
crudini --set $cfg DEFAULT vncserver_proxyclient_address "${NOVA_VNCSERVER_PROXYCLIENT_ADDRESS}"
echo Starting nova-novncproxy
exec /usr/bin/nova-novncproxy

View File

@ -7,7 +7,7 @@ ARGS=""
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
# Config-internal script exec out of this function, it does not return here. # Execute config strategy
set_configs set_configs
exec $CMD $ARGS exec $CMD $ARGS

View File

@ -1,15 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/config-nova.sh
check_required_vars NOVA_DB_NAME
fail_unless_db $NOVA_DB_NAME
cfg=/etc/nova/nova.conf
# configure logging
crudini --set $cfg DEFAULT log_file "${NOVA_SCHEDULER_LOG_FILE}"
exec /usr/bin/nova-scheduler --config-file /etc/nova/nova.conf

View File

@ -7,7 +7,7 @@ ARGS=""
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
# Config-internal script exec out of this function, it does not return here. # Execute config strategy
set_configs set_configs
exec $CMD $ARGS exec $CMD $ARGS

View File

@ -8,5 +8,3 @@ RUN apt-get install -y --no-install-recommends \
python-nova \ python-nova \
bridge-utils \ bridge-utils \
&& apt-get clean && apt-get clean
COPY config-nova.sh /opt/kolla/

View File

@ -1 +0,0 @@
../../../common/nova/nova-base/config-nova.sh

View File

@ -435,41 +435,19 @@ In order for each service to function, there is a minimum set of required variab
# Nova-api # Nova-api
ADMIN_TENANT_NAME None
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
# Nova-base # Nova-base
DEBUG_LOGGING None
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
# Nova-compute # Nova-compute
NOVA_NOVNC_BASE_ADDRESS None
NOVA_NOVNC_PROXY_PORT
NOVA_VNCSERVER_PROXYCLIENT_ADDRESS
# Nova-conductor # Nova-conductor
INIT_NOVA_DB None
NOVA_DB_NAME
NOVA_DB_PASSWORD
NOVA_DB_USER
# Nova-consoleauth # Nova-consoleauth
@ -485,16 +463,11 @@ In order for each service to function, there is a minimum set of required variab
# Nova-novncproxy # Nova-novncproxy
NOVA_NOVNC_BASE_ADDRESS None
NOVA_NOVNC_PROXY_PORT
NOVA_NOVNC_PROXY_SERVICE_HOST
NOVA_VNCSERVER_LISTEN_ADDRESS
NOVA_VNCSERVER_PROXYCLIENT_ADDRESS
PUBLIC_IP
# Nova-scheduler # Nova-scheduler
NOVA_DB_NAME None
# Ovs-base # Ovs-base