Skip to content

Commit 6345583

Browse files
author
Federico Ceratto
committed
Deploy fastpath
Push sshfeeder pubkey on collectors
1 parent af57e44 commit 6345583

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-0
lines changed

ansible/deploy-fastpath.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
- import_playbook: ansible-version.yml
3+
4+
- hosts: fastpath.ooni.nu
5+
roles:
6+
- role: fastpath

ansible/inventory

+3
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ staticiforme.torproject.org # tor LDAP
193193
[no_nodeexp:children]
194194
no_passwd # no passwd => no nodeexp user ;-)
195195

196+
[fastpath]
197+
fastpath.ooni.nu
198+
196199
########################################################################
197200
# TO DELETE.
198201
# Stopped VMs that should be deleted from GH and DNS after some grace period:

ansible/roles/fastpath/tasks/main.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
3+
# Deploy the fastpath
4+
#
5+
# Deploy .deb package to the fastpath host
6+
#
7+
# Fetch SSH pubkey and deploy it on the collector hosts
8+
#
9+
# Set the hostname of the collectors in the fastpath config file
10+
11+
# Usage: place the .deb file in files/
12+
# update the version number as needed
13+
14+
- name: copy fastpath .deb package
15+
copy:
16+
src: files/fastpath_0.1_all.deb
17+
dest: /root/
18+
owner: root
19+
group: root
20+
mode: '0644'
21+
22+
# Leave a copy of the .deb in /root as an emergency backup for rollbacks
23+
24+
- name: install .deb using dpkg
25+
apt:
26+
deb: '{{ item }}'
27+
state: present
28+
with_items:
29+
- /root/fastpath_0.1_all.deb
30+
31+
- name: Fetch sshfeeder pubkey from fastpath host
32+
slurp:
33+
src: /var/lib/fastpath/ssh/id_ed25519.pub
34+
register: sshfeeder_pubkey_b64encoded
35+
36+
- name: generate fastpath.conf file with collectors
37+
template:
38+
owner: "root"
39+
group: "root"
40+
mode: '0644'
41+
src: "fastpath.conf.j2"
42+
dest: "/etc/fastpath.conf"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Deployed by ansible
2+
# deploy-fastpath.yml
3+
# roles/fastpath/tasks/main.yml
4+
# roles/fastpath/templates/fastpath.conf.j2
5+
6+
[DEFAULT]
7+
collectors = {{ groups['have_collector'] | join(' ') }}

0 commit comments

Comments
 (0)