Skip to content

Getting started with Composer

peasoupio edited this page Dec 14, 2020 · 8 revisions

0. Wait,... wait, why would I use Composer in the first place?

Composer allow you to interactively work with your ecosystem.
Mostly, you will be able to work on either a full OR a subset of your ecosystem.
It is up to you.
Also, Composer is somewhat of a lighter abstraction of your ecosystem.
You must not need technical expertise on a particular piece of the ecosystem (INV) to use it. So basically:

  • Manage a subset of your ecosystem instead of the whole thing;
  • Easy to use for technical newbies;
  • Follow your ecosystem with a cyclic promoting mechanism.

1. Booting the example Composer environment

To follow the explanation, you can use this init.groovy along the command inv init [location of init.groovy]:

repo {
 name "main"

 src "https://github.com/peasoupio/inv.git"

 hooks {
  init """
git clone ${src} ./gitExtract

mkdir .repos
mv ./gitExtract/examples/composer/.repos/* ./.repos
mv ./gitExtract/examples/composer/run.txt ./run.txt

rm -rf ./gitExtract
"""

  pull """
        echo pulled!
        """
 }
}

Upon executing the command, you should see this output on your terminal:

Checking for 'run.txt'...
Not present right now.
Ready and listening on http://localhost:8080

2. Go to http://localhost:8080 (default address)

By default, you should see this view: Composer default view
NOTE: This popup will show when no 'run'txt is present on your current INV_HOME (where Composer booted)

and then
Composer default view #2

Composer uses steps to mark progression from choosing to promoting.

3. The step-selector

Composer step selector The step selector does not block upon validations.
You can go from the first to the last step in one go without doing anything.
Make sure you use it properly.