Commit Graph

261 Commits

Author SHA1 Message Date
GitHub 31aa5874e8 Adopt otp 24.1.2 for OCI workflow 2021-10-06 03:04:52 +00:00
GitHub 59fb2afce9 Adopt otp 24.1.1 for OCI workflow 2021-10-01 03:04:56 +00:00
GitHub 49d1a0f094 Adopt otp 24.1 for OCI workflow 2021-09-23 13:22:42 +00:00
Gerhard Lazu 37ea496273
Add debug utilities to Docker image
We need these to debug various rabbitmq-related issues. Ephemeral debug
containers are not enabled on GKE Autopilot (not sure if GKE enables
this alpha feature at all), so we are doing this instead.

    error: ephemeral containers are disabled for this cluster (error from server: "the server could not find the requested resource").

Backport to v3.9.x & v3.8.x if build passes

Pair @Gsantomaggio

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-09-07 16:29:40 +01:00
pjk25 bcdbe14e44 [create-pull-request] automated change 2021-09-03 13:54:52 +00:00
Philip Kuryloski 5c603f0820 Enable the update-otp-for-oci.yaml workflow 2021-09-03 15:51:34 +02:00
Philip Kuryloski b562b08db0 Add a workflow that will open PRs to bump otp_max patch version
in the OCI workflow
2021-09-03 14:58:58 +02:00
Philip Kuryloski 81ad77e120 Apply the same default config as docker-library/rabbitmq 2021-07-26 15:45:04 +02:00
Philip Kuryloski db2aeea3d9 Fix `make docker-image` as executed from the repo root 2021-07-26 15:40:52 +02:00
Philip Kuryloski 14906b9b41 Adopt the simplified docker-entrypoint.sh from docker library 2021-07-26 15:40:51 +02:00
Gerhard Lazu ead61228b7
Build otp-min & otp-max dev container images (OCIs)
Add a make target that helps finding out SHA256 for specific OTP
versions. Inline comments have all the context.

Pushing straight to master to find out if it works. If it does, will
back-port to v3.9.x & v3.8.x

cc @ansd

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-07-07 11:23:40 +01:00
Gerhard Lazu 76c9712d30
Enable all plugins & ports in development container images (OCIs)
This is the best way of ensuring that everything works. RabbitMQ is not
just the core components, it's all the plugins that ship with it.  While
we don't expect anyone to enable all plugins at the same time (for
example enabling all peer discovery plugins at the same time doesn't
make sense), we need to be minimally confident that everything works.
As we work on & QA various features in dev, this is the quickest way of
doing just that.

For example, today we were testing some Stream features with
@GSantomaggio and discovered that we needed to use a different image for
it, pivotalrabbitmq/rabbitmq-stream, because in the dev image we don't
enable the stream plugin by default. There is no reason why we would
need a different container image to test a core feature, that ships part
of RabbitMQ as a Tier 1 plugin. To be honest, I strongly believe that
everyone be looking at these specific images (otp-max & otp-max-1) which
bundle the majority of the RabbitMQ experience in a single artefact,
including OpenSSL & Erlang.

While I would normally push this straight into the main branch, I'm
doing it as a PR so that the following notice, and have the opportunity
to comment on this standalone:
- @michaelklishin
- @GSantomaggio
- @Zerpet
- @MirahImage
- @ansd

As next steps, after all checks pass, can someone from the above list
action the following please:
- merge into our main branch
- backport to v3.9.x
- deploy to lre-3-9

🙌

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-07-02 09:36:50 +01:00
David Ansari dfbce39172 Build two OCI images
1. with minimum required Erlang
2. with maximum supported Erlang
2021-06-24 14:19:31 +02:00
David Ansari 91a598ed2c Bump to Erlang 24 and enable JIT compilation
See https://github.com/docker-library/rabbitmq/pull/492

Co-authored-by: Michal Kuratczyk <mkuratczyk@vmware.com>

Ensure compilation and runtime Erlang are in sync

Bump to Ubuntu 20.04

docker-library/rabbitmq also uses Ubuntu 20.04
2021-06-21 18:05:30 +02:00
Philip Kuryloski 54666a6231 Skip pgp verification for openssl archive in OCI images
The flake rate is too high for every CI run
2021-06-21 10:40:03 +02:00
Gerhard Lazu c0b4fef310
Use a different PGP keyserver for OpenSSL PGP keys
Certain keyservers fail seasonally & intermittently - every few months
one stops working reliabley - so then we alternate between them. Last
time we had this problem, pgpkeys.eu was failing, and now pgpkeys.uk
seems to be failing and resulting in flaky builds:

