Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Commit 0e33825

Browse files
AnthonyAmanseanimeshsingh
authored andcommitted
Updated images used (#15)
* Dockerfile reference setup.yaml * Updated README * Update kafka & a8 redis env var
1 parent 63d8e0c commit 0e33825

6 files changed

Lines changed: 44 additions & 6 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ You can now create the required keystores using the **setup.yaml** file. This wi
7777
$ kubectl create -f setup.yaml
7878
```
7979

80+
> You can find the Dockerfile and script for generating keystore in [containers/setup/ folder](containers/setup). You can build your own image using the provided Dockerfile.
81+
8082
Once it is done, the Pod will not run again. You can delete the Pod after using `kubectl delete pod setup` (optional).
8183

8284
If you want to confirm that the Pod has successfully imported the keystores, you can view the Pod's logs.
@@ -110,8 +112,8 @@ $ kubectl create -f platform/registry.yaml
110112

111113
To check if the control plane (controller and registry) is up:
112114
```bash
113-
$ curl -w "%{http_code}" "<Public IP of your cluster>:31200/health" -o /dev/null
114-
$ curl -w "%{http_code}" "<Public IP of your kubernetes>:31300/uptime" -o /dev/null
115+
$ curl -sw "%{http_code}" "<Public IP of your cluster>:31200/health" -o /dev/null
116+
$ curl -sw "%{http_code}" "<Public IP of your kubernetes>:31300/uptime" -o /dev/null
115117
```
116118
If both of them outputs 200, you can proceed to the next step.
117119
> Note: It can take around 1-2 minutes for the Pods to setup completely.

containers/setup/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Generate Keystore
2+
Dockerfile pulls from ibmjava image.
3+
```
4+
FROM ibmjava
5+
COPY gen-keystore.sh /tmp/gen-keystore.sh
6+
WORKDIR /tmp
7+
CMD bash ./gen-keystore.sh ${IP}
8+
```
9+
10+
The provided script `gen-keystore.sh` generates a certificate for the app and requires an IP address as input. You will need to set an environment variable `IP` in your yaml file for creating the Pod.
11+
12+
Example:
13+
```yaml
14+
apiVersion: v1
15+
kind: Pod
16+
metadata:
17+
name: setup
18+
labels:
19+
app: gameon
20+
tier: setup
21+
spec:
22+
restartPolicy: Never
23+
containers:
24+
- name: setup
25+
image: anthonyamanse/keystore # Replace this to your image name
26+
env:
27+
- name: IP
28+
value: '169.47.241.213' # Replace this to your cluster's IP address
29+
volumeMounts:
30+
- name: keystore
31+
mountPath: /tmp/keystore/
32+
volumes:
33+
- name: keystore
34+
persistentVolumeClaim:
35+
claimName: keystore-claim
36+
```

platform/controller.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
- name: A8_DATABASE_TYPE
4040
value: redis
4141
- name: A8_DATABASE_HOST
42-
value: redis://redis:6379
42+
value: redis://$(REDIS_SERVICE_HOST):$(REDIS_SERVICE_PORT)
4343
ports:
4444
- containerPort: 8080
4545
name: controller

platform/couchdb.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
tier: couchdb
3030
spec:
3131
containers:
32-
- image: klaemo/couchdb:1.6.1
32+
- image: couchdb:1.6.1
3333
name: couchdb
3434
ports:
3535
- containerPort: 5984

platform/kafka.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
tier: kafka
3030
spec:
3131
containers:
32-
- image: rshriram/kafka-0.9
32+
- image: spotify/kafka
3333
name: kafka
3434
env:
3535
- name: ADVERTISED_HOST

platform/registry.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ spec:
3737
- name: A8_STORE
3838
value: redis
3939
- name: A8_STORE_ADDRESS
40-
value: redis:6379
40+
value: $(REDIS_SERVICE_HOST):$(REDIS_SERVICE_PORT)
4141
ports:
4242
- containerPort: 8080
4343
name: registry

0 commit comments

Comments
 (0)