Skip to content

Commit 69c05ba

Browse files
authored
Merge pull request #188 from LandRegistry/develop
3.3.0
2 parents f0b600b + 121ea07 commit 69c05ba

18 files changed

+246
-25
lines changed

README.md

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,21 @@ The list of allowable commodity values is:
120120
5. elasticsearch7
121121
6. nginx
122122
7. rabbitmq
123-
8. redis
124-
9. swagger
125-
10. wiremock
126-
11. squid
127-
12. auth
128-
13. cadence
129-
14. cadence-web
130-
15. activemq
131-
16. ibmmq
132-
17. localstack
133-
18. valkey
134-
19. prometheus
135-
20. grafana
123+
8. rabbitmq-4
124+
9. redis
125+
10. swagger
126+
11. wiremock
127+
12. squid
128+
13. auth
129+
14. cadence
130+
15. cadence-web
131+
16. activemq
132+
17. ibmmq
133+
18. localstack
134+
19. valkey
135+
20. prometheus
136+
21. grafana
137+
22. govuk-one-login
136138

137139
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.
138140

@@ -220,18 +222,34 @@ This is a file that contains stub mappings that Wiremock will pick up and use, a
220222

221223
This is a directory that can contain multiple stub mappings files that Wiremock will pick up and use. The files should all be in the same format as the example above. If such a wiremock directory exists, it will take precedence over any `wiremock-fragment.json` file.
222224

223-
##### RabbitMQ
225+
##### RabbitMQ 3
224226

225227
There are no fragments needed when using this. The Management Console will be available on <http://localhost:15672> (guest/guest).
226228

227-
Rabbit is available over port 5672 and TLS on port 5671.
229+
RabbitMQ 3 is available over port 5672 and TLS on port 5671.
228230

229231
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.
230232

231233
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.
232234

233235
Currently, only the `rabbitmq_management`, `rabbitmq_consistent_hash_exchange`, `rabbitmq_shovel`, `rabbitmq_shovel_management`, `rabbitmq_stream` and `rabbitmq_prometheus` plugins are enabled.
234236

237+
The default queue type for queues in RabbitMQ 3 is `classic`.
238+
239+
##### RabbitMQ 4
240+
241+
There are no fragments needed when using this. The Management Console will be available on <http://localhost:15682> (guest/guest).
242+
243+
RabbitMQ 4 is available over port 5682 and TLS on port 5681.
244+
245+
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.
246+
247+
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.
248+
249+
Currently, only the `rabbitmq_management`, `rabbitmq_consistent_hash_exchange`, `rabbitmq_shovel`, `rabbitmq_shovel_management`, `rabbitmq_stream` and `rabbitmq_prometheus` plugins are enabled.
250+
251+
The default queue type for queues in RabbitMQ 4 is `quorum`.
252+
235253
##### ActiveMQ
236254

