Skip to content

Commit 534e33f

Browse files
authored
Merge pull request #15 from OpenLiberty/id-review
Address ID review feedback
2 parents a53c85e + e8da750 commit 534e33f

File tree

1 file changed

+48
-48
lines changed

1 file changed

+48
-48
lines changed

README.adoc

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,26 @@ Explore how to deploy microservices to Google Kubernetes Engine (GKE) on Google
4646
You will learn how to deploy two microservices in Open Liberty containers to a {kube} cluster on
4747
Google Kubernetes Engine (GKE).
4848

49-
Kubernetes is an open source container orchestrator that automates many tasks involved in
49+
Kubernetes is an open source container orchestrator that automates many tasks that are involved in
5050
deploying, managing, and scaling containerized applications. If you would like to learn
5151
more about Kubernetes, check out the https://openliberty.io/guides/kubernetes-intro.html[Deploying microservices to Kubernetes^]
5252
guide.
5353

5454
There are different cloud-based solutions for running your {kube} workloads.
55-
A cloud-based infrastructure enables you to focus on developing your microservices
55+
With a cloud-based infrastructure, you can focus on developing your microservices
5656
without worrying about low-level infrastructure details for deployment. Using a cloud helps
57-
you to easily scale and manage your microservices in a high-availability setup.
57+
you easily scale and manage your microservices in a high-availability setup.
5858

5959
Google Cloud Platform offers a managed {kube} service called Google Kubernetes Engine (GKE). Using GKE simplifies the process of running Kubernetes on Google Cloud Platform without
6060
needing to install or maintain your own Kubernetes control plane. It provides a hosted {kube}
6161
cluster that you can deploy your microservices to. In this guide, you will use GKE with a Google
6262
Container Registry (GCR). GCR is a private registry that is used to store
63-
and distribute your container images. Note, since GKE is hosted on Google Cloud Platform, fees may be associated with running this guide. See the official
63+
and distribute your container images. Because GKE is hosted on Google Cloud Platform, fees might be associated with running this guide. See the official
6464
https://cloud.google.com/kubernetes-engine/pricing[GKE pricing^] documentation for more details.
6565

6666
The two microservices you will deploy are called `system` and `inventory`.
6767
The `system` microservice returns the JVM system properties of the running container.
68-
It also returns the name of the pod in the HTTP header, making replicas easy to distinguish from each other.
68+
It also returns the name of the pod in the HTTP header, which makes replicas easy to distinguish from each other.
6969
The `inventory` microservice adds the properties from the `system` microservice to the inventory.
7070
This demonstrates how communication can be established between pods inside a cluster.
7171

@@ -75,30 +75,30 @@ This demonstrates how communication can be established between pods inside a clu
7575

7676
== Additional prerequisites
7777

78-
Before you begin, the following additional tools need to be installed:
78+
Before you begin, the following tools need to be installed:
7979

80-
* *Google Account:* To run this guide and use Google Cloud Platform, you will need a Google account. If you do not
80+
* *Google account:* To run this guide and use Google Cloud Platform, you will need a Google account. If you do not
8181
have an account already, navigate to the
8282
https://accounts.google.com/signup[Google account sign-up page^]
8383
to create a Google account.
8484

85-
* *Google Cloud Platform Account:* Visit the https://console.cloud.google.com/[Google Cloud Platform console^] to link your
85+
* *Google Cloud Platform account:* Visit the https://console.cloud.google.com/[Google Cloud Platform console^] to link your
8686
Google account to Google Cloud Platform.
8787

88-
* *Google Cloud SDK - CLI:* You will need to use the `gcloud` command-line tool included in the https://cloud.google.com/sdk[Google Cloud SDK^].
88+
* *Google Cloud SDK - CLI:* You will need to use the `gcloud` command-line tool that is included in the https://cloud.google.com/sdk[Google Cloud SDK^].
8989
See the official
9090
https://cloud.google.com/sdk/docs/quickstarts[Cloud SDK: Command Line Interface - Quickstart^]
9191
documentation and complete the “Before you begin” section to set up the Google Cloud Platform CLI for your platform.
92-
To verify that the `gcloud` is installed correctly, run the following command:
92+
To verify that the `gcloud` tool is installed correctly, run the following command:
9393

9494
+
9595
[role=command]
9696
```
9797
gcloud info
9898
```
9999

100-
* *kubectl:* You need the Kubernetes command-line tool `kubectl` to interact with your Kubernetes cluster.
101-
If you do not have `kubectl` installed already, use the Google Cloud Platform CLI to download and install `kubectl` with the following command:
100+
* *kubectl:* You need the Kubernetes `kubectl` command-line tool to interact with your Kubernetes cluster.
101+
If `kubectl` is not already installed, use the Google Cloud Platform CLI to download and install `kubectl` with the following command:
102102

