1
1
< section data-markdown > < script type ="text/template ">
2
2
## Developing Microservices
3
3
adapted from [ _micro - services - iot_ ] ( https :/ / github . com / nearform / micro - services - tutorial - iot )
4
+
5
+ Presented by Wyatt Preul and Lloyd Benson
4
6
</ script > </ section >
5
7
< section data-markdown > < script type ="text/template ">
6
8
### Microservices are ...
41
43
* node 4 or newer
42
44
</ script > </ section >
43
45
< section data-markdown > < script type ="text/template ">
44
- ### Setup
45
- `` `
46
- git clone https://github.com/lloydbenson/microservices-workshop
47
- docker pull tutum/influxdb
48
- docker pull node:6-slim
49
- ` ``
50
- </ script > </ section >
51
- < section data-markdown > < script type ="text/template ">
52
46
### Let 's build a system...
53
47
< img src = "/images/target.png" >
54
48
</ script > </ section >
66
60
* Docker
67
61
</ script > </ section >
68
62
< section data-markdown > < script type ="text/template ">
63
+ ### Setup
64
+ `` `
65
+ ### Get the Workshop
66
+ git clone https://github.com/lloydbenson/microservices-workshop
67
+ docker pull tutum/influxdb
68
+ docker pull node:4
69
+ docker-compose
70
+
71
+ ` ``
72
+ </ script > </ section >
73
+ < section data-markdown > < script type ="text/template ">
69
74
### You should now have
70
75
`` `
71
76
## should execute and show nothing running
75
80
` ``
76
81
</ script > </ section >
77
82
< section data-markdown > < script type ="text/template ">
78
- ### Get the Workshop
79
- `` `
80
- git clone https://github.com/lloydbenson/microservices
81
- ` ``
82
- </ script > </ section >
83
- < section data-markdown > < script type ="text/template ">
84
83
### Build the Frontend
85
84
* _README . md_
86
85
* `npm install`
90
89
</ script > </ section >
91
90
< section data-markdown > < script type ="text/template ">
92
91
### Challenge 1
92
+ Objective: Start up the InfluxDB and login into the web interface
93
93
* start up the database
94
94
* browse the influx web interface
95
95
* hint : [ https :/ / hub . docker . com / r / tutum / influxdb ] ( )
99
99
`` `
100
100
docker run -d -p 8083:8083 -p 8086:8086 tutum/influxdb
101
101
step1/services/influx/run.sh
102
- docker-machine ip default
103
- docker ps -a | grep 'tutum/influxdb'
104
- | awk '{print $1}' | xargs docker inspect
105
- --format '\{{ .NetworkSettings.IPAddress }}'
106
-
107
102
[http://localhost:8083]() (influx console)
108
103
` ``
109
104
</ script > </ section >
113
108
</ script > </ section >
114
109
< section data-markdown > < script type ="text/template ">
115
110
### Challenge 2
111
+ Objective: Start the serializer and start sending data to influx
116
112
* script start of challenge2 / services / serializer
117
113
* send data via curl
118
114
* check that data was written by using the influx browser
138
134
</ script > </ section >
139
135
< section data-markdown > < script type ="text/template ">
140
136
### Challenge 3
137
+ Objective: Add serializer service and send test data
141
138
* make script to start challenge3 / frontend
142
139
* start up influxDB frontend and serializer
143
140
* use testWrite . sh | bat to send data
158
155
</ script > </ section >
159
156
< section data-markdown > < script type ="text/template ">
160
157
### Challenge 4
158
+ Objective: Use fuge to manage your containers / processes
161
159
* use fuge shell to start it up
162
160
* challenge4 / fuge ( compose - dev . yml and fuge - config . json )
163
161
* hint : stop all processes / containers
179
177
</ script > </ section >
180
178
< section data-markdown > < script type ="text/template ">
181
179
### Challenge 5
180
+ Objective: Add sensor and broker
182
181
* add sensor and broker to fuge yml file
183
182
* hint : challenge5 / services / ( broker | sensor )
184
183
</ script > </ section >
196
195
</ script > </ section >
197
196
< section data-markdown > < script type ="text/template ">
198
197
### Challenge 6
198
+ Objective: Add actuator
199
199
* add actuator to compose - dev . yml
200
200
* actuator provides an offset
201
201
* hint : challenge6 / services / acuator
211
211
</ script > </ section >
212
212
< section data-markdown > < script type ="text/template ">
213
213
### Challenge 7
214
+ Objective: utilize tail in fuge
214
215
* limit default tail to false in fuge - config . js
215
216
* fuge shell and start all
216
217
* tail serializer
227
228
</ script > </ section >
228
229
< section data-markdown > < script type ="text/template ">
229
230
### Challenge 8
231
+ Objective: use docker - compose
230
232
* use traditional docker - compose instead to show its compatibility
231
233
* hint : [ https :/ / docs . docker . com / compose ] ( )
232
234
</ script > </ section >
237
239
* http :/ / localhost :10001 to verify everything
238
240
</ script > </ section >
239
241
< section data-markdown > < script type ="text/template ">
242
+ ### Challenge 9
243
+ Objective : Utilize an environment file
244
+ * Add an environment file
245
+ * hint : [ https :/ / docs . docker . com / compose / compose - file / ] ( ) .
246
+ </ script > </ section >
247
+ < section data-markdown > < script type ="text/template ">
248
+ ### Solution to Challenge 9
249
+ * env_file : . / dev . conf
250
+ </ script > </ section >
251
+ < section data-markdown > < script type ="text/template ">
252
+ ### Challenge 10
253
+ Objective : Keep a persistent database
254
+ * A local data directory is already created for you .
255
+ * hint : [ https :/ / docs . docker . com / compose / compose - file / ] ( ) .
256
+ </ script > </ section >
257
+ < section data-markdown > < script type ="text/template ">
258
+ ### Solution to Challenge 10
259
+ * volumes :
260
+ - "./data:/data"
261
+ </ script > </ section >
262
+ < section data-markdown > < script type ="text/template ">
263
+ ### Challenge 11
264
+ Objective : ??
265
+ * something
266
+ </ script > </ section >
267
+ < section data-markdown > < script type ="text/template ">
268
+ ### Solution to Challenge 11
269
+ * solution
270
+ </ script > </ section >
271
+ < section data-markdown > < script type ="text/template ">
272
+ ### Challenge 12
273
+ * ALL DONE ! What more should we do ! ?! ?
274
+ </ script > </ section >
275
+ < section data-markdown > < script type ="text/template ">
240
276
### Resources
241
277
* [ InfluxDB Docker ] ( https :/ / hub . docker . com / r / tutum / influxdb / )
242
278
* [ Fuge ] ( https :/ / github . com / apparatus / fuge )
245
281
< section data-markdown > < script type ="text/template ">
246
282
### Questions ?
247
283
248
- </ script > </ section >
284
+ </ script > </ section >
0 commit comments