237255
There are no fragments needed when using this. The Management Console will be available on <http://localhost:8161> (admin/admin).
@@ -362,6 +380,16 @@ bashin redis
362380
redis-cli monitor
363381
```
364382

383+
###### GOV.UK One Login
384+
385+
The GOV.UK One Login simulator is a development tool that lets you run end-to-end tests, so you can:
386+
387+
- test and verify specific user information such as names and email addresses
388+
- request specific error codes and learn more about what they mean in a test environment
389+
- test integrations with GOV.UK One Login without going through account creation
390+
391+
See [documentation](https://github.com/govuk-one-login/simulator).
392+
365393
#### Other files
366394

367395
**`/fragments/custom-provision.sh`**

logic.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
# Does a version check and self-update if required
7777
if options['self_update']
78-
this_version = '3.2.0'
78+
this_version = '3.3.0'
7979
puts colorize_lightblue("This is a universal dev env (version #{this_version})")
8080
# Skip version check if not on master (prevents infinite loops if you're in a branch that isn't up to date with the
8181
# latest release code yet)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM ghcr.io/govuk-one-login/simulator:latest
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
services:
2+
govuk-one-login:
3+
container_name: govuk-one-login
4+
build: ../scripts/docker/govuk-one-login/
5+
ports:
6+
- "3000:3000"

scripts/docker/logging/server.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import socketserver
44
import threading
55

6-
76
HOST, PORT = "0.0.0.0", 25826
87

98
syslog_pattern = re.compile(r"\S* (\S*) \S* (\S*) \d+ \S* (?:- )?(.*)")
@@ -23,7 +22,7 @@ class ThreadedTCPRequestHandler(socketserver.StreamRequestHandler):
2322
"""
2423

2524
def handle(self):
26-
while(True):
25+
while True:
2726
data = bytes.decode(self.rfile.readline().strip())
2827
if data == "":
2928
print("Connection closed", flush=True)
@@ -34,8 +33,8 @@ def handle(self):
3433
if m is None:
3534
# Not syslog format for some reason, just send raw message to console and file
3635
print(data, flush=True)
37-
#with open("/log-dir/log.txt", 'a') as file_:
38-
#file_.write(data + '\n')
36+
# with open("/log-dir/log.txt", 'a') as file_:
37+
# file_.write(data + '\n')
3938
else:
4039
# Now, is the message valid JSON?
4140
try:
@@ -48,14 +47,14 @@ def handle(self):
4847
# Send nicely structured message to console and file
4948
data = "{0} {1} {2} {3} {4} {5}".format(m.group(1), m.group(2), level, message, exception, traceid)
5049
print(data, flush=True)
51-
#with open("/log-dir/log.txt", 'a') as file_:
52-
#file_.write(data + '\n')
50+
# with open("/log-dir/log.txt", 'a') as file_:
51+
# file_.write(data + '\n')
5352
except ValueError:
5453
# Nope. Send half-structured message to console and file
5554
data = "{0} {1} {2}".format(m.group(1), m.group(2), m.group(3))
5655
print(data, flush=True)
57-
#with open("/log-dir/log.txt", 'a') as file_:
58-
#file_.write(data + '\n')
56+
# with open("/log-dir/log.txt", 'a') as file_:
57+
# file_.write(data + '\n')
5958

6059

6160
if __name__ == "__main__":
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This is so a reset (dc down) won't remove the base rabbit image, only the one created from this dockerfile
2+
FROM docker.io/rabbitmq:4.2-management-alpine
3+
# Copy the configuration file to rabbitmq
4+
# https://www.rabbitmq.com/configure.html#configuration-files
5+
COPY rabbitmq.conf /etc/rabbitmq/
6+
# Copy certs for TLS
7+
# Nice tool here from rabbit for generating https://github.com/rabbitmq/tls-gen
8+
COPY certs/ca_certificate.pem certs/server_certificate.pem certs/server_key.pem certs/
9+
# This plugin adds a consistent-hash exchange type to RabbitMQ. This exchange type uses consistent hashing to
10+
# distribute messages between the bound queues
11+
RUN rabbitmq-plugins --offline enable rabbitmq_consistent_hash_exchange
12+
# This is a RabbitMQ plugin adds message transfer and management functionality.
13+
# Handy for tasks such as bulk moving msgs for a DLQ.
14+
# https://www.rabbitmq.com/shovel.html
15+
RUN rabbitmq-plugins --offline enable rabbitmq_shovel rabbitmq_shovel_management
16+
# This is a RabbitMQ plugin that exposes streams.
17+
# Streams are a new persistent and replicated data structure, handy to persist historic messages for a period of time
18+
# https://www.rabbitmq.com/stream.html
19+
RUN rabbitmq-plugins --offline enable rabbitmq_stream && \
20+
rabbitmq-plugins --offline enable rabbitmq_prometheus
895 Bytes
Binary file not shown.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIDezCCAmOgAwIBAgIJALM67Mx3qs5qMA0GCSqGSIb3DQEBCwUAMEwxOzA5BgNV
3+
BAMMMlRMU0dlblNlbGZTaWduZWR0Um9vdENBIDIwMjItMDctMjJUMTc6NTc6MjMu
4+
Njc3MTQwMQ0wCwYDVQQHDAQkJCQkMB4XDTIyMDcyMjE2NTc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52/VAFXh1/g==
21+
-----END CERTIFICATE-----
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
-----BEGIN PRIVATE KEY-----
2+
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDfb+RXOj3kCE39
3+
7cnE665FGJr3RxTrcUdE08Fu5W8ocwpXQzo2j0qyKrJ09U6ASMnBhhVkALv6qGWk
4+
jNLcAVDv+kxLPV2pg7yrT+xzIklhtsUkkko9GHV++2mWvbW1cFWZR38trUjrEVPO
5+
3zoclJTwAO6B4u48ZhFocxieGpg28fHVnKf/Z6ziMAu54kLRbCNM2F3/XUl0l/A4
6+
l4uyCRVaEZRq/v+TaMYs4hLx6TgsAZ43daVO9xG/qQRiD+Sjpgj5e85s6THTct6+
7+
ahU2Rkwa1wYlGbSCIq8QaGop1R7+J9PLwWmiQWriHUHccegNGhwmcv456gFgB8El
8+
dgYBpUOXAgMBAAECggEAAxCi3jtzS+R9RWV0phnhixsaTRgRhmVIZ/5LofzNuI1T
9+
b/0BGGyAxs7lIcuXpxTYh6oSMwv7iCW1NzujTNdLx+70Cvgth7zB4su236FxxkBe
10+
lfDXydzDB9nlCedSTcnbsr2TVgoRfQAA2U6gmnHDVUN+AhQd1oBD7t3dUZXlzqMe
11+
bznn/CzHXonhHbHT79KbZHgb1lJGZQapjUGdwmAdjLt+flJcD7SCYabG/4tfwo/c
12+
L7EKeJb3Pye3mdVvs6sLMyPmrTxaT5PILllFwbzmcuoTmWi3AZ4e6qwygpGvtXLo
13+
oOlZfuShdXz2MCoG7KUEX/kgwHZy5jUivxyn7aqOAQKBgQD7kqEr87WJAhJ6TgFL
14+
T4ndmTYYuExEfIAu4D9UFuEiFH04GSMcT5RUpyZc20rIaL4sz8FVHYffqXbK24pl
15+
ScD2wtsb6sm9+tadtNxnihd2z5nT0z4SYYu13ImOWGeEri2UDXu0vnwCA9ULCq5w
16+
Sj9gyYxlZykTElW4C2gjhSlClwKBgQDjXoHU3jONJYa+QAqlmIKIB37fftkAnKsY
17+
yjN6hvlFU4U0OI6bxYSvjfIzSp/GEEHOXWNlFfkRBR7uMRUmMPYxxPq73c61pVO1
18+
d6BxTOK/tHNwi0pJeNRUYonyqlwnOwOfwkPh0BYudV7NbArq5eWMGGo8G5hkStZ/
19+
feQDbUEnAQKBgQDHXgeuTkAiaOr91A3AgjMu03mEk6GVcNkgzQRC/rLCEFy/9WPW
20+
ztYtVB3Z3svgEOoNl0OO0Y1ZWfJThzKhXJa4t+lusV3Z2gz1BFzbDRvVQ2aT8Uey
21+
x20x3amBjlvTUTm7qAfOUFr0Odc/HeLqCF07td42ik+J1rDp3thTtfbh1wKBgFnT
22+
6K9U6kEFZmqbmpk527gqXfGmh806GE6+8/+ge7LsAGBVR+I68uT4y4uAHAeAPL9v
23+
Hem9+JzEzSeFtLlV9q5LCFRYmWYiXyP+kyCwI5VhkYoRPdQxLJH6LE33CFlnc1MW
24+
yQLZ1ymbrUyzNsz+7uWeb7o3nMli18Oe1QqVi3wBAoGBAOIMYwFP5aYXktN9rYS+
25+
XQdKWy1PbetdAsEklf84J351A2Ggh+X7rE/eBvOySLEqncsaWXytZN0HBE6m5ztN
26+
XFe/N/jU3m4buefmFukznnTkhuu70lS/RBqWy+2IgRwO5l6sUrbst4VypJCi1xTD
27+
ExD4m0ADahDs3x+k60BL7x82
28+
-----END PRIVATE KEY-----
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIDhzCCAm+gAwIBAgIBAjANBgkqhkiG9w0BAQsFADBMMTswOQYDVQQDDDJUTFNH
3+
ZW5TZWxmU2lnbmVkdFJvb3RDQSAyMDIyLTA3LTIyVDE3OjU3OjIzLjY3NzE0MDEN
4+
MAsGA1UEBwwEJCQkJDAeFw0yMjA3MjIxNjU3MjRaFw0zMjA3MTkxNjU3MjRaMCQx
5+
ETAPBgNVBAMMCHJh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