From: Thanh Ha Date: Sat, 2 Jun 2018 04:44:57 +0000 (-0400) Subject: Add detailed instructions to setup builder X-Git-Tag: v0.1.0~28 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=7f5a5bf777b684b0fcc800f0cb1981abf1586b1d;p=releng%2Fcommon-packer.git Add detailed instructions to setup builder Provide minimal steps to setup an initial builder template. Fix broken index link to the usage page. Change-Id: Ife7c6436b2fd08c356ec0cee632fed6867c83eea Signed-off-by: Thanh Ha --- diff --git a/docs/index.rst b/docs/index.rst index ca18356..74c4a99 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,7 +8,7 @@ projects as a central way to maintain and manage common VM configuration. :maxdepth: 1 install - user-guide + usage Indices and tables ================== diff --git a/docs/usage.rst b/docs/usage.rst index 4c8233e..d64c583 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -17,6 +17,24 @@ Distribution specific vars are now provided in 'common-packer/vars/$DISTRO'. Path to them as normal and they will already contain the correct strings. For a new project make sure the base_image name is available in the cloud system. +.. _setup-template: + +Setup packer template +===================== + +This setups up a builder image for use in a project. Repeat for any other +templates provided by common-packer as necessary. + +.. code-block:: bash + + # Instructions assume the working directory is the ci-management repo root + cd packer + mkdir provision templates + ln -rs common-packer/templates/builder.json templates/builder.json + cp common-packer/provision/local-builder.yaml provision/local-builder.yaml + +.. _custom-template: + Example template design and run =============================== @@ -45,6 +63,8 @@ Example provisioning script: .. literalinclude:: ../provision/docker.yaml :language: yaml +.. _install-from-ansible-galaxy: + Install Roles from Ansible Galaxy ================================= @@ -54,6 +74,8 @@ install common-packer role dependencies. In the local ci-management/packer directory a project can provide it's own requirements.yaml to pull in roles before running a Packer build. +.. _local-testing: + Local testing of common-packer ==============================