releng/common-packer.git
6 years agoAdd release notes and required upgrade info 43/15343/2
Andrew Grimberg [Fri, 19 Apr 2019 18:19:02 +0000 (11:19 -0700)]
Add release notes and required upgrade info

New options for volume attachment means a requirement of packer v1.3.2
is now the minimum supported by common-packer

Change-Id: I1c352d054a01cd14bce365c5a17e3467dff6d25a
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
6 years agoFix volume options 36/15336/1
Andrew Grimberg [Fri, 19 Apr 2019 04:41:02 +0000 (21:41 -0700)]
Fix volume options

Change I358c414adb49bba9349f30a1190c2f8b90f13d14 had a few issues. Of
note, packer variables can only be strings, even if they get
interpolated to booleans where needed.

Additionally the volume format can only be specified if
use_block_storage is true and we default to false. This means that if
volume storage is being set then the volume format must be set and it
needs to be set to raw!

Finally, the windows builder did not contain all the extra variables
being defined.

Change-Id: Icb2de795f0ba185a2d758123ec5dd705c86d8980
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
6 years agoEnable selection of instance knobs 33/15333/1
Andrew Grimberg [Thu, 18 Apr 2019 19:56:34 +0000 (12:56 -0700)]
Enable selection of instance knobs

We now operate in multiple Openstack clouds (even if from the same
provider) and thus need to properly enable selectability of the region,
availability zone, instance flavor size, and if a volume needs to be
created (and at what size) for builds. We default to our current
standard configuration for Vexxhost Montreal.

If vm_use_block_storage is set true then vm_volume_size will be used
(along with the image_disk_format option which must be "raw"). If it is
false (default) then the volume size and format will be ignored. This is
needed for building on flavors that do not predefine any attached disk
as is the case for all flavors in the SJC cloud for Vexxhost.

Change-Id: I358c414adb49bba9349f30a1190c2f8b90f13d14
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
6 years agoAdd lf-network note regarding ssh-agents 08/10508/4
Trevor Bramwell [Tue, 8 May 2018 01:50:10 +0000 (18:50 -0700)]
Add lf-network note regarding ssh-agents

When building packer images in AWS, I found I wasn't easily able to
provision them with the ssh_proxy configurations without also disabling
my ssh-agent.

Even setting all at once: ssh_agent_auth=false,
ssh_disable_agent_forwarding=true, and passing '-a' to the ssh proxy
command did not help.

Change-Id: I01df33f1e0f52082ce25098d52b5b50bee0dafa3
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
6 years agoUpdate to CentOS 7.6 1811 base image 69/14369/2
Anil Belur [Wed, 30 Jan 2019 12:54:54 +0000 (22:54 +1000)]
Update to CentOS 7.6 1811 base image

The CentOS 7.6 1811 image bundles OpenJDK 11
required for ODL.

Change-Id: I6e34bf69933a90a6a9c1bdd8d1d04ef95a2f5d71
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoRevert "Document ansible min requirement" 40/13540/1 v0.2.0
Anil Belur [Wed, 14 Nov 2018 21:39:43 +0000 (07:39 +1000)]
Revert "Document ansible min requirement"

This reverts commit 60e311b6ad0aa31e22c955fb63c136eeb8844f8c.

As the change If3bcce8f2e0c285609b0efbde293d4e1bf53b787
is reverted, we no longer have a dependency on 2.7 version
of Ansible.

Change-Id: I7d889f9334398d7971d9125831d64e6822b77877
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoUpdate README link to use the lf domain 55/13455/1
Thanh Ha [Mon, 12 Nov 2018 04:32:34 +0000 (12:32 +0800)]
Update README link to use the lf domain

Change-Id: Iac9f441b316296a6fdf17e2031d5f52946e4826b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoDocument ansible min requirement 91/13391/1
Thanh Ha [Wed, 7 Nov 2018 18:35:21 +0000 (02:35 +0800)]
Document ansible min requirement

Patch I9c79063fa21f19356d9b8e0e5f2bb0ca0ed94064 introduced a change
which requires a newer Ansible but missed updating the documenation.

Ref: https://docs.ansible.com/ansible/latest/modules/yum_module.html
Change-Id: Id120b3156aff441b10d20d7ab15b465c7b03371f
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoMerge "Use replace module to update /etc/nsswitch.conf"
Anil Belur [Wed, 7 Nov 2018 11:45:14 +0000 (11:45 +0000)]
Merge "Use replace module to update /etc/nsswitch.conf"

6 years agoDisable apt-daily.* systemd services 18/13218/2
Anil Belur [Sun, 28 Oct 2018 09:40:45 +0000 (19:40 +1000)]
Disable apt-daily.* systemd services

