{"id":15103297,"url":"https://github.com/fabric8-launcher/launcher-application","last_synced_at":"2025-09-27T01:30:53.999Z","repository":{"id":37262485,"uuid":"111528311","full_name":"fabric8-launcher/launcher-application","owner":"fabric8-launcher","description":"The fabric8-launcher application","archived":true,"fork":false,"pushed_at":"2022-12-14T20:44:55.000Z","size":39765,"stargazers_count":18,"open_issues_count":105,"forks_count":53,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-21T09:04:34.717Z","etag":null,"topics":["github-client","keycloak-client","openshift-client","quarkus"],"latest_commit_sha":null,"homepage":"https://developers.redhat.com/launch/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabric8-launcher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-21T09:35:55.000Z","updated_at":"2024-05-29T12:10:07.000Z","dependencies_parsed_at":"2023-01-29T01:02:35.679Z","dependency_job_id":null,"html_url":"https://github.com/fabric8-launcher/launcher-application","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabric8-launcher%2Flauncher-application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabric8-launcher%2Flauncher-application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabric8-launcher%2Flauncher-application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabric8-launcher%2Flauncher-application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabric8-launcher","download_url":"https://codeload.github.com/fabric8-launcher/launcher-application/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219871824,"owners_count":16554457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-client","keycloak-client","openshift-client","quarkus"],"created_at":"2024-09-25T19:23:15.173Z","updated_at":"2025-09-27T01:30:52.065Z","avatar_url":"https://github.com/fabric8-launcher.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fabric8-Launcher Application\n\n[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\u0026identifier=111528311)](https://dependabot.com)\n[![Project Chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://launcher.zulipchat.com/)\n\nThis is a [Quarkus](https://quarkus.io) application exposing a Web front-end and several JAX-RS endpoints to handle launching of application into Openshift. This application collects from an end user the information needed to generate a Zip file containing a project populated for any runtime\n(see https://github.com/fabric8-launcher/launcher-booster-catalog for the full list).\n\nThe OpenAPI 3.0 descriptor for these services is available at https://editor.swagger.io/?url=https://forge.api.openshift.io/openapi\n\nHow to install\n--------------\n\nIf you want to install a stable release of the Launcher in your OpenSHift environment read the\n[instructions here](https://github.com/fabric8-launcher/launcher-charts).\n\nThe rest of the README is for those wanting to build from source and/or contribute.\n\nChat\n-----\nWe're in ZulipChat! Join us now at https://launcher.zulipchat.com/\n\nContributions\n-------------\n\nContributions are welcome!\n\nPlease read the [Contributing Guide](./CONTRIBUTING.md) to help you make a great contribution.\n\nSetting up the environment\n--------------------------\n\n* You have to setup environment variables before you start the back-end. \n\n\u003e You can source, or use as an example, the environment script template located there: [./launcher-env-template.sh](./launcher-env-template.sh)\n\n```bash\n$ source ./launcher-env-template.sh\n```\n\n\u003e You can select the development mode to use by setting the `LAUTH` environemnt variable to either `TOKEN` (the default), `OAUTH` or `KEYCLOAK` before sourcing the script.\n\n\u003e [KeyCloak](http://www.keycloak.org/) adds authentication to the Launcher and secures services with minimum fuss. No need to deal with storing users or authenticating users. It's all available out of the box.\n\u003e For development only, you can choose to work without KeyCloak by changing the option in the environment script.\n\u003e If you are not using KeyCloak, you can find information on how to [setup your git providers default credentials](README.md#setup-git-providers-default-credentials-no-keycloak-mode).\n\n \nIDE Setup\n---------\n\n * *Immutables* - Setup your IDE for dealing with generated immutable classes see the\n   [online documentation](https://immutables.github.io/apt.html). You have to build the project at least\n   once for the classes to be generated or you will still get errors in the IDE.\n\nBuild and Run the Application\n-----------------------------\n\n* First follow the environment setup [instructions](README.md#setting-up-the-environment). \n\n* Build this project:\n```bash\n$ mvn clean install\n```\n\n* Run:\n```bash\n$ java -jar web/target/launcher-runner.jar\n```\n\nBuild and Run the Unit Tests\n----------------------------\n\n* First follow the environment setup [instructions](README.md#setting-up-the-environment). \n\n* Execute:\n```bash\n$ mvn clean install\n```\n        \nBuild and Run the Unit and Integration Tests\n--------------------------------------------\n\n* First follow the environment setup [instructions](README.md#setting-up-the-environment).\n\n* To build the project and run the integration tests, allowing Maven to start the server:\n```bash\n$ mvn clean install -Pit\n```\n\n* To skip building and just run the integration tests, allowing Maven to start the server:\n```bash\n$ mvn integration-test -Pit\n```\n\nReindex the booster catalog\n---------------------------\n\nRun the following command, replace TOKEN with the value defined in the environment variable `LAUNCHER_BACKEND_CATALOG_REINDEX_TOKEN`. Doesn't need to be specified if the environment variable doesn't exist in the running environment:\n\n        $ curl -v -H \"Content-Type: application/json\" -d '{}' -X POST  https://localhost:8180/api/booster-catalog/reindex\\?token\\=TOKEN\n        \n        \nSetup git providers default credentials (TOKEN mode)\n----------------------------------------------------------\n\n#### GitHub\n\n* Log into GitHub and generate an access token for use here:\n--  https://github.com/settings/tokens\n    * Set scopes\n        * `repo`\n        * `admin:repo_hook`\n        * `delete_repo`\n* Run the following commands:\n ```bash\n git config --global github.user \"\u003creplace with your github username\u003e\"\n git config --global github.token \"\u003creplace with your github token\u003e\"\n ```\n\n#### GitLab\n \n* Log into GitLab and generate an access token for use here: \n--  https://gitlab.com/profile/personal_access_tokens\n    * Set scopes\n        * `api`\n        * `read_user`\n* Run the following commands:\n ```bash\n git config --global gitlab.user \"\u003creplace with your gitlab username\u003e\"\n git config --global gitlab.token \"\u003creplace with your gitlab token\u003e\"\n ```\n\n#### BitBucket\n\n\n* Log into Bitbucket and generate an application password for use here: \n--  https://bitbucket.org/account/admin/app-passwords\n    * Activate permissions:\n        * Account: Email, Read\n        * Team: Read\n        * Projects: Read\n        * Repositories: Read, Write, Admin, Delete\n        * Pull requests: Read\n        * Issue: Read\n        * Webhook: Read and write\n* Run the following commands:\n ```bash\n git config --global bitbucket.user \"\u003creplace with your github username\u003e\"\n git config --global bitbucket.password \"\u003creplace with your bitbucket application password\u003e\"\n ```\n\n#### Gitea\n\nLauncher accesses Gitea using the [Sudo](https://docs.gitea.io/en-us/api-usage/) feature, so make sure that the user referenced in the `Authorization` HTTP Header also exists in the Gitea server \n  \n* Logged as an admin user, generate an access token (eg. https://try.gitea.com/user/settings/applications).\n* You need to provide 3 environment variables when running the backend:\n\n|Environment |Description|\n|------------|-----------|\n|`LAUNCHER_GIT_PROVIDER`|The default Git provider to use, should be `Gitea`|\n|`LAUNCHER_MISSIONCONTROL_GITEA_URL`|The URL where the Gitea server is running|\n|`LAUNCHER_MISSIONCONTROL_GITEA_USERNAME`| The admin username|\n|`LAUNCHER_MISSIONCONTROL_GITEA_TOKEN`|The admin access token|\n\nSetup using OAuth (OAUTH mode)\n------------------------------\n\nYou can set the proper environment variables for local development with OAuth like this:\n\n```bash\n$ LAUTH=OAUTH source ./launcher-env-template.sh\n```\n\nBut you also need to add an `OAuthClient` to your OpenShift cluster. You can run the following command while being logged in with a user that has cluster admin rights:\n\n```bash\n$ cat \u003c\u003cEOF | oc create -f -\nkind: OAuthClient\napiVersion: oauth.openshift.io/v1\nmetadata:\n  name: launcher\nsecret: my-secret-password\nredirectURIs:\n  - \"http://localhost:8080\"\ngrantMethod: prompt\nEOF\n```\n\nAnd depending on the Git provider you're using you'll also have to follow the steps in one of the following sections:\n \n#### GitHub\n\nCreate an [OAuth App](https://github.com/settings/developers) named \"launcher\" and set the `Authorization callback URL`\nto the (base) URL of the Launcher frontend. If you're testing locally this would be `http://localhost:8080/launch` for example.\n\nThen copy the `Client ID` and `Client Secret` values to their corresponding fields in the GitHub section of the\n[git-providers.yml](/fabric8-launcher/launcher-application/master/git-providers.yaml) file.\n\n#### GitLab\n\nCreate an [OAuth App](https://gitlab.com/profile/applications) named \"launcher\", mark \"Confidential\" and \"api\" and set the\n`Callback URL` to the (base) URL of the Launcher frontend. If you're testing locally this would be `http://localhost:8080/launch`\nfor example.\n\nThen copy the `Client ID` and `Client Secret` values to their corresponding fields in the GitLab section of the\n[git-providers.yml](/fabric8-launcher/launcher-application/master/git-providers.yaml) file. Also copy the `Callback URL`\nto the `clientProperties / redirectUri`.\n\nFiltering the booster catalog\n-----------------------------\n\nThis feature can be activated by providing the `LAUNCHER_BOOSTER_CATALOG_FILTER` env param/system property\nThe script must evaluate to a boolean using the `booster` variable, that is an instance of [RhoarBooster](https://github.com/fabric8-launcher/launcher-booster-catalog-service/blob/master/src/main/java/io/fabric8/launcher/booster/catalog/rhoar/RhoarBooster.java).\n\n        $ export LAUNCHER_BOOSTER_CATALOG_FILTER=booster.mission.id === 'rest-http'\n\nExamples:\n\n- `booster.mission.id == 'rest-http'`: will return only HTTP Rest mission boosters\n- `booster.runtime.id == 'spring-boot'`: returns only the Spring Boot boosters\n- `booster.mission.id == 'rest-http' \u0026\u0026 booster.runtime.id` == 'spring-boot': returns only HTTP Rest Spring Boot boosters\n- `booster.metadata.istio`: returns only boosters that contains the `istio: true` flag in the booster metadata\n- `booster.mission.metadata.istio`: returns only boosters that contains the `istio: true` flag in the mission metadata assigned to the booster\n\n\nMulti-tenant (User impersonation)\n---------------------------------\nIn a single multi-tenant cluster, the Keycloak used to authenticate in Launcher may be the same as the one used in OpenShift.\nIn this case, Launcher shouldn't require Keycloak to be configured with OpenShift as an identity provider.\nLauncher supports that using a ServiceAccount with user impersonation.\n\nMore info in https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation\n\nHere are the steps to configure:\n\n1) Create an impersonator cluster role as described below (it can be any name, as long as it contains the `impersonate` verb):\n\n    ```\n    apiVersion: rbac.authorization.k8s.io/v1\n    kind: ClusterRole\n    metadata:\n      name: impersonator\n    rules:\n    - apiGroups: [\"\"]\n      resources: [\"users\", \"groups\", \"serviceaccounts\"]\n      verbs: [\"impersonate\"]\n    ```\n\n2) Create a ServiceAccount in the cluster with the impersonator cluster role\n3) Set the `LAUNCHER_MISSIONCONTROL_OPENSHIFT_TOKEN` env in the launcher-backend pointing to the token corresponding to the ServiceAccount created in step 2\n4) Set the `LAUNCHER_MISSIONCONTROL_OPENSHIFT_IMPERSONATE_USER` env var to true meaning that launcher will impersonate the current logged user from the ServiceAccount\ncreated in step 2 when connecting to OpenShift\n\n\nCode of Conduct\n-------------\n\nPlease adopt our [Code of Conduct](./CODE_OF_CONDUCT.md) to follow our community standards, signal a welcoming and inclusive project, and outline procedures for handling abuse.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabric8-launcher%2Flauncher-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabric8-launcher%2Flauncher-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabric8-launcher%2Flauncher-application/lists"}