-
Notifications
You must be signed in to change notification settings - Fork 0
[tem-1559] instance deploy #30
base: main
Are you sure you want to change the base?
Conversation
|
||
let config = Config::new(args, &Config::full_path(args)); | ||
if config.cloud_account.is_none() || config.jwt.is_none() { | ||
return Err(Box::new(DockerError::new( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this only run in Docker? If not that Docker error could maybe be confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a good point, this isn't running in Docker (rather locally) and could use its own error object, maybe ConfigError? Thoughts?
@@ -48,6 +48,17 @@ instances can be started that share a port number. | |||
|
|||
Each instance runs as a Docker container. | |||
|
|||
## `tembo instance stop` | |||
|
|||
The `instance stop` command allows users to stop their running instances. It requires the name as a parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this local only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the only command that hits the cloud is the instance deploy command at this point
let jwt = config.jwt.unwrap(); | ||
|
||
let client = reqwest::blocking::Client::new(); | ||
let request_url = format!("https://api.tembo.io/api/v1/orgs/{org_id}/instances"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this be configurable in the future? I could definitely see the need to run our cli against our lower environments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a good thought, I don't know, the current thinking was to go through the API for everything, what did you have in mind?
This PR introduces the
instance deploy
command.thanks to @ChuckHend for helping me confirm the required attributes!