redo readme

This commit is contained in:
Christine Dodrill 2015-08-21 13:09:35 -07:00
parent a0f84fd8fe
commit 89a8593cc6
1 changed files with 60 additions and 55 deletions

115
README.md
View File

@ -1,76 +1,81 @@
# RancherOS Vagrant
Rancher Swarm
=============
Quickly checkout RancherOS using Vagrant/Virtualbox.
A simple tutorial on how to make a Docker swarm cluster on top of Vagrant.
For this you need at least 3 GB of ram free on your computer. This might work
with less if you change the ram levels, but just have at least 3 GB of ram free
just in case.
## Getting started
1.) Install dependencies
How to cluster
--------------
* Virtualbox (Tested with 4.3.22)
* Vagrant (Tested with 1.7.2)
First, you need the machines to cluster:
2.) Clone this project
```
git clone https://github.com/rancherio/os-vagrant.git
cd os-vagrant
```console
$ vagrant up
```
3.) Up and Running
Now, you need a docker swarm discovery token:
```
vagrant up
vagrant ssh
```console
$ docker run --rm swarm create
fd243153d366c4fc088de73681b884ad
```
Start running Docker like you usually would!
First you'll need to get the first runner online and waiting in the cluster.
## Enable Rsync folder sync
If you want to sync the current working directory via rsync edit the Vagrantfile and change this line:
<pre>$rsync_folder_disabled = true</pre>
to
<pre>
$rsync_folder_disabled = <b>false</b>
</pre>
## Upgrading RancherOS Versions
To upgrade the Vagrant box, refresh this repository from master.
```
vagrant destroy
vagrant box remove rancheros
vagrant up
```console
$ vagrant ssh runner-01
runner-01$ sudo ros c set user_docker.args '[docker, -d, -s, overlay, -G, docker, -H, unix:///var/run/docker.sock, -H, tcp://0.0.0.0:2375]'
runner-01$ sudo system-docker restart docker
```
Now have that machine join the cluster:
### Customizing and configuring
```console
runner-01$ docker run --name swarm -d swarm join --addr=172.19.8.101:2375 token://fd243153d366c4fc088de73681b884ad
```
Repeat this for the other two nodes.
To get a feel for how things work under the hood checkout the
[RancherOS Repo](https://github.com/rancherio/os) for details.
Now connect to the management vm:
## Contact
For bugs, questions, comments, corrections, suggestions, etc., open an issue in
[rancher/os](//github.com/rancher/os/issues) with a title starting with `[os-vagrant] `.
```console
$ vagrant ssh manager
manager$ docker run -d -p 2375:2375 swarm manage token://fd243153d366c4fc088de73681b884ad
```
Or just [click here](//github.com/rancher/os/issues/new?title=%5Bos-vagrant%5D%20) to create a new issue.
You now have a working cluster. Now to prove it:
```console
$ docker -H tcp://172.19.8.104:2375 info
Containers: 3
Images: 3
Role: primary
Strategy: spread
Filters: affinity, health, constraint, port, dependency
Nodes: 3
runner-01: 172.19.8.101:2375
└ Containers: 1
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.025 GiB
└ Labels: executiondriver=native-0.2, kernelversion=3.19.8-ckt1-rancher, operatingsystem=<unknown>, storagedriver=overlay
runner-02: 172.19.8.102:2375
└ Containers: 1
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.025 GiB
└ Labels: executiondriver=native-0.2, kernelversion=3.19.8-ckt1-rancher, operatingsystem=<unknown>, storagedriver=overlay
runner-03: 172.19.8.103:2375
└ Containers: 1
└ Reserved CPUs: 0 / 1
└ Reserved Memory: 0 B / 1.025 GiB
└ Labels: executiondriver=native-0.2, kernelversion=3.19.8-ckt1-rancher, operatingsystem=<unknown>, storagedriver=overlay
CPUs: 3
Total Memory: 3.075 GiB
Name: 66d026cc952c
```
# License
Copyright (c) 2014-2015 [Rancher Labs, Inc.](http://rancher.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You may need to unset `DOCKER_TLS_VERIFY` depending on your configuration.
Now you have a working docker swarm!