Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

add a make commands that start phase1 #134

Merged
merged 1 commit into from
Jun 22, 2016

Conversation

mikedanese
Copy link
Contributor

No description provided.

@errordeveloper
Copy link
Contributor

errordeveloper commented Jun 20, 2016

LGTM, needs a rebase...

@colemickens
Copy link
Contributor

colemickens commented Jun 21, 2016

Should it use something like ./$$(jq -r '.phase1.instance_prefix')/ as the staging directory rather than ./tmp? If I modify phase1.instance_prefix now and re-deploy, it will pick up the old terraform file and tear down my old cluster.

I was thinking about evaluating $$(jq -r '.phase1.instance_prefix' .config.json) in the top Makefile and passing it as an extra argument so that do [deploy|destroy] becomes do [deploy|destroy] {instance_prefix} and then do uses that extra arg as the staging dir?

@errordeveloper
Copy link
Contributor

@colemickens that's a good question indeed. Terraform does a good job at figuring out when resources need to be updated vs re-created entierely, but there is probably something we should do outside of Terraform, especially to cater for non-Terraform implementations of phase 1. I think instance prefix, or cluster name would be good candidates for that. I also think that generated code in the sense we have it right now should be eligible to a life of it's own, i.e. users might need to modify and redistribute the generated code.

@@ -45,6 +45,14 @@ menuconfig: .tmp/mconf
echo-config: .config.json
cat $<

deploy: .config.json
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose you can do:

deploy destroy: .config.json
    $(MAKE) do WHAT=$@

Isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@mikedanese
Copy link
Contributor Author

mikedanese commented Jun 22, 2016

@colemickens compromise: name the tf files differently based on instance prefix which is basically cluster name. I pushed a change to all.jsonnet that does that. I'm happy to not use .tmp but I don't know what the structure should look like yet.

@colemickens
Copy link
Contributor

colemickens commented Jun 22, 2016

That doesn't include the crypto assets then. I think it would be good for there to be an output folder per- deployment (aka per-instance-prefix) that contains a kubeconfig, the terraform plan, the terraform state and the crypto assets. Maybe I'll just file a separate issue.

@mikedanese
Copy link
Contributor Author

Ouch, the crypto stuff is definitely not threadsafe right now... Ok I'm going to work on #145 next.

@mikedanese
Copy link
Contributor Author

I'm going to leave that work for a follow up.

@mikedanese mikedanese merged commit 1747396 into kubernetes-retired:master Jun 22, 2016
@mikedanese mikedanese deleted the make-deploy branch June 22, 2016 20:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants