Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: build

concurrency:
group: build-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
Expand All @@ -13,8 +13,6 @@ on:
paths-ignore:
- '**.md'
pull_request:
branches:
- 'master'
paths-ignore:
- '**.md'

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: labels

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
Expand Down
84 changes: 0 additions & 84 deletions .github/workflows/test-edge.yml

This file was deleted.

45 changes: 20 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: test

concurrency:
group: test-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
Expand All @@ -15,15 +15,25 @@ on:
- '**.md'

env:
BUILD_TAG: librenms-test
BUILD_TAG: librenms:test
CONTAINER_NAME: librenms
RUNNING_TIMEOUT: 120
RUNNING_LOG_CHECK: ready to handle connections

jobs:
test:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.version == 'master' }}
strategy:
fail-fast: false
matrix:
version:
- ''
- master
steps:
-
name: Prepare
if: matrix.version != ''
run: |
echo "LIBRENMS_VERSION=${{ matrix.version }}" >> $GITHUB_ENV
-
name: Checkout
uses: actions/checkout@v3
Expand All @@ -49,32 +59,17 @@ jobs:
LIBRENMS_IMAGE: ${{ env.BUILD_TAG }}
LIBRENMS_CONTAINER: ${{ env.CONTAINER_NAME }}
-
name: Test run
run: |
TIMEOUT=$((SECONDS + ${{ env.RUNNING_TIMEOUT }}))
while read LOGLINE; do
echo ${LOGLINE}
if [[ ${LOGLINE} == *"${{ env.RUNNING_LOG_CHECK }}"* ]]; then
echo "🎉 Container up!"
break
fi
if [[ $SECONDS -gt ${TIMEOUT} ]]; then
>&2 echo "❌ Failed to run ${{ env.CONTAINER_NAME }} container"
exit 1
fi
done < <(docker logs -f ${{ env.CONTAINER_NAME }} 2>&1)

CONTAINER_STATUS=$(docker container inspect --format "{{.State.Status}}" ${{ env.CONTAINER_NAME }})
if [[ ${CONTAINER_STATUS} != "running" ]]; then
>&2 echo "❌ Container ${{ env.CONTAINER_NAME }} returned status '$CONTAINER_STATUS'"
exit 1
fi
name: Check container logs
uses: crazy-max/.github/.github/actions/container-logs-check@main
with:
container_name: ${{ env.CONTAINER_NAME }}
log_check: "ready to handle connections"
timeout: 120
-
name: Logs
if: always()
run: |
docker compose logs
docker compose down --volumes > /dev/null 2>&1 || true
working-directory: test
env:
LIBRENMS_IMAGE: ${{ env.BUILD_TAG }}
Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,10 @@
> :warning: **UPGRADE NOTES**
> As the Docker container now runs as a non-root user, you have to first stop the container and change permissions to `data` volume:
> ```
> docker-compose stop
> docker compose stop
> chown -R ${PUID}:${PGID} data/
> docker-compose pull
> docker-compose up -d
> docker compose pull
> docker compose up -d
> ```

## 1.57-RC1 (2019/10/30)
Expand Down Expand Up @@ -470,7 +470,7 @@

> :warning: **UPGRADE NOTES**
> Sidecar cron and syslog-ng are now respectively handled with `SIDECAR_CRON` and `SIDECAR_SYSLOGNG` env vars
> See docker-compose example and README for more info.
> See compose example and README for more info.

## 1.51-RC1 (2019/05/01)

Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ RUN apk --update --no-cache add -t build-dependencies \
linux-headers \
musl-dev \
python3-dev \
&& echo "Installing LibreNMS https://github.com/librenms/librenms.git#${LIBRENMS_VERSION}..." \
&& git clone --depth=1 --branch ${LIBRENMS_VERSION} https://github.com/librenms/librenms.git . \
&& pip3 install --ignore-installed -r requirements.txt --upgrade \
&& COMPOSER_CACHE_DIR="/tmp" composer install --no-dev --no-interaction --no-ansi \
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ To upgrade to the latest version of LibreNMS, pull the newer image and launch
the container. LibreNMS will upgrade automatically:

```console
$ docker-compose down
$ docker-compose pull
$ docker-compose up -d
$ docker compose down
$ docker compose pull
$ docker compose up -d
```

## Configuration Management
Expand All @@ -288,7 +288,7 @@ and will override the default values.
You can edit the running configuration via the LibreNMS web UI or `lnms config:set`

```bash
docker-compose exec librenms lnms config:set page_refresh 300
docker compose exec librenms lnms config:set page_refresh 300
```

### Re-Apply YAML Config
Expand Down Expand Up @@ -317,7 +317,7 @@ If you want to use the `lnms` command to perform common server operations like
manage users, database migration, and more, type:

```console
$ docker-compose exec librenms lnms
$ docker compose exec librenms lnms
```

### Validate
Expand All @@ -326,7 +326,7 @@ If you want to validate your installation from the CLI, type the following
command:

```console
$ docker-compose exec --user librenms librenms php validate.php
$ docker compose exec --user librenms librenms php validate.php
====================================
Component | Version
--------- | -------
Expand All @@ -350,8 +350,8 @@ SNMP | NET-SNMP 5.8

If you want to enable the new [Dispatcher service](https://docs.librenms.org/Extensions/Dispatcher-Service/),
you have to run a "sidecar" container (see dispatcher service in
[docker-compose.yml](examples/compose/docker-compose.yml) example) or run a
simple container like this:
[compose.yml](examples/compose/compose.yml) example) or run a simple container
like this:

```console
$ docker run -d --name librenms_dispatcher \
Expand All @@ -369,8 +369,8 @@ $ docker run -d --name librenms_dispatcher \
### Syslog-ng container

If you want to enable syslog-ng, you have to run a "sidecar" container (see
syslog-ng service in [docker-compose.yml](examples/compose/docker-compose.yml)
example) or run a simple container like this:
syslog-ng service in [compose.yml](examples/compose/compose.yml) example) or
run a simple container like this:

```console
$ docker run -d --name librenms_syslog \
Expand All @@ -395,8 +395,8 @@ enable_syslog: true
### Snmptrapd container

If you want to enable snmptrapd, you have to run a "sidecar" container (see
snmptrapd service in [docker-compose.yml](examples/compose/docker-compose.yml)
example) or run a simple container like this:
snmptrapd service in [compose.yml](examples/compose/compose.yml) example) or
run a simple container like this:

```console
$ docker run -d --name librenms_snmptrapd \
Expand Down
7 changes: 7 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ variable "DEFAULT_TAG" {
default = "librenms:local"
}

variable "LIBRENMS_VERSION" {
default = null
}

// Special target: https://github.com/docker/metadata-action#bake-definition
target "docker-metadata-action" {
tags = ["${DEFAULT_TAG}"]
args = {
LIBRENMS_VERSION = LIBRENMS_VERSION
}
}

// Default target if none specified
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.