Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pozgo committed Dec 19, 2016
0 parents commit 5b57fb9
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2016 MILLION12

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Ansible Role: CentOS 7 Kubernetes Services
[![GitHub Open Issues](https://img.shields.io/github/issues/million12/ansible-role-centos-kubernetes.svg)](https://github.com/million12/ansible-role-centos-kubernetes/issues)
[![GitHub Stars](https://img.shields.io/github/stars/million12/ansible-role-centos-kubernetes.svg)](https://github.com/million12/ansible-role-centos-kubernetes)
[![GitHub Forks](https://img.shields.io/github/forks/million12/ansible-role-centos-kubernetes.svg)](https://github.com/million12/ansible-role-centos-kubernetes)
[![GitHub release](https://img.shields.io/github/release/million12/ansible-role-centos-kubernetes.svg)](https://github.com/million12/ansible-role-centos-kubernetes)
[![license](https://img.shields.io/github/license/million12/ansible-role-centos-kubernetes.svg?maxAge=2592000)](https://github.com/million12/ansible-role-centos-kubernetes/blob/master/LICENSE)

---

Ansible role installs Kubernetes services on CentOS 7.


### Requirements
Tested on CentOS 7.

### Example Playbook

- hosts: servers
roles:
- { role: million12.centos-kubernetes, tags: ['kube'] }


---
### Author

Author: Przemyslaw Ozgo (<przemek@m12.io>)

---
**Sponsored by [Prototype Brewery](http://prototypebrewery.io/)** - the new prototyping tool for building highly-interactive prototypes of your website or web app. Built on top of [Neos CMS](https://www.neos.io/) and [Zurb Foundation](http://foundation.zurb.com/) framework.
8 changes: 8 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# defaults file for centos-kubernetes

kubernetes_items:
- kubelet
- kubeadm
- kubectl
- kubernetes-cni
8 changes: 8 additions & 0 deletions files/kubernetes.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[kubernetes]
name=Kubernetes
baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
22 changes: 22 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
galaxy_info:
author: Przemyslaw Ozgo
description: Installing Kubernetes services with kubeadm
company: m12.io

license: MIT
min_ansible_version: 2.0

platforms:
- name: EL
versions:
- 7

categories:
- system
- kubernetes

dependencies: []
# List your role dependencies here, one per line.
# Be sure to remove the '[]' above if you add dependencies
# to this list.
21 changes: 21 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# tasks file for centos-kubernetes
- name: == SYSTEM == Turn Off SELinux
selinux:
state: disabled

- name: == REPO == Add Kubernetes Repository
copy: src=kubernetes.repo dest=/etc/yum.repos.d/kubernetes.repo

- name: == YUM == Install Kubernetes
yum: name={{ item }} state=latest
with_items: "{{ kubernetes_items }}"

- name: == SERVICE == Enable/Start Kubelet Service
raw: systemctl enable kubelet && systemctl start kubelet

- name: == SERVICE == Make sure Kubelet is running
service:
name: kubelet
enabled: yes
state: started

0 comments on commit 5b57fb9

Please sign in to comment.