-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a template for configuring multiple applications to be run with dapr run
command
#1141
Comments
/assign |
This issue contains details for parsing the provided yaml file when
We can use below structs to capture this - type AppsRunConfig struct {
Common Common `yaml:"common"`
Apps []Apps `yaml:"apps"`
Version int `yaml:"version"`
}
type Apps struct {
AppId string `yaml:"app_id"`
AppDir string `yaml:"app_dir"`
Command []string `yaml:"command"`
AppEnvs map[string]string `yaml:"app_envs"`
RunCMDFlags map[string]string `yaml:"run_cmd_flags"`
}
type Common struct {
SharedCMDFlags map[string]string `yaml:"shared_properties"`
SharedEnvs map[string]string `yaml:"shared_envs"`
} |
@pravinpushkar how will we validate type AppsRunConfig struct {
Common Common `yaml:"common"`
Apps []Apps `yaml:"apps"`
Version int `yaml:"version"`
}
// Apps can contain App specific settings + embed Common
type Apps struct {
Common
AppId string `yaml:"app_id"`
AppDir string `yaml:"app_dir"`
Command []string `yaml:"command"`
}
// Common can contain everything that can be shared between multiple apps
type Common struct {
Env map[string]string `yaml:"shared_envs"`
ResourcesPath string `yaml:"resources-path"`
// ... others
} And finally for each app, one needs to append values in |
one correction here -
I was thinking, when we have translated the yaml into below struct -
For each app, we can call the final I got your idea also, which basically differs in the use of above flags and env and instead use common. |
Yes, if we do this, |
While implementing I found this easier and logical, so proceeding with this only for now. I will post if there is any change. |
@msfussell @yaron2 @greenie-msft From existing arguments in CLI master branch and daprd, we have the field called as |
A much as possible we should have identical names between the CLI and the template. So these names should be used https://docs.dapr.io/reference/cli/dapr-run/. The name then should be |
Ideally separators in YAML are always So then will we have |
Yes to |
Describe the proposal
As part of implementing dapr/proposals#6:
Example
A single run configuration file contains a single YAML definition.
Minimum validations to be done :
related to #1123
Release Note
RELEASE NOTE:
The text was updated successfully, but these errors were encountered: