-
-
Notifications
You must be signed in to change notification settings - Fork 82
174 lines (154 loc) · 5.66 KB
/
full_deployment.yml
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
133
134
135
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
---
name: 'Ansible Deployment Test'
on:
push:
branches:
- 'bbb/2.5'
- 'bbb/2.6'
- 'master'
- 'main'
- 'develop'
tags:
- ".*"
pull_request:
types: [opened, reopened]
jobs:
build:
runs-on: ${{ matrix.distribution }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
include:
- distribution: 'ubuntu-20.04'
experimental: false
env:
ANSIBLE_CALLBACK_ENABLED: profile_tasks
ANSIBLE_EXTRA_VARS: "-e bbb_freeswitch_socket_password='SuperSecurePassword-123456789'"
ROLEPATH: ebbba.bigbluebutton
steps:
- uses: actions/checkout@v2
with:
path: ebbba.bigbluebutton
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install ansible-lint flake8 yamllint
which ansible
pip3 install ansible
pip3 show ansible
ls -l $HOME/.local/bin || true
ls -l /opt/hostedtoolcache/Python/3.9.1/x64/bin || true
echo "/opt/hostedtoolcache/Python/3.9.1/x64/bin" >> $GITHUB_PATH
ansible --version
cd $GITHUB_WORKSPACE/${{ env.ROLEPATH }}
{ echo '[defaults]'; echo 'callback_enabled = profile_tasks, timer'; echo 'roles_path = ../'; echo 'ansible_python_interpreter: /usr/bin/python3'; } >> ansible.cfg
{ echo '[bbb]'; echo 'localhost ansible_connection=local'; } > inventory
ansible-galaxy install -r requirements.yml
- name: Environment
run: |
pwd
env
find -ls
- name: run test
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
run: |
cd $GITHUB_WORKSPACE/${{ env.ROLEPATH }} && ansible-playbook -i inventory --become -vvv test/integration/default/default.yml ${ANSIBLE_EXTRA_VARS}
- name: idempotency run
run: |
cd $GITHUB_WORKSPACE/${{ env.ROLEPATH }} && ansible-playbook -i inventory --become -vvv test/integration/default/default.yml ${ANSIBLE_EXTRA_VARS} | tee /tmp/idempotency.log | grep -q 'changed=0.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && cat /tmp/idempotency.log && exit 0)
- name: verify
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
run: |
cd $GITHUB_WORKSPACE/${{ env.ROLEPATH }} && ansible-playbook -i inventory --become -v molecule/default/verify.yml ${ANSIBLE_EXTRA_VARS}
- name: On failure
if: ${{ failure() }}
continue-on-error: true
run: |
systemctl --full --no-pager status
systemctl --full --no-pager --failed
ls -l /usr/bin/ | egrep '(python|pip|ansible)'
pip freeze
pip3 freeze
ip addr
cat /etc/resolv.conf
host www.google.com || true
ping -c 1 www.google.com || true
ping -c 1 8.8.8.8 || true
host ubuntu.bigbluebutton.org || true
dig ubuntu.bigbluebutton.org || true
dig @1.1.1.1 ubuntu.bigbluebutton.org || true
curl --verbose https://ubuntu.bigbluebutton.org/repo/bigbluebutton.asc || true
- name: After script - ansible setup
if: ${{ always() }}
continue-on-error: true
run: |
ansible --inventory inventory --connection=local --module-name setup localhost
- name: After script - firewall
if: ${{ always() }}
continue-on-error: true
run: |
sudo iptables --list --verbose --numeric
sudo ip6tables --list --verbose --numeric
sudo ufw status verbose
- name: After script - python
if: ${{ always() }}
continue-on-error: true
run: |
which pip
pip freeze
which pip3
pip3 freeze
- name: After script - sfiles
if: ${{ always() }}
continue-on-error: true
run: |
echo "*** mongo"
cat /etc/mongod.conf
sudo cat /var/log/mongodb/mongod.log || true
echo "*** etc"
find /etc/red5 /etc/bigbluebutton/ -type f -ls
- name: After script - curl
if: ${{ always() }}
continue-on-error: true
run: |
curl --verbose http://localhost
curl --verbose --insecure https://localhost
curl --verbose --insecure https://localhost/b/
curl --verbose --insecure https://localhost/check/
curl --verbose --insecure https://localhost/default.pdf
- name: After script - systemd-resolve
if: ${{ always() }}
continue-on-error: true
run: |
cat /etc/systemd/resolved.conf || true
sudo resolvectl status || true
sudo systemd-resolve --status || true
resolvectl query ubuntu.bigbluebutton.org || true
journalctl --unit systemd-resolved --no-pager
- name: After script - system
if: ${{ always() }}
continue-on-error: true
run: |
sudo netstat --tcp --udp --all --numeric --processes
sudo ss --numeric --listening --processes
systemctl --full --no-pager status nginx
systemctl --full --no-pager status mongod
systemctl --full --no-pager status freeswitch
systemctl --full --no-pager status
journalctl --catalog --pager-end --no-pager
- name: After script - bbb
if: ${{ always() }}
continue-on-error: true
run: |
sudo bbb-conf --status
sudo bbb-conf --check
sudo bbb-conf --secret