Skip to content

Commit 647662d

Browse files
authored
Merge pull request #186 from LandRegistry/develop
3.2.0
2 parents 01f0fa3 + cfa77d3 commit 647662d

File tree

11 files changed

+56
-7
lines changed

11 files changed

+56
-7
lines changed

.github/workflows/linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
fetch-depth: 0
2222
# The only difference between full and slim is the latter excludes .NET and Rust linters
23-
- uses: super-linter/super-linter/slim@v7
23+
- uses: super-linter/super-linter/slim@v8
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2626
LINTER_RULES_PATH: .

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ The list of allowable commodity values is:
131131
16. ibmmq
132132
17. localstack
133133
18. valkey
134+
19. prometheus
135+
20. grafana
134136

135137
The file may optionally also indicate that one or more services are resource intensive ("expensive") when starting up. The dev env will start those containers seperately - 3 at a time - and wait until each are declared healthy (or crash and get restarted 10 times) before starting any more.
136138

@@ -224,11 +226,11 @@ There are no fragments needed when using this. The Management Console will be av
224226

225227
Rabbit is available over port 5672 and TLS on port 5671.
226228

227-
TLS presents a self signed cert. If verification is needed a copy of the ca certificate is [here](scripts/docker/rabbitmq/certs/ca_certificate.crt). The host has been set to `rabbitmq` for host verification in most common libraries, although will only work within the docker network.
229+
TLS presents a self signed cert. If verification is needed then use the provided [ca certificate](scripts/docker/rabbitmq/certs/ca_certificate.crt). The host has been set to `rabbitmq` for host verification in most common libraries, although will only work within the docker network.
228230

229231
MTLS is not enabled, although a [client certificate pem](scripts/docker/rabbitmq/certs/client_certificate.pem) and [client key pem](scripts/docker/rabbitmq/certs/client_key.pem) have been generated as part of the certificate set for potential future use.
230232

231-
Currently, only the `rabbitmq_management`, `rabbitmq_consistent_hash_exchange`, `rabbitmq_shovel`, `rabbitmq_shovel_management` and `rabbitmq_stream` plugins are enabled.
233+
Currently, only the `rabbitmq_management`, `rabbitmq_consistent_hash_exchange`, `rabbitmq_shovel`, `rabbitmq_shovel_management`, `rabbitmq_stream` and `rabbitmq_prometheus` plugins are enabled.
232234

233235
##### ActiveMQ
234236

