Compare commits
53 Commits
feat/new-b
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
232cf793d9 | ||
|
f3bc190943 | ||
|
232544f863 | ||
|
1ebcf482de | ||
|
7182ca0811 | ||
|
1760df0caf | ||
|
9bea6a01df | ||
|
4add7eef56 | ||
|
7e2296df94 | ||
|
ffbb92909b | ||
|
549e540671 | ||
|
4a59c96463 | ||
|
51777df36c | ||
|
5eceec91ed | ||
|
8e5430bfd1 | ||
|
0fff3e6d7f | ||
|
b8d94f5278 | ||
|
88bf5771ea | ||
|
28a236376f | ||
|
c40086d221 | ||
|
712f3eb38a | ||
|
661855eb26 | ||
|
4243501dca | ||
|
3fc23c58eb | ||
|
4d13239d77 | ||
|
5347fe6da7 | ||
|
89e49554be | ||
|
cc5e0be668 | ||
|
edd0d06b93 | ||
|
cfb1781a69 | ||
|
7d878a8e8e | ||
|
b52a90b666 | ||
|
4a76489a3e | ||
|
be228ba9f2 | ||
|
6c7b2a6716 | ||
|
223f14c02a | ||
|
87c03de829 | ||
|
8cde1e811d | ||
|
3a589b6488 | ||
|
193a2fa83c | ||
|
319d5a56b1 | ||
|
1a03f3b447 | ||
|
6a954b6dcb | ||
|
c5dd65c724 | ||
|
21bc78b77d | ||
|
0a5a491530 | ||
|
dbf51c823e | ||
|
20d0a92e01 | ||
|
407bd76da5 | ||
|
1ac6fdf827 | ||
|
b46a724c5a | ||
|
cf57ac7c6a | ||
|
813e9b1f7e |
2
.github/workflows/tags.yaml
vendored
2
.github/workflows/tags.yaml
vendored
@ -7,7 +7,7 @@ jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: sudo apt-get update && sudo apt install -y libgpgme-dev libassuan-dev libdevmapper-dev
|
||||
- run: sudo apt-get update && sudo apt install -y libgpgme-dev libassuan-dev libdevmapper-dev btrfs-progs libbtrfs-dev
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
|
7
.github/workflows/vagrant-packet.yaml
vendored
7
.github/workflows/vagrant-packet.yaml
vendored
@ -8,10 +8,15 @@ jobs:
|
||||
vagrant-setup:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'ci-check/vagrant-setup')
|
||||
runs-on: vagrant
|
||||
env:
|
||||
TEST_WITH_VAGRANT: "yes"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Cleanup state directory
|
||||
run: |
|
||||
rm -rf ./deploy/state
|
||||
- name: Vagrant Test
|
||||
run: |
|
||||
export VAGRANT_DEFAULT_PROVIDER="virtualbox"
|
||||
go test --timeout 1h -v ./test/_vagrant
|
||||
go test --timeout 1h -v ./test/vagrant
|
||||
|
@ -1,6 +0,0 @@
|
||||
# These owners will be the default owners for everything in
|
||||
# the repo. Unless a later match takes precedence,
|
||||
# @global-owner1 and @global-owner2 will be requested for
|
||||
# review when someone opens a pull request.
|
||||
|
||||
* @gauravgahlot @gianarb
|
45
CONTRIBUTING.md
Normal file
45
CONTRIBUTING.md
Normal file
@ -0,0 +1,45 @@
|
||||
## Hello Contributors!
|
||||
|
||||
Thanks for your interest!
|
||||
We're so glad you're here.
|
||||
|
||||
### Important Resources
|
||||
|
||||
#### bugs: [https://github.com/tinkerbell/sandbox/issues](https://github.com/tinkerbell/sandbox/issues)
|
||||
|
||||
### Code of Conduct
|
||||
|
||||
Please read and understand the code of conduct found [here](https://github.com/tinkerbell/.github/blob/master/CODE_OF_CONDUCT.md).
|
||||
|
||||
### DCO Sign Off
|
||||
|
||||
Please read and understand the DCO found [here](docs/DCO.md).
|
||||
|
||||
### Environment Details
|
||||
|
||||
Building is handled by `make`, please see the [Makefile](Makefile) for available targets.
|
||||
|
||||
#### Nix
|
||||
|
||||
This repo's build environment can be reproduced using `nix`.
|
||||
|
||||
##### Install Nix
|
||||
|
||||
Follow the [Nix installation](https://nixos.org/download.html) guide to setup Nix on your box.
|
||||
|
||||
##### Load Dependencies
|
||||
|
||||
Loading build dependencies is as simple as running `nix-shell` or using [lorri](https://github.com/nix-community/lorri).
|
||||
If you have `direnv` installed the included `.envrc` will make that step automatic.
|
||||
|
||||
### How to Submit Change Requests
|
||||
|
||||
Please submit change requests and / or features via [Issues](https://github.com/tinkerbell/sandbox/issues).
|
||||
There's no guarantee it'll be changed, but you never know until you try.
|
||||
We'll try to add comments as soon as possible, though.
|
||||
|
||||
### How to Report a Bug
|
||||
|
||||
Bugs are problems in code, in the functionality of an application or in its UI design; you can submit them through [Issues](https://github.com/tinkerbell/sandbox/issues).
|
||||
|
||||
## Code Style Guides
|
@ -59,7 +59,7 @@ const headerFile = `#!/bin/bash
|
||||
|
||||
# This file is generated by an utility called bump-version in
|
||||
# tinkerbell/sandbox.
|
||||
# This file gets used from generate-envrc.sh but it is also used standalone by
|
||||
# This file gets used from generate-env.sh but it is also used standalone by
|
||||
# automation that wants to get the version of the programs currently supported
|
||||
# in sandbox
|
||||
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
# This file is generated by an utility called bump-version in
|
||||
# tinkerbell/sandbox.
|
||||
# This file gets used from generate-envrc.sh but it is also used standalone by
|
||||
# This file gets used from generate-env.sh but it is also used standalone by
|
||||
# automation that wants to get the version of the programs currently supported
|
||||
# in sandbox
|
||||
|
||||
export OSIE_DOWNLOAD_LINK="https://tinkerbell-oss.s3.amazonaws.com/osie-uploads/osie-v0-n=404,c=c35a5f8,b=master.tar.gz"
|
||||
export TINKERBELL_TINK_BOOTS_IMAGE="quay.io/tinkerbell/boots:sha-70440b27"
|
||||
export TINKERBELL_TINK_CLI_IMAGE="quay.io/tinkerbell/tink-cli:sha-a7e947ef"
|
||||
export TINKERBELL_TINK_BOOTS_IMAGE="quay.io/tinkerbell/boots:sha-ad742e11"
|
||||
export TINKERBELL_TINK_CLI_IMAGE="quay.io/tinkerbell/tink-cli:sha-1b178dae"
|
||||
export TINKERBELL_TINK_HEGEL_IMAGE="quay.io/tinkerbell/hegel:sha-c8a68311"
|
||||
export TINKERBELL_TINK_SERVER_IMAGE="quay.io/tinkerbell/tink:sha-a7e947ef"
|
||||
export TINKERBELL_TINK_WORKER_IMAGE="quay.io/tinkerbell/tink-worker:sha-a7e947ef"
|
||||
export TINKERBELL_TINK_SERVER_IMAGE="quay.io/tinkerbell/tink:sha-1b178dae"
|
||||
export TINKERBELL_TINK_WORKER_IMAGE="quay.io/tinkerbell/tink-worker:sha-1b178dae"
|
||||
|
@ -151,7 +151,7 @@ services:
|
||||
restart: unless-stopped
|
||||
tty: true
|
||||
ports:
|
||||
- $TINKERBELL_HOST_IP:8080:80/tcp
|
||||
- 8080:80/tcp
|
||||
volumes:
|
||||
- ./state/webroot:/usr/share/nginx/html/
|
||||
|
||||
@ -170,6 +170,7 @@ services:
|
||||
TINKERBELL_GRPC_AUTHORITY: 127.0.0.1:42113
|
||||
TINKERBELL_CERT_URL: http://127.0.0.1:42114/cert
|
||||
DATA_MODEL_VERSION: 1
|
||||
CUSTOM_ENDPOINTS: '{"/metadata":""}'
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
@ -57,8 +57,13 @@ resource "null_resource" "tink_directory" {
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = "../../generate-envrc.sh"
|
||||
destination = "/root/tink/generate-envrc.sh"
|
||||
source = "../../generate-env.sh"
|
||||
destination = "/root/tink/generate-env.sh"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = "../../current_versions.sh"
|
||||
destination = "/root/tink/current_versions.sh"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
@ -66,12 +71,9 @@ resource "null_resource" "tink_directory" {
|
||||
destination = "/root/tink"
|
||||
}
|
||||
|
||||
provisioner "remote-exec" {
|
||||
inline = [
|
||||
"iptables -A FORWARD -i eth1 -o bond0 -j ACCEPT",
|
||||
"iptables -A FORWARD -i bond0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT",
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE",
|
||||
]
|
||||
provisioner "file" {
|
||||
source = "nat_interface"
|
||||
destination = "/root/tink/.nat_interface"
|
||||
}
|
||||
|
||||
provisioner "remote-exec" {
|
||||
|
1
deploy/terraform/nat_interface
Normal file
1
deploy/terraform/nat_interface
Normal file
@ -0,0 +1 @@
|
||||
bond0
|
34
deploy/vagrant/Vagrantfile
vendored
34
deploy/vagrant/Vagrantfile
vendored
@ -1,5 +1,7 @@
|
||||
ENV['VAGRANT_NO_PARALLEL'] = 'yes'
|
||||
|
||||
num_workers = ENV['TINKERBELL_NUM_WORKERS'] || '1'
|
||||
|
||||
# Returns true if `GUI` environment variable exists, value does not matter.
|
||||
# Defaults to false
|
||||
def worker_gui_enabled?
|
||||
@ -12,14 +14,26 @@ def worker_display_scale_enabled?
|
||||
ENV.include?('VAGRANT_WORKER_SCALE')
|
||||
end
|
||||
|
||||
def configure_nat
|
||||
return ENV.has_key?('TINKERBELL_CONFIGURE_NAT') ? ENV['TINKERBELL_CONFIGURE_NAT'] : 'true'
|
||||
end
|
||||
|
||||
def libvirt_forward_mode
|
||||
return configure_nat == 'false' ? 'nat' : 'none'
|
||||
end
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
|
||||
config.vm.define :provisioner do |provisioner|
|
||||
provisioner.vm.box = "tinkerbelloss/sandbox-ubuntu1804"
|
||||
provisioner.vm.box_version = "0.1.0"
|
||||
provisioner.vm.box_version = "0.2.0"
|
||||
provisioner.vm.hostname = 'provisioner'
|
||||
provisioner.vm.synced_folder './../../', '/vagrant'
|
||||
provisioner.vm.provision :shell, path: './scripts/tinkerbell.sh'
|
||||
provisioner.vm.provision :shell,
|
||||
path: './scripts/tinkerbell.sh',
|
||||
env: {
|
||||
'TINKERBELL_CONFIGURE_NAT': configure_nat,
|
||||
}
|
||||
|
||||
provisioner.vm.network :private_network,
|
||||
virtualbox__intnet: "tink_network",
|
||||
@ -27,7 +41,7 @@ Vagrant.configure('2') do |config|
|
||||
libvirt__host_ip: "192.168.1.6",
|
||||
libvirt__netmask: "255.255.255.248",
|
||||
libvirt__dhcp_enabled: false,
|
||||
libvirt__forward_mode: 'none',
|
||||
libvirt__forward_mode: libvirt_forward_mode,
|
||||
libvirt__adapter: 1,
|
||||
auto_config: false
|
||||
|
||||
@ -47,14 +61,19 @@ Vagrant.configure('2') do |config|
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.define "worker" do |worker|
|
||||
|
||||
(1..num_workers.to_i).each do |i|
|
||||
mac_suffix = "%02x" % i
|
||||
worker_suffix = i==1 ? "" : "i"
|
||||
config.vm.define "worker#{worker_suffix}" do |worker|
|
||||
|
||||
worker.vm.box = nil
|
||||
worker.vm.network :private_network,
|
||||
mac: "080027000001",
|
||||
mac: "0800270000#{mac_suffix}",
|
||||
virtualbox__intnet: "tink_network",
|
||||
libvirt__network_name: "tink_network",
|
||||
libvirt__dhcp_enabled: false,
|
||||
libvirt__forward_mode: 'none',
|
||||
libvirt__forward_mode: libvirt_forward_mode,
|
||||
auto_config: false
|
||||
|
||||
worker.vm.provider :libvirt do |lv|
|
||||
@ -82,8 +101,9 @@ Vagrant.configure('2') do |config|
|
||||
'--boot2', 'none',
|
||||
'--boot3', 'none',
|
||||
'--boot4', 'none',
|
||||
'--macaddress1', '080027000001'
|
||||
'--macaddress1', "0800270000#{mac_suffix}"
|
||||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -9,7 +9,8 @@ setup_docker() (
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg-agent \
|
||||
software-properties-common
|
||||
software-properties-common \
|
||||
;
|
||||
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg |
|
||||
sudo apt-key add -
|
||||
@ -22,16 +23,24 @@ setup_docker() (
|
||||
sudo add-apt-repository "$repo"
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
|
||||
sudo apt-get install -y \
|
||||
containerd.io \
|
||||
docker-ce \
|
||||
docker-ce-cli \
|
||||
;
|
||||
)
|
||||
|
||||
setup_docker_compose() (
|
||||
# from https://docs.docker.com/compose/install/
|
||||
sudo curl -L \
|
||||
"https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" \
|
||||
-o /usr/local/bin/docker-compose
|
||||
|
||||
sudo chmod +x /usr/local/bin/docker-compose
|
||||
setup_docker_compose() (
|
||||
local name url
|
||||
name=docker-compose-$(uname -s)-$(uname -m)
|
||||
url=https://github.com/docker/compose/releases/download/1.26.0/$name
|
||||
curl -fsSLO "$url"
|
||||
curl -fsSLO "$url.sha256"
|
||||
sha256sum -c <"$name.sha256"
|
||||
rm -f "$name.sha256"
|
||||
chmod +x "$name"
|
||||
sudo mv "$name" /usr/local/bin/docker-compose
|
||||
)
|
||||
|
||||
main() (
|
||||
@ -45,3 +54,4 @@ main() (
|
||||
)
|
||||
|
||||
main
|
||||
sync # do not remove!
|
||||
|
@ -34,21 +34,26 @@ setup_nat() (
|
||||
main() (
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
if [ ! -f ./.env ]; then
|
||||
./generate-envrc.sh eth1 >.env
|
||||
if ! [[ -f ./.env ]]; then
|
||||
./generate-env.sh eth1 >.env
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
. ./.env
|
||||
source ./.env
|
||||
|
||||
make_certs_writable
|
||||
|
||||
./setup.sh
|
||||
|
||||
if [[ ${TINKERBELL_CONFIGURE_NAT:=true} != "false" ]]; then
|
||||
setup_nat
|
||||
fi
|
||||
|
||||
secure_certs
|
||||
configure_vagrant_user
|
||||
|
||||
set +x # don't want the stderr output from xtrace messing with the post-setup-message
|
||||
[[ -f /tmp/post-setup-message ]] && cat /tmp/post-setup-message
|
||||
)
|
||||
|
||||
main
|
||||
|
62
docs/DCO.md
Normal file
62
docs/DCO.md
Normal file
@ -0,0 +1,62 @@
|
||||
# DCO Sign Off
|
||||
|
||||
All authors to the project retain copyright to their work. However, to ensure
|
||||
that they are only submitting work that they have rights to, we are requiring
|
||||
everyone to acknowledge this by signing their work.
|
||||
|
||||
Since this signature indicates your rights to the contribution and
|
||||
certifies the statements below, it must contain your real name and
|
||||
email address. Various forms of noreply email address must not be used.
|
||||
|
||||
Any copyright notices in this repository should specify the authors as "The
|
||||
project authors".
|
||||
|
||||
To sign your work, just add a line like this at the end of your commit message:
|
||||
|
||||
```text
|
||||
Signed-off-by: Jess Owens <jowens@tinkerbell.org>
|
||||
```
|
||||
|
||||
This can easily be done with the `--signoff` option to `git commit`.
|
||||
|
||||
By doing this you state that you can certify the following (from [https://developercertificate.org/][1]):
|
||||
|
||||
```text
|
||||
Developer Certificate of Origin
|
||||
Version 1.1
|
||||
|
||||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
||||
1 Letterman Drive
|
||||
Suite D4700
|
||||
San Francisco, CA, 94129
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
|
||||
Developer's Certificate of Origin 1.1
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
(a) The contribution was created in whole or in part by me and I
|
||||
have the right to submit it under the open source license
|
||||
indicated in the file; or
|
||||
|
||||
(b) The contribution is based upon previous work that, to the best
|
||||
of my knowledge, is covered under an appropriate open source
|
||||
license and I have the right under that license to submit that
|
||||
work with modifications, whether created in whole or in part
|
||||
by me, under the same open source license (unless I am
|
||||
permitted to submit under a different license), as indicated
|
||||
in the file; or
|
||||
|
||||
(c) The contribution was provided directly to me by some other
|
||||
person who certified (a), (b) or (c) and I have not modified
|
||||
it.
|
||||
|
||||
(d) I understand and agree that this project and the contribution
|
||||
are public and that a record of the contribution (including all
|
||||
personal information I submit with it, including my sign-off) is
|
||||
maintained indefinitely and may be redistributed consistent with
|
||||
this project or the open source license(s) involved.
|
||||
```
|
110
generate-env.sh
Executable file
110
generate-env.sh
Executable file
@ -0,0 +1,110 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# stops the execution if a command or pipeline has an error
|
||||
set -eu
|
||||
|
||||
if command -v tput >/dev/null && tput setaf 1 >/dev/null 2>&1; then
|
||||
# color codes
|
||||
RED="$(tput setaf 1)"
|
||||
RESET="$(tput sgr0)"
|
||||
fi
|
||||
|
||||
ERR="${RED:-}ERROR:${RESET:-}"
|
||||
|
||||
source ./current_versions.sh
|
||||
|
||||
err() (
|
||||
if [[ -z ${1:-} ]]; then
|
||||
cat >&2
|
||||
else
|
||||
echo "$ERR " "$@" >&2
|
||||
fi
|
||||
)
|
||||
|
||||
candidate_interfaces() (
|
||||
ip -o link show |
|
||||
awk -F': ' '{print $2}' |
|
||||
sed 's/[ \t].*//;/^\(lo\|bond0\|\|\)$/d' |
|
||||
sort
|
||||
)
|
||||
|
||||
validate_tinkerbell_network_interface() (
|
||||
local tink_interface=$1
|
||||
|
||||
if ! candidate_interfaces | grep -q "^$tink_interface$"; then
|
||||
err "Invalid interface ($tink_interface) selected, must be one of:"
|
||||
candidate_interfaces | err
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
)
|
||||
|
||||
generate_password() (
|
||||
head -c 12 /dev/urandom | sha256sum | cut -d' ' -f1
|
||||
)
|
||||
|
||||
generate_env() (
|
||||
local tink_interface=$1
|
||||
|
||||
validate_tinkerbell_network_interface "$tink_interface"
|
||||
|
||||
local tink_password
|
||||
tink_password=$(generate_password)
|
||||
local registry_password
|
||||
registry_password=$(generate_password)
|
||||
|
||||
cat <<-EOF
|
||||
# Tinkerbell Stack version
|
||||
|
||||
export OSIE_DOWNLOAD_LINK=${OSIE_DOWNLOAD_LINK}
|
||||
export TINKERBELL_TINK_SERVER_IMAGE=${TINKERBELL_TINK_SERVER_IMAGE}
|
||||
export TINKERBELL_TINK_CLI_IMAGE=${TINKERBELL_TINK_CLI_IMAGE}
|
||||
export TINKERBELL_TINK_BOOTS_IMAGE=${TINKERBELL_TINK_BOOTS_IMAGE}
|
||||
export TINKERBELL_TINK_HEGEL_IMAGE=${TINKERBELL_TINK_HEGEL_IMAGE}
|
||||
export TINKERBELL_TINK_WORKER_IMAGE=${TINKERBELL_TINK_WORKER_IMAGE}
|
||||
|
||||
# Network interface for Tinkerbell's network
|
||||
export TINKERBELL_NETWORK_INTERFACE="$tink_interface"
|
||||
|
||||
# Decide on a subnet for provisioning. Tinkerbell should "own" this
|
||||
# network space. Its subnet should be just large enough to be able
|
||||
# to provision your hardware.
|
||||
export TINKERBELL_CIDR=${TINKERBELL_CIDR:-"29"}
|
||||
|
||||
# Host IP is used by provisioner to expose different services such as
|
||||
# tink, boots, etc.
|
||||
#
|
||||
# The host IP should the first IP in the range, and the Nginx IP
|
||||
# should be the second address.
|
||||
export TINKERBELL_HOST_IP=${TINKERBELL_HOST_IP:-"192.168.1.1"}
|
||||
|
||||
# Tink server username and password
|
||||
export TINKERBELL_TINK_USERNAME=admin
|
||||
export TINKERBELL_TINK_PASSWORD="$tink_password"
|
||||
|
||||
# Docker Registry's username and password
|
||||
export TINKERBELL_REGISTRY_USERNAME=admin
|
||||
export TINKERBELL_REGISTRY_PASSWORD="$registry_password"
|
||||
|
||||
# Tink cli options
|
||||
export TINKERBELL_GRPC_AUTHORITY=${TINKERBELL_HOST_IP:-"192.168.1.1"}:42113
|
||||
export TINKERBELL_CERT_URL=http://${TINKERBELL_HOST_IP:-"192.168.1.1"}:42114/cert
|
||||
|
||||
# Legacy options, to be deleted:
|
||||
export FACILITY=onprem
|
||||
export ROLLBAR_TOKEN=ignored
|
||||
export ROLLBAR_DISABLE=1
|
||||
EOF
|
||||
)
|
||||
|
||||
main() (
|
||||
if [[ -z ${1:-} ]]; then
|
||||
err "Usage: $0 network-interface-name > .env"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
generate_env "$1"
|
||||
)
|
||||
|
||||
main "$@"
|
@ -1,105 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# stops the execution if a command or pipeline has an error
|
||||
set -eu
|
||||
|
||||
if command -v tput >/dev/null && tput setaf 1 >/dev/null 2>&1; then
|
||||
# color codes
|
||||
RED="$(tput setaf 1)"
|
||||
RESET="$(tput sgr0)"
|
||||
fi
|
||||
|
||||
ERR="${RED:-}ERROR:${RESET:-}"
|
||||
|
||||
source ./current_versions.sh
|
||||
|
||||
err() (
|
||||
if [ -z "${1:-}" ]; then
|
||||
cat >&2
|
||||
else
|
||||
echo "$ERR " "$@" >&2
|
||||
fi
|
||||
)
|
||||
|
||||
candidate_interfaces() (
|
||||
ip -o link show |
|
||||
awk -F': ' '{print $2}' |
|
||||
sed 's/[ \t].*//;/^\(lo\|bond0\|\|\)$/d' |
|
||||
sort
|
||||
)
|
||||
|
||||
validate_tinkerbell_network_interface() (
|
||||
local tink_interface=$1
|
||||
|
||||
if ! candidate_interfaces | grep -q "^$tink_interface$"; then
|
||||
err "Invalid interface ($tink_interface) selected, must be one of:"
|
||||
candidate_interfaces | err
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
)
|
||||
|
||||
generate_password() (
|
||||
head -c 12 /dev/urandom | sha256sum | cut -d' ' -f1
|
||||
)
|
||||
|
||||
generate_envrc() (
|
||||
local tink_interface=$1
|
||||
|
||||
validate_tinkerbell_network_interface "$tink_interface"
|
||||
|
||||
local tink_password
|
||||
tink_password=$(generate_password)
|
||||
local registry_password
|
||||
registry_password=$(generate_password)
|
||||
cat <<EOF
|
||||
# Tinkerbell Stack version
|
||||
|
||||
export OSIE_DOWNLOAD_LINK=${OSIE_DOWNLOAD_LINK}
|
||||
export TINKERBELL_TINK_SERVER_IMAGE=${TINKERBELL_TINK_SERVER_IMAGE}
|
||||
export TINKERBELL_TINK_CLI_IMAGE=${TINKERBELL_TINK_CLI_IMAGE}
|
||||
export TINKERBELL_TINK_BOOTS_IMAGE=${TINKERBELL_TINK_BOOTS_IMAGE}
|
||||
export TINKERBELL_TINK_HEGEL_IMAGE=${TINKERBELL_TINK_HEGEL_IMAGE}
|
||||
export TINKERBELL_TINK_WORKER_IMAGE=${TINKERBELL_TINK_WORKER_IMAGE}
|
||||
|
||||
# Network interface for Tinkerbell's network
|
||||
export TINKERBELL_NETWORK_INTERFACE="$tink_interface"
|
||||
|
||||
# Decide on a subnet for provisioning. Tinkerbell should "own" this
|
||||
# network space. Its subnet should be just large enough to be able
|
||||
# to provision your hardware.
|
||||
export TINKERBELL_CIDR=29
|
||||
|
||||
# Host IP is used by provisioner to expose different services such as
|
||||
# tink, boots, etc.
|
||||
#
|
||||
# The host IP should the first IP in the range, and the Nginx IP
|
||||
# should be the second address.
|
||||
export TINKERBELL_HOST_IP=192.168.1.1
|
||||
|
||||
# Tink server username and password
|
||||
export TINKERBELL_TINK_USERNAME=admin
|
||||
export TINKERBELL_TINK_PASSWORD="$tink_password"
|
||||
|
||||
# Docker Registry's username and password
|
||||
export TINKERBELL_REGISTRY_USERNAME=admin
|
||||
export TINKERBELL_REGISTRY_PASSWORD="$registry_password"
|
||||
|
||||
# Legacy options, to be deleted:
|
||||
export FACILITY=onprem
|
||||
export ROLLBAR_TOKEN=ignored
|
||||
export ROLLBAR_DISABLE=1
|
||||
EOF
|
||||
)
|
||||
|
||||
main() (
|
||||
if [ -z "${1:-}" ]; then
|
||||
err "Usage: $0 network-interface-name > .env"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
generate_envrc "$1"
|
||||
)
|
||||
|
||||
main "$@"
|
6
go.mod
6
go.mod
@ -4,10 +4,10 @@ go 1.15
|
||||
|
||||
require (
|
||||
github.com/containers/image v3.0.2+incompatible
|
||||
github.com/containers/image/v5 v5.8.0
|
||||
github.com/gianarb/vagrant-go v0.0.0-20200902133321-62ba563fe383 // indirect
|
||||
github.com/containers/image/v5 v5.10.5
|
||||
github.com/gianarb/vagrant-go v0.0.0-20200902133321-62ba563fe383
|
||||
github.com/go-git/go-git/v5 v5.2.0
|
||||
github.com/joho/godotenv v1.3.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/tinkerbell/tink v0.0.0-20210211152036-a7e947efc194 // indirect
|
||||
github.com/tinkerbell/tink v0.0.0-20210315140655-1b178daeaeda
|
||||
)
|
||||
|
95
go.sum
95
go.sum
@ -21,11 +21,11 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
|
||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
||||
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
||||
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
|
||||
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6trr62pF5DucadTWGdEB4mEyvzi0e2nbcmcyA=
|
||||
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
|
||||
github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331 h1:3YnB7Hpmh1lPecPE8doMOtYCrMdrpedZOvxfuNES/Vk=
|
||||
github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
|
||||
github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
|
||||
github.com/Microsoft/hcsshim v0.8.9 h1:VrfodqvztU8YSOvygU+DN1BGaSGxmrNfqOv5oOuX2Bk=
|
||||
github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8=
|
||||
github.com/Microsoft/hcsshim v0.8.14 h1:lbPVK25c1cu5xTLITwpUcxoA9vKrKErASPYygvouJns=
|
||||
github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||
@ -67,24 +67,27 @@ github.com/briandowns/spinner v1.8.0/go.mod h1://Zf9tMcxfRUA36V23M6YGEAv+kECGfvp
|
||||
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/checkpoint-restore/go-criu/v4 v4.0.2/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg=
|
||||
github.com/cilium/ebpf v0.0.0-20200507155900-a9f01edf17e3/go.mod h1:XT+cAw5wfvsodedcijoh1l9cf7v1x9FlFB/3VmF/O8s=
|
||||
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
||||
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
|
||||
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f h1:tSNMc+rJDfmYntojat8lljbt1mgKNpTxUZJsSzJ9Y1s=
|
||||
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
|
||||
github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 h1:qWj4qVYZ95vLWwqyNJCQg7rDsG5wPdze0UaPolH7DUk=
|
||||
github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM=
|
||||
github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
|
||||
github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE=
|
||||
github.com/containerd/containerd v1.3.2 h1:ForxmXkA6tPIvffbrDAcPUIB32QgXkt2XFj+F0UxetA=
|
||||
github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
|
||||
github.com/containerd/containerd v1.4.1 h1:pASeJT3R3YyVn+94qEPk0SnU1OQ20Jd/T+SPKy9xehY=
|
||||
github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
|
||||
github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
|
||||
github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
|
||||
@ -93,14 +96,14 @@ github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDG
|
||||
github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
|
||||
github.com/containers/image v3.0.2+incompatible h1:B1lqAE8MUPCrsBLE86J0gnXleeRq8zJnQryhiiGQNyE=
|
||||
github.com/containers/image v3.0.2+incompatible/go.mod h1:8Vtij257IWSanUQKe1tAeNOm2sRVkSqQTVQ1IlwI3+M=
|
||||
github.com/containers/image/v5 v5.8.0 h1:B3FGHi0bdGXgg698kBIGOlHCXN5n+scJr6/5354GOPU=
|
||||
github.com/containers/image/v5 v5.8.0/go.mod h1:jKxdRtyIDumVa56hdsZvV+gwx4zB50hRou6pIuCWLkg=
|
||||
github.com/containers/image/v5 v5.10.5 h1:VK1UbsZMzjdw5Xqr3Im9h4iOqHWU0naFs+I78kavc7I=
|
||||
github.com/containers/image/v5 v5.10.5/go.mod h1:SgIbWEedCNBbn2FI5cH0/jed1Ecy2s8XK5zTxvJTzII=
|
||||
github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b h1:Q8ePgVfHDplZ7U33NwHZkrVELsZP5fYj9pM5WBZB2GE=
|
||||
github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=
|
||||
github.com/containers/ocicrypt v1.0.3 h1:vYgl+RZ9Q3DPMuTfxmN+qp0X2Bj52uuY2vnt6GzVe1c=
|
||||
github.com/containers/ocicrypt v1.0.3/go.mod h1:CUBa+8MRNL/VkpxYIpaMtgn1WgXGyvPQj8jcy0EVG6g=
|
||||
github.com/containers/storage v1.23.7 h1:43ImvG/npvQSZXRjaudVvKISIuZSfI6qvtSNQQSGO/A=
|
||||
github.com/containers/storage v1.23.7/go.mod h1:cUT2zHjtx+WlVri30obWmM2gpqpi8jfPsmIzP1TVpEI=
|
||||
github.com/containers/storage v1.24.8 h1:v3pliVY5Jx1ZNJDoyCvRBrXMxlGLakBsxbBVWoaCI8Q=
|
||||
github.com/containers/storage v1.24.8/go.mod h1:YC+2pY8SkfEAcZkwycxYbpK8EiRbx5soPPwz9dxe4IQ=
|
||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
@ -127,8 +130,8 @@ github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8
|
||||
github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
|
||||
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f h1:Sm8iD2lifO31DwXfkGzq8VgA7rwxPjRsYmeo0K/dF9Y=
|
||||
github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker v17.12.0-ce-rc1.0.20200916142827-bd33bbf0497b+incompatible h1:SiUATuP//KecDjpOK2tvZJgeScYAklvyjfK8JZlU6fo=
|
||||
github.com/docker/docker v17.12.0-ce-rc1.0.20200916142827-bd33bbf0497b+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker-credential-helpers v0.6.3 h1:zI2p9+1NQYdnG6sMU26EX4aVGlqbInSQxQXLvzJ4RPQ=
|
||||
github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
|
||||
@ -200,7 +203,6 @@ github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8z
|
||||
github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q=
|
||||
github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc=
|
||||
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
|
||||
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
|
||||
github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/godror/godror v0.13.3/go.mod h1:2ouUT4kdhUBk7TAkHWD4SN0CdI0pgEQbo8FVHhbSKWg=
|
||||
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
|
||||
@ -210,10 +212,10 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV
|
||||
github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
|
||||
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
@ -222,7 +224,6 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls=
|
||||
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
@ -236,11 +237,11 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8l
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
|
||||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
@ -287,7 +288,6 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b
|
||||
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
||||
@ -322,20 +322,18 @@ github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT
|
||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.11.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
github.com/klauspost/compress v1.11.2 h1:MiK62aErc3gIiVEtyzKfeOHgW7atJb5g/KNX5m3c2nQ=
|
||||
github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
github.com/klauspost/compress v1.11.5/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
github.com/klauspost/compress v1.11.7 h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg=
|
||||
github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE=
|
||||
github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
@ -425,12 +423,12 @@ github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5X
|
||||
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
|
||||
github.com/opencontainers/runc v1.0.0-rc91 h1:Tp8LWs5G8rFpzTsbRjAtQkPVexhCu0bnANE5IfIhJ6g=
|
||||
github.com/opencontainers/runc v1.0.0-rc91/go.mod h1:3Sm6Dt7OT8z88EbdQqqcRN2oCT54jbi72tT/HqgflT8=
|
||||
github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||
github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||
github.com/opencontainers/runtime-spec v1.0.3-0.20200520003142-237cc4f519e2 h1:9mv9SC7GWmRWE0J/+oD8w3GsN2KYGKtg6uwLN7hfP5E=
|
||||
github.com/opencontainers/runtime-spec v1.0.3-0.20200520003142-237cc4f519e2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||
github.com/opencontainers/selinux v1.5.1/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g=
|
||||
github.com/opencontainers/selinux v1.6.0 h1:+bIAS/Za3q5FTwWym4fTB0vObnfCf3G/NC7K6Jx62mY=
|
||||
github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE=
|
||||
github.com/opencontainers/selinux v1.8.0 h1:+77ba4ar4jsCbL1GLbFL8fFM57w6suPfSS9PDLDY7KM=
|
||||
github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo=
|
||||
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
|
||||
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
|
||||
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
@ -465,29 +463,29 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP
|
||||
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
|
||||
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_golang v1.1.0 h1:BQ53HtBmfOitExawJ6LokA4x8ov/z0SYYb0+HxJfRI8=
|
||||
github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
|
||||
github.com/prometheus/client_golang v1.3.0 h1:miYCvYqFXtl/J9FIy8eNpBfYthAEFg+Ys0XyUVEcDsc=
|
||||
github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.1.0 h1:ElTg5tNp4DqfV7UQjDqv2+RJlNzsDtvNAWccbItceIE=
|
||||
github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkpEo=
|
||||
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
|
||||
github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY=
|
||||
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
|
||||
github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE=
|
||||
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
|
||||
github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8=
|
||||
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
@ -544,8 +542,9 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 h1:b6uOv7YOFK0TYG7HtkIgExQo+2RdLuwRft63jn2HWj8=
|
||||
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||
@ -553,26 +552,26 @@ github.com/tchap/go-patricia v2.3.0+incompatible h1:GkY4dP3cEfEASBPPkWd+AmjYxhmD
|
||||
github.com/tchap/go-patricia v2.3.0+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I=
|
||||
github.com/testcontainers/testcontainers-go v0.9.0/go.mod h1:b22BFXhRbg4PJmeMVWh6ftqjyZHgiIl3w274e9r3C2E=
|
||||
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
|
||||
github.com/tinkerbell/tink v0.0.0-20210211152036-a7e947efc194 h1:dPcb4aXyeoqDefQt5uf4RxTwIoa5hIxggz0dQU3RZB4=
|
||||
github.com/tinkerbell/tink v0.0.0-20210211152036-a7e947efc194/go.mod h1:s4k7CORR0OMWd4cYwBqNBFPSJZhnSQxeKdDtMa/aspk=
|
||||
github.com/tinkerbell/tink v0.0.0-20210315140655-1b178daeaeda h1:uAHwUH+06gowZMVLqQXm7jN1y3Sl+CDJHThNiKyLHus=
|
||||
github.com/tinkerbell/tink v0.0.0-20210315140655-1b178daeaeda/go.mod h1:s4k7CORR0OMWd4cYwBqNBFPSJZhnSQxeKdDtMa/aspk=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||
github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ=
|
||||
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I=
|
||||
github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/vbatts/tar-split v0.11.1 h1:0Odu65rhcZ3JZaPHxl7tCI3V/C/Q9Zf82UFravl02dE=
|
||||
github.com/vbatts/tar-split v0.11.1/go.mod h1:LEuURwDEiWjRjwu46yU3KVGuUdVv/dcnpcEPSzR8z6g=
|
||||
github.com/vbauerster/mpb/v5 v5.3.0 h1:vgrEJjUzHaSZKDRRxul5Oh4C72Yy/5VEMb0em+9M0mQ=
|
||||
github.com/vbauerster/mpb/v5 v5.3.0/go.mod h1:4yTkvAb8Cm4eylAp6t0JRq6pXDkFJ4krUlDqWYkakAs=
|
||||
github.com/vbauerster/mpb/v5 v5.4.0 h1:n8JPunifvQvh6P1D1HAl2Ur9YcmKT1tpoUuiea5mlmg=
|
||||
github.com/vbauerster/mpb/v5 v5.4.0/go.mod h1:fi4wVo7BVQ22QcvFObm+VwliQXlV1eBT8JDaKXR4JGI=
|
||||
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
|
||||
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
|
||||
github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243 h1:R43TdZy32XXSXjJn7M/HhALJ9imq6ztLnChfYJpVDnM=
|
||||
github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
|
||||
github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE=
|
||||
github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI=
|
||||
github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70=
|
||||
github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
||||
@ -598,8 +597,8 @@ go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvS
|
||||
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
@ -626,7 +625,6 @@ golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8U
|
||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5 h1:Q7tZBpemrlsc2I7IyODzhtallWRSm4Q0d09pL6XbQtU=
|
||||
golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM=
|
||||
@ -676,7 +674,6 @@ golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k=
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
@ -690,8 +687,8 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o=
|
||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@ -711,7 +708,6 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -721,25 +717,26 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009 h1:W0lCpv29Hv0UaM1LXb9QlBHLNP8UFfcKjblhVCWftOM=
|
||||
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201218084310-7d0127a74742/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 h1:myAQVi0cGEoqQVR5POX+8RR2mrocKqNN1hmeMqhX27k=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
@ -781,6 +778,7 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
@ -798,7 +796,6 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 h1:nfPFGzJkUDX6uBmpN/pSw7MbOAWegH5QDQuoXFHedLg=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
|
||||
google.golang.org/genproto v0.0.0-20190708153700-3bdd9d9f5532/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
|
||||
@ -819,7 +816,6 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij
|
||||
google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.23.1 h1:q4XQuHFC6I28BKZpo6IYyb3mNO+l7lSOxRuYTCiDfXk=
|
||||
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
@ -840,7 +836,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
74
setup.sh
74
setup.sh
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# stops the execution if a command or pipeline has an error
|
||||
set -eu
|
||||
set -euxo pipefail
|
||||
|
||||
# Tinkerbell stack Linux setup script
|
||||
#
|
||||
@ -38,7 +38,7 @@ NEXT="${GREEN:-}NEXT:${RESET:-}"
|
||||
get_distribution() (
|
||||
local lsb_dist=""
|
||||
# Every system that we officially support has /etc/os-release
|
||||
if [ -r /etc/os-release ]; then
|
||||
if [[ -r /etc/os-release ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
lsb_dist="$(. /etc/os-release && echo "$ID")"
|
||||
fi
|
||||
@ -50,7 +50,7 @@ get_distribution() (
|
||||
get_distro_version() (
|
||||
local lsb_version="0"
|
||||
# Every system that we officially support has /etc/os-release
|
||||
if [ -r /etc/os-release ]; then
|
||||
if [[ -r /etc/os-release ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
lsb_version="$(. /etc/os-release && echo "$VERSION_ID")"
|
||||
fi
|
||||
@ -110,6 +110,18 @@ setup_networking() (
|
||||
else
|
||||
echo "$ERR tinkerbell network interface configuration failed"
|
||||
fi
|
||||
|
||||
NAT_INTERFACE=""
|
||||
if [[ -r .nat_interface ]]; then
|
||||
NAT_INTERFACE=$(cat .nat_interface)
|
||||
fi
|
||||
if [[ -n $NAT_INTERFACE ]] && ip addr show "$NAT_INTERFACE" &>/dev/null; then
|
||||
# TODO(nshalman) the terraform code would just run these commands as-is once
|
||||
# but it would be nice to make these more persistent based on OS
|
||||
iptables -A FORWARD -i "$TINKERBELL_NETWORK_INTERFACE" -o "$NAT_INTERFACE" -j ACCEPT
|
||||
iptables -A FORWARD -i "$NAT_INTERFACE" -o "$TINKERBELL_NETWORK_INTERFACE" -m state --state ESTABLISHED,RELATED -j ACCEPT
|
||||
iptables -t nat -A POSTROUTING -o "$NAT_INTERFACE" -j MASQUERADE
|
||||
fi
|
||||
)
|
||||
|
||||
setup_networking_manually() (
|
||||
@ -123,10 +135,10 @@ setup_networking_manually() (
|
||||
|
||||
setup_network_forwarding() (
|
||||
# enable IP forwarding for docker
|
||||
if [ "$(sysctl -n net.ipv4.ip_forward)" != "1" ]; then
|
||||
if [ -d /etc/sysctl.d ]; then
|
||||
if (($(sysctl -n net.ipv4.ip_forward) != 1)); then
|
||||
if [[ -d /etc/sysctl.d ]]; then
|
||||
echo "net.ipv4.ip_forward=1" >/etc/sysctl.d/99-tinkerbell.conf
|
||||
elif [ -f /etc/sysctl.conf ]; then
|
||||
elif [[ -f /etc/sysctl.conf ]]; then
|
||||
echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf
|
||||
fi
|
||||
|
||||
@ -159,7 +171,7 @@ setup_networking_netplan() (
|
||||
)
|
||||
|
||||
setup_networking_ubuntu_legacy() (
|
||||
if [ ! -f /etc/network/interfaces ]; then
|
||||
if ! [[ -f /etc/network/interfaces ]]; then
|
||||
echo "$ERR file /etc/network/interfaces not found"
|
||||
exit 1
|
||||
fi
|
||||
@ -212,7 +224,7 @@ EOF
|
||||
|
||||
local cfgfile="/etc/sysconfig/network-scripts/ifcfg-$TINKERBELL_NETWORK_INTERFACE"
|
||||
|
||||
if [ -f "$cfgfile" ]; then
|
||||
if [[ -f $cfgfile ]]; then
|
||||
echo "$ERR network config already exists: $cfgfile"
|
||||
echo "$BLANK Please update it to match this configuration:"
|
||||
echo "$content"
|
||||
@ -233,12 +245,12 @@ setup_osie() (
|
||||
|
||||
local osie_current=$STATEDIR/webroot/misc/osie/current
|
||||
local tink_workflow=$STATEDIR/webroot/workflow/
|
||||
if [ ! -d "$osie_current" ] || [ ! -d "$tink_workflow" ]; then
|
||||
if [[ ! -d $osie_current ]] || [[ ! -d $tink_workflow ]]; then
|
||||
mkdir -p "$osie_current"
|
||||
mkdir -p "$tink_workflow"
|
||||
pushd "$SCRATCH"
|
||||
|
||||
if [ -z "${TB_OSIE_TAR:-}" ]; then
|
||||
if [[ -z ${TB_OSIE_TAR:-} ]]; then
|
||||
curl "${OSIE_DOWNLOAD_LINK}" -o ./osie.tar.gz
|
||||
tar -zxf osie.tar.gz
|
||||
else
|
||||
@ -293,7 +305,7 @@ check_container_status() (
|
||||
--filter "event=health_status" \
|
||||
--format '{{.Status}}')
|
||||
|
||||
if [ "$status" != "health_status: healthy" ]; then
|
||||
if [[ $status != "health_status: healthy" ]]; then
|
||||
echo "$ERR $container_name is not healthy. status: $status"
|
||||
exit 1
|
||||
fi
|
||||
@ -302,7 +314,7 @@ check_container_status() (
|
||||
generate_certificates() (
|
||||
mkdir -p "$STATEDIR/certs"
|
||||
|
||||
if [ ! -f "$STATEDIR/certs/ca.json" ]; then
|
||||
if ! [[ -f "$STATEDIR/certs/ca.json" ]]; then
|
||||
jq \
|
||||
'.
|
||||
| .names[0].L = $facility
|
||||
@ -313,7 +325,7 @@ generate_certificates() (
|
||||
>"$STATEDIR/certs/ca.json"
|
||||
fi
|
||||
|
||||
if [ ! -f "$STATEDIR/certs/server-csr.json" ]; then
|
||||
if ! [[ -f "$STATEDIR/certs/server-csr.json" ]]; then
|
||||
jq \
|
||||
'.
|
||||
| .hosts += [ $ip, "tinkerbell.\($facility).packet.net" ]
|
||||
@ -335,13 +347,13 @@ generate_certificates() (
|
||||
local certs_dir="/etc/docker/certs.d/$TINKERBELL_HOST_IP"
|
||||
|
||||
# copy public key to NGINX for workers
|
||||
if ! cmp --quiet "$STATEDIR"/certs/ca.pem "$STATEDIR/webroot/workflow/ca.pem"; then
|
||||
cp "$STATEDIR"/certs/ca.pem "$STATEDIR/webroot/workflow/ca.pem"
|
||||
if ! cmp --quiet "$STATEDIR/certs/ca.pem" "$STATEDIR/webroot/workflow/ca.pem"; then
|
||||
cp "$STATEDIR/certs/ca.pem" "$STATEDIR/webroot/workflow/ca.pem"
|
||||
fi
|
||||
|
||||
# update host to trust registry certificate
|
||||
if ! cmp --quiet "$STATEDIR/certs/ca.pem" "$certs_dir/tinkerbell.crt"; then
|
||||
if [ ! -d "$certs_dir/tinkerbell.crt" ]; then
|
||||
if ! [[ -d "$certs_dir/" ]]; then
|
||||
# The user will be told to create the directory
|
||||
# in the next block, if copying the certs there
|
||||
# fails.
|
||||
@ -351,7 +363,7 @@ generate_certificates() (
|
||||
echo "$ERR please copy $STATEDIR/certs/ca.pem to $certs_dir/tinkerbell.crt"
|
||||
echo "$BLANK and run $0 again:"
|
||||
|
||||
if [ ! -d "$certs_dir" ]; then
|
||||
if ! [[ -d $certs_dir ]]; then
|
||||
echo "sudo mkdir -p '$certs_dir'"
|
||||
fi
|
||||
echo "sudo cp '$STATEDIR/certs/ca.pem' '$certs_dir/tinkerbell.crt'"
|
||||
@ -394,7 +406,7 @@ bootstrap_docker_registry() (
|
||||
|
||||
setup_docker_registry() (
|
||||
local registry_images="$STATEDIR/registry"
|
||||
if [ ! -d "$registry_images" ]; then
|
||||
if ! [[ -d $registry_images ]]; then
|
||||
mkdir -p "$registry_images"
|
||||
fi
|
||||
start_registry
|
||||
@ -415,13 +427,15 @@ command_exists() (
|
||||
)
|
||||
|
||||
check_command() (
|
||||
if command_exists "$1"; then
|
||||
echo "$BLANK Found prerequisite: $1"
|
||||
return 0
|
||||
else
|
||||
echo "$ERR Prerequisite command not installed: $1"
|
||||
if ! command_exists "$1"; then
|
||||
echo "$ERR Prerequisite executable command not found: $1"
|
||||
return 1
|
||||
fi
|
||||
if ! [[ -s "$(which "$1")" ]]; then
|
||||
echo "$ERR Prerequisite command is an empty file: $1"
|
||||
fi
|
||||
echo "$BLANK Found prerequisite: $1"
|
||||
return 0
|
||||
)
|
||||
|
||||
check_prerequisites() (
|
||||
@ -457,15 +471,15 @@ check_prerequisites() (
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ $failed -eq 1 ]; then
|
||||
if ((failed == 1)); then
|
||||
echo "$ERR Prerequisites not met. Please install the missing commands and re-run $0."
|
||||
exit 1
|
||||
fi
|
||||
)
|
||||
|
||||
whats_next() (
|
||||
echo "$NEXT 1. Enter /vagrant/deploy and run: source ../.env; docker-compose up -d"
|
||||
echo "$BLANK 2. Try executing your fist workflow."
|
||||
echo "$NEXT 1. Enter /deploy and run: source ../.env; docker-compose up -d"
|
||||
echo "$BLANK 2. Try executing your first workflow."
|
||||
echo "$BLANK Follow the steps described in https://tinkerbell.org/examples/hello-world/ to say 'Hello World!' with a workflow."
|
||||
)
|
||||
|
||||
@ -477,21 +491,23 @@ do_setup() (
|
||||
echo "$INFO starting tinkerbell stack setup"
|
||||
check_prerequisites "$lsb_dist" "$lsb_version"
|
||||
|
||||
if [ ! -f "$ENV_FILE" ]; then
|
||||
echo "$ERR Run './generate-envrc.sh network-interface > \"$ENV_FILE\"' before continuing."
|
||||
if ! [[ -f $ENV_FILE ]]; then
|
||||
echo "$ERR Run './generate-env.sh network-interface > \"$ENV_FILE\"' before continuing."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
source "$ENV_FILE"
|
||||
|
||||
if [[ -z $TINKERBELL_SKIP_NETWORKING ]]; then
|
||||
setup_networking "$lsb_dist" "$lsb_version"
|
||||
fi
|
||||
setup_osie
|
||||
generate_certificates
|
||||
setup_docker_registry
|
||||
|
||||
echo "$INFO tinkerbell stack setup completed successfully on $lsb_dist server"
|
||||
whats_next
|
||||
whats_next | tee /tmp/post-setup-message
|
||||
)
|
||||
|
||||
# wrapped up in a function so that we have some protection against only getting
|
||||
|
@ -5,14 +5,14 @@ in
|
||||
(_pkgs.fetchFromGitHub {
|
||||
owner = "NixOS";
|
||||
repo = "nixpkgs";
|
||||
#branch@date: nixpkgs-unstable@2020-11-19
|
||||
rev = "4f3475b113c93d204992838aecafa89b1b3ccfde";
|
||||
sha256 = "158iik656ds6i6pc672w54cnph4d44d0a218dkq6npzrbhd3vvbg";
|
||||
#branch@date: master@2021-03-18
|
||||
rev = "800a3dd90970a277e3f6853633bd7faf04d6691e";
|
||||
sha256 = "07gzvf3m3vh9kkig2x9iybv8yr04kvmrx665z0fb0n5h55ha4v8y";
|
||||
}) { }
|
||||
}:
|
||||
|
||||
with pkgs;
|
||||
|
||||
mkShell {
|
||||
buildInputs = [ go nodePackages.prettier shellcheck shfmt terraform gpgme packer vagrant ];
|
||||
buildInputs = [ go nodePackages.prettier jq shellcheck shfmt terraform_0_14 gpgme packer vagrant ];
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@ -16,6 +17,11 @@ import (
|
||||
)
|
||||
|
||||
func TestVagrantSetupGuide(t *testing.T) {
|
||||
_, ok := os.LookupEnv("TEST_WITH_VAGRANT")
|
||||
if !ok {
|
||||
t.Skip("You can run e2e tests that depends from Vagrant setting the envvar TEST_WITH_VAGRANT")
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
machine, err := vagrant.Up(ctx,
|
Loading…
Reference in New Issue
Block a user