103103
+
104104
[role=command]
@@ -124,7 +124,7 @@ include::{common-includes}/gitclone.adoc[]
124124
=== Initializing the Google Cloud SDK
125125

126126
To create a Google Cloud Project, first initialize the Google Cloud SDK by performing the `gcloud` initial setup.
127-
The `gcloud init` command launches an interactive setup that creates or modifies configuration for `gcloud`,
127+
The `gcloud init` command starts an interactive setup that creates or modifies configuration for `gcloud`,
128128
such as setting the user account and specifying the project to use:
129129

130130
[role=command]
@@ -133,12 +133,12 @@ gcloud init
133133
```
134134

135135
Follow the prompt to log in with your Google Cloud Platform account.
136-
This authorizes Google Cloud SDK to access Google Cloud Platform using your account credentials.
136+
This authorizes Google Cloud SDK to access Google Cloud Platform with your account credentials.
137137

138138
If you have existing projects, do not use them. Instead, create a new project for this guide. If you don't have existing projects, you will be automatically prompted to create a new one.
139139

140140
You will need to specify a Project ID for your project.
141-
Enter a Project ID that is unique within Google Cloud and matches the pattern described in the prompt.
141+
Enter a Project ID that is unique within Google Cloud and matches the pattern that is described in the prompt.
142142

143143

144144
If the Project ID is available to use, you will see the following output:
@@ -150,9 +150,9 @@ Your current project has been set to: [project-id].
150150
Your Google Cloud SDK is configured and ready to use!
151151
----
152152

153-
Make sure that billing is enabled for your project, so that you can use its Google Cloud services.
153+
Make sure that billing is enabled for your project so that you can use its Google Cloud services.
154154
Follow the https://cloud.google.com/billing/docs/how-to/modify-project#confirm_billing_is_enabled_on_a_project[Modify a Project's Billing Settings^]
155-
documentation to enable billing for your Google cloud project.
155+
documentation to enable billing for your Google Cloud project.
156156

157157
=== Enabling Google Cloud APIs for your project
158158

@@ -168,15 +168,15 @@ Your private container registry manages and stores the container images that you
168168
To deploy your application to Google Kubernetes Engine (GKE), you will need to enable the `Kubernetes Engine API`.
169169
The container images that you build will run on a Google Kubernetes Engine cluster.
170170

171-
Enable the necessary Google Cloud APIs for your project using the `gcloud services enable` command.
171+
Enable the necessary Google Cloud APIs for your project by using the `gcloud services enable` command.
172172
To see a list of Google Cloud APIs and services that are available for your project, run the following command:
173173

174174
[role=command]
175175
```
176176
gcloud services list --available
177177
```
178178

179-
You will see an output similar to the following:
179+
You will see an output similar to the following example:
180180

181181
[role="no_copy"]
182182
----
@@ -194,7 +194,7 @@ containerregistry.googleapis.com Container Registry API
194194

195195
The `NAME` field is the value that you need to pass into the `gcloud services enable` command to enable an API.
196196

197-
Run the following command to enable the `Compute Engine API`, `Cloud Build API`, and the `Kubernetes Engine API`:
197+
Run the following command to enable the `Compute Engine API`, `Cloud Build API`, and `Kubernetes Engine API`:
198198

199199
[role=command]
200200
```
@@ -203,7 +203,7 @@ gcloud services enable compute.googleapis.com cloudbuild.googleapis.com containe
203203

204204
=== Setting the default region and zone
205205

206-
A Compute Engine region is a geographical location used to host your Compute Engine resources.
206+
A Compute Engine region is a geographical location that is used to host your Compute Engine resources.
207207
Each region is composed of multiple zones. For example, the `asia-east1` region is divided into
208208
multiple zones: `asia-east1-a`, `asia-east1-b`, and `asia-east1-c`.
209209
Some resources are limited to specific regions or zones, and other resources are available across all regions.
@@ -222,7 +222,7 @@ Run the following command to see the list of available zones and its correspondi
222222
gcloud compute zones list
223223
```
224224

225-
You will see an output similar to the following:
225+
You will see an output similar to the following example:
226226

227227
[role="no_copy"]
228228
----
@@ -244,10 +244,10 @@ northamerica-northeast1-b northamerica-northeast1 UP
244244
northamerica-northeast1-c northamerica-northeast1 UP
245245
----
246246

247-
The `NAME` field and `REGION` field are the values that you will later substitute into `[zone]` and `[region]`, respectively.
247+
The `NAME` field and `REGION` field are the values that you will later substitute into `[zone]` and `[region]`.
248248

249249
To set the default Compute Engine region and zone, run the `gcloud config set compute` command.
250-
Remember to replace `[region]` and `[zone]` with a region and zone that is available for your project.
250+
Remember to replace `[region]` and `[zone]` with a region and a zone that are available for your project.
251251
Make sure that your zone is within the region that you set.
252252

253253
[role=command]
@@ -275,18 +275,18 @@ Navigate to the `start` directory and run the following command:
275275
mvn package
276276
```
277277

278-
Now that your microservices are packaged, build your container images using Google Cloud Build.
279-
Instead of having to install Docker locally to containerize your application, you can use Cloud Build's
280-
`gcloud builds submit --tag` command to build a Docker image using a Dockerfile, and push the image to a container registry.
278+
Now that your microservices are packaged, build your container images by using Google Cloud Build.
279+
Instead of installing Docker locally to containerize your application, you can use Cloud Build's
280+
`gcloud builds submit --tag` command to build a Docker image from a Dockerfile and push that image to a container registry.
281281
Cloud Build is similar to running the `docker build` and `docker push` commands.
282282

283-
The `gcloud builds submit --tag` command needs to be run from the directory containing the Dockerfile.
283+
Run the `gcloud builds submit --tag` command from the directories that contain the Dockerfiles.
284284
You will build images for `system` and `inventory` by running the `gcloud builds submit --tag` command
285-
from both the `start/system` and `start/inventory` directory.
285+
from both the `start/system` and `start/inventory` directories.
286286

287287
Navigate to the `start/system` directory.
288288

289-
Build the `system` image and push it to your container registry using Cloud Build.
289+
Build the `system` image and push it to your container registry by using Cloud Build.
290290
Your container registry is located at `gcr.io/[project-id]`.
291291
Replace `[project-id]` with the Project ID that you previously defined for your Google Cloud project.
292292
To get the Project ID for your project, run the `gcloud config get-value project` command.
@@ -309,7 +309,7 @@ ID CREATE_TIME DURATION SOURC
309309
310310
Navigate to the `start/inventory` directory.
311311
312-
Build the `inventory` image and push it to your container registry using Cloud Build:
312+
Build the `inventory` image and push it to your container registry by using Cloud Build:
313313
314314
[role=command]
315315
```
@@ -335,7 +335,7 @@ To verify that the images are built, run the following command to list all exist
335335
gcloud container images list
336336
```
337337

338-
Your two images `system` and `inventory` should appear in the list of all container images:
338+
Your `system` and `inventory` images should appear in the list of all container images:
339339

340340
[role="no_copy"]
341341
----
@@ -355,7 +355,7 @@ When the cluster is created, the command outputs information about the cluster.
355355
You might need to wait while your cluster is being created.
356356

357357
Replace `[cluster-name]` with a name that you want for your cluster.
358-
The name for your cluster must only contain lowercase alphanumeric characters and `-`,
358+
The name for your cluster must contain only lowercase alphanumeric characters and `-`,
359359
and must start with a letter and end with an alphanumeric character.
360360

361361
[role=command]
@@ -374,7 +374,7 @@ NAME LOCATION MASTER_VERSION MASTER_IP MACHINE_TYPE NODE_VER
374374
Since a zone was not specified in the `gcloud container clusters create` command,
375375
your cluster was created in the default zone that you previously set in the `gcloud config set compute/zone` command.
376376

377-
The option `--num-nodes` creates a cluster with a certain number of nodes in the Kubernetes node pool.
377+
The `--num-nodes` option creates a cluster with a certain number of nodes in the Kubernetes node pool.
378378
By default, if this option is excluded, three nodes are assigned to the node pool.
379379
You created a single-node cluster since this application does not require a large amount of resources.
380380

