Skip to content

Commit

Permalink
Update deploy_k8s.sh (#101)
Browse files Browse the repository at this point in the history
* Update deploy_k8s.sh

* Update deploy_k8s.sh

* Update deploy_k8s.sh

* Update deploy_k8s.sh
  • Loading branch information
leogao2 committed Jan 27, 2021
1 parent b87875f commit c2584b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deploy_k8s.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
BRANCH=$1

echo STARTING KUBERNETES USING CODE ON BRANCH $BRANCH. LOCAL CHANGES WILL NOT BE AVAILABLE

kubectl delete deploy/eleuther-neox
kubectl apply -f kubernetes/deploy_k8s.yml
ssh-keygen -t rsa -f id_rsa -N ""
Expand All @@ -16,7 +20,7 @@ for id in $(kubectl get pods | grep eleuther-neox | awk '{print $1}')
do
echo copying keys to $id
kubectl cp $PWD/authorized_keys $id:/root/.ssh/
echo 'chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chown -R root /root/.ssh' | kubectl exec --stdin $id -- /bin/bash
echo "chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chown -R root /root/.ssh && git commit -- Dockerfile && git checkout $BRANCH && git pull origin $BRANCH" | kubectl exec --stdin $id -- /bin/bash
done
rm authorized_keys hostfile
rm id_rsa*
Expand Down

0 comments on commit c2584b2

Please sign in to comment.