Skip to content

Commit 127d922

Browse files
committed
OKD lab
1 parent c6dedfd commit 127d922

File tree

1 file changed

+41
-12
lines changed

1 file changed

+41
-12
lines changed

README.md

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,13 @@ The vote microservice stores feedback from the sessions and displays how well al
6161

6262
You can clone the lab artifacts and explore the application:
6363

64+
1. Login into the cluster
65+
```console
66+
$ oc login
67+
```
6468
1. Navigate to your home directory:
6569
```console
66-
cd ~
70+
$ cd ~
6771
```
6872
1. Clone the project into your machine:
6973
```console
@@ -131,20 +135,48 @@ The following steps will build the sample application and create a Docker image
131135
```console
132136
$ docker images
133137
```
138+
If things have gone well, the output should look like this:
139+
```console
140+
REPOSITORY TAG IMAGE ID CREATED SIZE
141+
microservice-vote 1.0.0 8fe8ff1be07d 24 hours ago 369 MB
142+
microservice-enterprise-web 1.0.0 61d03c45ca21 25 hours ago 350 MB
143+
```
134144

135145
## Part 1B: Upload the Docker image to OKD's internal registry
136146

137-
OKD provides an internal, integrated container image registry. For this lab, we will use this registry to host our application image.
138-
**NOTE:** If you are running the lab on the same VM as OKD, run the following two commands and then skip to the next section.
139-
1. Tag your docker image:
147+
OKD provides an internal, integrated container image registry that is installed in your cluster. For this lab, we will use this registry to host our application image.
148+
149+
If you are using the same VM as the OKD VM, your images will be available in OKD's container registry for consumption after you run the following steps. But if you are not running on the same VM, skip the following 6 commands and continue from there:
150+
151+
1. Ensure you are logged in to OKD. Replace `<username>`, `<password>` and `<okd_ip>` with appropriate values:
152+
```console
153+
$ oc login --username=<username> --password=<password> https://console.<okd_ip>.nip.io:8443/
154+
```
155+
1. Create a project to in OKD:
156+
```bash
157+
$ oc new-project myproject
158+
```
159+
1. Tag your docker image to make it available to be used in `myproject`:
140160
```bash
141-
docker tag microservice-vote:1.0.0 docker-registry.default.svc:5000/myproject/microservice-vote:1.0.0
161+
$ docker tag microservice-vote:1.0.0 docker-registry.default.svc:5000/myproject/microservice-vote:1.0.0
162+
```
163+
1. You can use the Docker CLI to verify that your image is built.
164+
```console
165+
$ docker images
166+
```
167+
The output should now look like this:
168+
```console
169+
REPOSITORY TAG IMAGE ID CREATED SIZE
170+
docker-registry.default.svc:5000/myproject/microservice-vote 1.0.0 8fe8ff1be07d 24 hours ago 369 MB
171+
microservice-vote 1.0.0 8fe8ff1be07d 24 hours ago 369 MB
172+
microservice-enterprise-web 1.0.0 61d03c45ca21 25 hours ago 350 MB
142173
```
143-
1. Your image is now available in the internal registry in OKD. You can verify this through the OKD's Registry Dashboard available at `https://registry-console-default.apps.<okd_ip>.nip.io/registry`. You can use the same username and password as the one used in `oc login` command.
174+
1. You can also see your image the OKD's Registry Dashboard available at `https://registry-console-default.apps.<okd_ip>.nip.io/registry`. You can use the same username and password as the one used in `oc login` command.
175+
1. You skip the next few commands and go to Part 2.
144176

145177
Run the following steps **only** if you are running the lab on a system other than the OKD VM:
146178

147-
1. Ensure you are logged in to OKD. You can use OKD command line interface (CLI) to interact with the cluster. Replace `<username>`, `<password>` and `<okd_ip>` with appropriate values:
179+
1. Ensure you are logged in to OKD. Replace `<username>`, `<password>` and `<okd_ip>` with appropriate values:
148180
```console
149181
$ oc login --username=<username> --password=<password> https://console.<okd_ip>.nip.io:8443/
150182
```
@@ -164,7 +196,7 @@ Run the following steps **only** if you are running the lab on a system other th
164196
```console
165197
$ docker push docker-registry-default.apps.<okd_ip>.nip.io/myproject/microservice-vote:1.0.0
166198
```
167-
1. Your image is now available in the internal registry in OKD. You can verify this through the OKD's Registry Dashboard available at `https://registry-console-default.apps.<okd_ip>.nip.io/registry`. You can use the same username and password as the one used in `oc login` command.
199+
1. To verify your image is available in the registry, check the OKD's Registry Dashboard available at `https://registry-console-default.apps.<okd_ip>.nip.io/registry`. Use the same username and password as the one used in `oc login` command.
168200

169201
## Part 2: Deploy Open Liberty operator and and CouchDB Helm chart
170202

@@ -220,10 +252,7 @@ Now that Helm is configured both locally and on OKD, you can deploy CouchDB Helm
220252
```console
221253
$ cd /lab-artifacts/helm/database
222254
```
223-
1. Create a new project to host our application called `myproject`:
224-
```console
225-
$ oc new-project myproject
226-
If you have already created the `myproject`, then switch to the project:
255+
1. Switch project to `myproject`:
227256
```console
228257
$ oc project myproject
229258
```

0 commit comments

Comments
 (0)