infra/codestorage/hg-ssh

Paddy 2015-10-15 Parent:bf7b66df555f

6:4c6afe37e83a Go to Latest

infra/codestorage/hg-ssh/run.sh

Pull hostkeys when pulling SSH keys. Rather than relying on Kubernetes secrets and baking public keys right in, which was bound to get fraught, we now have some graceful degradation. It defaults to automatically-generated random keys, but will try to download some keys from Google Cloud Storage for the host. If it can find some, it'll try to use those, instead.

History
1 #!/bin/bash
3 # We need to reexecute these commands
4 # because Kubernetes doesn't use the
5 # VOLUME commands in the Dockerfiles
6 # when using volumes. So this makes
7 # things work on Kubernetes, but the
8 # Dockerfile makes things work when
9 # running locally.
10 mkdir -p /mounted/repos
11 chgrp -R committers /mounted
12 chmod -R 0770 /mounted
14 /bin/bash /usr/local/bin/helpers/pull.sh
15 /bin/bash /usr/local/bin/helpers/pullkeys.sh
17 /usr/sbin/sshd -D