VPC は既に用意してあるとして書く。
セキュリティグループの作成
CoreOS 用セキュリティグループを作る
etcd で利用するので 4001 と 7001 は同一グループからのアクセスを許可しておく
インスタンスの起動
ここから Channel を選択すると、AWS Management Console が開く
cloud-config
Step 3: Configure Instace Details のところで、Advanced Details にて cloud config の設定をする
curl -s https://discovery.etcd.io/new
して etcd の token を取得する
# cloud-config
coreos:
etcd:
# generate a new token for each unique cluster from https://discovery.etcd.io/new
discovery: https://discovery.etcd.io/<token>
# multi-region and multi-cloud deployments need to use $public_ipv4
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
docker の image がストレージ使うので多めにしておくと良い
ssh -i <key> core@XXX.XXX.XXX.XXX