147
147
CLUSTER_PORT=" 8443"
148
148
149
149
# Extract the client certificate data
150
- CLIENT_CERTIFICATE=$( docker run --rm -v / $HOME /octoconfig.yml:/workdir/octoconfig.yml:Z mikefarah/yq ' .users[0].user.client-certificate' octoconfig.yml)
151
- CLIENT_KEY=$( docker run --rm -v / $HOME /octoconfig.yml:/workdir/octoconfig.yml:Z mikefarah/yq ' .users[0].user.client-key' octoconfig.yml)
150
+ CLIENT_CERTIFICATE=$( docker run --rm -v $HOME /octoconfig.yml:/workdir/octoconfig.yml:Z mikefarah/yq ' .users[0].user.client-certificate' octoconfig.yml)
151
+ CLIENT_KEY=$( docker run --rm -v $HOME /octoconfig.yml:/workdir/octoconfig.yml:Z mikefarah/yq ' .users[0].user.client-key' octoconfig.yml)
152
152
153
153
# Create a self contained PFX certificate
154
154
openssl pkcs12 -export -name ' test.com' -password ' pass:Password01!' -out /tmp/kind.pfx -inkey " ${CLIENT_KEY} " -in " ${CLIENT_CERTIFICATE} "
@@ -829,7 +829,7 @@ publish_runbook "PR Checks" "PR Check"
829
829
if [[ " ${INSTALL_ARGO} " == " TRUE" ]]
830
830
then
831
831
# Get the Argo CD password
832
- PASSWORD=$( KUBECONFIG=/tmp /octoconfig.yml argocd admin initial-password -n argocd)
832
+ PASSWORD=$( KUBECONFIG=$HOME /octoconfig.yml argocd admin initial-password -n argocd)
833
833
# Extract the first line of the output, which is the password
834
834
PASSWORDARRAY=(${PASSWORD[@]} )
835
835
@@ -844,12 +844,12 @@ then
844
844
(( counter++ ))
845
845
846
846
# Generate a token for the user octopus
847
- TOKEN=$( KUBECONFIG=/tmp /octoconfig.yml kubectl run --rm -i --image=argoproj/argocd argocdinit${counter} -- /bin/bash -c " argocd login --insecure argocd-server.argocd.svc.cluster.local --username admin --password ${PASSWORDARRAY[0]} >/dev/null; argocd account generate-token --account octopus" )
847
+ TOKEN=$( KUBECONFIG=$HOME /octoconfig.yml kubectl run --rm -i --image=argoproj/argocd argocdinit${counter} -- /bin/bash -c " argocd login --insecure argocd-server.argocd.svc.cluster.local --username admin --password ${PASSWORDARRAY[0]} >/dev/null; argocd account generate-token --account octopus" )
848
848
849
849
exit_code=$?
850
850
851
851
# sometimes these pods do not clean themselves up, so force the deletion
852
- KUBECONFIG=/tmp /octoconfig.yml kubectl delete pod argocdinit${counter} -n default --grace-period=0 --force > /dev/null 2>&1
852
+ KUBECONFIG=$HOME /octoconfig.yml kubectl delete pod argocdinit${counter} -n default --grace-period=0 --force > /dev/null 2>&1
853
853
854
854
# Remove the messages captured after the token about the pod being removed
855
855
TOKEN=${TOKEN%% pod \" * }
@@ -858,13 +858,13 @@ then
858
858
done
859
859
860
860
# Save the token in a secret
861
- KUBECONFIG=/tmp /octoconfig.yml kubectl create secret generic octoargosync-secret --from-literal=argotoken=${TOKEN} -n argocd
861
+ KUBECONFIG=$HOME /octoconfig.yml kubectl create secret generic octoargosync-secret --from-literal=argotoken=${TOKEN} -n argocd
862
862
# Deploy the octopus argo cd sync service
863
- KUBECONFIG=/tmp /octoconfig.yml kubectl apply -f argocd/argocd-config/octoargosync.yaml
863
+ KUBECONFIG=$HOME /octoconfig.yml kubectl apply -f argocd/argocd-config/octoargosync.yaml
864
864
# Deploy the sample apps
865
- KUBECONFIG=/tmp /octoconfig.yml kubectl apply -f argocd/app-of-apps-gitea.yaml
865
+ KUBECONFIG=$HOME /octoconfig.yml kubectl apply -f argocd/app-of-apps-gitea.yaml
866
866
# Get the admin login
867
- ARGO_PASSWORD=$( KUBECONFIG=/tmp /octoconfig.yml argocd admin initial-password -n argocd)
867
+ ARGO_PASSWORD=$( KUBECONFIG=$HOME /octoconfig.yml argocd admin initial-password -n argocd)
868
868
# Remove the messages captured after the token about the password needing to be changed
869
869
ARGO_PASSWORD=${ARGO_PASSWORD%% This password * }
870
870
# Remove trailing whitespace (https://stackoverflow.com/a/3352015/8246539)
@@ -931,12 +931,12 @@ echo "Open Octopus at http://localhost:18080 - username is \"admin\" and passwor
931
931
echo " Open Gitea at http://localhost:3000 - username is \" octopus\" and password is \" Password01!\" " >> keys.txt
932
932
if [[ " ${INSTALL_ARGO} " == " TRUE" ]]
933
933
then
934
- echo " Start a minikube tunnel in Linux/macOS with: KUBECONFIG=/tmp /octoconfig.yml minikube tunnel" >> keys.txt
935
- echo " Start a minikube tunnel in WSL with: MINIKUBE_HOME=\"\$ HOME/.minikube\" KUBECONFIG=/tmp /octoconfig.yml sudo --preserve-env=MINIKUBE_HOME --preserve-env=KUBECONFIG minikube tunnel" >> keys.txt
936
- echo " Wait for the Argo CD pods to start. You can see their status with: KUBECONFIG=/tmp /octoconfig.yml kubectl get pods -n argocd" >> keys.txt
937
- echo " Find the Argo CD IP address with: KUBECONFIG=/tmp /octoconfig.yml kubectl get service argocd-server -n argocd" >> keys.txt
938
- echo " Get the initial Argo CD admin password with: KUBECONFIG=/tmp /octoconfig.yml argocd admin initial-password -n argocd" >> keys.txt
939
- echo " Get the logs for the OctopusArgoCDProxy with: KUBECONFIG=/tmp /octoconfig.yml kubectl logs -f deployment/octoargosync -n argocd" >> keys.txt
934
+ echo " Start a minikube tunnel in Linux/macOS with: KUBECONFIG=$HOME /octoconfig.yml minikube tunnel" >> keys.txt
935
+ echo " Start a minikube tunnel in WSL with: MINIKUBE_HOME=\"\$ HOME/.minikube\" KUBECONFIG=$HOME /octoconfig.yml sudo --preserve-env=MINIKUBE_HOME --preserve-env=KUBECONFIG minikube tunnel" >> keys.txt
936
+ echo " Wait for the Argo CD pods to start. You can see their status with: KUBECONFIG=$HOME /octoconfig.yml kubectl get pods -n argocd" >> keys.txt
937
+ echo " Find the Argo CD IP address with: KUBECONFIG=$HOME /octoconfig.yml kubectl get service argocd-server -n argocd" >> keys.txt
938
+ echo " Get the initial Argo CD admin password with: KUBECONFIG=$HOME /octoconfig.yml argocd admin initial-password -n argocd" >> keys.txt
939
+ echo " Get the logs for the OctopusArgoCDProxy with: KUBECONFIG=$HOME /octoconfig.yml kubectl logs -f deployment/octoargosync -n argocd" >> keys.txt
940
940
echo " ArgoCD token for account octopus is: ${TOKEN%% pod \" * } " >> keys.txt
941
941
echo " ArgoCD password is: ${ARGO_PASSWORD} " >> keys.txt
942
942
fi
0 commit comments