Skip to content

Commit

Permalink
add fluxuser builds
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch committed Oct 24, 2023
1 parent 4d398a5 commit f69a8fa
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-merlin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
container: [["merlin-demos/Dockerfile", 'ghcr.io/rse-ops/merlin-demos:merlin'],
["merlin-demos/Dockerfile.flux", 'ghcr.io/rse-ops/merlin-demos-flux:merlin'],
["merlin-demos/Dockerfile.rabbitmq", 'ghcr.io/rse-ops/merlin-demos:rabbitmq'],
["merlin-demos/Dockerfile.rabbitmq-fluxuser", 'ghcr.io/rse-ops/merlin-demos-flux:rabbitmq'],
["merlin-demos/Dockerfile.redis", 'ghcr.io/rse-ops/merlin-demos:redis'],
["merlin-demos-certs/Dockerfile", 'ghcr.io/rse-ops/merlin-demos-certs:merlin'],
["merlin-demos-certs/Dockerfile.flux", 'ghcr.io/rse-ops/merlin-demos-certs-flux:merlin'],
Expand Down
2 changes: 1 addition & 1 deletion merlin-demos-certs/Dockerfile.flux
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN git clone --depth 1 https://github.com/LLNL/merlin-spellbook /tmp/spellbook
pip install .

# Updated app yaml
COPY ./merlinu/app.yaml /home/fluxuser/.merlin/app.yaml
COPY ./merlinu/app-fluxuser.yaml /home/fluxuser/.merlin/app.yaml
COPY ./merlinu/rabbit.pass /home/fluxuser/.merlin/rabbit.pass
COPY ./merlinu/cert_rabbitmq /cert_rabbitmq
COPY ./merlinu/cert_redis /cert_redis
Expand Down
5 changes: 5 additions & 0 deletions merlin-demos-certs/Dockerfile.rabbitmq-fluxuser
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM rabbitmq:3-management
COPY ./scripts/rabbitmq-entrypoint.sh /entrypoint.sh
COPY ./merlinu/rabbitmq-fluxuser.conf /etc/rabbitmq/rabbitmq.conf
COPY ./merlinu/cert_rabbitmq /cert_rabbitmq
ENTRYPOINT /entrypoint.sh
6 changes: 5 additions & 1 deletion merlin-demos-certs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ and using a container with redis, and a container we build with Flux and the dem

See [merlin-demos](../merlin-demos) for how the certificates were generated.


## 2. Docker Build

**IMPORTANT** these containers (and the configs for rabbitmq and app.yaml) have been modified to work with the root user.
If you want to fall back a container with fluxuser you'll need to change them back. The change was made on October 23, 2023
if you want to go back in git history. I figure nobody cares so I'm moving forward with the updated Flux Operator design
(that just uses root).

We will need to build two containers - one for merlin, and one for rabbitmq.
I pushed them to a temporary location:

Expand Down
36 changes: 36 additions & 0 deletions merlin-demos-certs/merlinu/app-fluxuser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
broker:
name: rabbitmq
server: rabbitmq
password: /home/fluxuser/.merlin/rabbit.pass
keyfile: /cert_rabbitmq/client_rabbitmq_key.pem
certfile: /cert_rabbitmq/client_rabbitmq_certificate.pem
ca_certs: /cert_rabbitmq/ca_certificate.pem
vhost: /merlinu

# celery:
# override:
# visibility_timeout: 86400

process:
kill: kill {pid}
status: pgrep -P {pid}

results_backend:

# IMPORTANT: "rediss" means "redis with ssl" it's not a typo
# written by a snake
name: rediss
url: rediss://redis:6379/0
port: 6379
# merlin will generate this key if it does not exist yet,
# and will use it to encrypt all data over the wire to
# your redis server.
encryption_key: /home/fluxuser/.merlin/encrypt_data_key

# I don't think this is used when URL defined.
server: redis

# ssl security
keyfile: /cert_redis/client_redis_key.pem
certfile: /cert_redis/client_redis_certificate.pem
ca_certs: /cert_redis/ca_certificate.pem
4 changes: 2 additions & 2 deletions merlin-demos-certs/merlinu/app.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
broker:
name: rabbitmq
server: rabbitmq
password: /home/fluxuser/.merlin/rabbit.pass
password: /root/.merlin/rabbit.pass
keyfile: /cert_rabbitmq/client_rabbitmq_key.pem
certfile: /cert_rabbitmq/client_rabbitmq_certificate.pem
ca_certs: /cert_rabbitmq/ca_certificate.pem
Expand All @@ -25,7 +25,7 @@ results_backend:
# merlin will generate this key if it does not exist yet,
# and will use it to encrypt all data over the wire to
# your redis server.
encryption_key: /home/fluxuser/.merlin/encrypt_data_key
encryption_key: /root/.merlin/encrypt_data_key

# I don't think this is used when URL defined.
server: redis
Expand Down
11 changes: 11 additions & 0 deletions merlin-demos-certs/merlinu/rabbitmq-fluxuser.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
default_vhost = /merlinu
default_user = fluxuser
default_pass = guest

listeners.ssl.default = 5671

ssl_options.cacertfile = /cert_rabbitmq/ca_certificate.pem
ssl_options.certfile = /cert_rabbitmq/server_rabbitmq_certificate.pem
ssl_options.keyfile = /cert_rabbitmq/server_rabbitmq_key.pem
ssl_options.verify = verify_none
ssl_options.fail_if_no_peer_cert = false
2 changes: 1 addition & 1 deletion merlin-demos-certs/merlinu/rabbitmq.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_vhost = /merlinu
default_user = fluxuser
default_user = root
default_pass = guest

listeners.ssl.default = 5671
Expand Down

0 comments on commit f69a8fa

Please sign in to comment.