forked from ebbba-org/ansible-role-bigbluebutton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
147 lines (142 loc) · 6.99 KB
/
.travis.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
---
dist: xenial
sudo: required
rvm:
- 2.6
jobs:
include:
- stage: ansible-lint
name: Ansible Lint
before_install: true
script:
- ansible-lint tasks/main.yml || true
after_script: true
- stage: deploy
name: Deploy on Ubuntu Xenial
env:
- distribution: ubuntu
version: 16.04
suite: default
script:
- sudo -E su $USER -c "env PATH=$PATH kitchen verify ${suite}-${distribution}-${version//./} -l debug"
- stage: deployalt
name: Ubuntu 16.04 with nodejs 10.x and mongodb 3.4
env:
- distribution: ubuntu
version: 16.04
suite: default-node10
script:
- sudo -E su $USER -c "env PATH=$PATH kitchen verify ${suite}-${distribution}-${version//./} -l debug"
- stage: deployalt
name: Ubuntu 16.04 with nodejs 12.x and mongodb 3.4
env:
- distribution: ubuntu
version: 16.04
suite: default-node12
script:
- sudo -E su $USER -c "env PATH=$PATH kitchen verify ${suite}-${distribution}-${version//./} -l debug"
- stage: deployalt
name: Ubuntu 16.04 with nodejs 8.x and mongodb 3.6
env:
- distribution: ubuntu
version: 16.04
suite: default-mongo36
script:
- sudo -E su $USER -c "env PATH=$PATH kitchen verify ${suite}-${distribution}-${version//./} -l debug"
- stage: deployalt
name: Ubuntu 16.04 with nodejs 8.x and mongodb 4.x
env:
- distribution: ubuntu
version: 16.04
suite: default-mongo4
script:
- sudo -E su $USER -c "env PATH=$PATH kitchen verify ${suite}-${distribution}-${version//./} -l debug"
- stage: deployalt
name: Ubuntu 18.04 with nodejs 8.x and mongodb 4.x
env:
- distribution: ubuntu
version: 18.04
suite: default
script:
- sudo -E su $USER -c "env PATH=$PATH kitchen verify ${suite}-${distribution}-${version//./} -l debug"
if: branch =~ /^devel*/
before_install:
- env
- pwd
- find -ls
- sudo apt-get install python3-pip python3-setuptools
- pip3 install ansible ansible-lint
- cd ../ && mv ansible-role-bigbluebutton ebbba-org/ansible-role-bigbluebutton
- cd ebbba-org/ansible-role-bigbluebutton
- ansible-galaxy install -p .. -r requirements.yml
- echo "deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/xenial-backports.list
- sudo apt-get update -qq
- sudo apt -t xenial-backports -y install lxd acl dnsmasq-base zfsutils-linux -q
## change of group implies logout+login to apply... can't do with travis = run as root (sic)
## https://github.com/travis-ci/travis-ci/issues/1839 or chain: sudo -E su $USER -c "..."
- sudo usermod -G lxd travis
# Pull container
# - lxc remote add images images.linuxcontainers.org
- sudo -E su $USER -c "lxc remote list"
- sudo -E su $USER -c "lxc image list"
## pre-download base images
- 'sudo -E su $USER -c "[ ${distribution} == ubuntu ] || lxc image copy images:${distribution}/${version}/amd64 local: --alias=${distribution}-${version}-nossh"'
- 'sudo -E su $USER -c "[ ${distribution} == ubuntu ] && lxc image copy ubuntu:${version} local: --alias=${distribution}-${version}" || true'
- sudo -E su $USER -c "lxc image list"
## configure network
- ifconfig -a
- sudo lxc info
- sudo lxc network list
- sudo lxc network create lxdbr0
- sudo lxc network show lxdbr0
- sudo lxc network attach-profile lxdbr0 default ens4
- sudo lxc profile device get default ens4 nictype || true
- sudo service lxd restart
- ps ax | grep dnsmasq
- systemctl status -l --no-pager lxd || true
- cat /etc/network/interfaces.d/50-cloud-init.cfg
- sudo lxc network list
# configure storage pool
- sudo lxc storage list
- sudo lxc storage create pool1 zfs
- sudo lxc storage list
- sudo zpool list
- sudo lxc profile device add default root disk path=/ pool=pool1
- sudo lxc profile show default
# https://redis4you.com/articles.php?id=012&name=redis
# https://vincent.bernat.ch/en/blog/2014-tcp-time-wait-state-linux
- sudo sysctl -w net.ipv4.tcp_timestamps=1
- sudo pip install ansible ansible-lint
- gem install test-kitchen --version "=1.25.0"
- gem install kitchen-ansible
- gem install kitchen-sync
- gem install kitchen-lxd_cli
- gem list
- which kitchen
- ls ~/.ssh
- ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa -P ""
- sudo -E su $USER -c "env"
- sudo -E su $USER -c "env PATH=$PATH kitchen diagnose --all"
after_script:
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'pip freeze'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'pip3 freeze'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'cat /tmp/idempotency.test'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'netstat -anp'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'ss -nlp'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'ps auxw'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'bbb-conf --status'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'bbb-conf --check'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'systemctl -l --no-pager status nginx'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'systemctl -l --no-pager status mongod'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'systemctl -l --no-pager status freeswitch'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'systemctl -l --no-pager status'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'journalctl -xe --no-pager'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'cat /etc/mongod.conf'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'cat /var/log/mongodb/mongod.log'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'curl -v http://localhost'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'curl -vk https://localhost'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'curl -vk https://localhost/check/'"
- sudo -E su $USER -c "env PATH=$PATH kitchen exec ${suite}-${distribution}-${version//./} -c 'curl -vk https://localhost/default.pdf'"
- sudo -E su $USER -c "env PATH=$PATH kitchen destroy ${suite}-${distribution}-${version//./}"
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/