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

Cml cloud runner destroy one #316

Merged
merged 56 commits into from
Oct 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
72106b7
[wip] CML contexts
DavidGOrtega Oct 14, 2020
e234780
octokit on demand
DavidGOrtega Oct 16, 2020
c67624a
token
DavidGOrtega Oct 16, 2020
b97a4ff
clean env before tests
DavidGOrtega Oct 16, 2020
decaa7f
print env
DavidGOrtega Oct 16, 2020
0d4246d
yaml
DavidGOrtega Oct 16, 2020
fe1f7ab
yaml
DavidGOrtega Oct 16, 2020
02bb010
yaml
DavidGOrtega Oct 16, 2020
6931a9b
yaml
DavidGOrtega Oct 16, 2020
8b4c2b2
check
DavidGOrtega Oct 16, 2020
40524db
fix repo env
DavidGOrtega Oct 16, 2020
7d9021f
fix repo env
DavidGOrtega Oct 16, 2020
211c3e4
fix repo env
DavidGOrtega Oct 16, 2020
501e6f2
fix repo env
DavidGOrtega Oct 16, 2020
37d032d
check name
DavidGOrtega Oct 16, 2020
a6a7b23
env github tests
DavidGOrtega Oct 16, 2020
ee9b100
env github tests
DavidGOrtega Oct 16, 2020
1474d47
log check
DavidGOrtega Oct 16, 2020
4dc8366
log check
DavidGOrtega Oct 17, 2020
e01f3ef
no check tessts
DavidGOrtega Oct 17, 2020
5ac29a9
enviromental tests
DavidGOrtega Oct 17, 2020
537ede0
workflow eenv
DavidGOrtega Oct 17, 2020
07bfccb
gitlab uploads and github_token
DavidGOrtega Oct 17, 2020
8735350
snapshots
DavidGOrtega Oct 17, 2020
5dd1bcd
Cml contexts (#314)
DavidGOrtega Oct 19, 2020
164376a
docker entrypooint
DavidGOrtega Oct 19, 2020
64e102b
Merge branch 'cml-contexts' of https://github.com/iterative/cml into …
DavidGOrtega Oct 19, 2020
9d2cc12
docker entrypoint register_runner
DavidGOrtega Oct 19, 2020
c444438
update templates
DavidGOrtega Oct 19, 2020
f4b2ea4
token repo
DavidGOrtega Oct 19, 2020
c7f901c
token repo
DavidGOrtega Oct 19, 2020
a03bd10
specify driver
DavidGOrtega Oct 19, 2020
f61f407
merge iterative/cml
DavidGOrtega Oct 20, 2020
f23765d
log env
DavidGOrtega Oct 20, 2020
7b2f0a0
log env
DavidGOrtega Oct 20, 2020
b2f666a
Destroy one tf resource
DavidGOrtega Oct 20, 2020
abdce43
update also github.context
DavidGOrtega Oct 20, 2020
2265018
Merge branch 'cml-contexts' of https://github.com/DavidGOrtega/cml in…
DavidGOrtega Oct 20, 2020
fbaac60
Cml contexts sha fix (#315)
DavidGOrtega Oct 21, 2020
20fa7e2
point to iterative repos
DavidGOrtega Oct 21, 2020
b8ff436
Merge branch 'cml-contexts' of https://github.com/iterative/cml into …
DavidGOrtega Oct 21, 2020
1f33b73
point to iterative repos without slash
DavidGOrtega Oct 21, 2020
eedd09d
point to iterative ai
DavidGOrtega Oct 21, 2020
a0c121a
test slash
DavidGOrtega Oct 21, 2020
d0e810a
test slash
DavidGOrtega Oct 21, 2020
4adfb1c
fix strip
DavidGOrtega Oct 22, 2020
d21e710
removal of strip
DavidGOrtega Oct 22, 2020
2cc0ac6
refactor
DavidGOrtega Oct 22, 2020
f454f10
slash
DavidGOrtega Oct 22, 2020
9d0f22f
minor refactor
DavidGOrtega Oct 26, 2020
2738dc9
no console
DavidGOrtega Oct 26, 2020
dd042e2
Cml contexts sha (#326)
DavidGOrtega Oct 28, 2020
ccc487e
publish backend
DavidGOrtega Oct 28, 2020
f2ec83b
no banckend in publish
DavidGOrtega Oct 28, 2020
5538aaa
merge upstream
DavidGOrtega Oct 28, 2020
c85aa7d
merge upstream
DavidGOrtega Oct 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bin/cml-cloud-runner-entrypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const {
RUNNER_EXECUTOR = 'shell',
RUNNER_RUNTIME = '',
RUNNER_IMAGE = 'dvcorg/cml:latest',
RUNNER_TF_NAME,

RUNNER_DRIVER,
RUNNER_REPO,
Expand Down Expand Up @@ -49,8 +50,11 @@ const shutdown_host = async () => {
try {
console.log('Terraform destroy...');
try {
const tf_resource = RUNNER_TF_NAME ? `-target=${RUNNER_TF_NAME}` : '';
console.log(
await exec('cd / && terraform init && terraform destroy -auto-approve')
await exec(
`cd / && terraform init && terraform destroy -auto-approve ${tf_resource}`
)
);
} catch (err) {
console.log(`Failed destroying terraform: ${err.message}`);
Expand Down
1 change: 1 addition & 0 deletions bin/cml-cloud-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const setup_runners = async (opts) => {
-e AWS_ACCESS_KEY_ID=${process.env.AWS_ACCESS_KEY_ID} \
-v $(pwd)/terraform.tfstate:/terraform.tfstate \
-v $(pwd)/main.tf:/main.tf \
-e "RUNNER_TF_NAME=iterative_machine.${resource.name}" \
-e "repo_token=${repo_token}" \
-e "RUNNER_REPO=${runner_repo}" \
-e "RUNNER_DRIVER=${driver}" \
Expand Down