Commit Graph

210 Commits

Author SHA1 Message Date
Justin Santa Barbara a7ece228fb Fix issue with deleting DNS records when multiple matching zones found
We were accidentally reusing the variable we were closing over, I
believe
2016-08-19 23:55:38 -04:00
Justin Santa Barbara 4545352c00 Don't rolling-update all masters at once
Also add force command to rolling-update, for testing sanity.

Fix #284
2016-08-16 12:53:37 -04:00
Justin Santa Barbara 5d8c170360 Rename old upgrade command; make new upgrade intuitive
The old upgrade command (which was only called as part of a kube-up ->
kops upgrade) is now `kops toolbox convert-imported`.  The docs are
updated, but this is only normally called once per import so this should
not be high impact.

The upgrade command now looks for things that need upgrading.  Currently
only `upgrade cluster` is implemented; it currently only checks the
KubernetesVersion.  If KubernetesVersion is out of date, it will be
printed, and if --yes is specified the cluster spec will be set to the
next value.
2016-08-16 09:28:36 -04:00
Justin Santa Barbara 62fc3cfd69 Merge pull request #302 from justinsb/hints_on_update
Provide hints after update cluster
2016-08-14 22:21:51 -04:00
Justin Santa Barbara e778c792fe Provide hints after update cluster
This should make kops more discoverable

Issue #166

Issue #263
2016-08-14 22:19:52 -04:00
Justin Santa Barbara 7cde6890a4 Export admin password in kubecfg
This is where users expects to find it, because it is how kube-up does
it.

Issue #166
2016-08-14 22:18:58 -04:00
Justin Santa Barbara a3cfec6c24 Support changing the SSH public key
This requires that we include the OpenSSH fingerprint in the AWS key
name.
2016-08-11 12:00:52 -04:00
Justin Santa Barbara 928fd6161d Remove addons command
Encourage users to use kubectl instead
2016-08-03 00:42:42 -04:00
Justin Santa Barbara 45dd1da4a1 Better output when kubectl not in PATH
Also add to README

Fix #238
2016-08-02 23:06:51 -04:00
Justin Santa Barbara 310ba12edf Fix log message of shell commands
We were double-printing argv[0]
2016-07-29 01:30:34 -04:00
Justin Santa Barbara e3e58f605e support multiple zones in `kops import`
Seems to be less special-cased also.

Fix #216
2016-07-27 11:03:22 -04:00
Justin Santa Barbara 9e9855d1a4 Simpler upgrade procedure: reuse subnet
By reusing the subnet & security groups, we are able to skip the ELB
steps of the upgrade procedure.  The new cluster also has the same
identity as the old cluster for security groups, so we don't need to
reconfigure ELB etc.

Fixes #175
Fixes #174
2016-07-22 11:47:12 -04:00
Justin Santa Barbara 31892fb08d Refactor tests for cleaner separation 2016-07-22 10:19:01 -04:00
Justin Santa Barbara 18af54de6e Fix missing string cast 2016-07-14 11:06:39 -04:00
Justin Santa Barbara 47ef67a71d Merge pull request #147 from justinsb/fix_69
Clearer error message when importing a cluster with a custom subnet
2016-07-14 11:05:33 -04:00
Justin Santa Barbara 57d6e0d8d9 Import the node instance type when importing a cluster
We now query for the launchconfiguration and import the first machine
type we find.

Fix #148
2016-07-14 10:51:39 -04:00
Justin Santa Barbara 7c1177cc82 Clearer error message when importing a cluster with a custom subnet
We can at least give the user better instructions on how to proceed.
Because this is not in general safe though, I'm not sure we want to
gloss over this.

Issue #69
2016-07-14 10:38:32 -04:00
Justin Santa Barbara df56204479 Export kubecfg after as create cluster by default
It is scoped to a particular context, so seems harmless, and users will
(almost?) always do it after creation.

Fix #129
2016-07-12 23:02:43 -04:00
Justin Santa Barbara 0aed68c260 Add support for deleting an InstanceGroup 2016-07-11 00:08:55 -04:00
Justin Santa Barbara c4f2fbfcaf Tweaks to rolling-update CLI 2016-07-11 00:08:21 -04:00
Justin Santa Barbara 1d59f2aa80 Replace StateStore with a registry
StateStore was highly orientated towards a VFS system; replace it with a
Registry abstraction that is more object based.

We also rationalize much of the CLI (cmd) command logic also.
2016-07-11 00:07:59 -04:00
Justin Santa Barbara eb589fd025 Import cluster should create the same style name 2016-07-11 00:03:22 -04:00
Justin Santa Barbara 4ac0395a9f Merge pull request #103 from justinsb/delete_shutting_down_state
Tolerate shutting-down state on instance during delete
2016-07-09 22:32:21 -04:00
Justin Santa Barbara 0c867a8971 Merge pull request #108 from justinsb/fix_96
Detect & delete new ASG launch configs
2016-07-09 22:29:56 -04:00
Justin Santa Barbara 524fb645d0 Delete cluster deletes keypairs
Again we delete by name, which is why we name them by the very unlikely
to conflict name "kubernetes.<clustername>"

Issue #107
2016-07-09 22:26:12 -04:00
Justin Santa Barbara 5b8b4d4da3 Detect & delete new ASG launch configs
We now output a ClusterName property into the launchconfig, even though
we don't technically need it.  But it allows us to more easily detect
the cluster, and it generally seems like a good idea.

Also rename to 'autoscaling-config' and clean up the cluster name
detection logic.

Fix #96
2016-07-09 22:07:24 -04:00
Justin Santa Barbara d705a1001c Clean up IAM roles
We match by name; this seems acceptable given that we make the cluster
name a FQDN.

