Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Tutorial Part 2

Henning Schmiedehausen edited this page Jun 29, 2014 · 1 revision

Previous: Introduction

Installing a local airship environment

Any airship installation must have a single coordinator and agents. For a local (non-cloud) install, agents are installed on each machine that should run services.

Airship environments

The coordinator and agent are packaged up as airship installable services. Therefore, they can be installed using the airship command line itself into a minimal airship environment. The services installed into that environment will then manage the actual installed (non-airship) services.

Each machine has, in addition to the main environment, a second, minimal environment installed which holds the agent and may hold a coordinator. It is usually called local.

This minimal environment has no dedicated coordinator and agent. For this environment, coordinator and agent are actually part of the command line client.

Provision the local environment

The airship environment provision-local command creates the minimal environment for airship:

airship environment provision-local local ~/.airship \
    --name main \
    --maven-default-group-id io.airlift.airship \
    --maven-default-group-id io.airlift.airship.tutorial \
    --repository file:${HOME}/.m2/repository \
    --repository http://repo.maven.apache.org/maven2

The first parameter of the command (local) sets the name for the minimal environment.

The second parameter chooses the install location for the minimal environment on the file system. Everything that airship installs on the machine will be located in this folder. The default is ~/.airship.

The --maven-default-group-id option defines groupIds for downloading binaries and configuration so that it can be omitted when installing services into the minimal environment. The io.airlift.airship option is used for the airship coordinator and agent binaries. For configuration, an organization-specific group id should be chosen. For this tutorial and strictly local files, the given group id (io.airlift.airship.tutorial) is sufficient.

Note: This configures a local environment using a local repository and Maven Central. This is sufficient for this tutorial. When setting up a production environment, the repository lines should use the Release and Snapshot download URLs.

    --repository <<Release Download Repository URL>> \
    --repository <<Snapshot Download Repository URL>>

If the Release and Snapshot Download Repository URLs are the same, then the --repository option must be given only once.

Checking the local environment

The successful installation can be checked by running the commands to list all installed services: airship show and to list all available agents: airship agent.

airship show
No slots match the provided filters.

airship agent
uuid  host       machine  status  type   location
loca  localhost  local    ONLINE  local  /local/agent

Provisioning a local environment creates a config file, .airshipconfig in the home of the current user:

cat ~/.airshipconfig
environment.local.name = local
environment.local.coordinator = /home/henning/.airship
environment.local.repository = file:/home/henning/.m2/repository
environment.local.repository = http://repo.maven.apache.org/maven2
environment.local.maven-group-id = io.airlift.airship
environment.local.maven-group-id = io.airlift.airship.tutorial
environment.default = local

Removing this config file and the folder referenced in the environment.local.coordinator property completely removes the airship installation.

Next: Building a local configuration repository