docs: Update getting started documentation

Currently the getting started documentation is somewhat incorrect:
usage of pip3 install is not necessary as "regular" usage of
pegleg entails using ./tools/pegleg.sh which uses the Pegleg
Docker image.

Also, the CLI guide doesn't include any useful examples so some
have been added.

Change-Id: I851b1c8b4f9c38672fce7b4a017e31882c7006ea
Depends-On: Iaa928ec2f777ed6f899d3b1790f5f9de613da9bb
This commit is contained in:
Felipe Monteiro 2018-09-13 16:29:38 +01:00
parent 73fbf264ca
commit d80aa0bd8f
2 changed files with 34 additions and 8 deletions

View File

@ -19,7 +19,15 @@ Pegleg CLI
==========
The Pegleg CLI is used in conjunction with the script located in pegleg/tools
called pegleg.sh.
called ``pegleg.sh``.
.. note::
The default workspace for the ``pegleg.sh`` script is ``/workspace``. The
examples below require that this workspace be used.
Environment Variables
=====================
::
@ -33,6 +41,9 @@ called pegleg.sh.
Example: $IMAGE=quay.io/attcomdev/pegleg:latest
Usage
=====
To run:
.. code-block:: console
@ -41,6 +52,25 @@ To run:
export IMAGE=<docker_image>
./pegleg.sh <command> <options>
For example:
.. code-block:: console
cd /opt/airship-pegleg
export WORKSPACE=/opt/airship-treasuremap
./tools/pegleg.sh site -r /workspace --help
.. note::
If ``sudo`` permissions are required to execute ``pegleg.sh``, then it is
necessary to use the ``-E`` flag with ``sudo`` in order for the current
environment to be used. For example:
.. code-block:: console
cd /opt/airship-pegleg
export WORKSPACE=/opt/airship-treasuremap
sudo -E ./tools/pegleg.sh site -r /workspace --help
CLI Options
===========

View File

@ -40,11 +40,7 @@ Before using Pegleg, you must:
git clone https://git.airshipit.org/airship-pegleg
2. Install the required packages in airship-pegleg/src/bin/pegleg:
.. code-block:: console
pip3 install -r airship-pegleg/src/bin/pegleg/requirements.txt -r airship-pegleg/src/bin/pegleg/test-requirements.txt
2. Install `Docker CE`_, as Pegleg relies on it for CLI execution.
3. Clone the repos containing your `site definition libraries`_ into the
local filesystem where Pegleg is running, as Pegleg can only work with files
@ -54,6 +50,6 @@ You will then be able to use all of Pegleg's features through the CLI. See CLI_
information.
.. _Document Fundamentals: https://airship-pegleg.readthedocs.io/en/latest/authoring_strategy.html
.. _CLI: https://airship-pegleg.readthedocs.io/en/latest/cli.html
.. _Deckhand: https://airship-deckhand.readthedocs.io/en/latest/
.. _Docker CE: https://docs.docker.com/install/
.. _site definition libraries: https://airship-pegleg.readthedocs.io/en/latest/artifacts.html#definition-library-layout
.. _CLI: https://airship-pegleg.readthedocs.io/en/latest/cli.html