This simplifies the stand-up of a sandbox:
Only 2 main Vagrant calls are now needed (`vagrant up` and `vagrant up machine1`). This PR only updates the Vagrant Virtualbox setup. The Vagrant Libvirt and Terraform still need to be updated. This uses docker-compose as the entry point for standing up the stack and makes the stand-up of the sandbox more portal. Vagrant and Terraform are only responsible for standing up infrastructure and then running docker-compose, not for running any glue scripts. The docker-compose calls out to single-shot services to do all the glue required to get the fully functional Tinkerbell stack up and running. All the single-shot services are idempotent. This increases portability and the development iteration loop. This also simplifies the required steps needed to get a fully functioning sandbox up and running. This is intended to help people looking to get started by getting them to a provisioned machine quicker and more easily. Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
This commit is contained in:
4
deploy/compose/registry/registry_images.txt
Normal file
4
deploy/compose/registry/registry_images.txt
Normal file
@ -0,0 +1,4 @@
|
||||
quay.io/tinkerbell/tink-worker:latest
|
||||
quay.io/tinkerbell-actions/image2disk:v1.0.0
|
||||
quay.io/tinkerbell-actions/cexec:v1.0.0
|
||||
quay.io/tinkerbell-actions/writefile:v1.0.0
|
19
deploy/compose/registry/upload.sh
Executable file
19
deploy/compose/registry/upload.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2001,SC2155,SC2046
|
||||
|
||||
set -xo pipefail
|
||||
|
||||
main() {
|
||||
local reg_user="$1"
|
||||
local reg_pw="$2"
|
||||
local reg_url="$3"
|
||||
local images_file="$4"
|
||||
# this confusing IFS= and the || is to capture the last line of the file if there is no newline at the end
|
||||
while IFS= read -r img || [ -n "${img}" ]; do
|
||||
# trim trailing whitespace
|
||||
local imgr="$(echo "${img}" | sed 's/ *$//g')"
|
||||
skopeo copy --all --dest-tls-verify=false --dest-creds="${reg_user}":"${reg_pw}" docker://"${imgr}" docker://"${reg_url}"/$(basename "${imgr}")
|
||||
done <"${images_file}"
|
||||
}
|
||||
|
||||
main "$1" "$2" "$3" "$4"
|
Reference in New Issue
Block a user