aboutsummaryrefslogtreecommitdiff
path: root/docker/centos
diff options
context:
space:
mode:
Diffstat (limited to 'docker/centos')
-rw-r--r--docker/centos/binary/base/Dockerfile (renamed from docker/centos/binary/centos-binary-base/Dockerfile)0
l---------docker/centos/binary/base/build (renamed from docker/centos/binary/centos-binary-base/build)0
l---------[-rw-r--r--]docker/centos/binary/base/kolla-common.sh171
l---------[-rwxr-xr-x]docker/centos/binary/base/service_hosts.sh46
-rw-r--r--docker/centos/binary/centos-binary-base/.buildconf1
l---------docker/centos/binary/centos-binary-base/kolla-common.sh1
l---------docker/centos/binary/centos-binary-base/service_hosts.sh1
l---------docker/centos/binary/centos-rdo-base1
-rw-r--r--docker/centos/binary/fedora-binary-base/.buildconf1
-rw-r--r--docker/centos/binary/fedora-binary-base/Dockerfile109
l---------docker/centos/binary/fedora-binary-base/build1
l---------docker/centos/binary/fedora-binary-base/kolla-common.sh1
l---------docker/centos/binary/fedora-binary-base/service_hosts.sh1
l---------docker/centos/binary/fedora-rdo-base1
-rw-r--r--docker/centos/binary/rhel-osp-base/Dockerfile92
l---------docker/centos/binary/rhel-osp-base/build1
16 files changed, 2 insertions, 426 deletions
diff --git a/docker/centos/binary/centos-binary-base/Dockerfile b/docker/centos/binary/base/Dockerfile
index c929d7a55..c929d7a55 100644
--- a/docker/centos/binary/centos-binary-base/Dockerfile
+++ b/docker/centos/binary/base/Dockerfile
diff --git a/docker/centos/binary/centos-binary-base/build b/docker/centos/binary/base/build
index 8d652f7ee..8d652f7ee 120000
--- a/docker/centos/binary/centos-binary-base/build
+++ b/docker/centos/binary/base/build
diff --git a/docker/centos/binary/base/kolla-common.sh b/docker/centos/binary/base/kolla-common.sh
index 8c2ef5ec1..380efbc3d 100644..120000
--- a/docker/centos/binary/base/kolla-common.sh
+++ b/docker/centos/binary/base/kolla-common.sh
@@ -1,170 +1 @@
-#!/bin/bash
-
-. /opt/kolla/service_hosts.sh
-
-# Set some generally useful defaults.
-MY_IP=$(ip route get $(ip route | awk '$1 == "default" {print $3}') |
- awk '$4 == "src" {print $5}')
-
-: ${PUBLIC_IP:=${MY_IP}}
-
-# Iterate over a list of variable names and exit if one is
-# undefined.
-check_required_vars() {
- for var in $*; do
- if [ -z "${!var}" ]; then
- echo "ERROR: missing $var" >&2
- exit 1
- fi
- done
-}
-
-# The usage of the wait_for function looks like the following
-# wait_for LOOPS_NUMBER SLEEP_TIME ARGS
-#
-# The ARGS are read and concatenated together into a single command and the
-# command is executed in a loop until it succeeds or reaches the max number of
-# attempts (LOOPS_NUMBER).
-#
-# Optional variables SUCCESSFUL_MATCH_OUTPUT and FAIL_MATCH_OUTPUT variable may
-# also be set to control if the loop exits early if the commands stdout/stderr
-# matches the supplied regex string. Consider using the `wait_for_output` and
-# `wait_for_output_unless` functions in case there is a need to check for the
-# command output.
-#
-# The script exits on failure, either when output contains string identified as
-# failure, or when it reaches a timeout.
-#
-# Examples:
-# wait_for 30 10 ping -c 1 192.0.2.2
-# wait_for 10 1 ls file_we_are_waiting_for
-# wait_for 10 3 date \| grep 8
-wait_for() {
- local loops=${1:-""}
- local sleeptime=${2:-""}
- FAIL_MATCH_OUTPUT=${FAIL_MATCH_OUTPUT:-""}
- SUCCESSFUL_MATCH_OUTPUT=${SUCCESSFUL_MATCH_OUTPUT:-""}
- shift 2 || true
- local command="$@"
-
- if [ -z "$loops" -o -z "$sleeptime" -o -z "$command" ]; then
- echo "wait_for is missing a required parameter"
- exit 1
- fi
-
- local i=0
- while [ $i -lt $loops ]; do
- i=$((i + 1))
- local status=0
- local output=$(eval $command 2>&1) || status=$?
- if [[ -n "$SUCCESSFUL_MATCH_OUTPUT" ]] \
- && [[ $output =~ $SUCCESSFUL_MATCH_OUTPUT ]]; then
- return 0
- elif [[ -n "$FAIL_MATCH_OUTPUT" ]] \
- && [[ $output =~ $FAIL_MATCH_OUTPUT ]]; then
- echo "Command output matched '$FAIL_MATCH_OUTPUT'."
- exit 1
- elif [[ -z "$SUCCESSFUL_MATCH_OUTPUT" ]] && [[ $status -eq 0 ]]; then
- return 0
- fi
- sleep $sleeptime
- done
- local seconds=$((loops * sleeptime))
- printf 'Timing out after %d seconds:\ncommand=%s\nOUTPUT=%s\n' \
- "$seconds" "$command" "$output"
- exit 1
-}
-
-# Helper function to `wait_for` that only succeeds when the given regex is
-# matching the command's output. Exit early with a failure when the second
-# supplied regexp is matching the output.
-#
-# Example:
-# wait_for_output_unless CREATE_COMPLETE CREATE_FAIL 30 10 heat stack-show undercloud
-wait_for_output_unless() {
- SUCCESSFUL_MATCH_OUTPUT=$1
- FAIL_MATCH_OUTPUT=$2
- shift 2
- wait_for $@
- local status=$?
- unset SUCCESSFUL_MATCH_OUTPUT
- unset FAIL_MATCH_OUTPUT
- return $status
-}
-
-# Helper function to `wait_for` that only succeeds when the given regex is
-# matching the command's output.
-#
-# Example:
-# wait_for_output CREATE_COMPLETE 30 10 heat stack-show undercloud
-wait_for_output() {
- local expected_output=$1
- shift
- wait_for_output_unless $expected_output '' $@
-}
-
-# Check if we receive a successful response from corresponding OpenStack
-# service endpoint.
-check_for_os_service_endpoint() {
- local name=$1
- local host_var=$2
- local port_var=$3
- local api_version=$4
-
- check_required_vars $host_var $port_var
-
- local endpoint="http://${!host_var}:${!port_var}/$api_version"
-
- curl -sf -o /dev/null "$endpoint" || {
- echo "ERROR: $name is not available @ $endpoint" >&2
- return 1
- }
-
- echo "$name is active @ $endpoint"
-}
-
-check_for_os_service_running() {
- local service=$1
- local args=
- case $service in
- ("glance") args="GLANCE_API_SERVICE_HOST GLANCE_API_SERVICE_PORT" ;;
- ("keystone") args="KEYSTONE_PUBLIC_SERVICE_HOST KEYSTONE_PUBLIC_SERVICE_PORT v2.0" ;;
- ("neutron") args="NEUTRON_SERVER_SERVICE_HOST NEUTRON_SERVER_SERVICE_PORT" ;;
- ("nova") args="NOVA_API_SERVICE_HOST NOVA_API_SERVICE_PORT" ;;
- (*)
- echo "Unknown service $service"
- return 1 ;;
- esac
- check_for_os_service_endpoint $service $args
-}
-
-fail_unless_os_service_running() {
- check_for_os_service_running $@ || exit $?
-}
-
-# Check if we receive a successful response from the database server.
-# Optionally takes a database name to check for. Defaults to 'mysql'.
-check_for_db() {
- local database=${1:-mysql}
- check_required_vars MARIADB_SERVICE_HOST DB_ROOT_PASSWORD
-
- mysql -h ${MARIADB_SERVICE_HOST} -u root -p"${DB_ROOT_PASSWORD}" \
- -e "select 1" $database > /dev/null 2>&1 || {
- echo "ERROR: database $database is not available @ $MARIADB_SERVICE_HOST" >&2
- return 1
- }
-
- echo "database is active @ ${MARIADB_SERVICE_HOST}"
-}
-
-fail_unless_db() {
- check_for_db $@ || exit $?
-}
-
-# Dump shell environment to a file
-dump_vars() {
- set -o posix
- set > /pid_$$_vars.sh
- set +o posix
-}
-
+../../../common/kolla-common.sh \ No newline at end of file
diff --git a/docker/centos/binary/base/service_hosts.sh b/docker/centos/binary/base/service_hosts.sh
index c3006f720..777b7334d 100755..120000
--- a/docker/centos/binary/base/service_hosts.sh
+++ b/docker/centos/binary/base/service_hosts.sh
@@ -1,45 +1 @@
-#!/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}
-
+../../../common/service_hosts.sh \ No newline at end of file
diff --git a/docker/centos/binary/centos-binary-base/.buildconf b/docker/centos/binary/centos-binary-base/.buildconf
deleted file mode 100644
index d552b0d1b..000000000
--- a/docker/centos/binary/centos-binary-base/.buildconf
+++ /dev/null
@@ -1 +0,0 @@
-PREFIX=
diff --git a/docker/centos/binary/centos-binary-base/kolla-common.sh b/docker/centos/binary/centos-binary-base/kolla-common.sh
deleted file mode 120000
index fcd13a80e..000000000
--- a/docker/centos/binary/centos-binary-base/kolla-common.sh
+++ /dev/null
@@ -1 +0,0 @@
-../base/kolla-common.sh \ No newline at end of file
diff --git a/docker/centos/binary/centos-binary-base/service_hosts.sh b/docker/centos/binary/centos-binary-base/service_hosts.sh
deleted file mode 120000
index c36eb4203..000000000
--- a/docker/centos/binary/centos-binary-base/service_hosts.sh
+++ /dev/null
@@ -1 +0,0 @@
-../base/service_hosts.sh \ No newline at end of file
diff --git a/docker/centos/binary/centos-rdo-base b/docker/centos/binary/centos-rdo-base
deleted file mode 120000
index f3b111231..000000000
--- a/docker/centos/binary/centos-rdo-base
+++ /dev/null
@@ -1 +0,0 @@
-centos-binary-base/ \ No newline at end of file
diff --git a/docker/centos/binary/fedora-binary-base/.buildconf b/docker/centos/binary/fedora-binary-base/.buildconf
deleted file mode 100644
index d552b0d1b..000000000
--- a/docker/centos/binary/fedora-binary-base/.buildconf
+++ /dev/null
@@ -1 +0,0 @@
-PREFIX=
diff --git a/docker/centos/binary/fedora-binary-base/Dockerfile b/docker/centos/binary/fedora-binary-base/Dockerfile
deleted file mode 100644
index 285e128e9..000000000
--- a/docker/centos/binary/fedora-binary-base/Dockerfile
+++ /dev/null
@@ -1,109 +0,0 @@
-FROM fedora:21
-MAINTAINER Kolla Project (https://launchpad.net/kolla)
-
-# Set up repositories
-RUN yum install -y https://rdo.fedorapeople.org/rdo-release.rpm
-RUN yum -y install dnf dnf-plugins-core && yum clean all
-RUN dnf copr enable -y sdake/crux
-RUN dnf copr enable -y sdake/pam.noaudit
-
-
-# Update packages
-RUN yum update -y && yum clean all
-
-# Install base packages
-RUN yum install -y \
- iproute \
- crux \
- mariadb \
- mariadb-libs \
- openssl \
- openstack-utils \
- pyparsing \
- python-alembic \
- python-amqp \
- python-amqplib \
- python-anyjson \
- python-boto \
- python-cheetah \
- python-cliff \
- python-cmd2 \
- python-croniter \
- python-crypto \
- python-d2to1 \
- python-docutils \
- python-dogpile-cache \
- python-dogpile-core \
- python-empy \
- python-eventlet \
- python-flask \
- python-futures \
- python-greenlet \
- python-httplib2 \
- python-iso8601 \
- python-itsdangerous \
- python-jinja2 \
- python-jsonpatch \
- python-jsonpath-rw \
- python-jsonpointer \
- python-jsonschema \
- python-keyring \
- python-kombu \
- python-ldap \
- python-lesscpy \
- python-lockfile \
- python-lxml \
- python-markdown \
- python-memcached \
- python-migrate \
- python-msgpack \
- python-netifaces \
- python-networkx \
- python-oauthlib \
- python-oslo-config \
- python-oslo-messaging \
- python-oslo-rootwrap \
- python-paramiko \
- python-passlib \
- python-paste-deploy \
- python-pbr \
- python-pecan \
- python-ply \
- python-prettytable \
- python-psutil \
- python-pycadf \
- python-pygments \
- python-pymongo \
- python-qpid \
- python-repoze-lru \
- python-requests \
- python-routes \
- python-simplegeneric \
- python-simplejson \
- python-singledispatch \
- python-six \
- python-sqlalchemy \
- python-stevedore \
- python-taskflow \
- python-versiontools \
- python-warlock \
- python-webob \
- python-websockify \
- python-webtest \
- python-werkzeug \
- python-wsme \
- && yum clean all
-
-# This is dirty like zebra. This works around a bug in Ubuntu 14.04 LTS. The
-# --net=host option does not work on ubuntu 14.04 because of a kernel bug. One
-# workaround is to build pam without authentication.
-# See:
-# https://registry.hub.docker.com/u/sequenceiq/pam/
-#
-RUN rpm -e --nodeps pam
-RUN yum -y install pam+noaudit && yum clean all
-# End dirty like zebra
-
-RUN mkdir -p /opt/kolla
-ADD service_hosts.sh /opt/kolla/service_hosts.sh
-ADD kolla-common.sh /opt/kolla/kolla-common.sh
diff --git a/docker/centos/binary/fedora-binary-base/build b/docker/centos/binary/fedora-binary-base/build
deleted file mode 120000
index 8d652f7ee..000000000
--- a/docker/centos/binary/fedora-binary-base/build
+++ /dev/null
@@ -1 +0,0 @@
-../../../../tools/build-docker-image \ No newline at end of file
diff --git a/docker/centos/binary/fedora-binary-base/kolla-common.sh b/docker/centos/binary/fedora-binary-base/kolla-common.sh
deleted file mode 120000
index fcd13a80e..000000000
--- a/docker/centos/binary/fedora-binary-base/kolla-common.sh
+++ /dev/null
@@ -1 +0,0 @@
-../base/kolla-common.sh \ No newline at end of file
diff --git a/docker/centos/binary/fedora-binary-base/service_hosts.sh b/docker/centos/binary/fedora-binary-base/service_hosts.sh
deleted file mode 120000
index c36eb4203..000000000
--- a/docker/centos/binary/fedora-binary-base/service_hosts.sh
+++ /dev/null
@@ -1 +0,0 @@
-../base/service_hosts.sh \ No newline at end of file
diff --git a/docker/centos/binary/fedora-rdo-base b/docker/centos/binary/fedora-rdo-base
deleted file mode 120000
index a9be4eebb..000000000
--- a/docker/centos/binary/fedora-rdo-base
+++ /dev/null
@@ -1 +0,0 @@
-fedora-binary-base \ No newline at end of file
diff --git a/docker/centos/binary/rhel-osp-base/Dockerfile b/docker/centos/binary/rhel-osp-base/Dockerfile
deleted file mode 100644
index 422875dd6..000000000
--- a/docker/centos/binary/rhel-osp-base/Dockerfile
+++ /dev/null
@@ -1,92 +0,0 @@
-FROM rhel7
-MAINTAINER Kolla Project (https://launchpad.net/kolla)
-
-RUN yum install -y \
- mariadb-libs \
- openstack-utils \
- pyparsing \
- python-alembic \
- python-amqp \
- python-amqplib \
- python-anyjson \
- python-boto \
- python-ceilometerclient \
- python-cheetah \
- python-cinderclient \
- python-cliff \
- python-cmd2 \
- python-croniter \
- python-crypto \
- python-d2to1 \
- python-docutils \
- python-dogpile-cache \
- python-dogpile-core \
- python-empy \
- python-eventlet \
- python-flask \
- python-futures \
- python-glanceclient \
- python-greenlet \
- python-heatclient \
- python-httplib2 \
- python-iso8601 \
- python-itsdangerous \
- python-jinja2 \
- python-jsonpatch \
- python-jsonpath-rw \
- python-jsonpointer \
- python-jsonschema \
- python-keyring \
- python-keystoneclient \
- python-kombu \
- python-lesscpy \
- python-lockfile \
- python-lxml \
- python-markdown \
- python-memcached \
- python-ldap \
- python-migrate \
- python-msgpack \
- python-netifaces \
- python-networkx \
- python-neutronclient \
- python-novaclient \
- python-oauthlib \
- python-openstackclient \
- python-oslo-config \
- python-oslo-messaging \
- python-oslo-rootwrap \
- python-oslo-vmware \
- python-paramiko \
- python-passlib \
- python-paste-deploy \
- python-pbr \
- python-pecan \
- python-ply \
- python-prettytable \
- python-psutil \
- python-pycadf \
- python-pygments \
- python-pymongo \
- python-qpid \
- python-repoze-lru \
- python-requests \
- python-routes \
- python-saharaclient \
- python-simplegeneric \
- python-simplejson \
- python-singledispatch \
- python-six \
- python-sqlalchemy \
- python-stevedore \
- python-swiftclient \
- python-taskflow \
- python-troveclient \
- python-versiontools \
- python-warlock \
- python-webob \
- python-websockify \
- python-webtest \
- python-werkzeug \
- python-wsme \
- && yum clean all
diff --git a/docker/centos/binary/rhel-osp-base/build b/docker/centos/binary/rhel-osp-base/build
deleted file mode 120000
index 8d652f7ee..000000000
--- a/docker/centos/binary/rhel-osp-base/build
+++ /dev/null
@@ -1 +0,0 @@
-../../../../tools/build-docker-image \ No newline at end of file