Closed vielmetti closed 2 years ago
@vielmetti , boots
runs in a docker container
and while starting a container with boots image
we take care of all the environment variables which are required to run the boots binary. Please refer docker-compose.yml
file in tink
repo to know all the envs
which are required to run boots docker image
.
@vielmetti @parauliya Considering the scenario where a user may not want to use Docker for the whole provisioned setup, I think it would be nice to have a list of all the environment variables.
We can have a list of environment variables required for each application to be ready, in the README. And, it would be nice if we can briefly mention what each is required for.
I ran into this too when testing this morning.
Maybe this requirement changed after the README was written? I'd suggest giving a sample that works in the README, even if the context for the env-var choices are written up somewhere else.
@parauliya the documentation doesn't mention a Docker container, so my understanding from the README is that it should run outside, otherwise the README should prefix the instructions with docker run golang:latest
or similar before having us install git-lfs.
@nathangoulding do you see a path for usage inside and outside of the container, or should users only use compose?
I tried copying the instructions from https://github.com/tinkerbell/boots/blob/9d6cded511d1e7678ec601a29aac4137f25ecb5a/installers/rancher/main_test.go, but got as far as:
ROLLBAR_DISABLE=1 API_AUTH_TOKEN=token API_CONSUMER_TOKEN=test1234 PACKET_VERSION=0 PACKET_VERSION=0 PACKET_ENV=test ROLLBAR_TOKEN=1 ./boots
{"level":"info","ts":1586167193.6481194,"caller":"boots/main.go:54","msg":"starting","service":"github.com/tinkerbell/boots","pkg":"main","version":"unknown (use make)"}
{"level":"error","ts":1586167193.6482196,"caller":"boots/main.go:58","msg":"FACILITY_CODE env must be set","service":"github.com/tinkerbell/boots","pkg":"main","error":"FACILITY_CODE env must be set","errorVerbose":"FACILITY_CODE env must be set\ngithub.com/tinkerbell/boots/packet.NewClient\n\t/home/alex/go/src/github.com/tinkerbell/boots/packet/client.go:42\nmain.main\n\t/home/alex/go/src/github.com/tinkerbell/boots/main.go:56\nruntime.main\n\t/usr/lib/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/lib/go/src/runtime/asm_amd64.s:1373"}
panic: FACILITY_CODE env must be set
goroutine 1 [running]:
github.com/packethost/pkg/log.Logger.Fatal(0xa96141, 0x1b, 0xc000010058, 0xc00011e9e0, 0xb62700, 0xc00000e820, 0x0, 0x0, 0x0)
/home/alex/go/pkg/mod/github.com/packethost/pkg@v0.0.0-20190715213007-7c3a64b4b5e3/log/log.go:119 +0xe4
main.main()
/home/alex/go/src/github.com/tinkerbell/boots/main.go:58 +0x954
[alex@nuc boots]$ FACILITY_CODE=test ROLLBAR_DISABLE=1 API_AUTH_TOKEN=token API_CONSUMER_TOKEN=test1234 PACKET_VERSION=0 PACKET_VERSION=0 PACKET_ENV=test ROLLBAR_TOKEN=1 ./boots
panic: looking up ip of mirror url: lookup install.test.packet.net on 8.8.8.8:53: no such host
goroutine 1 [running]:
github.com/tinkerbell/boots/env.mustFindMirrorIPBase(0xc000150880, 0xc000028380)
/home/alex/go/src/github.com/tinkerbell/boots/env/mirror.go:85 +0x20a
github.com/tinkerbell/boots/env.init()
/home/alex/go/src/github.com/tinkerbell/boots/env/mirror.go:23 +0x2b8
@alexellis The puzzling thing to me is the information about what should be used as the "facility code" - that appears in the current code to resolve to a hard-coded lookup to a install.$(FACILITY_CODE).packet.net
address, but for on-prem or homelab install there would need to be a change to that mirror url
.
Perhaps we are now going outside of the happy path?
We should remove this restriction.
Closing this as the original issue is no longer present (ROLLBAR_TOKEN
is not required).
https://github.com/tinkerbell/boots/blob/65d8c38/cmd/boots/main.go#L67-L78
Please open additional issues and refer back to this issue if other problems expressed in this thread need to be resolved.
Successful build on Ubuntu 18.04 for aarch64 under WSL, but when I follow the instructions in the README I get this: