Skip to content

Commit 666dad7

Browse files
authored
Merge pull request #91212 from bergerhoffer/OSDOCS-13254-web-tutorial
OSDOCS#13454: Updates to the web console tutorial
2 parents 7e19b7e + c3874ae commit 666dad7

22 files changed

+303
-267
lines changed

images/fa-plus-circle.png

439 Bytes
Loading
-15.4 KB
Loading
24.1 KB
Loading
-35.6 KB
Loading

modules/getting-started-cli-creating-new-project.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ Cluster administrators can allow developers to create their own projects. In mos
1212

1313
This procedure creates a new project called `user-getting-started`. You will use this project throughout the rest of this tutorial.
1414

15+
[IMPORTANT]
16+
====
17+
If you are using Developer Sandbox to complete this tutorial, skip this procedure. A project has already been created for you.
18+
====
19+
1520
.Prerequisites
1621

17-
* You have access to an {product-title} cluster.
18-
* You have installed the OpenShift CLI (`oc`).
22+
* You have logged in to the {oc-first}.
1923
2024
.Procedure
2125

modules/getting-started-cli-creating-secret.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
[id="getting-started-cli-creating-secret_{context}"]
77
= Providing access to the database by creating a secret
88

9-
The `nationalparks` application needs information, such as the database name, username, and passwords, on how to access the MongoDB database. However, because this information is sensitive, you should not store it directly in the pod.
9+
The `nationalparks` application needs information, such as the database name, username, and passwords, to access the MongoDB database. However, because this information is sensitive, you should not store it directly in the pod.
1010

1111
You can use a _secret_ to store sensitive information, and share that secret with workloads.
1212

13-
`Secret` objects provide a mechanism to hold sensitive information such as passwords, {product-title} client configuration files, private source repository credentials, and so on. Secrets decouple sensitive content from the pods. You can mount secrets into containers by using a volume plugin, or the system can use secrets to perform actions on behalf of a pod.
13+
`Secret` objects provide a mechanism to hold sensitive information such as passwords, {product-title} client configuration files, and private source repository credentials. Secrets decouple sensitive content from the pods. You can mount secrets into containers by using a volume plugin or by passing the secret in as an environment variable. The system can then use secrets to provide the pod with the sensitive information.
1414

1515
The following procedure creates the `nationalparks-mongodb-parameters` secret and mounts it to the `nationalparks` workload.
1616

modules/getting-started-cli-granting-permissions.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ As a requirement of the application, you must assign the `view` role to the `def
2626
----
2727
$ oc adm policy add-role-to-user view -z default -n user-getting-started
2828
----
29+
+
30+
[IMPORTANT]
31+
====
32+
If you are using a different project, replace `user-getting-started` with the name of your project.
33+
====

modules/getting-started-cli-login.adoc

Lines changed: 0 additions & 38 deletions
This file was deleted.

modules/getting-started-cli-view.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ NAME HOST/PORT PATH SER
3434
parksmap parksmap-user-getting-started.apps.cluster.example.com parksmap 8080-tcp edge None
3535
----
3636

37-
. From the above output, copy the value in the `HOST/PORT` column. Because the route is a secured route, you must add `https://` in front to get the application URL.
37+
. From the above output, copy the value in the `HOST/PORT` column.
38+
39+
. Add `https://` in front of the copied value to get the application URL. This is necessary because the route is a secured route.
3840
+
3941
.Example application URL
4042
[source,text]
@@ -45,4 +47,6 @@ https://parksmap-user-getting-started.apps.cluster.example.com
4547
. Paste this application URL into your web browser. Your browser should display a map of the national parks across the world.
4648
+
4749
.National parks across the world
48-
image::getting-started-map-national-parks.png[A map of the national parks across the world is displayed with location tracking.]
50+
image::getting-started-map-national-parks.png[Map of the national parks across the world]
51+
+
52+
If you allow the application to access your location, the map will center on your location.
Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11
// Module included in the following assemblies:
22
//
3-
// * getting-started/openshift-web-console.adoc
3+
// * tutorials/dev-app-web-console.adoc
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="getting-started-web-console-connecting-database_{context}"]
7-
= Connecting to a database
7+
= Deploying the database application
88

9-
Deploy and connect a MongoDB database where the `national-parks-app` application stores location information.
10-
Once you mark the `national-parks-app` application as a backend for the map visualization tool, `parksmap` deployment uses the {product-title} discover mechanism to display the map automatically.
9+
The following procedure deploys `mongodb-nationalparks`, which is a MongoDB database that will hold the national park location information.
1110

1211
.Prerequisites
1312

14-
* You are logged in to the {product-title} web console.
15-
* You are in the *Developer* perspective.
16-
* You have a deployed image.
13+
* You have deployed the `parksmap` front-end application.
14+
* You have deployed the `nationalparks` back-end application.
1715
1816
.Procedure
1917

20-
. From the *+Add* view in the *Developer* perspective, click *Container images* to open a dialog.
21-
. In the *Image Name* field, enter `quay.io/centos7/mongodb-36-centos7`.
22-
. In the *Runtime icon* field, search for `mongodb`.
23-
. Scroll down to the *General* section.
24-
. Ensure that you have the current values for the following:
25-
.. Application: `national-parks-app`
26-
.. Name: `mongodb-nationalparks`
27-
. Select *Deployment* as the *Resource*.
28-
. Unselect the checkbox next to *Create route to the application*.
29-
. In the *Advanced Options* section, click *Deployment* to add environment variables to add the following environment variables:
18+
. From the *Quick create* (image:fa-plus-circle.png[title="Quick create menu"]) menu in the upper right corner, click *Container images*.
19+
. Select *Image name from external registry* and enter `registry.redhat.io/rhmap47/mongodb`.
20+
. In the *Runtime icon* field, search for and select `mongodb`.
21+
. Scroll to the *General* section.
22+
. In the *Application name* field, enter `national-parks-app`.
23+
. In the *Name* field, enter `mongodb-nationalparks`.
24+
. Scroll to the *Deploy* section.
25+
. In the *Resource type* field, ensure that *Deployment* is selected.
26+
. Click *Show advanced Deployment option*.
27+
. Under *Environment variables (runtime only)*, add the following names and values:
3028
+
3129
.Environment variable names and values
3230
[cols="1,1"]
@@ -38,5 +36,16 @@ Once you mark the `national-parks-app` application as a backend for the map visu
3836
|`MONGODB_DATABASE`|`mongodb`
3937
|`MONGODB_ADMIN_PASSWORD`|`mongodb`
4038
|===
39+
+
40+
[TIP]
41+
====
42+
Click *Add value* to add each additional environment variable.
43+
====
44+
45+
. In the *Advanced options* section, clear *Create a route*.
46+
+
47+
The database application does not need to be accessed externally, so a route is not required.
4148

4249
. Click *Create*.
50+
51+
You are redirected to the *Topology* page where you can see the `mongodb-nationalparks` deployment in the `national-parks-app` application.

0 commit comments

Comments
 (0)