Pull kolla images from tarballs.o.o
Pull images from tarballs.openstack.org site[0] when there is no Depends-On in current commit message. [0] http://tarballs.openstack.org/kolla/images/ Change-Id: I2e5d4d7ed6418624494121e0a530ec95fd045970
This commit is contained in:
parent
f4186d4bd7
commit
4fdac509c6
@ -72,6 +72,7 @@ keepalived_virtual_router_id: "${KEEPALIVED_VIRTUAL_ROUTER_ID}"
|
|||||||
docker_restart_policy: "never"
|
docker_restart_policy: "never"
|
||||||
# NOTE(Jeffrey4l): use different a docker namespace name in case it pull image from hub.docker.io when deplying
|
# NOTE(Jeffrey4l): use different a docker namespace name in case it pull image from hub.docker.io when deplying
|
||||||
docker_namespace: "lokolla"
|
docker_namespace: "lokolla"
|
||||||
|
docker_registry: "${PRIVATE_ADDRESS}:4000"
|
||||||
network_interface: "${PRIVATE_INTERFACE}"
|
network_interface: "${PRIVATE_INTERFACE}"
|
||||||
neutron_external_interface: "fake_interface"
|
neutron_external_interface: "fake_interface"
|
||||||
enable_horizon: "yes"
|
enable_horizon: "yes"
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
dest: /tmp/setup.sh
|
dest: /tmp/setup.sh
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
|
- name: Install wget package
|
||||||
|
package: name=wget
|
||||||
|
|
||||||
- hosts: all
|
- hosts: all
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ sudo service docker stop
|
|||||||
if [[ ${DISTRIB_CODENAME} == "trusty" ]]; then
|
if [[ ${DISTRIB_CODENAME} == "trusty" ]]; then
|
||||||
sudo apt-get -y install --no-install-recommends btrfs-tools
|
sudo apt-get -y install --no-install-recommends btrfs-tools
|
||||||
setup_disk
|
setup_disk
|
||||||
echo 'DOCKER_OPTS="-s btrfs"' | sudo tee /etc/default/docker
|
echo "DOCKER_OPTS=\"-s btrfs --insecure-registry $(cat /etc/nodepool/primary_node_private):4000\"" | sudo tee /etc/default/docker
|
||||||
sudo mount --make-shared /run
|
sudo mount --make-shared /run
|
||||||
sudo service docker start
|
sudo service docker start
|
||||||
else
|
else
|
||||||
@ -71,7 +71,7 @@ else
|
|||||||
sudo tee /etc/systemd/system/docker.service.d/kolla.conf << EOF
|
sudo tee /etc/systemd/system/docker.service.d/kolla.conf << EOF
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=/usr/bin/dockerd --storage-driver overlay2
|
ExecStart=/usr/bin/dockerd --storage-driver overlay2 --insecure-registry $(cat /etc/nodepool/primary_node_private):4000
|
||||||
MountFlags=shared
|
MountFlags=shared
|
||||||
EOF
|
EOF
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
|
@ -53,7 +53,7 @@ sudo mkdir /etc/systemd/system/docker.service.d
|
|||||||
sudo tee /etc/systemd/system/docker.service.d/kolla.conf << EOF
|
sudo tee /etc/systemd/system/docker.service.d/kolla.conf << EOF
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=/usr/bin/dockerd --storage-driver btrfs
|
ExecStart=/usr/bin/dockerd --storage-driver btrfs --insecure-registry $(cat /etc/nodepool/primary_node_private):4000
|
||||||
MountFlags=shared
|
MountFlags=shared
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -32,12 +32,6 @@ EOF
|
|||||||
openstack/kolla openstack/requirements
|
openstack/kolla openstack/requirements
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_image {
|
|
||||||
pushd "${GIT_PROJECT_DIR}/kolla"
|
|
||||||
sudo tox -e "build-${BASE_DISTRO}-${INSTALL_TYPE}"
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
function setup_config {
|
function setup_config {
|
||||||
sudo cp -r etc/kolla /etc/
|
sudo cp -r etc/kolla /etc/
|
||||||
# Generate passwords
|
# Generate passwords
|
||||||
@ -66,6 +60,8 @@ namespace = lokolla
|
|||||||
base = ${BASE_DISTRO}
|
base = ${BASE_DISTRO}
|
||||||
install_type = ${INSTALL_TYPE}
|
install_type = ${INSTALL_TYPE}
|
||||||
profile = gate
|
profile = gate
|
||||||
|
registry = 127.0.0.1:4000
|
||||||
|
push = true
|
||||||
|
|
||||||
[profiles]
|
[profiles]
|
||||||
gate = cron,glance,haproxy,keepalived,keystone,kolla-toolbox,mariadb,memcached,neutron,nova,openvswitch,rabbitmq,heka,horizon
|
gate = cron,glance,haproxy,keepalived,keystone,kolla-toolbox,mariadb,memcached,neutron,nova,openvswitch,rabbitmq,heka,horizon
|
||||||
@ -177,6 +173,26 @@ function setup_logging {
|
|||||||
mkdir -p /tmp/logs/{ansible,build,kolla,kolla_configs,system_logs}
|
mkdir -p /tmp/logs/{ansible,build,kolla,kolla_configs,system_logs}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function prepare_images {
|
||||||
|
docker run -d -p 4000:5000 --restart=always -v /tmp/kolla_registry/:/var/lib/registry --name registry registry:2
|
||||||
|
|
||||||
|
# NOTE(Jeffrey4l): Zuul adds all changes depend on to ZUUL_CHANGES
|
||||||
|
# variable. if find "openstack/kolla:" string, it means this patch depends
|
||||||
|
# on one of Kolla patch. Then build image by using Kolla's code.
|
||||||
|
# Otherwise, pull images from tarballs.openstack.org site.
|
||||||
|
if echo "$ZUUL_CHANGES" | grep -q -i "openstack/kolla:"; then
|
||||||
|
pushd "${GIT_PROJECT_DIR}/kolla"
|
||||||
|
sudo tox -e "build-${BASE_DISTRO}-${INSTALL_TYPE}"
|
||||||
|
popd
|
||||||
|
else
|
||||||
|
BRANCH=$(echo "$ZUUL_BRANCH" | cut -d/ -f2)
|
||||||
|
filename=${BASE_DISTRO}-${INSTALL_TYPE}-registry-${BRANCH}.tar.gz
|
||||||
|
wget -q -c -O "/tmp/$filename" \
|
||||||
|
"http://tarballs.openstack.org/kolla/images/$filename"
|
||||||
|
sudo tar xzf "/tmp/$filename" -C /tmp/kolla_registry
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
setup_logging
|
setup_logging
|
||||||
tools/dump_info.sh
|
tools/dump_info.sh
|
||||||
clone_repos
|
clone_repos
|
||||||
@ -185,7 +201,7 @@ setup_ssh
|
|||||||
setup_ansible
|
setup_ansible
|
||||||
setup_node
|
setup_node
|
||||||
setup_config
|
setup_config
|
||||||
build_image
|
prepare_images
|
||||||
|
|
||||||
sudo tools/deploy_aio.sh "${BASE_DISTRO}" "${INSTALL_TYPE}"
|
sudo tools/deploy_aio.sh "${BASE_DISTRO}" "${INSTALL_TYPE}"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user