Commit Graph

1657 Commits

Author SHA1 Message Date
Justin Santa Barbara 0521a09be2 Better error presentation: use exitWithError 2016-09-24 19:06:05 -04:00
Justin Santa Barbara b9d1c414a7 Clean up delete cluster messaging
Fix #393
2016-09-24 18:55:17 -04:00
Justin Santa Barbara 4e7b186120 If the API is down in a rolling-update, support --cloudonly
Otherwise it's possible to get "stuck" if the API is down
2016-09-24 13:45:02 -04:00
Justin Santa Barbara 6385bf647d Merge pull request #498 from justinsb/fix_486
Don't add terraform to --out
2016-09-24 11:35:58 -04:00
Justin Santa Barbara addaf5e4b4 Don't add terraform to --out
Fix #486
2016-09-24 11:25:39 -04:00
Justin Santa Barbara 05c799761f First step towards rolling update
Start querying nodes in k8s also

Unclear whether we want to use two ASGs for greater control at the
moment.
2016-09-24 11:19:17 -04:00
Justin Santa Barbara 59cf7a198b Fix help text for `kops edit`
Fixes #405
2016-09-17 23:19:49 -04:00
Justin Santa Barbara 4e26a95e9f Merge pull request #458 from justinsb/always_logtostderr
Always set logtostderr
2016-09-17 15:05:05 -04:00
Justin Santa Barbara d2ab4f562f Always set logtostderr
Previously we were relying on k8s to do it for us
2016-09-17 15:04:06 -04:00
Justin Santa Barbara 269662e590 Merge pull request #445 from justinsb/postitional_arguments_upgrade_cluster
Support positional args in upgrade cluster
2016-09-17 15:03:08 -04:00
Justin Santa Barbara 67924c09de Don't reorder source list when rendering table 2016-09-17 14:55:35 -04:00
Justin Santa Barbara cff1efff19 Support positional args in upgrade cluster
In particular, the cluster name
2016-09-13 13:36:09 -04:00
Justin Santa Barbara 6d139d06d1 Support labels on k8s nodes and AWS instances
A lot of supporting work was needed, including improvements to the model
and model generation logic.
2016-09-13 12:47:16 -04:00
Justin Santa Barbara 66731fb03a Populate instance groups for apply cluster
We likely want to move PopulateInstanceGroupSpec into the schema, but we
always want to "upgrade"/"convert" the spec whenever we load it.
2016-09-09 10:26:34 -04:00
Justin Santa Barbara ebf84d33d6 Merge pull request #273 from moleksyuk/master
Add no-public-ip option to instance groups
2016-09-08 11:45:43 -04:00
Justin Santa Barbara 0b4a558864 Merge pull request #414 from justinsb/ubuntu_initial_support
Initial (experimental) Ubuntu 16.04 support
2016-09-08 10:21:24 -04:00
Justin Santa Barbara 62d5451b25 Initial (experimental) Ubuntu 16.04 support 2016-09-08 10:20:42 -04:00
Justin Santa Barbara dff14fe283 Change default networking model to kubenet
Fix #400
2016-09-08 00:54:26 -04:00
Justin Santa Barbara ef1f64f308 Start cleaning up API: optional fields should be pointers 2016-09-08 00:49:40 -04:00
Justin Santa Barbara a51effbbdd Merge pull request #401 from justinsb/move_cloudprovider_not_set_message
Misc error handling tidying
2016-09-08 00:14:48 -04:00
Justin Santa Barbara d3ab070b0d Use go-bindata to embed our models
This allows us to have single-file deployment
2016-09-07 11:56:03 -04:00
Justin Santa Barbara bf99d6b381 Prefer exitWithError to os.Exit 2016-09-06 10:22:58 -04:00
Justin Santa Barbara e1a4d6e609 Move CloudProvider not set error message 2016-09-06 10:21:35 -04:00
Mykhailo Oleksiuk ea532e3566 Rename --no-associate-public-ip to --associate-public-ip 2016-09-01 18:54:25 +03:00
Mykhailo Oleksiuk aa6693a6ed megre from upstream 2016-09-01 13:23:50 +03:00
Justin Santa Barbara ef7dddf2af Style nits for makefile 2016-08-27 15:18:05 -04:00
Justin Santa Barbara 9d7a7fc6e8 Merge pull request #349 from justinsb/govet_fixes
govet fixes
2016-08-26 02:16:12 -04:00
Justin Santa Barbara dc63e307df Allow pluggable networking: classic, kubenet, external 2016-08-22 12:32:15 -04:00
Justin Santa Barbara 637a10be12 govet fixes 2016-08-20 01:09:19 -04:00
Justin Santa Barbara 146b810048 Remove unused field in UpgradeClusterCmd 2016-08-18 23:46:49 -04:00
Justin Santa Barbara bef7faff69 Merge pull request #325 from justinsb/fix_284
Add force command to rolling-update
2016-08-16 12:55:24 -04:00
Justin Santa Barbara 564a8c6927 Merge pull request #324 from justinsb/docs_aug16a
Document cleaned up upgrade command
2016-08-16 12:54:27 -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 f3bd394008 Document cleaned up upgrade command
Issue #239
2016-08-16 10:27:37 -04:00
Justin Santa Barbara fe27d8bb61 Warn if KOPS_STATE_STORE is not an S3 bucket
Issue #91
2016-08-16 10:16:32 -04:00
Justin Santa Barbara 08114a3a68 Add top-level retry to nodeup 2016-08-16 09:54:43 -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 069550fc52 Fix message when no name passed to delete cluster 2016-08-15 00:41:39 -04:00
Justin Santa Barbara 5fb39913cc If no changes are needed in an update, don't print a confusing message
Fix #208
2016-08-14 23:40:18 -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 7699dc8fd2 Merge pull request #294 from justinsb/use_ssh_key
SSH key improvements
2016-08-11 22:28:41 -04:00
Justin Santa Barbara 219c6e4308 Use the SSH key from the secret store
It is an error if there is not exactly one, but we have commands to
manage it now.
2016-08-11 12:00:46 -04:00
Justin Santa Barbara 8fb4215e17 Run CI versions of k8s
CI versions are not pushed to gcr.io, so we need to preload the images
by downloading them and doing a docker load.
2016-08-11 01:32:42 -04:00
Mykhailo Oleksiuk fad3d3a4f4 move --no-associate-public-ip to instance group 2016-08-06 14:46:46 +03:00
Mykhailo Oleksiuk 0c96f5dd1d add parameter --no-public-ip 2016-08-05 17:21:15 +03:00
Mykhailo Oleksiuk 911092e419 rename parameter --disable-associate-public-ip to --no-public-ip 2016-08-05 17:08:25 +03:00
Mykhailo Oleksiuk a264bee96f add parameter --disable-associate-public-ip 2016-08-05 17:00:14 +03:00
Mykhailo Oleksiuk d3228dfec0 add parameter --disable-associate-public-ip 2016-08-05 12:57:33 +03:00
Mykhailo Oleksiuk bc26eecf49 Merge remote-tracking branch 'upstream/master' 2016-08-05 12:08:56 +03:00
Justin Santa Barbara de0482a411 More consistency in publickey CLI
Also docs skeleton
2016-08-05 01:23:13 -04:00
Justin Santa Barbara 05c724f780 Support for deleting secrets 2016-08-05 00:58:11 -04:00
Justin Santa Barbara 9c4955095c Allow creation of SSH public keys 2016-08-05 00:45:28 -04:00
Justin Santa Barbara 2b9cc89257 Add --full arg to kops get cluster 2016-08-05 00:44:23 -04:00
Justin Santa Barbara e94d10166b Stub of 'create secret' command 2016-08-05 00:07:39 -04:00
Justin Santa Barbara abf456339d Add describe secrets command 2016-08-04 22:53:43 -04:00
Justin Santa Barbara 5585af595b Support reading the plaintext value of a secret 2016-08-04 22:33:13 -04:00
Justin Santa Barbara af841d50c0 Create more consistent secret CLI 2016-08-04 22:18:29 -04:00
Justin Santa Barbara 4afec66da4 Merge pull request #270 from justinsb/get_one_cluster
Expose full spec, by `kops get cluster -oyaml`
2016-08-04 22:03:47 -04:00
Justin Santa Barbara b3a4b6e08f Expose full spec, by `kops get cluster -oyaml`
Also for instance groups.

