Commit graph

42 commits

Author SHA1 Message Date
Chris Evich 7184efe939
Cirrus: Add 20m extra timeout for Ubuntu
Tests running slower than normally-slow, bump timeout to allow them to
pass until better solution (for slow Ubuntu tests) can be found.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-02-22 12:07:34 -05:00
Nitesh Konkar 383e573299 packer: Make Makefile host arch sensitive
`make localunit` fails on non-amd64 archs
as it unzips packer_1.3.2_linux_amd64.zip
irrespective of host arch its running on.

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-02-18 10:23:57 +05:30
Valentin Rothberg 9ac0ebb079 Cirrus: add vendor_check_task
* Make sure that all vendored dependencies are in sync with the code and
  the vendor.conf by running `make vendor` with a follow-up status check
  of the git tree.

* Vendor ginkgo and gomega to include the test dependencies.

Signed-off-by: Chris Evic <cevich@redhat.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-06 11:14:06 +01:00
Chris Evich 8ca6706be0
Cirrus: Add RHEL-7 testing
Add necessary tweaks to base-image build/import process so that image
can successfully boot with networking enabled.  Build the base image and
update ``.cirrus.yml`` accordingly.

Also make a minor improvement to cache-image building to help save space in
GCP image storage.  Namely, instead of storing every produced image, export
them into google storage buckets w/ life-cycle enabled.  For production use,
they may be converted back into GCE images, otherwise they will expire after
a time.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-30 08:26:48 -05:00
Chris Evich 88f222b41d
Cirrus: Enable AppArmor build and test
This was specifically disabled early on in transitioning to cirrus due to
an excessive number of test failures and lack of knowledge.  This commit
reverses the stance and unifies build and test commands across all
current platforms.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-29 10:38:51 -05:00
Chris Evich 7124ef71b5
cirrus: Record start/end time of important things
Previously we only reported the date/time at the beginning of a run
since it's not available in the Cirrus-CI system.  This commit
generalizes the solution, recording start/end times for all major
events.

Also the timestamps are recorded into a local file on the VMs.  This
is intended for future use, for example tracking execution-time
trends.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-17 14:32:28 -05:00
baude b30a56c156 Run integrations test with remote-client
Add the ability to run the integration (ginkgo) suite using
the remote client.

Only the images_test.go file is run right now; all the rest are
isolated with a // +build !remotelinux.  As more content is
developed for the remote client, we can unblock the files and
just block single tests as needed.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-14 14:51:32 -06:00
OpenShift Merge Robot e4525cf844
Merge pull request #2129 from cevich/timestamp
Cirrus: (Minor) Print timestamp
2019-01-10 10:58:25 -08:00
Chris Evich 4e7a7ffe9d
(Minor) Cirrus: Print timestamp at start
Also record into a file in case a later reference is required

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-10 12:59:55 -05:00
Chris Evich b9814e76b2
Minor: Remove redundant basename command in ooe.sh
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-07 14:41:52 -05:00
Chris Evich 727f8faff6
cirrus: Use updated images including new crui
Also add two minor tweaks which were preventing images from building
properly.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-21 16:08:21 -05:00
Adrian Reber 38e3fb53f6
Use existing CRIU packages in CI setup
For all in testing involved distribution a new enough CRIU exists as a
package.

Fedora provides CRIU packages directly. For CentOS/RHEL there is a COPR
with the latest CRIU version and for Ubuntu there is a PPA for the
latest CRIU version. Let's use these packages and fall back to building
from git if necessary.

Signed-off-by: Adrian Reber <adrian@lisas.de>
2018-12-21 08:18:21 +01:00
Chris Evich 4bf7c4b62b
Cirrus: One IRC notice only
The podbot messages are becoming obnoxious as more distributions are
tested.  Only call the `success.sh` script once, after all testing was
successful.  Also make update the message to include more helpful text
and url.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-18 09:16:05 -05:00
Daniel J Walsh 68414c5ee3
Merge pull request #2010 from cevich/cirrus_editors
Cirrus: Add text editors to cache-images
2018-12-17 15:55:03 -05:00
Chris Evich 7b53e86e4f
Add script to create CI VMs for debugging
Frequently debugging of CI-related problems requires going hands-on
within the environment.  However, reproducing the environment by hand is
very tedious and error prone.  This script permits authorized users to
produce VM's based on any available cache-image, and automatically remove
them upon logout.

Also: Bump up VM disk sizes to 200GB due to performance reasons

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 14:34:43 -05:00
Chris Evich a1a5f3ba51
Cirrus: Migrate PAPR testing of F28 to Cirrus
Since the most recent TWO versions of Fedora are officially supported
upstream, both need to be tested.  Implement the concept of a 'prior'
Fedora release in both base-image and cache-image production.  Utilize
the produced cache-image to test libpod.  Remove F28 testing from PAPR.

Much thanks to @baude @giuseppe for help with this.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 11:19:41 -05:00
Chris Evich 401fb2bf2f
Cirrus: Add text editors to cache-images
Occasionally people need to access the VM's for
troubleshooting/debugging.  Having an editor pre-installed makes life
easier and doesn't cost any extra test-time.

***CIRRUS: REBUILD IMAGES***

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 10:51:39 -05:00
Chris Evich d038497b09
Fix documentation links and flow
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-12 10:56:18 -05:00
Chris Evich ac7ddc189e
Cirrus: Update base-image build docs
Mostly minor tweaks and clarifications.  Though there was
one missing (required) make value I fixed.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-10 16:03:37 -05:00
Chris Evich cb900798ce
Cirrus: Document and codify base-image production
A number of images required for future testing are not present in GCE.
Importing them is a long proscribed process prone to errors and
complications.

Improve this situation by documenting, and encoding the majority of the
steps required.  Due to the required complexity, these are clearly
identified as 'semi-automated'.  This means a discerning eye is
sometimes needed to address unforeseen problems (networking issues,
format or packaging changes, etc).

Nevertheless, having these steps in writing, will reduce current and
future  maintenance burden while supporting future testing needs of
RHEL, Fedora and Fedora Atomic Host.

Also:

* Add necessary configuration, scripts, and Makefile updates needed to
  prepare RHEL, Fedora, & FAH cloud images for use in GCE.  This
  is a complex, multi-step process where the cloud image is booted
  un a local user-mod qemu-kvm instance, where it can be modified.
  From there, it's converted into a specific format, and imported into
  GCE.  Lastly, the imported raw disk data is made available as a GCE
  VM image.

  Note: As of this commit, the RHEL base-image builds (CentOS has native
  image), however neither RHEL or CentOS cache-images build correctly.

* Left testing on FAH disabled, the GCE/Cirrus integration needs needs more
  work.  Specifically, the python3-based google startup script service
  throws a permission-denied (as root) when trying to create a temp.
  directory.  Did not investigate further, though manually running the
  startup script does allow the libpod tests to start running.

* Enabled Fedora 29 image to execute tests and general use.

* Utilize the standardized F28-based container image  for gating
  of more the intensive unit and integration testing.  Update
  documentation to reflect this as the standard platform for
  these checks.  Rename tasks with shorter names and to better
  reflect their purpose.

* Cirrus: Trim unnecessary env vars before testing since the vast
  majority are only required for orchestration purposes.  Since most
  are defined within `.cirrus.yml`, it's a good place to store the
  list of undesirables.  Since each of the cirrus-scripts runs in
  it's own shell, unsetting these near the end will have no
  consequence.  Also trim down the number of calls to show_env_vars()

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-06 15:39:18 -05:00
Chris Evich 8d7fdc7d79
Cirrus: Use Makefile for image-building
The packer tool takes JSON as input for the details of producing VM
images to be used for PR CI-testing.  JSON is not a very human-friendly
format, without support for comments and frequently containing lots of
duplicate data.

Fix this by using a Makefile + simple python one-liner to convert
from a human-friendly YAML format into packer-native JSON.  This allows
use of anchors/aliases to reduce duplication, and allows inline comments
for easier maintainability.  This also allows separating the 'test'
action from the 'build' action, for earlier and better syntax problem
detection.

Lastly, there are some minor ``lib.sh`` and ``integration_test.sh``
updates to support future work, and slightly improve the build and
test environments.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-06 15:39:18 -05:00
Giuseppe Scrivano deeb3eaf7d
tests: always install runc on Ubuntu
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-12-01 06:46:24 +01:00
Giuseppe Scrivano 2842b8ad40
cirrus: make apt noninteractive
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-30 22:45:56 +01:00
Chris Evich 8b3fcb374b
Cirrus: Add documentation for system-testing
***CIRRUS: REBUILD IMAGES***

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-11-13 13:30:48 -05:00
Chris Evich 2cc9b78ab9
Cirrus: Simplify optional system-test script
Previously it was required to call the verify, unit, and integration
scripts in order to build/install dependencies, and libpod.  This
wastes time during the (optional) system-testing, since the
actual unit/integration testing is also happening in parallel.

Consolidate only the distribution-specific build steps into the
system-testing script.  This way, only the required steps are performed
in their respective (parallel) tasks.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-11-13 13:30:48 -05:00
Chris Evich aa742e9e68
Cirrus: Reveal magic, parallel system-testing
Previously, several magic strings were in place to affect cirrus-ci
operations.  Two were buried within scripts.  One to optionally
execute system-tests within a PR. Another to avoid re-building
cache-images upon every merge.

Move these magic strings out into the open, buy locating their
logic up-front in the ``.cirrus.yml`` file.  This improves
readability and reduces surprise/astonishment at runtime.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-11-13 13:30:48 -05:00
Chris Evich 916a3ba9d1
Cirrus: Ignore any error from the IRC messenger
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-11-08 13:51:36 -05:00
OpenShift Merge Robot 81cef49144
Merge pull request #1616 from cevich/cirrus_add_systemtest
Cirrus-CI: Add option to run system-tests
2018-11-07 08:06:07 -08:00
OpenShift Merge Robot 17716d787a
Merge pull request #1624 from cevich/update_fedora
Cirrus: Enable updating F28 image
2018-11-01 10:23:27 -07:00
Chris Evich 989affa2dd
Cirrus-CI: Add option to run system-tests
Normally, we would not run system-tests as part of PR-level CI, they're
simply too heavy-weight and complex.  However, in some instances it may
be desirable to provide a quick feedback loop, prior to release packaging
and official testing.  Enable this by executing the system-tests when
a magic string is present in the PR description:

``***CIRRUS: SYSTEM TEST***``

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:50:53 -04:00
Chris Evich 91f398db4c
Cirrus: Skip rebuilding images unless instructed
Given frequent merges, it doesn't make sense to rebuild the VM testing
images every time.  Instead, monitor the PR title and description for
a magic string, only triggering builds on a match:

***CIRRUS: REBUILD IMAGES***

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:48:31 -04:00
Chris Evich 021ca5780c
Cirrus: Add a readme
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:48:31 -04:00
Chris Evich 4929662c8a
Ubuntu VM image build: try update twice
Occasionally, short-term temporary connectivity problems prevent ubuntu
from updating on GCE.  As a workaround, attempt these commands twice.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:48:30 -04:00
Chris Evich ed67d302ef
Cirrus: Enable updating F28 image
Previously this was disabled as some package was breaking networking on
GCE after updating + rebooting.  This is fixed now, so we should update
packages when building the fedora test VM image.

https://pagure.io/cloud-sig/issue/292

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:47:43 -04:00
OpenShift Merge Robot 79befd5158
Merge pull request #1648 from cevich/cirrus_podbot
Add simple IRC messenger
2018-10-23 07:41:43 -07:00
Chris Evich 89b5484ad2
Cirrus: Install CRIU in test images
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:37:09 -04:00
Chris Evich a18494a345
Cirrus: Use different CNI_COMMIT for Fedora
Just noticed this in Dockerfile.Fedora.  Updated all the right
places to make this happen.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:37:08 -04:00
Chris Evich 02bc3c9962
Fix Cirrus/Packer VM image building
An invalid GCE value is being passed to packer, preventing it from
building VM images.  Fix this, and centralize the definition of the
image name suffix by setting it at ``setup_environment.sh`` call-time,
rather encoding inside packer's `libpod_images.json`.  This makes
the value available for use by other scripts.

Also, switch the unique component of the name, to be based on the
commit-sha being tested.  This will improve traceability, since the git
history is more permanent than the `CIRRUS_BUILD_ID` env. var.  The
later is subject to log-rotation, destroying evidence of the images
source state.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:37:08 -04:00
Chris Evich 0c17f2010a
Cirrus: IRC message when cirrus testing successful
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:33:36 -04:00
Chris Evich a50410467a
cirrus: Add simple IRC messenger
Add a naive python script that's able to connect to IRC and send a
single line of text to the #podman channel.  Wrap this in a new
library function to ensure nick-name collisions are unlikely.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:33:36 -04:00
Chris Evich 52f0547f64
Re-add source-verify in cirrus-ci
Don't waste GCE VM resources for 30-min of testing,
when verify would fail after 3-minutes.  This is
the simpelest mechanism to save cloud CPU-time
while GCE is under trial-status (can not set quotas).

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-05 11:23:21 -04:00
Chris Evich c53163b75a
Add configuration for Cirrus-CI
Testing podman requires exercising on a full-blown VM.  The current
containerized-approach is complicated, and mostly a band-aid over
shortcomings in the other CI systems.  Namely, we want:

* To pre-build environments with dependencies to reduce the
  setup time needed for testing.
* The ability to verify the pre-built environments are working
  before utilizing them for further testing.
* A simple, single set of flexible automation instructions to
  reduce maintenance burden.
* Ease of environment reproduction across clouds or locally, for
  debugging failures.

This change leverages Cirrus-CI + Packer + collection of shell scripts
to realize all of the above.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-04 16:30:48 -04:00