Adding initial rkt support

pull/784/head
Brad Beam 2016-12-13 09:36:17 -06:00
parent a3c044b657
commit a8f2af0503
9 changed files with 63 additions and 1 deletions

View File

@ -28,6 +28,7 @@
roles:
- { role: kubernetes/preinstall, tags: preinstall }
- { role: docker, tags: docker }
- { role: rkt, tags: rkt }
- hosts: etcd:!k8s-cluster
any_errors_fatal: true

View File

@ -197,3 +197,7 @@ k8s_image_pull_policy: IfNotPresent
# default packages to install within the cluster
kpm_packages: []
# - name: kube-system/grafana
rkt_version: 1.21.0
etcd_deployment_type: rkt
kubelet_deployment_type: docker

View File

@ -121,7 +121,7 @@ downloads:
unarchive: true
owner: "etcd"
mode: "0755"
container: "{{ etcd_deployment_type == 'docker' }}"
container: "{{ etcd_deployment_type }} in [ 'docker', 'rkt' ]"
repo: "{{ etcd_image_repo }}"
tag: "{{ etcd_image_tag }}"
hyperkube:

View File

@ -0,0 +1,6 @@
---
rkt_version: 1.12.0
rkt_pkg_version: "{{ rkt_version }}-1"
rkt_download_src: https://github.com/coreos/rkt
rkt_download_url: "{{ rkt_download_src }}/releases/download/v{{ rkt_version }}"

View File

@ -0,0 +1,41 @@
---
- name: gather os specific variables for rkt
include_vars: "{{ item }}"
with_first_found:
- files:
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version|lower|replace('/', '_') }}.yml"
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml"
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version|lower|replace('/', '_') }}.yml"
- "{{ ansible_distribution|lower }}.yml"
- "{{ ansible_os_family|lower }}.yml"
- defaults.yml
paths:
- ../vars
skip: true
tags: facts
#- name: download rkt pkg
# get_url:
# url: "{{ rkt_download_url }}/{{rkt_pkg_name}}"
# dest: "{{ local_release_dir }}"
# when: (ansible_os_family != "CoreOS") and "rkt" in [ etcd_deployment_type, kubelet_deployment_type ]
- name: install rkt pkg on ubuntu
apt:
deb: "{{ rkt_download_url }}/{{ rkt_pkg_name }}"
state: present
register: rkt_task_result
until: rkt_task_result|success
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
when: ansible_os_family == "Debian" and "rkt" in [ etcd_deployment_type, kubelet_deployment_type ]
- name: "install rkt pkg on centos"
yum:
pkg: "{{ rkt_download_url }}/{{ rkt_pkg_name }}"
state: present
register: rkt_task_result
until: rkt_task_result|success
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
when: ansible_os_family == "RedHat" and "rkt" in [ etcd_deployment_type, kubelet_deployment_type ]

View File

@ -0,0 +1,4 @@
---
- name: Install rkt
include: install.yml

View File

@ -0,0 +1,2 @@
---
rkt_pkg_name: "rkt_{{ rkt_pkg_version }}_amd64.deb"

View File

@ -0,0 +1,2 @@
---
rkt_pkg_name: "rkt-{{ rkt_pkg_version }}.x86_64.rpm"

View File

@ -0,0 +1,2 @@
---
rkt_pkg_name: "rkt-{{ rkt_pkg_version }}.x86_64.rpm"