![Paul Bourke](/assets/img/avatar_default.png)
The only files in the docker image directories that differ majorly between distros are the Dockerfiles (e.g. different package manager mechanisms, different repo sources, etc). The supporting files such as the start.sh/check.sh and config files should largely stay the same between base images. This change moves these files up into a "common" directory, and symlinks them in the same way that the build script is managed. This means when adding a new base distro only new Dockerfiles need to be created. Also, if a distro does happen to require a vastly different start.sh script for example, one can choose to simply not symlink to the common and instead drop in a custom one. Implements: blueprint refactor-base-image-layout Change-Id: Ic4db69d31ff54a1fb95af4853a2e5ae490064284
46 lines
2.1 KiB
Bash
Executable File
46 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Kubernetes currently creates FOO_SERVICE_HOST and FOO_SERVICE_PORT env vars
|
|
# as part of starting the containers. However this is not done when starting
|
|
# them with plain docker. Defaulting variables to their common version if
|
|
# they're not already set allows the usage of --link in plain 'docker run' to
|
|
# wire together containers.
|
|
|
|
: ${BARBICAN_ADMIN_SERVICE_HOST:=$BARBICAN_ADMIN_PORT_9312_TCP_ADDR}
|
|
: ${BARBICAN_ADMIN_SERVICE_PORT:=9312}
|
|
: ${BARBICAN_PUBLIC_SERVICE_HOST:=$BARBICAN_PUBLIC_PORT_9311_TCP_ADDR}
|
|
: ${BARBICAN_PUBLIC_SERVICE_PORT:=9311}
|
|
: ${CEILOMETER_API_SERVICE_HOST:=$CEILOMETER_API_PORT_8777_TCP_ADDR}
|
|
: ${CEILOMETER_API_SERVICE_PORT:=8777}
|
|
: ${GLANCE_API_SERVICE_HOST:=$GLANCE_API_PORT_9292_TCP_ADDR}
|
|
: ${GLANCE_API_SERVICE_PORT:=9292}
|
|
: ${GLANCE_REGISTRY_SERVICE_HOST:=$GLANCE_REGISTRY_PORT_9191_TCP_ADDR}
|
|
: ${GLANCE_REGISTRY_SERVICE_PORT:=9191}
|
|
: ${HEAT_API_SERVICE_HOST:=$HEAT_API_PORT_8004_TCP_ADDR}
|
|
: ${HEAT_API_SERVICE_PORT:=8004}
|
|
: ${HORIZON_SERVICE_HOST:=$HORIZON_PORT_80_TCP_ADDR}
|
|
: ${HORIZON_SERVICE_PORT:=80}
|
|
: ${KEYSTONE_ADMIN_SERVICE_HOST:=$KEYSTONE_PORT_35357_TCP_ADDR}
|
|
: ${KEYSTONE_ADMIN_SERVICE_PORT:=35357}
|
|
: ${KEYSTONE_PUBLIC_SERVICE_HOST:=$KEYSTONE_PORT_5000_TCP_ADDR}
|
|
: ${KEYSTONE_PUBLIC_SERVICE_PORT:=5000}
|
|
: ${MARIADB_SERVICE_HOST:=$MARIADB_PORT_3306_TCP_ADDR}
|
|
: ${MARIADB_SERVICE_PORT:=3306}
|
|
: ${MONGODB_SERVICE_HOST:=$MONGODB_PORT_27017_TCP_ADDR}
|
|
: ${MONGODB_SERVICE_PORT:=27017}
|
|
: ${NEUTRON_SERVER_SERVICE_HOST:=$NEUTRON_SERVER_PORT_9696_TCP_ADDR}
|
|
: ${NEUTRON_SERVER_SERVICE_PORT:=9696}
|
|
: ${NOVA_API_SERVICE_HOST:=$NOVA_API_PORT_8774_TCP_ADDR}
|
|
: ${NOVA_API_SERVICE_PORT:=8774}
|
|
: ${NOVA_EC2_API_SERVICE_HOST:=$NOVA_EC2_API_PORT_8773_TCP_ADDR}
|
|
: ${NOVA_EC2_API_SERVICE_PORT:=8773}
|
|
: ${NOVA_LIBVIRT_SERVICE_HOST:=$NOVA_LIBVIRT_PORT_16509_TCP_ADDR}
|
|
: ${NOVA_LIBVIRT_SERVICE_PORT:=16509}
|
|
: ${NOVA_METADATA_API_SERVICE_HOST:=$NOVA_METADATA_API_PORT_8775_TCP_ADDR}
|
|
: ${NOVA_METADATA_API_SERVICE_PORT:=8775}
|
|
: ${RABBITMQ_SERVICE_HOST:=$RABBITMQ_PORT_5672_TCP_ADDR}
|
|
: ${RABBITMQ_SERVICE_PORT:=5672}
|
|
: ${ZAQAR_SERVER_SERVICE_HOST:=$ZAQAR_SERVER_PORT_8888_TCP_ADDR}
|
|
: ${ZAQAR_SERVER_SERVICE_PORT:=8888}
|
|
|