docker_practice/coreos/quickstart.md

86 lines
2.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# CoreOS
使 Vagrant
*Vagrant 使*
CoreOS CoreOS
##
Virtualbox, Vagrant git
##
CoreOS
```bash
$ git clone https://github.com/coreos/coreos-vagrant
$ cd coreos-vagrant
$ cp user-data.sample user-data
```
token
```bash
$ curl https://discovery.etcd.io/new
```
token user-data
```yml
#cloud-config
coreos:
etcd:
discovery: https://discovery.etcd.io/<token>
```
##
CoreOS Vagrantfile
config.rb.sample .
```bash
cp config.rb.sample config.rb
```
num_instances3
```bash
vagrant up
=>
Bringing machine 'core-01' up with 'virtualbox' provider...
Bringing machine 'core-02' up with 'virtualbox' provider...
Bringing machine 'core-03' up with 'virtualbox' provider...
==> core-01: Box 'coreos-alpha' could not be found. Attempting to find and install...
core-01: Box Provider: virtualbox
core-01: Box Version: >= 0
==> core-01: Adding box 'coreos-alpha' (v0) for provider: virtualbox
core-01: Downloading: http://storage.core-os.net/coreos/amd64-usr/alpha/coreos_production_vagrant.box
core-01: Progress: 46% (Rate: 6105k/s, Estimated time remaining: 0:00:16)
```
ssh
```bash
ssh-add ~/.vagrant.d/insecure_private_key
```
```bash
vagrant ssh core-01 -- -A
```