项目作者: hyeonsangjeon

项目描述 :
vagrant rancher2.0 kubernetes orchestration tool example
高级语言: Shell
项目地址: git://github.com/hyeonsangjeon/vagrant-rancher2.0.git
创建时间: 2018-10-19T08:33:19Z
项目社区:https://github.com/hyeonsangjeon/vagrant-rancher2.0

开源协议:

下载


vagrant-rancher2.0

This example shows a rancher2.0 server and kubernetes worker servers based on a docker environment on top of a VM-based vagrant local(OSX/Windows) environment..
Rancher[1] is an well known attractive tool for orchestrating containers in a docker environment.
Rancher ver1.6 uses swarm-based cattle engine, kubernetes, mesos, etc., while ver2.0 supports only kubernetes engine and is under full reorganization.
There is a way to develop a docker application locally by configuring a container environment pool based on the vagrant VM.[2]

if use OSX and use rb, this is better example.[3].

Design

screenshot1

Prerequisites Install

Install Vagrant and Virtual Box in your local(OSX/Windows) environment.

1. Vagrant

Vagrant is required as this is used to provision the machine based on the Vagrantfile.

2. Virtual Box

The virtual machines that Vagrant provisions need to be provisioned to VirtualBox.

3. Docker

4.Source Pull

  1. git clone https://github.com/hyeonsangjeon/vagrant-rancher2.0.git

5. Deploying vagrant VM rancher server

  1. cd vagrant-rancher2.0
  2. vagrant up rancher

6. Deploying vagrant VM kubernetes worker node server

  1. cd vagrant-rancher2.0
  2. vagrant up vmhost01
  3. vagrant up vmhost01 && vmhost02

vm server information are as follows,

info Description ssh
Rancher server https://192.200.10.100 22
K8S Worker servers 192.200.10.1x 22

vagrant command,

info Description
vagrant up This command creates and configures guest machines according to your Vagrantfile.[4]
vagrant destroy This command stops the running machine Vagrant is managing and destroys all resources that were created during the machine creation process.
vagrant ssh This will SSH into a running Vagrant machine and give you access to a shell.
If want into vagrant server terminal,
  1. cd vagrant-rancher2.0
  2. vagrant ssh rancher
  3. vagrant ssh vmhost01
  4. vagrant ssh vmhost0x

How to use this vagrant rancher example

how_to_use shows simple example rancher2.0 ui

Reference