Single place for all the tink stack version (#15)

Tinkerbell is made of different components as we all know at this point.

Sandbox had those versions all over the places. This PR moves them as
part of the `envrc` file.

As it is today this PR requires an additional flag for the `docker-compose` command as described here #6
This commit is contained in:
mergify[bot] 2020-09-28 16:41:51 +00:00 committed by GitHub
commit 24f9c82ea4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 14 deletions

View File

@ -1,7 +1,7 @@
version: "2.1" version: "2.1"
services: services:
tink-server: tink-server:
image: quay.io/tinkerbell/tink:sha-adb49da image: ${TINKERBELL_TINK_SERVER_IMAGE}
restart: unless-stopped restart: unless-stopped
environment: environment:
FACILITY: ${FACILITY:-onprem} FACILITY: ${FACILITY:-onprem}
@ -52,7 +52,7 @@ services:
retries: 30 retries: 30
tink-cli: tink-cli:
image: quay.io/tinkerbell/tink-cli:sha-adb49da image: ${TINKERBELL_TINK_CLI_IMAGE}
restart: unless-stopped restart: unless-stopped
environment: environment:
TINKERBELL_GRPC_AUTHORITY: 127.0.0.1:42113 TINKERBELL_GRPC_AUTHORITY: 127.0.0.1:42113
@ -89,7 +89,7 @@ services:
network_mode: host network_mode: host
boots: boots:
image: quay.io/tinkerbell/boots:327-58ab49913b5498908b16e2607d265a61a05f73b6 image: ${TINKERBELL_TINK_BOOTS_IMAGE}
restart: unless-stopped restart: unless-stopped
network_mode: host network_mode: host
command: -dhcp-addr 0.0.0.0:67 -tftp-addr $TINKERBELL_HOST_IP:69 -http-addr $TINKERBELL_HOST_IP:80 -log-level DEBUG command: -dhcp-addr 0.0.0.0:67 -tftp-addr $TINKERBELL_HOST_IP:69 -http-addr $TINKERBELL_HOST_IP:80 -log-level DEBUG
@ -133,7 +133,7 @@ services:
- ./state/webroot:/usr/share/nginx/html/ - ./state/webroot:/usr/share/nginx/html/
hegel: hegel:
image: quay.io/tinkerbell/hegel:196-fa897aa020769db8becb9be29adaeb6be92a7fc7 image: ${TINKERBELL_TINK_HEGEL_IMAGE}
restart: unless-stopped restart: unless-stopped
network_mode: host network_mode: host
environment: environment:

View File

@ -80,12 +80,12 @@ main() (
sudo apt-get install -y jq sudo apt-get install -y jq
fi fi
if [ ! -f ./envrc ]; then if [ ! -f ./.env ]; then
./generate-envrc.sh eth1 >envrc ./generate-envrc.sh eth1 > .env
fi fi
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. ./envrc . ./.env
make_certs_writable make_certs_writable

View File

@ -52,6 +52,15 @@ generate_envrc() (
local registry_password local registry_password
registry_password=$(generate_password) registry_password=$(generate_password)
cat <<EOF cat <<EOF
# Tinkerbell Stack version
export OSIE_DOWNLOAD_LINK=https://tinkerbell-oss.s3.amazonaws.com/osie-uploads/osie-v0-n=252,c=bc454bc,b=master.tar.gz
export TINKERBELL_TINK_SERVER_IMAGE=quay.io/tinkerbell/tink:sha-adb49da
export TINKERBELL_TINK_CLI_IMAGE=quay.io/tinkerbell/tink-cli:sha-adb49da
export TINKERBELL_TINK_BOOTS_IMAGE=quay.io/tinkerbell/boots:327-58ab49913b5498908b16e2607d265a61a05f73b6
export TINKERBELL_TINK_HEGEL_IMAGE=quay.io/tinkerbell/hegel:196-fa897aa020769db8becb9be29adaeb6be92a7fc7
export TINKERBELL_TINK_WORKER_IMAGE=quay.io/tinkerbell/tink-worker:sha-adb49da
# Network interface for Tinkerbell's network # Network interface for Tinkerbell's network
export TINKERBELL_NETWORK_INTERFACE="$tink_interface" export TINKERBELL_NETWORK_INTERFACE="$tink_interface"
@ -82,14 +91,12 @@ export TINKERBELL_REGISTRY_PASSWORD="$registry_password"
export FACILITY=onprem export FACILITY=onprem
export ROLLBAR_TOKEN=ignored export ROLLBAR_TOKEN=ignored
export ROLLBAR_DISABLE=1 export ROLLBAR_DISABLE=1
export OSIE_DOWNLOAD_LINK=https://tinkerbell-oss.s3.amazonaws.com/osie-uploads/osie-v0-n=252,c=bc454bc,b=master.tar.gz
EOF EOF
) )
main() ( main() (
if [ -z "${1:-}" ]; then if [ -z "${1:-}" ]; then
err "Usage: $0 network-interface-name > envrc" err "Usage: $0 network-interface-name > .env"
exit 1 exit 1
fi fi

View File

@ -8,7 +8,7 @@ set -eu
# See https://tinkerbell.org/setup for the installation steps. # See https://tinkerbell.org/setup for the installation steps.
# file to hold all environment variables # file to hold all environment variables
ENV_FILE=envrc ENV_FILE=.env
SCRATCH=$(mktemp -d -t tmp.XXXXXXXXXX) SCRATCH=$(mktemp -d -t tmp.XXXXXXXXXX)
readonly SCRATCH readonly SCRATCH
@ -407,7 +407,7 @@ bootstrap_docker_registry() (
# osie looks for tink-worker:latest, so we have to play with it a bit # osie looks for tink-worker:latest, so we have to play with it a bit
# https://github.com/tinkerbell/osie/blob/master/apps/workflow-helper.sh#L66 # https://github.com/tinkerbell/osie/blob/master/apps/workflow-helper.sh#L66
docker_mirror_image "quay.io/tinkerbell/tink-worker:sha-adb49da" "${TINKERBELL_HOST_IP}/tink-worker:latest" docker_mirror_image "${TINKERBELL_TINK_WORKER_IMAGE}" "${TINKERBELL_HOST_IP}/tink-worker:latest"
) )
setup_docker_registry() ( setup_docker_registry() (
@ -482,7 +482,7 @@ check_prerequisites() (
) )
whats_next() ( whats_next() (
echo "$NEXT 1. Enter /vagrant/deploy and run: source ../envrc; docker-compose up -d" echo "$NEXT 1. Enter /vagrant/deploy and run: source ../.env; docker-compose up -d"
echo "$BLANK 2. Try executing your fist workflow." echo "$BLANK 2. Try executing your fist workflow."
echo "$BLANK Follow the steps described in https://tinkerbell.org/examples/hello-world/ to say 'Hello World!' with a workflow." echo "$BLANK Follow the steps described in https://tinkerbell.org/examples/hello-world/ to say 'Hello World!' with a workflow."
) )

View File

@ -35,7 +35,7 @@ func TestVagrantSetupGuide(t *testing.T) {
} }
}() }()
_, err = machine.Exec(ctx, "cd /vagrant/deploy && source ../envrc && docker-compose up -d") _, err = machine.Exec(ctx, "cd /vagrant/deploy && source ../.env && docker-compose up -d")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }