[Container-tools] Recommendations for bootstrapping a local k8s cluster?

Nick Coghlan ncoghlan at gmail.com
Mon May 25 07:59:49 UTC 2015


On 25 May 2015 at 16:52, Nick Coghlan <ncoghlan at gmail.com> wrote:
> The all-inclusive vagrant+ansible bootstrap image ended up weighing in
> at almost 700 MB, so I'm going to go with the "impractically large"
> assessment here, and switch approaches to just installing ansible
> locally and using OMV with the ansible based bootstrap.

Starting to work on this, I believe this is the sequence of
instructions I'd like to have work for ansible+vagrant based
bootstrapping of a local Kubernetes instance (currently on an F21
machine, hence yum rather than dnf):

    $ sudo yum install git ansible vagrant vagrant-libvirt
    $ git clone https://github.com/purpleidea/oh-my-vagrant.git
    $ cd oh-my-vagrant/vagrant
    $ cp ../examples/kubernetes-ansible.yaml omv.yaml
    $ vagrant up

For a non-Fedora OS, the first step of getting git, ansible and
vagrant appropriately installed will be different, while the last 4
steps should remain the same.

In practice, there's still some work to do to smooth out the OMV
bootstrapping experience.

Specifically, the last step failed for me on F21 due to the missing
"vagrant-hostmanager" plugin. "vagrant plugin install
vagrant-hostmanager" then failed complaining it couldn't find the Ruby
headers to build the hitimes gem. With neither the hostmanager Vagrant
plugin nor the hitimes gem in the Fedora repos, I installed the
ruby-devel packages to support the plugin build process.

However, that then still failed, as vagrant attempted to build
"ruby-libvirt (0.5.2)", and complained it couldn't find the libvirt
headers. Installing the system ruby-libvirt package didn't satisfy the
dependency, so I installed libvirt-devel to provide the missing
headers.

That gives two missing steps before "vagrant up" as:

    $ sudo yum install ruby-devel libvirt-devel
    $ vagrant plugin install vagrant-hostmanager

This will suffice for Fedora, but on other platforms (especially
Windows), getting the native builds to work for the hostmanager plugin
would likely be a pain (this is the kind of problem that a robust
cross-platform user level package management system could help us
address). (There's also a warning about failing to load the 'xdg' gem
that I haven't looked into yet)

As far as the bootstrapping of Kubernetes itself goes, that's
currently failing for me with some suspicious looking errors related
to configuring firewalld while the Ansible scripts are running. I
haven't started investigating that one yet, though.

Regards,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia




More information about the Container-tools mailing list