Skip to content

Commit 7cd109d

Browse files
rohanKanojiagbraad
authored andcommitted
doc : add getting started guides for OKD, OpenShift and Microshfit preset
Signed-off-by: Rohan Kumar <rohaan@redhat.com>
1 parent b489cf9 commit 7cd109d

File tree

5 files changed

+244
-1
lines changed

5 files changed

+244
-1
lines changed

modules/ROOT/nav.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
= Getting Started Guide
1+
= Documentation
22

3+
* xref:getting-started.adoc[]
34
* xref:introducing.adoc[]
45
* xref:installing.adoc[]
56
* xref:using.adoc[]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
We will be creating a single-node cluster for https://www.redhat.com/en/topics/edge-computing/microshift[{ushift}].
2+
3+
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}]
4+
is not the default cluster type that would be created when no explicit configuration is provided.
5+
6+
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:
7+
8+
[subs="+quotes,attributes"]
9+
----
10+
$ {bin} config set preset microshift
11+
----
12+
13+
**Set up environment for your cluster**
14+
15+
Before starting cluster, you need to prepare your machine for creating a Virtual Machine. {ushift} cluster would be started
16+
inside that Virtual Machine. In order to do that use xref:using.adoc#setting-up[`{bin} setup`] command.
17+
18+
Open a terminal with a user account with administrator access (but not logged in as root user) and run:
19+
[subs="+quotes,attributes"]
20+
----
21+
$ {bin} setup
22+
----
23+
24+
**Start your cluster**
25+
26+
Once you've set up environment for your {ushift} cluster, you can go ahead and start it.
27+
28+
[subs="+quotes,attributes"]
29+
----
30+
$ {bin} start
31+
----
32+
33+
**Deploy a sample application to your {ushift} cluster**
34+
35+
Create a sample deployment and expose it on port 8080:
36+
37+
[subs="+quotes,attributes"]
38+
----
39+
$ oc create deployment hello-crc --image=registry.access.redhat.com/ubi8/httpd-24
40+
$ oc expose deployment hello-crc --type=NodePort --port=8080
41+
$ oc expose svc/hello-crc
42+
----
43+
44+
Wait for application pod to become ready and access application via route:
45+
46+
[subs="+quotes,attributes"]
47+
----
48+
$ oc get routes
49+
$ curl http://hello-crc-default.apps.crc.testing
50+
----
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
We will be creating a single-node cluster for https://okd.io/docs/project/about[OpenShift Kubernetes Distribution].
2+
3+
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}]
4+
is not the default cluster type that would be created when no explicit configuration is provided.
5+
6+
In order to instruct {prod} to create a https://okd.io/docs/documentation/[{okd}] cluster, we need to update {prod} configuration:
7+
8+
[subs="+quotes,attributes"]
9+
----
10+
$ {bin} config set preset okd
11+
----
12+
13+
**Set up environment for your cluster**
14+
15+
Before starting cluster, you need to prepare your machine for creating a Virtual Machine. {okd} cluster would be started
16+
inside that Virtual Machine. In order to do that use xref:using.adoc#setting-up[`{bin} setup`] command.
17+
18+
Open a terminal with a user account with administrator access (but not logged in as root user) and run:
19+
[subs="+quotes,attributes"]
20+
----
21+
$ {bin} setup
22+
----
23+
24+
**Start your cluster**
25+
26+
Once you've set up environment for your {okd} cluster, you can go ahead and start it.
27+
28+
[subs="+quotes,attributes"]
29+
----
30+
$ {bin} start
31+
----
32+
33+
**Log into your {OKD} cluster**
34+
35+
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`).
36+
37+
If you already have {openshift} CLI ([command]`oc`), you can start using it. If not, you can use Run the [command]`{bin} oc-env`
38+
command to print the command needed to add the cached [command]`oc` executable to your `$PATH`.
39+
40+
[subs="+quotes,attributes"]
41+
----
42+
$ {bin} oc-env
43+
----
44+
45+
Get the {openshift} CLI ([command]`oc`) login command using [command]`{bin} console` to login as regular user or admin.
46+
47+
Copy login command from this {prod} command output and paste it into your terminal:
48+
[subs="+quotes,attributes"]
49+
----
50+
$ {bin} console --credentials
51+
----
52+
53+
**Deploy a sample application to your {okd} cluster**
54+
55+
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].
56+
57+
In order to follow these steps, you would need to have these installed:
58+
59+
- https://adoptium.net/temurin/releases/[Java Development Kit]
60+
- https://maven.apache.org/[Apache Maven]
61+
62+
Once you've installed these dependencies, you can deploy any java application to {okd} cluster.
63+
64+
Clone Eclipse JKube repository and go to one of the quickstarts:
65+
66+
[subs="+quotes,attributes"]
67+
----
68+
$ git clone https://github.com/eclipse-jkube/jkube.git
69+
$ cd jkube/quickstarts/maven/quarkus
70+
----
71+
72+
Run JKube OpenShift Maven Plugin goal to build and deploy application to {okd} cluster:
73+
74+
[subs="+quotes,attributes"]
75+
----
76+
$ mvn package oc:build oc:resource oc:apply
77+
----
78+
79+
Wait till application pod comes in ready state and access the application via route:
80+
81+
[subs="+quotes,attributes"]
82+
----
83+
$ oc get routes
84+
$ curl http://quarkus-default.apps-crc.testing
85+
----
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
We will be creating a single-node cluster for https://www.redhat.com/en/technologies/cloud-computing/openshift/container-platform[Red Hat OpenShift Container Platform].
2+
3+
Once you've downloaded and installed {prod} on your machine, you're ready to use {prod} by creating a cluster. {openshift}
4+
is the default cluster type that would be created when no explicit configuration is provided.
5+
6+
**Set up environment for your cluster**
7+
8+
Before starting cluster, you need to prepare your machine for creating a Virtual Machine. {openshift} cluster would be started
9+
inside that Virtual Machine. In order to do that use xref:using.adoc#setting-up[`{bin} setup`] command.
10+
11+
Open a terminal with a user account with administrator access (but not logged in as root user) and run:
12+
[subs="+quotes,attributes"]
13+
----
14+
$ {bin} setup
15+
----
16+
17+
**Start your cluster**
18+
19+
Once you've set up environment for your {openshift} cluster, you can go ahead and start it.
20+
21+
NOTE: When you'd start the cluster, you would be asked for pull secret. You need to create a Red Hat account and download
22+
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].
23+
24+
[subs="+quotes,attributes"]
25+
----
26+
$ {bin} start
27+
----
28+
29+
**Log into your cluster**
30+
31+
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`).
32+
33+
If you already have {openshift} CLI ([command]`oc`), you can start using it. If not, you can use Run the [command]`{bin} oc-env`
34+
command to print the command needed to add the cached [command]`oc` executable to your `$PATH`.
35+
36+
[subs="+quotes,attributes"]
37+
----
38+
$ {bin} oc-env
39+
----
40+
41+
Get the {openshift} CLI ([command]`oc`) login command using [command]`{bin} console` to login as regular user or admin.
42+
43+
Copy login command from this {prod} command output and paste it into your terminal:
44+
[subs="+quotes,attributes"]
45+
----
46+
$ {bin} console --credentials
47+
----
48+
49+
**Deploy a sample application to your {openshift} cluster**
50+
51+
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].
52+
53+
In order to follow these steps, you would need to have these installed:
54+
55+
- https://adoptium.net/temurin/releases/[Java Development Kit]
56+
- https://maven.apache.org/[Apache Maven]
57+
58+
Once you've installed these dependencies, you can deploy any java application to {openshift} cluster.
59+
60+
Clone Eclipse JKube repository and go to one of the quickstarts:
61+
62+
[subs="+quotes,attributes"]
63+
----
64+
$ git clone https://github.com/eclipse-jkube/jkube.git
65+
$ cd jkube/quickstarts/maven/quarkus
66+
----
67+
68+
Run JKube OpenShift Maven Plugin goal to build and deploy application to {openshift} cluster:
69+
70+
[subs="+quotes,attributes"]
71+
----
72+
$ mvn package oc:build oc:resource oc:apply
73+
----
74+
75+
Wait till application pod comes in ready state and access the application via route:
76+
77+
[subs="+quotes,attributes"]
78+
----
79+
$ oc get routes
80+
$ curl http://quarkus-default.apps-crc.testing
81+
----
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
:description: Getting Started
2+
= Get started!
3+
4+
{prod} is local {openshift}, focusing on making it easy to learn and develop for {openshift}. This guide will help you
5+
get started with CodeReady Containers ({prod}) in OpenShift. {prod} provides a way to run OpenShift locally for development
6+
and testing purposes.
7+
8+
== Getting {prod}
9+
In order to download and install {prod}, please refer to the xref:installing.adoc[Installation Guide].
10+
11+
- Ensure you have the minimum hardware and software requirements for {prod}.
12+
- Download the latest {prod} release from the official website.
13+
- Install the {prod} binary and add it to your system's PATH.
14+
15+
[id='creating-openshift-preset']
16+
== Creating {openshift} cluster
17+
include::getting-started-scenarios/openshift.adoc[]
18+
19+
[id='creating-okd-preset']
20+
== Creating {okd} cluster
21+
include::getting-started-scenarios/okd.adoc[]
22+
23+
24+
[id='creating-microshift-preset']
25+
== Creating {ushift} cluster
26+
include::getting-started-scenarios/microshift.adoc[]

0 commit comments

Comments
 (0)