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: examples/k8petstore/README.md
+32-9
Original file line number
Diff line number
Diff line change
@@ -69,19 +69,31 @@ For a list of those images, see the `build-and-push` shell script - it builds an
69
69
70
70
modify the dockerhub user name in it accordingly.
71
71
72
-
## Get started with the WEBAPP
72
+
## Hacking, extending, and locally testing on the k8petstore
73
73
74
74
The web app is written in Go, and borrowed from the original Guestbook example by brendan burns.
75
75
76
+
K8petstore is built to be expanded, and aims to attract developers interested in building and maintaining a polyglot, non-trivial kubernetes app as a community.
77
+
78
+
It can be a simple way to get started with kuberentes or golang application development.
79
+
80
+
Thus we've tried to make it easy to hack on, even without kubernetes. Just run the containers and glue them together using docker IP addresses !
81
+
76
82
We have extended it to do some error reporting, persisting of JSON petstore transactions (not much different then guestbook entries),
77
83
78
84
and supporting of additional REST calls, like LLEN, which returns the total # of transactions in the database.
79
85
80
-
To work on the app, just cd to the `dev` directory, and follow the instructions. You can easily edit it in your local machine, by installing
86
+
If that is all working, you can finally run `k8petstore.sh` in any Kubernetes cluster, and run the app at scale.
87
+
88
+
### MAC USERS
81
89
82
-
redis and go. Then you can use the `Vagrantfile` in this top level directory to launch a minimal version of the app in pure docker containers.
90
+
To develop against k8petstore, simply run the docker-machine-dev.sh script, which is built for mac users.
83
91
84
-
If that is all working, you can finally run `k8petstore.sh` in any Kubernetes cluster, and run the app at scale.
92
+
### LINUX USERS
93
+
94
+
For now, modify the docker-machine-dev.sh script as necessary to use the provider of your choice. Most linux/docker users are savvy enough to do this easily.
95
+
96
+
If you need help, just ask on the mailing list.
85
97
86
98
## Set up the data generator (optional)
87
99
@@ -125,23 +137,34 @@ You might want to change it to point to your customized Go image, if you chose t
125
137
126
138
So, to run this app in Kubernetes, simply run [The all in one k8petstore.sh shell script](k8petstore.sh).
127
139
128
-
Note that at the top of the script there are a few self explanatory parameters to set, among which the Public IPs parameter is where you can checkout the web ui (at $PUBLIC_IP:3000), which will show a plot and read outs of transaction throughput.
140
+
## Should we use PublicIP, NodePort, Cloud loadbalancers ?
129
141
130
-
In the mean time, because the public IP will be deprecated in Kubernetes v1, we provide other 2 scripts k8petstore-loadbalancer.sh and k8petstore-nodeport.sh. As the names suggest, they rely on LoadBalancer and NodePort respectively. More details can be found [here](../../docs/user-guide/services.md#external-services).
142
+
The original k8petstore used PUBLIC_IP fields to bind the web app to an IP.
143
+
144
+
However... because the public IP was deprecated in Kubernetes v1, we provide other 2 scripts k8petstore-loadbalancer.sh and k8petstore-nodeport.sh. As the names suggest, they rely on LoadBalancer and NodePort respectively. More details can be found [here](../../docs/user-guide/services.md#external-services).
145
+
146
+
We will continue to try to update k8petstore to use the idiomatic networking tools that kubernetes supports, if we fall behind, please create an issue !
131
147
132
148
## Future
133
149
134
-
In the future, we plan to add cassandra support. Redis is a fabulous in memory data store, but it is not meant for truly available and resilient storage.
150
+
Future development ideas include, adding a persistent k/v store like cassandra/hbase/..., using kafka/activeMQ for the data sink (with redis as a consumer).
151
+
152
+
Additionally, adding analytics and meaningful streaming queries to the richly patterned data would also be interesting.
153
+
154
+
We are open to other ways of expanding the coverage and realism of the k8petstore application.
135
155
136
-
Thus we plan to add another tier of queueing, which empties the REDIS transactions into a cassandra store which persists.
156
+
Reach out with ideas, pull requests, and so on!
157
+
158
+
The end goal is to support polyglot, real world, data-intensive application on kuberenetes which can be used both to learn how to maintain kubernetes applications
159
+
160
+
as well as for scale and functionality testing.
137
161
138
162
## Questions
139
163
140
164
For questions on running this app, you can ask on [Slack](../../docs/troubleshooting.md#slack).
141
165
142
166
For questions about bigpetstore, and how the data is generated, ask on the apache bigtop mailing list.
0 commit comments