Issue #97
2016-07-09 15:33:57 -04:00
Justin Santa Barbara c058a0c2a8 Tolerate shutting-down state on instance during delete 2016-07-09 02:41:56 -04:00
Justin Santa Barbara 5c65600229 Delete Route53 host records on cluster-down
Initial implementation: we match by name, for example; when we have a
hosted zone id we should plumb it through.

Does implement bulk deletion, because on Route53 we have to delete
multiple resources at once.

Issue #74
2016-07-09 02:41:25 -04:00
Justin Santa Barbara d1ef7580a9 Report less-scary message when IAM instance profile is not ready yet
IAM instance profile creation is very async, and this causes dependent
resources to fail.  That's fine - we have good retry logic - but we
should output a less frightening error message.

Issue #35
2016-07-07 10:22:44 -04:00
Justin Santa Barbara 274a8eff3c Fetch ELB tags in chunks of 20
ELB DescribeTags has a limit of 20 ELBs / call.  So we paginate the
DescribeLoadBalancers call with page size = 20 also.
2016-07-06 13:46:16 -04:00
Justin Santa Barbara d427858477 Rename to kops
The upup tool is now called kops, and we have moved repos
2016-06-30 09:25:25 -04:00
Justin Santa Barbara be4be57f3a upup: workaround for secrets problem with upgrade 2016-06-28 13:08:41 -04:00
Justin Santa Barbara e3062a9f51 upup: improved upgrade procedure 2016-06-28 11:49:17 -04:00
Justin Santa Barbara e315564cfa upup: More delete cleanup, use statestore by default 2016-06-28 11:47:19 -04:00
Justin Santa Barbara 947a045667 Rename DNSDomain -> ClusterDNSDomain for clarity 2016-06-27 15:36:11 -04:00
Justin Santa Barbara ee8bdb907e upup delete: don't always print dependencies 2016-06-27 15:00:51 -04:00
Justin Santa Barbara b6cf38c96e AllocateNodeCIDRs need no longer be "bubbled down"
We have it on the KCM config; just set it there
2016-06-27 00:32:19 -04:00
Justin Santa Barbara 87b7c71fcc Remove spurious errors when deleting a cluster 2016-06-27 00:03:49 -04:00
Justin Santa Barbara 492856069a Apply gofmt 2016-06-26 23:24:17 -04:00
Justin Santa Barbara eeed4a3031 Rationalize API to something we want to support forever 2016-06-26 23:09:02 -04:00
Justin Santa Barbara ee325435e6 Rationalize properties to the minimal set 2016-06-26 09:45:05 -04:00
Justin Santa Barbara 3185a3fe5c Fix upgrade 2016-06-23 10:28:17 -04:00
Justin Santa Barbara 90d7fb87ad upup: improved delete; create upup export and upup upgrade 2016-06-23 08:59:20 -04:00
Justin Santa Barbara 75f386235a upup: rolling-update add mutex lock 2016-06-17 09:36:43 -04:00
Justin Santa Barbara 1e7159a923 upup: detach internet gateway if vpc is to be deleted 2016-06-17 09:36:27 -04:00
Justin Santa Barbara 3ede6c1f4a upup: uncompress gzipped data in delete cluster 2016-06-17 09:36:12 -04:00
Justin Santa Barbara eb23e22b3c upup: rolling-update should take --name, not --cluster-id 2016-06-13 17:37:30 -04:00
Justin Santa Barbara 0559ec1210 upup: Support for shared VPCs
A lot of work that had to happen here:

* Better reuse of config
* Ability to mark VPC & InternetGateway as shared
* Find models relative to the executable, to run from a dir-per-cluster

Fixes #95
2016-06-13 11:37:06 -04:00
Justin Santa Barbara 530b4c79db upup: experimental addon management 2016-06-13 11:35:00 -04:00
Justin Santa Barbara 72afa859a3 upup: delete cluster should take -name to be consistent
Still not entirely sure on cluster-id vs name, but name is consistent
2016-06-11 23:08:40 -04:00
Justin Santa Barbara 0263826163 upup: delete cluster should check status of ASG
Before deleting the ASG, we need to check it exists.

Issue #99
2016-06-11 21:33:56 -04:00
Justin Santa Barbara e63426ce65 upup: delete cluster should eventually give up
If it isn't making progress, eventually we should bail out so that we
can use this in scripts.  However, we don't need to be too aggressive,
because it is not good to leak resources, and a user will likely
Control-C us pretty fast when they see they're in a loop.

Issue #99
2016-06-11 21:33:56 -04:00
Justin Santa Barbara 7543d1c19d upup: apply gofmt
Missed a few gofmt places
2016-06-10 11:41:10 -04:00
Justin Santa Barbara 9b32edfb81 upup: add experimental cluster rolling-update command
Little more than a hack right now, but a good place to start.
2016-06-10 11:36:57 -04:00
Justin Santa Barbara 6e7c4209de upup: Simple tag fixes to avoid comparison failures
We populate the actual expected tags in-place now
2016-06-10 11:33:33 -04:00
Justin Santa Barbara 70d7c1b92e upup: avoid warning when building filters with nil name 2016-06-08 12:18:07 -04:00
Justin Santa Barbara 4c0f54f95d upup: run create & delete in parallel
It makes logging harder, but we want to start testing it!
2016-06-07 15:23:07 -04:00
Justin Santa Barbara cf840ef21a upup: better cluster delete 2016-06-07 08:46:28 -04:00
Justin Santa Barbara 095bf95fc9 upup: simple command to delete (AWS) clusters
A relatively dumb retry strategy to work around dependencies, but it
works and it is difficult to do _much_ better.
2016-05-30 17:57:40 -04:00