Patching Dec 9, 2021 6-7a CST- All GitLab services may be unavailable for 5-10 minutes

zyregw.yml 4.93 KB
Newer Older
Alexander Withers's avatar
Alexander Withers committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
---

- name: Creates /usr/local/src directory
  file: path=/usr/local/src state=directory

- stat: path=/usr/local/gateway
  register: gatewaydir
- name: remove existing gatewaydir
  command: rm -rf /usr/local/gateway
  when: gatewaydir.stat.exists == True
- name: Copy over gateway.s
  synchronize: mode=pull src=gateway.s dest=/usr/local
- name: rename gateway dir
  command: mv /usr/local/gateway.s /usr/local/gateway

# using static binaries, don't compile for now
# install libzmq
#- name: Creates libzmq directory
#  file: path=/usr/local/src/libzmq state=directory
#- git:
#    repo: https://github.com/zeromq/libzmq.git 
#    dest: /usr/local/src/libzmq
#- name: autogen.sh libzmq
#  command: ./autogen.sh
#  args:
#    chdir: "/usr/local/src/libzmq"
#- name: configure libzmq
#  command: ./configure
#  args:
#    chdir: "/usr/local/src/libzmq"
#- name: make libzmq
#  command: make
#  args:
#    chdir: "/usr/local/src/libzmq"
#- name: make install libzmq
#  command: make install
#  args:
#    chdir: "/usr/local/src/libzmq"
#- name: run ldconfig
#  command: ldconfig

# install czmq
#- name: czmq git hack part1, fixme
#  command: rm -rf /usr/local/src/czmq.moved
#- stat: path=/usr/local/src/czmq
#  register: czmqsourcedir
#- name: czmq git hack part2, fixme
#  command: mv /usr/local/src/czmq /usr/local/src/czmq.moved
#  when: czmqsourcedir.stat.exists == True
#- name: Creates czmq directory
#  file: path=/usr/local/src/czmq state=directory
#- name: git czmq
#  git:
#    repo: git://github.com/wesyoung/czmq.git
#    version: feat/curve
#    force: yes
#    dest: /usr/local/src/czmq
#- name: czmq git add upstream
#  command: git remote add upstream git://github.com/zeromq/czmq.git
#  args:
#    chdir: "/usr/local/src/czmq"
#- name: czmq git fetch
#  command: git fetch
#  args:
#    chdir: "/usr/local/src/czmq"
#- name: czmq git add upstream
#  command: git pull --no-commit upstream master
#  args:
#    chdir: "/usr/local/src/czmq"
#- name: autogen.sh czmq
#  command: ./autogen.sh
#  args:
#    chdir: "/usr/local/src/czmq"
#- name: configure czmq
#  command: ./configure
#  args:
#    chdir: "/usr/local/src/czmq"
#- name: make czmq
#  command: make
#  args:
#    chdir: "/usr/local/src/czmq"
#- name: make install czmq
#  command: make install
#  args:
#    chdir: "/usr/local/src/czmq"
#- name: run ldconfig
#  command: ldconfig
#
## install zyre
#- name: Creates zyre directory
#  file: path=/usr/local/src/zyre state=directory
#- git:
#    repo: git://github.com/JustinAzoff/zyre.git
#    version: curve_merges
#    dest: /usr/local/src/zyre
#- name: autogen.sh zyre
#  command: ./autogen.sh
#  args:
#    chdir: "/usr/local/src/zyre"
#- name: configure zyre
#  command: ./configure
#  args:
#    chdir: "/usr/local/src/zyre"
#- name: make
#  command: make
#  args:
#    chdir: "/usr/local/src/zyre"
#- name: make install zyre
#  command: make install
#  args:
#    chdir: "/usr/local/src/zyre"
#- name: run ldconfig
#  command: ldconfig
#
## install gateway
#- name: Create gateway directory
#  file: path=/usr/local/gateway state=directory
#- git:
#    repo: git://github.com/JustinAzoff/simpledisco.git
#    dest: /usr/local/gateway
#- name: make gateway step 1
#  command: make
#  args:
#    chdir: "/usr/local/gateway"
#- name: make gateway step 2
#  command: make -f Makefile.gateway gateway.static
#  args:
#    chdir: "/usr/local/gateway"

- name: Create gateway public keys directory
  file: path=/usr/local/gateway/public_keys state=directory

Alexander Withers's avatar
Alexander Withers committed
133
134
135
# we are relying on pub keys in p2p-test repo
#- name: gateway discovery key
#  template: src=discovery.key.j2 dest=/usr/local/gateway/public_keys/discovery.key owner={{ app_user }} group={{ app_user }} mode=0644
Alexander Withers's avatar
Alexander Withers committed
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#- name: alt gateway discovery key
#  template: src=kurn.key.j2 dest=/usr/local/gateway/public_keys/kurn.key owner={{ app_user }} group={{ app_user }} mode=0644

- name: generate gateway keys
  command: /usr/local/gateway/gateway keygen
  args:
    chdir: "/usr/local/gateway"

- name: Ensure gateway directory is owned by app_user
  command: find /usr/local/gateway -exec chown {{ app_user }}.{{ app_user}} {} \;

- name: Create p2p-test directory
  file: path=/usr/local/p2p-test state=directory
- git:
    repo: https://github.com/JustinAzoff/p2p-test
    dest: /usr/local/p2p-test

- copy: src={{ item }} dest=/usr/local/gateway/public_keys
  with_fileglob:
    - /usr/local/p2p-test/public_keys/*

- name: systemd services
  template: src=zyre-gateway.service.j2 dest=/etc/systemd/system/zyre-gateway.service owner=root group=root mode=0644
  notify:
    - reload systemd
  when: (ansible_distribution == "CentOS")

- name: systemd services
  template: src=zyre-gateway.service.j2 dest=/etc/systemd/system/zyre-gateway.service owner=root group=root mode=0644
  notify:
    - reload systemd
  when: (ansible_distribution == "Ubuntu")

- name: start zyre
  service: name=zyre-gateway.service state=started

- name: enable zyre gateway services at boot
  service: name=zyre-gateway.service enabled=yes state=started
  notify:
    - reload systemd