Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deploy_k8s.sh #101

Merged
merged 4 commits into from
Jan 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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