-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc : add getting started guides for OKD, OpenShift and Microshfit pr…
…eset Signed-off-by: Rohan Kumar <[email protected]>
- Loading branch information
1 parent
b489cf9
commit e75c1a0
Showing
5 changed files
with
239 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
modules/ROOT/pages/getting-started-scenarios/microshift.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Once you've downloaded and installed {prod} on your machine, you're ready to use {prod} by creating a cluster. https://www.redhat.com/en/topics/edge-computing/microshift[{ushift}] | ||
is not the default cluster type that would be created when no explicit configuration is provided. | ||
|
||
In order to instruct {prod} to create a https://www.redhat.com/en/topics/edge-computing/microshift[{ushift}] cluster, we need to update {prod} configuration: | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ {bin} config set preset microshift | ||
---- | ||
|
||
**Set up environment for your cluster** | ||
|
||
Before starting cluster, you need to prepare your machine for creating a Virtual Machine. {ushift} cluster would be started | ||
inside that Virtual Machine. In order to do that use xref:using.adoc#setting-up[`{bin} setup`] command. | ||
|
||
Open a terminal with a user account with administrator access (but not logged in as root user) and run: | ||
[subs="+quotes,attributes"] | ||
---- | ||
$ {bin} setup | ||
---- | ||
|
||
**Start your cluster** | ||
|
||
Once you've set up environment for your {ushift} cluster, you can go ahead and start it. | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ {bin} start | ||
---- | ||
|
||
**Deploy a sample application to your {ushift} cluster** | ||
|
||
Create a sample deployment and expose it on port 8080: | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ oc create deployment hello-crc --image=registry.access.redhat.com/ubi8/httpd-24 | ||
$ oc expose deployment hello-crc --type=NodePort --port=8080 | ||
$ oc expose svc/hello-crc | ||
---- | ||
|
||
Wait for application pod to become ready and access application via route: | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ oc get routes | ||
$ curl http://hello-crc-default.apps.crc.testing | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
Once you've downloaded and installed {prod} on your machine, you're ready to use {prod} by creating a cluster. https://okd.io/docs/documentation/[{okd}] | ||
is not the default cluster type that would be created when no explicit configuration is provided. | ||
|
||
In order to instruct {prod} to create a https://okd.io/docs/documentation/[{okd}] cluster, we need to update {prod} configuration: | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ {bin} config set preset okd | ||
---- | ||
|
||
**Set up environment for your cluster** | ||
|
||
Before starting cluster, you need to prepare your machine for creating a Virtual Machine. {okd} cluster would be started | ||
inside that Virtual Machine. In order to do that use xref:using.adoc#setting-up[`{bin} setup`] command. | ||
|
||
Open a terminal with a user account with administrator access (but not logged in as root user) and run: | ||
[subs="+quotes,attributes"] | ||
---- | ||
$ {bin} setup | ||
---- | ||
|
||
**Start your cluster** | ||
|
||
Once you've set up environment for your {okd} cluster, you can go ahead and start it. | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ {bin} start | ||
---- | ||
|
||
**Log into your {OKD} cluster** | ||
|
||
Once you've created the cluster, and it's up and running, you need to log in into your {okd} cluster. In order to do that, use {okd} CLI ([command]`oc`). | ||
|
||
If you already have {openshift} CLI ([command]`oc`), you can start using it. If not, you can use Run the [command]`{bin} oc-env` | ||
command to print the command needed to add the cached [command]`oc` executable to your `$PATH`. | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ {bin} oc-env | ||
---- | ||
|
||
Get the {openshift} CLI ([command]`oc`) login command using [command]`{bin} console` to login as regular user or admin. | ||
|
||
Copy login command from this {prod} command output and paste it into your terminal: | ||
[subs="+quotes,attributes"] | ||
---- | ||
$ {bin} console --credentials | ||
---- | ||
|
||
**Deploy a sample application to your {okd} cluster** | ||
|
||
We will be deploying a simple Java application using a tool called https://eclipse.dev/jkube/docs/openshift-maven-plugin/[Eclipse JKube OpenShift Maven Plugin]. | ||
|
||
In order to follow these steps, you would need to have these installed: | ||
|
||
- https://adoptium.net/temurin/releases/[Java Development Kit] | ||
- https://maven.apache.org/[Apache Maven] | ||
Once you've installed these dependencies, you can deploy any java application to {okd} cluster. | ||
|
||
Clone Eclipse JKube repository and go to one of the quickstarts: | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ git clone https://github.com/eclipse-jkube/jkube.git | ||
$ cd jkube/quickstarts/maven/quarkus | ||
---- | ||
|
||
Run JKube OpenShift Maven Plugin goal to build and deploy application to {okd} cluster: | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ mvn package oc:build oc:resource oc:apply | ||
---- | ||
|
||
Wait till application pod comes in ready state and access the application via route: | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ oc get routes | ||
$ curl http://quarkus-default.apps-crc.testing | ||
---- |
80 changes: 80 additions & 0 deletions
80
modules/ROOT/pages/getting-started-scenarios/openshift.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
|
||
Once you've downloaded and installed {prod} on your machine, you're ready to use {prod} by creating a cluster. {openshift} | ||
is the default cluster type that would be created when no explicit configuration is provided. | ||
|
||
**Set up environment for your cluster** | ||
|
||
Before starting cluster, you need to prepare your machine for creating a Virtual Machine. {openshift} cluster would be started | ||
inside that Virtual Machine. In order to do that use xref:using.adoc#setting-up[`{bin} setup`] command. | ||
|
||
Open a terminal with a user account with administrator access (but not logged in as root user) and run: | ||
[subs="+quotes,attributes"] | ||
---- | ||
$ {bin} setup | ||
---- | ||
|
||
**Start your cluster** | ||
|
||
Once you've set up environment for your {openshift} cluster, you can go ahead and start it. | ||
|
||
NOTE: When you'd start the cluster, you would be asked for pull secret. You need to create a Red Hat account and download | ||
this file from the Pull Secret section of the link:https://console.redhat.com/openshift/create/local[{prod} page on the {rh} Hybrid Cloud Console]. | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ {bin} start | ||
---- | ||
|
||
**Log into your cluster** | ||
|
||
Once you've created the cluster, and it's up and running, you need to log in into your {openshift} cluster. In order to do that, use {openshift} CLI ([command]`oc`). | ||
|
||
If you already have {openshift} CLI ([command]`oc`), you can start using it. If not, you can use Run the [command]`{bin} oc-env` | ||
command to print the command needed to add the cached [command]`oc` executable to your `$PATH`. | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ {bin} oc-env | ||
---- | ||
|
||
Get the {openshift} CLI ([command]`oc`) login command using [command]`{bin} console` to login as regular user or admin. | ||
|
||
Copy login command from this {prod} command output and paste it into your terminal: | ||
[subs="+quotes,attributes"] | ||
---- | ||
$ {bin} console --credentials | ||
---- | ||
|
||
**Deploy a sample application to your {openshift} cluster** | ||
|
||
We will be deploying a simple Java application using a tool called https://eclipse.dev/jkube/docs/openshift-maven-plugin/[Eclipse JKube OpenShift Maven Plugin]. | ||
|
||
In order to follow these steps, you would need to have these installed: | ||
|
||
- https://adoptium.net/temurin/releases/[Java Development Kit] | ||
- https://maven.apache.org/[Apache Maven] | ||
Once you've installed these dependencies, you can deploy any java application to {openshift} cluster. | ||
|
||
Clone Eclipse JKube repository and go to one of the quickstarts: | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ git clone https://github.com/eclipse-jkube/jkube.git | ||
$ cd jkube/quickstarts/maven/quarkus | ||
---- | ||
|
||
Run JKube OpenShift Maven Plugin goal to build and deploy application to {openshift} cluster: | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ mvn package oc:build oc:resource oc:apply | ||
---- | ||
|
||
Wait till application pod comes in ready state and access the application via route: | ||
|
||
[subs="+quotes,attributes"] | ||
---- | ||
$ oc get routes | ||
$ curl http://quarkus-default.apps-crc.testing | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
:description: Getting Started | ||
= Get started! | ||
|
||
{prod} is local {openshift}, focusing on making it easy to learn and develop for {openshift}. This guide will help you | ||
get started with CodeReady Containers ({prod}) in OpenShift. CRC provides a way to run OpenShift locally for development | ||
and testing purposes. | ||
|
||
== Getting {prod} | ||
In order to download and install {prod}, please refer to the xref:installing.adoc[Installation Guide]. | ||
|
||
- Ensure you have the minimum hardware and software requirements for {prod}. | ||
- Download the latest {prod} release from the official website. | ||
- Install the {prod} binary and add it to your system's PATH. | ||
|
||
[id='creating-openshift-preset'] | ||
== Creating {openshift} cluster | ||
include::getting-started-scenarios/openshift.adoc[] | ||
|
||
[id='creating-okd-preset'] | ||
== Creating {okd} cluster | ||
include::getting-started-scenarios/okd.adoc[] | ||
|
||
|
||
[id='creating-microshift-preset'] | ||
== Creating {ushift} cluster | ||
include::getting-started-scenarios/microshift.adoc[] |