Skip to content

Commit 14661b8

Browse files
committed
Improvements to OpenShift sample instructions
1 parent a62501b commit 14661b8

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

openshift-app-sample/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# IBM MQ Golang application tutorial for OpenShift
1+
# IBM MQ Golang application sample for OpenShift
22
This sample provides a working template that you can use to build your own Golang
33
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
55
[IBM MQ Golang](https://github.com/ibm-messaging/mq-golang) or
66
[IBM MQ Golang JMS](https://github.com/ibm-messaging/mq-golang-jms20) libraries to connect
77
to an IBM MQ queue manager.
88

99
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
1111
2. Build the application into a Docker container image locally
1212
3. Push the container image to your OpenShift cluster
1313
4. Configure the variables and run the application!
@@ -17,7 +17,7 @@ Let's get started!
1717

1818

1919
## 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
2121
[IBM MQ Golang](https://github.com/ibm-messaging/mq-golang) or
2222
[IBM MQ Golang JMS](https://github.com/ibm-messaging/mq-golang-jms20) interfaces depending
2323
on your preference.
@@ -28,8 +28,11 @@ messages at the bottom of the function.
2828

2929

3030
## 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;
3232
```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+
3336
# Run the dockerfile build to create the container image
3437
docker build -t golang-app -f Dockerfile .
3538
```
@@ -88,4 +91,4 @@ Now run the application!
8891
oc apply -f ./yaml/pod-sample.yaml --as=my-service-account
8992
```
9093

91-
Congratulations - and happy messaging!
94+
Congratulations on running your MQ Golang application in OpenShift - and happy messaging!

openshift-app-sample/src/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module github.com/ibm-messaging/mq-golang-jms20/openshift-app-sample/src
22

33
go 1.13
44

5-
require github.com/ibm-messaging/mq-golang-jms20 v1.2.0
5+
require github.com/ibm-messaging/mq-golang-jms20 v1.3.0

openshift-app-sample/src/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2-
github.com/ibm-messaging/mq-golang-jms20 v1.2.0 h1:pVB4fPpyaEh8fTmyGBH4BlnLINB9f8z9CZdwLY4m4rM=
3-
github.com/ibm-messaging/mq-golang-jms20 v1.2.0/go.mod h1:l6BQdpzorRc27vFbrLSrUJXfP1kyzTXINQX/O2MIiSk=
4-
github.com/ibm-messaging/mq-golang/v5 v5.0.0 h1:9J8bsDoCo60rbSgB7ZAURPG3L5Kpr+F8dYNOwQ7Qnnk=
5-
github.com/ibm-messaging/mq-golang/v5 v5.0.0/go.mod h1:ywCwmYbJOU/E0rl+z4GiNoxVMty68O+LVO39a1VMXrE=
2+
github.com/ibm-messaging/mq-golang-jms20 v1.3.0 h1:tcO7+kdJ1UAkll8gMLwV+bOS8iiapYVaMvdtN4hUB0s=
3+
github.com/ibm-messaging/mq-golang-jms20 v1.3.0/go.mod h1:/n2YVhPy7J4o5zoPSqEGnCv9yPYi6Od51/f8gAxkHRc=
4+
github.com/ibm-messaging/mq-golang/v5 v5.1.3 h1:B1Xfk1jMulmDfPf3jH2Dh9nnyEkaqfI1FvTHt4pFza4=
5+
github.com/ibm-messaging/mq-golang/v5 v5.1.3/go.mod h1:ywCwmYbJOU/E0rl+z4GiNoxVMty68O+LVO39a1VMXrE=
66
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
77
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
88
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=

openshift-app-sample/src/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ func main() {
4444
log.Fatal(errCtx)
4545
} else {
4646
fmt.Println(" -- Connection successful")
47+
48+
// TODO - Add your application code here!
49+
4750
}
4851

4952
fmt.Println("Ending world!!!")

0 commit comments

Comments
 (0)