10
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Vagrant(Virtualbox) 上で CoreOS を動かす

Posted at

必要なもの

  • VirtualBox 4.3.10 以上
  • Vagrant 1.6.3

セットアップ

$ git clone https://github.com/coreos/coreos-vagrant.git && cd coreos-vagrant
$ vagrant up

ログイン

$ vagrant ssh core-01

クラスタを作成

$ cp user-data.sample user-data

https://discovery.etcd.io/new を curl して etcd の discovery token を取得して discovery の値にセット

@@ -4,7 +4,7 @@ coreos:
   etcd:
     # generate a new token for each unique cluster from https://discovery.etcd.io/new
     # WARNING: replace each time you 'vagrant destroy'
-    #discovery: https://discovery.etcd.io/<token>
+    discovery: https://discovery.etcd.io/xxxxxxxxxxxxxx
     addr: $public_ipv4:4001
     peer-addr: $public_ipv4:7001
   fleet:
$ cp config.rb.sample config.rb
@@ -27,7 +27,7 @@
 # after the equals sign..

 # Size of the CoreOS cluster created by Vagrant
-#$num_instances=1
+$num_instances=3

これで vagrant up すると 3 台の CoreOS マシンからなるクラスタが起動する。

$ vagrant up
# 既に起動している場合は `vagrant reload --provision` 
$ vagrant ssh core-01

3 台のクラスタが出来ている事が確認できる

core@core-01 ~ $ fleetctl list-machines
MACHINE		IP		METADATA
34db3563...	172.17.8.103	-
4755ce5a...	172.17.8.102	-
a7d9e8b9...	172.17.8.101	-

REF

10
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?