Russ Cox | 1fc394e | 2017-10-04 15:26:49 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Copyright 2017 The Go Authors. All rights reserved. |
| 3 | # Use of this source code is governed by a BSD-style |
| 4 | # license that can be found in the LICENSE file. |
| 5 | |
| 6 | set -e |
| 7 | |
| 8 | gcloud compute instances delete vcs-test --zone=us-central1-a |
| 9 | gcloud compute instances create vcs-test --zone=us-central1-a \ |
| 10 | --address vcs-test \ |
| 11 | --image-project debian-cloud --image-family debian-9 \ |
Alexander Rakoczy | 922e354 | 2021-10-08 17:03:24 -0400 | [diff] [blame] | 12 | --machine-type e2-standard-1 \ |
Russ Cox | 1fc394e | 2017-10-04 15:26:49 -0400 | [diff] [blame] | 13 | --service-account=vcs-test@symbolic-datum-552.iam.gserviceaccount.com \ |
Filippo Valsorda | 92cee07 | 2018-08-21 12:20:46 -0600 | [diff] [blame] | 14 | --scopes cloud-platform \ |
Russ Cox | 1fc394e | 2017-10-04 15:26:49 -0400 | [diff] [blame] | 15 | --tags=allow-ssh,http-server,https-server |
| 16 | |
| 17 | while sleep 5 && ! gcloud compute ssh vcs-test -- date; do |
| 18 | echo 'waiting for machine to respond to ssh...' |
| 19 | done |
| 20 | |
| 21 | gcloud compute ssh vcs-test -- sudo -n bash -c \'' |
| 22 | mkdir -p /home/vcweb/svn |
| 23 | chown -R uucp:uucp /home/vcweb |
Filippo Valsorda | 92cee07 | 2018-08-21 12:20:46 -0600 | [diff] [blame] | 24 | chmod -R 777 /home/vcweb |
Russ Cox | 1fc394e | 2017-10-04 15:26:49 -0400 | [diff] [blame] | 25 | apt-get update |
| 26 | apt-get install -y mercurial fossil bzr git apache2 ed subversion libapache2-mod-svn |
| 27 | perl -pie 's/80/8888/' /etc/apache2/ports.conf |
| 28 | echo " |
| 29 | <Location /svn> |
| 30 | DAV svn |
| 31 | SVNParentPath /home/vcweb/svn |
| 32 | <LimitExcept GET PROPFIND OPTIONS REPORT> |
| 33 | Require all denied |
| 34 | </LimitExcept> |
| 35 | </Location> |
| 36 | " >/etc/apache2/mods-enabled/dav_svn.conf |
| 37 | apache2ctl restart |
| 38 | systemctl enable apache2.service |
| 39 | '\' |