Open linostar opened 5 months ago
Diff of dependencies:
Manual testing of the slice in a rock:
rockcraft.yaml
name: rabbitmq
base: ubuntu@24.04
version: '0.1'
summary: RabbitMQ rock
description: |
This is a RabbitMQ Server rock.
platforms:
amd64:
services:
rabbitmq-service:
override: replace
startup: enabled
command: /usr/sbin/rabbitmq-server
parts:
build-context:
plugin: nil
source: chisel-releases/
source-type: local
override-build: |
set -x
ERL_COOKIE=${CRAFT_PART_INSTALL}/var/lib/rabbitmq/.erlang.cookie
chisel cut --release ./ --root ${CRAFT_PART_INSTALL} rabbitmq-server_bins
groupadd -r -g 90 -R ${CRAFT_PART_INSTALL} rabbitmq
useradd -d /var/lib/rabbitmq -M -u 90 -g 90 -r -s /usr/sbin/nologin -R ${CRAFT_PART_INSTALL} rabbitmq
chown 90:90 ${CRAFT_PART_INSTALL}/etc/rabbitmq
chown -R 90:90 ${CRAFT_PART_INSTALL}/var/lib/rabbitmq
chown -R 90:90 ${CRAFT_PART_INSTALL}/var/log/rabbitmq
openssl rand -base64 -out ${ERL_COOKIE} 42
chown 90:90 ${ERL_COOKIE}
chmod 400 ${ERL_COOKIE}
Running the rock:
$ docker run --rm rabbitmq --verbose
2024-07-01T12:27:18.585Z [pebble] Started daemon.
2024-07-01T12:27:18.595Z [pebble] POST /v1/services 5.384266ms 202
2024-07-01T12:27:18.599Z [pebble] Service "rabbitmq-service" starting: /usr/sbin/rabbitmq-server
2024-07-01T12:27:19.611Z [pebble] GET /v1/changes/1/wait 1.01580796s 200
2024-07-01T12:27:19.612Z [pebble] Started default services with change 1.
2024-07-01T12:27:20.687Z [rabbitmq-service] 2024-07-01 12:27:20.683100+00:00 [notice] <0.44.0> Application syslog exited with reason: stopped
2024-07-01T12:27:20.687Z [rabbitmq-service] 2024-07-01 12:27:20.687486+00:00 [notice] <0.230.0> Logging: switching to configured handler(s); following messages may not be visible in this log output
2024-07-01T12:27:20.998Z [rabbitmq-service]
2024-07-01T12:27:20.998Z [rabbitmq-service] ## ## RabbitMQ 3.12.1
2024-07-01T12:27:20.998Z [rabbitmq-service] ## ##
2024-07-01T12:27:20.998Z [rabbitmq-service] ########## Copyright (c) 2007-2023 VMware, Inc. or its affiliates.
2024-07-01T12:27:20.998Z [rabbitmq-service] ###### ##
2024-07-01T12:27:20.998Z [rabbitmq-service] ########## Licensed under the MPL 2.0. Website: https://rabbitmq.com
2024-07-01T12:27:20.998Z [rabbitmq-service]
2024-07-01T12:27:20.998Z [rabbitmq-service] Erlang: 25.3.2.8 [jit]
2024-07-01T12:27:20.998Z [rabbitmq-service] TLS Library: OpenSSL - OpenSSL 3.0.13 30 Jan 2024
2024-07-01T12:27:20.998Z [rabbitmq-service] Release series support status: supported
2024-07-01T12:27:20.998Z [rabbitmq-service]
2024-07-01T12:27:20.998Z [rabbitmq-service] Doc guides: https://rabbitmq.com/documentation.html
2024-07-01T12:27:20.998Z [rabbitmq-service] Support: https://rabbitmq.com/contact.html
2024-07-01T12:27:20.998Z [rabbitmq-service] Tutorials: https://rabbitmq.com/getstarted.html
2024-07-01T12:27:20.998Z [rabbitmq-service] Monitoring: https://rabbitmq.com/monitoring.html
2024-07-01T12:27:20.998Z [rabbitmq-service]
2024-07-01T12:27:20.998Z [rabbitmq-service] Logs: /var/log/rabbitmq/rabbit@e98fcf741cde.log
2024-07-01T12:27:20.998Z [rabbitmq-service] <stdout>
2024-07-01T12:27:20.998Z [rabbitmq-service]
2024-07-01T12:27:20.998Z [rabbitmq-service] Config file(s): (none)
2024-07-01T12:27:20.998Z [rabbitmq-service]
2024-07-01T12:27:20.998Z [rabbitmq-service] Starting broker... completed with 0 plugins.
thanks for this.
can you please explain the rationale for this diff:
@@ -1,19 +1,5 @@ adduser -erlang-base -erlang-base-hipe -erlang-crypto -erlang-eldap -erlang-inets -erlang-mnesia -erlang-os-mon -erlang-parsetools -erlang-public-key -erlang-runtime-tools -erlang-ssl -erlang-syntax-tools -erlang-tools -erlang-xmerl -logrotate +base-files openssl -python3 +python3.12 socat
Also, thanks for the test rock. Can you demonstrate a simple message exchange?
erlang* and logrotate packages are not available for i386 arch, so they have been commented out.
Rafid's review:
erlang* and logrotate packages are not available for i386 arch, so they have been commented out.
and the additions?
@rebornplusplus This is ready for a final review, as all tests now are passing.
@cjdcordeiro @rebornplusplus This has been rebased with the lastest upstream changes so it's ready for review.
Erlang slices were moved to another separate PR #384.
Proposed changes
Add
rabbitmq-server
andlibrabbitmq4
slices to 24.04.Note that erlang* and logrotate packages are not available for i386 arch, so they have been commented out.
Related issues/PRs
N/A
Forward porting
N/A
Testing
Checklist
Additional Context
erlang-base
and other erlang related packages don't exist for that archpython3.12
slice was used instead ofpython
systemd
slices were not added because they are not necessary