Disable apt-daily.* systemd services that call unattended-upgrades.
Also disable the default configuration for periodic updates.

JIRA: RELENG-1037
Change-Id: Ic9e5e0f8a1543e0d978c0f8528c1a30646a71370
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoUse replace module to update /etc/nsswitch.conf 19/13219/1
Anil Belur [Mon, 29 Oct 2018 02:55:47 +0000 (12:55 +1000)]
Use replace module to update /etc/nsswitch.conf

Use the replace module instead of calling the sed regex
directly from shell.

Change-Id: I2408c49ed2578552c924a484a58979d7b0c24ed6
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoPrevent unattended-upgrades from being installed 87/13187/2
Anil Belur [Thu, 25 Oct 2018 02:41:20 +0000 (12:41 +1000)]
Prevent unattended-upgrades from being installed

Uninstalling unattended-upgrade package is not enough, also mark
the package on hold. This will stop the package being pulled in
on any upgrades.

Change-Id: I8f418c23cb946bdb163805e4412cd33637cc79ae
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoUse pre-commit hook version 1.11.2 88/13188/1
Anil Belur [Thu, 25 Oct 2018 03:22:09 +0000 (13:22 +1000)]
Use pre-commit hook version 1.11.2

The latest version, 1.12.0, is causing problems with the
lf-infra-common-packer-tox-verify-any Jenkins jobs.

Change-Id: Ia9beea08d4f07683acc83a2538ff133c152a5adc
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoMerge "Parse version number from git tags" v0.1.0
Jeremy Phelps [Fri, 19 Oct 2018 15:30:11 +0000 (15:30 +0000)]
Merge "Parse version number from git tags"

6 years agoNote that global-jjb v0.26.0 is required 80/13080/1
Thanh Ha [Thu, 18 Oct 2018 22:02:14 +0000 (18:02 -0400)]
Note that global-jjb v0.26.0 is required

Mention that this version of common-packer requires global-jjb
v0.26.0 first.

Change-Id: I438e52ec6fb332b1c9c2dc10fb2e01c3185d17d5
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoParse version number from git tags 50/13050/3
Thanh Ha [Thu, 18 Oct 2018 15:47:50 +0000 (11:47 -0400)]
Parse version number from git tags

Base documentation version numbers from git tags automatically.

Change-Id: I205b4bb24073de69f135024e9612f9bd28009a93
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoUse reno for release notes 49/13049/2
Thanh Ha [Thu, 18 Oct 2018 15:41:23 +0000 (11:41 -0400)]
Use reno for release notes

After we tag v0.1.0 we will start requiring reno notes moving forward
for patches in this repo.

Change-Id: I0f4aa54c3523197db14f9b9fec46ffe5230c3060
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoRemove OpenStack config found in clouds.yaml 47/12547/2
Thanh Ha [Tue, 11 Sep 2018 22:34:48 +0000 (18:34 -0400)]
Remove OpenStack config found in clouds.yaml

We can now reuse configuration already existing in our clouds.yaml to
run packer builds against instead of duplicating that effort in var
files. Packer added this feature in version 1.2.5.

Packer does not read profiles so we have to explicitly pass
some variables that would normally be pulled from profiles such
as auth_url, user_domain_name, and project_domain_name.

  linuxfoundation:
    profile: vexxhost
    auth:
      auth_url: 'https://auth.vexxhost.net/v3/'
      project_name: abc
      username: 123
      password: v1.2.3
      user_domain_name: Default
      project_domain_name: Default
    region_name: ca-ymq-1

Issue: RELENG-1205
Change-Id: I9f05ec1c430a9261e45dc801e5e5aab52a22cfba
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoBuild and Install zlib 57/11757/16
Thanh Ha [Thu, 12 Jul 2018 19:55:34 +0000 (15:55 -0400)]
Build and Install zlib

zlib libraries are needed to build several open source tools
on Windows.

Issue: RELENG-999
Change-Id: I137a07c3f9269c521f28f6f08d52c60a72bc1c76
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoMerge "Add Ubuntu 18.04 x86_64 var file"
Andrew Grimberg [Wed, 12 Sep 2018 18:33:06 +0000 (18:33 +0000)]
Merge "Add Ubuntu 18.04 x86_64 var file"

6 years agoMerge "Update CentOS 7 and Ubuntu 16.04 images"
Andrew Grimberg [Wed, 12 Sep 2018 18:31:36 +0000 (18:31 +0000)]
Merge "Update CentOS 7 and Ubuntu 16.04 images"

