1
0
mirror of https://github.com/oVirt/ovirt-openshift-extensions.git synced 2026-02-05 09:46:02 +01:00

61 Commits

Author SHA1 Message Date
Roy Golan
cdaee7159f Update cloud provider to ubi8 minimal 2019-07-28 11:00:20 +03:00
Roy Golan
a91f298dde Update volume provisioner to ubi8 minimal 2019-07-28 11:00:20 +03:00
Roy Golan
08ab013aea Distribute the container using RHEL 8 UBI
Rebuild and disttribute all the containers using the universal base image, a free
redistributable container image, based on RHEL 8. 
Read here for more details - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/building_running_and_managing_containers/index
2019-07-28 11:00:20 +03:00
Roy Golan
e8af43dbac build: Support multi-stage builds
Motivation
Publish smaller containers, less time to download, less time to build, less CVEs, less deps

Modification
Use multi-stage syntax in Dockerfiles - requires docker >= 17.05
Tweak the automation.yaml to run on hosts that has the proper docker
version

Result
Smaller containers

Signed-off-by: Roy Golan <rgolan@redhat.com>
2019-06-06 01:03:30 +03:00
Roy Golan
85fff731e6 apb: Use env variables to compoes the image name
Fixes: https://github.com/oVirt/ovirt-openshift-extensions/issues/118

Signed-off-by: Roy Golan <rgolan@redhat.com>
2019-03-11 17:09:00 +02:00
Roy Golan
0e7be4eed3 flex: Make sure the entrypoint.sh removes the old directory
On redeployment, the entrypoint should remove the old directory
and recreate it.

Signed-off-by: Roy Golan <rgolan@redhat.com>
2019-01-16 14:37:40 +02:00
Roy Golan
cc21989868 flex: identify the vm by the system uuid
fixes: #100

Signed-off-by: Roy Golan <rgolan@redhat.com>
2019-01-16 12:18:52 +02:00
Roy Golan
ed00630555 Update test-flex-pod-all-in-one.yaml 2019-01-03 19:19:54 +02:00
Roy Golan
ee93918992 Add version release info for ovirt-flexvolume-driver-apb
Fixes: #91

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-12-28 02:47:30 +02:00
Roy Golan
a73daa7dee ovirt-api: omit empty values for the create disk call
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-12-27 15:25:52 +02:00
Roy Golan
d050ba42ee Proper thin/thick provisioing behaviour
Motivation
The provisioner should allow thin/thick provisioning of disk, according
to what ovirt supports. Till now the support was through
'ovirtDiskFormat' parameter, and this is now dropped.
If a thin or thick disk is wanted, is is expected using a flag,
ovirtThinProvisioning, true by default.

Modification
- 'ovirtDiskFormat' parameter is dropped from the storage class
- 'ovirtDiskThinProvisioning' parameter, default true is expected.
The api will set the underlying disk format (raw/cow) according to the
storage domain tyep (iscsi/fc/nfs/cluster)

Result
For a thin provision disk, either don't pass nothing or
ovirtDiskThinProvioning=true
If the target ovirt storage domain is ISCSI or FC the disk format type
will be 'cow' and the sparse=true
If the target domain is NFS or Gluster the format is 'raw' and
sparse=true
For ovirtDiskProvisioning=false then the disk format is 'raw' and
sparse=false

fixes: #93
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-12-23 14:46:19 +02:00
Roy Golan
e287d20033 volume-provisioner: use "ovirt-volume-provisioner" in the metadata
The canonical name is now used in the provisioner code and expected to
be used everywhere:
- when creating a storage class, use "provisioner:
ovirt-volume-provisioner"
- when the a volume is created, a lable named "created-by:
ovirt-volume-provisioner will be used"

Examples under the examples directory have been updated accordingly.

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-12-10 22:53:28 +02:00
Roy Golan
edc234db22 Upgrade containers to centso 7.6 golang 1.11
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-12-09 13:18:08 +02:00
Roy Golan
3a63e5c2bf cloud-provider: entrypoint invokes the cloud controller command first
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-11-22 17:38:24 +02:00
Roy Golan
61261cdc30 flex: Excplicitly specify the destination of the conf file
Fixes: #83

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-11-19 15:20:38 +02:00
Roy Golan
8832431052 Best container practices
- base all containers on latest Centos 7.5.1804
- add multi labels according to atomic best practices
  - name
  - version
  - release
  - component
  - summary

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-11-07 22:49:52 +02:00
Roy Golan
d79be7b056 make: generify targets and cleanups
The Makefile is even more generic now, clean, and easy to interact with
and extend.