https://github.com/rabbitmq/rabbitmq-server/runs/2663558141?check_suite_focus=true

Trying pgpkeys.eu now, and preparing to go to the Ubuntu one next if
this one proves to not be as reliable as we would like it to be.

As a different approach, I am wondering if we should store these PGP
keys somewhere instead? WDYT @dumbbell?

Thanks @pjk25 for flagging this!

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-05-25 11:24:21 +01:00
David Ansari 56f3efab71 Tag docker image with branch name
in addition to tagging the docker image with the Git commit SHA.

This enables the cluster-operator to run system-tests against latest
rabbitmq-server master branch which allows us to fix any breaking
changes early and to test unreleased features such as rabbitmq_stream
plugin.
2021-04-23 11:53:53 +02:00
Gerhard Lazu 0befef897c
Build & push container image on every commit
Before this, someone would need to run the package-generic-unix and
docker-image make targets in order to produce a container image. This
wouldn't always work: more than one archive in the PACKAGES dir, VERSION
& RABBITMQ_VERSION had to be specified, + characters in VERSION. It also
required me to have Docker running, which I am reluctant to leave
running on macOS because it uses CPU even when idle, and starting it
every time that I wanted an ad-hoc container image implied waiting a few
minutes, and then waiting another 15 minutes for the container image to
be produced and published to hub.docker.com.

This commit delegates all the above to GitHub Actions. The best part is
that it happens asynchronously - every commit triggers it - and a
container image for that commit will appear on hub.docker.com within ~15
minutes. In other words, anyone can test any commit in their container
runtime within 20 minutes, without needing to lift a finger.  No Docker,
no make targets, just reference the new tag (matches the git sha) and
off you go. It's the beginning of something better, for sure.

Did some cleanup in the Dockerfile part of this. Dropped
RABBITMQ_VERSION build arg, env & commented steps. This is cruft that we
no longer need or even use.

Also fixed VERSION in push target and broken the dependency on dist so
that they can be run independently.

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-04-01 12:00:55 +01:00
Loïc Hoguin 314eb3f4d7
erl_interface is required in OTP-24+ 2021-03-16 12:01:30 +01:00
Philip Kuryloski a3cfac3232 Move most packaging goal implementations to rabbitmq-packaging 2021-02-26 11:39:01 +01:00
Philip Kuryloski 36fef6b5b7 Revert "Remove directories used by the server release pipeline"
This reverts commit b1eaf8c9e2.
2021-02-26 09:05:30 +01:00
Philip Kuryloski e76f0e0bb4 Fix the docker image for use with uncompressed plugins
Historically the docker image build extracts the rabbitmqadmin cli from the
management .ez. This step is now conditional.
2021-02-23 12:40:55 +01:00
Philip Kuryloski 7c63b8e4fb Adjust the version and tag selection mechanism for `make docker-image`
The previous approach assumed `make package-generic-unix` had only been run once.
This borrows a snippet from rabbitmq-components.mk to select the `current` version
for the docker build by default.
2021-02-23 11:26:29 +01:00
Philip Kuryloski 15e6beea2a `make docker-image` no longer pushes the image by default
`make docker-image-push` maintains the previous behavior
2021-02-23 11:26:29 +01:00
Philip Kuryloski b1eaf8c9e2 Remove directories used by the server release pipeline
These directories are mutated by the server-release concourse
pipelines, and so their contents will remain in the separate
rabbitmq-packaging repository
2021-02-23 11:26:29 +01:00
Gerhard Lazu 9d798dedc1 Remove redundant SOURCE_DIST_FILE
It was a package-generic-unix dep requirement, which is now gone.

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-02-23 11:26:29 +01:00
Gerhard Lazu 4f0973620d Build the docker image, don't just echo
Also, don't depend on package-generic-unix, otherwise that will be
re-built every time we want to build the docker image, which is
unnecessary. It will fail now if a generic-unix doesn't exist, but
that's OK.

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-02-23 11:26:29 +01:00
Gerhard Lazu a937c6c7c7 Fix OPENSSL_PGP_KEY_IDS ENV in Dockerfile
I copied the pre-templating version from the official Dockerfile

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-02-23 11:26:29 +01:00
Gerhard Lazu aacec68c34 Use same docker config as the official rabbitmq image
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-02-23 11:26:29 +01:00
Philip Kuryloski d041315336 Revert "Remove the packaging directory"
This reverts commit 2067a68735.
2021-02-23 11:26:29 +01:00
Philip Kuryloski 50e7ef814c Restore a portion of the packaging directory
These files are used by make goals in this repo
2021-01-05 09:41:40 +01:00
Philip Kuryloski 2067a68735 Remove the packaging directory
It has been extracted to https://github.com/rabbitmq/rabbitmq-packaging
2021-01-04 14:42:43 +01:00
Jiahao Guo b10b2eb6a3
Add \d for the cd command
This shortcut is using cmd.exe, and when the install directory of rabbitmq is not in the same drive as the cmd.exe, the cd command will not work unless adding a \d for it.
2020-12-14 14:19:11 -05:00
Jean-Sébastien Pédron 4568ab0fb9
packaging/docker-image: Move Docker files to their own directory
Like other packaging files, they should not be part of RabbitMQ itself.
One day, they will probably be moved to a dedicated repository, like
other packaging files.
2020-11-16 12:18:39 +01:00
Jean-Sébastien Pédron 31e67268d7
RPM: Use same build & runtime dependencies for all RPM-based distributions
We used to have a special case for OpenSUSE because we were using the
"Ledest" Erlang community packages.