6 years agoAdd vars for ubuntu-16.04-arm64 53/12553/2
Jessica Wagantall [Wed, 12 Sep 2018 03:09:43 +0000 (20:09 -0700)]
Add vars for ubuntu-16.04-arm64

Add vars to support Ubuntu 16.04 with arm64
architecture.

Change-Id: I53dbd5ad76df6d4601c98f2ce57532cfa3ffd4ed
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
6 years agoAdd Ubuntu 18.04 x86_64 var file 96/12396/3
Anil Belur [Sun, 26 Aug 2018 02:17:07 +0000 (07:47 +0530)]
Add Ubuntu 18.04 x86_64 var file

ODL would require supporting Ubuntu 18.04 x86_64 vm soon.

Issue: RELENG-1201
Change-Id: Ie440938e6b7545f1b573d0303885d23a2d9439d5
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoUpdate CentOS 7 and Ubuntu 16.04 images 01/12501/2
Thanh Ha [Fri, 7 Sep 2018 20:10:43 +0000 (16:10 -0400)]
Update CentOS 7 and Ubuntu 16.04 images

Issue: RELENG-1201
Change-Id: Ib5d1faee2363a97fe3eb3d1be274df0798d290ad
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoMerge "Fail ansible-galaxy install step"
Thanh Ha (zxiiro) [Tue, 21 Aug 2018 23:36:14 +0000 (23:36 +0000)]
Merge "Fail ansible-galaxy install step"

6 years agoFail ansible-galaxy install step 55/12355/1
Jessica Wagantall [Tue, 21 Aug 2018 23:24:37 +0000 (16:24 -0700)]
Fail ansible-galaxy install step

Fail packer if ansible-galaxy install step fails to
start due to ~/.netrc being too permissive.

Change-Id: I67b922688e738986dfbae85225b78df342d792ce
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
6 years agoAdd mimimum requirements for Ansible and Packer 16/12316/6
Anil Belur [Sat, 18 Aug 2018 05:44:20 +0000 (11:14 +0530)]
Add mimimum requirements for Ansible and Packer

Also fix toctree error by adding lf-network to toctree.

Change-Id: I23c1adb2a8beecf3f99a495a554d8a59f6c65a67
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoUse new lf images for arm images 46/12146/1
Jeremy Phelps [Tue, 7 Aug 2018 19:51:00 +0000 (14:51 -0500)]
Use new lf images for arm images

These are v2 flavors which have 40gb root volume attached and
have been renamed to lf.

Change-Id: I0375e8b639e086d6188fe05eb5c47a3f22fffa98
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
6 years agoEnable YAML linter and fix lint issues 10/12110/1
Thanh Ha [Fri, 3 Aug 2018 19:39:44 +0000 (15:39 -0400)]
Enable YAML linter and fix lint issues

Resolve relevant lint issues and enable the YAML linter.

Change-Id: I11cb7b6a1edb72f165ba9ba051bc19794e4684bd
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoEnable JSON linter and fix lint issues 09/12109/1
Thanh Ha [Fri, 3 Aug 2018 19:33:10 +0000 (15:33 -0400)]
Enable JSON linter and fix lint issues

Fix outstanding JSON lint issues and enable the JSON linter.

Change-Id: I858b194f3d23c6aa2f868cc2f04bbdc93a8732c6
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoMake flavor configurable for templates 52/12052/2
Jeremy Phelps [Tue, 31 Jul 2018 20:18:33 +0000 (15:18 -0500)]
Make flavor configurable for templates

This is needed to support aarch64 images in vexx as they will
only run on v2 flavor types.

Change-Id: I6edb29431f14df8c3afea44b5d4f19f19c48f837
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
6 years agoFix windows-builder to support local scripts 33/12033/1
Thanh Ha [Mon, 30 Jul 2018 17:12:07 +0000 (13:12 -0400)]
Fix windows-builder to support local scripts

Original patch for this missed the setup to allow local usage
of the windows-builder provisioner.

Change-Id: I6d8b2b97d7efd844feaf8984154060f1e10b090e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoUninstall unattended-upgrades 41/11941/1
Thanh Ha [Tue, 24 Jul 2018 01:57:06 +0000 (21:57 -0400)]
Uninstall unattended-upgrades

We do not need this package in Ubuntu systems so remove it.

Issue: RELENG-1037
Change-Id: I806ab6a6f5bf8e86a9841731433968e18cdd5dde
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoMerge "Add pre-commit hook for trailing-whitespace"
Andrew Grimberg [Thu, 19 Jul 2018 15:01:48 +0000 (15:01 +0000)]
Merge "Add pre-commit hook for trailing-whitespace"

6 years agoAdd pre-commit hook for trailing-whitespace 35/11835/2
Thanh Ha [Wed, 18 Jul 2018 01:28:53 +0000 (21:28 -0400)]
Add pre-commit hook for trailing-whitespace

Install using tox:

    tox -e check-hooks

ref: https://pre-commit.com

Change-Id: I9e1716a486ae027cd9eb35b415ee700ad0bc60d9
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoAdd zip and unzip to Windows builders 70/11770/2
Thanh Ha [Thu, 12 Jul 2018 22:53:32 +0000 (18:53 -0400)]
Add zip and unzip to Windows builders

Change-Id: I976fcf20600a97d744df408cb48036be4d56c4c8
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoAdd centos7 aarch64 image 64/11764/1
Jeremy Phelps [Thu, 12 Jul 2018 21:18:41 +0000 (16:18 -0500)]
Add centos7 aarch64 image

Change-Id: I4ea3b0690f92d0e70d5653d3918b92989901b000
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
6 years agoInstall OpenSSH with the SSHAgentFeature 40/11740/1
Thanh Ha [Wed, 11 Jul 2018 21:14:15 +0000 (17:14 -0400)]
Install OpenSSH with the SSHAgentFeature

The SSHAgentFeature provides the Windows service necessary to
allow ssh-agent to work properly.

Issue: RELENG-999
Change-Id: I6d5ba7f599dd20e1d2052854efcae66da11cedeb
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoUse Ansible provisioner for Windows builds 68/11568/14
Thanh Ha [Tue, 26 Jun 2018 22:26:06 +0000 (18:26 -0400)]
Use Ansible provisioner for Windows builds

Issue: RELENG-939 RELENG-999
Change-Id: Ided88b444f76c5461bed313dc06ba79a51139c9c
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoBuild out Ubuntu 18.04 arm64 image 96/11696/3
Jeremy Phelps [Mon, 9 Jul 2018 19:39:59 +0000 (14:39 -0500)]
Build out Ubuntu 18.04 arm64 image

Change-Id: I9b449a63489577c3f1a52c26bcb765e0f7ee9309
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
6 years agoAdd EC2 variables for Windows var file 22/11622/1
Andrew Grimberg [Fri, 29 Jun 2018 20:00:52 +0000 (13:00 -0700)]
Add EC2 variables for Windows var file

Even though we don't currently have Windows systems in EC2 we need to
have the source_ami_* variables declared as empty strings to pass packer
verification.

Change-Id: Id87435a77827f1c9f35bbb8f54e363b8ddae2b96
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
6 years agoAdd Windows Server 2016 builder 22/11322/7
Thanh Ha [Tue, 26 Jun 2018 22:25:00 +0000 (18:25 -0400)]
Add Windows Server 2016 builder

This provides a basic "hello world" of sorts and successfully
boots a Windows builder and lists the C:\ directory.

Issue: RELENG-939 RELENG-999
Change-Id: I539afdc08676e3317d823292f0692361ca9c6825
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoProperly install git2u on EL systems 61/11561/1
Andrew Grimberg [Tue, 26 Jun 2018 20:22:31 +0000 (13:22 -0700)]
Properly install git2u on EL systems

git2u needs special handling (yum-plugin-replace) for installation. Make
sure that all steps happen in the correct order

Change-Id: I6c6b5a49031463e02442f3ea8f50f5aea37e4a3d
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
6 years agoRe-order package install 56/11556/1
Andrew Grimberg [Tue, 26 Jun 2018 17:46:41 +0000 (10:46 -0700)]
Re-order package install

yum-plugin-replace is not available in the base upstream repositories
but from IUS. It must therefore be listed after the IUS repository
installation

Change-Id: I6d3221ca05348f234f2342c3d8e072f6da379786
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
6 years agoEL7 systems should use git2u 20/11320/1
Andrew Grimberg [Thu, 14 Jun 2018 22:29:23 +0000 (15:29 -0700)]
EL7 systems should use git2u

EL7 systems have a very ancient git installed. IUS provides an up to
date version that replaces the upstream version.

Issue: RELENG-987
Change-Id: I41a02037f4d5326ba64c05f081fc5f1aa8fd6e41
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
6 years agoMerge "Expand rendered image name to include sec and ms"
Thanh Ha [Fri, 8 Jun 2018 04:01:04 +0000 (04:01 +0000)]
Merge "Expand rendered image name to include sec and ms"

6 years agoExpand rendered image name to include sec and ms 86/10986/3
Anil Belur [Tue, 5 Jun 2018 02:14:58 +0000 (12:14 +1000)]
Expand rendered image name to include sec and ms

Expand rendered image name to include seconds and milliseconds.
This reduces the probability of image name clashes in the env.

The initial change Ic1853ba7566def397b8bce389e2779fe3020c7ce was
reverted, since the change had issues bringing up an instance on the
OpenStack cloud provider. This was because the default
`instance_name` value is taken as the `image_name`, when the
instance_name is unset, the instance_name does not allow FQDN format
hostname ending with a period+number.

The workaround is to use separate `instance_name` parameter in your
builder which does not end with period+number.

Tested the change to work:
"ZZCI - CentOS 7 - docker - 20180605-015801.089"

JIRA: RELENG-971
Change-Id: Ia195bd99d55f23b4f39acf590520637e54fc006a
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoAdd detailed instructions to setup builder 60/10960/1
Thanh Ha [Sat, 2 Jun 2018 04:44:57 +0000 (00:44 -0400)]
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 <thanh.ha@linuxfoundation.org>
6 years agoRevert "Expand image name to include sec and ms" 46/10946/2
Thanh Ha [Fri, 1 Jun 2018 19:59:31 +0000 (19:59 +0000)]
Revert "Expand image name to include sec and ms"

Images coming online with the sec.ms patch seems to enter
error state. OpenStack the init of the nodes may not like
the "." dot in the VM name.

This reverts commit ce14f52380fd4b9dd707728d645aecf3d7a6d7fa.

Change-Id: Iae802cb4d6ccf7b1c35943fdbd69a2f65418e3b9
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoExpand rendered image name to include sec and ms 25/10725/3
Anil Belur [Sat, 19 May 2018 13:03:50 +0000 (23:03 +1000)]
Expand rendered image name to include sec and ms

Expand the rendered image name to include seconds
and milli-seconds.

JIRA: RELENG-960
Change-Id: Ic1853ba7566def397b8bce389e2779fe3020c7ce
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
7 years agoFix tox coala errors in common-packer 34/10634/1
Anil Belur [Tue, 15 May 2018 02:15:12 +0000 (12:15 +1000)]
Fix tox coala errors in common-packer

Change-Id: Icde085c0a1f981ff03818216defcc561b3d91c1b
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
7 years agoansible-galaxy.sh enable custom requirements.yaml 20/10620/1
Faseela K [Sat, 12 May 2018 06:01:22 +0000 (11:31 +0530)]
ansible-galaxy.sh enable custom requirements.yaml

If applications provide a custom requirements.yaml
the script should use the same, instead of the default requirements.yaml

Change-Id: I4ef8b9d4754b6c11c17101cf33f672feddde4fa5
Signed-off-by: Faseela K <faseela.k@ericsson.com>
7 years agoAdd an Amazon template for building AMIs 09/10509/2
Trevor Bramwell [Tue, 8 May 2018 01:56:56 +0000 (18:56 -0700)]
Add an Amazon template for building AMIs

The differences between this builder and the openstack one are the cloud
specific options passed, and the disabling of ANSIBLE_PIPELINING.

For some reason ansible is not able to set up the local ssh connection
(ssh <ssh_user>@127.0.0.1) on the EC2 instance after transfering the
playbook files, yet it can successfully ssh to the machine.

Disabling the pipelining support opens a new ssh connection each time
ansible runs a task. This takes more time, but works.

This patch also includes an amazon cloud example var file.

Change-Id: I2b9f273e86fd7bc1ddfde34d26eebfd6249a6a0a
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoActivate linting for RST documents 85/10385/6
Thanh Ha [Wed, 2 May 2018 20:23:17 +0000 (16:23 -0400)]
Activate linting for RST documents

Change-Id: Ie91caab378e320111962dcb640fe3c10ab02b4e8
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoSimplify README and remove markdown 84/10384/7
Thanh Ha [Wed, 2 May 2018 20:20:46 +0000 (16:20 -0400)]
Simplify README and remove markdown

Simplify our setup a little by removing markdown and turning the
README into a simple text that links to the Documentation.

Change-Id: I0fbcfadf4623bc1759984ae086c84ef249b7d567
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoMigrate LF Network docs to RST 83/10383/7
Thanh Ha [Wed, 2 May 2018 20:16:31 +0000 (16:16 -0400)]
Migrate LF Network docs to RST

Move the LF Network portion of the README into RST. This provides
details on how to bootstrap through the LF Network for LF Staff
to initialize the first image on a new setup.

Issue: RELENG-513
Change-Id: I85bd8b298bcc330b24b6c3aa40cf71fdef527d50
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoMigrate CP usage documentation 82/10382/4
Thanh Ha [Wed, 2 May 2018 20:01:00 +0000 (16:01 -0400)]
Migrate CP usage documentation

Migrate over the existing Common Packer usage documentation
from the README file.

Issue: RELENG-513
Change-Id: Ie7eb81b3a8e69e0cbd878cc2ec603a9c33ac5a23
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoMigrate doc on how to install CP to RST 81/10381/1
Thanh Ha [Wed, 2 May 2018 19:49:02 +0000 (15:49 -0400)]
Migrate doc on how to install CP to RST

Migrate the Common Packer install documentation into RST.

Issue: RELENG-513
Change-Id: Ibe61a55e9e4857c33173d5c67bc88ed07d449420
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoBootstrap common-packer RTD documentation 02/10202/2
Thanh Ha [Tue, 24 Apr 2018 15:18:45 +0000 (11:18 -0400)]
Bootstrap common-packer RTD documentation

Issue: RELENG-513
Change-Id: Ic199def610eea4daa3d07713e54e373258bec815
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoRemove obsolete section on lf-ansible 47/9547/1
Thanh Ha [Wed, 21 Mar 2018 21:28:42 +0000 (17:28 -0400)]
Remove obsolete section on lf-ansible

Roles come from Ansible Galaxy now.

Change-Id: I39d063e96553bd8b00f2bd2fcaaa14c8098efcbb
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoSet ansible galaxy roles path for builder 05/9505/1
Thanh Ha [Tue, 20 Mar 2018 02:26:06 +0000 (22:26 -0400)]
Set ansible galaxy roles path for builder

Change-Id: I2f7700dbb9d7e05b77e8dbb393837dbc29d5a2b1
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoUpdate common-packer unstructions 93/9493/4
Jessica Wagantall [Mon, 19 Mar 2018 18:25:48 +0000 (11:25 -0700)]
Update common-packer unstructions

lf-ansible and common-packer instructions with github references need to
call releng-lf-ansible and releng-common-packer to clone the repos.

Change-Id: I432d1896dd06ce5ce5297be211058ea6564c3655
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
7 years agoInstall roles via Ansible Galaxy 32/9432/3
Thanh Ha [Wed, 14 Mar 2018 03:10:00 +0000 (23:10 -0400)]
Install roles via Ansible Galaxy

Support using Ansible Galaxy to install lf-ansible roles. This
patch adds a new script ansible-galaxy.sh which will install
roles from common-packer's requirements.yaml and if provided
local project requirements.yaml as well. The project local
requirements.yaml needs to exist in their local packer directory.

Change-Id: I06bb5d433bac37b3c08e761c25dfdf942b4f3229
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoPacker bootstrap through LF network instructions 64/8764/2
Thanh Ha [Thu, 8 Feb 2018 20:42:12 +0000 (15:42 -0500)]
Packer bootstrap through LF network instructions

Add instructions for how to get through the LF network when running
packer on a local machine.

Change-Id: I38d90abe6d1e5d01828e0968ac42dad9cce97af6
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoSet docker default mtu to 1458 for LF Network 77/8877/1
Thanh Ha [Thu, 15 Feb 2018 22:02:17 +0000 (17:02 -0500)]
Set docker default mtu to 1458 for LF Network

LF Network requires the MTU be set to 1458 so that container
routing will work correctly.

Change-Id: I637ef8f2a0f310af3c1e2a3108d7da61c2570dba
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoMerge "Remove .example extension from templates"
Anil Belur [Wed, 31 Jan 2018 23:05:11 +0000 (23:05 +0000)]
Merge "Remove .example extension from templates"

7 years agoMerge "Update templates to using local-*.yaml"
Anil Belur [Wed, 31 Jan 2018 22:50:12 +0000 (22:50 +0000)]
Merge "Update templates to using local-*.yaml"

7 years agoAdd EC2 filter defintions for future support 50/8550/1
Andrew Grimberg [Fri, 26 Jan 2018 18:16:20 +0000 (10:16 -0800)]
Add EC2 filter defintions for future support

EC2 templates have different requirements for the image base definition
that uses filters. As we can have unused variables defined in our vars
files we can just add these extra parameters without causing problems
with OpenStack builds and still support EC2 builds.

Change-Id: I28c773d16ae4102c53416e957509e9f87e7d802b
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
7 years agoRemove .example extension from templates 41/8441/1
Thanh Ha [Fri, 19 Jan 2018 04:01:29 +0000 (23:01 -0500)]
Remove .example extension from templates

The templates are no longer examples but actually fully usable
templates so let us stop calling them examples.

