dragonfly/tools/packaging
Roman Gershman c37fe87bf1
chore: update our container distributions versions (#2983)
1. Restrict build context in our dev/weekly builder to ease development iterations.
2. Switch weekly build to debian 12-slim because it's smaller than 24.04
3. Update our prod releases to use ubuntu 22.04

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-05-01 11:34:23 +03:00
..
debian
rpm
Dockerfile.alpine-dev Chore: Fixed Docker Health Check (#2659) 2024-03-04 12:47:18 +02:00
Dockerfile.ubuntu-dev chore: update our container distributions versions (#2983) 2024-05-01 11:34:23 +03:00
Dockerfile.ubuntu-prod chore: update our container distributions versions (#2983) 2024-05-01 11:34:23 +03:00
generate_changelog.sh
generate_debian_package.sh fix: release pipeline (#2439) 2024-01-18 16:52:19 +02:00
README.md

Installation Packages

Overview

This directory includes a set of files and scripts to build installation package for various Linux distributions.

Debian

The file to build the Debian package all located under "debian" directory. The resulting package will install the binary of Dragonfly as well as generate a new service entry for dragonfly, that can be controlled with "systemctl" command, to start, stop and check status of.

Building

To build the package, you have a script called "generate_debian_package.sh". This script accepts the following parameters:

  • Optional binary path - the location from which to take the binary for the installation. The default for this is "repo path/build-opt". The location to which the resulting package is writing is at the location from which the script is executed. This script is depends on the following packages:
  • git
  • moreutils
  • debhelper
  • dpkg-dev

To build:

/path/to/dragonfly/tools/packaging/generate_debian_package.sh [/path/to/dragonfly-binary-file]

This can only be run on Debian based hosts. You can use the flowing docker file to generate this package:

FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update -y && apt-get install -y gcc dpkg-dev gpg vim wget git moreutils debhelper

Build the above docker and then run it with your dragonfly source code path mount as volume for the build:

docker build -t ubuntu-package .
docker run --rm -ti -v /path/to/dragonfly-repo:/mydocker-path ubuntu-package bash

Again note that you need to be at "main" branch to successfully build this package. Note: If at the end of the installation you see a message "/usr/bin/deb-systemd-helper: error: systemctl preset failed on dragonfly.service: No such file or directory", you can ignore it, this seem to be related to the following issue.