-
Notifications
You must be signed in to change notification settings - Fork 14
Tutorial Part 3
Previous: Installing a local airship environment
The agent and coordinator binaries are available through Maven Central. The necessary configuration must be created locally (and then stored for installation).
A configuration repository is a git repository and every branch in the repository is a separate configuration bundle. The asconfig
tool can be used to create configuration repositories and bundles.
Setting up a local repository is done with the asconfig
tool. It creates the git structure and initializes the repository with metadata.
cd $HOME
mkdir -p airship/config
cd airship/config
asconfig init --groupId io.airlift.airship.tutorial
This sets up a local configuration repository for this tutorial.
Settings for the asconfig init
command are stored in the repository as .metadata
on the master
branch.
The asconfig info
command can display this information:
asconfig info
Metadata Group Id: io.airlift.airship.tutorial
No releases repository configured, only local install possible.
No snapshots repository configured, only local install possible.
The resulting configuration repository has two initial branches: master
and template
. These are used by asconfig
and should not be modified by hand.
NOTE: A configuration repository is not very useful if you can not publish configuration to a repository server. To be able to do that, repositories for snapshots and releases must be given when creating the local configuration repository. If a repository server is available, the local configuration repository should be initialized with the following command instead:
asconfig init \
--groupId io.airlift.airship.tutorial \
--releasesRepository releases \
--releasesRepositoryUri '<<Release upload repository URL>>' \
--snapshotsRepository snapshots \
--snapshotsRepositoryUri '<<Snapshot upload repository URL>>'
If the upload repositories require credentials, these must be stored in the ~/.m2/settings.xml
file as <server>
entries. The id fields for the servers must match the --releaseRepository
and --snapshotRepository
ids. If the same repository server is used for releases and snapshots, both parameters may take the same value.
NOTE: The release and snapshot repository settings only became optional after the 0.13 release of airship. When using 0.13 or earlier for this tutorial and no repository server is available, the local configuration repository can be setup to use local folders as its 'remote repositories':
cd $HOME
mkdir -p airship/config airship/snapshots airship/releases
cd airship/config
asconfig init \
--groupId io.airlift.airship.tutorial \
--releasesRepository releases \
--releasesRepositoryUri file:$HOME/airship/releases \
--snapshotsRepository snapshots \
--snapshotsRepositoryUri file:$HOME/airship/snapshots
Create a new configuration for the local airship coordinator:
cd ~/airship/config
asconfig add local-coordinator
Create a new configuration for the local airship agent:
cd ~/airship/config
asconfig add local-agent
There are now four branches in the configuration git repository:
git branch -a
* local-agent
local-coordinator
master
template
The configuration repository can be manipulated with regular git commands, cloned, pushed etc.