Change-Id: I54d54e42359528e5c186a3c082257ce98b1594a9
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoUpdate templates to using local-*.yaml 40/8440/1
Thanh Ha [Fri, 19 Jan 2018 03:53:43 +0000 (22:53 -0500)]
Update templates to using local-*.yaml

This change should allow us to keep the template files relatively
the same while allowing consumers of builder and docker to have
some local modifications in their own ciman repos.

Change-Id: I43351ea259af5bb55be8895f8cac97d5e90b923b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoRevert "Bootstrap Ansible if not available" 04/8304/2
Thanh Ha [Tue, 9 Jan 2018 01:52:05 +0000 (01:52 +0000)]
Revert "Bootstrap Ansible if not available"

This is not actually necessary. We need Ansible in the VM that's
running the test not the VM being built. Which means the VM attached
in to Jenkins needs to have Ansible installed in the first place. We
just need to ensure that Jenkins is initially configured with one
(which we currently have to do anyway even for the regular shell
script provisioner).

This reverts commit 99f875674576f3643c9713750a7017f581ff758b.

Change-Id: I607526f4f6575e2a29c7184e0196e9c92040afd9
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoAdd lf-dev-libs role to baseline 03/8303/1
Thanh Ha [Tue, 9 Jan 2018 00:57:51 +0000 (19:57 -0500)]
Add lf-dev-libs role to baseline

Change-Id: Ice5662aa955f7b9b2b166e73e3bfa4ceb6cfdaae
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoMerge "Bootstrap Ansible if not available"
Andrew Grimberg [Tue, 9 Jan 2018 00:05:10 +0000 (00:05 +0000)]
Merge "Bootstrap Ansible if not available"

7 years agoFix typo in profile_tasks 99/8299/1
Thanh Ha [Mon, 8 Jan 2018 23:53:32 +0000 (18:53 -0500)]
Fix typo in profile_tasks

Change-Id: I93eb9eda5994501363370c4022eb67264b079ffc
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoBootstrap Ansible if not available 98/8298/2
Thanh Ha [Mon, 8 Jan 2018 23:37:10 +0000 (18:37 -0500)]
Bootstrap Ansible if not available

Check if Ansible is already installed on the system and install
it if necessary.

Change-Id: I8d89cf656642a333b3ba6214d12af9d7187acd59
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoDo not remove all of /tmp 96/8296/1
Thanh Ha [Mon, 8 Jan 2018 20:57:31 +0000 (15:57 -0500)]
Do not remove all of /tmp

Legacy scripts in ODL depend on things being available in /tmp so
let us only clear out specific items.

Change-Id: I92c1174b81e561b67a56874111efe62ec0d584b5
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoMerge "Remove unnecessary SELinux script"
Andrew Grimberg [Mon, 8 Jan 2018 16:36:02 +0000 (16:36 +0000)]
Merge "Remove unnecessary SELinux script"

7 years agoSystem reseal scripts need to run as root 91/8291/1
Thanh Ha [Mon, 8 Jan 2018 05:06:16 +0000 (00:06 -0500)]
System reseal scripts need to run as root

Change-Id: I85d1c059a9147f8d9ff6aa55eada912572d75d57
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoEnable ansible pipelining 90/8290/1
Thanh Ha [Mon, 8 Jan 2018 05:04:35 +0000 (00:04 -0500)]
Enable ansible pipelining

Pipelining speeds up tasks considerably as long as !requiretty is
set in sudoers.

Change-Id: Iaf968efce0b028608b3777b0ff64d21bbaa0bed4
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoEnable profiler for time statistics 89/8289/1
Thanh Ha [Mon, 8 Jan 2018 03:48:34 +0000 (22:48 -0500)]
Enable profiler for time statistics

Enables a profile which providers improved time statistics of
individual job runs.

Change-Id: Ia116089ac3438eedf1ece11cc71b3958afd083bf
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoSwitch system-reseal script to shell 88/8288/2
Thanh Ha [Mon, 8 Jan 2018 02:35:31 +0000 (21:35 -0500)]
Switch system-reseal script to shell

While it would be nice to do things the Ansible way the "file"
method unnecessarily takes too long to remove files in a loop.
In this case we should just handle the cleanup with a quick script
which will run significantly more quickly.

Change-Id: I09145b1ece235ea523cf30fd9c8e13efdcbdb8fb
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoAdd example cloud-env.json 83/8283/1
Thanh Ha [Sat, 6 Jan 2018 02:01:39 +0000 (21:01 -0500)]
Add example cloud-env.json

