Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions minc-extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Demo Using MINC (MicroShift IN Container)

## Prerequisites

- Install the MINC extension from the catalog of extensions
- Install the demo extension:
`quay.io/podman-desktop-demo/podman-desktop-extension`
- Clone this demo repository.
- Go to the **Resources** tab and click **Create new...** under the **MicroShift** entry
(depending on the configuration, select ports 443 and 80 as local ports).
- Ensure the current Kubernetes namespace is set to `microshift`.
- Check the existing Kubernetes resources:
- In **Kubernetes > Pods**, ensure no pod from the app is currently running.
- In **Kubernetes > Services**, remove any service from a previous deployment.
- In **Ingresses/Routes**, remove the `my-pod` route if it exists.

## Podify / Kubify Demo

### Podify

1. Initialize the frontend and backend containers by clicking on the status bar.
1. Once the status bar displays `Podify Demo ready`, navigate to the **Containers** view.
1. Verify that both containers are running. Click the kebab menu (`⋮`) on `python-frontend` and select **Open Browser**.
1. Pod creation steps:
- Select the checkboxes for `python-frontend` and `redis`.
- Click the **Create Pod** button near the container search bar.
- Uncheck port `6379` for Redis (we don't want to expose it externally).
- Click **Create Pod**.
- Open the pod details and click the `↗️` icon to open the browser to the exposed port.

### Kubify

1. Ensure `microshift` is still the selected Kubernetes namespace (check in the bottom-left status bar).
1. In the **Pods** view, click the kebab menu for your pod and select **Deploy to Kubernetes**.
1. Make sure the checkboxes for:
- **Kubernetes Services**
- **Create OpenShift Routes**
are selected.
1. Click **Deploy**.
1. At the bottom, under **Endpoints**, you should see:
`Port 5000 is reachable with route my-pod-8088` — click the link.
1. Confirm in the dialog to open:
`https://my-pod-8088-default.apps.127.0.0.1.nip.io`
1. If your MINC configuration uses a different port (not 443), append the port to the URL like `:9443`.
- To verify the port, open the `microshift` container from the Containers view — it lists the exposed ports.

## Local Mode

1. Go to the **Images** section in the left navigation bar.
1. Click the **Build** button in the top right.
1. Set the **Containerfile path** to:
`minc-extension/frontend-test/Containerfile` (from this repository).
1. Keep the default value for **Build context directory**.
1. Enter `my-local-httpd` as the **Image Name**.
1. Click **Build**, and then **Done** once the build completes.
1. Verify that the `my-local-httpd` image appears under **Images** (e.g., `docker.io/my-local-httpd`).
1. Check that the image is available inside MicroShift by running the following in the `microshift` container:
```bash
crictl images | grep my-local
```
in the `microshift` container.
1. Start the container from the image by clicking the ▶️ icon. Keep default options.
1. Verify the app is working by clicking the `↗️` icon to open it in a browser.
1. Convert the running container to a pod:
- Select the container.
- Click the **Create Pod** button near the container search.
- Use `my-custom-image-pod` as the name.
- Expose only port `8080`.
- Click **Create Pod**.
1. In the pod’s kebab menu, click **Deploy to Kubernetes**, then click the `nip.io` link.
- You may need to append `:9443` to the link if that's the configured port.

> 📝 Note: The image is **not** on Docker Hub — it's a **local image**.
> No step is required to copy or import the image.
2 changes: 2 additions & 0 deletions minc-extension/frontend-test/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM registry.access.redhat.com/ubi9/httpd-24@sha256:87f232768f58423776d56db593862aff5024c106d357ec2d443ef48f0ae8019e
COPY index.html /var/www/html/index.html
18 changes: 18 additions & 0 deletions minc-extension/frontend-test/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Welcome Page</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gradient-to-r from-purple-700 via-purple-500 to-purple-700 min-h-screen flex items-center justify-center text-white">
<main class="text-center px-6">
<h1 class="text-4xl md:text-6xl font-bold mb-4">Welcome to a custom page</h1>
<p class="text-lg md:text-2xl mb-6">HTTPD server running.</p>
<a href="#" class="bg-white text-purple-700 font-semibold px-6 py-3 rounded-xl shadow-lg hover:bg-purple-100 transition duration-300">
Local Build
</a>
</main>
</body>
</html>