CoreOS の安定した AMI とカスタムの cloud-init 構成を使用して EC2 インスタンスをセットアップしようとしていますが、いくつか問題があります。
#cloud-config
coreos:
etcd:
discovery: https://discovery.etcd.io/5996f1b49fd642c5d1bc2f62cbff2fba
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
write_files:
- path: /etc/fleet/fleet.conf
content: |
public_ip="$private_ipv4"
metadata="elastic_ip=true,public_ip=$public_ipv4"
上記の cloud-config は正常に動作しますが、以下の cloud-config を使用すると
#cloud-config
coreos:
etcd:
discovery: https://discovery.etcd.io/5996f1b49fd642c5d1bc2f62cbff2fba
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
users:
- name: core
coreos-ssh-import-github: oba11
write_files:
- path: /etc/fleet/fleet.conf
content: |
public_ip="$private_ipv4"
metadata="elastic_ip=true,public_ip=$public_ipv4"
また
#cloud-config
coreos:
etcd:
discovery: https://discovery.etcd.io/5996f1b49fd642c5d1bc2f62cbff2fba
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
users:
- name: oba11
groups:
- sudo
- docker
coreos-ssh-import-github: oba11
write_files:
- path: /etc/fleet/fleet.conf
content: |
public_ip="$private_ipv4"
metadata="elastic_ip=true,public_ip=$public_ipv4"
私のawsキーペアまたは個人キーを使用して「コア」ユーザーとしてcoreosインスタンスに再度SSHで接続できず、個人キーを使用してユーザー「oba11」を作成しました。アルファ AMI も試しましたが、同じ問題です。私が何か間違ったことをしているかどうかはわかりません。
助けてくれてありがとう。