tarantool / docker

Docker images for tarantool database
https://hub.docker.com/r/tarantool/tarantool
52 stars 25 forks source link

Update the version for mqtt module #220

Closed vr009 closed 2 years ago

vr009 commented 2 years ago

Update the version for mqtt module

This patch updates the version for mqtt module to the latest tag and removes the steps with installing the mosquitto library for alpine:3.9. With the new release of mqtt module, libmosquitto builds statically when the module is installed from luarocks. That fix eliminates the dependencies that are not necessary anymore.

Closes tarantool/mqtt#41

Totktonada commented 2 years ago
  1. Please, link the issue in which the problem was reported.
  2. Mention the reason why it should be updated in the commit message.
  3. Please, share results of local testing: it seems, just require('mqtt') within the container should be enough to verify that the problem is gone.
  4. How about CentOS images?
ylobankov commented 2 years ago

where it's possible in the commit message sounds strange. You update only one module.

Totktonada commented 2 years ago
  1. Ouch, I see, the module was never in the CentOS 7 image. Let's skip it so and update only in Apline 3.9.
Totktonada commented 2 years ago
  1. It seems, we don't need to install libmsquitto into the system anymore.
vr009 commented 2 years ago

For testing I've reused ready Alpine images with tarantool of different versions and pre-installed packages mosquitto-libs and mosquitto-dev and cleared them up from both of these packages. After installing the module with tarantoolctl rocks install mqtt the build was always succesful.

vr009 commented 2 years ago

Should we close the mentioned issue via this PR? If so, please use close/fix/resolve keywords to close the issue. See for details here.

Added.

Totktonada commented 2 years ago

That solves the problem described in https://github.com/tarantool/mqtt/issues/41.

Hm. In fact, this PR does not fix any user visible problem. So I would describe it as elimination of dependencies that are not necessary anymore.

vr009 commented 2 years ago

Hm. In fact, this PR does not fix any user visible problem. So I would describe it as elimination of dependencies that are not necessary anymore.

Fixed.

Totktonada commented 2 years ago

I would prefer to test a built image. My results:

$ docker build --no-cache --build-arg ROCKS_INSTALLER='tarantoolctl rocks' --build-arg ENABLE_BUNDLED_LIBYAML=ON --build-arg TNT_VER=2.8.3 --build-arg NPROC=8 --build-arg BASE_IMAGE='alpine:3.9' -t vr009-mqtt-version-update:latest -f dockerfiles/alpine_3.9 .
$ docker run -it vr009-mqtt-version-update:latest
tarantool> require('mqtt')
---
- QOS_2: 2
  new: 'function: 0x40516a30'
  QOS_0: 0
  RETAIN: true
  QOS_1: 1
  NON_RETAIN: false
...

Looks ok.