Project

General

Profile

Server sanity checks » History » Version 1

Olivier Bitsch, 06/25/2021 10:57 AM

1 1 Olivier Bitsch
This step permits to check that your server is ready to receive builds.
2
3
## Check if Builder-CI services are up and running
4
5
As soon as Debian packages are installed, two services should be started automatically :
6
7
* builder-ci-api : Exposed web API used to trigger pipeline and builds.
8
* builder-ci-worker : Listens and run builds.
9
10
To check status of both server, just use the following command:
11
12
~~~ bash
13
systemctl status builder-ci-api builder-ci-worker
14
~~~
15
16
You should the similar output
17
18
~~~
19
● builder-ci-api.service - Builder CI API
20
   Loaded: loaded (/lib/systemd/system/builder-ci-api.service; enabled; vendor preset: enabled)
21
   Active: active (running) since Mon 2021-06-21 21:23:59 CEST; 3 days ago
22
 Main PID: 2314 (gunicorn3)
23
    Tasks: 13 (limit: 4698)
24
   Memory: 33.7M
25
   CGroup: /system.slice/builder-ci-api.service
26
           ├─2314 /usr/bin/python3 /usr/bin/gunicorn3 --workers 4 --bind 127.0.0.1:5000 wsgi:app
27
           ├─2336 /usr/bin/python3 /usr/bin/gunicorn3 --workers 4 --bind 127.0.0.1:5000 wsgi:app
28
           ├─2337 /usr/bin/python3 /usr/bin/gunicorn3 --workers 4 --bind 127.0.0.1:5000 wsgi:app
29
           ├─2345 /usr/bin/python3 /usr/bin/gunicorn3 --workers 4 --bind 127.0.0.1:5000 wsgi:app
30
           └─2347 /usr/bin/python3 /usr/bin/gunicorn3 --workers 4 --bind 127.0.0.1:5000 wsgi:app
31
32
jun 21 21:23:59 builder systemd[1]: Started Builder CI API.
33
jun 21 21:23:59 builder gunicorn3[2314]: [2021-06-21 21:23:59 +0200] [2314] [INFO] Starting gunicorn 19.9.0
34
jun 21 21:23:59 builder gunicorn3[2314]: [2021-06-21 21:23:59 +0200] [2314] [INFO] Listening at: http://127.0.0.1:5000 (2314)
35
jun 21 21:23:59 builder gunicorn3[2314]: [2021-06-21 21:23:59 +0200] [2314] [INFO] Using worker: sync
36
jun 21 21:23:59 builder gunicorn3[2314]: [2021-06-21 21:23:59 +0200] [2336] [INFO] Booting worker with pid: 2336
37
jun 21 21:23:59 builder gunicorn3[2314]: [2021-06-21 21:23:59 +0200] [2337] [INFO] Booting worker with pid: 2337
38
jun 21 21:23:59 builder gunicorn3[2314]: [2021-06-21 21:23:59 +0200] [2345] [INFO] Booting worker with pid: 2345
39
jun 21 21:23:59 builder gunicorn3[2314]: [2021-06-21 21:23:59 +0200] [2347] [INFO] Booting worker with pid: 2347
40
41
● builder-ci-worker.service - Builder CI Worker
42
   Loaded: loaded (/lib/systemd/system/builder-ci-worker.service; enabled; vendor preset: enabled)
43
   Active: active (running) since Mon 2021-06-21 21:23:59 CEST; 3 days ago
44
 Main PID: 2343 (python3)
45
    Tasks: 5 (limit: 4698)
46
   Memory: 421.3M
47
   CGroup: /system.slice/builder-ci-worker.service
48
           └─2343 /usr/bin/python3 listener.py
49
50
jun 25 01:51:29 builder python3[2343]: 2021-06-25 01:51:29,032:WARNING:### This build already exist into DB with state success, stopping the build
51
jun 25 01:51:29 builder python3[2343]: 2021-06-25 01:51:29,033:INFO:Removing build folder
52
jun 25 01:51:29 builder python3[2343]: 2021-06-25 01:51:29,038:INFO:### Running step: notify
53
jun 25 01:51:29 builder python3[2343]: 2021-06-25 01:51:29,039:DEBUG:builder.yml not present
54
~~~
55
56
## Check if API port is opened
57
58
Builder-CI API is listening on port 5000 by default. This is now hard coded, but will be soon configurable into `/etc/builder-ci/builder-ci.conf`.
59
60
~~~
61
ss -tnl
62
~~~
63
64
And check the presence of port 5000.
65
66
~~~
67
LISTEN        0             128                       127.0.0.1:5000                       0.0.0.0:*
68
~~~
69
70
## Check docker images
71
72
Local docker images should be ready to use. They all start with the name "builder-*", you can simply do:
73
74
~~~
75
docker images
76
~~~
77
78
Some base images should be present as well.
79
80
~~~
81
REPOSITORY         TAG        IMAGE ID       CREATED        SIZE
82
builder-bullseye   latest     bddfdcdb75f7   3 days ago     725MB
83
builder-focal      latest     246411c9c854   8 days ago     496MB
84
builder-npm        latest     2f3118f1cb00   9 days ago     567MB
85
builder-ionic      latest     8c2862ead175   9 days ago     2.2GB
86
builder-flutter    latest     2de0b0442067   9 days ago     4.04GB
87
builder-centos8    latest     c516c5be1fb1   9 days ago     425MB
88
builder-centos7    latest     38544ac09758   9 days ago     446MB
89
debian             9          acf04b8ccc37   6 weeks ago    101MB
90
debian             10         4a7a1f401734   6 weeks ago    114MB
91
debian             bullseye   a44283d28873   6 weeks ago    124MB
92
ubuntu             focal      7e0aa2d69a15   2 months ago   72.7MB
93
centos             centos8    300e315adb2f   6 months ago   209MB
94
centos             centos7    8652b9f0cb4c   7 months ago   204MB
95
~~~