Hat-tip to @zmerlynn for the suggestion.
2016-08-04 21:37:17 -04:00
Justin Santa Barbara 64b2f9d387 Introduce some padding into text grid output
Otherwise we were not leaving a gap when columns were 8n characters
wide.
2016-08-04 21:12:30 -04:00
Mykhailo Oleksiuk 7984bfcb62 add parameter --disable-associate-public-ip 2016-08-04 18:34:18 +03:00
Mykhailo Oleksiuk ec122d54a6 add parameter --no-associate-public-ip 2016-08-04 18:17:40 +03:00
Mykhailo Oleksiuk a860fdbdfd add parameter --no-associate-public-ip 2016-08-04 17:19:20 +03:00
Justin Santa Barbara e754c3b86a Merge pull request #258 from justinsb/fix_134
Suggest `kops get` for `kops list`
2016-08-03 01:28:29 -04:00
Justin Santa Barbara 7660cd2ccf Suggest `kops get` for `kops list`
Fix #134
2016-08-03 01:25:14 -04:00
Justin Santa Barbara a9c4062cce Make it clearer when we use the cluster from kubecfg
Fix #164
2016-08-03 00:58:22 -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 39a3d71def Revert "Import SSH public key into the keystore"
This reverts commit bd3ab166b7.
2016-07-29 13:06:37 -04:00
Justin Santa Barbara cf1529e9df Revert "Add `kops get secrets` command"
This reverts commit 19e19a0f09.
2016-07-29 13:06:26 -04:00
Justin Santa Barbara 19e19a0f09 Add `kops get secrets` command
Matches our naming pattern, and now using our text grid output
2016-07-29 01:12:03 -04:00
Justin Santa Barbara bd3ab166b7 Import SSH public key into the keystore
This means it only needs to be specified during `kops create`.  We
remove the option from `kops update` for consistency.

