ダウンロード
-
http://cloud.centos.org/centos/7/images/
- CentOS-7-x86_64-GenericCloud-1907.qcow2
8GBということがわかる
$ qemu-img info CentOS-7-x86_64-GenericCloud-1907.qcow2
image: CentOS-7-x86_64-GenericCloud-1907.qcow2
file format: qcow2
virtual size: 8.0G (8589934592 bytes)
disk size: 887M
cluster_size: 65536
Format specific information:
compat: 0.10
refcount bits: 16
seed.iso
- meta-data
meta-data
local-hostname: db1.local
network-interfaces: |
auto eth0
iface eth0 inet static
address 192.168.100.62
netmask 255.255.255.0
gateway 192.168.100.1
dns-nameservers 8.8.8.8 8.8.4.4
#
auto eth1
iface eth1 inet static
address 10.0.1.62
netmask 255.255.255.0
- user-data
user-data
# cloud-config
# user: centos
password: plain-password-1
chpasswd: { expire: False }
ssh_pwauth: True
timezone: Asia/Tokyo
locale: ja_JP.utf8
runcmd:
# SELinux
- setenforce 0
- sed -ie 's/^\SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
- reboot
seed.isoの作成
genisoimage -output seed.iso \
-volid cidata -joliet -rock \
user-data meta-data
起動
seed.iso
を接続して起動。
-
/var/lib/cloud/instance/
内に、使用された設定ファイルが保存されている。
初期設定
ansible2.8を入れてみる
yum install -y epel-release.noarch
yum install -y ansible.noarch