Add rabbitmq-up command for creation of
a local user service for development of tunnelbroker.
Details
- Reviewers
• max • abosh varun atul - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rCOMM449de39cde50: [Nix] Add rabbitmq-up command
# Stop any existing rabbitmq services if they exist nix develop nix run .#rabbitmq-up # Should show that it's bound to 5672, and listening tail -f $HOME/.local/share/RabbitMQ/logs/comm.log # Running it again should do nothing nix run .#rabbitmq-up # Cleanup services, optional pkill rabbitmq-server beam.smp
Diff Detail
- Repository
- rCOMM Comm
- Branch
- jonringer/rabbitmq
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
atul@atuls-MacBook-Pro comm % nix develop Existing Redis instance found outside of nix environment Please stop existing services and attempt 'nix develop' again Existing MariaDB instance found outside of nix environment Please stop existing services and attempt 'nix develop' again Welcome to Comm dev environment! :) atuls-MacBook-Pro:comm atul$ nix run .#rabbitmq-up Starting RabbitMQ /nix/store/b5prjzmy2lshrl2dq6bdbf2hld9km8sw-start_comm_daemon.sh: line 20: /Users/atul/.local/share/RabbitMQ/rabbitmq.pid: No such file or directory atuls-MacBook-Pro:comm atul$ View RabbitMQ logs: tail -f /Users/atul/.local/share/RabbitMQ/logs/comm.log Kill RabbitMQ server: pkill rabbitmq-server beam.smp /nix/store/9rqvrg9ykyzqjk8xlsbsnyr394n3mi9v-rabbitmq-init/bin/rabbitmq-init: line 16: /Users/atul/.local/share/RabbitMQ/logs/startup.log: No such file or directory
atul@atuls-MacBook-Pro comm % nix develop warning: Using saved setting for 'extra-trusted-public-keys = comm.cachix.org-1:70RF31rkmCEhQ9HrXA2uXcpqQKGcUK3TxLJdgcUCaA4=' from ~/.local/share/nix/trusted-settings.json. warning: Using saved setting for 'extra-trusted-substituters = https://comm.cachix.org' from ~/.local/share/nix/trusted-settings.json. Restored session: Mon Oct 10 21:48:30 EDT 2022 Existing MariaDB instance found outside of nix environment Please stop existing services and attempt 'nix develop' again Existing Redis instance found outside of nix environment Please stop existing services and attempt 'nix develop' again Welcome to Comm dev environment! :) atuls-MacBook-Pro:comm atul$ nix run .#rabbitmq-up Starting RabbitMQ atuls-MacBook-Pro:comm atul$ /nix/store/nh66479vxwclh2b3c4piipa4ygn3r8jw-rabbitmq-init/bin/rabbitmq-init: line 8: RABBITMQ_LOGS_BASE: unbound variable
Do we need to update something on CI side?
Ubuntu shellcheck is 0.7.1, nix uses 0.8.
The older one seems to error if you set a variable, then use it later without the # shellcheck source=... line.
Not sure how much we can do, unless you just want to use nixpkgs' shellcheck.
scripts/source_development_defaults.sh | ||
---|---|---|
16 | Maybe we should add a default username and password for the local RabbitMQ? : RABBITMQ_DEFAULT_PASS=comm RABBITMQ_DEFAULT_USER=comm And then we can use the same credentials for the dev default config file for the Tunnelbroker. So the devs will not touch the config and RabbitMQ admin to start. |
flake.nix | ||
---|---|---|
16 | self is a reference to the flake. toString forces the flake to render as a string representing the path in the nix store. So we have a way to reference the entire code base. This is needed because the scripts assume they are co-located to each other. One optimization for this might just be adding the scripts directory only... Then we don't have reference the entire code base. | |
scripts/source_development_defaults.sh | ||
16 | Sounds good to me, I just ran rabbitmq enough to see that it starts without erroring. |