From c7b74f17033e0b0a58196c63dfdde91f7bfe5c48 Mon Sep 17 00:00:00 2001 From: Jacob Weinstock Date: Sun, 23 Oct 2022 02:27:41 +0000 Subject: [PATCH] Updates for vagrant with virtualbox: Fixes issues caused by the reorg. Signed-off-by: Jacob Weinstock --- .gitignore | 1 + deploy/infrastructure/vagrant/.env | 4 ++-- deploy/infrastructure/vagrant/Vagrantfile | 2 +- deploy/stack/compose/postgres/.env | 27 +++++++++++++++++++++++ deploy/stack/compose/setup.sh | 2 +- 5 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 deploy/stack/compose/postgres/.env diff --git a/.gitignore b/.gitignore index 0057644d..c61d096d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ !deploy/stack/compose/postgres/state/webroot/workflow/.keep !deploy/infrastructure/vagrant/.env !deploy/stack/compose/.env +!deploy/stack/compose/postgres/.env !.gitignore !.github/ diff --git a/deploy/infrastructure/vagrant/.env b/deploy/infrastructure/vagrant/.env index ad5b2372..d31b8e09 100644 --- a/deploy/infrastructure/vagrant/.env +++ b/deploy/infrastructure/vagrant/.env @@ -5,7 +5,7 @@ MACHINE1_IP=192.168.56.43 MACHINE1_MAC=08:00:27:9e:f5:3a #USE_POSTGRES=true -USE_POSTGRES= +USE_POSTGRES=true # USE_HELM=true -USE_HELM=true +USE_HELM= diff --git a/deploy/infrastructure/vagrant/Vagrantfile b/deploy/infrastructure/vagrant/Vagrantfile index 0c018540..b147f4d0 100644 --- a/deploy/infrastructure/vagrant/Vagrantfile +++ b/deploy/infrastructure/vagrant/Vagrantfile @@ -53,7 +53,7 @@ Vagrant.configure("2") do |config| end if USE_POSTGRES == "true" - DEST_DIR = DEST_DIR_BASE + "postgres/" + DEST_DIR = DEST_DIR_BASE + STACK_OPT + "postgres" end provisioner.vm.provision :shell, path: STACK_DIR + "/setup.sh", args: [PROVISIONER_IP, MACHINE1_IP, MACHINE1_MAC, DEST_DIR, LOADBALANCER_IP] end diff --git a/deploy/stack/compose/postgres/.env b/deploy/stack/compose/postgres/.env new file mode 100644 index 00000000..d9cb2280 --- /dev/null +++ b/deploy/stack/compose/postgres/.env @@ -0,0 +1,27 @@ +# These must be defined above/before first use. +# Use of these variables *must* be in ${} form, otherwise docker-compose won't substitute when processing this file +vOSIE=v0.7.0 +vTINK=sha-16186501 + +# Probably don't want to mess with these, unless you know you do +FACILITY=onprem +TINKERBELL_REGISTRY_PASSWORD=Admin1234 +TINKERBELL_REGISTRY_USERNAME=admin +TINKERBELL_TLS= false + +# Can be set to your own hook builds +OSIE_DOWNLOAD_URLS=https://github.com/tinkerbell/hook/releases/download/${vOSIE}/hook_x86_64.tar.gz,https://github.com/tinkerbell/hook/releases/download/${vOSIE}/hook_aarch64.tar.gz + +TINKERBELL_HARDWARE_MANIFEST=/manifests/hardware/hardware.json +TINKERBELL_TEMPLATE_MANIFEST=/manifests/template/ubuntu.yaml + +TINKERBELL_CLIENT_IP=192.168.56.43 +TINKERBELL_CLIENT_MAC=08:00:27:9e:f5:3a +TINKERBELL_HOST_IP=192.168.56.4 + +# Images used by docker-compose natively or in terraform/vagrant, update if necessary +BOOTS_IMAGE=quay.io/tinkerbell/boots:sha-505785d7 +HEGEL_IMAGE=quay.io/tinkerbell/hegel:sha-592588cf +TINK_CLI_IMAGE=quay.io/tinkerbell/tink-cli:${vTINK} +TINK_SERVER_IMAGE=quay.io/tinkerbell/tink:${vTINK} +TINK_WORKER_IMAGE=quay.io/tinkerbell/tink-worker:${vTINK} diff --git a/deploy/stack/compose/setup.sh b/deploy/stack/compose/setup.sh index cd13c709..10da7c1e 100755 --- a/deploy/stack/compose/setup.sh +++ b/deploy/stack/compose/setup.sh @@ -102,7 +102,7 @@ main() { # setup_layer2_network "$host_ip" setup_compose_env_overrides "$host_ip" "$worker_ip" "$worker_mac" "$compose_dir" - docker compose -f "$compose_dir"/docker-compose.yml up -d + docker compose --env-file "$compose_dir"/.env -f "$compose_dir"/docker-compose.yml up -d create_tink_helper_script "$compose_dir" tweak_bash_interactive_settings "$compose_dir"