1
- # IBM MQ Golang application tutorial for OpenShift
1
+ # IBM MQ Golang application sample for OpenShift
2
2
This sample provides a working template that you can use to build your own Golang
3
3
application container image that runs in Red Hat OpenShift under the most secure
4
- "Restricted SCC" and uses the
4
+ "Restricted SCC" and uses either the
5
5
[ IBM MQ Golang] ( https://github.com/ibm-messaging/mq-golang ) or
6
6
[ IBM MQ Golang JMS] ( https://github.com/ibm-messaging/mq-golang-jms20 ) libraries to connect
7
7
to an IBM MQ queue manager.
8
8
9
9
You can build and run your application using the following simple steps;
10
- 1 . Modify the application file to add your code
10
+ 1 . Modify the sample application code to add your business logic
11
11
2 . Build the application into a Docker container image locally
12
12
3 . Push the container image to your OpenShift cluster
13
13
4 . Configure the variables and run the application!
@@ -17,7 +17,7 @@ Let's get started!
17
17
18
18
19
19
## Step 1: Modify the application file to add your code
20
- Add your application logic into the [ main.go] ( ./src/main.go ) file using either the
20
+ Add your application logic into the [ openshift-app-sample/src/ main.go] ( ./src/main.go ) file using either the
21
21
[ IBM MQ Golang] ( https://github.com/ibm-messaging/mq-golang ) or
22
22
[ IBM MQ Golang JMS] ( https://github.com/ibm-messaging/mq-golang-jms20 ) interfaces depending
23
23
on your preference.
@@ -28,8 +28,11 @@ messages at the bottom of the function.
28
28
29
29
30
30
## Step 2: Build the application into a Docker container image locally
31
- Open a command shell to the same directory as this readme file and execute the following command;
31
+ Open a command shell to the same directory as the Dockerfile and execute the following command;
32
32
``` bash
33
+ # Make sure you are in the directory where the Dockerfile is
34
+ cd $YOUR_GITHUB_PATH /ibm-messaging/mq-golang-jms20/openshift-app-sample
35
+
33
36
# Run the dockerfile build to create the container image
34
37
docker build -t golang-app -f Dockerfile .
35
38
```
@@ -88,4 +91,4 @@ Now run the application!
88
91
oc apply -f ./yaml/pod-sample.yaml --as=my-service-account
89
92
```
90
93
91
- Congratulations - and happy messaging!
94
+ Congratulations on running your MQ Golang application in OpenShift - and happy messaging!
0 commit comments