Skip to content

Commit

Permalink
rkt on all nodes (master and simple)
Browse files Browse the repository at this point in the history
  • Loading branch information
bonky42 committed Jun 28, 2017
1 parent 9010aee commit 85c3cb1
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 12 deletions.
7 changes: 4 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.box = "ubuntu/xenial64"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"

config.vm.define "master" do |master|
master.vm.network "private_network", ip: "192.168.33.101"
master.vm.network "private_network", ip: "192.168.42.2"
master.vm.provision "ansible" do |ansible|
ansible.playbook = "master.playbook.yml"
#ansible.verbose = true
end
end
config.vm.define "node" do |master|
# master.vm.network "private_network", ip: "192.168.33.102"
master.vm.network "private_network", ip: "192.168.42.3"
master.vm.provision "ansible" do |ansible|
ansible.playbook = "node.playbook.yml"
#ansible.verbose = true
Expand Down
10 changes: 10 additions & 0 deletions launch_vagrant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
mkdir ${DIR}/tmp
cd ${DIR}/tmp

# Problem with old version of vagrant and ubuntu xenial
vagrant version | grep 1.9.5 > /dev/null
if [ $? != 0 ]; then
wget https://releases.hashicorp.com/vagrant/1.9.5/vagrant_1.9.5_x86_64.deb?_ga=2.231101533.319406025.1498673326-1645527223.1497308652
sudo apt remove vagrant
dpkg -i vagrant_1.9.5_x86_64.deb
fi



wget -O get_kube.sh https://get.k8s.io/

chmod 755 get_kube.sh
Expand Down
15 changes: 15 additions & 0 deletions master.playbook.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
---
- hosts: master
become_method: sudo
gather_facts: False

pre_tasks:
- raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
become: true
- setup:

tasks:
- name: Installing rkt
become: true
apt:
deb: https://github.com/rkt/rkt/releases/download/v1.27.0/rkt_1.27.0-1_amd64.deb
update_cache: yes
- name: Running rkt metadata services
become: true
raw: systemd-run rkt metadata-service
- name: Installing kubernetes binaries
become: true
unarchive:
Expand Down
17 changes: 8 additions & 9 deletions node.playbook.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
---
- hosts: node
become_method: sudo
gather_facts: False

pre_tasks:
- raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
become: true
- setup:

tasks:
- name: Installing rkt
become: true
apt:
deb: https://github.com/rkt/rkt/releases/download/v1.27.0/rkt_1.27.0-1_amd64.deb
update_cache: yes
- name: Installing systemd
become: true
apt:
deb: systemd
- name: Running rkt metadata services
become: true
service:
enabled: yes
name: rkt
state: started
arguments: metadata-service
raw: systemd-run rkt metadata-service
- name: Installing kubernetes binaries
become: true
unarchive:
Expand Down

0 comments on commit 85c3cb1

Please sign in to comment.