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

CentOS/RHEL7 support #410

Merged
merged 30 commits into from Jun 12, 2018
Merged

CentOS/RHEL7 support #410

merged 30 commits into from Jun 12, 2018

Conversation

jakolehm
Copy link
Contributor

@jakolehm jakolehm commented Jun 6, 2018

Requires #362
Fixes #198

@jakolehm jakolehm added the enhancement New feature or request label Jun 6, 2018
@jakolehm jakolehm added this to the 1.2.0 milestone Jun 6, 2018
@@ -52,8 +52,8 @@ if [ ! -e /etc/pharos/pki/config.json ]; then
"${PEER_IP}"
],
"key": {
"algo": "ecdsa",
"size": 256
"algo": "rsa",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to switch to rsa because curl/nss cannot handle ecdsa.

env

if [ ! -f /usr/local/bin/cfssl ]; then
curl -s -L -o /usr/local/bin/cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-${ARCH}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably should mirror cfssl binaries to pharos repo.

@jakolehm
Copy link
Contributor Author

jakolehm commented Jun 6, 2018

@jnummelin PTAL

@jakolehm jakolehm changed the title [WIP] CentOS/RHEL7 support CentOS/RHEL7 support Jun 7, 2018
@jnummelin
Copy link
Contributor

Upgrade path broken:

==> Upgrade master @ 147.75.204.149
Pharos::SSH::RemoteCommand::ExecError : SSH exec failed with code 127: install-kubeadm.sh
+ set -ex
++ kubeadm version -o short
+ '[' v1.10.3 = v1.10.4 ']'
+ cd /tmp
+ export DEBIAN_FRONTEND=noninteractive
+ DEBIAN_FRONTEND=noninteractive
+ apt-get download kubeadm=1.10.4-00
sh: line 11: apt-get: command not found

@jakolehm
Copy link
Contributor Author

Upgrade path broken:

Upgrade path is fixed now in #362, ofc needs also changes here.

@jakolehm jakolehm changed the base branch from feature/host-distro-configurer to master June 11, 2018 08:17

module Pharos
module Host
class El7 < Configurer
Copy link
Contributor

Choose a reason for hiding this comment

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

This should also implement upgrade_kubeadm, not upgrade path fails with:

/Users/jussi/code/pharos-cluster/lib/pharos/host/configurer.rb:119:in `abstract_method!': This is an abstract base method. Implement in your subclass. (NotImplementedError)
	from /Users/jussi/code/pharos-cluster/lib/pharos/host/configurer.rb:43:in `upgrade_kubeadm'
	from /Users/jussi/code/pharos-cluster/lib/pharos/phases/upgrade_master.rb:30:in `upgrade_kubeadm'
	from /Users/jussi/code/pharos-cluster/lib/pharos/phases/upgrade_master.rb:22:in `call'
...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, currently trying to find a way to upgrade just kubeadm with rpm...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@jakolehm
Copy link
Contributor Author

@jnummelin PTAL

Copy link
Contributor

@jnummelin jnummelin left a comment

Choose a reason for hiding this comment

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

I'd love to see the versionlock things generalized. The install_kubelet "interface" is also bit weird, but not sure if it's something we'd wanna fix in this PR specifically as it's more general thing.

Upgrade path is pretty impossible to test as all previous kube versions on centos are pretty much broken with the cgroup bug.

vb.cpus = 1
end

host.vm.network "private_network", ip: "192.168.100.#{i + 100}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Just thinking if we could/should change the IPs for Centos boxes. It would allow to test centos / ubuntu on vagrant side-by-side.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

linefromfile "^0:kubectl-" $versionlock
linefromfile "^0:kubeadm-" $versionlock

yum install -y kubelet-${KUBE_VERSION} kubectl-${KUBE_VERSION} kubeadm-${KUBEADM_VERSION}
Copy link
Contributor

Choose a reason for hiding this comment

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

The script name, and the configurer interface actually too, is slightly misleading as we install all kube components here and not just kubelet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have any suggestions for the interface name?

Copy link
Contributor

Choose a reason for hiding this comment

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

install_kube_packages?
install_kube_components?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

fi

versionlock="/etc/yum/pluginconf.d/versionlock.list"
linefromfile "^0:kubeadm-" $versionlock
Copy link
Contributor

Choose a reason for hiding this comment

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

Could these versionlock things be put into something generically re-usable? Now we have these lines repeating all over the scripts. Maybe some helper func like yum_install <package> <version> that handles all these things.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@jakolehm
Copy link
Contributor Author

jakolehm commented Jun 12, 2018

Upgrade path is pretty impossible to test as all previous kube versions on centos are pretty much broken with the cgroup bug.

I think the cgroup bug affects only subset of servers... at least for me it works in quite many environments (including Vagrant).

And yes, I tested the upgrade path 😄

@jakolehm jakolehm merged commit a6e7ffc into master Jun 12, 2018
@jakolehm jakolehm deleted the feature/centos7-support branch June 12, 2018 07:15
@jakolehm jakolehm mentioned this pull request Jun 12, 2018
@jakolehm jakolehm mentioned this pull request Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants