Commit Graph

41 Commits

Author SHA1 Message Date
Michael Henriksen
717ceaa919 add ability for user to specify certs for import from registry 2019-02-18 09:06:46 -05:00
annastopel
b9edce9ef0 Import VM disk from ContainerDisk image 2019-02-12 21:11:39 +02:00
annastopel
460287d9f4 health of populate-registry should verify registry is accessible 2019-02-12 20:42:08 +02:00
annastopel
cb80249a7f BugFix: cdi importer fails to import from registry when run in unpriviledged container 2019-02-06 21:17:57 +02:00
Michael Henriksen
cb660fcfe0 add tests for controller runtime bootstrapping. gotta hit our coverage numbers, bro. otherwise kind of useless IMO 2019-01-29 13:15:46 -05:00
Alexander Wels
c5043052a8 Fix problem where errors in unit tests were not showing an error.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-01-21 16:29:55 -05:00
Michael Henriksen
5e2ed1b97b initial oerator implementation 2019-01-16 20:22:14 -05:00
Michael Henriksen
7170ba40f6 update kubernetes client/tools to 1.12.4 and controller runtime to 0.1.9 2019-01-08 16:10:30 -05:00
Michael Henriksen
b135463747 operator scaffolding 2019-01-08 16:03:21 -05:00
Michael Henriksen
85d76e0b08 rename datavolumecontroller to core 2019-01-08 15:52:41 -05:00
Michael Henriksen
27d95b1e9f dockerize dependency update (glide) 2019-01-08 14:26:07 -05:00
annastopel
0a18aa3d09 Internal Docker registry host that is visible only inside teh cluster.
cdi-func-test-registry-host - a host that runs docker registry and is accessible from inside the cluster via
cdi-func-test-registry-host.kube-system host name. The registry is populated with images taken from /tmp/shared/images. It is used by functional tests.
Example of usage:
1. inspect
With skopeo acces registry to ispect image  built from /tmp/shared/images/tinyCore.iso
skopeo inspect --tls-verify=false docker://cdi-func-test-registry-host.kube-system/tinycore.iso

2. Copy
skopeo copy --src-tls-verify=false docker://cdi-func-test-registry-host.kube-system/tinycore.iso dir:/tmp/download

Technical details:
Registry is run in a dedicated  service cdi-func-test-registry-host.
In the same pod there are 3 containers:
1. cdi-func-test-registry - runs registry:2 with self signed certificate that listens on port 443
2. cdi-func-test-registry-init - used to pouplate /tmp/shared/images volume with images created from /test/images/tinuCore.iso and with certificate generated during container image build
3. cdi-func-test-registry-populate - encapsulted all images of /tmp/shared/images in docker images and pushes them to the registry
2019-01-06 09:43:40 +02:00
Michael Henriksen
a446598399 remove python client generation 2018-12-03 08:31:29 -05:00
Michael Henriksen
b35218fd2b update deploy scripts and add code generation test to travis 2018-12-03 08:31:29 -05:00
Michael Henriksen
baab39fd53 fix lint errors 2018-12-03 08:31:28 -05:00
Michael Henriksen
38d717de09 update where we get openapi-gen from 2018-12-03 08:31:28 -05:00
Michael Henriksen
80f8dcf8d8 swagger/apidoc/python client generation 2018-12-03 08:31:28 -05:00
Daniel Erez
573374b831 Import vm disk from docker registry
As a user, I want to specify a registry source to pre-populate my PV with a VM disk image.

* Using skopeo[1] cli to copy image from docker registry.
* Extracting image layers (tar files) into data folder.
* Cleaning up .wh. files and remove corresponding files.
* Supporting docker registries such as: docker hub, quay, etc.

[1] https://github.com/containers/skopeo

