diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..aef21ab --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,607 @@ +stages: + - build + +variables: + REGISTRY: registry.gitlab.com + IMAGE: ${REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME} + CHECK_GIT: git diff origin/master --name-only + +before_script: + # Enable GitLab registry + - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${REGISTRY} + +.build_template: &build_definition + stage: build + tags: + - deploy_test + interruptible: true + script: + - > + if [ ${CI_COMMIT_REF_NAME} = master ] || \ + ${CHECK_GIT} | grep "^versions/${OS}_${DIST}_${VER}$" || \ + ${CHECK_GIT} | grep "^dockerfiles/${OS}_${DIST}_${DOCKERFILE_NAME_SUFFIX}$" || \ + ${CHECK_GIT} | grep "^files/" || \ + ${CHECK_GIT} | grep "^.gitlab-ci.yml$" || \ + ${CHECK_GIT} | grep "^.gitlab.mk$" + then + make -f .gitlab.mk build + fi; + +# ############## +# ALPINE 3.5/3.9 +# ############## + +# Tarantool branch 1.10 + +'alpine 3.5 1.10.0': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.5' + TAG: '1.10.0' + VER: '1.10.0' + PORT: 5101 + ENABLE_BUNDLED_LIBYAML: 'OFF' + +'alpine 3.5 1.10.1': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.5' + TAG: '1.10.1' + VER: '1.10.1' + PORT: 5101 + ENABLE_BUNDLED_LIBYAML: 'OFF' + +'alpine 3.5 1.10.2': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.5' + TAG: '1.10.2' + VER: '1.10.2' + PORT: 5102 + ENABLE_BUNDLED_LIBYAML: 'OFF' + +'alpine 3.5 1.10.3': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.5' + TAG: '1.10.3' + VER: '1.10.3' + PORT: 5103 + ENABLE_BUNDLED_LIBYAML: 'OFF' + +'alpine 3.9 1.10.4': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '1.10.4' + VER: '1.10.4' + PORT: 5104 + ROCKS_INSTALLER: 'luarocks' + ENABLE_BUNDLED_LIBYAML: 'OFF' + +'alpine 3.9 1.10.5': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '1.10.5' + VER: '1.10.5' + PORT: 5105 + ROCKS_INSTALLER: 'luarocks' + ENABLE_BUNDLED_LIBYAML: 'OFF' + +'alpine 3.9 1.10.6': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '1.10.6' + VER: '1.10.6' + PORT: 5106 + ROCKS_INSTALLER: 'luarocks' + ENABLE_BUNDLED_LIBYAML: 'OFF' + +'alpine 3.9 1.10.7': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '1.10.7' + VER: '1.10.7' + PORT: 5107 + ROCKS_INSTALLER: 'luarocks' + +'alpine 3.9 1.10.8': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '1.10.8' + VER: '1.10.8' + PORT: 5108 + ROCKS_INSTALLER: 'luarocks' + +'alpine 3.9 1.10.9': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '1.10.9' + VER: '1.10.9' + PORT: 5109 + ROCKS_INSTALLER: 'luarocks' + +'alpine 3.9 1.10.10': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '1.10.10' + VER: '1.10.10' + PORT: 5110 + ROCKS_INSTALLER: 'luarocks' + +'alpine 3.9 1.x': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '1' + VER: '1.x' + PORT: 5100 + ROCKS_INSTALLER: 'luarocks' + +# Tarantool branch 2.1 + +'alpine 3.5 2.1.0': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.5' + TAG: '2.1.0' + VER: '2.1.0' + PORT: 5211 + ENABLE_BUNDLED_LIBYAML: 'OFF' + +'alpine 3.5 2.1.1': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.5' + TAG: '2.1.1' + VER: '2.1.1' + PORT: 5211 + ENABLE_BUNDLED_LIBYAML: 'OFF' + +'alpine 3.5 2.1.2': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.5' + TAG: '2.1.2' + VER: '2.1.2' + PORT: 5212 + ENABLE_BUNDLED_LIBYAML: 'OFF' + +'alpine 3.9 2.1.3': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.1.3' + VER: '2.1.3' + PORT: 5213 + ROCKS_INSTALLER: 'luarocks' + ENABLE_BUNDLED_LIBYAML: 'OFF' + +'alpine 3.9 2.1': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.1' + VER: '2.1' + PORT: 5210 + ROCKS_INSTALLER: 'luarocks' + ENABLE_BUNDLED_LIBYAML: 'OFF' + +# Tarantool branch 2.2 + +'alpine 3.5 2.2.0': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.5' + TAG: '2.2.0' + VER: '2.2.0' + PORT: 5220 + ENABLE_BUNDLED_LIBYAML: 'OFF' + +'alpine 3.5 2.2.1': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.5' + TAG: '2.2.1' + VER: '2.2.1' + PORT: 5221 + +'alpine 3.9 2.2.2': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.2.2' + VER: '2.2.2' + PORT: 5222 + +'alpine 3.9 2.2.3': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.2.3' + VER: '2.2.3' + PORT: 5223 + +'alpine 3.9 2.2': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.2' + VER: '2.2' + PORT: 5220 + +# Tarantool branch 2.3 + +'alpine 3.5 2.3.0': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.5' + TAG: '2.3.0' + VER: '2.3.0' + PORT: 5231 + +'alpine 3.9 2.3.1': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.3.1' + VER: '2.3.1' + PORT: 5231 + +'alpine 3.9 2.3.2': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.3.2' + VER: '2.3.2' + PORT: 5231 + +'alpine 3.9 2.3.3': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.3.3' + VER: '2.3.3' + PORT: 5233 + +'alpine 3.9 2.3': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.3' + VER: '2.3' + PORT: 5230 + +# Tarantool branch 2.4 + +'alpine 3.9 2.4.0': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.4.0' + VER: '2.4.0' + PORT: 5241 + +'alpine 3.9 2.4.1': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.4.1' + VER: '2.4.1' + PORT: 5241 + +'alpine 3.9 2.4.2': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.4.2' + VER: '2.4.2' + PORT: 5242 + +'alpine 3.9 2.4.3': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.4.3' + VER: '2.4.3' + PORT: 5243 + +'alpine 3.9 2.4': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.4' + VER: '2.4' + PORT: 5240 + +# Tarantool branch 2.5 + +'alpine 3.9 2.5.0': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.5.0' + VER: '2.5.0' + PORT: 5251 + +'alpine 3.9 2.5.1': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.5.1' + VER: '2.5.1' + PORT: 5252 + +'alpine 3.9 2.5.2': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.5.2' + VER: '2.5.2' + PORT: 5253 + +'alpine 3.9 2.5.3': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.5.3' + VER: '2.5.3' + PORT: 5254 + +'alpine 3.9 2.5': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.5' + VER: '2.5' + PORT: 5250 + +# Tarantool branch 2.6 + +'alpine 3.9 2.6.0': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.6.0' + VER: '2.6.0' + PORT: 5260 + +'alpine 3.9 2.6.1': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.6.1' + VER: '2.6.1' + PORT: 5261 + +'alpine 3.9 2.6.2': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.6.2' + VER: '2.6.2' + PORT: 5262 + +'alpine 3.9 2.6.3': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.6.3' + VER: '2.6.3' + PORT: 5263 + +'alpine 3.9 2.6': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.6' + VER: '2.6' + PORT: 5269 + +# Tarantool branch 2.7 + +'alpine 3.9 2.7.0': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.7.0' + VER: '2.7.0' + PORT: 5270 + +'alpine 3.9 2.7.1': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.7.1' + VER: '2.7.1' + PORT: 5271 + +'alpine 3.9 2.7.2': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.7.2' + VER: '2.7.2' + PORT: 5272 + +'alpine 3.9 2.7': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.7' + VER: '2.7' + PORT: 5279 + +# Tarantool branch 2.8 + +'alpine 3.9 2.8.0': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.8.0' + VER: '2.8.0' + PORT: 5270 + +'alpine 3.9 2.8.1': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.8.1' + VER: '2.8.1' + PORT: 5281 + +'alpine 3.9 2.8': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.8' + VER: '2.8' + PORT: 5289 + +# Tarantool branch master + +'alpine 3.9 2.9.0': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.9.0' + VER: '2.9.0' + PORT: 5290 + +'alpine 3.9 2.x': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2' + VER: '2.x' + PORT: 5200 + TAG_LATEST: 'latest' + +# ######## +# CentOS 7 +# ######## + +# Tarantool branch 1.10 + +'centos 7 1.x': + <<: *build_definition + variables: + OS: 'centos' + DIST: '7' + TAG: '1.x-centos7' + VER: '1.x' + PORT: 7100 + +# Tarantool branch master + +'centos 7 2.x': + <<: *build_definition + variables: + OS: 'centos' + DIST: '7' + TAG: '2.x-centos7' + VER: '2.x' + PORT: 7200 diff --git a/.gitlab.mk b/.gitlab.mk new file mode 100644 index 0000000..8267373 --- /dev/null +++ b/.gitlab.mk @@ -0,0 +1,29 @@ +TNT_VER=$(shell cat versions/${OS}_${DIST}_${VER}) +ROCKS_INSTALLER?='tarantoolctl rocks' +ENABLE_BUNDLED_LIBYAML?='ON' +IMAGE?=tarantool/tarantool +LUAJIT_DISABLE_SYSPROF?=OFF +GC64?=OFF +NPROC?=4 + +build: + [ "${TNT_VER}" != "" ] || (echo "ERROR: TNT_VER not defined" ; exit 1) + docker build --no-cache --network=host \ + --build-arg ROCKS_INSTALLER=${ROCKS_INSTALLER} \ + --build-arg ENABLE_BUNDLED_LIBYAML=${ENABLE_BUNDLED_LIBYAML} \ + --build-arg TNT_VER=${TNT_VER} \ + --build-arg LUAJIT_DISABLE_SYSPROF=${LUAJIT_DISABLE_SYSPROF} \ + --build-arg GC64=${GC64} \ + --build-arg NPROC=${NPROC} \ + --progress=plain \ + -t ${IMAGE}:${TAG} -f dockerfiles/${OS}_${DIST} . + docker run --rm --name tarantool_${TAG} -p ${PORT}:${PORT} -d ${IMAGE}:${TAG} + docker exec -t tarantool_${TAG} tarantool_is_up + docker stop tarantool_${TAG} + if [ -n "${GITLAB_CI}" ] ; then \ + docker push ${IMAGE}:${TAG} ; \ + if [ -n "${TAG_LATEST}" ] ; then \ + docker tag ${IMAGE}:${TAG} ${IMAGE}:${TAG_LATEST} ; \ + docker push ${IMAGE}:${TAG_LATEST} ; \ + fi ; \ + fi diff --git a/README.md b/README.md index faa6cc6..954e7e8 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,518 @@ -# tarantool-docker -Docker images with tarantool for Centos, Fedora, Debian and Ubuntu: -* Configured yum/apt with tarantool repo -* Configured C.UTF-8 locale(required for tarantool) -* Tarantool database with dev package and default modules -* Expirationd module -* Queue module -* Http modlue -* Sharding module +# Tarantool Docker images + + + + +- [What is Tarantool](#what-is-tarantool) +- [Quick start](#quickstart) +- [What's on board](#whats-on-board) + - [Included modules](#included-modules) + - [Data directories](#data-directories) + - [Convenience tools](#convenience-tools) +- [Versions, tags, and release policy](#versions-tags-and-release-policy) +- [How to use these images](#how-to-use-these-images) + - [Start a Tarantool instance](#start-a-tarantool-instance) + - [Start a secure Tarantool instance](#start-a-secure-tarantool-instance) + - [Connect to a running Tarantool instance](#connect-to-a-running-tarantool-instance) + - [Start a master-master replica set](#start-a-master-master-replica-set) + - [Add application code with a volume mount](#add-application-code-with-a-volume-mount) + - [Build your own images](#build-your-own-images) +- [Environment variables](#environment-variables) + - [`TARANTOOL_USER_NAME`](#tarantool_user_name) + - [`TARANTOOL_USER_PASSWORD`](#tarantool_user_password) + - [`TARANTOOL_PORT`](#tarantool_port) + - [`TARANTOOL_PROMETHEUS_DEFAULT_METRICS_PORT`](#tarantool_prometheus_default_metrics_port) + - [`TARANTOOL_REPLICATION`](#tarantool_replication) + - [`TARANTOOL_MEMTX_MEMORY`](#tarantool_memtx_memory) + - [`TARANTOOL_SLAB_ALLOC_FACTOR`](#tarantool_slab_alloc_factor) + - [`TARANTOOL_MEMTX_MAX_TUPLE_SIZE`](#tarantool_memtx_max_tuple_size) + - [`TARANTOOL_MEMTX_MIN_TUPLE_SIZE`](#tarantool_memtx_min_tuple_size) + - [`TARANTOOL_CHECKPOINT_INTERVAL`](#tarantool_checkpoint_interval) + - [`TARANTOOL_FORCE_RECOVERY`](#tarantool_force_recovery) + - [`TARANTOOL_LOG_FORMAT`](#tarantool_log_format) + - [`TARANTOOL_LOG_LEVEL`](#tarantool_log_level) +- [Reporting problems and getting help](#reporting-problems-and-getting-help) +- [Contributing](#contributing) + - [How to contribute](#how-to-contribute) + - [How to check](#how-to-check) + - [Build pipelines](#build-pipelines) + - [Release policy](#release-policy) + - [Exceptional cases](#exceptional-cases) + - [How to build and push an image](#how-to-build-and-push-an-image) + + + +## What is Tarantool + +Tarantool is an in-memory computing platform that combines +a Lua application server and a database management system. +Read more about Tarantool at [tarantool.io](https://www.tarantool.io/en/developers/). + +## Quick start + +To try out Tarantool, run this command: + +```console +$ docker run --rm -t -i tarantool/tarantool +``` + +It will create a one-off Tarantool instance and open an interactive +console. +From there, you can either type `tutorial()` in the console or follow the +[documentation](https://www.tarantool.io/en/doc/latest/getting_started/getting_started_db/#using-a-docker-image). + +## What's on board + +The `tarantool/tarantool` images contain the Tarantool executable +and a combination of [Lua modules](#included-modules) and utilities often used in production. +Designed as a building block for modern services, these modules and utilities are based on a few +design choices that set them apart from the systemd-controlled Tarantool. +We check all these extensions for compatibility with the Tarantool version included in the image. + +The Docker images come in three flavors, based on three different images: `alpine:3.15`, `centos:7` +and `ubuntu:20.04`. Check them out: + +```console +$ docker run --rm -t -i tarantool/tarantool:2.10.0 +$ docker run --rm -t -i tarantool/tarantool:2.10.0-centos7 +$ docker run --rm -t -i tarantool/tarantool:2.10.0-ubuntu +``` + +The entrypoint script in each of these images uses +[environment variables](#environment-variables) +to set various configuration options, +such as replication sources, memory limits, and so on. +If specified, the environment variables override the settings provided in your code. +This way, you can set options using `docker compose` or +other orchestration and deployment tools. + +There are also a few [convenience tools](#convenience-tools) that make use of the fact that there +is only one Tarantool instance running in the container. + +### Included modules + +The following Lua modules are included in the build: + +- [avro-schema](https://github.com/tarantool/avro-schema): Apache Avro scheme for your data. +- [connpool](https://github.com/tarantool/connpool): Keep a pool of connections to other Tarantool instances. +- [curl](https://github.com/tarantool/curl): HTTP client based on libcurl. +- [expirationd](https://github.com/tarantool/expirationd): Automatically delete tuples based on expiration time. +- [gis](https://github.com/tarantool/gis): Store and query geospatial data. +- [gperftools](https://github.com/tarantool/gperftools): Collect a CPU profile to find bottlenecks in your code. +- [http](https://github.com/tarantool/http): Embedded HTTP server with Flask-style routing support. +- [memcached](https://github.com/tarantool/memcached): Access Tarantool as if it was a memcached instance. +- [metrics](https://github.com/tarantool/metrics): Metric collection library for Tarantool. +- [mqtt](https://github.com/tarantool/mqtt): Client for MQTT message brokers. +- [mysql](https://github.com/tarantool/mysql): Query MySQL right from Tarantool. +- [pg](https://github.com/tarantool/pg): Query PostgreSQL right from Tarantool. +- [prometheus](https://github.com/tarantool/prometheus): Instrument code and export metrics to Prometheus monitoring. +- [queue](https://github.com/tarantool/queue): Priority queues with TTL and confirmations. +- [vshard](https://github.com/tarantool/vshard): Automatically distribute data across multiple instances. + + +If the module you need is not listed here, there is a good chance we can add it. +Open an issue [on our GitHub](https://github.com/tarantool/docker). + +### Data directories + +Mount these directories as volumes: + +- `/var/lib/tarantool` contains operational data + (snapshots, xlogs and vinyl runs). + +- `/opt/tarantool` is the directory for Lua application code. + +### Convenience tools + +- `console`: Execute without arguments to open an administrative + console to a running Tarantool instance. + +- `tarantool_is_up`: Returns `0` if Tarantool has been initialized and + is operating normally. + +- `tarantool_set_config.lua`: Allows you to dynamically change certain + settings without the need to recreate containers. + +## Versions, tags, and release policy + +The images are built and published on Docker Hub +for each Tarantool release as well as for some beta +and release candidate versions. + +There are three variants built from different base images: + +* Alpine 3.15, the "default" build with tags having no mention of base image, like `latest`, `1`, `2`, `1.10`,`1.10.z`, `2.y`, `2.y.z` and others. +* CentOS 7 with tags like `1-centos7`, `2-centos7`, and so on. +* Ubuntu 20.04 with tags like `1-ubuntu22.04`, `2-ubuntu22.04`, and so on. + +## How to use these images + +### Start a Tarantool instance + +```console +$ docker run \ + --name mytarantool \ + -p 3301:3301 -d \ + tarantool/tarantool +``` + +This will start an instance of Tarantool and expose it on +port 3301. Note that by default there is no password protection, +so don't expose this instance to the outside world. + +In this case, as there is no Lua code provided, the entrypoint +script initializes the database using a reasonable set of defaults. Some of them +can be tweaked with environment variables (see below). + +### Start a secure Tarantool instance + +```console +$ docker run \ + --name mytarantool \ + -p 3301:3301 \ + -e TARANTOOL_USER_NAME=myusername \ + -e TARANTOOL_USER_PASSWORD=mysecretpassword -d \ + tarantool/tarantool +``` + +This starts an instance of Tarantool, disables guest login, and +creates a user named `myusername` with admin privileges and the password +`mysecretpassword`. + +As in the previous example, the database is initialized automatically. + +### Connect to a running Tarantool instance + +```console +$ docker exec -t -i mytarantool console +``` + +This will open an interactive admin console on the running instance +named `mytarantool`. You can safely detach from it anytime, the server +will continue running. + +This `console` doesn't require authentication, because it uses a local +Unix socket in the container to connect to Tarantool. However, it requires +you to have direct access to the container. + +If you need to access a remote console via TCP/IP, use the `tarantoolctl` utility +as explained [here](https://www.tarantool.io/en/doc/latest/reference/tarantoolctl/). + +### Start a master-master replica set + +You can start a replica set with Docker alone, but it's more +convenient to use [docker-compose](https://docs.docker.com/compose/). +Here's a simplified `docker-compose.yml` for starting a master-master +replica set: + +``` yaml +version: '2' + +services: + tarantool1: + image: tarantool/tarantool:latest + environment: + TARANTOOL_REPLICATION: "tarantool1,tarantool2" + networks: + - mynet + ports: + - "3301:3301" + + tarantool2: + image: tarantool/tarantool:latest + environment: + TARANTOOL_REPLICATION: "tarantool1,tarantool2" + networks: + - mynet + ports: + - "3302:3301" + +networks: + mynet: + driver: bridge +``` + +Start it like this: + +``` console +$ docker compose up +``` + +### Add application code with a volume mount + +The simplest way to provide application code is to mount your code +directory to `/opt/tarantool`: + +```console +$ docker run \ + --name mytarantool \ + -p 3301:3301 -d \ + -v /path/to/my/app:/opt/tarantool \ + tarantool/tarantool \ + tarantool /opt/tarantool/app.lua +``` + +Here, `/path/to/my/app` is the host directory containing Lua code +and `app.lua` is the entry point of your application. +Note that for your code to run, you must execute the main script explicitly, +which is done in the last line. + +### Build your own images + +To pack and distribute an image with your code, +create your own `Dockerfile`: + +```dockerfile +FROM tarantool/tarantool:2.10.0 +COPY app.lua /opt/tarantool +CMD ["tarantool", "/opt/tarantool/app.lua"] +``` + +Then build it with: + +```console +$ docker build -t company/appname:tag . +``` + +Please pay attention to the format of `CMD`. Unless it is specified in +square brackets, the `wrapper` entrypoint that our Docker image +provides will not be called. In this case, you will not be able to configure +your instance using environment variables. + +We recommend building from an image with a precise tag, +that is, `2.10.0` or `2.10.0-centos7`, not +`2.10` or `latest`. +This way you will have more control over the updates of +Tarantool and other dependencies of your application. + +## Environment variables + +When you run this image, you can adjust some of Tarantool settings. +Most of them either control memory/disk limits or specify external +connectivity parameters. + +If you need to fine-tune specific settings not described here, you can +always inherit this container and call `box.cfg{}` yourself. +See the +[documentation on `box.cfg`](https://www.tarantool.io/en/doc/latest/reference/configuration/#box-cfg-params) for +details. + +### `TARANTOOL_USER_NAME` + +Setting this variable allows you to pick the name of the user that is +utilized for remote connections. By default, it is `guest`. Please +note that since the `guest` user in Tarantool can't have a password, it is +highly recommended that you change it. + +### `TARANTOOL_USER_PASSWORD` + +For security reasons, it is recommended that you never leave this +variable unset. This environment variable sets the user's password for +Tarantool. In the above example, it is set to `mysecretpassword`. + +### `TARANTOOL_PORT` + +Optional. Specifying this variable will tell Tarantool to listen for +incoming connections on a specific port. Default is `3301`. + +### `TARANTOOL_PROMETHEUS_DEFAULT_METRICS_PORT` + +Optional. If specified, Tarantool will start an HTTP server on the provided port +and expose the Prometheus `metrics` endpoint with common metrics +(fibers, memory, network, replication, etc.). + +### `TARANTOOL_REPLICATION` + +Optional. Comma-separated list of URIs to treat as replication +sources. Upon start, Tarantool will attempt to connect to +those instances, fetch the data snapshot, and start replicating +transaction logs. In other words, it will become a slave. For a +multi-master configuration, other participating instances of +Tarantool should be started with the same `TARANTOOL_REPLICATION`. +(NB: Applicable only to versions later than 1.7.) + +Example: + +`user1:pass@host1:3301,user2:pass@host2:3301` + +### `TARANTOOL_MEMTX_MEMORY` + +Optional. Specifies how much memory Tarantool allocates to +actually store tuples, in bytes. When the limit is reached, `INSERT` +or `UPDATE` requests begin failing. Default is `268435456` (256 +megabytes). + +### `TARANTOOL_SLAB_ALLOC_FACTOR` + +Optional. Used as the multiplier for computing the sizes of memory +chunks that tuples are stored in. A lower value may result in less +wasted memory, depending on the total amount of memory available +and the distribution of item sizes. Default is `1.05`. + +### `TARANTOOL_MEMTX_MAX_TUPLE_SIZE` + +Optional. Size of the largest allocation unit in bytes. It can be +increased if it is necessary to store large tuples. Default is +`1048576`. + +### `TARANTOOL_MEMTX_MIN_TUPLE_SIZE` + +Optional. Size of the smallest allocation unit, in bytes. It can be +decreased if most of the tuples are very small. Default is `16`. + +### `TARANTOOL_CHECKPOINT_INTERVAL` + +Optional. Specifies how often snapshots are made, in seconds. +Default is `3600` (every 1 hour). + +### `TARANTOOL_FORCE_RECOVERY` + +Optional. When set to `true`, Tarantool tries to continue if there is an error while +reading a snapshot file or a write-ahead log file. +Skips invalid records, reads as much data as possible, +print a warning in console and start the database. + +### `TARANTOOL_LOG_FORMAT` + +Optional. There are two possible log formats: + +* 'plain' — the default one. +* 'json' — with more details and with JSON labels. + +More details can be found in the +[log module reference](https://www.tarantool.io/en/doc/latest/reference/configuration/#confval-log_format). + +### `TARANTOOL_LOG_LEVEL` + +Optional. Default value is 5 (that means INFO). +More details can be found in +[log level configuration](https://www.tarantool.io/en/doc/latest/reference/configuration/#cfg-logging-log-level). + +## Contributing + +### Reporting problems and getting help + +You can report problems and request +features [on our GitHub](https://github.com/tarantool/docker). + +Alternatively, you may get help on our [Telegram channel](https://t.me/tarantool). + +### How to contribute + +Open a pull request to the `master` branch. +A maintainer is responsible for merging the PR. + +### How to check + +Say, we have updated 'dockerfiles/alpine_3.9' and want to check it: + +```sh +$ TAG=2 OS=alpine DIST=3.9 VER=2.x PORT=5200 make -f .gitlab.mk build +$ docker run -it tarantool/tarantool:2 +...perform a test... +``` + +### Build pipelines + +Fixed release versions: + +| Docker tag | FROM | Dockerfile | +|--------------------|--------------|-------------------------| +| 2.10.0 | alpine:3.15 | dockerfile/alpine_3.15 | +| 2.10.0-centos7 | centos:7 | dockerfile/centos_7 | +| 2.10.0-ubuntu20.04 | ubuntu:20.04 | dockerfile/ubuntu_20.04 | +| 2.10.0-rc1 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.10.0-beta2 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.10.0-beta1 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.8.0 .. 2.8.4 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.7.0 .. 2.7.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.6.0 .. 2.6.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.5.0 .. 2.5.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.4.0 .. 2.4.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.3.1 .. 2.3.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.3.0 | alpine:3.5 | dockerfile/alpine_3.5 | +| 2.2.2 .. 2.2.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.2.0 .. 2.2.1 | alpine:3.5 | dockerfile/alpine_3.5 | +| 2.1.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.1.0 .. 2.1.2 | alpine:3.9 | dockerfile/alpine_3.5 | +| 1.10.13 | alpine:3.9 | dockerfile/alpine_3.9 | +| 1.10.4 .. 1.10.12 | alpine:3.9 | dockerfile/alpine_3.9 | +| 1.10.0 .. 1.10.3 | alpine:3.5 | dockerfile/alpine_3.5 | + +Rolling versions: + +| Docker tag | Dockerfile | +|-----------|------------------------| +| 2, latest | dockerfile/alpine_3.15 | +| 2-centos7 | dockerfile/centos_7 | +| 1 | dockerfile/alpine_3.15 | +| 1 | dockerfile/alpine_3.15 | +| 2.1 .. 2.8 | dockerfile/alpine_3.9 | +| 2.1 .. 2.8 | dockerfile/alpine_3.9 | + +Special builds: + +| Docker tag | Dockerfile | +| ----------------- | ----------------------- | +| 2.10.0-centos7 | dockerfile/centos_7 | +| 2.10.0-ubuntu | dockerfile/ubuntu_20.04 | +| 1.x-centos7 | dockerfile/centos_7 | +| 2.x-centos7 | dockerfile/centos_7 | + +### Release policy + +All images are pushed to [Docker Hub](docker_hub_tags). + +Fixed version tags (`x.y.z`) are frozen: we never update them. + +Example of versions timeline for Tarantool since 2.10 +(see the [release policy](https://www.tarantool.io/en/doc/latest/release/policy/)): + +- `2.10.0-beta1` — Beta + - `2.10.0-rc1` — Release candidate + - `2.10.0` — Release (stable) + +Example of minor versions timeline for Tarantool up to 2.8: + +- `x.y.0` - Alpha + - `x.y.1` - Beta + - `x.y.2` - Stable + - `x.y.3` - Stable + +Rolling versions are updated to the latest release (stable) versions: + +- `x.y` == `x.y.latest-z` (`==` means 'points to the same image') +- `1` == `1.10.latest-z` +- `2` == `2.latest-y.z` +- `latest` == `2` + +Special stable builds (CentOS) are updated with the same policy as rolling versions: + +- `1.x-centos7` image offers a last `1..2` release +- `2.x-centos7` image offers a last `2..2` release + +[docker_hub_tags]: https://hub.docker.com/r/tarantool/tarantool/tags + +### Exceptional cases + +As an exception we can deliver an important update for the existing tarantool +release within `x.y.z-r1`, `x.y.z-r2`, ... tags. + +When `x.y.z-r` is released, the corresponding rolling releases (`x.y`, `x` +and `latest` if `x` == 2) should be updated to point to the same image. + +There is no strict policy, which updates should be considered important. Let's +decide on demand and define the policy later. + +TBD: How to notify users about the exceptional updates? + +### How to build and push an image + +Example: + +```console +$ export TAG=2 +$ export OS=alpine DIST=3.9 VER=2.x # double check the values! +$ PORT=5200 make -f .gitlab.mk build +$ docker push tarantool/tarantool:${TAG} +``` diff --git a/centos/Dockerfile b/centos/Dockerfile deleted file mode 100644 index 74c8cb4..0000000 --- a/centos/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM centos - -#Add tarantool repo -RUN touch /etc/yum.repos.d/tarantool.repo -RUN echo '[tarantool]' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'name=Centos-$releasever - Tarantool' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'baseurl=http://tarantool.org/dist/master/centos/$releasever/os/$basearch/' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'enabled=1' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'gpgcheck=0' >> /etc/yum.repos.d/tarantool.repo - -# Reconfigure locales for C.UTF-8 -RUN yum clean all -RUN yum reinstall -y glibc glibc-common -RUN localedef -f UTF-8 -i ru_RU C.UTF-8 - -EXPOSE 3301 -# Install tarantool pack -RUN yum install -y tarantool tarantool-dev tarantool-modules tarantool-expirationd tarantool-queue tarantool-http tarantool-pool tarantool-shard diff --git a/debian/Dockerfile b/debian/Dockerfile deleted file mode 100644 index fb59fc9..0000000 --- a/debian/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -FROM debian:jessie - -# Add tarantool repo -RUN touch /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb http://tarantool.org/dist/master/debian/ jessie main' >> /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb-src http://tarantool.org/dist/master/debian/ jessie main' >> /etc/apt/sources.list.d/tarantool.list - -RUN apt-get update - -# Install locales -RUN apt-get install -y locales -RUN dpkg-reconfigure locales && \ - locale-gen C.UTF-8 && \ - /usr/sbin/update-locale LANG=C.UTF-8 -RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && \ - locale-gen -ENV LC_ALL C.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US.UTF-8 - -EXPOSE 3301 -# Install tarantool pack -RUN apt-get install -y --force-yes tarantool tarantool-dev tarantool-expirationd tarantool-queue tarantool-http tarantool-pool tarantool-shard diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 new file mode 100644 index 0000000..7ff2901 --- /dev/null +++ b/dockerfiles/alpine_3.15 @@ -0,0 +1,254 @@ +FROM alpine:3.15 +LABEL org.opencontainers.image.authors="artembo@me.com; piligrim@rootnix.net" + +RUN addgroup -S tarantool \ + && adduser -S -G tarantool tarantool \ + && apk add --no-cache 'su-exec>=0.2' + +# An ARG instruction goes out of scope at the end of the build +# stage where it was defined. To use an arg in multiple stages, +# each stage must include the ARG instruction +ARG TNT_VER +ARG NPROC +ENV TARANTOOL_VERSION=${TNT_VER} \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ + GPERFTOOLS_TAG=gperftools-2.10 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ + LUAROCK_VSHARD_VERSION=0.1.20 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ + LUAROCK_EXPERATIOND_VERSION=1.1.1 \ + LUAROCK_QUEUE_VERSION=1.2.0 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.3.0 \ + LUAROCK_MEMCACHED_VERSION=1.0.1 \ + LUAROCK_METRICS_VERSION=0.14.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.1 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.5.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 + +COPY files/gperftools_alpine.diff / + +ARG ENABLE_BUNDLED_LIBYAML \ + LUAJIT_DISABLE_SYSPROF \ + GC64 + +RUN set -x \ + && apk add --no-cache --virtual .run-deps.1 \ + libstdc++ \ + readline \ + openssl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + lua \ + tar \ + zip \ + zlib \ + libunwind \ + icu \ + ca-certificates \ + libexecinfo-dev \ + && apk add --no-cache --virtual .build-deps.1 \ + gcc \ + g++ \ + cmake \ + file \ + readline-dev \ + openssl-dev \ + yaml-dev \ + bsd-compat-headers \ + lz4-dev \ + zlib-dev \ + binutils-dev \ + ncurses-dev \ + lua-dev \ + musl-dev \ + make \ + git \ + libunwind-dev \ + autoconf \ + automake \ + libtool \ + linux-headers \ + go \ + icu-dev \ + wget \ + && : "---------- gperftools ----------" \ + && mkdir -p /usr/src/gperftools \ + && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ + && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ + && (cd /usr/src/gperftools; \ + ./autogen.sh; \ + ./configure --disable-libunwind --enable-frame-pointers; \ + make -j ${NPROC}; \ + cp .libs/libprofiler.so* /usr/local/lib/) \ + && : "---------- pprof for gperftools ----------" \ + && : "To avoid of the issue:" \ + && : "'The master branch is Incompatible with go version < 1.13 #538'" \ + && : "https://github.com/google/pprof/issues/538" \ + && : "use latest workable commits with the old GO versions" \ + && ( export GOPATH=/root/go && \ + export PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH && \ + export GOBIN=$GOROOT/bin && \ + mkdir -p ${GOPATH}/src ${GOPATH}/bin && \ + go install github.com/google/pprof@latest ) \ + && : "---------- tarantool ----------" \ + && mkdir -p /usr/src/tarantool \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ + && git -C /usr/src/tarantool submodule update --init --recursive \ + && (cd /usr/src/tarantool; \ + echo "WARNING: Temporary fix for test/unit/cbus_hang test" ; \ + git cherry-pick d7fa6d34ab4e0956fe8a80966ba628e0e3f81067 2>/dev/null || \ + git cherry-pick --abort ; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=${ENABLE_BUNDLED_LIBYAML}\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DLUAJIT_DISABLE_SYSPROF:BOOL=${LUAJIT_DISABLE_SYSPROF} \ + -DLUAJIT_ENABLE_GC64:BOOL=${GC64} \ + -DENABLE_DIST:BOOL=ON\ + .) \ + && make -C /usr/src/tarantool -j ${NPROC} \ + && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make -j ${NPROC} build; \ + make install) \ + && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/gperftools \ + && rm -rf /usr/src/go \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps.1 + +RUN mkdir -p /usr/local/etc/luarocks \ + && mkdir -p /usr/local/etc/tarantool/rocks + +COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua + +ARG ROCKS_INSTALLER +RUN set -x \ + && apk add --no-cache --virtual .run-deps.2 \ + mariadb-connector-c-dev \ + libpq \ + cyrus-sasl \ + libev \ + && apk add --no-cache --virtual .build-deps.2 \ + git \ + cmake \ + make \ + coreutils \ + gcc \ + g++ \ + postgresql-dev \ + lua-dev \ + musl-dev \ + cyrus-sasl-dev \ + libev-dev \ + libucontext \ + libucontext-dev \ + libressl-dev \ + wget \ + unzip \ + && mkdir -p /rocks \ + && : "---------- proj (for gis module) ----------" \ + && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ + && mkdir -p /usr/src/proj \ + && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ + && (cd /usr/src/proj; \ + ./configure; \ + make -j ${NPROC}; \ + make install) \ + && rm -r /usr/src/proj \ + && rm -rf /usr/src/proj \ + && rm -rf /proj.tar.gz \ + && : "---------- geos (for gis module) ----------" \ + && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ + && mkdir -p /usr/src/geos \ + && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ + && (cd /usr/src/geos; \ + ./configure; \ + make -j ${NPROC}; \ + make install) \ + && rm -r /usr/src/geos \ + && rm -rf /usr/src/geos \ + && rm -rf /geos.tar.bz2 \ + && : "---------- luarocks ----------" \ + && : "ldoc" \ + && ${ROCKS_INSTALLER} install ldoc \ + && : "lua-term" \ + && ${ROCKS_INSTALLER} install lua-term \ + && : "avro" \ + && ${ROCKS_INSTALLER} install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && : "expirationd" \ + && ${ROCKS_INSTALLER} install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && : "queue" \ + && ${ROCKS_INSTALLER} install queue $LUAROCK_QUEUE_VERSION \ + && : "connpool" \ + && ${ROCKS_INSTALLER} install connpool $LUAROCK_CONNPOOL_VERSION \ + && : "vshard" \ + && ${ROCKS_INSTALLER} install vshard $LUAROCK_VSHARD_VERSION \ + && : "http" \ + && ${ROCKS_INSTALLER} install http $LUAROCK_HTTP_VERSION \ + && : "pg" \ + && ${ROCKS_INSTALLER} install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && : "mysql" \ + && ${ROCKS_INSTALLER} install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && : "memcached" \ + && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "metrics" \ + && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ + && : "prometheus" \ + && ${ROCKS_INSTALLER} install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && : "mqtt" \ + && ${ROCKS_INSTALLER} install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && : "gis" \ + && ${ROCKS_INSTALLER} install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && : "gperftools" \ + && ${ROCKS_INSTALLER} install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps.2 + +# gh-170: needed for luarocks and etc +RUN apk update \ + && apk add wget git libucontext tzdata + +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool + +VOLUME /var/lib/tarantool +WORKDIR /opt/tarantool + +COPY files/tarantool-entrypoint.lua /usr/local/bin/ +COPY files/tarantool_set_config.lua /usr/local/bin/ +COPY files/docker-entrypoint.sh /usr/local/bin/ +COPY files/console /usr/local/bin/ +COPY files/tarantool_is_up /usr/local/bin/ +COPY files/tarantool.default /usr/local/etc/default/tarantool + +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/dockerfiles/alpine_3.5 b/dockerfiles/alpine_3.5 new file mode 100644 index 0000000..192d2de --- /dev/null +++ b/dockerfiles/alpine_3.5 @@ -0,0 +1,264 @@ +FROM alpine:3.5 +MAINTAINER mail@racktear.com + +RUN addgroup -S tarantool \ + && adduser -S -G tarantool tarantool \ + && apk add --no-cache 'su-exec>=0.2' + +# An ARG instruction goes out of scope at the end of the build +# stage where it was defined. To use an arg in multiple stages, +# each stage must include the ARG instruction +ARG TNT_VER +ENV TARANTOOL_VERSION=${TNT_VER} \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + CURL_REPO=https://github.com/curl/curl.git \ + CURL_TAG=curl-7_59_0 \ + GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ + GPERFTOOLS_TAG=gperftools-2.5 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ + LUAROCK_VSHARD_VERSION=0.1.14 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ + LUAROCK_EXPERATIOND_VERSION=1.0.1 \ + LUAROCK_QUEUE_VERSION=1.0.6 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.1.0 \ + LUAROCK_MEMCACHED_VERSION=1.0.1 \ + LUAROCK_METRICS_VERSION=0.10.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 + +COPY files/gperftools_alpine.diff / + +ARG ENABLE_BUNDLED_LIBYAML +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + libstdc++ \ + readline \ + libressl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + lua \ + tar \ + zip \ + zlib \ + libunwind \ + icu \ + ca-certificates \ + && apk add --no-cache --virtual .build-deps \ + gcc \ + g++ \ + cmake \ + readline-dev \ + libressl-dev \ + yaml-dev \ + lz4-dev \ + zlib-dev \ + binutils-dev \ + ncurses-dev \ + lua-dev \ + musl-dev \ + make \ + git \ + libunwind-dev \ + autoconf \ + automake \ + libtool \ + linux-headers \ + go \ + tcl \ + icu-dev \ + wget \ + && : "---------- curl ----------" \ + && mkdir -p /usr/src/curl \ + && git clone "$CURL_REPO" /usr/src/curl \ + && git -C /usr/src/curl checkout "$CURL_TAG" \ + && (cd /usr/src/curl \ + && ./buildconf \ + && ./configure --prefix "/usr/local" \ + && make -j \ + && make install) \ + && : "---------- gperftools ----------" \ + && mkdir -p /usr/src/gperftools \ + && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ + && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ + && (cd /usr/src/gperftools; \ + patch -p1 < /gperftools_alpine.diff; \ + rm /gperftools_alpine.diff; \ + ./autogen.sh; \ + ./configure; \ + make -j ; \ + cp .libs/libprofiler.so* /usr/local/lib;) \ + && : "---------- pprof for gperftools ----------" \ + && : "To avoid of the issue:" \ + && : "'The master branch is Incompatible with go version < 1.13 #538'" \ + && : "https://github.com/google/pprof/issues/538" \ + && : "use latest workable commits with the old GO versions" \ + && ( export GOPATH=/root/go && \ + export PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH && \ + export GOBIN=$GOROOT/bin && \ + mkdir -p ${GOPATH}/src ${GOPATH}/bin && \ + go get github.com/google/pprof || : && \ + cd /root/go/src/github.com/google/pprof && \ + git checkout 160c4290d1d8cee56daa51d7ba5d223291d392aa && \ + ( cd /root/go/src/github.com/chzyer/readline && \ + git checkout f6d7a1f6fbf35bbf9beb80dc63c56a29dcfb759f ) && \ + ( cd /root/go/src/github.com/ianlancetaylor/demangle && \ + git checkout 039b1ae3a3406573c84daaf91166d70ad2bc0519 ) && \ + go build && \ + cp pprof /usr/local/bin/pprof ) \ + && : "---------- tarantool ----------" \ + && mkdir -p /usr/src/tarantool \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ + && git -C /usr/src/tarantool submodule update --init --recursive \ + && (cd /usr/src/tarantool; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=${ENABLE_BUNDLED_LIBYAML}\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DENABLE_DIST:BOOL=ON\ + .) \ + && make -C /usr/src/tarantool -j\ + && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make -j build; \ + make install) \ + && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/gperftools \ + && rm -rf /usr/src/go \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps + +RUN mkdir -p /usr/local/etc/luarocks \ + && mkdir -p /usr/local/etc/tarantool/rocks + +COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua + +ARG ROCKS_INSTALLER +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + mariadb-client-libs \ + libpq \ + cyrus-sasl \ + mosquitto-libs \ + libev \ + && apk add --no-cache --virtual .build-deps \ + git \ + cmake \ + make \ + coreutils \ + gcc \ + g++ \ + postgresql-dev \ + lua-dev \ + musl-dev \ + cyrus-sasl-dev \ + mosquitto-dev \ + libev-dev \ + libressl-dev \ + unzip \ + && mkdir -p /rocks \ + && : "---------- proj (for gis module) ----------" \ + && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ + && mkdir -p /usr/src/proj \ + && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ + && (cd /usr/src/proj; \ + ./configure; \ + make -j ; \ + make install) \ + && rm -r /usr/src/proj \ + && rm -rf /usr/src/proj \ + && rm -rf /proj.tar.gz \ + && : "---------- geos (for gis module) ----------" \ + && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ + && mkdir -p /usr/src/geos \ + && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ + && (cd /usr/src/geos; \ + ./configure; \ + make -j ; \ + make install) \ + && rm -r /usr/src/geos \ + && rm -rf /usr/src/geos \ + && rm -rf /geos.tar.bz2 \ + && : "---------- luarocks ----------" \ + && cd / \ + && : "ldoc" \ + && ${ROCKS_INSTALLER} install ldoc \ + && : "lua-term" \ + && ${ROCKS_INSTALLER} install lua-term \ + && : "avro" \ + && ${ROCKS_INSTALLER} install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && : "expirationd" \ + && ${ROCKS_INSTALLER} install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && : "queue" \ + && ${ROCKS_INSTALLER} install queue $LUAROCK_QUEUE_VERSION \ + && : "connpool" \ + && ${ROCKS_INSTALLER} install connpool $LUAROCK_CONNPOOL_VERSION \ + && : "vshard" \ + && ${ROCKS_INSTALLER} install vshard $LUAROCK_VSHARD_VERSION \ + && : "http" \ + && ${ROCKS_INSTALLER} install http $LUAROCK_HTTP_VERSION \ + && : "pg" \ + && ${ROCKS_INSTALLER} install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && : "mysql" \ + && ${ROCKS_INSTALLER} install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && : "memcached" \ + && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "metrics" \ + && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ + && : "prometheus" \ + && ${ROCKS_INSTALLER} install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && : "mqtt" \ + && ${ROCKS_INSTALLER} install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && : "gis" \ + && ${ROCKS_INSTALLER} install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && : "gperftools" \ + && ${ROCKS_INSTALLER} install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps + +# gh-170: needed for luarocks +RUN apk update \ + && apk add wget git + +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool + +VOLUME /var/lib/tarantool +WORKDIR /opt/tarantool + +COPY files/tarantool-entrypoint.lua /usr/local/bin/ +COPY files/tarantool_set_config.lua /usr/local/bin/ +COPY files/docker-entrypoint.sh /usr/local/bin/ +COPY files/console /usr/local/bin/ +COPY files/tarantool_is_up /usr/local/bin/ +COPY files/tarantool.default /usr/local/etc/default/tarantool + +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/dockerfiles/alpine_3.9 b/dockerfiles/alpine_3.9 new file mode 100644 index 0000000..94989d0 --- /dev/null +++ b/dockerfiles/alpine_3.9 @@ -0,0 +1,260 @@ +FROM alpine:3.9 +MAINTAINER mail@racktear.com + +RUN addgroup -S tarantool \ + && adduser -S -G tarantool tarantool \ + && apk add --no-cache 'su-exec>=0.2' + +# An ARG instruction goes out of scope at the end of the build +# stage where it was defined. To use an arg in multiple stages, +# each stage must include the ARG instruction +ARG TNT_VER +ARG NPROC +ENV TARANTOOL_VERSION=${TNT_VER} \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ + GPERFTOOLS_TAG=gperftools-2.5 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ + LUAROCK_VSHARD_VERSION=0.1.18 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ + LUAROCK_EXPERATIOND_VERSION=1.1.1 \ + LUAROCK_QUEUE_VERSION=1.1.0 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.2.0 \ + LUAROCK_MEMCACHED_VERSION=1.0.1 \ + LUAROCK_METRICS_VERSION=0.12.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.5.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 + +COPY files/gperftools_alpine.diff / + +ARG ENABLE_BUNDLED_LIBYAML \ + LUAJIT_DISABLE_SYSPROF \ + GC64 + +RUN set -x \ + && apk add --no-cache --virtual .run-deps.1 \ + libstdc++ \ + readline \ + openssl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + lua \ + tar \ + zip \ + zlib \ + libunwind \ + icu \ + ca-certificates \ + && apk add --no-cache --virtual .build-deps.1 \ + gcc \ + g++ \ + cmake \ + file \ + readline-dev \ + openssl-dev \ + yaml-dev \ + bsd-compat-headers \ + lz4-dev \ + zlib-dev \ + binutils-dev \ + ncurses-dev \ + lua-dev \ + musl-dev \ + make \ + git \ + libunwind-dev \ + autoconf \ + automake \ + libtool \ + linux-headers \ + go \ + icu-dev \ + wget \ + && : "---------- gperftools ----------" \ + && mkdir -p /usr/src/gperftools \ + && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ + && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ + && (cd /usr/src/gperftools; \ + patch -p1 < /gperftools_alpine.diff; \ + rm /gperftools_alpine.diff; \ + ./autogen.sh; \ + ./configure; \ + make -j ${NPROC}; \ + cp .libs/libprofiler.so* /usr/local/lib;) \ + && : "---------- pprof for gperftools ----------" \ + && : "To avoid of the issue:" \ + && : "'The master branch is Incompatible with go version < 1.13 #538'" \ + && : "https://github.com/google/pprof/issues/538" \ + && : "use latest workable commits with the old GO versions" \ + && ( export GOPATH=/root/go && \ + export PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH && \ + export GOBIN=$GOROOT/bin && \ + mkdir -p ${GOPATH}/src ${GOPATH}/bin && \ + go get github.com/google/pprof || : && \ + cd /root/go/src/github.com/google/pprof && \ + git checkout 160c4290d1d8cee56daa51d7ba5d223291d392aa && \ + ( cd /root/go/src/github.com/chzyer/readline && \ + git checkout f6d7a1f6fbf35bbf9beb80dc63c56a29dcfb759f ) && \ + ( cd /root/go/src/github.com/ianlancetaylor/demangle && \ + git checkout 039b1ae3a3406573c84daaf91166d70ad2bc0519 ) && \ + go build && \ + cp pprof /usr/local/bin/pprof ) \ + && : "---------- tarantool ----------" \ + && mkdir -p /usr/src/tarantool \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ + && git -C /usr/src/tarantool submodule update --init --recursive \ + && (cd /usr/src/tarantool; \ + echo "WARNING: Temporary fix for test/unit/cbus_hang test" ; \ + git cherry-pick d7fa6d34ab4e0956fe8a80966ba628e0e3f81067 2>/dev/null || \ + git cherry-pick --abort ; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=${ENABLE_BUNDLED_LIBYAML}\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DLUAJIT_DISABLE_SYSPROF:BOOL=${LUAJIT_DISABLE_SYSPROF} \ + -DLUAJIT_ENABLE_GC64:BOOL=${GC64} \ + -DENABLE_DIST:BOOL=ON\ + .) \ + && make -C /usr/src/tarantool -j ${NPROC} \ + && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make -j build; \ + make install) \ + && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/gperftools \ + && rm -rf /usr/src/go \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps.1 + +RUN mkdir -p /usr/local/etc/luarocks \ + && mkdir -p /usr/local/etc/tarantool/rocks + +COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua + +ARG ROCKS_INSTALLER +RUN set -x \ + && apk add --no-cache --virtual .run-deps.2 \ + mariadb-connector-c-dev \ + libpq \ + cyrus-sasl \ + libev \ + && apk add --no-cache --virtual .build-deps.2 \ + git \ + cmake \ + make \ + coreutils \ + gcc \ + g++ \ + postgresql-dev \ + lua-dev \ + musl-dev \ + cyrus-sasl-dev \ + libev-dev \ + wget \ + unzip \ + && mkdir -p /rocks \ + && : "---------- proj (for gis module) ----------" \ + && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ + && mkdir -p /usr/src/proj \ + && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ + && (cd /usr/src/proj; \ + ./configure; \ + make -j ${NPROC}; \ + make install) \ + && rm -r /usr/src/proj \ + && rm -rf /usr/src/proj \ + && rm -rf /proj.tar.gz \ + && : "---------- geos (for gis module) ----------" \ + && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ + && mkdir -p /usr/src/geos \ + && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ + && (cd /usr/src/geos; \ + ./configure; \ + make -j ${NPROC}; \ + make install) \ + && rm -r /usr/src/geos \ + && rm -rf /usr/src/geos \ + && rm -rf /geos.tar.bz2 \ + && : "---------- luarocks ----------" \ + && : "ldoc" \ + && ${ROCKS_INSTALLER} install ldoc \ + && : "lua-term" \ + && ${ROCKS_INSTALLER} install lua-term \ + && : "avro" \ + && ${ROCKS_INSTALLER} install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && : "expirationd" \ + && ${ROCKS_INSTALLER} install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && : "queue" \ + && ${ROCKS_INSTALLER} install queue $LUAROCK_QUEUE_VERSION \ + && : "connpool" \ + && ${ROCKS_INSTALLER} install connpool $LUAROCK_CONNPOOL_VERSION \ + && : "vshard" \ + && ${ROCKS_INSTALLER} install vshard $LUAROCK_VSHARD_VERSION \ + && : "http" \ + && ${ROCKS_INSTALLER} install http $LUAROCK_HTTP_VERSION \ + && : "pg" \ + && ${ROCKS_INSTALLER} install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && : "mysql" \ + && ${ROCKS_INSTALLER} install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && : "memcached" \ + && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "metrics" \ + && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ + && : "prometheus" \ + && ${ROCKS_INSTALLER} install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && : "mqtt" \ + && ${ROCKS_INSTALLER} install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && : "gis" \ + && ${ROCKS_INSTALLER} install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && : "gperftools" \ + && ${ROCKS_INSTALLER} install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps.2 + +# gh-170: needed for luarocks +RUN apk update \ + && apk add wget git + +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool + +VOLUME /var/lib/tarantool +WORKDIR /opt/tarantool + +COPY files/tarantool-entrypoint.lua /usr/local/bin/ +COPY files/tarantool_set_config.lua /usr/local/bin/ +COPY files/docker-entrypoint.sh /usr/local/bin/ +COPY files/console /usr/local/bin/ +COPY files/tarantool_is_up /usr/local/bin/ +COPY files/tarantool.default /usr/local/etc/default/tarantool + +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 new file mode 100644 index 0000000..68dd6be --- /dev/null +++ b/dockerfiles/centos_7 @@ -0,0 +1,163 @@ +FROM centos:7 +LABEL org.opencontainers.image.authors="artembo@me.com; piligrim@rootnix.net" + +ARG TNT_VER \ + GC64 + +ENV GC64=${GC64:-false} \ + TARANTOOL_VERSION=${TNT_VER} \ + LUAROCK_VSHARD_VERSION=0.1.20 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ + LUAROCK_EXPERATIOND_VERSION=1.1.1 \ + LUAROCK_QUEUE_VERSION=1.2.0 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.3.0 \ + LUAROCK_MEMCACHED_VERSION=1.0.1 \ + LUAROCK_METRICS_VERSION=0.14.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 \ + GOSU_VERSION=1.14 + +COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua + +# Set yum repository for Postgresql 9.6 since this version +# has been removed from pgdg repository. +RUN echo $'[pg]\n\ +name=PostgreSQL 9.6 RHEL/CentOS $releasever - $basearch\n\ +baseurl=https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-$basearch\n\ +enabled=1\n\ +gpgcheck=1\n\ +gpgkey=https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-96\n\ +repo_gpgcheck = 1\n'\ +>> /etc/yum.repos.d/pg.repo \ + && groupadd tarantool \ + && adduser -g tarantool tarantool \ + && yum install -y epel-release \ + && if [ "$GC64" = "OFF" ]; then export gc64=""; else export gc64="-gc64"; fi \ + && echo -e "[tarantool_2] \n\ +name=EnterpriseLinux-7 - Tarantool\n\ +baseurl=https://download.tarantool.org/tarantool/release/series-2${gc64}/el/7/$(uname -m)/\n\ +gpgkey=https://download.tarantool.org/tarantool/release/series-2${gc64}/gpgkey\n\ +repo_gpgcheck=1\n\ +gpgcheck=0\n\ +enabled=1\n\ +priority=1\n\ +\n\ +[tarantool_2-source]\n\ +name=EnterpriseLinux-7 - Tarantool Sources\n\ +baseurl=https://download.tarantool.org/tarantool/release/series-2${gc64}/el/7/SRPMS\n\ +gpgkey=https://download.tarantool.org/tarantool/release/series-2${gc64}/gpgkey\n\ +repo_gpgcheck=1\n\ +gpgcheck=0\n\ +\n\ +[tarantool-modules]\n\ +name=EnterpriseLinux-7 - Tarantool Modules\n\ +baseurl=https://download.tarantool.org/tarantool/modules/el/7/$(uname -m)/\n\ +gpgkey=https://download.tarantool.org/tarantool/modules/gpgkey\n\ +repo_gpgcheck=1\n\ +gpgcheck=0\n\ +enabled=1\n\ +priority=1\n\ +\n\ +[tarantool_modules-source]\n\ +name=EnterpriseLinux-7 - Tarantool Module Sources\n\ +baseurl=https://download.tarantool.org/tarantool/modules/el/7/SRPMS\n\ +gpgkey=https://download.tarantool.org/tarantool/modules/gpgkey\n\ +repo_gpgcheck=1\n\ +gpgcheck=0\n" > /etc/yum.repos.d/tarantool_2.repo \ + && yum makecache -y --disablerepo='*' --enablerepo='tarantool_2' --enablerepo='epel' \ + && yum -y install tarantool-${TARANTOOL_VERSION} \ + tarantool-devel-${TARANTOOL_VERSION} \ + mariadb-libs \ + postgresql96-libs \ + cyrus-sasl \ + libev \ + proj \ + geos \ + unzip \ + openssl-libs \ + luarocks \ + git \ + cmake \ + make \ + gcc-c++ \ + postgresql96-devel \ + cyrus-sasl-devel \ + libev-devel \ + wget \ + proj-devel \ + geos-devel \ + openssl-devel \ + gperftools-libs \ + && ln -s /usr/lib64/libprofiler.so.0 /usr/lib64/libprofiler.so \ + && mkdir -p /rocks \ + && tarantoolctl rocks install lua-term \ + && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ + && tarantoolctl rocks install checks $LUAROCK_CHECKS_VERSION \ + && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ + && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ + && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ + && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && : "---------- remove build deps ----------" \ + && rm -rf /rocks \ + && yum -y remove \ + git \ + cmake \ + postgresql96-devel \ + cyrus-sasl-devel \ + libev-devel \ + wget \ + proj-devel \ + geos-devel \ + openssl-devel \ + kernel-headers \ + cpp \ + perl \ + && rm -rf /var/cache/yum \ + && : "---------- gosu ----------" \ + && gpg --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && if [ $(uname -m) = 'x86_64' ]; then GOSU_ARCH='amd64'; fi \ + && if [ $(uname -m) = 'aarch64' ]; then GOSU_ARCH='arm64'; fi \ + && curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${GOSU_ARCH}" \ + && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${GOSU_ARCH}.asc" \ + && gpg --verify /usr/local/bin/gosu.asc \ + && rm /usr/local/bin/gosu.asc \ + && rm -r /root/.gnupg/ \ + && chmod +x /usr/local/bin/gosu \ + && mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && chown tarantool:tarantool /etc/tarantool \ + && ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh + +VOLUME /var/lib/tarantool +WORKDIR /opt/tarantool + +COPY files/tarantool-entrypoint.lua /usr/local/bin/ +COPY files/tarantool_set_config.lua /usr/local/bin/ +COPY files/docker-entrypoint_centos.sh /usr/local/bin/docker-entrypoint.sh +COPY files/console /usr/local/bin/ +COPY files/tarantool_is_up /usr/local/bin/ +COPY files/tarantool.default /usr/local/etc/default/tarantool + +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 new file mode 100644 index 0000000..3c3a51d --- /dev/null +++ b/dockerfiles/ubuntu_20.04 @@ -0,0 +1,89 @@ +FROM ubuntu:20.04 +LABEL org.opencontainers.image.authors="artembo@me.com; piligrim@rootnix.net" + +ARG TNT_VER \ + GC64 + +ENV GC64=${GC64:-OFF} \ + TARANTOOL_VERSION=${TNT_VER} \ + LUAROCK_VSHARD_VERSION=0.1.20 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ + LUAROCK_EXPERATIOND_VERSION=1.1.1 \ + LUAROCK_QUEUE_VERSION=1.2.0 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.3.0 \ + LUAROCK_MEMCACHED_VERSION=1.0.1 \ + LUAROCK_METRICS_VERSION=0.14.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.1 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.5.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 + +RUN set -x \ + && useradd --user-group --create-home --no-log-init --shell /bin/bash tarantool \ + && apt update && apt -y --no-install-recommends --no-install-suggests install \ + libgoogle-perftools4 \ + lsb-release \ + unzip \ + luarocks \ + libgeos-dev \ + libsasl2-dev \ + libssl-dev \ + libpq-dev \ + gis-devel \ + libproj-dev \ + gosu \ + curl \ + gnupg2 \ + ca-certificates \ + apt-transport-https \ + && ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone \ + && ln -s /usr/lib/$(arch)-linux-gnu/libprofiler.so.0.4.18 /usr/lib/$(arch)-linux-gnu/libprofiler.so \ + && if [ "$GC64" = "OFF" ]; then export gc64=""; else export gc64="-gc64"; fi \ + && curl -L https://download.tarantool.org/tarantool/release/series-2/gpgkey | apt-key add - \ + && curl -L https://download.tarantool.org/tarantool/modules/gpgkey | apt-key add - \ + && echo "deb https://download.tarantool.org/tarantool/release/series-2${gc64}/ubuntu/ $(lsb_release -s -c) main" >> /etc/apt/sources.list.d/tarantool_2.list \ + && echo "deb-src https://download.tarantool.org/tarantool/release/series-2${gc64}/ubuntu/ $(lsb_release -s -c) main" >> /etc/apt/sources.list.d/tarantool_2.list \ + && echo "deb https://download.tarantool.org/tarantool/modules/ubuntu/ $(lsb_release -s -c) main" >> /etc/apt/sources.list.d/tarantool_2.list \ + && echo "deb-src https://download.tarantool.org/tarantool/modules/ubuntu/ $(lsb_release -s -c) main" >> /etc/apt/sources.list.d/tarantool_2.list \ + && apt update \ + && apt show -a tarantool \ + && apt -y install tarantool=${TNT_VER} \ + && apt -y install tarantool-dev=${TNT_VER} \ + && apt clean \ + && tarantoolctl rocks install lua-term \ + && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ + && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ + && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ + && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ + && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && tarantoolctl rocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && apt purge -y unzip curl git gcc cmake \ + && apt -y autoremove \ + && rm -rf /var/lib/apt/lists/ + +COPY files/tarantool-entrypoint.lua /usr/local/bin/ +COPY files/tarantool_set_config.lua /usr/local/bin/ +COPY files/docker-entrypoint_centos.sh /usr/local/bin/docker-entrypoint.sh +COPY files/console /usr/local/bin/ +COPY files/tarantool_is_up /usr/local/bin/ +COPY files/tarantool.default /usr/local/etc/default/tarantool + +RUN chown tarantool /etc/tarantool && ln -s /usr/local/bin/docker-entrypoint.sh /entrypoint.sh + +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/fedora/Dockerfile b/fedora/Dockerfile deleted file mode 100644 index c2b30bc..0000000 --- a/fedora/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM fedora:21 - -# Add tarantool repo -RUN touch /etc/yum.repos.d/tarantool.repo -RUN echo '[tarantool]' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'name=Centos-$releasever - Tarantool' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'baseurl=http://tarantool.org/dist/master/fedora/$releasever/$basearch/' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'enabled=1' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'gpgcheck=0' >> /etc/yum.repos.d/tarantool.repo - -# Add locale -RUN localedef -f UTF-8 -i ru_RU C.UTF-8 - -EXPOSE 3301 -# Install tarantool pack -RUN yum clean all -RUN yum install -y tarantool tarantool-dev tarantool-modules tarantool-expirationd tarantool-queue tarantool-http tarantool-pool tarantool-shard diff --git a/files/console b/files/console new file mode 100755 index 0000000..d6fb192 --- /dev/null +++ b/files/console @@ -0,0 +1,15 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' + +console = require('console') +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + self.running = false + end +end) +console.on_client_disconnect(function(self) self.running = false end) +console.start() diff --git a/files/docker-entrypoint.sh b/files/docker-entrypoint.sh new file mode 100755 index 0000000..3a9f5e4 --- /dev/null +++ b/files/docker-entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +# or first arg is `something.conf` +if [ "${1:0:1}" = '-' ]; then + set -- tarantool "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then + chown -R tarantool /var/lib/tarantool + exec su-exec tarantool "$0" "$@" +fi + +# entry point wraps the passed script to do basic setup +if [ "$1" = 'tarantool' ]; then + shift + exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" +fi + +exec "$@" diff --git a/files/docker-entrypoint_centos.sh b/files/docker-entrypoint_centos.sh new file mode 100755 index 0000000..b1bfad7 --- /dev/null +++ b/files/docker-entrypoint_centos.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +# or first arg is `something.conf` +if [ " -${1#?}" = " $1" ]; then + set -- tarantool "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then + chown -R tarantool /var/lib/tarantool + exec gosu tarantool "$0" "$@" +fi + +# entry point wraps the passed script to do basic setup +if [ "$1" = 'tarantool' ]; then + shift + exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" +fi + +exec "$@" diff --git a/files/gperftools_alpine.diff b/files/gperftools_alpine.diff new file mode 100644 index 0000000..e768381 --- /dev/null +++ b/files/gperftools_alpine.diff @@ -0,0 +1,110 @@ +diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h +index 5d578cd..fceebe2 100644 +--- a/src/base/linux_syscall_support.h ++++ b/src/base/linux_syscall_support.h +@@ -2432,9 +2432,9 @@ struct kernel_stat { + #if defined(__s390x__) + LSS_INLINE _syscall1(void*, mmap, void*, a) + #else +- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ ++ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ + LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, +- __off64_t o) { ++ off64_t o) { + LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), + LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), + LSS_SYSCALL_ARG(d), (uint64_t)(o)); +@@ -2475,7 +2475,7 @@ struct kernel_stat { + LSS_INLINE _syscall6(void*, mmap, void*, s, + size_t, l, int, p, + int, f, int, d, +- __off64_t, o) ++ off64_t, o) + LSS_INLINE int LSS_NAME(sigaction)(int signum, + const struct kernel_sigaction *act, + struct kernel_sigaction *oldact) { +diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h +index 1c4c766..b2aa8ed 100755 +--- a/src/malloc_hook_mmap_linux.h ++++ b/src/malloc_hook_mmap_linux.h +@@ -56,7 +56,7 @@ + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + return sys_mmap(start, length, prot, flags, fd, offset); + } + +@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + void *result; + + // Try mmap2() unless it's not supported +@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, + # undef mmap + + extern "C" { ++ #ifndef mmap64 + void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset ) __THROW ++ int fd, off64_t offset ) __THROW + ATTRIBUTE_SECTION(malloc_hook); ++ #endif + void* mmap(void *start, size_t length,int prot, int flags, + int fd, off_t offset) __THROW + ATTRIBUTE_SECTION(malloc_hook); +@@ -166,8 +168,9 @@ extern "C" { + ATTRIBUTE_SECTION(malloc_hook); + } + ++#ifndef mmap64 + extern "C" void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); + void *result; + if (!MallocHook::InvokeMmapReplacement( +@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, + MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); + return result; + } ++#endif + + # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) + +@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, + return result; + } + +-#ifndef __UCLIBC__ ++#if defined(__GLIBC__) && ! defined(__UCLIBC__) + // libc's version: + extern "C" void* __sbrk(ptrdiff_t increment); + +diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc +index 3c9f735..2d39ad9 100644 +--- a/src/tests/stacktrace_unittest.cc ++++ b/src/tests/stacktrace_unittest.cc +@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { + CHECK_GE(size, 1); + CHECK_LE(size, STACK_LEN); + +-#ifdef HAVE_EXECINFO_H +- { +- char **strings = backtrace_symbols(stack, size); +- printf("Obtained %d stack frames.\n", size); +- for (int i = 0; i < size; i++) +- printf("%s %p\n", strings[i], stack[i]); +- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); +- free(strings); +- } +-#endif +- + for (int i = 0; i < BACKTRACE_STEPS; i++) { + printf("Backtrace %d: expected: %p..%p actual: %p ... ", + i, expected_range[i].start, expected_range[i].end, stack[i]); diff --git a/files/luarocks-config.lua b/files/luarocks-config.lua new file mode 100644 index 0000000..111f955 --- /dev/null +++ b/files/luarocks-config.lua @@ -0,0 +1,9 @@ +rocks_trees = { + { name = [[user]], root = home..[[/.luarocks]] }, + { name = [[system]], root = [[/usr/local]] } +} + +rocks_servers = { + [[http://rocks.tarantool.org/]], + [[http://luarocks.org/repositories/rocks]] +} diff --git a/files/luarocks-config_centos.lua b/files/luarocks-config_centos.lua new file mode 100644 index 0000000..4c48b74 --- /dev/null +++ b/files/luarocks-config_centos.lua @@ -0,0 +1,11 @@ +rocks_trees = { + { name = [[user]], root = home..[[/.luarocks]] }, + { name = [[system]], root = [[/usr/local]] } +} + +lib_modules_path="/lib64/lua/"..lua_version + +rocks_servers = { + [[http://rocks.tarantool.org/]], + [[http://luarocks.org/repositories/rocks]] +} diff --git a/files/mosquitto.repo b/files/mosquitto.repo new file mode 100644 index 0000000..4df10dc --- /dev/null +++ b/files/mosquitto.repo @@ -0,0 +1,7 @@ +[home_oojah_mqtt] +name=mqtt (CentOS_CentOS-7) +type=rpm-md +baseurl=http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-7/ +gpgcheck=1 +gpgkey=http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-7//repodata/repomd.xml.key +enabled=1 \ No newline at end of file diff --git a/files/tarantool-entrypoint.lua b/files/tarantool-entrypoint.lua new file mode 100755 index 0000000..ca32426 --- /dev/null +++ b/files/tarantool-entrypoint.lua @@ -0,0 +1,306 @@ +#!/usr/bin/env tarantool + +local fio = require('fio') +local errno = require('errno') +local urilib = require('uri') +local console = require('console') +local term = require('term') +local log = require('log') +local yaml = require('yaml') + +local TARANTOOL_DEFAULT_PORT = 3301 +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + + +local orig_cfg = box.cfg + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function parse_replication_source(replication_source, user_name, user_password) + if replication_source == nil then + return nil + end + + local replication_source_table = {} + for uri in string.gmatch(replication_source, "[^,]+") do + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password + + if user == 'guest' or user == nil then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) + end + + return replication_source_table +end + +local function choose_option(main, substitute, cfg) + if cfg[main] then + return main + end + if cfg[substitute] then + return substitute + end + return main +end + +function set_replication_source(replication_source, user_name, user_password) + local replication_source_table = parse_replication_source( + replication_source, user_name, user_password + ) + local choice = choose_option('replication', 'replication_source', box.cfg) + box.cfg{[choice] = replication_source_table} + log.info("Updated box.cfg.%s to %s", choice, replication_source) +end + +local function create_user(user_name, user_password) + if user_name ~= 'guest' and user_password == nil then + user_password = "" + + local warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_USER_PASSWORD=password" + to set it in "docker run". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password == nil then + local warn_str = [[**************************************************** +WARNING: 'guest' is chosen as primary user. + Since it is not allowed to set a password for + guest user, your instance will be accessible + by anyone having direct access to the Tarantool + port. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password ~= nil then + user_password = nil + + local warn_str = [[**************************************************** +WARNING: A password for guest user has been specified. + In Tarantool, guest user can't have a password + and is always allowed to login, if it has + enough privileges. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + if not box.schema.user.exists(user_name) then + log.info("Creating user '%s'", user_name) + box.schema.user.create(user_name) + end + end + + if user_name ~= 'admin' then + log.info("Granting admin privileges to user '%s'", user_name) + box.schema.user.grant(user_name, 'read,write,execute,create,drop', + 'universe', nil, {if_not_exists = true}) + box.schema.user.grant(user_name, 'replication', + nil, nil, {if_not_exists = true}) + end + + if user_name ~= 'guest' then + log.info("Setting password for user '%s'", user_name) + box.schema.user.passwd(user_name, user_password) + end +end + +function set_credentials(user_name, user_password) + create_user(user_name, user_password) +end + +local function wrapper_cfg(override) + local work_dir = '/var/lib/tarantool' + local snap_filename = "*.snap" + local snap_path = work_dir..'/'..snap_filename + + local first_run = false + if next(fio.glob(snap_path)) == nil then + first_run = true + end + + + local file_cfg = {} + local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil + if not config_file_exists then + log.info("Creating configuration file: " .. CFG_FILE_PATH) + + file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') + file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') + file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') + file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') + file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') + file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') + file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') + file_cfg.TARANTOOL_FORCE_RECOVERY = os.getenv('TARANTOOL_FORCE_RECOVERY') + file_cfg.TARANTOOL_LOG_FORMAT = os.getenv('TARANTOOL_LOG_FORMAT') + file_cfg.TARANTOOL_LOG_LEVEL = os.getenv('TARANTOOL_LOG_LEVEL') + file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') + file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') + file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') + file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') + file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') + file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') + file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') + + write_config(file_cfg) + else + log.info("Loading existing configuration file: " .. CFG_FILE_PATH) + + file_cfg = read_config() + end + + local user_name = file_cfg.TARANTOOL_USER_NAME or + os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = file_cfg.TARANTOOL_USER_PASSWORD or + os.getenv('TARANTOOL_USER_PASSWORD') + + + local cfg = override or {} + -- Placeholders for deprecated options + cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or + override.slab_alloc_arena + cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or + override.slab_alloc_maximal + cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or + override.slab_alloc_minimal + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period + -- Replacements for deprecated options + cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or + override.memtx_memory + cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or + override.memtx_min_tuple_size + cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or + override.memtx_max_tuple_size + cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or + override.checkpoint_interval + -- Deprecated options with default values + local choice = choose_option('memtx_dir', 'snap_dir', override) + cfg[choice] = override[choice] or '/var/lib/tarantool' + + -- Remaining configuration + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor + cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or + override.listen or TARANTOOL_DEFAULT_PORT + cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or + override.wal_mode + + cfg.force_recovery = file_cfg.TARANTOOL_FORCE_RECOVERY == 'true' + cfg.log_format = file_cfg.TARANTOOL_LOG_FORMAT or 'plain' + cfg.log_level = tonumber(file_cfg.TARANTOOL_LOG_LEVEL) or 5 + + cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' + cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' + cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' + + local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) + local replication_source_table = parse_replication_source(file_cfg[choice], + user_name, + user_password) + + if replication_source_table then + cfg.replication = replication_source_table + else + local choice = choose_option('replication', 'replication_source', override) + cfg[choice] = override[choice] + end + + log.info("Config:\n" .. yaml.encode(cfg)) + + orig_cfg(cfg) + + box.once('tarantool-entrypoint', function () + if first_run then + log.info("Initializing database") + + create_user(user_name, user_password) + end + end) + + console.listen(CONSOLE_SOCKET_PATH) + + local metrics_port = tonumber(os.getenv('TARANTOOL_PROMETHEUS_DEFAULT_METRICS_PORT')) or 0 + if metrics_port > 0 then + require('metrics').enable_default_metrics() + local prometheus = require('metrics.plugins.prometheus') + local httpd = require('http.server').new('0.0.0.0', metrics_port) + httpd:route( { path = '/metrics' }, prometheus.collect_http) + httpd:start() + end +end + +box.cfg = wrapper_cfg + +-- re-run the script passed as parameter with all arguments that follow +execute_script = arg[1] +if execute_script == nil then + box.cfg {} + + if term.isatty(io.stdout) then + console.start() + os.exit(0) + end +else + narg = 0 + while true do + arg[narg] = arg[narg + 1] + if arg[narg] == nil then + break + end + narg = narg + 1 + end + + dofile(execute_script) +end diff --git a/files/tarantool.default b/files/tarantool.default new file mode 100644 index 0000000..fffe3b0 --- /dev/null +++ b/files/tarantool.default @@ -0,0 +1,22 @@ +-- +-- System-wide settings for tarantoolctl and init scripts +-- +-- This file is meant to enable the usage of tarantoolctl inside +-- docker containers. Since there is no init system, most of its +-- functionality will not work, except 'tarantoolctl enter' or +-- 'tarantoolctl status'. +-- + +default_cfg = { + pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid + wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ + snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log + username = "tarantool", +} + +-- instances.available - all available instances +-- instances.enabled - instances to autostart by sysvinit +instance_dir = "/usr/local/etc/tarantool/instances.enabled" +-- vim: set ft=lua : diff --git a/files/tarantool_is_up b/files/tarantool_is_up new file mode 100755 index 0000000..71148d5 --- /dev/null +++ b/files/tarantool_is_up @@ -0,0 +1,41 @@ +#!/bin/sh + +status=$( (tarantool <<-'EOF' +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local console = require('console') +local os = require("os") +local yaml = require("yaml") + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + cmd = 'box.info.status' + local res = self:eval(cmd) + if res ~= nil then + res = yaml.decode(res) + print(res[1]) + end + + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) +EOF +) 2>/dev/null) + + +echo "$status" + +if [ "$status" = "running" ]; then + exit 0 +else + exit 1 +fi diff --git a/files/tarantool_set_config.lua b/files/tarantool_set_config.lua new file mode 100755 index 0000000..95d3a25 --- /dev/null +++ b/files/tarantool_set_config.lua @@ -0,0 +1,132 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + +local yaml = require('yaml') +local console = require('console') +local errno = require('errno') + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function nop(console, cfg, value) +end + +local function update_replication_source(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" + print("cmd: ", cmd) + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end +end + +local function update_credentials(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end + + local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] + + if replication_source ~= nil then + update_replication_source(console, cfg, replication_source) + end +end + + +local vars = { + TARANTOOL_SLAB_ALLOC_ARENA=nop, + TARANTOOL_SLAB_ALLOC_FACTOR=nop, + TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, + TARANTOOL_SLAB_ALLOC_MINIMAL=nop, + TARANTOOL_PORT=nop, + TARANTOOL_FORCE_RECOVERY=nop, + TARANTOOL_LOG_FORMAT=nop, + TARANTOOL_LOG_LEVEL=nop, + TARANTOOL_WAL_MODE=nop, + TARANTOOL_USER_NAME=update_credentials, + TARANTOOL_USER_PASSWORD=update_credentials, + TARANTOOL_REPLICATION_SOURCE=update_replication_source, + TARANTOOL_REPLICATION=update_replication_source, +} + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + if arg[1] == nil or arg[2] == nil then + self:print("Usage: " .. arg[0] .. " ") + os.exit(1) + end + + if vars[arg[1]] == nil then + self:print("Unknown var: " .. arg[1]) + os.exit(1) + end + + local cfg = read_config() + cfg[arg[1]] = arg[2] + + local func = vars[arg[1]] + func(self, cfg, arg[2]) + + write_config(cfg) + + self.running = false + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) diff --git a/files/test-rocks.lua b/files/test-rocks.lua new file mode 100644 index 0000000..1a68bba --- /dev/null +++ b/files/test-rocks.lua @@ -0,0 +1,15 @@ +-- Test rocks +avroschema = require('avro_schema') +expirationd = require('expirationd') +queue = require('queue') +connpool = require('connpool') +vshard = require('vshard') +http_request = require("http.server") +pg = require('pg') +mysql = require('mysql') +memcached = require('memcached') +metrics = require('metrics') +prometheus = require('prometheus') +mqtt = require('mqtt') +gis = require('gis') +gperftools = require('gperftools') diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile deleted file mode 100644 index 7727ecc..0000000 --- a/ubuntu/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM ubuntu:trusty - -# Add tarantool repo -RUN touch /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb http://tarantool.org/dist/master/ubuntu/ trusty main' >> /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb-src http://tarantool.org/dist/master/ubuntu/ trusty main' >> /etc/apt/sources.list.d/tarantool.list - -RUN apt-get update - -# Install locales -ENV LC_ALL C.UTF-8 - -EXPOSE 3301 -# Install tarantool pack -RUN apt-get install -y --force-yes tarantool tarantool-dev tarantool-expirationd tarantool-queue tarantool-http tarantool-pool tarantool-shard diff --git a/versions/alpine_3.15_2.10.0 b/versions/alpine_3.15_2.10.0 new file mode 100644 index 0000000..71cb739 --- /dev/null +++ b/versions/alpine_3.15_2.10.0 @@ -0,0 +1 @@ +2.10.0-1-g370040ca1 diff --git a/versions/alpine_3.15_2.10.2 b/versions/alpine_3.15_2.10.2 new file mode 100644 index 0000000..b2eccf2 --- /dev/null +++ b/versions/alpine_3.15_2.10.2 @@ -0,0 +1,2 @@ +2.10.2-5-g399bea26a + diff --git a/versions/alpine_3.15_2.10.3 b/versions/alpine_3.15_2.10.3 new file mode 100644 index 0000000..a08d627 --- /dev/null +++ b/versions/alpine_3.15_2.10.3 @@ -0,0 +1 @@ +2.10.3-4-g13a839e85 diff --git a/versions/alpine_3.15_2.10.4 b/versions/alpine_3.15_2.10.4 new file mode 100644 index 0000000..5bda9d0 --- /dev/null +++ b/versions/alpine_3.15_2.10.4 @@ -0,0 +1 @@ +2.10.4-0-g816000e10 diff --git a/versions/alpine_3.5_1.10.0 b/versions/alpine_3.5_1.10.0 new file mode 100644 index 0000000..818e3ac --- /dev/null +++ b/versions/alpine_3.5_1.10.0 @@ -0,0 +1 @@ +1.10.0-0-g42612ec04 diff --git a/versions/alpine_3.5_1.10.1 b/versions/alpine_3.5_1.10.1 new file mode 100644 index 0000000..d611287 --- /dev/null +++ b/versions/alpine_3.5_1.10.1 @@ -0,0 +1 @@ +1.10.1-0-g8d7617d4c diff --git a/versions/alpine_3.5_1.10.2 b/versions/alpine_3.5_1.10.2 new file mode 100644 index 0000000..5c1acd3 --- /dev/null +++ b/versions/alpine_3.5_1.10.2 @@ -0,0 +1 @@ +1.10.2-0-gc0d8063b6 diff --git a/versions/alpine_3.5_1.10.3 b/versions/alpine_3.5_1.10.3 new file mode 100644 index 0000000..515f8f7 --- /dev/null +++ b/versions/alpine_3.5_1.10.3 @@ -0,0 +1 @@ +1.10.3-0-g0b7078a93 diff --git a/versions/alpine_3.5_2.1.0 b/versions/alpine_3.5_2.1.0 new file mode 100644 index 0000000..7cc34be --- /dev/null +++ b/versions/alpine_3.5_2.1.0 @@ -0,0 +1 @@ +2.1.0-0-g2c6929204 diff --git a/versions/alpine_3.5_2.1.1 b/versions/alpine_3.5_2.1.1 new file mode 100644 index 0000000..0c1c7e7 --- /dev/null +++ b/versions/alpine_3.5_2.1.1 @@ -0,0 +1 @@ +2.1.1-0-g8a09adb46 diff --git a/versions/alpine_3.5_2.1.2 b/versions/alpine_3.5_2.1.2 new file mode 100644 index 0000000..707313e --- /dev/null +++ b/versions/alpine_3.5_2.1.2 @@ -0,0 +1 @@ +2.1.2-2-gd06f95fc1 diff --git a/versions/alpine_3.5_2.2.0 b/versions/alpine_3.5_2.2.0 new file mode 100644 index 0000000..c8920cc --- /dev/null +++ b/versions/alpine_3.5_2.2.0 @@ -0,0 +1 @@ +2.2.0-0-gb58001013 diff --git a/versions/alpine_3.5_2.2.1 b/versions/alpine_3.5_2.2.1 new file mode 100644 index 0000000..10db341 --- /dev/null +++ b/versions/alpine_3.5_2.2.1 @@ -0,0 +1 @@ +2.2.1-3-g878e2a42c diff --git a/versions/alpine_3.5_2.3.0 b/versions/alpine_3.5_2.3.0 new file mode 100644 index 0000000..4d06f89 --- /dev/null +++ b/versions/alpine_3.5_2.3.0 @@ -0,0 +1 @@ +2.3.0-0-gce0f2ef8b diff --git a/versions/alpine_3.9_1.10.10 b/versions/alpine_3.9_1.10.10 new file mode 100644 index 0000000..21750c0 --- /dev/null +++ b/versions/alpine_3.9_1.10.10 @@ -0,0 +1 @@ +1.10.10-0-gaea7ae77a diff --git a/versions/alpine_3.9_1.10.11 b/versions/alpine_3.9_1.10.11 new file mode 100644 index 0000000..5fca5e7 --- /dev/null +++ b/versions/alpine_3.9_1.10.11 @@ -0,0 +1 @@ +1.10.11-0-gf0b0e7ecf diff --git a/versions/alpine_3.9_1.10.12 b/versions/alpine_3.9_1.10.12 new file mode 100644 index 0000000..a296e63 --- /dev/null +++ b/versions/alpine_3.9_1.10.12 @@ -0,0 +1 @@ +1.10.12-0-g7f88f54fe diff --git a/versions/alpine_3.9_1.10.13 b/versions/alpine_3.9_1.10.13 new file mode 100644 index 0000000..a62d73a --- /dev/null +++ b/versions/alpine_3.9_1.10.13 @@ -0,0 +1 @@ +1.10.13-0-g1d2c5aad5 diff --git a/versions/alpine_3.9_1.10.4 b/versions/alpine_3.9_1.10.4 new file mode 100644 index 0000000..19bee8b --- /dev/null +++ b/versions/alpine_3.9_1.10.4 @@ -0,0 +1 @@ +1.10.4-0-g9dbcdba14 diff --git a/versions/alpine_3.9_1.10.5 b/versions/alpine_3.9_1.10.5 new file mode 100644 index 0000000..a502d5e --- /dev/null +++ b/versions/alpine_3.9_1.10.5 @@ -0,0 +1 @@ +1.10.5-0-g83a2ae919 diff --git a/versions/alpine_3.9_1.10.6 b/versions/alpine_3.9_1.10.6 new file mode 100644 index 0000000..642ac30 --- /dev/null +++ b/versions/alpine_3.9_1.10.6 @@ -0,0 +1 @@ +1.10.6-0-g5372cd2fa diff --git a/versions/alpine_3.9_1.10.7 b/versions/alpine_3.9_1.10.7 new file mode 100644 index 0000000..2abbc88 --- /dev/null +++ b/versions/alpine_3.9_1.10.7 @@ -0,0 +1 @@ +1.10.7-0-g554d439a5 diff --git a/versions/alpine_3.9_1.10.8 b/versions/alpine_3.9_1.10.8 new file mode 100644 index 0000000..ec84c5b --- /dev/null +++ b/versions/alpine_3.9_1.10.8 @@ -0,0 +1 @@ +1.10.8-0-g2f18757b7 diff --git a/versions/alpine_3.9_1.10.9 b/versions/alpine_3.9_1.10.9 new file mode 100644 index 0000000..beeb43b --- /dev/null +++ b/versions/alpine_3.9_1.10.9 @@ -0,0 +1 @@ +1.10.9-0-g720ffdd23 diff --git a/versions/alpine_3.9_1.x b/versions/alpine_3.9_1.x new file mode 100644 index 0000000..a62d73a --- /dev/null +++ b/versions/alpine_3.9_1.x @@ -0,0 +1 @@ +1.10.13-0-g1d2c5aad5 diff --git a/versions/alpine_3.9_2.1 b/versions/alpine_3.9_2.1 new file mode 100644 index 0000000..3c5e3dd --- /dev/null +++ b/versions/alpine_3.9_2.1 @@ -0,0 +1 @@ +2.1.3-9-g85ad8508e diff --git a/versions/alpine_3.9_2.1.3 b/versions/alpine_3.9_2.1.3 new file mode 100644 index 0000000..b242e69 --- /dev/null +++ b/versions/alpine_3.9_2.1.3 @@ -0,0 +1 @@ +2.1.3-1-g62c1bcdaf diff --git a/versions/alpine_3.9_2.10.0-beta1 b/versions/alpine_3.9_2.10.0-beta1 new file mode 100644 index 0000000..fefa942 --- /dev/null +++ b/versions/alpine_3.9_2.10.0-beta1 @@ -0,0 +1 @@ +2.10.0-beta1-0-g7da4b1438 diff --git a/versions/alpine_3.9_2.10.0-beta2 b/versions/alpine_3.9_2.10.0-beta2 new file mode 100644 index 0000000..86230ba --- /dev/null +++ b/versions/alpine_3.9_2.10.0-beta2 @@ -0,0 +1 @@ +2.10.0-beta2-0-g9d80b68b9 diff --git a/versions/alpine_3.9_2.10.0-rc1 b/versions/alpine_3.9_2.10.0-rc1 new file mode 100644 index 0000000..cfb12b5 --- /dev/null +++ b/versions/alpine_3.9_2.10.0-rc1 @@ -0,0 +1 @@ +2.10.0-rc1-0-g7ed15e62b diff --git a/versions/alpine_3.9_2.2 b/versions/alpine_3.9_2.2 new file mode 100644 index 0000000..96c38a4 --- /dev/null +++ b/versions/alpine_3.9_2.2 @@ -0,0 +1 @@ +2.2.3-1-g98ecc909a diff --git a/versions/alpine_3.9_2.2.2 b/versions/alpine_3.9_2.2.2 new file mode 100644 index 0000000..243a7ec --- /dev/null +++ b/versions/alpine_3.9_2.2.2 @@ -0,0 +1 @@ +2.2.2-4-g4f8ac5999 diff --git a/versions/alpine_3.9_2.2.3 b/versions/alpine_3.9_2.2.3 new file mode 100644 index 0000000..cd11112 --- /dev/null +++ b/versions/alpine_3.9_2.2.3 @@ -0,0 +1 @@ +2.2.3-0-gb9c4c7c04 diff --git a/versions/alpine_3.9_2.3 b/versions/alpine_3.9_2.3 new file mode 100644 index 0000000..1ca9a1f --- /dev/null +++ b/versions/alpine_3.9_2.3 @@ -0,0 +1 @@ +2.3.3-2-g7eea3a6cb diff --git a/versions/alpine_3.9_2.3.1 b/versions/alpine_3.9_2.3.1 new file mode 100644 index 0000000..0d9a82f --- /dev/null +++ b/versions/alpine_3.9_2.3.1 @@ -0,0 +1 @@ +2.3.1-2-g92750c828 diff --git a/versions/alpine_3.9_2.3.2 b/versions/alpine_3.9_2.3.2 new file mode 100644 index 0000000..c66dd25 --- /dev/null +++ b/versions/alpine_3.9_2.3.2 @@ -0,0 +1 @@ +2.3.2-0-gcb25c5473 diff --git a/versions/alpine_3.9_2.3.3 b/versions/alpine_3.9_2.3.3 new file mode 100644 index 0000000..af16b25 --- /dev/null +++ b/versions/alpine_3.9_2.3.3 @@ -0,0 +1 @@ +2.3.3-0-g5be85a37f diff --git a/versions/alpine_3.9_2.4 b/versions/alpine_3.9_2.4 new file mode 100644 index 0000000..b17eaf1 --- /dev/null +++ b/versions/alpine_3.9_2.4 @@ -0,0 +1 @@ +2.4.3-1-g986fab717 diff --git a/versions/alpine_3.9_2.4.0 b/versions/alpine_3.9_2.4.0 new file mode 100644 index 0000000..c88906d --- /dev/null +++ b/versions/alpine_3.9_2.4.0 @@ -0,0 +1 @@ +2.4.0-0-g9887ca8fe diff --git a/versions/alpine_3.9_2.4.1 b/versions/alpine_3.9_2.4.1 new file mode 100644 index 0000000..3e03af7 --- /dev/null +++ b/versions/alpine_3.9_2.4.1 @@ -0,0 +1 @@ +2.4.1-0-gc44ed3c08 diff --git a/versions/alpine_3.9_2.4.2 b/versions/alpine_3.9_2.4.2 new file mode 100644 index 0000000..f0a6664 --- /dev/null +++ b/versions/alpine_3.9_2.4.2 @@ -0,0 +1 @@ +2.4.2-0-gcccd89701 diff --git a/versions/alpine_3.9_2.4.3 b/versions/alpine_3.9_2.4.3 new file mode 100644 index 0000000..c60bf40 --- /dev/null +++ b/versions/alpine_3.9_2.4.3 @@ -0,0 +1 @@ +2.4.3-0-g5180d98f1 diff --git a/versions/alpine_3.9_2.5 b/versions/alpine_3.9_2.5 new file mode 100644 index 0000000..45d968d --- /dev/null +++ b/versions/alpine_3.9_2.5 @@ -0,0 +1 @@ +2.5.3-0-gf93e48013 diff --git a/versions/alpine_3.9_2.5.0 b/versions/alpine_3.9_2.5.0 new file mode 100644 index 0000000..de9aea1 --- /dev/null +++ b/versions/alpine_3.9_2.5.0 @@ -0,0 +1 @@ +2.5.0-0-gfef6505c7 diff --git a/versions/alpine_3.9_2.5.1 b/versions/alpine_3.9_2.5.1 new file mode 100644 index 0000000..e2c967c --- /dev/null +++ b/versions/alpine_3.9_2.5.1 @@ -0,0 +1 @@ +2.5.1-0-gc2d8c03ee diff --git a/versions/alpine_3.9_2.5.2 b/versions/alpine_3.9_2.5.2 new file mode 100644 index 0000000..c55bc39 --- /dev/null +++ b/versions/alpine_3.9_2.5.2 @@ -0,0 +1 @@ +2.5.2-0-g05730d326 diff --git a/versions/alpine_3.9_2.5.3 b/versions/alpine_3.9_2.5.3 new file mode 100644 index 0000000..45d968d --- /dev/null +++ b/versions/alpine_3.9_2.5.3 @@ -0,0 +1 @@ +2.5.3-0-gf93e48013 diff --git a/versions/alpine_3.9_2.6 b/versions/alpine_3.9_2.6 new file mode 100644 index 0000000..6e81225 --- /dev/null +++ b/versions/alpine_3.9_2.6 @@ -0,0 +1 @@ +2.6.3-0-gcd487a2c5 diff --git a/versions/alpine_3.9_2.6.0 b/versions/alpine_3.9_2.6.0 new file mode 100644 index 0000000..434471f --- /dev/null +++ b/versions/alpine_3.9_2.6.0 @@ -0,0 +1 @@ +2.6.0-0-g47aa4e01e diff --git a/versions/alpine_3.9_2.6.1 b/versions/alpine_3.9_2.6.1 new file mode 100644 index 0000000..8f67fcd --- /dev/null +++ b/versions/alpine_3.9_2.6.1 @@ -0,0 +1 @@ +2.6.1-0-gcfe0d1a55 diff --git a/versions/alpine_3.9_2.6.2 b/versions/alpine_3.9_2.6.2 new file mode 100644 index 0000000..a5b2bcb --- /dev/null +++ b/versions/alpine_3.9_2.6.2 @@ -0,0 +1 @@ +2.6.2-0-g34d504d7d diff --git a/versions/alpine_3.9_2.6.3 b/versions/alpine_3.9_2.6.3 new file mode 100644 index 0000000..6e81225 --- /dev/null +++ b/versions/alpine_3.9_2.6.3 @@ -0,0 +1 @@ +2.6.3-0-gcd487a2c5 diff --git a/versions/alpine_3.9_2.7 b/versions/alpine_3.9_2.7 new file mode 100644 index 0000000..63b9bd4 --- /dev/null +++ b/versions/alpine_3.9_2.7 @@ -0,0 +1 @@ +2.7.2-0-g4d8c06890 diff --git a/versions/alpine_3.9_2.7.0 b/versions/alpine_3.9_2.7.0 new file mode 100644 index 0000000..fe66789 --- /dev/null +++ b/versions/alpine_3.9_2.7.0 @@ -0,0 +1 @@ +2.7.0-1-g1ad696c09 diff --git a/versions/alpine_3.9_2.7.1 b/versions/alpine_3.9_2.7.1 new file mode 100644 index 0000000..f8b07c8 --- /dev/null +++ b/versions/alpine_3.9_2.7.1 @@ -0,0 +1 @@ +2.7.1-0-g3ac498c9f diff --git a/versions/alpine_3.9_2.7.2 b/versions/alpine_3.9_2.7.2 new file mode 100644 index 0000000..63b9bd4 --- /dev/null +++ b/versions/alpine_3.9_2.7.2 @@ -0,0 +1 @@ +2.7.2-0-g4d8c06890 diff --git a/versions/alpine_3.9_2.7.3 b/versions/alpine_3.9_2.7.3 new file mode 100644 index 0000000..ce6aec8 --- /dev/null +++ b/versions/alpine_3.9_2.7.3 @@ -0,0 +1 @@ +2.7.3-0-gdddf926c3 diff --git a/versions/alpine_3.9_2.8 b/versions/alpine_3.9_2.8 new file mode 100644 index 0000000..9181f8d --- /dev/null +++ b/versions/alpine_3.9_2.8 @@ -0,0 +1 @@ +2.8.4-0-g47e6bd362 diff --git a/versions/alpine_3.9_2.8.0 b/versions/alpine_3.9_2.8.0 new file mode 100644 index 0000000..b2ff29b --- /dev/null +++ b/versions/alpine_3.9_2.8.0 @@ -0,0 +1 @@ +2.8.0-0-gefc30ccf8 diff --git a/versions/alpine_3.9_2.8.1 b/versions/alpine_3.9_2.8.1 new file mode 100644 index 0000000..8d4caa2 --- /dev/null +++ b/versions/alpine_3.9_2.8.1 @@ -0,0 +1 @@ +2.8.1-0-ge2a1ec0c2 diff --git a/versions/alpine_3.9_2.8.2 b/versions/alpine_3.9_2.8.2 new file mode 100644 index 0000000..e2af2f4 --- /dev/null +++ b/versions/alpine_3.9_2.8.2 @@ -0,0 +1 @@ +2.8.2-0-gfc96d10f5 diff --git a/versions/alpine_3.9_2.8.3 b/versions/alpine_3.9_2.8.3 new file mode 100644 index 0000000..b97ffcf --- /dev/null +++ b/versions/alpine_3.9_2.8.3 @@ -0,0 +1 @@ +2.8.3-0-g01023dbc2 diff --git a/versions/alpine_3.9_2.8.4 b/versions/alpine_3.9_2.8.4 new file mode 100644 index 0000000..9181f8d --- /dev/null +++ b/versions/alpine_3.9_2.8.4 @@ -0,0 +1 @@ +2.8.4-0-g47e6bd362 diff --git a/versions/alpine_3.9_2.9.0 b/versions/alpine_3.9_2.9.0 new file mode 100644 index 0000000..302c949 --- /dev/null +++ b/versions/alpine_3.9_2.9.0 @@ -0,0 +1 @@ +2.9.0-0-g15bbdab92 diff --git a/versions/alpine_3.9_2.x b/versions/alpine_3.9_2.x new file mode 100644 index 0000000..9181f8d --- /dev/null +++ b/versions/alpine_3.9_2.x @@ -0,0 +1 @@ +2.8.4-0-g47e6bd362 diff --git a/versions/centos_7_1.x b/versions/centos_7_1.x new file mode 100644 index 0000000..a296e63 --- /dev/null +++ b/versions/centos_7_1.x @@ -0,0 +1 @@ +1.10.12-0-g7f88f54fe diff --git a/versions/centos_7_2.10.2 b/versions/centos_7_2.10.2 new file mode 100644 index 0000000..7e8aa6a --- /dev/null +++ b/versions/centos_7_2.10.2 @@ -0,0 +1 @@ +2.10.2-1.el7 diff --git a/versions/centos_7_2.10.3 b/versions/centos_7_2.10.3 new file mode 100644 index 0000000..64b68c7 --- /dev/null +++ b/versions/centos_7_2.10.3 @@ -0,0 +1 @@ +2.10.3-1.el7 \ No newline at end of file diff --git a/versions/centos_7_2.10.4 b/versions/centos_7_2.10.4 new file mode 100644 index 0000000..f5ad1fa --- /dev/null +++ b/versions/centos_7_2.10.4 @@ -0,0 +1 @@ +2.10.4-1.el7 diff --git a/versions/centos_7_2.x b/versions/centos_7_2.x new file mode 100644 index 0000000..b97ffcf --- /dev/null +++ b/versions/centos_7_2.x @@ -0,0 +1 @@ +2.8.3-0-g01023dbc2 diff --git a/versions/ubuntu_20.04_2.10.2 b/versions/ubuntu_20.04_2.10.2 new file mode 100644 index 0000000..e9f3a8c --- /dev/null +++ b/versions/ubuntu_20.04_2.10.2 @@ -0,0 +1 @@ +2.10.2.gb924f0b4a-1 diff --git a/versions/ubuntu_20.04_2.10.3 b/versions/ubuntu_20.04_2.10.3 new file mode 100644 index 0000000..611af53 --- /dev/null +++ b/versions/ubuntu_20.04_2.10.3 @@ -0,0 +1 @@ +2.10.3.g8aca8a19a-1 \ No newline at end of file diff --git a/versions/ubuntu_20.04_2.10.4 b/versions/ubuntu_20.04_2.10.4 new file mode 100644 index 0000000..5a4a6c6 --- /dev/null +++ b/versions/ubuntu_20.04_2.10.4 @@ -0,0 +1 @@ +2.10.4.g816000e10-1