@@ -249,6 +251,15 @@ bashin redis
249251
redis-cli monitor
250252
```
251253

254+
##### Prometheus
255+
256+
Prometheus will be available at <http://localhost:9090>. The scrape config lives in `dev-env-config/prometheus/prometheus.yml` and is mounted by any app that needs Prometheus.
257+
For production, avoid high-cardinality RabbitMQ metrics unless needed. Prefer to keep only specific queues with `metric_relabel_configs`, or disable per-queue metrics at the broker if you only need aggregate health.
258+
259+
##### Grafana
260+
261+
Grafana will be available at <http://localhost:3000> (admin/admin). Provisioning is defined in `dev-env-config/grafana/provisioning/`. Dashboards live inside each app at `apps/<app>/fragments/grafana/dashboards/` and are mounted into Grafana by the app’s compose fragment.
262+
252263
##### Squid
253264

254265
There are no fragments needed when using this. An HTTP proxy will be made available to all containers at runtime, at hostname `squid` and port 3128. It will be available on the host on port 30128.
@@ -300,7 +311,7 @@ Applications using OAuth flows or the OpenID Connect protocol can use Keycloak f
300311

301312
JWT tokens issued from the `development` realm have been configured to mimic those issued by Microsoft ADFS servers. In particular, the LDAP `cn` field is mapped to the `UserName` claim in JWT tokens along with the `Office` claim mapped from the `physicalDeliveryOfficeName` in the LDAP database and the `group` claim listing the user's group memberships.
302313

303-
A [JSON export](scripts/docker/auth/keycloak/development_realm.json) of the `development` realm is used to configure the realm. If further configuration of the realm is required, you can make changes in the admin console and re-export the realm using the procedure described in "Exporting a realm" [here](https://hub.docker.com/r/jboss/keycloak/#exporting-a-realm).
314+
A [JSON export](scripts/docker/auth/keycloak/development_realm.json) of the `development` realm is used to configure the realm. If further configuration of the realm is required, you can make changes in the admin console and re-export the realm using the procedure described in "Exporting a realm" section of the [documentation](https://hub.docker.com/r/jboss/keycloak/#exporting-a-realm).
304315

305316
The exported JSON can then be merged back into this repository and reused.
306317

@@ -334,7 +345,7 @@ _Running Cadence web locally_
334345

335346
A default Localstack configuration is provided with a minimal number of enabled services available (S3 only at present). Localstack does not _require_ the use of any other external configuration file (as applications can manage buckets programatically through methods such as the [AWS SDK](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/examples-s3-buckets.html)).
336347

337-
However, if additional configuration (such as new buckets) are necessary before application startup, you can use a `localstack-init-fragment.sh` to perform this provisioning; an example of which is provided [here](snippets/localstack-init-fragment.sh).
348+
However, if additional configuration (such as new buckets) are necessary before application startup, you can use a `localstack-init-fragment.sh` to perform this provisioning; like [this example](snippets/localstack-init-fragment.sh).
338349

339350
Localstack is available at <http://localstack:4566> within the Docker network, and <http://localhost:4566> on the host.
340351

scripts/add-aliases.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ function fullreset(){
165165

166166
function alembic(){
167167
ex -e SQL_USE_ALEMBIC_USER=yes -e SQL_PASSWORD=superroot -e SQLALCHEMY_POOL_RECYCLE=3600 ${1} \
168-
bash -c 'cd /src && python3 manage.py db '"${@:2}"''
168+
bash -c 'cd /opt/app-root/src && [ -d "$VENV_DIR" ] && source $VENV_DIR/bin/activate;
169+
python3 manage.py db '"${@:2}"''
169170
}
170171

171172
function devenv-help(){

scripts/docker/grafana/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM grafana/grafana-oss:12.3.3
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
services:
2+
grafana:
3+
container_name: grafana
4+
build: ../scripts/docker/grafana/
5+
ports:
6+
- 3000:3000
7+
environment:
8+
GF_SECURITY_ADMIN_PASSWORD: admin
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM prom/prometheus:v3.9.1
2+
COPY prometheus.yml /etc/prometheus/prometheus.yml
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
services:
2+
prometheus:
3+
container_name: prometheus
4+
build: ../scripts/docker/prometheus/
5+
ports:
6+
- 9090:9090
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
global:
2+
scrape_interval: 15s
3+
evaluation_interval: 15s
4+
5+
scrape_configs:
6+
- job_name: prometheus
7+
static_configs:
8+
- targets: ["prometheus:9090"]

scripts/docker/rabbitmq/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ RUN rabbitmq-plugins --offline enable rabbitmq_shovel rabbitmq_shovel_management
1616
# This is a RabbitMQ plugin that exposes streams.
1717
# Streams are a new persistent and replicated data structure, handy to persist historic messages for a period of time
1818
# https://www.rabbitmq.com/stream.html
19-
RUN rabbitmq-plugins --offline enable rabbitmq_stream
19+
# Expose Prometheus metrics for monitoring/dashboards.
20+
RUN rabbitmq-plugins --offline enable rabbitmq_stream && \
21+
rabbitmq-plugins --offline enable rabbitmq_prometheus

scripts/docker/rabbitmq/compose-fragment.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,12 @@ services:
44
build: ../scripts/docker/rabbitmq/
55
ports:
66
- 15672:15672
7+
- 15692:15692
78
- 5672:5672
89
- 5671:5671
10+
# Lightweight TCP check on AMQP port (RabbitMQ recommend this over rabbitmq-diagnostics ping).
11+
healthcheck:
12+
test: ["CMD-SHELL", "bash -c '</dev/tcp/127.0.0.1/5672' || exit 1"]
13+
interval: 10s
14+
timeout: 5s
15+
retries: 10

0 commit comments

Comments
 (0)