{"id":21915799,"url":"https://github.com/wpernath/openshift-config","last_synced_at":"2025-10-08T19:56:38.001Z","repository":{"id":45880410,"uuid":"372322616","full_name":"wpernath/openshift-config","owner":"wpernath","description":"A set of scripts to setup a new OpenShift cluster quickly","archived":false,"fork":false,"pushed_at":"2024-07-24T14:40:36.000Z","size":69,"stargazers_count":18,"open_issues_count":1,"forks_count":20,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-07-25T13:25:45.958Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpernath.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":"2021-05-30T21:56:49.000Z","updated_at":"2024-07-24T14:40:40.000Z","dependencies_parsed_at":"2023-01-23T11:15:16.953Z","dependency_job_id":"27e0cba8-9e11-46ca-87de-78745894456a","html_url":"https://github.com/wpernath/openshift-config","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/wpernath%2Fopenshift-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpernath%2Fopenshift-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpernath%2Fopenshift-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpernath%2Fopenshift-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpernath","download_url":"https://codeload.github.com/wpernath/openshift-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226971307,"owners_count":17711413,"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-28T19:14:15.587Z","updated_at":"2025-10-08T19:56:32.979Z","avatar_url":"https://github.com/wpernath.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openshift-config\nThis is a script which has some configuration modules for a fresh and clean OpenShift installation. If you've been using the Single Node OpenShift installation, you need some persistent volumes and you need to make the internal registry able to store your images. \n\nThis is what the script does right now:\n\n- It is setting up Kubevirt Hostpath Provisioner for storage\n- Configuring the internal registry to be able to store images\n- Installing some operators (namely gitops, serverless and pipelines, builds, postgresql and strimzi) for demo purposes\n- Setting up a 'ci' namespace with nexus and Gitea ready to use\n- Setting up a htpasswd identity provider for 2 users: admin and devel. admin is cluster-admin\n- Setting up Google as SSO OAuth2 provider\n- Configuring openshift console to show links and other resources for demo purposes\n- Installing and configuring OpenShift ServiceMesh for demo\n- Configure monitoring and user space monitoring \n- Installing and configuring Red Hat Developer Hub (based on backstage.io)\n\n## Usage\nIn order to use this script, you first need to be logged into OpenShift as a user with cluster-admin role. This is typically the `kubeadmin` user after a fresh installation.\n\nThe following modules are available:\n- ci\n- console\n- mesh\n- rhdh\n- monitoring\n- oauth\n- operators\n- registry\n- storage\n- users\n\n\nThe `ci` module does only need to have a user context (devel or developer).\n\nThe typical workflow after installing a OpenShift SNO from this page is:\n- Create the OpenShift SNO\n- `./setup.sh storage` \n- `./setup.sh registry`\n- `./setup.sh users`\n- `./setup.sh console`\n- `./setup.sh operators`\n\nBe careful to NOT install storage if you've allready installed any other storage provider!\n\nYou could also let openshift-config decide what to install in your freshly installed OpenShift cluster by specifying an environment:\n- sno: installs everything necessary (console, operators, storage, registry, users)\n- crc: installs only necessary (console, operators, users)\n- aws: installs only necessary (console, operators, users)\n- all: like sno\n\n\n### storage\n```bash\n$\u003e ./setup.sh storage\n```\n\nThis installs the CSI kubevirt hostpath provisioner into the target OpenShift installation. It also creates a StorageClass which will then be used for all PVs.\n\nPlease DO NOT install this if your OpenShift cluster allready contains a storage provider! \n\n### registry\n```bash\n$\u003e ./setup.sh registry \n```\n\nThis switches the internal registry to \"Managed\" and binds it to a PV called pv0001. For this module, you must be logged in as kube:admin in your cluster. \n\n### operators\n```bash\n$\u003e ./setup.sh operators\n```\n\nThis installs several operators. Please make sure to be logged into the OpenShift instance as cluster-admin. And you already should have storage available.\n\n### ci\n```bash\n$\u003e ./setup.sh ci\n```\n\nThis installs a Nexus and Gitea into a newly created namespace called ci. It also clones 3 repositories from github.com into Gitea. After that it prints out the access to both instances. By default, we are using\n\n- Nexus: admin/admin123\n- Gitea: gitea/openshift\n\n### users\n```bash\n$\u003e ./setup.sh users \n```\nThis adds a HTPasswd identity provider to the cluster with 2 users in it:\n- admin/admin123 -\u003e cluster-admin\n- devel/devel -\u003e normal user\n\nYou need to be logged into OpenShift with cluster-admin rights.\n\n### console\n```bash\n$\u003e ./setup.sh console\n```\nInstalls some links to the openshift console and makes sure, developer view contains additional links to resources: pod, service, pvc, route\n\n### mesh\n```bash\n$\u003e ./setup.sh mesh\n```\nInstalls Red Hat OpenShift ServiceMesh and adds the grumpycat application to the mesh.\n\nThis can be uninstalled by executing \n```bash\n$\u003e oc delete -k config/mesh\n```\n\nIf you want to add other namespaces to the mesh, please edit the file `config/mesh/sm-members.yaml`. Please also note, that - in order to let the mesh inject the sidecar - you need to add the following annotation to the `Deployment` of a - well - deployment:\n\n```yaml\nspec:\n  template:\n    metadata:\n      annotations:  \n        sidecar.istio.io/inject: 'true'\n```\n\n## monitoring\n```bash\n$\u003e ./setup.sh monitoring\n```\n\nConifgures the monitoring provider of OpenShift so that all the data will be stored in provided storage. It also configures user monitoring. \nIt also configures user monitoring. Please make sure you're adding service monitoring entries for special user services.\n\n## oauth\n```bash\n$\u003e ./setup.sh oauth\n```\n\nConfigures an SSO provider (namely Google). Please make sure to first go to [Google Console](https://console.developers.google.com/apis/credentials) and register a new OAuth2 client. Then take the generated ClientID and Client Secret and create a new file `config/oauth/client-secret.env` based on the file \n`config/oauth/example-client-secret.env`. \n\nThen you're able to log into OpenShift via your SSO provider's user/pwd combination. If you've logged in once, you should also make sure that your\nnewly created user has all required roles associated with it. In my case, I am calling the following \n\n```bash \n$\u003e oc adm policy add-cluster-role-to-user cluster-admin \"wpernath@redhat.com\"\n```\n\n## rhdh\n```bash\n$\u003e ./setup.sh rhdh\nor\n$\u003e oc apply -k config/rhdh\n```\n\nInstalls and configures Red Hat Developer Hub in a namespace called `rhdh` using the `Red Hat Developer Hub - Operator`. It configures the following plugins to be used with RHDH:\n- GitHub Auth\n- GitHub App\n- GitHub SSO\n- Kubernetes\n- A sample software catalog based on https://github.com/wpernath/red-hat-developer-hub-software-templates/blob/main/templates.yaml\n\nIn order to make it your configuration, please copy both, the `example-backend-secret.env` and the `example-github-secret.env`, into `config/rhdh/backend-secret.env` and `config/rhdh/github-secret.env` and fill your tokens and secrets in there. \n\nTo configure other plugins, please have a look at `config/rhdh/app-config-rhdh.yaml`. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpernath%2Fopenshift-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpernath%2Fopenshift-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpernath%2Fopenshift-config/lists"}