Code Monkey home page Code Monkey logo

kabanero-landing's Introduction

Introduction

Console Application for Kabanero

Contributing to the landing page

Please view our contribution guidelines for the Kabanero.io console.

Community

Run in dev mode

  1. Package the jekyll frontend. From the repository's root directory:
  2. Run: mvn liberty:dev
    • The app will be available at https://localhost:9443
    • This will run the server in dev mode which provides hot reloading for server side changes. Updates to the frontend files (html, css, js) won't be reloaded in this current setup. Instead, you want to develop the frontend with hot reloading you can run ./scripts/jekyll_serve_dev.sh which will hot reload for frontend updates only.

Docker

Build

./ci/build.sh

Run for development purposes

For production you do not need to mount the kube config, or add the -u 0 parameter.

  1. Ensure Kabanero is installed on your cluster

  2. Login to your cluster using the oc CLI.

  3. Run the docker image produced from the build step above:

    docker run --rm -p 9443:9443 -v ~/.kube/config:/root/.kube/config -u 0 landing:latest
    

Configure GitHub OAuth

To manage your stacks via this console you must configure OAuth to your GitHub. When OAuth is configured properly, you will see "Manage Stacks" button on the instance page inside the stacks tile UI.

Configure GitHub OAuth for production

To start, an OAuth GitHub app will need to be created in the same GitHub organization that your stack hub is in.

  • If the OAuth GitHub app and the Stacks repository need to be in different GitHub orgs, then the OAuth GitHub app can request access to data in the org with the stacks. For more infomrmation see the GitHub doc - OAuth App Access and Restrictions
  1. In your GitHub organization, create an OAuth Application in Settings -> Developer settings -> OAuth Apps

    • The application name can be anything, a suggestion is: kabanero console.
    • Homepage URL can be anything for now since the application doesn't exist yet, you can come back and fill this in
    • Authorization callback URL is https://<YOUR_HOST_IP_PORT>/ibm/api/social-login/redirect/githubLogin
      • If you do not know the full application host and port yet, you can come back and fill this in later.
    • Note the Client ID and Client Secret as you will need this when installing your Kabanero CRD
  2. In the Kabanero namespace create a secret named: kabanero-github-oauth-secret

    • Note: The secret name must be exact.
  3. Add two key value pairs to the secret. Note: the key names must be exact.

    • key: clientID and the value is your client ID from GitHub.
    • key: clientSecret and the value is your client secret from GitHub.
  4. Restart (delete) the kabanero landing pod.

Configure GitHub OAuth for local development

If you would like to setup GitHub OAuth for local development follow these steps:

  1. Create a GitHub OAuth App in your GitHub Organization that has your stack hub. See step 1 in Create a GitHub OAuth application for more info.
    • This will give you your GitHub OAuth ID and GitHub OAuth secret for the configuration below.
  2. Fork and clone this repository.
  3. Create an oauth directory in the root of this repository.
  4. Create 3 files inside the oauth directory:
    1. clientID and place your GitHub OAuth ID in it and save.
    2. clientSecret and place your GitHub OAuth secret in it and save.
    3. .env, and copy the below env vars into it. Change the values if you want to point to a different GitHub server. *
      USER_API=https://api.github.com/user
      TOKEN_ENDPOINT=https://github.com/login/oauth/access_token
      AUTHORIZATION_ENDPOINT=https://github.com/login/oauth/authorize
      WEBSITE=https://github.com
      
      • For GitHub Enterprise both TOKEN_ENDPOINT and AUTHORIZATION_ENDPOINT should be the same (except the hostname) and USER_API should be https://<YOUR_HOSTNAME>/api/v3/user
  5. Build and run the image.
    1. Build the image
      • From the root of this repo run: ./ci/build.sh
    2. Run the image
      • cd to the root of this repository then run: docker run --rm -p 9443:9443 -v ~/.kube/config:/root/.kube/config -v "$(pwd)/oauth":/etc/oauth --env-file "$(pwd)/oauth/.env" -u 0 landing:latest

kabanero-landing's People

Contributors

alohr51 avatar dependabot[bot] avatar kidus60 avatar ksee04 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.