Change-Id: I49eb8cf29fe6af89d28aa044fbe1d50746ce7273
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoMake it possible to locally test common-packer 76/8276/2
Thanh Ha [Fri, 5 Jan 2018 20:48:22 +0000 (15:48 -0500)]
Make it possible to locally test common-packer

By symlinking common-packer to itself this makes it possible to test
common-packer from it's own project repo.

Change-Id: I022b63aeab561815da3e8856f195201b668cfed0
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoBe more specific about files to scan with coala 82/8282/1
Thanh Ha [Sat, 6 Jan 2018 01:50:49 +0000 (20:50 -0500)]
Be more specific about files to scan with coala

Because of the common-packer symlink we need to be much more careful
about where packer is scanning things to avoid an infinite scan
cycle.

Change-Id: I7ae75004ee69db2d407ff69cbc9df187bd69d504
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoMerge "Pin nodeenv 1.1.2"
Thanh Ha [Sat, 6 Jan 2018 01:10:29 +0000 (01:10 +0000)]
Merge "Pin nodeenv 1.1.2"

7 years agoUpdate common-packer instructions 32/8232/7
Thanh Ha [Fri, 5 Jan 2018 01:42:05 +0000 (20:42 -0500)]
Update common-packer instructions

Instructions are a little different now that we are using the
Ansible provisioner.

Change-Id: I7296ed75af8f4962c427199a8ad755ec0fccc062
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoPin nodeenv 1.1.2 73/8273/1
Thanh Ha [Fri, 5 Jan 2018 19:47:04 +0000 (14:47 -0500)]
Pin nodeenv 1.1.2

Last known version that works with multiple tox runs.

Change-Id: Icc157039bf4ee42bf133a7ed8448c5de9c72a66a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoRemove unnecessary SELinux script 33/8233/1
Thanh Ha [Fri, 5 Jan 2018 02:05:29 +0000 (21:05 -0500)]
Remove unnecessary SELinux script

It turns out CentOS 7 by defaults sets SELinux up the way we want
so remove this unnecessary step.

Change-Id: I9d276f2b4a117c07113d7eeb996b7d6e6a92c3e2
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoAdd docker template 07/8207/3
Thanh Ha [Fri, 5 Jan 2018 01:21:21 +0000 (20:21 -0500)]
Add docker template

Change-Id: I493d653e5d515250580cc44a2c65f07299b800c8
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoUpdate relative paths 31/8231/1
Thanh Ha [Fri, 5 Jan 2018 01:18:00 +0000 (20:18 -0500)]
Update relative paths

Packer paths are relative to where it is called from so update the
paths to match where we expect users of common-packer to load the
submodule from.

Change-Id: I03cd26c4fdb7cd2611cd6ae968ddd4470ba33fad
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoInitial baseline image (Ansible) 86/8186/15
Thanh Ha [Fri, 29 Dec 2017 19:45:24 +0000 (14:45 -0500)]
Initial baseline image (Ansible)

Create a baseline image using Ansible Playbooks. Considering using
Ansible for our Job builds so why not also use it here for packer
builds.

Ansible seems to have support for the things our helper scripts do
which allows us to get rid of them if we use Ansible. Each Ansible
task also validates itself to make sure the commands run through,
something we don't currently do and can better let us know when
something goes wrong.

Issue: RELENG-288
Depends-On: Ibf4e1ff13d93ad59eaea4a0582a4b77446870dc0
Change-Id: I96d1ec83cec82130d30a245c39b6ac8018f92428
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoCreate README for usage and design of repo 70/5770/2
Andrew Grimberg [Tue, 8 Aug 2017 14:51:48 +0000 (07:51 -0700)]
Create README for usage and design of repo

We need a README for how to use common-packer. As we are just getting
this up and running, writing out how the templates and general thought
process of how it should be used is also handy so that others can start
adding to the repository without having to wait for specific examples.

Change-Id: Ifc14d2ede0251a35af85a37e3733f640ed0c84bc
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
7 years agoAdd .gitreview and .gitignore 55/5655/1
Thanh Ha [Thu, 27 Jul 2017 20:36:56 +0000 (16:36 -0400)]
Add .gitreview and .gitignore

Change-Id: Ia30cd1ddba586e56a277773a91259573733ab7b6
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoAdd Coala Linting 54/5654/1
Thanh Ha [Thu, 27 Jul 2017 20:36:15 +0000 (16:36 -0400)]
Add Coala Linting

Change-Id: Ie729bb6d22c5ff3e20c938e157914239ae398665
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoInitial empty repository
Andrew Grimberg [Tue, 25 Jul 2017 14:31:32 +0000 (14:31 +0000)]
Initial empty repository