cri-o / cri-o-ansible

Playbooks to install CRI-O from source
52 stars 31 forks source link

Code Refactor #6

Closed albertomurillo closed 7 years ago

albertomurillo commented 7 years ago

Fix https://github.com/cri-o/cri-o-ansible/issues/7

Install packages for Fedora/RedHat/CentOS in one task 
Use update_cache option from apt module
Insert blank lines between tasks for better readability.
Shorten comparison of ansible_distribution variable
Install git on Ubuntu
Add *.retry to .gitignore
Check if go is already installed
Some idempotency fixes
runcom commented 7 years ago

@albertomurillo thanks for this! I'm about to merge #5 though so that will cause a rebase for sure :(

runcom commented 7 years ago

@albertomurillo could you rebase and I'll give this a try asap?

runcom commented 7 years ago

So I provisioned a 3 node cluster with this playbook in this PR but somehow kubeadm init doesn't work anymore, I'm re-trying another cluster with master to understand if this PR is the issue.

runcom commented 7 years ago

so it does work with master, I'm retrying one more time with this PR before saying it's an issue with this PR :(

runcom commented 7 years ago

@albertomurillo have you tested if this is working on Fedora? I couldn't get it work as per our previous IRC chat :(

albertomurillo commented 7 years ago

@runcom no but it didnt work either with master... I think is an issue with not restarting crio and kubelet services after /etc/crio/crio.conf and /etc/systemd/system/kubelet.service.d/0-crio.conf are changed

runcom commented 7 years ago

@runcom no but it didnt work either with master... I think is an issue with not restarting crio and kubelet services after /etc/crio/crio.conf and /etc/systemd/system/kubelet.service.d/0-crio.conf are changed

may be right, actually, we should do a daemon-reload after we install the systemd drop in. WRT crio.conf I think crio isn't started when we edit it, so that's probably ok.

albertomurillo commented 7 years ago

I have the change to reload daemons ready since yesterday im testing them right now but my internet is a bit slow :P

albertomurillo commented 7 years ago

This is ready now.

runcom commented 7 years ago

I still can't make this to work on Fedora 25 :confused:

[certificates] Generated service account token signing key and public key.
[certificates] Generated front-proxy CA certificate and key.
[certificates] Generated front-proxy client certificate and key.
[certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/controller-manager.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/scheduler.conf"
[apiclient] Created API client, waiting for the control plane to become ready
[apiclient] All control plane components are healthy after 145.514402 seconds
[apiclient] Waiting for at least one node to register
[apiclient] Temporarily unable to list nodes (will retry)
[apiclient] Temporarily unable to list nodes (will retry)
[apiclient] Temporarily unable to list nodes (will retry)
[apiclient] Temporarily unable to list nodes (will retry)
albertomurillo commented 7 years ago

Im splitting this PR into smaller ones.