This README will explain how to install the Launcher using a Helm Chart. This Helm Chart will create all the necessary services in OpenShift to run the application.
Before you start any installation make sure that:
-
You’ve got Helm installed
-
You are logged in using
oc login
-
You have created a project (eg. by using
oc new-project
)
And when using OAuth the user that does the installation will also need cluster admin rights:
$ oc adm policy --as system:admin add-cluster-role-to-user cluster-admin <user>
To be able to install the Launcher we first need to add the Launcher chart repository, running the following:
helm repo add launcher https://fabric8-launcher.github.io/launcher-charts/stable
helm repo update
And now we can install the Launcher Chart, run:
helm install my-launcher launcher/launcher --disable-openapi-validation
Now by default this won’t actually install a fully working version of the Launcher because if you want more than the possibility of downloading code and you also want the Launcher to push code to Git and deploy the applications on OpenShift you will need to configure one of the Authentication mechanisms.
All possible configuration options can be found here: values.yaml
Single configuration values can be set by passing them on the command line, like --set key=value
, but that soon
becomes unwieldy so in that case it’s best to create a .yaml file with al the required settings and pass them like this:
-f ./my-config-values.yaml
There are 3 possible authentication methods that can be configured: KeyCloak, OAuth and direct (which is single-user and uses either token or user/password authentication). Each of those options needs different values to be set, which we’ll explain below.
The auth
configuration setting must be set to keycloak
for this. Then you need to configure the settings in the
keycloak
section. Take a look at the keycloak-openshiftio-values.yaml file
to get some idea what’s needed.
TBD: Some more documentation.
The auth
configuration setting must be set to oauth
for this. Then you need to configure the settings in the
oauth
and gitProvider
sections. Read this OAuth Setup explanation.
You can also take a look at the contents of this file: local-crc-dev-values.yaml to get an idea.
TBD: Some more documentation.
Warning: This authentication method is only for local development purposes. It can only ever handle a single a single user and is therefore not suited for non-local deployment.
The auth
configuration setting must be set to direct
for this. Then you need to configure the settings in the
openshift
and legacyGitProvider
sections. Read this Token Setup
explanation.
If you want to install the very latest version of the Launcher and the Welcome App or if you have made changes to tha chart that you want to test you can also install the Launcher directly from the chart directory by running the following (assuming your current directory is the same as where this README lives):
helm install launcher ./stable/launcher --disable-openapi-validation
As mentioned above, by default the local Chart will use the latest versions from master for both the Launcher and the
Welcome Application, if an the other ahnd you want to use the latest stable versions instead, add the following argument
to the helm install
command above:
-f ./release-values.yaml
You can do this by running:
./make-release
If you run it like this it will tell you it needs two arguments: a chart version and an app vrsion. It will also show what the current values for those two are. When you create a new release you must always increment the chart version in some way. The app version can stay the same if the Launcher itself hasn’t changed.
An example:
$ ./make-release
Missing arguments
Usage: make-release <new-chart-version> <new-app-version>
Current versions:
version: 1.0.0
appVersion: 202004230029
$ ./make-release 1.0.1 202004301435
.....
..... (some output here that shouldn't have any errors)
.....
If everything went okay and there are no errors you should now be in the 'gh-pages' branch.
You can now push the changes, switch back to master and push the changes there as well.