{"id":21427951,"url":"https://github.com/redhat-developer-demos/quinoa-wind-turbine","last_synced_at":"2026-01-02T17:54:57.238Z","repository":{"id":41321655,"uuid":"509103145","full_name":"redhat-developer-demos/quinoa-wind-turbine","owner":"redhat-developer-demos","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-11T17:12:12.000Z","size":1598,"stargazers_count":22,"open_issues_count":5,"forks_count":37,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-11T18:24:29.728Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redhat-developer-demos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-06-30T14:00:26.000Z","updated_at":"2025-03-11T17:12:17.000Z","dependencies_parsed_at":"2023-11-10T12:50:12.069Z","dependency_job_id":"45c35711-d074-45da-99b9-be7b9990f48d","html_url":"https://github.com/redhat-developer-demos/quinoa-wind-turbine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer-demos%2Fquinoa-wind-turbine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer-demos%2Fquinoa-wind-turbine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer-demos%2Fquinoa-wind-turbine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer-demos%2Fquinoa-wind-turbine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhat-developer-demos","download_url":"https://codeload.github.com/redhat-developer-demos/quinoa-wind-turbine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933866,"owners_count":20371080,"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-22T22:09:01.401Z","updated_at":"2026-01-02T17:54:57.195Z","avatar_url":"https://github.com/redhat-developer-demos.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Quinoa WindTurbine Racer Demo\n\nThis project uses Quarkus, the Supersonic Subatomic Java Framework.\n\n## Running the application in dev mode\n\nInstall first:\n- JDK 17\n- Maven\n- Quarkus CLI\n\nYou can run your application in dev mode that enables live coding using:\n```shell script\nquarkus dev\n```\n\n\n## Deploy on Cluster with admin rights\n\n### Setup\n\nTo run this demo you need **OpenShift \u003e=4.10** with cluster-admin privileges.\n\n### Quay.io\n\n#### Account\n\nCreate an account on [Quay.io](https://quay.io) if you do not already have one.\n\n#### Repositories\n\nCreate two repositories with public access (pull), you will use credentials in the next step to push container images.\n\nFrom right-side menu, click **Create New Repository**\n\nCreate a new repository:\n\n* quinoa-wind-turbine\n\nFlag it as **Public Repository** and click **Create Public Repository** \n\n\n#### Create secret\n\n* Login to quay.io in the web user interface and click on your username in the top right corner.\n* Select **account settings**.\n* Click the blue hyperlink **Generate Encrypted Password**.\n* Re-enter your password when prompted.\n* Copy the password\n\n![Create repo](https://github.com/blues-man/vote-app-gitops/raw/main/images/quay-encrypted-key.png)\n\n### Setup OpenShift\n\nLogin to OpenShift Web Console to install prerequisites.\n\nFirst, create a project for the demo:\n```bash\noc new-project demo --description='wind-turbine-race'\n```\n*You can choose a different name, but then you have to update `argo/wind-turbine-app.yaml` before you deploy the app (see below in the **Flow** section).*\n\n### Install Operators\n\n\n#### OpenShift Pipelines\n\nOpenShift Pipelines is provided as an add-on on top of OpenShift that can be installed via an operator available in the OpenShift OperatorHub. Follow these instructions in order to install OpenShift Pipelines on OpenShift via the OperatorHub.\n\n\nFrom the left-side menu under **Administrator** perspective, go to **Operators**-\u003e **OperatorHub**. In the search box, search for _pipelines_, then click to **OpenShift Pipelines Operator**:\n\n![OperatorHub](https://redhat-scholars.github.io/openshift-starter-guides/rhs-openshift-starter-guides/4.7/_images/prerequisites_operatorhub.png)\n\nFrom the description view, click *Install* to review all installation settings.\n\n![Install Pipelines](https://redhat-scholars.github.io/openshift-starter-guides/rhs-openshift-starter-guides/4.7/_images/prerequisites_operatorhub_install_pipelines.png)\n\nEnsure *Update Channel* is set to *stable* , and click *Install* to start installing the Operator.\n\n![Install Operator](https://redhat-scholars.github.io/openshift-starter-guides/rhs-openshift-starter-guides/4.7/_images/prerequisites_operatorhub_install_operator.png)\n\nAfter few seconds, the installation should be completed with success and you can verify it looking at *Status* column, check if the status is *Succeeded*.\n\n![Pipelines Installed](https://redhat-scholars.github.io/openshift-starter-guides/rhs-openshift-starter-guides/4.7/_images/prerequisites_operatorhub_pipelines_installed.png)\n\n#### OpenShift GitOps\n\nLog into OpenShift Web Console as a cluster admin and navigate to the **Administrator** perspective and then **Operators** \u0026rarr; **OperatorHub**. \n\nIn the **OperatorHub**, search for *OpenShift GitOps* and follow the operator install flow to install it.\n\n![OpenShift GitOps operator](https://raw.githubusercontent.com/siamaksade/openshift-gitops-getting-started/1.1/images/gitops-01.png)\n\n![OpenShift GitOps operator](https://raw.githubusercontent.com/siamaksade/openshift-gitops-getting-started/1.1/images/gitops-02.png)\n\n![OpenShift GitOps operator](https://raw.githubusercontent.com/siamaksade/openshift-gitops-getting-started/1.1/images/gitops-03.png)\n\n##### Add permission to Argo CD service account\n\n**IMPORTANT** Give permission to the Argo CD service account to control the cluster:\n```bash\noc adm policy add-cluster-role-to-user cluster-admin -z openshift-gitops-argocd-application-controller -n openshift-gitops\n```\n\nOnce OpenShift GitOps is installed, an instance of Argo CD is automatically installed on the cluster in the `openshift-gitops` namespace and link to this instance is added to the application launcher in OpenShift Web Console.\n\n![Application Launcher](https://raw.githubusercontent.com/siamaksade/openshift-gitops-getting-started/1.1/images/gitops-04.png)\n\n##### Log into Argo CD dashboard\n\nClick on Argo CD from the OpenShift Web Console application launcher and then log into your OpenShift credentials using the OpenShift Auth option.\n\n![Argo CD](https://raw.githubusercontent.com/siamaksade/openshift-gitops-getting-started/1.1/images/gitops-05.png)\n\n![Argo CD](https://raw.githubusercontent.com/siamaksade/openshift-gitops-getting-started/1.1/images/gitops-06.png)\n\n#### AMQ Streams\n\nInstall AMQ Streams from OperatorHub and create a KafkaCluster named `my-cluster`\n\n#### Infinispan\n\n1. Create an infinispan cluster from the Web Console using the \"Infinispan Helm chart\"\n2. Name it `infinispan`\n\n### Flow\n\n\nCreate a Secret with your Quay.io credentials with the encrypted password you copied before:\n\n```bash\noc create secret docker-registry quay-secret --docker-server=quay.io --docker-username=\u003cQUAY_USERNAME\u003e --docker-password=\u003cENCRYPTED_PASSWORD\u003e\n```\n\nCreate a Secret with your GitHub Personal Access Token\n\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: git-user-pass\n  annotations:\n    tekton.dev/git-0: https://github.com\ntype: kubernetes.io/basic-auth\nstringData:\n  username: \u003cgithub user\u003e\n  password: \u003cgithub personal access token\u003e\n```\nSave it to a file with your credentials and create the secret:\n\n```bash\noc create -f git-user-pass.yaml\n```\n\nLink Secrets to pipeline Service Account.\n\nNOTE: Pipelines Operator installs by default a `pipeline` Service Account in all projects. This service account is used to run non-privileged containers and builds across the cluster.  \n\n```bash\noc secret link pipeline quay-secret\noc secret link pipeline git-user-pass\n```\n\nFork this repo\n\nIn order to enable webhooks, fork this repo\n\n\nFork and clone GitOps [manifests repo](https://github.com/redhat-developer-demos/quinoa-wind-turbine-manifests)\n\n\n```bash\ngit clone https://github.com/\u003cyourgithubuser\u003e/quinoa-wind-turbine-manifests\ncd quinoa-wind-turbine-manifests\n```\n\nCreate Tekton pipeline manifests\n\nChange the GitOps repo to your fork:\n```bash\nsed -i 's/rhdevelopers/yourquayuser/g' tekton/pipeline-cached.yaml\nsed -i 's/redhat-developer-demos/yourgithubuser/g' tekton/pipeline-cached.yaml\n```\n\n```bash\noc apply -f tekton/app-source-pvc.yaml \noc apply -f tekton/build-cache-pvc.yaml \noc apply -f tekton/git-update-deployment.yaml\noc apply -f tekton/maven-task-cached.yaml \noc apply -f tekton/pipeline-cached.yaml \noc apply -f tekton/triggerbinding.yaml\noc apply -f tekton/triggertemplate-cached.yaml\noc apply -f tekton/eventlistener.yaml\noc apply -f tekton/el-route.yaml\n\n```\n\nUpdate all references to quay.io with your repos for quinoa-wind-turbine references:\n\n```bash\nsed -i 's/rhdevelopers/yourquayuser/g' k8s/deployment.yaml\nsed -i 's/redhat-developer-demos/yourgithubuser/g' argo/wind-turbine-app.yaml\ngit add .\ngit commit  -m \"update reference to quay and github\"\ngit push\n```\n\nCreate Argo CD Application to deploy the game\n```bash\noc apply -f argo/wind-turbine-app.yaml\n```\n\nStart the Pipeline or edit `Config.js` to switch to V2:\n\n```js\nexport const ENABLE_SHAKING = true;\n```\n\n\n### SSL (if the cluster doesn't have a signed certificate):\n\nLet'encrypt (if the cluster doesn't have a signed certificate):\n```bash\noc apply -fhttps://raw.githubusercontent.com/tnozicka/openshift-acme/master/deploy/single-namespace/{role,serviceaccount,issuer-letsencrypt-live,deployment}.yaml\noc create rolebinding openshift-acme --role=openshift-acme --serviceaccount=\"$( oc project -q ):openshift-acme\" --dry-run -o yaml | oc apply -f -\n```\n\nIf the cluster has a signed certificate, create a route with an \"edge\" tls termination.\n\n### Install Kafka\n\n- From the operator hub, install Strimzi operator.\n- Create a Kafka instance named `my-cluster`\n\n### Infinispan server\n\n1. Create an infinispan cluster in the console using the \"Infinispan Helm chart\"\n2. Name it `infinispan`\n\n## When deploying from Quarkus\n\n### Copy sandbox openshift resource file\n\n```bash\ncp src/main/kubernetes/openshift.cluster.yml src/main/kubernetes/openshift.yml\n```\n\n### Deploy\n\n```bash\nquarkus build  -Dquarkus.kubernetes.deploy=true -Dquarkus.profile=openshift-cluster -Dquarkus.container-image.group=[project name]\n```\n\n### Update:\n\n```bash\nquarkus build -Dquarkus.container-image.build=true -Dquarkus.profile=openshift-cluster  -Dquarkus.container-image.group=[project name]\n```\n\n### Delete deployed  app\n```bash\noc delete all -l app.kubernetes.io/name=quinoa-wind-turbine\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-developer-demos%2Fquinoa-wind-turbine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhat-developer-demos%2Fquinoa-wind-turbine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-developer-demos%2Fquinoa-wind-turbine/lists"}