This will shortly be manageable using the secrets functionality.

Fix #221
2016-07-29 00:45:37 -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 2a43565e30 Fix typo: istance -> instance 2016-07-26 19:05:26 -04:00
Justin Santa Barbara 1240e1d924 Fix bug where edit cluster was computing with the old spec
Also add some tests, and fix some variable naming to hopefully stop it
happening again.

Fix #194
2016-07-22 18:19:40 -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 42d8a61d7c Fix build problem 2016-07-22 10:23:43 -04:00
Justin Santa Barbara 31892fb08d Refactor tests for cleaner separation 2016-07-22 10:19:01 -04:00
Justin Santa Barbara 6f7284ed3d Add update command to update parent command 2016-07-22 01:12:22 -04:00
Justin Santa Barbara ed734bb354 Fix typo in CreateInstanceGroupCmd 2016-07-21 22:17:00 -04:00
Justin Santa Barbara 2fa3bcc952 UX: Split create command into `create` and `update`
We separate out the `create cluster` operation from the `update cluster`
operation.  Now create cluster only creates the spec (unless you pass
--yes), and is only for new clusters.

`update cluster` works on new or existing clusters, and should be called
to apply changes.

`update` is not the best name, because it means something different in
kubectl, but I think it's a good start.
2016-07-21 11:54:09 -04:00
Justin Santa Barbara 5e4b060edd Support positional arguments for kops export kubecfg 2016-07-21 01:29:09 -04:00
Justin Santa Barbara 46fe8bd0f3 kops delete cluster now recognizes clustername as a positional arg 2016-07-20 21:27:56 -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 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 302f23463e Configuration of admin access to ports 22 and master-443
Fix #143
2016-07-14 10:33:26 -04:00
Justin Santa Barbara 1102e7818d Perform as much validation as possible before writing a cluster config
This prevents us getting into a situation where an invalid cluster is
saved, and then cannot be deleted.
2016-07-14 09:54:21 -04:00
Justin Santa Barbara 4b3b0ab59a Don't export kubecfg if we're only doing a --dryrun
We don't have all the keys/certs yet!

Fix #136
2016-07-13 11:09:43 -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 d77d6f4859 Add version command that prints compiled version
Fix #128
2016-07-12 22:30:12 -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 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 952e74714f Sort table output
Currently sort order is locked to table order, but this could be changed
if needed.

Fix #80
2016-07-09 14:49:54 -04:00
Justin Santa Barbara e28c770c18 Move delete output to table helper 2016-07-09 13:57:02 -04:00
Justin Santa Barbara 555c637d93 Merge pull request #94 from justinsb/fix_66
Support `kops get/edit instancegroup`
2016-07-09 13:50:04 -04:00
Justin Santa Barbara 992a3e7d7f Support `kops get/edit instancegroup`
This lets us start to manage instancegroups through the CLI

Issue #66
2016-07-08 01:21:15 -04:00
Justin Santa Barbara 29dbbe3af3 When exposing secrets, output a blank line afterwards
Otherwise it becomes hard to copy and paste
2016-07-07 11:52:52 -04:00
Justin Santa Barbara fa3157e512 Merge pull request #54 from justinsb/fix_tests
Update & get tests working again
2016-07-06 03:06:59 -04:00
Justin Santa Barbara d8e8cd80ab Fix formatting in error message
Issue #43 (not a fix though, just something observed in that issue)
2016-07-06 00:45:32 -04:00
Justin Santa Barbara c956bdada5 Update & get tests working again
They're still hitting the AWS APIs, have terrible coverage and are slow.
But it's a start!
2016-07-06 00:33:07 -04:00
Justin Santa Barbara 9c07670d26 Don't force HA master by default
Users can still get HA master by explicitly specifying a list of
`--master-zones`.

But HA master is not as well tested, is slower, needs more machines etc
and we probably shouldn't silently force it as the default.

Fix #33
2016-07-05 12:23:47 -04:00
Justin Santa Barbara 58fbef0572 Apply gofmt 2016-07-01 10:02:30 -04:00
Justin Santa Barbara d8b661777b Merge cloudup tool into `kops create cluster` 2016-06-30 10:25:50 -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