Skip to content

Instantly share code, notes, and snippets.

View jasonbrooks's full-sized avatar

Jason Brooks jasonbrooks

View GitHub Profile
[environment:default]
OVEHOSTED_STORAGE/storageDomainConnection=str:host1:/engine
OVEHOSTED_STORAGE/mntOptions=str:backup-volfile-servers=host2:host3
# A sample configuration file to setup ROBO, based on https://github.com/gluster/gdeploy/blob/master/examples/hc.conf
[hosts]
host1
host2
host3
# Do a sanity check before proceding
[script1]
action=execute

Running Kubernetes and Friends in Containers on CentOS Atomic Host

Expanding on the post below, I want to explain how to take the development stream of centos atomic host, which now ships without kube and pals, and run the upstream kube or an rpm-based kube on it. I'm using containers built from this repo.

Some issues:

Running the master components via a kubelet and manifests

There's RHEL documentation for running the master components of kube via a kubelet. This works, mostly, but they recommend running the kubelet itself from a regular rpm install, so, not containerized.

{
created_on: "Wed, 13 Jul 2016 17:54:39 GMT",
id: 46584,
name: "atomic-testing",
oneshot: false,
rules: [
{
arguments: {
pattern: "atomic|kubernetes|ostree|rpm-ostree|docker|flannel|cockpit|cloud-init|etcd"
},
@jasonbrooks
jasonbrooks / gist:f3b405a43a5500b09085238528ab87ac
Last active April 22, 2016 15:12
vagrantfile for building custom fedora atomic tree and images
Vagrant.configure(2) do |config|
config.vm.box = "fedora/23-cloud-base"
config.vm.provider "libvirt" do |libvirt, override|
libvirt.cpus = 2
libvirt.memory = 4096
libvirt.driver = 'kvm'
libvirt.nested = true
libvirt.storage :file, :size => '20G'
@jasonbrooks
jasonbrooks / kube-setenforce-1.md
Last active January 5, 2017 20:38
kubernetes ansible setenforce 1

I use these ansible scripts (see also) to bring up kubernetes clusters, on centos and fedora. The scripts are awesome, but they put selinux into permissive mode, because, "tokens and selinux don't work together."

That's unfortunate, because one of the main things I'm doing when I turn up a kubernetes cluster is bug-hunting, and selinux can be a source of bugs.

I commented out the bit that put selinux into permissive mode:

#- name: Set selinux permissive because tokens and selinux don't work together
#  selinux: state=permissive policy={{ ansible_selinux.type }}
# when: ansible_selinux is defined and ansible_selinux.status == "enabled"
apiVersion: v1
kind: Pod
metadata:
name: fluentd-elasticsearch
namespace: kube-system
labels:
k8s-app: fluentd-logging
spec:
containers:
- name: fluentd-elasticsearch
[Service]
ExecReload=/usr/libexec/iptables/iptables.init restart

First, the vagrantfile for the VM on the host machine:

Vagrant.configure(2) do |config|
  
  config.vm.box = "fedora/23-atomic-host"
  
  config.vm.provider :libvirt do |libvirt|
    # Enable KVM nested virtualization
    libvirt.nested = true
Vagrant.configure(2) do |config|
config.vm.box = "fedora/23-cloud-base"
config.vm.provider "libvirt" do |libvirt, override|
libvirt.cpus = 2
libvirt.memory = 1024
libvirt.driver = 'kvm'
libvirt.storage :file, :size => '10G'
end