Skip to content
This repository was archived by the owner on Nov 16, 2020. It is now read-only.

Commit 1366d59

Browse files
authored
Fixup small issues with regards to deploying (#110)
* Fix any inconsistencies in README.md * Add extra debug output * Add roadmap items * Bump chart version
1 parent e1e2ced commit 1366d59

File tree

7 files changed

+47
-10
lines changed

7 files changed

+47
-10
lines changed

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $ sudo sh -c 'echo "$(minikube ip) dev.dispatch.vmware.com api.dev.dispatch.vmwa
4343

4444
Get the dispatch command:
4545
```
46-
$ curl -OL https://github.com/vmware/dispatch/releases/download/v0.1.1/dispatch-darwin
46+
$ curl -OL https://github.com/vmware/dispatch/releases/download/v0.1.2/dispatch-darwin
4747
$ chmod +x dispatch-darwin
4848
```
4949

@@ -62,7 +62,7 @@ dispatch:
6262
port: 443
6363
image:
6464
host: vmware
65-
tag: v0.1.1
65+
tag: v0.1.2
6666
debug: true
6767
openfaasRepository:
6868
host: <docker repo>
@@ -135,9 +135,24 @@ $ ./dispatch-darwin get functions
135135
Execute a function:
136136
```
137137
$ ./dispatch-darwin exec hello-py --input '{"name": "Jon", "place": "Winterfell"}' --wait
138-
Function hello-py finished successfully.
139138
{
140-
"myField": "Hello, Jon from Winterfell"
139+
"blocking": true,
140+
"executedTime": 1515624222,
141+
"finishedTime": 1515624222,
142+
"functionId": "5138d918-e78f-41d6-aece-769addd3eed7",
143+
"functionName": "hello-py",
144+
"input": {
145+
"name": "Jon",
146+
"place": "Winterfell"
147+
},
148+
"logs": null,
149+
"name": "b5b3c1f5-fa8a-4b38-b7d1-475c44b76114",
150+
"output": {
151+
"myField": "Hello, Jon from Winterfell"
152+
},
153+
"reason": null,
154+
"secrets": [],
155+
"status": "READY"
141156
}
142157
```
143158

charts/dispatch/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: v1
22
description: A platform for deploying serverless applications
33
name: dispatch
4-
version: 0.1.1
4+
version: 0.1.2

charts/dispatch/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ global:
55
pullPolicy: IfNotPresent
66
organization: dispatch
77
image:
8-
tag: v0.1.1
8+
tag: v0.1.2
99
host: vmware
1010
debug: true
1111
trace: false

docs/_front/roadmap.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,12 @@ feature description.
7474
Dispatch is a multi-tenant serverless framework. The top unit of tenancy is "organization". Because, Dispatch only
7575
supports a single IDP per installation, organization is akin to a business unit with a larger enterprise. Currently,
7676
a single organization is hard-coded at installation time, however organization is expected to become a configurable
77-
resource.
77+
resource.
78+
79+
## 1.6 Scale Dispatch Components
80+
81+
Currently the Dispatch deployment specifies a single instance of each component. This is fine for development, but
82+
production deployments must scale. We need to understand how load effects Dispatch and ensure that Dispatch can scale
83+
within reason. This may require some architectural changes to ensure that work is only done once.
84+
85+
## 1.7 Function Chaining through Events

pkg/dispatchcli/cmd/install.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,11 @@ func readConfig(out, errOut io.Writer, file string) (*installConfig, error) {
310310
if err != nil {
311311
return nil, errors.Wrapf(err, "Error decoding default install config yaml file")
312312
}
313-
313+
if installDebug {
314+
b, _ := json.MarshalIndent(config, "", " ")
315+
fmt.Fprintln(out, "Config before merge")
316+
fmt.Fprintln(out, string(b))
317+
}
314318
err = mergo.Merge(&config, defaultInstallConfig)
315319
if err != nil {
316320
return nil, errors.Wrapf(err, "Error merging default values")

pkg/dispatchcli/cmd/install_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ dispatch:
5252
certSecret: dispatch-tls
5353
image:
5454
host: vmware
55-
tag: dev-xxxx
55+
tag: v0.1.2
5656
database: postgres
5757
debug: true
5858
trace: true

pkg/dispatchcli/cmd/login.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var (
2727

2828
// TODO: Add examples
2929
loginExample = i18n.T(``)
30+
loginDebug = false
3031
)
3132

3233
// NewCmdLogin creates a command to login to VMware Dispatch.
@@ -41,6 +42,9 @@ func NewCmdLogin(in io.Reader, out, errOut io.Writer) *cobra.Command {
4142
CheckErr(err)
4243
},
4344
}
45+
46+
cmd.Flags().BoolVar(&loginDebug, "debug", false, "Extra debug output")
47+
4448
return cmd
4549
}
4650

@@ -96,7 +100,13 @@ func login(in io.Reader, out, errOut io.Writer, cmd *cobra.Command, args []strin
96100
}.Encode()),
97101
},
98102
}
99-
requestURL := fmt.Sprintf("https://%s:%d%s?%s", dispatchConfig.Host, dispatchConfig.Port, oauth2Path, vals.Encode())
103+
requestURL := fmt.Sprintf("https://%s%s?%s", dispatchConfig.Host, oauth2Path, vals.Encode())
104+
if dispatchConfig.Port != 443 {
105+
requestURL = fmt.Sprintf("https://%s:%d%s?%s", dispatchConfig.Host, dispatchConfig.Port, oauth2Path, vals.Encode())
106+
}
107+
if loginDebug {
108+
fmt.Fprintf(out, "Logging into: %s\n", requestURL)
109+
}
100110
err := webbrowser.Open(requestURL)
101111
if err != nil {
102112
return errors.Wrap(err, "error opening web browser")

0 commit comments

Comments
 (0)