We just switch to the Erlang:Factory packages in CI for OpenSUSE. They
are compatible with other official and community packages, and also
Erlang packages from other RPM-based distributions.

Note that the build dependencies are not tested at all: we still use
Debian to build the RPM packages and dependency checking is disabled.
Therefore, it's more than possible that the RPM source package does not
build successfully.
2020-10-26 13:06:04 +01:00
Jean-Sébastien Pédron 23df56df7a
RPM: Do not depend on `epmd`
We find two series of Erlang packages for OpenSUSE. The first one
provides `erlang-epmd` and `erlang` only depends on it. The official
packages and most community packages use that form.

In CI, we were used to use packages from "Ledest". It uses a second form
where the EPMD package is called `epmd` nad `erlang` does not depend on
it. Therefore, in order to have EPMD installed, I addded `epmd` as a
dependency.

Now that there are many good community packages providing the latest and
greatest versions of Erlang, we can use other recommended community
packages, if the official OpenSUSE packages only provide an old version
of Erlang.

Therefore, in order to be compatible with the first form, we can't
depend on `epmd` as it doesn't exist in that series.
2020-10-23 17:35:04 +02:00
Jean-Sébastien Pédron 2bd3f6f331
Debian: Bump minimum required Elixir to 1.10.4
We also use this value during package building to pin the version of
Elixir (to make sure we use the correct one).
2020-10-05 15:51:08 +02:00
Jean-Sébastien Pédron c470e71c9a
packaging: Bump minimum Erlang version of 22.3
... for the RPM and Debian packages.
2020-09-25 16:55:25 +02:00
Jean-Sébastien Pédron 545a1ee68f
packaging/generic-unix: Fix the way we path files list to tar(1)
If we use xargs(1) to call tar(1), we are limited by the number of
arguments we can put on the command line. Since we switch to use
directories to "package" plugins instead of .ez archives, the number of
files exploded. This led to incomplete generic-unix archives (i.e. some
plugins and CLI scripts were missing for instance).

Now, the list of files is written to a manifest, exactly like we do it
to create the source archive.
2020-08-11 16:28:24 +02:00
Michael Klishin c7ac344747
Include full MPL 2.0 text into debian/copyright 2020-07-17 16:12:05 +03:00
Michael Klishin 858ef574c0
Switch to MPL 2.0 2020-07-17 16:10:14 +03:00
Jean-Sébastien Pédron 9022b9ce0c
scripts/rabbitmq-script-wrapper: Don't mess with console redirection
Console output is handled in the SysV init scripts consistently (no more
differences between the Debian and RPM packages). See the previous
commit.

This fixes an issue for users who used to define $RABBITMQ_LOG_BASE in
the environment and called this script directly (i.e. not using the SysV
init scripts). Before commit 4b7048205d
(which made it to RabbitMQ 3.8.4), `rabbitmq-script-wrapper` took
$RABBITMQ_LOG_BASE from rabbitmq-env(8) or the environment. After the
mentionned commit, $RABBITMQ_LOG_BASE was hard-coded to setup console
redirection (in the case of Debian only) because rabbitmq-env(8) didn't
have the variable anymore and thus was not sourced.

