-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-from-registry.sh
executable file
·49 lines (47 loc) · 1.46 KB
/
deploy-from-registry.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
curl -X POST \
http://localhost:7070/spawn \
-H 'admin-spawn-token:billbalantine' \
-H 'Content-Type: application/json; charset=utf-8' \
--data-binary @- << EOF
{
"wasm-file":"./tmp/hello-world.wasm",
"wasm-function":"handle",
"wasm-url": "http://registry:6060/registry/pull/hello-world.wasm",
"discovery-endpoint":"http://faas:7070/discovery",
"service-name": "hello-world",
"admin-discovery-token":"bobmorane",
"admin-spawn-token":"billbalantine",
"service-name": "hello-world"
}
EOF
curl -X POST \
http://localhost:7070/spawn \
-H 'admin-spawn-token:billbalantine' \
-H 'Content-Type: application/json; charset=utf-8' \
--data-binary @- << EOF
{
"wasm-file":"./tmp/small-cow.wasm",
"wasm-function":"handle",
"wasm-url": "http://registry:6060/registry/pull/small-cow.wasm",
"discovery-endpoint":"http://faas:7070/discovery",
"service-name": "small-cow",
"admin-discovery-token":"bobmorane",
"admin-spawn-token":"billbalantine"
}
EOF
curl -X POST \
http://localhost:7070/spawn \
-H 'admin-spawn-token:billbalantine' \
-H 'Content-Type: application/json; charset=utf-8' \
--data-binary @- << EOF
{
"wasm-file":"./tmp/small_ant.wasm",
"wasm-function":"handle",
"wasm-url": "http://registry:6060/registry/pull/small_ant.wasm",
"discovery-endpoint":"http://faas:7070/discovery",
"service-name": "small-ant",
"admin-discovery-token":"bobmorane",
"admin-spawn-token":"billbalantine"
}
EOF