[tor-commits] [tor-messenger-build/master] Bug 23385: setup build-sunet-b.torproject.net for doing Tor Messenger builds

boklm at torproject.org boklm at torproject.org
Mon Oct 2 17:36:54 UTC 2017


commit 74e12d3f49bbfe609cab9b76b9d2c58c01867823
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Mon Oct 2 19:35:27 2017 +0200

    Bug 23385: setup build-sunet-b.torproject.net for doing Tor Messenger builds
---
 tools/ansible/Makefile                        |  2 ++
 tools/ansible/README                          | 13 +++++++++++++
 tools/ansible/inventory                       |  5 +++++
 tools/ansible/roles/mta                       |  1 +
 tools/ansible/roles/tbb-builder               |  1 +
 tools/ansible/roles/tm-team/defaults/main.yml |  3 +++
 tools/ansible/roles/tm-team/files/boklm.pub   |  1 +
 tools/ansible/roles/tm-team/tasks/main.yml    | 15 +++++++++++++++
 tools/ansible/roles/unattended-upgrades       |  1 +
 tools/ansible/roles/useful-packages           |  1 +
 tools/ansible/tm-build.yml                    |  9 +++++++++
 tor-browser-build                             |  2 +-
 12 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/tools/ansible/Makefile b/tools/ansible/Makefile
new file mode 100644
index 0000000..2e99a1f
--- /dev/null
+++ b/tools/ansible/Makefile
@@ -0,0 +1,2 @@
+ansible-tm-build:
+	ansible-playbook -i inventory tm-build.yml
diff --git a/tools/ansible/README b/tools/ansible/README
new file mode 100644
index 0000000..0bbdfc4
--- /dev/null
+++ b/tools/ansible/README
@@ -0,0 +1,13 @@
+This directory contains some ansible script that we use to setup some
+machines that we use for Tor Messenger development.
+
+To deploy some changes you need the ansible package to be installed on
+your machine, and be able to log in with ssh as root on the machine(s)
+where the changes need to be deployed.
+
+You can then use one of the following makefile targets:
+
+ansible-tm-build:
+  Deploy changes to the machine used by Tor Messenger team members to do
+  some Tor Messenger builds.
+
diff --git a/tools/ansible/inventory b/tools/ansible/inventory
new file mode 100644
index 0000000..5f9b125
--- /dev/null
+++ b/tools/ansible/inventory
@@ -0,0 +1,5 @@
+build-sunet-b ansible_ssh_user=root ansible_ssh_host=build-sunet-b.torproject.net
+
+[tm-build]
+build-sunet-b
+
diff --git a/tools/ansible/roles/mta b/tools/ansible/roles/mta
new file mode 120000
index 0000000..7b06e8e
--- /dev/null
+++ b/tools/ansible/roles/mta
@@ -0,0 +1 @@
+../../../tor-browser-build/tools/ansible/roles/mta
\ No newline at end of file
diff --git a/tools/ansible/roles/tbb-builder b/tools/ansible/roles/tbb-builder
new file mode 120000
index 0000000..ac19bfc
--- /dev/null
+++ b/tools/ansible/roles/tbb-builder
@@ -0,0 +1 @@
+../../../tor-browser-build/tools/ansible/roles/tbb-builder
\ No newline at end of file
diff --git a/tools/ansible/roles/tm-team/defaults/main.yml b/tools/ansible/roles/tm-team/defaults/main.yml
new file mode 100644
index 0000000..4d118ce
--- /dev/null
+++ b/tools/ansible/roles/tm-team/defaults/main.yml
@@ -0,0 +1,3 @@
+---
+tm_team_members:
+    - boklm
diff --git a/tools/ansible/roles/tm-team/files/boklm.pub b/tools/ansible/roles/tm-team/files/boklm.pub
new file mode 100644
index 0000000..471f271
--- /dev/null
+++ b/tools/ansible/roles/tm-team/files/boklm.pub
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCuY6Clt4tqljhnQAfIAq2RcuB3UgQ1odLtYc+AlnwcgWgYoqByGXT52YnYd44MQ0rPpXGh6M5MeXGF33OOLkBm8QeFHiev4njq/14A5qMIH+xV4T/ft1vEE3PTuarzyhv/Qp1s0dt4/XibzMPND5zFQJUFsTON6WYix0cwBOa80W46P56jPca56kTnL045N8MJNFA4ELby68QaMMK0lEzupgLtzRnqc123paZr3FAgCOxNlYC83ftAsDuVNCzbp0+i3W0ZWBbqVo+wWbty7WJK4TjuQszS2oP+d5xxktXUVyVXu2xm0BV0kXgh6lV4ixDPKQsZrlUYalFN5QIQWwzb q-wo
diff --git a/tools/ansible/roles/tm-team/tasks/main.yml b/tools/ansible/roles/tm-team/tasks/main.yml
new file mode 100644
index 0000000..4ca5a56
--- /dev/null
+++ b/tools/ansible/roles/tm-team/tasks/main.yml
@@ -0,0 +1,15 @@
+---
+- name: Add tm-team users
+  user:
+      name: "{{ item }}"
+      state: present
+      groups: tbb-build
+      shell: /bin/bash
+  with_items: "{{ tm_team_members }}"
+
+- name: Add ssh keys to authorized_keys
+  authorized_key:
+      user: "{{ item }}"
+      state: present
+      key: "{{ lookup('file', item + '.pub') }}"
+  with_items: "{{ tm_team_members }}"
diff --git a/tools/ansible/roles/unattended-upgrades b/tools/ansible/roles/unattended-upgrades
new file mode 120000
index 0000000..536bb5d
--- /dev/null
+++ b/tools/ansible/roles/unattended-upgrades
@@ -0,0 +1 @@
+../../../tor-browser-build/tools/ansible/roles/unattended-upgrades
\ No newline at end of file
diff --git a/tools/ansible/roles/useful-packages b/tools/ansible/roles/useful-packages
new file mode 120000
index 0000000..1b66a9d
--- /dev/null
+++ b/tools/ansible/roles/useful-packages
@@ -0,0 +1 @@
+../../../tor-browser-build/tools/ansible/roles/useful-packages
\ No newline at end of file
diff --git a/tools/ansible/tm-build.yml b/tools/ansible/tm-build.yml
new file mode 100644
index 0000000..09c867d
--- /dev/null
+++ b/tools/ansible/tm-build.yml
@@ -0,0 +1,9 @@
+---
+
+- hosts: tm-build
+  roles:
+      - role: tbb-builder
+      - role: useful-packages
+      - role: tm-team
+      - role: mta
+      - role: unattended-upgrades
diff --git a/tor-browser-build b/tor-browser-build
index 7129913..fd97762 160000
--- a/tor-browser-build
+++ b/tor-browser-build
@@ -1 +1 @@
-Subproject commit 712991345d023d987631a35998df6cf8736b5a2e
+Subproject commit fd97762cb0924eea137896425eab788daef6ca8d



More information about the tor-commits mailing list