Make vagrant bootstrap scripts args more obvious
Also add missing curly braces around variables. TrivialFix Change-Id: I8798ec52d9ddf76ad1f3debdf087ed4f51defc38
This commit is contained in:
parent
b647535e33
commit
70074abd07
@ -3,10 +3,14 @@
|
|||||||
# Bootstrap script to configure all nodes.
|
# Bootstrap script to configure all nodes.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
VM=$1
|
||||||
|
MODE=$2
|
||||||
|
KOLLA_PATH=$3
|
||||||
|
|
||||||
export http_proxy=
|
export http_proxy=
|
||||||
export https_proxy=
|
export https_proxy=
|
||||||
|
|
||||||
if [ $2 = 'aio' ]; then
|
if [ "$MODE" = 'aio' ]; then
|
||||||
# Run registry on port 4000 since it may collide with keystone when doing AIO
|
# Run registry on port 4000 since it may collide with keystone when doing AIO
|
||||||
REGISTRY_PORT=4000
|
REGISTRY_PORT=4000
|
||||||
SUPPORT_NODE=operator
|
SUPPORT_NODE=operator
|
||||||
@ -123,7 +127,7 @@ EOF
|
|||||||
docker run -d \
|
docker run -d \
|
||||||
--name registry \
|
--name registry \
|
||||||
--restart=always \
|
--restart=always \
|
||||||
-p $REGISTRY_PORT:5000 \
|
-p ${REGISTRY_PORT}:5000 \
|
||||||
-e STANDALONE=True \
|
-e STANDALONE=True \
|
||||||
-e MIRROR_SOURCE=https://registry-1.docker.io \
|
-e MIRROR_SOURCE=https://registry-1.docker.io \
|
||||||
-e MIRROR_SOURCE_INDEX=https://index.docker.io \
|
-e MIRROR_SOURCE_INDEX=https://index.docker.io \
|
||||||
@ -136,6 +140,6 @@ EOF
|
|||||||
prep_work
|
prep_work
|
||||||
install_docker
|
install_docker
|
||||||
|
|
||||||
if [ "$1" = "operator" ]; then
|
if [ "$VM" = "operator" ]; then
|
||||||
configure_operator
|
configure_operator
|
||||||
fi
|
fi
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
kolla_path=$3
|
VM=$1
|
||||||
registry=operator.local
|
MODE=$2
|
||||||
registry_port=4000
|
KOLLA_PATH=$3
|
||||||
|
|
||||||
|
REGISTRY=operator.local
|
||||||
|
REGISTRY_PORT=4000
|
||||||
|
|
||||||
install_ansible() {
|
install_ansible() {
|
||||||
echo "Installing Ansible"
|
echo "Installing Ansible"
|
||||||
@ -25,7 +28,7 @@ install_docker() {
|
|||||||
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list
|
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y docker-engine=1.8.2*
|
apt-get install -y docker-engine=1.8.2*
|
||||||
sed -i -r "s,^[# ]*DOCKER_OPTS=.+$,DOCKER_OPTS=\"--insecure-registry $registry:$registry_port\"," /etc/default/docker
|
sed -i -r "s,^[# ]*DOCKER_OPTS=.+$,DOCKER_OPTS=\"--insecure-registry ${REGISTRY}:${REGISTRY_PORT}\"," /etc/default/docker
|
||||||
}
|
}
|
||||||
|
|
||||||
install_python_deps() {
|
install_python_deps() {
|
||||||
@ -47,7 +50,7 @@ create_registry() {
|
|||||||
docker run -d \
|
docker run -d \
|
||||||
--name registry \
|
--name registry \
|
||||||
--restart=always \
|
--restart=always \
|
||||||
-p 4000:5000 \
|
-p ${REGISTRY_PORT}:5000 \
|
||||||
-e STANDALONE=True \
|
-e STANDALONE=True \
|
||||||
-e MIRROR_SOURCE=https://registry-1.docker.io \
|
-e MIRROR_SOURCE=https://registry-1.docker.io \
|
||||||
-e MIRROR_SOURCE_INDEX=https://index.docker.io \
|
-e MIRROR_SOURCE_INDEX=https://index.docker.io \
|
||||||
@ -58,7 +61,7 @@ create_registry() {
|
|||||||
|
|
||||||
configure_kolla() {
|
configure_kolla() {
|
||||||
echo "Configuring Kolla"
|
echo "Configuring Kolla"
|
||||||
pip install -r $kolla_path/requirements.txt
|
pip install -r ${KOLLA_PATH}/requirements.txt
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Kernel version $(uname -r)"
|
echo "Kernel version $(uname -r)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user