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

Updates for the latest k8s and etcd #17

Merged
merged 44 commits into from
Sep 23, 2017
Merged

Updates for the latest k8s and etcd #17

merged 44 commits into from
Sep 23, 2017

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Sep 5, 2017

Update things for the latest and greatest

tas50 added 14 commits September 5, 2017 11:09
We have a doc++ formatter built in now that provides nice output

Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Chef has apt_update and apt_repository built in now

Signed-off-by: Tim Smith <tsmith@chef.io>
This isn't required with Chef 12

Signed-off-by: Tim Smith <tsmith@chef.io>
The etcd cookbook has been updated to use etcd 3 now

Signed-off-by: Tim Smith <tsmith@chef.io>
They've changed all their repos

Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
@tas50 tas50 changed the title Updates for the latest k8s and etcd WIP: Updates for the latest k8s and etcd Sep 5, 2017
12.5 and 12.6 has some pretty serious custom resource defects that trip up a lot of users. 12.7 came quite a while ago

Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
This allows the user who wants to download from the standard sources to just specify the version. Otherwise they can specify their own asset download URL

Signed-off-by: Tim Smith <tsmith@chef.io>
It comes for free with Debian

Signed-off-by: Tim Smith <tsmith@chef.io>
This is nil by default already

Signed-off-by: Tim Smith <tsmith@chef.io>
This requires Chef 12.11, but does a much better job of handling systemd_unit files including validation of the files before usage. It's a much more robust way to handle systemd_unit files vs. executing the reload of the files using a template/notifier/execute chain.

Signed-off-by: Tim Smith <tsmith@chef.io>
@aespinosa
Copy link
Owner

Can you show the diff for commandline options for each component (v1.4.5 to v1.7.5). Kubernetes changes the commandline flags quite frequently. At least the default properties should by in-sync with the version offered.

Signed-off-by: Tim Smith <tsmith@chef.io>
This matches the project systemd units

Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
It's the default and we're only setting it in this one unit

Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
@tas50
Copy link
Contributor Author

tas50 commented Sep 6, 2017

Just a heads up this entire thing is broken at the moment. I just wanted to open the PR to get some visibility on what I was working on. Feedback would be super welcome.

Now that I have things matching the upstream unit files a bit more and using the systemd_unit resource I'm going to look at the default options. I'm sure there's quite a few new ones and that will need to get updated to work with 1.7.5 w/o the need for a wrapper cookbook defining new properties.

Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
@tas50 tas50 changed the title WIP: Updates for the latest k8s and etcd Updates for the latest k8s and etcd Sep 21, 2017
@tas50
Copy link
Contributor Author

tas50 commented Sep 21, 2017

@aespinosa This works on Ubuntu. Debian has some cgroups issues that are going to need some additional work, but were broken already.

  Service kube-apiserver
     ✔  should be installed
     ✔  should be running
  Port 8080
     ✔  should be listening
     ✔  processes should include "kube-apiserver"
  Port 6443
     ✔  should be listening
     ✔  processes should include "kube-apiserver"
  Service kube-controller-manager
     ✔  should be installed
     ✔  should be running
  Service kube-proxy
     ✔  should be installed
     ✔  should be running
  Service kube-scheduler
     ✔  should be installed
     ✔  should be running
  Service kubelet
     ✔  should be installed
     ✔  should be running
  Port 10250
     ✔  should be listening
     ✔  processes should include "kubelet"
  Command kubectl
     ✔  get node exit_status should eq 0
     ✔  get node stdout should match /default.*Ready/
  Command kubectl
     ✔  get pod busybox exit_status should eq 0
     ✔  get pod busybox stdout should match /busybox.*Running/

@tas50
Copy link
Contributor Author

tas50 commented Sep 21, 2017

So here's a highlight of the changes:

Use systemd_unit to manage the systemd unit files and sync the unit files with upstream a bit
Add a new property for the file ulimit for each service
Add a new property for specifying the version of each service so you don't have to set the whole artifact URL to use a new version
Default to k8s 1.7.6
Install the dependent packages for kubelets
Require the master property to be set so services will properly start
Use the new etcd cookbook that uses etcd 3.X
Resolve all Chef 14 deprecation warnings and cookstyle warnings
Test on Ubuntu as add ubuntu as a supported platform in the metadata
Remove the usage of the apt cookbook in testing
Use chef-apt-docker instead of manually setting up the repo in testing
Test with docker 17.06.1

Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
@tas50
Copy link
Contributor Author

tas50 commented Sep 22, 2017

RHEL 7 converges locally now

Copy link
Owner

@aespinosa aespinosa left a comment

Choose a reason for hiding this comment

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

Thanks for testing the other platforms.

I'll pull in the changes modifying some bits. I personally like multi-line markdown so I'll edit that out.

@@ -22,7 +22,7 @@ def generate
def non_commandline_property?(property)
[
:name, :run_user, :remote, :checksum,
:container_runtime_service
:container_runtime_service, :file_ulimit
Copy link
Owner

Choose a reason for hiding this comment

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

:version needs to be added too


pkgs = case node['platform_family']
when 'debian'
%w(iptables iproute2 socat util-linux mount ebtables)
Copy link
Owner

Choose a reason for hiding this comment

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

I think ethtool is still needed since kubernetes/kubernetes#26093 is still open and kubernetes/kubernetes#30356 was never merged.

Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
@aespinosa aespinosa merged commit e13f078 into aespinosa:master Sep 23, 2017
@aespinosa
Copy link
Owner

@tas50
Copy link
Contributor Author

tas50 commented Sep 23, 2017

Thanks. I'll have a flannel PR for you soon-ish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants