Skip to content

Commit

Permalink
Merge pull request vromero#118 from vromero/feature/2.7.0
Browse files Browse the repository at this point in the history
Release 2.7.0
  • Loading branch information
vromero authored May 12, 2019
2 parents 8095934 + 728a666 commit 6d9d15f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
6 changes: 3 additions & 3 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ make
This will run the full build (with the exception of the deployment phase) for all versions presents in the ALL_VERSIONS line in the Makefile, e.g:

```Makefile
ALL_VERSIONS=1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 2.0.0 2.1.0 2.2.0 2.3.0 2.4.0 2.5.0 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4
ALL_VERSIONS=1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 2.0.0 2.1.0 2.2.0 2.3.0 2.4.0 2.5.0 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0
```

To just build *just one version* you can call `make` with `VERSION[-VARIANT]` where variant can be `-alpine` for an Alpine based image build or just nothing for a Debian based one, e.g:
Expand All @@ -41,7 +41,7 @@ make 2.6.0
make 2.6.0-alpine
```

It is also possible to just build the image without testing with `make build_2.6.0`, just testing: `make test_2.6.0`, running the image: `make run_2.6.0` or even run the image for a shell `make runsh_2.6.0`.
It is also possible to just build the image without testing with `make build_2.6.0`, just testing: `make test_2.7.0`, running the image: `make run_2.7.0` or even run the image for a shell `make runsh_2.7.0`.

You can also override the artemis binary distribution url by passing a parameter containing a zip file containing the distribution. ie. `make BUILD_ARGS="--build-arg ACTIVEMQ_DISTRIBUTION_URL=https://repository.apache.org/content/repositories/releases/org/apache/activemq/apache-artemis/2.6.4/apache-artemis-2.6.4-bin.zip" 2.6.4`. Note that you also need to pass in the version # as the first argument (ie 2.6.4)
You can also override the artemis binary distribution url by passing a parameter containing a zip file containing the distribution. ie. `make BUILD_ARGS="--build-arg ACTIVEMQ_DISTRIBUTION_URL=https://repository.apache.org/content/repositories/releases/org/apache/activemq/apache-artemis/2.6.4/apache-artemis-2.7.0-bin.zip" 2.7.0`. Note that you also need to pass in the version # as the first argument (ie 2.6.4)

10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.PHONY: help build test run all

# All the versions supported, useful to build all versions locally with a single command
ALL_VERSIONS=1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 2.0.0 2.1.0 2.2.0 2.3.0 2.4.0 2.5.0 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4
ALL_VERSIONS=1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 2.0.0 2.1.0 2.2.0 2.3.0 2.4.0 2.5.0 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0
# Variants supported for each version
ALL_VARIANTS=default alpine
# All pairs of versions-variants. `default` will not appear in the tag for the rest an `-variant` will be added
Expand Down Expand Up @@ -30,15 +30,15 @@ build_%:
cd src && \
docker build --build-arg ACTIVEMQ_ARTEMIS_VERSION=$(call versionFromTag,$*) $(BUILD_ARGS) -t $(call fullTagNameFromTag,$*) -f $(call dockerfileFromTag,$*) .

testentrypoint_%:
testentrypoint_%:
shellcheck --version
shellcheck src/assets/docker-entrypoint.sh

tag_%:
for alias in $(call fullAliasesTagNames); do docker tag $(call fullTagNameFromTag,$*) $$alias ; done

push_%:
docker push $(call fullTagNameFromTag,$*)
push_%:
docker push $(call fullTagNameFromTag,$*)
for alias in $(call fullAliasesTagNames); do docker push $$alias ; done

run_%: build
Expand All @@ -49,7 +49,7 @@ runsh_%: build

all: $(ALL_VERSION_TAGS)

testdockerfile_%:
testdockerfile_%:
cd src && \
docker run --rm -i hadolint/hadolint < $(call dockerfileFromTag,$*)

Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![latest 2.6.4](https://img.shields.io/badge/latest-2.6.4-blue.svg?style=flat) ![License MIT](https://img.shields.io/badge/license-APACHE-blue.svg) [![Build Status](https://travis-ci.org/vromero/activemq-artemis-docker.svg?branch=master)](https://travis-ci.org/vromero/activemq-artemis-docker) [![](https://img.shields.io/docker/stars/vromero/activemq-artemis.svg)](https://hub.docker.com/r/vromero/activemq-artemis 'DockerHub') [![](https://img.shields.io/docker/pulls/vromero/activemq-artemis.svg)](https://hub.docker.com/r/vromero/activemq-artemis 'DockerHub') [![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/vromero)
![latest 2.7.0](https://img.shields.io/badge/latest-2.7.0-blue.svg?style=flat) ![License MIT](https://img.shields.io/badge/license-APACHE-blue.svg) [![Build Status](https://travis-ci.org/vromero/activemq-artemis-docker.svg?branch=master)](https://travis-ci.org/vromero/activemq-artemis-docker) [![](https://img.shields.io/docker/stars/vromero/activemq-artemis.svg)](https://hub.docker.com/r/vromero/activemq-artemis 'DockerHub') [![](https://img.shields.io/docker/pulls/vromero/activemq-artemis.svg)](https://hub.docker.com/r/vromero/activemq-artemis 'DockerHub') [![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/vromero)

## 1. What is ActiveMQ Artemis?

Expand All @@ -11,6 +11,7 @@
| Debian Based | Alpine Based |
|--------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| [`latest`](https://raw.githubusercontent.com/vromero/activemq-artemis-docker/master/src/Dockerfile) | [`latest-alpine`](https://raw.githubusercontent.com/vromero/activemq-artemis-docker/master/src/Dockerfile.alpine) |
| [`2.7.0`](https://raw.githubusercontent.com/vromero/activemq-artemis-docker/master/src/Dockerfile) | [`2.7.0-alpine`](https://raw.githubusercontent.com/vromero/activemq-artemis-docker/master/src/Dockerfile.alpine) |
| [`2.6.4`](https://raw.githubusercontent.com/vromero/activemq-artemis-docker/master/src/Dockerfile) | [`2.6.4-alpine`](https://raw.githubusercontent.com/vromero/activemq-artemis-docker/master/src/Dockerfile.alpine) |
| [`2.6.3`](https://raw.githubusercontent.com/vromero/activemq-artemis-docker/master/src/Dockerfile) | [`2.6.3-alpine`](https://raw.githubusercontent.com/vromero/activemq-artemis-docker/master/src/Dockerfile.alpine) |
| [`2.6.2`](https://raw.githubusercontent.com/vromero/activemq-artemis-docker/master/src/Dockerfile) | [`2.6.2-alpine`](https://raw.githubusercontent.com/vromero/activemq-artemis-docker/master/src/Dockerfile.alpine) |
Expand Down Expand Up @@ -49,8 +50,8 @@ the build is [reproducible](https://reproducible-builds.org/) in a best effort b

## 4. How to use this image

You can find how to run this image in the section *Running the image*. Beware as the default
configuration is not recommended for production usage, at the very least you'll want to set your own
You can find how to run this image in the section *Running the image*. Beware as the default
configuration is not recommended for production usage, at the very least you'll want to set your own
login and password. This is described with detail in section *Setting the username and password*.
In case you also want to set some customized memory limits, this is described in
*Setting the memory values*.
Expand All @@ -64,7 +65,7 @@ in general. For that reason its not supported for most of the use cases. However
image in orchestrators like Kubernetes you might want to connect from a sidecar where it
does make sense. How to enable JMX is described in section *Enabling JMX*.

The Jolokia console CORS header won't be a problem by default as it set to `*`, however if you want to
The Jolokia console CORS header won't be a problem by default as it set to `*`, however if you want to
narrow it down for improved security don't miss the section *Settings the console's allow origin*.

In rare ocassions you might find the need of running ActiveMQ Artemis without security. This
Expand Down Expand Up @@ -122,7 +123,7 @@ docker run -it --rm \

### 5.2 Setting the memory values

By default this image does leverage the new features that came in Java 8u131 related to memory ergonomics in containerized environments, more information about it [here](https://developers.redhat.com/blog/2017/03/14/java-inside-docker/).
By default this image does leverage the new features that came in Java 8u131 related to memory ergonomics in containerized environments, more information about it [here](https://developers.redhat.com/blog/2017/03/14/java-inside-docker/).

It does use a `-XX:MaxRAMFraction=2` meaning that half of the memory made avaiable to the container will be used by the Java heap, leaving the other half for other types of Java memory and other OS purposes. However, in some
circumstances it might be advisable to fine tune the memory to manual values, in that case you can set the memory that you application needs by using the parameters `ARTEMIS_MIN_MEMORY` and `ARTEMIS_MAX_MEMORY`:
Expand All @@ -148,7 +149,7 @@ Different kinds of volumes need different values in fine tuning. In ActiveMQ Art
|`NEVER` | Never do the performance journal configuration |
|`ALWAYS` | Always do the performance journal configuration |

It is safe to leave it as `AUTO` even for the casual usage of this image given that the image already have
It is safe to leave it as `AUTO` even for the casual usage of this image given that the image already have
incorporated a `.perf-journal-completed` for its internal directory used when no volume is mounted.
One example of execution with the performance journal calibration set to be executed always can be found
in the next listing:
Expand Down Expand Up @@ -186,7 +187,7 @@ with prometheus to ease monitoring.
This image can export such metrics in port `9404` thanks to the integration with the Prometheus [JMX exporter](https://github.com/prometheus/jmx_exporter). In order to enable it the environmnet variable `ENABLE_JMX_EXPORTER` should
be present, it will also inderectly enable JMX as if `ENABLE_JMX` was set.

To see what is exported just:
To see what is exported just:

```console
docker run -it --rm \
Expand Down Expand Up @@ -255,7 +256,7 @@ docker run -it --rm \
### 5.7 Overriding parts of the configuration