Change-Id: Ib4e20bb7be842ebaabeb925202402791827edfd3
Signed-off-by: Daniel Erez <derez@redhat.com>
Co-authored-by: Fred Rolland <frolland@redhat.com>
2018-11-29 01:15:01 +02:00
Alexander Wels
40072b631a Report cloning progress in logs and prometheus.
Signed-off-by: Alexander Wels <awels@redhat.com>
2018-11-01 11:09:03 -04:00
Michael Henriksen
508f8959e7 see if this helps the build 2018-10-08 19:57:07 -04:00
Michael Henriksen
af654b4fca change *.cert to *.crt to be consistent with tls secrets creaed by kubectl. also made tls optional on uploadproxy. 2018-09-20 09:25:38 -04:00
Michael Henriksen
24d4e65a42 refactoring post rebase 2018-09-19 12:30:46 -04:00
Michael Henriksen
cd81879806 initial implementation of upload controller and upload server 2018-09-19 12:30:45 -04:00
David Vossel
c8e71a1432 Add UploadProxy component
Signed-off-by: David Vossel <davidvossel@gmail.com>
2018-09-19 12:30:45 -04:00
David Vossel
4466862aa1 Add CDI apiserver component
Signed-off-by: David Vossel <davidvossel@gmail.com>
2018-09-19 12:30:45 -04:00
Michael Henriksen
d9bbc4ed51 don't attempt to stream-convert http files that require creds 2018-09-06 20:40:56 -04:00
Michael Henriksen
9f08b4070c do dnf clean after installing packages 2018-09-06 20:15:47 -04:00
Michael Henriksen
46dbf28936 add simple qcow2 image validation 2018-09-06 20:15:47 -04:00
Michael Henriksen
a35d878109 do streaming qcow2->raw conversion if we can. also put resource limits on qemu-img 2018-09-06 20:15:47 -04:00
John Griffith
73a492f5c2 Add golint enforcement to all pkgs but common (#428)
Now that the updates have merged to fix golint errors in all of the
CDI pkgs (except common) turn on lint checks to keep things up to date.

This patch does that by:
1.  Adding a check in hack/build/run-lint-checks.sh
    NOTE:  We temporarily set a list variable in the script to indicate
    the directories that we've fixed and want to enforce.  This will be
    removed when common is "lintified"
2.  Adding golint to our build containers Dockerfile
2018-09-06 09:51:12 -07:00
Jon Cope
596c9dcea9 Set file host nginx servernames (#407) 2018-08-31 14:35:04 -07:00
Jon Cope
437154d701 Add http transport test suite and supporting utils (#376) 2018-08-31 11:48:03 -07:00
Jon Cope
2e2a1a5639 Only install qemu-img (#391) 2018-08-30 10:48:13 -04:00
Alexander Wels
363572626d cloner image uses ENTRYPOINT instead of hard coded path (#375)
- Updated controller to use ENTRYPOINT (no cmd) instead of /bin/sh
- Updated Dockerfile to set path to /usr/bin/cloner_startup.sh instead of /tmp
- Updated Dockerfile to use ENTRYPOINT.

Fixed issue #374

Signed-off-by: Alexander Wels <awels@redhat.com>
2018-08-27 18:35:13 -07:00
Lukas Bednar
bb2ba122ce Add option to generate junit and polarion report (#342)
It is necessary to close a loop for QE life-cycle .

Signed-off-by: Lukas Bednar <lbednar@redhat.com>
2018-08-24 08:40:58 -07:00
Jon Cope
15891b5a52 Add containerized file host (http & s3) for functional testing (#315) 2018-08-16 10:10:15 -07:00
Alexander Wels
4ca250a167 funtional test framework (serial runs only)
- Added functional test framework similar to kubevirt one.
- Added basic sanity test to demonstrate framework.
- Updated some vendor packages.

Signed-off-by: Alexander Wels <awels@redhat.com>
2018-08-08 13:08:26 -04:00
Michael Henriksen
cde24a7cc7 move binaries to /usr/bin (#283) 2018-07-30 15:28:06 -07:00
Atul Bhosale
6e280690e5 [277] Change the name of the cloner startup script (#278)
* Change the name of the cloner startup script

* Change the name of the cloner startup script
2018-07-30 11:11:12 -07:00
Jonathan Cope
b37b2fed2c Add goveralls support to makefile (#274)
* Added goveralls support for CI

* Add goveralls install to build container

* Small fix for manifest generation

* Fix symlinking bins

* goveralls only for PR merges
2018-07-25 13:37:28 -07:00
Jonathan Cope
75f2086cd8 Refactor makefile into scripts (#246)
* Use bash scripts to handle build workflow in docker containers

Added working docker builder/runner

Added _out to gitignore, stub script files

Added build and test scripts

small tweaks

Remove install opt, no need and create perm issues

Do func test for 'test' recipe, add non-docker option

Added QoL recipe alias, refactored test and build loops

centralized dockerfiles under hack/build/docker, renamed check/pre-check to format

Prefixed cmd/cdi- to main func files, added clean up scipt

simplified controller and importer dockerfiles, removed os/arch from bin name

DOCKER=1 - use docker

Travis and makefile changes

Don't go vet project in 'all' target (error in generated code), finished image builds

Small optimization to cdi-cloner image build

renamed build-images to build-docker; added make image aliases

testing version.sh

travis script calls new make targets, dropped version func (overly engineered for what we need)

deleted shift-tag.sh because it's just bad practice

Fix travis sed command

release :latest on PR merge

* Functional test refactoring

Removed test output files

renamed file vars to reflect purpose

Condensed test table definition, create tmp dir per test iteration

Refactored convertion funcs to write to a given directory, changed datastream test to create a temp dir and pass to file conversion, removed unused func

use randAlpahNum for tmp dir suffix, pepper in debug code

Must copy source file to tmp dir, then gzip/xzip, added debug code, package URL is deforming the file:// path by treating path[0] element as the server root

Fixed xz, gzip, tar, and noop test file generation; added copy of src to test dir if not present

Fixed typo in qemu-img cmd

Removed commented out line

* Added vet make target, updated hack/README

Make recipe call vet recipe

Updated hack/README

Makefile alias fix, clean all bin and _out except .gitignore, reverted 'vet' go_opt behavior

pulled 'vet' references from readme until it is fixed later

Don't delete the entire repo if _out doesn't exist,

* Moved clone script to cmd/ to make build flow smoother, now copy Dockerfiles to respective _out/cmd/* dirs for building container, delete old.Makefile

* Solidify build scripts

Text typos and comment additions

change cp glob to Dockerfile

Added push target to push images to non-kubevirt repo, updated README

Added license blocks, updated README with make vars, deleted empty script files

Added license to Makefile

Tweaked travis.yaml, removed version file (unused)

Fixed source paths

Fixing travis script sourcing

Moved shebang to line 1

Fixed shfmt install

Changed cloner script path in format.sh

Filter our vendor and pkg/client on go vet

Fix shfmt install in container, containerized clean target

Re-added Z opt to bind-mount

removed duplicate source line

Fix shfmt var expansion

formatting

Add non-docker cleanup optino
2018-07-20 09:25:53 -07:00