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
Copy file name to clipboardExpand all lines: README.adoc
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
= Overview
2
2
3
-
This project implements a sample service broker that adheres to the https://www.openservicebrokerapi.org/[Open Service Broker API] using the https://cloud.spring.io/spring-cloud-open-service-broker/[Spring Cloud Open Service Broker] framework. It can be deployed to either Cloud Foundry or Kubernetes, and can be registered as a service broker to either platform.
3
+
This project demonstrates how the https://cloud.spring.io/spring-cloud-open-service-broker/[Spring Cloud Open Service Broker]
4
+
framework can be used to easily build an https://www.openservicebrokerapi.org/[Open Service Broker API] compliant service broker.
5
+
It can be deployed and registered as a service broker using either Cloud Foundry or Kubernetes.
4
6
5
7
== Compatibility
6
8
@@ -27,7 +29,7 @@ The project is built with Gradle. The https://docs.gradle.org/current/userguide/
27
29
./gradlew build
28
30
29
31
== Deploy
30
-
32
+
31
33
Once the project is built, it can be deployed and registered to either Cloud Foundry or Kubernetes.
32
34
33
35
* link:deploy/cloudfoundry/README.adoc[deploy to Cloud Foundry]
Copy file name to clipboardExpand all lines: deploy/kubernetes/README.adoc
+36-35Lines changed: 36 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,13 @@ Pivotal Container Service (PKS) can be used to deploy and manage production-qual
24
24
25
25
*NOTE*: Ensure that post-deploy scripts have been enabled in PCF Ops Manager as described on the https://docs.pivotal.io/runtimes/pks/1-0/troubleshoot-issues.html#timeouts[PKS Troubleshooting page].
26
26
27
+
=== Google Kubernetes Engine (GKE)
28
+
29
+
Google Cloud Platform provides a Kubernetes Engine (GKE) and installer tool for setting up the Service Catalog extension API.
30
+
31
+
The process of setting up GKE is documented at https://cloud.google.com/kubernetes-engine/docs/quickstart
32
+
The service catalog installation tool can be installed here https://github.com/GoogleCloudPlatform/k8s-service-catalog#installation
33
+
27
34
== Service Catalog
28
35
29
36
Kubernetes support for service brokers via the Open Service Broker API is provided by the https://kubernetes.io/docs/concepts/service-catalog/[Service Catalog] project. Follow the https://github.com/kubernetes-incubator/service-catalog/blob/master/docs/install.md[project documentation] to install the service catalog into your Kubernetes cluster.
@@ -128,18 +135,18 @@ service "bookstore-broker" created
128
135
Show the details of the created service:
129
136
130
137
----
131
-
$ kubectl describe service bookstore-broker -n bookstore-broker
132
-
Name: bookstore-broker
138
+
$ kubectl describe service bookstore-broker -n bookstore-brokerName: bookstore-broker
133
139
Namespace: bookstore-broker
134
140
Labels: run=bookstore-broker
135
141
Annotations: <none>
136
142
Selector: run=bookstore-broker
137
-
Type: NodePort
138
-
IP: 10.107.161.81
143
+
Type: LoadBalancer
144
+
IP: 10.47.247.7
145
+
LoadBalancer Ingress: 35.197.249.208
139
146
Port: <unset> 80/TCP
140
147
TargetPort: 8080/TCP
141
-
NodePort: <unset> 32248/TCP
142
-
Endpoints:
148
+
NodePort: <unset> 30789/TCP
149
+
Endpoints: 10.44.4.8:8080
143
150
Session Affinity: None
144
151
External Traffic Policy: Cluster
145
152
Events: <none>
@@ -171,50 +178,29 @@ Show the details of the service broker application service again:
171
178
172
179
----
173
180
$ kubectl describe service bookstore-broker -n bookstore-broker
174
-
Name: bookstore-broker
175
181
Namespace: bookstore-broker
176
182
Labels: run=bookstore-broker
177
183
Annotations: <none>
178
184
Selector: run=bookstore-broker
179
-
Type: NodePort
180
-
IP: 10.107.161.81
185
+
Type: LoadBalancer
186
+
IP: 10.47.247.7
187
+
LoadBalancer Ingress: 35.197.249.208
181
188
Port: <unset> 80/TCP
182
189
TargetPort: 8080/TCP
183
-
NodePort: <unset> 32248/TCP
184
-
Endpoints:
190
+
NodePort: <unset> 30789/TCP
191
+
Endpoints: 10.44.4.8:8080
185
192
Session Affinity: None
186
193
External Traffic Policy: Cluster
187
194
Events: <none>
188
195
----
189
196
190
-
Note the value of the `NodePort` row.
191
-
192
-
Show a list of Kubernetes pods running in the cluster:
Note the value in the `EXTERNAL-IP` column of the node whose `NAME` matches the node for the `bookstore-broker` pod.
198
+
Note the value in the `LoadBalancer Ingress` column and the `Port` column below.
213
199
214
200
Construct a URL using the IP address of the node and the port of the service, and use the this URL to access the `/v2/catalog` endpoint of the service broker application:
{"services":[{"id":"bdb1be2e-360b-495c-8115-d7697f9c6a9e","name":"bookstore","description":"A simple book store service","bindable":true,"plan_updateable":false,"plans":[{"id":"b973fb78-82f3-49ef-9b8b-c1876974a6cd","name":"standard","description":"A simple book store plan","free":true}],"tags":["book-store","books","sample"]}]}
219
205
----
220
206
@@ -227,7 +213,7 @@ Now that the application has been deployed and verified, it can be registered to
227
213
The Open Service Broker API endpoints in the service broker application are secured with a basic auth username and password. Create a Kubernetes secret to store these credentials:
Copy file name to clipboardExpand all lines: src/main/java/org/springframework/cloud/broker/bookstore/webmvc/service/BookStoreServiceInstanceBindingService.java
Copy file name to clipboardExpand all lines: src/main/java/org/springframework/cloud/broker/bookstore/webmvc/service/BookStoreServiceInstanceService.java
Copy file name to clipboardExpand all lines: src/test/java/org/springframework/cloud/broker/bookstore/webmvc/service/BookstoreServiceInstanceBindingServiceTests.java
Copy file name to clipboardExpand all lines: src/test/java/org/springframework/cloud/broker/bookstore/webmvc/service/BookstoreServiceInstanceServiceTests.java
0 commit comments