ActiveMQ Artemis support disabling the security using the element `<security-enabled>false</security-enabled>`
as described in the official [documentation](https://activemq.apache.org/artemis/docs/latest/security.html).
as described in the official [documentation](https://activemq.apache.org/artemis/docs/latest/security.html).
This docker image makes it simple to set that element using the environment property: `DISABLE_SECURITY`:

```console
Expand All @@ -273,7 +274,7 @@ It is possible to mount a whole artemis `etc` directory in this image in the vol
Be careful as this might be an overkill for many situations where only small tweaks are necessary.

When using this technique be aware that the configuration files of Artemis might change from version to version.
Generally speaking, when in need to configure Artemis beyond what it is offered by this image using environment
Generally speaking, when in need to configure Artemis beyond what it is offered by this image using environment
variables, it is recommended to use the partial override mechanism described in the next section.

### 5.9 Overriding parts of the configuration
Expand Down Expand Up @@ -352,7 +353,7 @@ A file name `broker-00.xslt` with content like the following listing, could be u
Multiple shell scripts can be dropped in the `/var/lib/artemis/etc-override` volume. Those shell files must be named following the name convention `entrypoint-{{num}}.sh` where `num` is a numeric representation of the snippet.
The shell scripts will be *executed* in alphabetical precedence of the file names on startup of the docker container.

A typical use case for using entrypoint overrides would be if you want to make a minor modification to a file which cannot be overriden using the 2 methods above and you do not want to expose the etc volume.
A typical use case for using entrypoint overrides would be if you want to make a minor modification to a file which cannot be overriden using the 2 methods above and you do not want to expose the etc volume.


If you would like to see the final result of your transformations, execute the following:
Expand Down
8 changes: 7 additions & 1 deletion src/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,13 @@ RUN addgroup -g 1000 -S artemis && adduser -u 1000 -S -G artemis artemis

# Sadly this line is likely to fail every so often, see: https://medium.com/@stschindler/the-problem-with-docker-and-alpines-package-pinning-18346593e891
# Still versions are pinned to maintain some small level of https://reproducible-builds.org/
RUN apk add --no-cache libaio=0.3.111-r0 xmlstarlet=1.6.1-r0 jq=1.6_rc1-r1 dumb-init=1.2.1-r0 sed=4.4-r2 gettext=0.19.8.1-r2
RUN apk add --no-cache \
libaio=0.3.111-r0 \
xmlstarlet=1.6.1-r0 \
jq=1.6-r0 \
dumb-init=1.2.2-r1 \
sed=4.5-r0 \
gettext=0.19.8.1-r4

COPY --from=builder "/opt/apache-artemis-${ACTIVEMQ_ARTEMIS_VERSION}" "/opt/apache-artemis-${ACTIVEMQ_ARTEMIS_VERSION}"
COPY --from=builder "/var/lib/artemis" "/var/lib/artemis"
Expand Down

0 comments on commit 6d9d15f

Please sign in to comment.