Giter Club home page Giter Club logo

hyperconverged-cluster-operator's Introduction

Build Status Go Report Card Coverage Status

Hyperconverged Cluster Operator

The goal of the hyperconverged-cluster-operator (HCO) is to provide a single entrypoint for multiple operators - kubevirt, cdi, networking, ect... - where users can deploy and configure them in a single object. This operator is sometimes referred to as a "meta operator" or an "operator for operators". Most importantly, this operator doesn't replace or interfere with OLM. It only creates operator CRs, which is the user's prerogative.

Installing HCO Community Operator (OpenShift Only)

The Hyperconverged Cluster Operator is published as a Community Operator in Operatorhub.io. In the UI, you can search for it under the "OperatorHub" tab or deploy from the commandline:

$ curl https://raw.githubusercontent.com/kubevirt/hyperconverged-cluster-operator/master/deploy/hco.yaml | kubectl create -f -

Installing Unreleased Bundles Using Marketplace

The hyperconverged cluster operator will publish the lastest bundles to quay/kubevirt-hyperconvered/hco-operatohub before publishing to operatorhub.io.

Make the unreleased bundles available in Marketplace by adding the app registry:

# Remove the hco-bundle from the community-operators sources
$ kubectl get operatorsource -n openshift-marketplace community-operators -o yaml | sed "s/hco-operatorhub,//" | kubectl apply -f -
$ kubectl get catalogsourceconfig -n openshift-marketplace community-operators  -o yaml | sed "s/hco-operatorhub,//" | sed "s/hco-operatorhub\:*,//" | kubectl apply -f -

# Add the unreleases bundle source
$ curl https://raw.githubusercontent.com/kubevirt/hyperconverged-cluster-operator/master/tools/quay-registry.sh | bash -s $QUAY_USERNAME $QUAY_PASSWORD

Using the HCO without OLM or Marketplace

Run the following script to apply the HCO operator:

$ curl https://raw.githubusercontent.com/kubevirt/hyperconverged-cluster-operator/master/deploy/deploy.sh | bash

Developer Workflow

If you want to make changes to the HCO, here's how you can test your changes through OLM.

Build the HCO container using the Makefile recipes make container-build and make container-push with vars IMAGE_REGISTRY, OPERATOR_IMAGE, and IMAGE_TAG to direct it's location.

To use the HCO's container, we'll use a registry image to serve metadata to OLM. Build and push the HCO's registry image.

export REGISTRY_NAMESPACE=<container_org>
export TAG=example
make bundleRegistry

Create the namespace for the HCO.

kubectl create ns kubevirt-hyperconverged

Create an OperatorGroup.

cat <<EOF | kubectl create -f -
apiVersion: operators.coreos.com/v1alpha2
kind: OperatorGroup
metadata:
  name: hco-operatorgroup
  namespace: kubevirt-hyperconverged
EOF

Create a Catalog Source.

cat <<EOF | kubectl create -f -
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: hco-catalogsource
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: docker.io/$REGISTRY_NAMESPACE/hco-registry:$TAG
  displayName: KubeVirt HyperConverged
  publisher: Red Hat
EOF

Create a subscription.

cat <<EOF | kubectl create -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: hco-subscription
  namespace: kubevirt-hyperconverged
spec:
  channel: "0.0.3"
  name: kubevirt-hyperconverged
  source: hco-catalogsource
  sourceNamespace: openshift-marketplace
EOF

Create an HCO CustomResource, which creates the KubeVirt CR, launching KubeVirt, CDI, Network-addons, and SSP.

kubectl create -f deploy/hco.cr.yaml -n kubevirt-hyperconverged

Create a Cluster & Launch the HCO

  1. Choose the provider
#For k8s cluster:  
$ export KUBEVIRT_PROVIDER="k8s-1.15.1"
#For okd cluster:
$ export KUBEVIRT_PROVIDER="okd-4.1"
  1. Navigate to the project's directory
$ cd <path>/hyperconverged-cluster-opertor
  1. Remove an old cluster
$ make cluster-down
  1. Create a new cluster
$ make cluster-up
  1. Clean previous HCO deployment and re-deploy HCO
    (When making a change, execute only this command - no need to repeat steps 1-3)
$ make cluster-sync

Command-Line Tool

Use ./cluster-up/kubectl.sh as the command-line tool.
For example:

$ ./cluster-up/kubectl.sh get pods --all-namespaces

hyperconverged-cluster-operator's People

Contributors

annastopel avatar arachmani avatar booxter avatar danielerez avatar davidvossel avatar djzager avatar ffromani avatar irosenzw avatar jmontleon avatar jwmatthews avatar ksimon1 avatar lukas-bednar avatar lveyde avatar mareklibra avatar marsik avatar mosermichael avatar oshoval avatar phoracek avatar rmohr avatar rwsu avatar slintes avatar stu-gott avatar tiraboschi avatar tripledes avatar yanirq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.