{"id":20884994,"url":"https://github.com/windup/windup-openshift","last_synced_at":"2025-05-12T18:31:48.174Z","repository":{"id":25771112,"uuid":"105322249","full_name":"windup/windup-openshift","owner":"windup","description":"OpenShift image construction","archived":false,"fork":false,"pushed_at":"2024-08-07T10:42:55.000Z","size":1382,"stargazers_count":2,"open_issues_count":3,"forks_count":11,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-01T10:11:27.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/windup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-29T22:27:55.000Z","updated_at":"2022-11-04T02:26:45.000Z","dependencies_parsed_at":"2024-04-04T09:25:13.562Z","dependency_job_id":"f6d5f145-1434-4532-8ebe-1de7d13444a3","html_url":"https://github.com/windup/windup-openshift","commit_stats":null,"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windup%2Fwindup-openshift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windup%2Fwindup-openshift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windup%2Fwindup-openshift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windup%2Fwindup-openshift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/windup","download_url":"https://codeload.github.com/windup/windup-openshift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253798188,"owners_count":21966024,"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":[],"created_at":"2024-11-18T08:12:10.249Z","updated_at":"2025-05-12T18:31:47.108Z","avatar_url":"https://github.com/windup.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# windup-openshift: Migration Toolkit for Applications on OpenShift\nThis project is useful if you want to try WINDUP on an OpenShift instance.  \nIf you just want to test WINDUP using the [images](https://quay.io/organization/windupeng) we have made available in the quay.io repository, go straight to the [OpenShift template deployment](#openshift-template-deployment) section.  \nIf you have made some changes to WINDUP and you want to test them on an OpenShift instance, in the next paragraph you'll find all the information for building your own container images so that you're free to test your code.  \n\n## OpenShift image construction\n### Install Docker\nFor building this project and creating Docker images you have to have a Docker instance running locally on your machine so that you can pull the built images.  \nNext you'll find some basic instructions to install Docker based on your local OS.\n#### Install Docker for Fedora\n1. Install Docker: `$ sudo dnf install docker`\n1. Configure `docker` group (ref. [Manage Docker as a non-root user](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user)):\n   1. `$ sudo groupadd docker`\n   1. `$ sudo usermod -aG docker $USER`\n   1. Log out and log back in so that your group membership is re-evaluated\n1. Test Docker is working: `$ docker run hello-world`\n\nFor any issue related to installation, you can refer to [Docker documentation](https://docs.docker.com/install/linux/docker-ce/fedora/).\n#### Install Docker for other OS\nFor any other platform you can follow the detailed instructions provided in the [Install Docker](https://docs.docker.com/install/) guide from Docker.\n### Create an account for Quay.io\nYou need an account on https://quay.io/ in order to push your images and have them available for deployment from the OCP templates.  \nSo sign up yourself to Quay.io at https://quay.io/signin/ taking care that the Quay username you choose will be the `\u003cyour_quay_id\u003e` value in the next steps.\n\n### Create a token on registry.redhat.io (only once)\n1. Login on https://access.redhat.com/login\n2. Go to [Registry Service accounts](https://access.redhat.com/terms-based-registry/)\n3. Create a New Service Account if you don't have one\n4. Click on the service account and go to \"Docker Login\" tab.\n5. Copy the bash command\n6. Paste that command in a shell window on your local machine and execute it\n7. Now your local Docker installation will have the credentials in ~/.docker/config.json\n\n### Create Container images\n1. Build this project: `$ mvn clean install -Ddocker.name.windup.web=\u003cyour_quay_id\u003e/windup-web-openshift -Ddocker.name.windup.web.executor=\u003cyour_quay_id\u003e/windup-web-openshift-messaging-executor`\n1. Push images to docker hub:\n   1. `$ docker login`\n   1. `$ docker push \u003cyour_quay_id\u003e/windup-web-openshift`\n   1. `$ docker push \u003cyour_quay_id\u003e/windup-web-openshift-messaging-executor`\n\nIf you want you can also set the tag for the built images (e.g. if you are working on a specific branch and you want to create images tagged with the branch name), you just have to add the tag name to the `docker.name.windup.web` and `docker.name.windup.web.executor` system properties' values (i.e. from the above example `-Ddocker.name.windup.web=\u003cyour_quay_id\u003e/windup-web-openshift:tag_value -Ddocker.name.windup.web.executor=\u003cyour_quay_id\u003e/windup-web-openshift-messaging-executor:tag_value`)\n\n### Create CLI multi-arch container image\n1. Login to Quay.io container repository executing  \n`$ docker login quay.io`\n1. Build the CLI multi-arch container and push it to Quay repository  \n`$ mvn clean install -DskipTests -f cli/ -Dmulti-arch -Ddocker.name.windup.cli=quay.io/\u003cyour_quay_id\u003e/windup-cli-openshift`\n\n\n### Point to your images\nNow that your images are available on Quay.io repository, you have to reference them in WINDUP template in order to use these images in the deployments.\n1. open [`./templates/src/main/resources/web-template-empty-dir-executor.json`](templates/src/main/resources/web-template-empty-dir-executor.json) in an IDE or text editor\n1. change all the `\"image\"` values to point to `quay.io/\u003cyour_quay_id\u003e/` instead of `quay.io/windupeng/`\n   \n## OpenShift template deployment\nThere are two different ways for deploying WINDUP on OpenShift based upon if you have [`cluster-admin privileges`](https://docs.openshift.org/latest/architecture/additional_concepts/authorization.html#roles): if you have those privileges you can decide to follow [Template deployment in OpenShift catalog](#template-deployment-in-openshift-catalog) (because you can operate on the default `openshift` project) or [Import template in Openshift Web Console](#import-template-in-openshift-web-console) otherwise you can just go with the latter approach ([Import template in Openshift Web Console](#import-template-in-openshift-web-console))\n\n### Choose the template\nThere are different templates available to be imported in your OpenShift instance.\nThe table below summarizes the different use cases for each template\n\n| Template | Requirements | Description                                                                                                                                                 |\n| --- | --- |-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`web-template-empty-dir-executor.json`](templates/src/main/resources/web-template-empty-dir-executor.json) | OpenShift | The recommended template to deploy WINDUP on OCP\u003cbr\u003eThe analysis data between the `executor` pod and the `web console` one are sent using REST web services |\n| [`web-template-empty-dir-executor-shared-storage.json`](templates/src/main/resources/web-template-empty-dir-executor-shared-storage.json) | OpenShift with `ReadWriteMany (RWX)` storage| This template deploys WINDUP on OCP using a shared storage between the `executor` pod and the `web console` one to share the analysis data                  |\n\n### Template deployment in OpenShift catalog\n1. login to Openshift: `$ oc login`\n1. create the template: `$ oc create -f ./templates/src/main/resources/web-template-empty-dir-executor.json -n openshift`\n\nNow, if you go to OpenShift Web Console home page, you'll see  Windup (ref. *screenshot-0*) in the list of the available templates and so you can deploy it to a project just like any other template.\n\n![screenshot-0](docs/catalog_templates.png)\n*screenshot-0: in OpenShift Web Console (v4.10) `Browse Catalog` page you can see the `Windup` icon*\n### Import template in Openshift Web Console\n1. copy the raw content of file [web-template-empty-dir-executor.json](templates/src/main/resources/web-template-empty-dir-executor.json)\n1. paste it in the \"Import YAML / JSON\" wizard in Openshift Web Console (ref. *screenshot-1*)\n1. save and wait for the deployment to end\n\n![screenshot-1](docs/import_yaml.png)\n*screenshot-1: in OpenShift Web Console (v4.10) `Import YAML / JSON` wizard you can paste template raw content*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindup%2Fwindup-openshift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwindup%2Fwindup-openshift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindup%2Fwindup-openshift/lists"}