{"id":23498061,"url":"https://github.com/freedomben/basic-ocp-demo","last_synced_at":"2025-10-05T06:59:01.949Z","repository":{"id":69604883,"uuid":"301460199","full_name":"FreedomBen/basic-ocp-demo","owner":"FreedomBen","description":"Sample app that can be easily deployed to OpenShift either as a training exercise or demonstration.","archived":false,"fork":false,"pushed_at":"2021-03-25T22:59:48.000Z","size":73,"stargazers_count":1,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-18T04:30:29.826Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/FreedomBen.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,"zenodo":null}},"created_at":"2020-10-05T15:46:37.000Z","updated_at":"2022-07-16T13:11:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0027f91-a566-40dc-9966-2a7c3f6b52a4","html_url":"https://github.com/FreedomBen/basic-ocp-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FreedomBen/basic-ocp-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreedomBen%2Fbasic-ocp-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreedomBen%2Fbasic-ocp-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreedomBen%2Fbasic-ocp-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreedomBen%2Fbasic-ocp-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FreedomBen","download_url":"https://codeload.github.com/FreedomBen/basic-ocp-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreedomBen%2Fbasic-ocp-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278420211,"owners_count":25983813,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12-25T05:18:14.074Z","updated_at":"2025-10-05T06:59:01.943Z","avatar_url":"https://github.com/FreedomBen.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample Demo app for OpenShift\n\n_For an introduction to `oc` and a detailed walk through of deploying this application, see [Introduction to “oc” — the OpenShift Command Line Power Tool](https://freedomben.medium.com/introduction-to-oc-the-openshift-command-line-power-tool-cdcd399b4048?sk=125cc573ea371d91b7eb922cf3193f57).  If Medium's paywall blocks the article for you, make sure you use **the exact link provided** and it will get you around the paywall.  (Often people go to share the article with others and will copy/paste from their browser.  Don't do that because medium will redirect away from the paywall-skipping link above.  If you're sharing the link with other, use [this one (same as above)](https://freedomben.medium.com/introduction-to-oc-the-openshift-command-line-power-tool-cdcd399b4048?sk=125cc573ea371d91b7eb922cf3193f57))_\n\n## Using s2i / oc new-app\n\n```bash\n# Development environment\noc new-project basic-ocp-demo-development\noc new-app https://github.com/FreedomBen/basic-ocp-demo#development\noc expose svc basic-ocp-demo\n\n # Production environment\noc new-project basic-ocp-demo-production\noc new-app https://github.com/FreedomBen/basic-ocp-demo#production\noc expose svc basic-ocp-demo\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/FreedomBen/basic-ocp-demo/blob/master/example.png?raw=true\" alt=\"Screenshot\" width=\"450\" /\u003e\n\u003c/p\u003e\n\n## Deploying from YAML\n\nThere are YAML files available in the `deploy` directory that can be used to deploy.\n\n```bash\noc new-project basic-ocp-demo-project\n\n# Create (deploy) resources\noc apply -f deploy/basic-ocp-demo.yaml\n\n# To delete resources\noc delete all -l app=basic-ocp-demo\n```\n\nSome things you can do to get familiar:\n\n```bash\n# Let's look at the pods that got created\noc get pods\n\n# Using the pod name above, let's get a human readable description\n# Your pod name will vary a bit from mine\noc describe pods basic-ocp-demo-554ddd794f-9zwnw\n\n# Let's see that pod in YAML form\noc get pods basic-ocp-demo-554ddd794f-9zwnw -o yaml\n\n# You can save this off for later use\noc get pods basic-ocp-demo-554ddd794f-9zwnw -o yaml | tee basic-ocp-demo-pod.yaml\n\n# Tweak the deployment YAML somehow and redeploy it\n# This is idempotent (Only things that changed will be updated)\noc apply -f deploy/basic-ocp-demo.yaml\n\n# Edit a resource directly and see the change take effect\n# If you need a usggestion try deleting the `tls` key section and see\n# that the route turns HTTP only (load balancers on your cluster must\n# support this for it to work)\noc edit route basic-ocp-demo\n\n# Now undo your chagne by redeploying. Note that only the resource you\n# changed gets updated\noc apply -f deploy/basic-ocp-demo.yaml\n\n# rsh into the pod and curl it locally\noc rsh basic-ocp-demo-554ddd794f-9zwnw\nsh-4.4$ curl localhost:4567/healthz\n{\"ok\":true,\"datetime\":\"2021-01-04 22:36:28 UTC\"}\n\n# Get a debug shell in a Pod. Your pod name will be slightly different\noc debug basic-ocp-demo-554ddd794f-9zwnw\n\n# Try out oc explain\noc explain deployment.spec.template.spec.containers.ports\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreedomben%2Fbasic-ocp-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreedomben%2Fbasic-ocp-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreedomben%2Fbasic-ocp-demo/lists"}