Skip to content
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

Use description file for execution tasks in project #21

Open
sleipnir opened this issue Mar 11, 2020 · 2 comments
Open

Use description file for execution tasks in project #21

sleipnir opened this issue Mar 11, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@sleipnir
Copy link
Collaborator

sleipnir commented Mar 11, 2020

The CLI offers many important command options and arguments that manage, or should manage, the entire development cycle of a cloudstate serveless function. Beautiful.
But I see that it would be interesting to offer an extra option for the user. There could be a properties file, probably toml or yaml, where we could describe all the parameters of a function app.
This would allow for much faster workflows because, imagine that we created a file that described everything we need and executed a "cloudstate init" command in the folder where that file is located? As a result, the entire project structure would be created, as well as specific Cloudstate Operator configurations.
So far nothing new, but let's move forward a little and imagine that we would execute any other command that required many parameters in the traditional way (cloudstate deploy for example). In this case, the CLI would only read the information from the descriptor file and execute all the necessary steps without the user having to execute the command with all parameters every time he needed to carry out this command.
This would also allow us to add new features as an extension of the CLI, such as creating clusters in different cloud providers, without this polluting the set of options available via the command line.

File proposal for toml(.cloudsettings):

[function]
name = "shopping-cart"
profile = "java"
tag = "0.4.2"
authors = ["Adriano Santos <[email protected]>"]
namespace = "production"
datastore-name = "my-postgres-store"

[provisioning]
operator-ns = "cloudstate"
operator-watch-ns = ["production", "qa", "dev"]
operator-proxy-image-postgress = "cloudstateio/cloudstate-proxy-postgress:0.4.3"
orchestrator = "kubernetes"
provider-name = "aks"

[datastore]
name = "my-postgres-store"
type = "Postgres"
deployment = "Unmanaged"
service = "postgresql.default.svc.cluster.local"
credentials-secret = "postgres-credentials"

[provider]
name = "aks"
resource-group = "MC_my_resource_group_eastus"
cluster-name = "my-aks-cluster-name"
cluster-nodes-size = "3"
create-if-not-exist = "true"

[registry]
url = "docker.io/sleipnir"
credentials-type = "file"
credentials-file = ".credentials"

[general]
default-editor = "idea"
....

@sleipnir sleipnir added the enhancement New feature or request label Mar 11, 2020
@ghost
Copy link

ghost commented Mar 12, 2020

Is the structure of your sample based on the INI file format?

Just curious because I haven't seen one in ages, wondering if it's becoming popular again.

@sleipnir
Copy link
Collaborator Author

sleipnir commented Mar 12, 2020

Is the structure of your sample based on the INI file format?

Just curious because I haven't seen one in ages, wondering if it's becoming popular again

Hi @nagytech I am happy to see you interact again.

No, it looks but it is not, the example format is TOML. It is widely used in Rust and in some other projects.

What did you think of the proposal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant