Add detailed instructions to setup builder 60/10960/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 2 Jun 2018 04:44:57 +0000 (00:44 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 2 Jun 2018 04:45:20 +0000 (00:45 -0400)
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 <thanh.ha@linuxfoundation.org>
docs/index.rst
docs/usage.rst

index ca18356..74c4a99 100644 (file)
@@ -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
 ==================
index 4c8233e..d64c583 100644 (file)
@@ -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
 ==============================