You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: workshop/Lab3/README.md
+55-6Lines changed: 55 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,29 @@ When looking at what kind of storage class you would like to use in Kubernetes,
8
8
9
9
In this lab we will deploy a Mongo database on top of block storage on Kubernetes.
10
10
11
+

12
+
13
+
The basic architecture is as follows
14
+
15
+
1. When we install MongoDB with the helm chart, a `Persistent Volume Claim` (PVC) is created on the cluster. This PVC is a request for storage to be used by the application.
16
+
17
+
2. In IBM Cloud, the request goes to the IBM Cloud storage provider which then provisions a physical storage device within IBM Cloud.
18
+
19
+
3. A `Persistent Volume` (PV) is then created which acts as a reference to the physical storage device created earlier. This PV is then mounted as a directory in a container's file system.
20
+
21
+
4. The guestbook application receives requests to store guestbook entries from the user which the guestbook pod then sends to the MongoDB pod to store.
22
+
23
+
5. The MongoDB pod receives the request to store information and persists the data to the mounted directory from the Persistent Volume.
24
+
11
25
## Setup
12
26
13
27
Before we get into the lab we first need to do some setup to ensure that the lab will flow smoothly.
14
28
15
-
1. Replace `<docker username>` with your DockerHub username and run the following command (be sure to replace the `< >` too!).
29
+
<!--1. Replace `<docker username>` with your DockerHub username and run the following command (be sure to replace the `< >` too!).
16
30
17
31
```bash
18
-
DOCKER_USERNAME=<docker username>
19
-
```
32
+
DOCKERUSER=<docker username>
33
+
```-->
20
34
21
35
1. In your terminal, navigate to where you would like to store the files used in this lab and run the following.
22
36
@@ -41,6 +55,39 @@ By default IBM Kubernetes Service Clusters don't have the option to deploy block
41
55
42
56
1. Follow the steps outlined [here](https://cloud.ibm.com/docs/containers?topic=containers-block_storage#install_block) to install the block storage `storageClass`.
43
57
58
+
1. First you need to add the `iks-charts` helm repo to your local helm repos. This will allow you to utilize a variety of charts to install software on the IBM Kubernetes Service.
The lab uses Bitnami's Mongodb [Helm chart](https://github.com/bitnami/charts/tree/master/bitnami/mongodb) to show case the use of block storage. Set the Bitnami helm repo prior to installing mongodb.
This command will test out our helm install command and save the output manifests in a file called `mongodb-install-dryrun.yaml`
133
+
>There is a detailed breakdown of this commandin the next section titled `Installing MongoDB`if you would like to understand what this helm command is doing.
134
+
135
+
This command will test out our helm install command and save the output manifests in a file called `mongodb-install-dryrun.yaml`. You can then examine this manifest file so that you know exactly what will be installed on your cluster.
87
136
88
137
Check out the file in your code editor and take a look at the `PersistentVolumeClaim` object. There should be a property named `storageClassName`in the spec and the value should be `ibmc-block-gold` to signify that we will be using block storage for our database.
89
138
@@ -264,9 +313,9 @@ In this file we are telling the application which datasource we should use; in-m
0 commit comments