Skip to content

tarantool/delivery-checker

Repository files navigation

Current state

Amazon Linux Amazon Linux @ AArch64 Debian Debian @ AArch64 Fedora Fedora @ AArch64 RHEL/CentOS RHEL/CentOS @ AArch64 Ubuntu Ubuntu @ AArch64 RED OS

About Delivery Checker

This is a program that downloads Tarantool's installation commands and tries to run them on different OS.

Running Delivery Checker

Setting up the environment

  1. Install Python 3.6 or higher;
  2. Make Python virtual environment and install Python libraries:
python3 -m venv venv
venv/bin/pip install --upgrade pip
venv/bin/pip install -r requirements.txt
  1. Install Docker or/and VirtualBox;
  2. Import necessary VMs in VirtualBox;
  3. Copy config-example.json to config.json and change it if necessary (e.g. to add TG token), full config you can see below.

Running manually

  1. Run check.py to check installation;
  2. Run bot.py to run the Telegram bot.

Checking a development server

Delivery checker gets configurations and commands from a server in the form of a JSON. The source URL is set in the config.json file:

  "commands_url": "https://www.tarantool.io/api/tarantool/info/versions/",

Delivery checker can run against a development server or even localhost. Just change the URL:

  "commands_url": "http://localhost/api/tarantool/info/versions/",

For development servers, also provide user and password for basic authentication:

  "commands_url": "https://devx1.d.tarantool.io/api/tarantool/info/versions/",
  "commands_url_user": "user",
  "commands_url_pass": "pass",

Telegram bot service

To manage Telegram bot service, you can use service.sh script. It has install, start, stop and uninstall commands. For example, to install service, just run this command:

./service.sh install

Configuring automatic runs

Scripts run_check.sh and run_bot.sh provide some run options and log management. They're intended to be used for "production" runs.

To run checks and bot automatically, you can use cron like this:

crontab -e
# Put this to crontab config (replace working directory with yours):
# 0 9,19 * * * /bin/bash ${DELIVERY_CHECKER_WORKDIR}/run_check.sh -f
# TG bot sometimes freezes, so you can add this (replace bot name with yours):
# */15 * * * * sudo systemctl restart ${DELIVERY_CHECKER_BOT_NAME}

Configuration options

You can find all available config options in file config-full.json.

Example of output

For example, you can have output like this:

OS: freebsd_12.2. Build: pkg_2.4. Elapsed time: 95.85. OK
OS: freebsd_12.2. Build: ports_2.4. Elapsed time: 355.99. TIMEOUT
OS: amazon-linux_2. Build: script_2.5. Elapsed time: 85.43. ERROR
OS: amazon-linux_2. Build: script_1.10. Elapsed time: 88.83. ERROR
OS: mac-os_11.0. Build: 2.5. SKIP
OS: mac-os_11.0. Build: 2.6. Elapsed time: 521.86. OK
OS: docker-hub_2.5. Build: 2.5. Elapsed time: 122.72. OK

In this case, the process finished with exit code 1 because there are some errors.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published