Enable skipping of network in setup.sh

* Fixed path to deploy dir in log message
* Allow TINKERBELL_CIDR and TINKERBELL_HOST_IP to be overridable
* Set environment variables for tink cli in .env

Signed-off-by: Micah Hausler <mhausler@amazon.com>
This commit is contained in:
Micah Hausler 2021-06-16 17:33:47 -04:00
parent 1760df0caf
commit 7182ca0811
2 changed files with 10 additions and 4 deletions

View File

@ -70,14 +70,14 @@ generate_env() (
# Decide on a subnet for provisioning. Tinkerbell should "own" this # Decide on a subnet for provisioning. Tinkerbell should "own" this
# network space. Its subnet should be just large enough to be able # network space. Its subnet should be just large enough to be able
# to provision your hardware. # to provision your hardware.
export TINKERBELL_CIDR=29 export TINKERBELL_CIDR=${TINKERBELL_CIDR:-"29"}
# Host IP is used by provisioner to expose different services such as # Host IP is used by provisioner to expose different services such as
# tink, boots, etc. # tink, boots, etc.
# #
# The host IP should the first IP in the range, and the Nginx IP # The host IP should the first IP in the range, and the Nginx IP
# should be the second address. # should be the second address.
export TINKERBELL_HOST_IP=192.168.1.1 export TINKERBELL_HOST_IP=${TINKERBELL_HOST_IP:-"192.168.1.1"}
# Tink server username and password # Tink server username and password
export TINKERBELL_TINK_USERNAME=admin export TINKERBELL_TINK_USERNAME=admin
@ -87,6 +87,10 @@ generate_env() (
export TINKERBELL_REGISTRY_USERNAME=admin export TINKERBELL_REGISTRY_USERNAME=admin
export TINKERBELL_REGISTRY_PASSWORD="$registry_password" 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: # Legacy options, to be deleted:
export FACILITY=onprem export FACILITY=onprem
export ROLLBAR_TOKEN=ignored export ROLLBAR_TOKEN=ignored

View File

@ -478,7 +478,7 @@ check_prerequisites() (
) )
whats_next() ( whats_next() (
echo "$NEXT 1. Enter /vagrant/deploy and run: source ../.env; docker-compose up -d" echo "$NEXT 1. Enter /deploy and run: source ../.env; docker-compose up -d"
echo "$BLANK 2. Try executing your first workflow." 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." echo "$BLANK Follow the steps described in https://tinkerbell.org/examples/hello-world/ to say 'Hello World!' with a workflow."
) )
@ -499,7 +499,9 @@ do_setup() (
# shellcheck disable=SC1090 # shellcheck disable=SC1090
source "$ENV_FILE" source "$ENV_FILE"
setup_networking "$lsb_dist" "$lsb_version" if [[ -z $TINKERBELL_SKIP_NETWORKING ]]; then
setup_networking "$lsb_dist" "$lsb_version"
fi
setup_osie setup_osie
generate_certificates generate_certificates
setup_docker_registry setup_docker_registry