@@ -386,7 +386,7 @@ kubectl get nodes
386386
```
387387

388388
The `kubectl get nodes` command outputs information about the node.
389-
The `STATUS` of the node is in the `Ready` state.
389+
The `STATUS` of the node is in the `Ready` state:
390390

391391
[role="no_copy"]
392392
----
@@ -401,7 +401,7 @@ gke-[cluster-name]-default-pool-be4471fe-qnl6 Ready <none> 46s v1.14.10-
401401

402402
== Deploying microservices to GKE
403403

404-
Now that your container images are built and you have created a Kubernetes cluster, you can deploy the images using a Kubernetes resource definition.
404+
Now that your container images are built and you created a Kubernetes cluster, you can deploy the images using a Kubernetes resource definition.
405405

406406
A Kubernetes resource definition is a `yaml` file that contains a description of all your
407407
deployments, services, or any other resources that you want to deploy. All resources can
@@ -415,7 +415,7 @@ Navigate to the `start` directory.
415415

416416
[role="code_command hotspot file=0", subs="quotes"]
417417
----
418-
#Update the `kubernetes.yaml`.#
418+
#Update the `kubernetes.yaml` file.#
419419
`kubernetes.yaml`
420420
----
421421
[role="edit_command_text"]
@@ -433,8 +433,8 @@ to use for the container. The [hotspot]`kubernetes.yaml` file references the ima
433433
for the [hotspot=sysImage file=0]`system` and [hotspot=invImage file=0]`inventory` repositories.
434434

435435
The service that is used to expose your deployments has a type of [hotspot=sysNodePort hotspot=invNodePort file=0]`NodePort`.
436-
This means you can access these services from outside of your cluster via a specific port.
437-
You can expose your services in other ways such as using a `LoadBalancer` service type or using an `Ingress`.
436+
This type means you can access these services from outside of your cluster via a specific port.
437+
You can expose your services in other ways, such as using a `LoadBalancer` service type or by using an `Ingress`.
438438
In production, you would most likely use an `Ingress`.
439439

440440
=== Deploying your application
@@ -449,7 +449,7 @@ Navigate to the `start` directory and run the following command to deploy the re
449449
kubectl apply -f kubernetes.yaml
450450
```
451451

452-
You will see an output similar to the following:
452+
You will see the following output:
453453

454454
[role="no_copy"]
455455
----
@@ -465,7 +465,7 @@ Run the following command to check the status of your pods:
465465
kubectl get pods
466466
```
467467

468-
If all the pods are healthy and running, you will see an output similar to the following:
468+
If all the pods are healthy and running, you will see an output similar to the following example:
469469
[role="no_copy"]
470470
----
471471
NAME READY STATUS RESTARTS AGE
@@ -486,7 +486,7 @@ gcloud compute firewall-rules create sys-node-port --allow tcp:31000
486486
gcloud compute firewall-rules create inv-node-port --allow tcp:32000
487487
```
488488

489-
Take note of the `EXTERNAL-IP` in the output of the following command. It is the hostname you will later substitute into `[hostname]`:
489+
Take note of the `EXTERNAL-IP` in the output of the following command. It is the hostname that you will later substitute into `[hostname]`:
490490

491491
[role='command']
492492
```
@@ -532,10 +532,10 @@ The default properties that are defined in the [hotspot file=0]`pom.xml` file ar
532532
[cols="15, 100", options="header"]
533533
|===
534534
| *Property* | *Description*
535-
| [hotspot=cluster file=0]`cluster.ip` | IP or hostname for your cluster.
536-
| [hotspot=system-service file=0]`system.kube.service` | Name of the Kubernetes Service wrapping the `system` pods, `system-service` by default.
537-
| [hotspot=system-node-port file=0]`system.node.port` | The NodePort of the Kubernetes Service `system-service`, 31000 by default.
538-
| [hotspot=inventory-node-port file=0]`inventory.node.port` | The NodePort of the Kubernetes Service `inventory-service`, 32000 by default.
535+
| [hotspot=cluster file=0]`cluster.ip` | The IP or hostname for your cluster.
536+
| [hotspot=system-service file=0]`system.kube.service` | The name of the Kubernetes Service wrapping the `system` pods, `system-service` by default.
537+
| [hotspot=system-node-port file=0]`system.node.port` | The NodePort of the `system-service` Kubernetes Service, 31000 by default.
538+
| [hotspot=inventory-node-port file=0]`inventory.node.port` | The NodePort of the `inventory-service` Kubernetes Service, 32000 by default.
539539
|===
540540

541541

@@ -549,7 +549,7 @@ with the value determined in the previous section.
549549
mvn failsafe:integration-test -Dcluster.ip=[hostname]
550550
```
551551

552-
If the tests pass, you will see an output similar to the following for each service:
552+
If the tests pass, you will see the following output for each service:
553553

554554
[role="no_copy"]
555555
----
@@ -600,7 +600,7 @@ Delete the firewall rules for your node ports:
600600
gcloud compute firewall-rules delete sys-node-port inv-node-port
601601
```
602602

603-
Since you are done testing your cluster, clean up all of its related sources using the `gcloud container clusters delete` command.
603+
Since you are done testing your cluster, clean up all of its related sources by using the `gcloud container clusters delete` command:
604604

605605
[role='command']
606606
```

0 commit comments

Comments
 (0)