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

Cloud metadata #750

Merged
merged 3 commits into from
Oct 15, 2021
Merged

Cloud metadata #750

merged 3 commits into from
Oct 15, 2021

Conversation

0x2b3bfa0
Copy link
Member

@0x2b3bfa0 0x2b3bfa0 commented Sep 24, 2021

Pull request from #748 to master, to be released after iterative/terraform-provider-iterative#185

⚠️ Warning: to be rebased and merged instead of squashed and merged.

* Convert yargs builder function calls to plain objects

Leave environment variable management to yargs

* Remove dead code

* Manage all the environment variables through yargs (#739)

* Fix comment blunder

* replace null

* tf template check

* add null option

* clean up

* use undefined

* rm redundant debug logging

* update from draft example

* clean up

* Update tests

Additionally,
* Handle falsy values as empty strings
* Simplify template code

Co-authored-by: Helio Machado <[email protected]>
@0x2b3bfa0 0x2b3bfa0 temporarily deployed to internal September 24, 2021 21:18 Inactive
@0x2b3bfa0 0x2b3bfa0 linked an issue Sep 24, 2021 that may be closed by this pull request
@0x2b3bfa0 0x2b3bfa0 marked this pull request as ready for review September 24, 2021 21:18
@0x2b3bfa0 0x2b3bfa0 temporarily deployed to internal September 25, 2021 10:28 Inactive
@casperdcl casperdcl added the enhancement New feature or request label Sep 27, 2021
@0x2b3bfa0
Copy link
Member Author

/tests

@dacbd
Copy link
Contributor

dacbd commented Oct 12, 2021

Tested with GCP

dabarnes@ubuntu:~/projects/cml$ git status
HEAD detached at iterative/daniel-barnes-cloud-metadata
dabarnes@ubuntu:~/projects/cml$ ./bin/cml.js runner \
>     --single \
>     --log=debug \
>     --idle-timeout=1800 \
>     --token=xxx\
>     --cloud=gcp \
>     --cloud-region=us-west \
>     --cloud-type=m \
>     --cloud-metadata="mykey=myval" \
>     --cloud-metadata="mykey2=myval2" \
>     --cloud-metadata="mykey3=myval3" \
>     --cloud-gpu=nogpu \
>     --repo=xxx \
>     --driver=github \
>     --cloud-hdd-size=10
info: Preparing workdir /home/dabarnes/.cml/cml-htf4hubnub...
info: Deploying cloud runner plan...
info: Terraform apply...
info: {"awsSecurityGroup":null,"cloud":"gcp","driver":"github","id":"iterative-27q2xt42vyz17","idleTimeout":1800,"image":null,"instanceGpu":null,"instanceHddSize":10,"instanceIp":"35.212.165.130","instanceLaunchTime":"2021-10-12 08:33:56.56049848 -0700 PDT m=+26.057594849","instanceType":"m","labels":"cml","metadata":{"mykey":"myval","mykey2":"myval2","mykey3":"myval3"},"name":"cml-htf4hubnub","region":"us-west","repo":"xxx","single":true,"spot":false,"spotPrice":-1,"timeouts":null}

image

@0x2b3bfa0
Copy link
Member Author

@iterative/cml, I can't approve my own pull request, but it's ready for merging.

@dacbd
Copy link
Contributor

dacbd commented Oct 12, 2021

Tested with aws:

dabarnes@ubuntu:~/projects/cml$ git status
HEAD detached at iterative/daniel-barnes-cloud-metadata

dabarnes@ubuntu:~/projects/cml$ ./bin/cml.js runner \
>     --single \
>     --log=debug \
>     --idle-timeout=1800 \
>     --token=xxx\
>     --cloud=aws \
>     --cloud-region=us-west-2 \
>     --cloud-type=m \
>     --cloud-metadata="mykey=myval" \
>     --cloud-metadata="mykey2=myval2" \
>     --cloud-metadata="mykey3=myval3" \
>     --cloud-gpu=nogpu \
>     --repo=xxx \
>     --driver=github \
>     --cloud-hdd-size=10
info: Preparing workdir /home/dabarnes/.cml/cml-l58lx3dbci...
info: Deploying cloud runner plan...
info: Terraform apply...
info: {"awsSecurityGroup":null,"cloud":"aws","driver":"github","id":"iterative-5irw0blwioxj","idleTimeout":1800,"image":"iterative-cml","instanceGpu":null,"instanceHddSize":10,"instanceIp":"xxx","instanceLaunchTime":"2021-10-12T16:33:28Z","instanceType":"m","labels":"cml","metadata":{"mykey":"myval","mykey2":"myval2","mykey3":"myval3"},"name":"cml-l58lx3dbci","region":"us-west-2","repo":"xxx","single":true,"spot":false,"spotPrice":-1,"timeouts":null}

image

@casperdcl
Copy link
Contributor

Warning: to be rebased and merged

@0x2b3bfa0 that's a job for you anyway

@0x2b3bfa0
Copy link
Member Author

@casperdcl, I'm not the release manager this week. 🙃 @DavidGOrtega, may I?

@DavidGOrtega DavidGOrtega temporarily deployed to internal October 15, 2021 09:57 Inactive
Copy link
Contributor

@DavidGOrtega DavidGOrtega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@DavidGOrtega DavidGOrtega merged commit fa99ac9 into master Oct 15, 2021
@DavidGOrtega DavidGOrtega deleted the daniel-barnes-cloud-metadata branch October 15, 2021 10:19
@casperdcl casperdcl restored the daniel-barnes-cloud-metadata branch October 15, 2021 12:35
@0x2b3bfa0
Copy link
Member Author

🙏🏼 Thanks for restoring the branch, @casperdcl. I'm deleting it again after fixing the merged commit.

@0x2b3bfa0 0x2b3bfa0 deleted the daniel-barnes-cloud-metadata branch October 15, 2021 13:12
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

Successfully merging this pull request may close these issues.

Tagging of instances on AWS
4 participants