Git Product home page Git Product logo

cdap-operator's Introduction

Kubernetes operator for CDAP

Project Status

Alpha

The CDAP Operator is still under active development and has not been extensively tested in production environment. Backward compatibility of the APIs is not guaranteed for alpha releases.

Prerequisites

  • Version >= 1.9 of Kubernetes.
  • Version >= 6.0.0 of CDAP

Quick Start

Build and Run Locally

You can checkout the CDAP Operator source code, build and run locally. To build the CDAP Operator, you need to setup your environment for the Go language. Also, you should have a Kubernetes cluster

  1. Checkout CDAP Operator source
    mkdir -p $GOPATH/src/cdap.io
    cd $GOPATH/src/cdap.io
    git clone https://github.com/cdapio/cdap-operator.git
    cd cdap-operator
    
  2. Generates and install the CRDs
    make install
    
  3. Compiles and run the CDAP Operator
    make run
    
  4. Deploy CDAP CRD to the cluster
    kubectl apply -k config/crd
    
  5. Edit the sample CDAP CR and deploy to the cluster
    kubectl apply -f config/samples/cdap_v1alpha1_cdapmaster.yaml
    

Build Controller Docker Image and Deploy in Kubernetes

You can also build a docker image containing the CDAP controller and deploy it to Kubernetes.

  1. Build the docker image
    IMG=cdap-controller:latest make docker-build
    
    You can change the target image name and tag by setting the IMG environment variable.
  2. Push the docker image
    IMG=cdap-controller:latest make docker-push
    
  3. Deploy CDAP CRD and RBAC to the cluster
    make deploy
    

Using CDAP operator to manage CDAP instances in Kubernetes

A step by step guide of running CDAP in Kubernetes using CDAP operator can be found in the blog post.

Running Unit Tests

  1. Install kubebuilder.

  2. Install setup-envtest by running:

go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
  1. After installing setup-envtest, use it to download envtest 1.19.x for kubebuilder and to set your KUBEBUILDER_ASSETS environment variable:
# Downloads envtest v1.19.x and writes the export statement to a temporary file
$(go env GOPATH)/bin/setup-envtest use -p env 1.19.x > /tmp/setup_envtest.sh
# Sets the KUBEBUILDER_ASSETS environment variable
source /tmp/setup_envtest.sh
# Deletes the temporary file
rm /tmp/setup_envtest.sh
  1. Run make test

cdap-operator's People

Contributors

chtyim avatar wyzhang avatar jayfjin avatar dli357 avatar arjan-bal avatar zbj6266 avatar barney-s avatar rmstar avatar sebastienguavus avatar edvinas-maciulis 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.