The main targets are: build, build-containers, push-containers

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-11-07 22:49:52 +02:00
Roy Golan
9676e00994 flex: Fix entrypoint
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-10-15 13:50:33 +03:00
Roy Golan
f2cfd24ac2 Build containers only, no RPMs
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-10-11 14:14:51 +03:00
Roy Golan
66502cc914 Fix the broken apb invocation
Due to latest APB updates, the extra vars passed are expected to be
called as textual json format {"key":"value"} rather then passing them
in the command line.

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-09-17 14:46:27 +03:00
Roy Golan
a4ee93970b Work(push/pull) with quay.io registry
Fixes: #55
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-09-05 12:54:06 +03:00
Roy Golan
f618e87863 Change rpm versioning, don't include "v"
All version will now drop the invalid "v" prefix which is used only to
mark a tag as a version tag.

The build and container creation was adjusted and also generelized to be
simpler, and controlled using variables

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-09-03 18:18:22 +03:00
Roy Golan
da1cc1fa89 cloud-provider: Move from rgolangh/ovirt-k8-cloud-provider
This patch moves the mono-repo under rgolangh to here as
ovirt-cloudprovider.

- Makefile
  - add build
  - add container
  - add rpm
- Compile against k8s 1.11 api (should be compatible with 1.10)

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-08-27 12:57:25 +03:00
Roy Golan
6bf2effe17 flex: Atomically install the flex driver
Perform an atomic move of the folder into the kube volume plugin
directory so the controller will properly initilize it.
I have seen several times the how a initilization is failing and the
plugin isn't registered

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-08-16 15:52:21 +03:00
Roy Golan
e32a2ed399 ci: fixes
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-08-15 14:59:42 +03:00
Roy Golan
572bf99948 Pass OVIRT_VM_NAME env variable during deployment
The flexvolume deployment container will now use OVIRT_VM_NAME env var
in order to set the ovirtVmName config item for the flexvolume driver.

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-08-07 13:22:15 +03:00
Roy Golan
d561afb086 Update test-flex-pod-all-in-one.yaml 2018-08-05 15:11:34 +03:00
Roy Golan
d8ce900497 Create test-flex-pod-all-in-one.yaml 2018-07-12 16:11:10 +03:00
Roy Golan
bb0bda2db1 apb: fix failure of apb_build
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-07-05 23:48:05 +03:00
Roy Golan
9e5eefef00 Include all-in-one test pod in examples
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-07-05 15:32:58 +03:00
Roy Golan
c69b792b1a apb: Use uid 1000 for the apb actions (#41)
Using uid 1000 during the apb invocation using its containers makes sure
that it can see the mounted kubeconfig. This makes it possibly to push
both as a regular and root user.

Signed-off-by: Roy Golan <rgolan@redhat.com>
Fixes: #30
2018-07-03 22:45:28 +03:00
Roy Golan
f2a0b4a8cc Grant cluster-admin for the provisioner user (#36)
Signed-off-by: Roy Golan <rgolan@redhat.com>
Fixes: #31
2018-06-19 18:59:44 +03:00
Roy Golan
ea3693c43b apb: Fix the permission binding for ovirt-volume-provisioner
- fixed a typo in the subject name
- removed the api group specification which defaults to "" for service
accounts

Signed-off-by: Roy Golan <rgolan@redhat.com>
Fixes: https://github.com/oVirt/ovirt-openshift-extensions/issues/29
2018-05-28 09:58:17 +03:00
Roy Golan
c010407845 automation: Build and push the apb container
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-04-29 16:49:34 +03:00
Roy Golan
e4787ab34d Make sure the apb re-copies the conf file from config map
The apb deployment for the driver now copies the config file and the
binary to the (hostpath) kubernetes volume plugin directory on every
container start and that makes sure the latest binary and config is
loaded.

See ovirt-flexdriver/entrypoint.sh

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-04-24 13:43:29 +03:00
Roy Golan
ecb31d9da9 Implement deprovision of the apb
- delete the flex daemonset
- delete the provisioner deployment

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-04-10 12:40:24 +03:00
Roy Golan
93152a5e75 Cleanup the obsoleted ansible container code
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-04-10 12:31:40 +03:00
Roy Golan
e0a69cd263 Container lifecycle cleanup
The project creates 3 container:
1. ovirt-flexvolume-driver
   A container that exist to expose the binary, imediatly sleeps
forever. Used in a daemonset deployment - see the apb.
2. ovirt-volume-provisioner
   A container for the provisioer controller. Used in a deployment - see
apb
3. ovirt-flexvolume-driver-apb
  An apb container that will deploy both the driver and the provisioner.
  One can use the service catalog to push the apb there and use it or
straight from the command line. See more in deployment/README.md
  Its Makefile is currently under deployment/ovirt-flexvolume-driver/Makefile

- rename to ovirt-flexvolume-driver
- *-ansible continar is not replaced with apb
- remove the obsoleted 'binary' container

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-04-09 16:52:55 +03:00
Roy Golan
18ec0586da APB to provision/deprovision on openshift
- Deploy an APB container into your running openshift cluster (3.9)
  see the Dockerfile generated by `apb prepare` under
deployment/ovirt-flexvolume-driver-apb/Dockerfile
- Pick the APB in the service-catalog to deploy the provisioner and
driver
 see deployment/ovirt-flexvolume-driver-apb/playbooks/provision.yml

The APB will deploy both the flexvolume driver as a daemonset,
and the provisioner as a singleton deployment.

Build time requires apb tool to prepare an push the image.

Signed-off-by: Roy Golan <rgolan@redhat.com>
Fixes: https://github.com/rgolangh/ovirt-flexdriver/issues/16
2018-04-09 14:14:45 +03:00
Roy Golan
43279b39f5 create daemonset deployment for flex
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-03-26 12:28:03 +03:00
Roy Golan
57cbbc08bf Adapt container build to use rpm packages
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-03-13 00:33:39 +02:00
Roy Golan
4e5deca932 Dockerfile: Install glide using a package
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-02-21 14:31:42 +02:00
Roy Golan
2b28409ff1 provisioner: deploy latest if not set by a var
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-02-21 14:25:54 +02:00
Roy Golan
568fb5bbdd Remove the default vars from the playbook
The expected vars are documented in the playbook rather then specified
because they override the inventory one.

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-02-21 14:25:54 +02:00
Roy Golan
33d41c6bf9 Respect the PREFIX directive when building the containers
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-02-21 14:25:54 +02:00
Roy Golan
21e0bb3865 Create Deployment containers for flexdriver and provisioner
The release and deployment is totally containerized now and is comprized
out of:
- ovirt-flexdriver-ansible - a container with the flexdriver binary that
consumes an inventory file and will deploy it on the nodes and masters
- ovirt-provisioner-ansible - a container that consumes an inventory and
deploys the ovirt-provisioner pod and all its dependent objects
- ovirt-provisioner - the actual pod that imlements the volume
provisioner api

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-02-19 12:25:33 +02:00
Roy Golan
ffc521fd63 Produce deployment containers for both flexdriver and provisioner
Motivation
Create an easy way to deploy both products by containerising the
deployment into a container, with Ansible playbook built in.

Modification
For provisioner create 2 separate containers - one is the binary, the
actual container application, and the other is 'deployer' which is a
container with and entrypoint that performs ansible playook invocation

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-02-18 17:43:28 +02:00
Roy Golan
9b0261328f provisioner: deploy using Ansible
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-02-13 17:51:31 +02:00
Roy Golan
03a1731ee7 Example files for externally provisioned flex volume
The included yaml files can deploy the provisioner (flex volume needs
ansible atm) plus:
- StorageClass
- Claim
- Test pod and an external volume

Fixes: #6
Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-02-06 00:48:00 +02:00
Roy Golan
8c48b39a2d ovirt-provisioner: k8s deployment - Add the complete set of definisions
Add all the necessary definition files in order to deploy
ovirt-procisioner as a system pod.

Signed-off-by: Roy Golan <rgolan@redhat.com>
2018-02-04 12:23:40 +02:00