https://github.com/crc-org/crc-extension
Red Hat OpenShift Local Extension for integration of OpenShift Local clusters with Podman Desktop
https://github.com/crc-org/crc-extension
Last synced: about 2 months ago
JSON representation
Red Hat OpenShift Local Extension for integration of OpenShift Local clusters with Podman Desktop
- Host: GitHub
- URL: https://github.com/crc-org/crc-extension
- Owner: crc-org
- License: apache-2.0
- Created: 2023-03-01T15:06:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-12T11:09:02.000Z (8 months ago)
- Last Synced: 2024-11-12T12:20:12.545Z (8 months ago)
- Language: TypeScript
- Homepage:
- Size: 562 KB
- Stars: 18
- Watchers: 13
- Forks: 21
- Open Issues: 73
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Red Hat OpenShift Local extension
Integration for [Red Hat OpenShift Local][product page] clusters. It will help you install and set up the environment, and allows you to control the lifecycle and configuration from [Podman Desktop][podman-desktop]. Some of the features available in the extension include:
* Start/Stop/Restart/Delete OpenShift Local clusters
* Change the OpenShift Local cluster preset
* Update the OpenShift Local version## Index
- [Installation](#installation)
- [Requirements](#requirements)
- [Extension installation](#extension-installation)
- [OpenShift Local installation](#openshift-local-installation)
- [Usage](#usage)
- [Deployment to OpenShift Local](#deployment-to-openshift-local)## Installation
### Requirements
You need to have a working [Podman Desktop][podman-desktop] installation.
Each preset of OpenShift Local has their own requirements, please check the [documentation][documentation page] for more information.#### Preset types
* **Microshift (experimental)**
Provides a lightweight and optimized environment with a limited set of services.
* **OpenShift**
Provides a single node OpenShift cluster with a fuller set of services, including a web console (requires more resources).#### Pull-secret
To pull container images from the registry, a pull secret is necessary. You can get a pull secret by navigating to the dashboard and clicking the **Obtain pull-secret** or opening the [Red Hat OpenShift Local download page][download page] in your browser.### Extension installation
1. Open Podman Desktop.
2. Go to the **Extensions** page:

3. Now you have two options:
1. Switch to the **Catalog** tab and click on the `Install` icon in the `Red Hat OpenShift Local` extension item:

2. Or click on the `Install custom...` button on the upper right corner, enter `ghcr.io/crc-org/crc-extension` in the `OCI Image` field, and click on `Install`:
This second approach is useful to get older versions or development releases.
### OpenShift Local installation
If you don't have OpenShift Local installed in your system already, Podman Desktop can handle it for you.Go to the `Dashboard` page, and in the `OpenShift Local` section you will find the `NOT-INSTALLED` label. Click on the `Install` button:

A dialog will appear, click on the `Yes` button:

Follow the OpenShift Local installation wizard, picking the options that suit your needs:

You can check the progress on the download of the binaries on the bottom of the interface:

## Usage
Once installed, you can configure the default `Preset` parameter used to create the OpenShift Local Cluster in the extension's **Settings** page:

To create a new OpenShift Local cluster, you have three options:
1. Switch to the **Resources** tab on the **Settings** page and press the `Create new ...` button:
Then, in the newly opened dialog, configure the cluster to your needs and click on the `Create` button:
2. From the **Dashboard**, in the `OpenShift Local` section, click on the `Initialize and start` button:

3. From the **Dashboard**, in the `OpenShift Local` section, click on the dropdown button next to `Initialize and start` and select `Initialize OpenShift Local`:

And then click on the `Initialize` button:
When a new cluster has been created there should be a new connection visible in the **Resources** page, under the **OpenShift Local** section:

## Deployment to OpenShift Local
To deploy your first application to OpenShift Local, pull the `httpd-24` image from the public Red Hat image registry using the **Pull an Image** page. To do so, open the **Images** page using the activity bar and press `Pull` button in upper right corner:

Paste `registry.access.redhat.com/ubi8/httpd-24` into the `Image to pull` field and press the `Pull Image` button:

After the image was sucessfully pulled from the registry press the `Done` button to navigate back to the **Images** page:

Request the context menu for the `httpd-24` image you just pulled by clicking on the right most button in the row. Then select the `Push image to OpenShift Local cluster`* menu item:

*Note: if the option does not appear on the context menu, try to restart Podman Desktop with `Exit On Close` preference enabled (this is a known issue).
The progress for the `Push` command is available in the Podman Desktop **Tasks** View:

When the `Push` command is done, the image is ready to be deployed to the OpenShift Local cluster. First start a local container from the image using the `Run` button:

On the **Run Image** form leave the default values and press `Start Container` button:

After the local container is up and running, it can be deployed to OpenShift Local cluster using the `Deploy to Kubernetes` button in the upper right corner
of **Container Details** page:
On the **Deploy to Kubernetes** form make sure the `Kubernetes Context` field is `crc-admin` and press the `Deploy` button:

The bottom part of the page shows the status of deployment. When **Container statuses** contains `Ready (Running)` it means the `httpd` server is running in the
OpenShift Local cluster. There is also a link to open the OpenShift Developer Console where you can manage your local cluster:
Clicking on the link below **Container statuses** opens the `httpd` server index page:

You have deployed your application to OpenShift!
[product page]: https://developers.redhat.com/products/openshift-local/overview
[download page]: https://cloud.redhat.com/openshift/create/local
[documentation page]: https://cloud.redhat.com/openshift/local/documentation
[podman-desktop]: https://podman-desktop.io/