This repository has been archived by the owner on Nov 21, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autoconfig on ec2, start stunnel in script, change to IP addresses in…
… stunnel config.
- Loading branch information
Showing
3 changed files
with
31 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[9987] | ||
client = yes | ||
accept = 127.0.0.1:9987 | ||
connect = rust1.vm.labs.scl3.mozilla.com:9988 | ||
connect = 10.22.112.51:9988 | ||
cafile = c:/bot/rust-bot-cert.pem | ||
verify = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,41 @@ | ||
#!/bin/sh | ||
|
||
echo "Enter slave name: " | ||
read SLAVENAME | ||
if [ ! -d slave ] | ||
then | ||
echo "No slave/ dir, setting up..." | ||
if hostname | grep -q '^ip-' | ||
then | ||
echo "Guessing we are on EC2, reading user-data" | ||
read SLAVENAME PASSWORD <<EOF | ||
`curl -s http://169.254.169.254/latest/user-data` | ||
EOF | ||
else | ||
echo "Enter slave name: " | ||
read SLAVENAME | ||
echo "Enter slave password: " | ||
read PASSWORD | ||
fi | ||
|
||
echo "Enter slave password: " | ||
read PASSWORD | ||
echo "creating slave: ${SLAVENAME:?}" | ||
buildslave create-slave slave localhost:9987 "${SLAVENAME:?}" "${PASSWORD:?}" | ||
echo "[email protected]" >slave/info/admin | ||
echo $HOSTNAME >slave/info/host | ||
fi | ||
|
||
echo "creating slave: $SLAVENAME" | ||
buildslave create-slave slave localhost:9987 "${SLAVENAME}" "${PASSWORD}" | ||
echo "[email protected]" >slave/info/admin | ||
echo $HOSTNAME >slave/info/host | ||
case $MACHTYPE in | ||
*-msys) | ||
# service will start via service console | ||
;; | ||
*) | ||
echo "starting stunnel..." | ||
for s in stunnel4 stunnel | ||
do | ||
if which $s | ||
then | ||
$s rust-buildbot-slave-stunnel.conf || echo "stunnel startup failed, already running?" | ||
fi | ||
done | ||
echo "starting slave..." | ||
(cd slave && buildslave stop; buildslave start) | ||
buildslave restart slave | ||
;; | ||
esac |