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

Tutorial Part 6

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

Previous: Installing and deploying snapshot and release configuration bundles

Installing and starting the coordinator and the agent

In the previous chapters of the tutorial, all the necessary preliminaries to set up airship were done.

  • A local environment for airship service installation was created
  • Configuration for coordinator and agent was set up
  • Configuration bundles were released and installed.

Now it is time to install the coordinator and agent binary. This tutorial uses a released version of airship, so the binaries are available from Maven Central. When using a development or unreleased version, the binaries would either need to be deployed to the repository server or available in the local repository.

Installing airship services into the local environment

With configuration and binary available, airship can now deploy coordinator and agent into the local environment:

airship --batch install io.airlift.airship:airship-coordinator:0.13 @io.airlift.airship.tutorial:local-coordinator:1
uuid  host       machine  status   binary                    config                
22d9  localhost  local    STOPPED  airship-coordinator:0.13  @local-coordinator:1

airship --batch install airship-agent:0.13 @local-agent:1
uuid  host       machine  status   binary              config          
1b5c  localhost  local    STOPPED  airship-agent:0.13  @local-agent:1

airship show
uuid  host       machine  status   binary                    config                
22d9  localhost  local    STOPPED  airship-coordinator:0.13  @local-coordinator:1
1b5c  localhost  local    STOPPED  airship-agent:0.13        @local-agent:1

Note: Without the --batch option, airship will ask for confirmation for each service installation.

The first install command uses the full GAV (groupId:artifactId:version) triple to install the coordinator and its configuration. The second command omits the groupId. In this case, the group id is resolved using the maven-default-group-id settings that were given when the local environment was installed. For any other environment, the groups in the coordinator.default-group-id of the coordinator are used.

When listing services using airship show, binary and configuration artifacts will be shortened if they use a groupId that is configured as a default group id.

Starting airship services

Once the services are successfully installed, they can now be started.

airship --batch start -u 22d9
uuid  host       machine  status   binary                    config                
22d9  localhost  local    RUNNING  airship-coordinator:0.13  @local-coordinator:1

airship start -b airship-agent
uuid  host       machine  status   binary              config          
1b5c  localhost  local    STOPPED  airship-agent:0.13  @local-agent:1

Are you sure you would like to START these servers? [Y/n] y

uuid  host       machine  status   binary              config          
1b5c  localhost  local    RUNNING  airship-agent:0.13  @local-agent:1

airship show
uuid  host       machine  status   binary                    config                
22d9  localhost  local    RUNNING  airship-coordinator:0.13  @local-coordinator:1
1b5c  localhost  local    RUNNING  airship-agent:0.13        @local-agent:1

The first form of the airship start command uses the service uuid (22d9) to select and start the coordinator. The second form uses the name of the binary (airship-agent). More details about selectors available with the start command can be displayed using airship help start.

The subsequent airship show command now reports both services as RUNNING.

Next: Odds and ends