aboutsummaryrefslogtreecommitdiffstats
path: root/etc/taskcluster/macos
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-11-09 15:43:57 +0100
committerSimon Sapin <simon.sapin@exyr.org>2018-11-10 17:33:43 +0100
commitf4c11ad7b920550851cf19965a5b2559be765066 (patch)
tree07f62f7d2f29072f78389bdc9acdbfec0f5cceb8 /etc/taskcluster/macos
parentb60006ae11485e432308cbecd310ff19119de5e3 (diff)
downloadservo-f4c11ad7b920550851cf19965a5b2559be765066.tar.gz
servo-f4c11ad7b920550851cf19965a5b2559be765066.zip
Initial agentless SaltStack config for generic-worker on macOS
Diffstat (limited to 'etc/taskcluster/macos')
-rw-r--r--etc/taskcluster/macos/.gitignore1
-rw-r--r--etc/taskcluster/macos/README.md16
-rw-r--r--etc/taskcluster/macos/Saltfile2
-rw-r--r--etc/taskcluster/macos/config/master4
-rw-r--r--etc/taskcluster/macos/config/roster2
-rwxr-xr-xetc/taskcluster/macos/salt-ssh14
-rw-r--r--etc/taskcluster/macos/states/generic-worker.sls23
-rw-r--r--etc/taskcluster/macos/states/top.sls3
8 files changed, 65 insertions, 0 deletions
diff --git a/etc/taskcluster/macos/.gitignore b/etc/taskcluster/macos/.gitignore
new file mode 100644
index 00000000000..96286f5841e
--- /dev/null
+++ b/etc/taskcluster/macos/.gitignore
@@ -0,0 +1 @@
+.salt
diff --git a/etc/taskcluster/macos/README.md b/etc/taskcluster/macos/README.md
new file mode 100644
index 00000000000..1ca96baa10b
--- /dev/null
+++ b/etc/taskcluster/macos/README.md
@@ -0,0 +1,16 @@
+# macOS
+
+Servo’s macOS workers for Taskcluster are configured with
+SaltStack in [agentless] mode.
+
+[agentless]: https://docs.saltstack.com/en/getstarted/ssh/index.html
+
+Either run `./salt-ssh`
+to automatically install `salt-ssh` in `mach`’s existing Python virtualenv,
+or install `salt-ssh` through some other mean and run in from this directory.
+
+```sh
+cd etc/taskcluster/macos
+./salt-ssh '*' test.ping
+./salt-ssh '*' state.apply test=True
+``` \ No newline at end of file
diff --git a/etc/taskcluster/macos/Saltfile b/etc/taskcluster/macos/Saltfile
new file mode 100644
index 00000000000..044cd70e61e
--- /dev/null
+++ b/etc/taskcluster/macos/Saltfile
@@ -0,0 +1,2 @@
+salt-ssh:
+ config_dir: ./config \ No newline at end of file
diff --git a/etc/taskcluster/macos/config/master b/etc/taskcluster/macos/config/master
new file mode 100644
index 00000000000..cf59c94f2a9
--- /dev/null
+++ b/etc/taskcluster/macos/config/master
@@ -0,0 +1,4 @@
+root_dir: .salt
+file_roots:
+ base:
+ - states \ No newline at end of file
diff --git a/etc/taskcluster/macos/config/roster b/etc/taskcluster/macos/config/roster
new file mode 100644
index 00000000000..ddfe7089497
--- /dev/null
+++ b/etc/taskcluster/macos/config/roster
@@ -0,0 +1,2 @@
+mac1:
+ host: servo-tc-mac1.servo.org \ No newline at end of file
diff --git a/etc/taskcluster/macos/salt-ssh b/etc/taskcluster/macos/salt-ssh
new file mode 100755
index 00000000000..5a6439a18e2
--- /dev/null
+++ b/etc/taskcluster/macos/salt-ssh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+set -o errexit
+set -o nounset
+set -o pipefail
+
+cd "$(dirname $0)"
+VENV_BIN="../../../python/_virtualenv/bin"
+[ -x "${VENV_BIN}/salt-ssh" ] || "${VENV_BIN}/pip" install salt-ssh
+"${VENV_BIN}/salt-ssh" "${@}" \ No newline at end of file
diff --git a/etc/taskcluster/macos/states/generic-worker.sls b/etc/taskcluster/macos/states/generic-worker.sls
new file mode 100644
index 00000000000..e07c7fbd5bc
--- /dev/null
+++ b/etc/taskcluster/macos/states/generic-worker.sls
@@ -0,0 +1,23 @@
+/usr/local/bin/generic-worker:
+ file.managed:
+ - name:
+ - source: https://github.com/taskcluster/generic-worker/releases/download/v11.0.1/generic-worker-darwin-amd64
+ - source_hash: sha256=059331865670d3722a710f0b6f4dae97d347811cc347d1810c6dfc1b413c4b48
+ - mode: 755
+ - makedirs: True
+
+/usr/local/bin/livelog:
+ file.managed:
+ - source: https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-darwin-amd64
+ - source_hash: sha256=be5d4b998b208afd802ac6ce6c4d4bbf0fb3816bb039a300626abbc999dfe163
+ - mode: 755
+ - makedirs: True
+
+/etc/generic-worker:
+ file.directory:
+ - dir_mode: 700
+
+generic-worker new-openpgp-keypair --file /etc/generic-worker/key:
+ cmd.run:
+ - creates: /etc/generic-worker/key
+ - prepend_path: /usr/local/bin \ No newline at end of file
diff --git a/etc/taskcluster/macos/states/top.sls b/etc/taskcluster/macos/states/top.sls
new file mode 100644
index 00000000000..79f7a40eed3
--- /dev/null
+++ b/etc/taskcluster/macos/states/top.sls
@@ -0,0 +1,3 @@
+base:
+ 'mac*':
+ - generic-worker \ No newline at end of file