Commit bcc6df19 authored by Sohel Saiyed's avatar Sohel Saiyed

Update env_variable.sh

parent 25a6fa50
Pipeline #25712 failed with stages
in 1 minute and 33 seconds
......@@ -68,6 +68,29 @@ echo [default] >> ~/.aws/credentials
eval echo aws_access_key_id=${TF_AWS_ACCESS_KEY_ID} >> ~/.aws/credentials
eval echo aws_secret_access_key=${TF_AWS_SECRET_ACCESS_KEY} >> ~/.aws/credentials
terraform init
echo yes | terraform apply -target=rancher2_cluster.aae-cluster
export KUBECONFIG=$PWD/.terraform/kubeconfig
echo "$(terraform output kube_config)" > $KUBECONFIG
kubectl cluster-info
export NAMESPACE=kube-system
export SERVICEACCOUNT=alfresco-deployment-service
kubectl create serviceaccount -n kube-system ${SERVICEACCOUNT}
kubectl create clusterrolebinding ${SERVICEACCOUNT}-admin-binding --clusterrole cluster-admin --serviceaccount=${NAMESPACE}:${SERVICEACCOUNT}
echo "kubernetes_token = \"$(kubectl -n ${NAMESPACE} get secret $(kubectl -n ${NAMESPACE} get serviceaccount ${SERVICEACCOUNT} -o jsonpath='{.secrets[0].name}') -o jsonpath='{.data.token}' | base64 --decode)\"" >> terraform.tfvars
echo "my_ip_address = \"$(curl https://ipecho.net/plain)/32\"" >> terraform.tfvars
echo yes | terraform apply
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment