nicolargo
76478959cc
Correct issue in Makefile
2024-08-24 09:32:01 +02:00
Ariel Otilibili
962ea850ed
Refactorized rules targetting `profiling-*` & `memory-profiling`
...
Part of #2906 :
* `profiling-*` share the same start banner
* used `OUT_DIR` for static outputs
* `TIMES` controls the number of iterations.
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-18 15:26:21 +02:00
Ariel Otilibili
13079a606b
Used patterns rules in `venv`, `venv-python`, & `venv-python`
...
* `venv-*-python` relies on the pattern `venv-%-python`
* `venv-(full|min|dev)` & `venv-*-upgrade` on `venv-%`
* macros `UPGRADE`, `PRE_COMMIT`, `VIRTUAL_ENV`, & `REQS` are rule switches
* `VIRTUAL_ENV` being evaluated at runtime from `DEFINE_VARS_FOR_TYPE`
* `make help` is unchanged.
```
$ make venv -n
virtualenv -p /usr/bin/python3 venv
virtualenv -p /usr/bin/python3 venv-min
virtualenv -p /usr/bin/python3 venv-dev
venv/bin/pip install -r requirements.txt; venv/bin/pip install -r optional-requirements.txt;
venv-min/bin/pip install -r requirements.txt;
venv-dev/bin/pip install -r dev-requirements.txt; venv-dev/bin/pip install -r doc-requirements.txt;
venv-dev/bin/pre-commit install --hook-type pre-commit
$ make venv-python -n
virtualenv -p /usr/bin/python3 venv
virtualenv -p /usr/bin/python3 venv-min
virtualenv -p /usr/bin/python3 venv-dev
$ make venv-upgrade -n
venv/bin/install install --upgrade pip
venv/bin/pip install --upgrade -r requirements.txt; venv/bin/pip install --upgrade -r optional-requirements.txt;
venv-min/bin/install install --upgrade pip
venv-min/bin/pip install --upgrade -r requirements.txt;
venv-dev/bin/install install --upgrade pip
venv-dev/bin/pip install --upgrade -r dev-requirements.txt; venv-dev/bin/pip install --upgrade -r doc-requirements.txt;
```
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-11 17:45:21 +02:00
Ariel Otilibili
feac10a84d
Renamed macros in Makefile
...
* `s/VENV/venv_full/; s/VENV_MIN/venv_min/; s/VENV_DEV/venv_dev/;`
* useful in subsequent changes
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-11 17:40:27 +02:00
Ariel Otilibili
a37010929d
Rules targetting `docker-*` are now built at runtime
...
* removed the macros `DOCKERFILE`, `TARGET`, & `DOCKER_TAG`
* introduced the macro `MAKE_DOCKER_BUILD_RULES`
* at runtime, `docker-*` are built from the `DISTROS` list: done using `eval` [1]
* `make help` is unchanged:
```
$ make | grep '\sdocker-'
make docker-alpine Generate local docker images (Alpine)
make docker-alpine-dev Generate local docker image (Alpine dev)
make docker-alpine-full Generate local docker image (Alpine full)
make docker-alpine-minimal Generate local docker image (Alpine minimal)
make docker-ubuntu Generate local docker images (Ubuntu)
make docker-ubuntu-dev Generate local docker image (Ubuntu dev)
make docker-ubuntu-full Generate local docker image (Ubuntu full)
make docker-ubuntu-minimal Generate local docker image (Ubuntu minimal)
$ make docker -n
docker buildx build --target full -f docker-files/alpine.Dockerfile -t glances:local-alpine-full .
docker buildx build --target minimal -f docker-files/alpine.Dockerfile -t glances:local-alpine-minimal .
docker buildx build --target dev -f docker-files/alpine.Dockerfile -t glances:local-alpine-dev .
docker buildx build --target full -f docker-files/ubuntu.Dockerfile -t glances:local-ubuntu-full .
docker buildx build --target minimal -f docker-files/ubuntu.Dockerfile -t glances:local-ubuntu-minimal .
docker buildx build --target dev -f docker-files/ubuntu.Dockerfile -t glances:local-ubuntu-dev .
```
[1] https://www.gnu.org/software/make/manual/html_node/Eval-Function.html
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-10 09:23:37 +02:00
Ariel Otilibili
ddfcf46dee
Renamed variables in `Makefile`; introduced the variable `DISTROS`
...
* needed for subsequent changes in `Makefile`
* `s/ALPINE_IMAGES/alpine_images/; s/UBUNTU_IMAGES/ubuntu_images/`
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-10 09:17:30 +02:00
Ariel Otilibili
f5c2d8ce36
Used pattern for rules targetting `run-docker-*`
...
`make help` & `make run-docker-*` are unchanged:
```
$ make | grep run-docker
make run-docker-alpine-dev Start Glances Alpine Docker dev in console mode
make run-docker-alpine-full Start Glances Alpine Docker full in console mode
make run-docker-alpine-minimal Start Glances Alpine Docker minimal in console mode
make run-docker-ubuntu-dev Start Glances Ubuntu Docker dev in console mode
make run-docker-ubuntu-full Start Glances Ubuntu Docker full in console mode
make run-docker-ubuntu-minimal Start Glances Ubuntu Docker minimal in console mode
$ make run-docker-alpine-minimal -n
docker run --rm -e TZ="" -e GLANCES_OPT="" --pid host --network host -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -it glances:local-alpine-minimal
$ make run-docker-alpine-full -n
docker run --rm -e TZ="" -e GLANCES_OPT="" --pid host --network host -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -it glances:local-alpine-full
$ make run-docker-alpine-dev -n
docker run --rm -e TZ="" -e GLANCES_OPT="" --pid host --network host -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -it glances:local-alpine-dev
$ make run-docker-ubuntu-dev -n
docker run --rm -e TZ="" -e GLANCES_OPT="" --pid host --network host -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -it glances:local-ubuntu-dev
$ make run-docker-ubuntu-full -n
docker run --rm -e TZ="" -e GLANCES_OPT="" --pid host --network host -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -it glances:local-ubuntu-full
$ make run-docker-ubuntu-minimal -n
docker run --rm -e TZ="" -e GLANCES_OPT="" --pid host --network host -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -it glances:local-ubuntu-minimal
```
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-08 12:28:58 +02:00
Ariel Otilibili
516c99e496
Used pattern for rules targetting `docker-*`
...
`make help` & `make docker-*` are unchanged:
```
$ make | grep -P '\sdocker-'
make docker-alpine Generate local docker images (Alpine)
make docker-alpine-dev Generate local docker image (Alpine dev)
make docker-alpine-full Generate local docker image (Alpine full)
make docker-alpine-minimal Generate local docker image (Alpine minimal)
make docker-ubuntu Generate local docker images (Ubuntu)
make docker-ubuntu-dev Generate local docker image (Ubuntu dev)
make docker-ubuntu-full Generate local docker image (Ubuntu full)
make docker-ubuntu-minimal Generate local docker image (Ubuntu minimal)
$ make docker-alpine -n
docker buildx build --target full -f docker-files/alpine.Dockerfile -t glances:local-alpine-full .
docker buildx build --target minimal -f docker-files/alpine.Dockerfile -t glances:local-alpine-minimal .
docker buildx build --target dev -f docker-files/alpine.Dockerfile -t glances:local-alpine-dev .
$ make docker-ubuntu -n
docker buildx build --target full -f docker-files/ubuntu.Dockerfile -t glances:local-ubuntu-full .
docker buildx build --target minimal -f docker-files/ubuntu.Dockerfile -t glances:local-ubuntu-minimal .
docker buildx build --target dev -f docker-files/ubuntu.Dockerfile -t glances:local-ubuntu-dev .
```
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-08 12:28:58 +02:00
Ariel Otilibili
1fef2594d2
Used pattern for rules targetting `test-*`
...
`make help` & `make test-*` are unchanged:
```
$ make | grep test
make test Run unit tests
make test-core Run core unit tests
make test-min Run core unit tests in minimal environment
make test-min-with-upgrade Upgrade deps and run unit tests in minimal environment
make test-restful Run Restful unit tests
make test-with-upgrade Upgrade deps and run unit tests
make test-xmlrpc Run XMLRPC unit tests
$ make test -n
venv/bin/python unittest-core.py
venv/bin/python unittest-restful.py
venv/bin/python unittest-xmlrpc.py
```
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-08 12:28:51 +02:00
Ariel Otilibili
0804d06c0b
Refactorized `make flatpak`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
b03ea17a5f
Refactorized the rules targetting `docker-*`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
6910e61bde
Refactorized `make semgrep`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
a6fdc098b9
Refactorized the rules targetting `docs-*`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
313612333c
Refactorized `trace-malloc` and the rules targetting `memory-*`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
cad29145f1
Refactorized the rules targetting `profiling-*`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
4dba2f13ad
Refactorized `format`, `lint`, & `codespell` rules
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
c171d7604e
Refactorized the rules targetting `test*`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
658e318fd7
Refactorized the rules targetting `venv-*`
...
Addressed `venv-full-*`, `venv-min-*`, & `venv-dev-*`.
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
76cd7e63e2
Refactorized `make help`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
020fe7a0b2
Placed phony targets under the same rule
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
c96c778883
Refactorized the rules targetting `run*`
...
* refactorized the rules targetting `run*`
* set up variables for subsequent refactorizations.
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
nicolargo
f603e8412c
Add another connector to snap
2024-07-07 18:47:46 +02:00
nicolargo
f4c7ca01fe
Correct codespell
2024-06-29 19:19:26 +02:00
Bharath Vignesh J K
00c662f870
chg: Makefile - use ruff & pre-commit
2024-05-17 04:13:26 +05:30
nicolargo
f2d7e13cd8
Improve tests by testing all the plugin/model.py methods #2757
2024-05-09 10:09:05 +02:00
nicolargo
fd3625826b
First work done for plugin model (stats only)
2024-05-07 15:26:16 +02:00
nicolargo
af4765db8a
Remove unitest shell script - Use Makefile instead
2024-05-07 14:07:08 +02:00
nicolargo
8e8d4ce89b
Rename unitest to unittest - Related to #2757
2024-05-07 14:01:36 +02:00
nicolargo
e8563a0fc4
Format code and update docs/webui
2024-05-07 11:49:55 +02:00
nicolargo
9121b77763
Add some profiling and upgrade CI to NodeJS 20
2024-05-06 11:55:37 +02:00
nicolargo
88fee9bc8e
Use buildx instead of build for local container images
2024-04-30 10:35:45 +02:00
nicolargo
1cd17d9614
Add the --hide-public-info option
2024-04-29 10:01:24 +02:00
nicolargo
2aa3f418df
Alert timestamp is incorrect #2591
2024-04-27 17:38:56 +02:00
nicolargo
c09d9256c7
Display date correctly in WebUI Alarm
2024-04-27 10:04:00 +02:00
nicolargo
43b355fdff
Update the Flame profiling
2024-03-09 16:50:26 +01:00
nicolargo
a5249a1893
Update Snapcraft
2024-02-03 09:59:31 +01:00
nicolargo
b3828f5497
Replace Bottle by FastAPI #2181
2023-12-16 15:00:04 +01:00
nicolargo
a3e08966b5
:Merge branch 'develop' into issue2181
2023-12-10 20:12:21 +01:00
nicolargo
06d458ac63
Update deps
2023-12-09 11:07:33 +01:00
nicolargo
5fa7ae4264
WARNING: Replace the get_raw command for processlist
2023-12-02 16:41:52 +01:00
nicolargo
bcf4ce45fc
Rename any reference to Bottle in doc and dep file. Ready to refactor the main glances_restful_api.py file.
2023-11-26 10:02:30 +01:00
nicolargo
658c3563a7
Improve Makefile to split minimal, full and dev virtualenv
2023-05-17 15:42:39 +02:00
nicolargo
6f4da273c0
Add minimal venv in Makefile
2023-05-17 11:35:46 +02:00
nicolargo
1c28d543f2
Update docs for Glances 3.4.0
2023-05-16 09:32:17 +02:00
nicolargo
ac7f674f55
Improve Makefile amd docker-compose to support Podman and GPU
2023-05-13 23:15:40 +02:00
nicolargo
38d0e706d7
Pin Docker-Py to 6.0.1 - Waiting upstream patch related to #2366
2023-05-07 11:04:10 +02:00
nicolargo
f4873cef08
Improve Lint
2023-05-01 10:12:09 +02:00
nicolargo
25efd90924
Correct typo
2023-04-29 10:01:44 +02:00
nicolargo
28b46a72a4
Avoid interaction in the Docker build process for Ubuntu images
2023-03-12 10:02:00 +01:00
nicolargo
6b637bcc57
All times displayed in UTC - Container not using TZ/localtime (Docker) #2278
2023-03-05 09:25:53 +01:00