Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 23 lines (17 sloc) 1.62 KB
#!/bin/bash
ACRPASSWORD=$1
# Constants not passed in as parameters are populated from environment variables created by the release pipeline
echo "K8SCONFIGPATH is $K8SCONFIGPATH"
echo "RELEASE_ENVIRONMENTNAME is $RELEASE_ENVIRONMENTNAME"
echo "ACRAUTHENTICATIONSECRETNAME is $ACRAUTHENTICATIONSECRETNAME"
echo "ACRNAME is $ACRNAME"
echo "ACRPASSWORD is $ACRPASSWORD"
echo "APPINSIGHTSINSTRUMENTATIONKEY is $APPINSIGHTSINSTRUMENTATIONKEY"
# namespace
kubectl --kubeconfig $AGENT_TEMPDIRECTORY/config apply -f $K8SCONFIGPATH/namespace-$RELEASE_ENVIRONMENTNAME.yaml
# container registry credentials
kubectl --kubeconfig $AGENT_TEMPDIRECTORY/config create secret docker-registry $ACRAUTHENTICATIONSECRETNAME --namespace=$RELEASE_ENVIRONMENTNAME --docker-server=$ACRNAME.azurecr.io --docker-username=$ACRNAME --docker-password=$ACRPASSWORD --dry-run -o yaml | kubectl --kubeconfig $AGENT_TEMPDIRECTORY/config apply -f -
# MESSAGE_QUEUE_URL configmap (not used directly by message-queue deployment but configured here as used by several components)
kubectl --kubeconfig $AGENT_TEMPDIRECTORY/config create configmap message.queue --from-literal=MESSAGE_QUEUE_URL=nats://message-queue-service.$RELEASE_ENVIRONMENTNAME:4222 --namespace=$RELEASE_ENVIRONMENTNAME --dry-run -o yaml | kubectl --kubeconfig $AGENT_TEMPDIRECTORY/config apply -f -
# APP_INSIGHTS_INSTRUMENTATION_KEY configmap
kubectl --kubeconfig $AGENT_TEMPDIRECTORY/config create configmap appinsights.env --from-literal=APP_INSIGHTS_INSTRUMENTATION_KEY=$APPINSIGHTSINSTRUMENTATIONKEY --namespace=$RELEASE_ENVIRONMENTNAME --dry-run -o yaml | kubectl --kubeconfig $AGENT_TEMPDIRECTORY/config apply -f -