Console Application for Kabanero
Please view our contribution guidelines for the Kabanero.io console.
This will only run the front end code (with hot reloading). These are the files under src/main/content/
. If you want the whole server running see Develop the full server.
./scripts/jekyll_serve_dev.sh
This will run the server in liberty's 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. To develop the front end see Develop the front end.
export PAT=<YOUR_GITHUB_PERSONAL_ACCESS_TOKEN>
./scripts/build_jekyll_maven.sh
mvn liberty:dev
https://localhost:9443
See Configuring the Kabanero Console with OAuth
oauth
, create it.Create a file oauth/social_login_dev.xml
add copy the below in.
<server>
<featureManager>
<feature>socialLogin-1.0</feature>
<feature>appSecurity-2.0</feature>
</featureManager>
<githubLogin
userApi="https://api.github.com/user"
userNameAttribute="login"
clientId="YOUR_ID"
clientSecret="YOUR_SECRET"
tokenEndpoint="https://github.com/login/oauth/access_token"
authorizationEndpoint="https://github.com/login/oauth/authorize"
scope="repo admin:org user"
/>
</server>
YOUR_ID
and YOUR_SECRET
with your GitHub ID and Secret from the first step.
userApi
, tokenEndpoint
, and authorizationEndpoint
fields as well.target
dir exists, if not, run: mvn liberty:create
mkdir -p target/liberty/wlp/usr/servers/defaultServer/configDropins/defaults/
cp oauth/social_login_dev.xml target/liberty/wlp/usr/servers/defaultServer/configDropins/defaults/
social_login_dev.xml
already
export USER_API=
export AUTHORIZATION_ENDPOINT=
export TOKEN_ENDPOINT=
export WEBSITE=
mvn liberty:dev
Builds the base application. If you would like the optional OAuth feature enabled, follow Configure GitHub OAuth for Docker builds before running the build script.
./ci/build.sh
For production you do not need to mount the kube config, or add the -u 0
parameter.
oc
CLI.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
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.
If you would like to setup GitHub OAuth for local development follow these steps:
oauth
directory in the root of this repository.clientID
and place your GitHub OAuth ID in it and save.clientSecret
and place your GitHub OAuth secret in it and save..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
TOKEN_ENDPOINT
and AUTHORIZATION_ENDPOINT
should be the same (except the hostname) and USER_API
should be https://<YOUR_HOSTNAME>/api/v3/user
./ci/build.sh
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