Optum / dce-cli

Disposable Cloud Environment CLI
Apache License 2.0
37 stars 19 forks source link

Deploy & other basic commands #4

Closed joshmarsh closed 4 years ago

joshmarsh commented 4 years ago

Goal

POC the core functionality of the CLI.

Important Notes

Current Functionality:

  1. dce init uses an interactive prompt to generate a config file
  2. dce deploy deploys dce to a new master account based on credentials in the config file. Terraform and code artifacts are downloaded from the latest github release.
  3. dce auth opens a web browser to the authentication (SSO) url provided in the config file. User is instructed to login and then copy/paste their API credentials into the terminal. This is not yet integrated with the backend auth solution.
  4. dce accounts add --account-id <string> --admin-role-arn <string> adds an existing account to the accounts pool Bug: The codebuild reset is currently failing to trigger on master accounts deployed by the cli.
  5. dce leases create --budget-amount <float> --budget-currency <string> --email <stringArray> --principle-id <string> creates a lease
  6. dce leases login [--account-id <string> | --lease-id <string>] --open-browser returns temporary credentials for a leased account. Opens a browser to the console if the --open-browser flag is present. This is not yet integrated with the backend auth solution.
  7. dce leases end --account-id <string> --principle-id <string> ends a lease
  8. dce accounts remove --account-id <string>

Next Steps:

  1. Fix codebuild reset bug
  2. Integrate auth & lease login
  3. Write tests and create CI/CD for this repo
  4. Implement remaining functionality. I would like to explore autogenerating dce deploy flags/interactive prompt from variables.tf and API client code/commands from swagger.
marinatedpork commented 4 years ago

@kddejong, @joshmarsh - Let's call this sufficient as a POC. Please have tests and error handling as a follow up in your coming PR.