terraform: Download for Macos, increase mem
This commit is contained in:
parent
af1d217b33
commit
f9687c6773
|
@ -0,0 +1,22 @@
|
|||
apiVersion: spinnaker.io/v1alpha2
|
||||
kind: SpinnakerService
|
||||
metadata:
|
||||
name: spinnaker
|
||||
spec:
|
||||
spinnakerConfig:
|
||||
config:
|
||||
version: 1.33.0
|
||||
persistentStorage:
|
||||
persistentStoreType: s3
|
||||
# Spinnaker stores application and pipeline definitions here
|
||||
# Create an S3 bucket and provide the name here
|
||||
s3:
|
||||
bucket: ob-spinnaker-artifacts-dev
|
||||
rootFolder: front50
|
||||
# spec.expose - This section defines how Spinnaker should be publicly exposed
|
||||
expose:
|
||||
# Kubernetes LoadBalancer type (service/ingress)
|
||||
# Only "service" is supported for now
|
||||
type: service
|
||||
service:
|
||||
type: LoadBalancer
|
|
@ -30,12 +30,12 @@ FLUX_FORCE_LOCAL=1
|
|||
readonly FLUX_FORCE_LOCAL
|
||||
TF_VERSION="1.6.6"
|
||||
readonly TF_VERSION
|
||||
TF_ARCHIVE="terraform_${TF_VERSION}_linux_amd64.zip"
|
||||
readonly TF_ARCHIVE
|
||||
TF_ARCHIVE_LINUX="terraform_${TF_VERSION}_linux_amd64.zip"
|
||||
readonly TF_ARCHIVE_LINUX
|
||||
TF_ARCHIVE_MACOS="terraform_${TF_VERSION}_darwin_arm64.zip"
|
||||
readonly TF_ARCHIVE_MACOS
|
||||
TF_CHECKSUM=""
|
||||
readonly TF_CHECKSUM
|
||||
TF_URL="https://releases.hashicorp.com/terraform/${TF_VERSION}/${TF_ARCHIVE}"
|
||||
readonly TF_URL
|
||||
TF_FORCE_LOCAL=1
|
||||
readonly TF_FORCE_LOCAL
|
||||
OS="Linux"
|
||||
|
@ -55,9 +55,13 @@ printf "Running on ${OS}\n"
|
|||
if [[ "$OS" = "macos" ]]; then
|
||||
FLUX_URL="${FLUX_URL_MACOS}"
|
||||
FLUX_ARCHIVE="${FLUX_ARCHIVE_MACOS}"
|
||||
TF_ARCHIVE="${TF_ARCHIVE_MACOS}"
|
||||
TF_URL="https://releases.hashicorp.com/terraform/${TF_VERSION}/${TF_ARCHIVE}"
|
||||
else
|
||||
FLUX_URL="${FLUX_URL_LINUX}"
|
||||
FLUX_ARCHIVE="${FLUX_ARCHIVE_MACOS}"
|
||||
FLUX_ARCHIVE="${FLUX_ARCHIVE_LINUX}"
|
||||
TF_ARCHIVE="${TF_ARCHIVE_LINUX}"
|
||||
TF_URL="https://releases.hashicorp.com/terraform/${TF_VERSION}/${TF_ARCHIVE}"
|
||||
fi
|
||||
|
||||
# We prefer podman but Ubuntu's podman is too old
|
||||
|
@ -67,7 +71,11 @@ fi
|
|||
|
||||
# Start minikube
|
||||
if ! $(minikube status | grep Nonexistent\|Stopped); then
|
||||
printf 'minikube is not running\nStarting minikube..'
|
||||
printf 'minikube is not running\nStarting minikube..\n'
|
||||
# Increase memory from default 2G
|
||||
podman machine set --memory=4096
|
||||
podman machine start
|
||||
minikube config set memory 3800
|
||||
if [[ 0 == "${VERBOSE}" ]]; then
|
||||
minikube start --driver="${minikube_driver}"
|
||||
else
|
||||
|
@ -93,9 +101,13 @@ fi
|
|||
|
||||
# Install terraform if local version enforced
|
||||
if [[ "$TF_FORCE_LOCAL" = 1 ]]; then
|
||||
if [[ -e "$TF_ARCHIVE}" ]]; then
|
||||
printf "terraform binary exists\n"
|
||||
else
|
||||
printf "Fetching terraform archive..\n"
|
||||
curl -LO "${TF_URL}"
|
||||
unzip "${TF_ARCHIVE}"
|
||||
unzip -n "${TF_ARCHIVE}"
|
||||
fi
|
||||
TF_CMD="./terraform"
|
||||
else
|
||||
TF_CMD="terraform"
|
||||
|
|
Loading…
Reference in New Issue