mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
OSDOCS-12668
This commit is contained in:
@@ -64,46 +64,46 @@ Topics:
|
||||
Distros: openshift-rosa-hcp
|
||||
Topics:
|
||||
- Name: Deploying a cluster
|
||||
File: cloud-experts-getting-started-hcp-for-hcp
|
||||
File: learning-getting-started-hcp-for-hcp
|
||||
- Name: Creating an admin user
|
||||
File: cloud-experts-getting-started-admin
|
||||
File: learning-getting-started-admin
|
||||
- Name: Setting up an identity provider
|
||||
File: cloud-experts-getting-started-idp
|
||||
File: learning-getting-started-idp
|
||||
- Name: Granting admin rights
|
||||
File: cloud-experts-getting-started-admin-rights
|
||||
File: learning-getting-started-admin-rights
|
||||
- Name: Accessing your cluster
|
||||
File: cloud-experts-getting-started-accessing
|
||||
File: learning-getting-started-accessing
|
||||
- Name: Managing worker nodes
|
||||
File: cloud-experts-getting-started-managing-worker-nodes
|
||||
File: learning-getting-started-managing-worker-nodes
|
||||
- Name: Autoscaling
|
||||
File: cloud-experts-getting-started-autoscaling
|
||||
File: learning-getting-started-autoscaling
|
||||
- Name: Upgrading your cluster
|
||||
File: cloud-experts-getting-started-upgrading
|
||||
File: learning-getting-started-upgrading
|
||||
- Name: Deleting your cluster
|
||||
File: cloud-experts-getting-started-deleting
|
||||
File: learning-getting-started-deleting
|
||||
- Name: Obtaining support
|
||||
File: cloud-experts-getting-started-support
|
||||
File: learning-getting-started-support
|
||||
- Name: Deploying an application workshop
|
||||
Dir: deploying_application_workshop
|
||||
Topics:
|
||||
- Name: Workshop overview
|
||||
File: learning-lab-overview
|
||||
- Name: Deployment
|
||||
File: cloud-experts-deploying-application-deployment
|
||||
File: learning-deploying-application-deployment
|
||||
- Name: Health Check
|
||||
File: cloud-experts-deploying-application-health-check
|
||||
File: learning-deploying-application-health-check
|
||||
- Name: Storage
|
||||
File: cloud-experts-deploying-application-storage
|
||||
File: learning-deploying-application-storage
|
||||
- Name: ConfigMap, secrets, and environment variables
|
||||
File: cloud-experts-deploying-configmaps-secrets-env-var
|
||||
File: learning-deploying-configmaps-secrets-env-var
|
||||
- Name: Networking
|
||||
File: cloud-experts-deploying-application-networking
|
||||
File: learning-deploying-application-networking
|
||||
- Name: Scaling an application
|
||||
File: cloud-experts-deploying-application-scaling
|
||||
File: learning-deploying-application-scaling
|
||||
- Name: S2i deployments
|
||||
File: cloud-experts-deploying-application-s2i-deployments
|
||||
File: learning-deploying-application-s2i-deployments
|
||||
- Name: Using Source-to-Image (S2I) webhooks for automated deployment
|
||||
File: cloud-experts-deploying-s2i-webhook-cicd
|
||||
File: learning-deploying-s2i-webhook-cicd
|
||||
# ---
|
||||
# Name: Architecture
|
||||
# Dir: architecture
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-getting-started-accessing"]
|
||||
[id="learning-getting-started-accessing"]
|
||||
= Accessing your cluster
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-getting-started-accessing
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-getting-started-admin-rights"]
|
||||
[id="learning-getting-started-admin-rights"]
|
||||
= Granting admin privileges
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-getting-started-admin-rights
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-getting-started-admin"]
|
||||
[id="learning-getting-started-admin"]
|
||||
= Creating an admin user
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-getting-started-admin
|
||||
@@ -86,4 +86,4 @@ oc get all -n openshift-apiserver
|
||||
+
|
||||
Only an admin user can run this command without errors.
|
||||
|
||||
. You can now use the cluster as an admin user, which will suffice for this tutorial. For actual deployment, it is highly recommended to set up an identity provider, which is explained in the xref:../../rosa_learning/creating_cluster_workshop/cloud-experts-getting-started-idp.adoc#cloud-experts-getting-started-idp[next tutorial].
|
||||
. You can now use the cluster as an admin user, which will suffice for this tutorial. For actual deployment, it is highly recommended to set up an identity provider, which is explained in the xref:../../rosa_learning/creating_cluster_workshop/learning-getting-started-idp.adoc#learning-getting-started-idp[next tutorial].
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-getting-started-autoscaling"]
|
||||
[id="learning-getting-started-autoscaling"]
|
||||
= Autoscaling
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-getting-started-autoscaling
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-getting-started-deleting"]
|
||||
[id="learning-getting-started-deleting"]
|
||||
= Deleting your cluster
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-getting-started-deleting
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-getting-started-hcp-guide"]
|
||||
[id="learning-getting-started-hcp-guide"]
|
||||
= Creating a cluster
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
include::_attributes/common-attributes.adoc[]
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-getting-started-idp"]
|
||||
[id="learning-getting-started-idp"]
|
||||
= Setting up an identity provider
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-getting-started-idp
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-getting-started-managing-worker-nodes"]
|
||||
[id="learning-getting-started-managing-worker-nodes"]
|
||||
= Managing worker nodes
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-getting-started-managing-worker-nodes
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-getting-started-support"]
|
||||
[id="learning-getting-started-support"]
|
||||
= Obtaining support
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-getting-started-support
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-getting-started-upgrading"]
|
||||
[id="learning-getting-started-upgrading"]
|
||||
= Upgrading your cluster
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-getting-started-upgrading
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-deploying-application-deployment"]
|
||||
[id="learning-deploying-application-deployment"]
|
||||
= Deploying the OSToy application with Kubernetes
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-deploying-application-deployment
|
||||
@@ -27,7 +27,16 @@ This workshop focuses on application deployment and has users run a remote file
|
||||
== Retrieving the login command
|
||||
|
||||
.Procedure
|
||||
. If you are not logged in to the command-line interface (CLI), access your cluster with the web console.
|
||||
. Confirm you are logged in to the command-line interface (CLI) by running the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
rosa whoami
|
||||
----
|
||||
+
|
||||
If you are logged in to the command-line interface, skip to "Creating a new project". If you are not logged in to the command-line interface, continue this procedure.
|
||||
|
||||
. Access your cluster with the web console.
|
||||
|
||||
. Click the dropdown arrow next to your login name in the upper right corner, and select *Copy Login Command*.
|
||||
+
|
||||
@@ -62,7 +71,7 @@ Use your preferred interface to create a new project.
|
||||
=== Creating a new project using the CLI
|
||||
|
||||
.Procedure
|
||||
. Create a new project named `ostoy` in your cluster by running following command:
|
||||
* Create a new project named `ostoy` in your cluster by running following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-deploying-application-health-check"]
|
||||
[id="learning-deploying-application-health-check"]
|
||||
= Health check
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-deploying-application-health-check
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-deploying-application-networking"]
|
||||
[id="learning-deploying-application-networking"]
|
||||
= Networking
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-deploying-application-networking
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-deploying-application-s2i-deployments"]
|
||||
[id="learning-deploying-application-s2i-deployments"]
|
||||
= S2I deployments
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-deploying-application-s2i-deployments
|
||||
@@ -10,12 +10,21 @@ The integrated Source-to-Image (S2I) builder is one method to deploy application
|
||||
[id="prereqs_deploying-application-s2i-deployments"]
|
||||
.Prerequisites
|
||||
|
||||
. A ROSA cluster
|
||||
* A ROSA cluster
|
||||
|
||||
[id="retrieving-login_deploying-application-s2i-deployments"]
|
||||
== Retrieving your login command
|
||||
|
||||
.Procedure
|
||||
. Confirm you are logged in to the command-line interface (CLI) by running the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
rosa whoami
|
||||
----
|
||||
+
|
||||
If you are logged in to the command-line interface, skip to "Creating a new project". If you are not logged in to the command-line interface, continue this procedure.
|
||||
|
||||
. If you are not logged in to the command line interface (CLI), in {cluster-manager-url}, click the dropdown arrow next to your name in the upper-right and select *Copy Login Command*.
|
||||
+
|
||||
image::ostoy-cli-login.png[CLI Login]
|
||||
@@ -44,7 +53,10 @@ You don't have any projects. You can try to create a new project, by running
|
||||
oc new-project <project name>
|
||||
----
|
||||
|
||||
. Create a new project from the CLI by running the following command:
|
||||
[id="create-new-project_deploying-application-s2i-deployments"]
|
||||
== Creating a new project
|
||||
|
||||
* Create a new project from the CLI by running the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
@@ -68,31 +80,31 @@ Replace `<UserName>` with your own GitHub username for the following URLs in thi
|
||||
. Add a secret to OpenShift.
|
||||
+
|
||||
This example emulates a `.env` file. Files are easily moved directly into an OpenShift environment and can even be renamed in the secret.
|
||||
|
||||
+
|
||||
** Run the following command, replacing `<UserName>` with your GitHub username:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc create -f https://raw.githubusercontent.com/<UserName>/ostoy/master/deployment/yaml/secret.yaml
|
||||
----
|
||||
|
||||
+
|
||||
. Add a ConfigMap to OpenShift.
|
||||
+
|
||||
This example emulates an HAProxy config file, which is typically used for overriding default configurations in an OpenShift application. Files can be renamed in the ConfigMap.
|
||||
|
||||
+
|
||||
** Run the following command, replacing `<UserName>` with your GitHub username:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc create -f https://raw.githubusercontent.com/<UserName>/ostoy/master/deployment/yaml/configmap.yaml
|
||||
----
|
||||
|
||||
+
|
||||
. Deploy the microservice.
|
||||
+
|
||||
You must deploy the microservice to ensure that the service environment variables are available from the UI application.
|
||||
|
||||
+
|
||||
`--context-dir` builds the application defined in the `microservice` directory in the Git repository. The `app` label ensures the user interface (UI) application and microservice are both grouped in the OpenShift UI.
|
||||
|
||||
+
|
||||
** Run the following command to create the microservice, replacing `<UserName>` with your GitHub username:
|
||||
+
|
||||
[source,terminal]
|
||||
@@ -117,9 +129,9 @@ $ oc new-app https://github.com/<UserName>/ostoy \
|
||||
'oc expose service/ostoy-microservice'
|
||||
Run 'oc status' to view your app.
|
||||
----
|
||||
|
||||
+
|
||||
. Check the status of the microservice.
|
||||
.. Check that the microservice was created and is running correctly by running the following command:
|
||||
** Check that the microservice was created and is running correctly by running the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
@@ -138,12 +150,12 @@ svc/ostoy-microservice - 172.30.47.74:8080
|
||||
----
|
||||
+
|
||||
Wait until you see that the microservice was successfully deployed. You can also check this through the web UI.
|
||||
|
||||
+
|
||||
. Deploy the front end UI.
|
||||
+
|
||||
The application relies on several environment variables to define external settings.
|
||||
|
||||
.. Attach the secret and ConfigMap and create a PersistentVolume by running the following command:
|
||||
+
|
||||
** Attach the secret and ConfigMap and create a PersistentVolume by running the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
@@ -166,7 +178,7 @@ $ oc new-app https://github.com/<UserName>/ostoy \
|
||||
'oc expose service/ostoy'
|
||||
Run 'oc status' to view your app.
|
||||
----
|
||||
|
||||
+
|
||||
. Update the deployment by running the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
@@ -174,18 +186,18 @@ $ oc new-app https://github.com/<UserName>/ostoy \
|
||||
$ oc patch deployment ostoy --type=json -p \
|
||||
'[{"op": "replace", "path": "/spec/strategy/type", "value": "Recreate"}, {"op": "remove", "path": "/spec/strategy/rollingUpdate"}]'
|
||||
----
|
||||
|
||||
+
|
||||
. Set a liveness probe.
|
||||
+
|
||||
Create a liveness probe to ensure the pod restarts if something is wrong in the application.
|
||||
|
||||
.. Run the following command:
|
||||
+
|
||||
** Run the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc set probe deployment ostoy --liveness --get-url=http://:8080/health
|
||||
----
|
||||
|
||||
+
|
||||
. Attach the secret, ConfigMap, and persistent volume to the deployment.
|
||||
+
|
||||
.. Run the following command to attach your secret:
|
||||
@@ -205,7 +217,7 @@ $ oc set volume deployment ostoy --add \
|
||||
--configmap-name=ostoy-config \
|
||||
-m /var/config
|
||||
----
|
||||
|
||||
+
|
||||
.. Run the following command to create and attach your persistent volume:
|
||||
+
|
||||
[source,terminal]
|
||||
@@ -215,16 +227,16 @@ $ oc set volume deployment ostoy --add \
|
||||
--claim-size=1G \
|
||||
-m /var/demo_files
|
||||
----
|
||||
|
||||
+
|
||||
. Expose the UI application as an OpenShift Route.
|
||||
|
||||
.. Run the following command to deploy the application as an HTTPS application that uses the included TLS wildcard certificates:
|
||||
** Run the following command to deploy the application as an HTTPS application that uses the included TLS wildcard certificates:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc create route edge --service=ostoy --insecure-policy=Redirect
|
||||
----
|
||||
|
||||
+
|
||||
. Browse to your application with the following methods:
|
||||
** Run the following command to open a web browser with your OSToy application:
|
||||
+
|
||||
@@ -232,8 +244,8 @@ $ oc create route edge --service=ostoy --insecure-policy=Redirect
|
||||
----
|
||||
$ python -m webbrowser "$(oc get route ostoy -o template --template='https://{{.spec.host}}')"
|
||||
----
|
||||
|
||||
.. Run the following command to get the route for the application and copy and paste the route into your browser:
|
||||
+
|
||||
** Run the following command to get the route for the application and copy and paste the route into your browser:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-deploying-application-scaling"]
|
||||
[id="learning-deploying-application-scaling"]
|
||||
= Scaling an application
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-deploying-application-scaling
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-deploying-application-storage"]
|
||||
[id="learning-deploying-application-storage"]
|
||||
= Persistent volumes for cluster storage
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-deploying-application-storage
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-deploying-configmaps-secrets-envvar"]
|
||||
[id="learning-deploying-configmaps-secrets-envvar"]
|
||||
= ConfigMaps, secrets, and environment variables
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-deploying-configmaps-secrets-envvar
|
||||
@@ -1,5 +1,5 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cloud-experts-deploying-s2i-webhook-cicd"]
|
||||
[id="learning-deploying-s2i-webhook-cicd"]
|
||||
= Using Source-to-Image (S2I) webhooks for automated deployment
|
||||
include::_attributes/attributes-openshift-dedicated.adoc[]
|
||||
:context: cloud-experts-deploying-s2i-webhook-cicd
|
||||
Reference in New Issue
Block a user