Akd Nomenclature

Here is a list of words used by Akd and their definitions:

Destination

An abstraction of user, host and path. This is where a command or a set of command is to be ran. This can be a local machine, a server, a docker container or a virtual box.

User

The user through which one will ssh to the destination.

Host

The ip-address of the destination where a command is to be ran.

Path

The path of the destination where a command is to be ran.

Local

:local is what host defaults to. It means that the commands must be run on the same machine.

Operation

An abstraction around a set of commands, with their environments and destination.

Commands

These are a list of strings which represent the commands which need to be ran at some destination.

Command Envs

These are a list of tuples. The first element of the tuple is the key to the environment and the second element is the value of that environment in the context of the commands.

Destination

This is the destination where these commands are to be run.

Hook

A Hook is a way to encapsulate a set of operations and call them in some organized way.

Main

Main is a list of operations which are called when a hook is executed.

Ensure

Ensure is a list of operations which are called when the main list of hook is done executing. Ensure is like ensure in computer science, where it is called independent of whether main was a success or not. This could contain a set of cleanup operations.

Rollback

Rollback is called when a list of hooks called together failed. It is intended to cancel the effects of the main.

Ignore Failure

When this hook is called with a list of hooks as a Deployment, and ignore_failure is true, then the deployment continues wven when this hook fails.

Run Ensure

If true, then ensure commands are ran. Defaults to true

Hook Modules

Hook modules use Akd.Dsl.FormHook DSL provided by akd. They are either provided by akd or can be generated by akd generators.

Native Hook Types

These are the hook types (phases) that akd supports by default.

Fetch

This is the hook which attempts to fetch the source-code which corresponds to a release (deployed app). This can be done using git, svn or even scp.

Init

In this phase akd initializes and configures the libraries required for the rest of the deployment process. For an elixir app, it can be configuring distillery or docker.

Build

In this phase akd produces a deployable entity. It can be a binary produced by distillery or source code itself or even a docker image.

Publish

In this phase akd publishes/deploys the app to the desired destination. This can be done by scp, cp etc.

Stop

In this phase akd stops a previously running instance of the app. (This is not required for zero downtime apps)

Start

In this phase akd starts a newly deployed instance of the app.

Deployment

This is abstraction around a deployment of an elixir app.

Name

This is the name of the node that will be published.

Vsn

This is the desired version of the app which is to be deployed.

Mix Environment

This is the mix environment in which the app will be built.

Build At

This is the destination where the app will be built.

Publish To

This is the destination where the built app will be published.

Pipeline

This consists of an ordered list of hooks.