For those users, it meant they couldn't override $RABBITMQ_LOG_BASE in
the environment and call this script, even if they wanted to change the
location of RabbitMQ actual log files.

Now that console redirection is handled by the SysV init scripts, we can
get rid of that code in `rabbitmq-script-wrapper`.

Fixes rabbitmq/rabbitmq-server-release#131.
2020-06-08 15:43:02 +02:00
Jean-Sébastien Pédron aef4872ea0
packaging: Use $RABBITMQ_SERVER_CONSOLE_OUTPUT_DIR to configure stdout/stderr redirections
Historically we were using $RABBITMQ_LOG_BASE to configure the
redirection. The variable default value was set in rabbitmq-env(8) which
made it to the SysV init scripts because they sourced it in the past.

This was removed in commit 4b7048205d as
part of the transition to rabbit_env/rabbitmq_prelaunch to handle the
environment in the Erlang code (see rabbitmq/rabbitmq-server#2180).
Instead, the value of $RABBITMQ_LOG_BASE was hard-coded. Unfortunately,
this caused a regression because users couldn't configure it from
rabbitmq-env.conf anymore (only /etc/default/rabbitmq-server).

Anyway, the semantic was slightly incorrect: $RABBITMQ_LOG_BASE is used
in the configuration of log files RabbitMQ is responsible for. Console
redirection is the responsibility of the SysV init scripts and the
package which creates the directory and set ownership.

This patch introduces a new $RABBITMQ_SERVER_CONSOLE_OUTPUT_DIR variable
which is specific to the SysV init scripts. For backward compatibility,
we still look at the value of $RABBITMQ_LOG_BASE if the user set it in
/etc/default/rabbitmq-server.

While here, align the Debian SysV init script behavior with the RPM
version of the script: console redirection is always configured in the
SysV init script, not in `rabbitmq-script-wrapper`. A subsequent commit
will take care of cleaning `rabbitmq-script-wrapper`.

The solution to redirect output when using start-stop-daemon(8) was
taking from the following post:
https://stackoverflow.com/questions/8251933/how-can-i-log-the-stdout-of-a-process-started-by-start-stop-daemon

References rabbitmq/rabbitmq-server-release#131.
2020-06-08 15:43:02 +02:00
Michael Klishin e2d9b5fd87
Debian control file: mark Erlang 23.0 as compatible 2020-05-19 21:56:22 +03:00
Nicolas Bock 3a7b6b2f63
Update debian/watch file to pull from GitHub
RabbitMQ is released on GitHub. Update the `debian/watch` file to
point to this location.

Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
2020-05-13 08:21:16 -06:00
Nicolas Bock 694540270c
Add timeout to rabbitmqctl wait statement
After starting the RabbitMQ server process, the startup script will
wait for the server to start by calling `rabbitmqctl wait` and will
time out after 10 s.

The startup time of the server depends on how quickly the Mnesia
database becomes available and the server will time out after
`mnesia_table_loading_retry_timeout` ms times
`mnesia_table_loading_retry_limit` retries. By default this wait is
30,000 ms times 10 retries, i.e. 300 s.

The mismatch between these two timeout values might lead to the
startup script failing prematurely while the server is still waiting
for the Mnesia tables.

This change introduces variable `RABBITMQ_STARTUP_TIMEOUT` and the
`--timeout` option into the startup script. The default value for this
timeout is set to 10 minutes (600 seconds).

This change also updates the systemd service file to match the timeout
values between the two service management methods.

Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
2020-04-17 06:20:57 -06:00
Jean-Sébastien Pédron 1cf3af5a79
Update copyright (year 2020) 2020-03-10 16:49:26 +01:00
Jean-Sébastien Pédron 3cce2b5b4d
Windows: Change organization from Pivotal to VMware 2020-03-10 16:47:06 +01:00
Jean-Sébastien Pédron c9f15a187f
Debian: Bump minimum required Elixir to 1.8.0
We also use this value during package building to pin the version of
Elixir (to make sure we use the correct one).
2020-03-09 09:48:34 +01:00
Jean-Sébastien Pédron 4e814bd478
RPM: Adapt build/runtime dependencies to the OpenSUSE Erlang package
The package is built and tested using the following community
repository:
https://build.opensuse.org/project/show/home:Ledest:erlang:22
2020-03-02 16:49:11 +01:00