All Projects → 18Months → distillery_packager

18Months / distillery_packager

Licence: MIT license
Elixir lib for creating Debian and RPM packages with Distillery

Programming Languages

elixir
2628 projects
shell
77523 projects
HTML
75241 projects

Projects that are alternatives of or similar to distillery packager

Short url
🔗 short url app elixir Phoenix
Stars: ✭ 162 (+548%)
Mutual labels:  phoenix-framework
admissions
Admissions is the gateway to Elixir School's private Slack
Stars: ✭ 18 (-28%)
Mutual labels:  phoenix-framework
phoenix-jsroutes
Javascript routing for the phoenix framework
Stars: ✭ 25 (+0%)
Mutual labels:  phoenix-framework
Phoenix Toggl
Toggl tribute done with Elixir, Phoenix Framework, React and Redux.
Stars: ✭ 176 (+604%)
Mutual labels:  phoenix-framework
elixir cluster
Distributed Elixir Cluster on Render with libcluster and Mix Releases
Stars: ✭ 15 (-40%)
Mutual labels:  distillery
phxsockets.io
Phoenix sockets and channels GUI client
Stars: ✭ 16 (-36%)
Mutual labels:  phoenix-framework
Ember Phoenix
Phoenix Framework integration and tooling for Ember.js apps
Stars: ✭ 140 (+460%)
Mutual labels:  phoenix-framework
phoenix-channel-client
A Phoenix Channels client library for Elixir.
Stars: ✭ 20 (-20%)
Mutual labels:  phoenix-framework
phoenix-cms
Headless CMS fun with Phoenix LiveView and Airtable
Stars: ✭ 72 (+188%)
Mutual labels:  phoenix-framework
zero-to-graphql-using-elixir
The purpose of this example is to provide details as to how one would go about using GraphQL with the Elixir Language.
Stars: ✭ 20 (-20%)
Mutual labels:  phoenix-framework
Phoenix And Elm
Example application using Elixir, Phoenix and Elm
Stars: ✭ 188 (+652%)
Mutual labels:  phoenix-framework
Phoenix Trello
Trello tribute done in Elixir, Phoenix Framework, React and Redux.
Stars: ✭ 2,492 (+9868%)
Mutual labels:  phoenix-framework
pokerex client
Elm client for PokerEx project
Stars: ✭ 39 (+56%)
Mutual labels:  phoenix-framework
Tune
A streamlined Spotify client and browser with a focus on performance and integrations.
Stars: ✭ 166 (+564%)
Mutual labels:  phoenix-framework
live dj
💿 Join or create video playlists to share a real-time experience with others! 🎧
Stars: ✭ 19 (-24%)
Mutual labels:  phoenix-framework
Docker Phoenix
A dockerized Phoenix development and runtime environment.
Stars: ✭ 152 (+508%)
Mutual labels:  phoenix-framework
phoenix assets webpack
Asset Pipeline with Webpack on Phoenix
Stars: ✭ 52 (+108%)
Mutual labels:  phoenix-framework
sublime-phoenix-beagle
Sublime Text plugin to make development with Phoenix Framework better!
Stars: ✭ 22 (-12%)
Mutual labels:  phoenix-framework
gringotts payment
Demo Phoenix app showing gringotts payment library integrations.
Stars: ✭ 24 (-4%)
Mutual labels:  phoenix-framework
rent-bot
My personal Facebook Messenger chat bot that helped find an apartment to rent.
Stars: ✭ 91 (+264%)
Mutual labels:  phoenix-framework

Distillery Packager

Coverage Status Build Status

Elixir lib for creating Debian and RPM packages with Distillery.

Features

  1. Able to build Debian packages
    1. With control file
    2. With customizable pre/post install/remove scripts
    3. With capability to add custom files/scripts to the package
  2. Able to build RPM packages
  3. Automatically builds init scripts, which are all customizable, for:
    1. Systemd
    2. Upstart
    3. SysVinit

Required OS dependencies

Before using distillery_packager, you'll need the following packages installed and in your path:

  • tar (or gtar if you're on a mac - you can brew install gnu-tar if you don't already have it)
  • ar
  • uname

Installation

Add distillery_packager to your list of dependencies in mix.exs:

def deps do
  [{:distillery_packager, "~> 1.0"}]
end

General configuration

Distillery_packager relies on the following data in the mix.exs file being set:

defmodule Testapp.Mixfile do
   use Mix.Project

   def project do
      [app: :testapp,
      version: "0.0.1",
      elixir: "~> 1.7",
+     description: "Elixir lib for creating linux packages with Distillery",
      build_embedded: Mix.env == :prod,
      start_permanent: Mix.env == :prod,
-     deps: deps()]
+     deps: deps(),
+     deb_package: deb_package()]
   end

Debian package configuration

The deb_package function must be set as:

def deb_package do
   [
      vendor: "18Months S.r.l.",
      maintainers: ["18Months <[email protected]>"],
      homepage: "https://www.18months.it",
      base_path: "/opt",
      external_dependencies: [],
      maintainer_scripts: [
         pre_install: "rel/distillery_packager/debian/install_scripts/pre_install.sh",
         post_install: "rel/distillery_packager/debian/install_scripts/post_install.sh",
         pre_uninstall: "rel/distillery_packager/debian/install_scripts/pre_uninstall.sh"
      ],
      config_files: ["/etc/init/.conf"],
      additional_files: [{"configs", "/etc/distillery_packager/configs"}],
      owner: [user: "root", group: "root"]
   ]
end

A list of configuration options you can add to deb_package/0:

  • vendor
    • String
    • The distribution vendor that's creating the debian package. I normally just put my name or company name.
  • maintainers
    • Array of Strings
    • Should be in the format name <email>
  • homepage
    • String
    • Should be in the format https://www.18months.it
  • base_path
    • String
    • The base path where the package will be installed in the destination host.
  • external_dependencies
    • Array of Strings
    • Should be in the format of package-name (operator version_number) where operator is either <<, <=, =, >=, or >> - read more about this here.
  • maintainer_scripts
    • A keyword list of Strings
    • The keyword should be one of: :pre_install, :post_install, :pre_uninstall, or :post_uninstall
    • The keyword should point to the path of a script you want to run at the moment in question.
  • config_file
    • Array of Strings
    • Should contain the absolute path of the config file to be overwritten.
  • additional_files
    • List of Tuples
    • Should contain the relative path of the source folder in the first position of the tuple. All files present in the source folder will be copied to the destination folder.
    • Should contain the path of the destination folder, relative to the target system where the package will be installed, in the second position of the tuple.
    • Source path here should be specified excluding the base path "rel/distillery_packager/debian/additional_files" in your project. A dedicated generator can be used to setup base path, for further details refer to the section below.
  • owner
    • A keyword list of Strings
    • If set, requires both user and group keys to be set.
    • This is used when building the archive to set the correct user and group
    • Defaults to root for user & group.
  • package_name
    • String
    • Specify a custom .deb package name, overriding the default which is based on the OTP release name

Distillery configuration

You can build a deb by adding plugin DistilleryPackager.Plugin to your rel/config.exs file.

You can also specify target distribution and architecture with plugin DistilleryPackager.Plugin, %{distribution: "xenial", architecture: "amd64"}

The name and version is taken from the rel/config.exs file.

Usage

Base path

You can generate the base path for additional files to be added to the package with:

mix release.deb.prepare_base_path

Customising deb config files

You can customise the debs that are being built by copying the template files used and modifying them:

mix release.deb.generate_templates

Build

Packages are build with the mix distillery.release command built in Distillery. Built packages will be moved to rel/distillery_packager/debian/packages

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].