#!/bin/bash
#
# Copyright (c) 2018 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

export TF_VAR_auth_token="${PACKET_AUTH_TOKEN}"
export TF_VAR_master1_hostname="ci-${CIRCLE_BUILD_NUM}-master1"
export TF_VAR_worker1_1_hostname="ci-${CIRCLE_BUILD_NUM}-worker1-1"
export TF_VAR_master2_hostname="ci-${CIRCLE_BUILD_NUM}-master2"
export TF_VAR_worker2_1_hostname="ci-${CIRCLE_BUILD_NUM}-worker2-1"
export TF_VAR_project_id="${PACKET_PROJECT_ID}"
export TF_VAR_public_key="${PWD}/terraform/sshkey.pub"
export TF_VAR_public_key_name="key-${CIRCLE_BUILD_NUM}"
export TF_LOG=DEBUG

echo "workdir: ${PWD}"
make packet-init
make packet-start
#./provision.sh "$1" "$K8S_DEPLOYMENT_NAME" file
