Git Product home page Git Product logo

launcher-operator's Introduction

Launcher Operator

This operator helps enabling the Launcher on an Openshift cluster.

Give cluster admin permissions to the user <user>

The user needs cluster-admin permissions to install the Launcher operator

$ oc adm policy --as system:admin add-cluster-role-to-user cluster-admin <user>

Create a namespace / project where to create the launcher

Install the Launcher operator

Login with the OpenShift client using a user with cluster-admin permissions.

$ oc login

Clone this repository:

$ git clone https://github.com/fabric8-launcher/launcher-operator
$ cd launcher-operator

Choose the project that will run the operator and then install all the operator resources, or create a new project:

$ oc new-project launcher-infra

Install the Launcher operator

$ oc create -R -f ./deploy

Install the Launcher (via the installed operator)

  1. Log into GitHub and create a OAuth Application for the Launcher named 'launcher': -- https://github.com/settings/applications/new

    • Using http://temporary as 'Homepage URL' an 'Authorization callback URL' (You will know the frontend url later)
  2. Create a secret for your GitHub Oauth settings

$ oc create secret generic launcher-oauth-github --from-literal=clientId=<YOUR_GITHUB_OAUTH_APP_CLIENT_ID> --from-literal=secret=<YOUR_GITHUB_OAUTH_APP_CLIENT_SECRET>
  1. Customize the Launcher Resource with your OpenShift Console URL and create it
$ oc create -f example/launcher_cr.yaml
  1. Get the Launcher URL:
$ oc get route launcher --template={{.spec.host}}
  1. Create a OAuth client in OpenShift:
$ cat <<EOF | oc create -f -
kind: OAuthClient
apiVersion: oauth.openshift.io/v1
metadata:
  name: launcher
secret: my-secret-password
redirectURIs:
  - "https://$(oc get route launcher --template={{.spec.host}})"
grantMethod: prompt
EOF
  1. Edit you GitHub OAuth application, created in step 1, and set both the 'Homepage URL' and 'Authorization callback URL' to the launcher frontend URL, retrieved in step 4.

Example Launcher CR

Find an example of the Launcher CR in example/launcher_cr.yaml


Develop

Install the operator-sdk using the instructions.

Register the crd:

$ oc create -f deploy/crds/launcher_v1alpha2_launcher_crd.yaml  

Install dependencies:

$ dep ensure -v

Start the operator (just restart this command to apply your changes):

operator-sdk up local --namespace myproject

Run this command when changing the API types (pkg/apis/launcher/v1alpha2/launcher_types.go)

operator-sdk generate k8s

Then create your launcher CR and watch the logs in the console output.

Update the launcher template to the latest version from GitHub

$ ./update-template.sh

Build and push the operator to registry

$ operator-sdk build fabric8/launcher-operator:vX.Y.Z
$ docker push fabric8/launcher-operator:vX.Y.Z

Update the version in the operator yaml file and push it.

launcher-operator's People

Contributors

ia3andy avatar gastaldi avatar edewit avatar matskiv avatar tqvarnst avatar dependabot-preview[bot] avatar chrira avatar jameelb avatar quintesse avatar nagesh4193 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.