Install golang 1.12 using ansible role from galaxy 90/2090/2
authorLott, Christopher (cl778h) <cl778h@att.com>
Fri, 20 Dec 2019 14:26:38 +0000 (09:26 -0500)
committerLott, Christopher (cl778h) <cl778h@att.com>
Fri, 20 Dec 2019 16:10:47 +0000 (11:10 -0500)
Extend the playbook that provisions docker on build minions
to call fubarhouse.golang which downloads and installs golang
as specified by variable go_version.
Also add basic README for this directory.

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I588aad142864d3257cb9255eebc2781ae02cad80

packer/README.md [new file with mode: 0644]
packer/provision/local-docker.yaml

diff --git a/packer/README.md b/packer/README.md
new file mode 100644 (file)
index 0000000..b31fa95
--- /dev/null
@@ -0,0 +1,35 @@
+# CI Packer
+
+[Packer][1] is a tool for automatically creating VM and container images,
+configuring them and post-processing them into standard output formats.
+
+## Building
+
+You'll need to [install Packer][2], of course.
+
+The Packer configuration is divided into build-specific variables,
+output-specific templates and a set of shared provisioning scripts. To do a
+specific build, combine the template for the desired output artifact type with
+a variable file. To build a new basebuild instance the following would be done:
+
+```
+packer build -var-file=vars/cloud-env.json -var-file=vars/centos.json templates/basebuild.json
+```
+
+**NOTE:** vars/cloud-env.json is a gitignored file as it contains private
+information. There is a vars/cloud-env.json.example file that may be used as a
+base for creating the one needed.
+
+This would build a bootable image in the project's CI cloud environment.
+
+From a high level, the builds:
+
+* Boot a specified base image in the cloud
+* Run a set of shell scripts, listed in the template's shell provisioner
+  section, to do any configuration required by the builder.
+* Execute a shutdown of the running instance
+* Execute a 'nova image-create' operation against the shutdown instance.
+* Perform a 'nova delete' operation against the shutdown instance.
+
+[1]: https://www.packer.io/
+[2]: https://www.packer.io/intro/getting-started/install.html
index d47fd16..e75a0fa 100644 (file)
@@ -1,3 +1,5 @@
+# This Ansible playbook adds packages to the
+# O-RAN-SC build minion image that has Docker.
 ---
 - import_playbook: ../common-packer/provision/docker.yaml
 
@@ -16,3 +18,8 @@
     - name: 'Install PackageCloud'
       command: 'gem install package_cloud'
       become: true
+
+    - include_role:
+        name: fubarhouse.golang
+      vars:
+        go_version: 1.12