さくらのクラウドでCore OSのインスタンスを起動してみる
起動して接続するまで
起動について
さくらのクラウドに既に存在するディスクイメージを使って起動しました。
画面に従って操作すればできるので、特に、はまることはなく。
注意点としては、画面に表示されるOSのユーザを見落とさないようにすることですね。
最初見落としていて、ちょっと焦りました。
なぜか、なかなかSSHで繋がらない
なぜかSSHで、CoreOSに接続できなくて苦しみました。
検索しても、誰もそんなところで躓いてないのに。
試行錯誤したところ、なぜか「Poderosa 4.3.8b」では接続出来ず、「PuTTY 0.63」だと接続できること気づきました。
別にさくらのクラウド上の「Ubuntu Server 14.04 LTS」だと「Poderosa 4.3.8b」で繋がるのにな……。
割と腑に落ちませんが、この原因を解明しようとするとそれだけで時間が過ぎていくため、気にしないことにします。
rootになる方法
「su」ではだめで「sudo su -」とする必要がありました。まあ、そういうものなのでしょう。
バージョンとか
core@core01 ~ $ cat /etc/os-release NAME=CoreOS ID=coreos VERSION=367.1.0 VERSION_ID=367.1.0 BUILD_ID= PRETTY_NAME="CoreOS 367.1.0" ANSI_COLOR="1;32" HOME_URL="https://coreos.com/" BUG_REPORT_URL="https://github.com/coreos/bugs/issues"
起動しているサービス
core@core01 ~ $ systemctl list-units --type=service UNIT LOAD ACTIVE SUB DESCRIPTION dbus.service loaded active running D-Bus System Message Bus docker.service loaded active running Docker Application Container Engine getty@tty1.service loaded active running Getty on tty1 kmod-static-nodes.service loaded active exited Create list of required static device nodes for the current kernel locksmithd.service loaded active running Cluster reboot manager ntpd.service loaded active running Network Time Service serial-getty@ttyS0.service loaded active running Serial Getty on ttyS0 sshd-keygen.service loaded active exited Generate sshd host keys sshd@0-133.242.233.9:22-106.167.157.208:65149.service loaded active running OpenSSH per-connection server daemon (106.167.157.208:65149) system-cloudinit@usr-share-oem-cloud\x2dconfig.yml.service loaded active exited Load cloud-config from /usr/share/oem/cloud-config.yml systemd-hostnamed.service loaded active running Hostname Service systemd-journald.service loaded active running Journal Service systemd-logind.service loaded active running Login Service systemd-networkd.service loaded active running Network Service systemd-random-seed.service loaded active exited Load/Save Random Seed systemd-sysctl.service loaded active exited Apply Kernel Variables systemd-tmpfiles-setup-dev.service loaded active exited Create Static Device Nodes in /dev systemd-tmpfiles-setup.service loaded active exited Create Volatile Files and Directories systemd-udev-settle.service loaded active exited udev Wait for Complete Device Initialization systemd-udev-trigger.service loaded active exited udev Coldplug all Devices systemd-udevd.service loaded active running udev Kernel Device Manager systemd-update-utmp.service loaded active exited Update UTMP about System Boot/Shutdown systemd-user-sessions.service loaded active exited Permit User Sessions systemd-vconsole-setup.service loaded active exited Setup Virtual Console timezone.service loaded active exited timezone update-engine.service loaded active running Update Engine ???er-configdrive.service loaded failed failed Load cloud-config from /media/configdrive LOAD = Reflects whether the unit definition was properly loaded. ACTIVE = The high-level unit activation state, i.e. generalization of SUB. SUB = The low-level unit activation state, values depend on unit type. 27 loaded units listed. Pass --all to see loaded but inactive units, too. To show all installed unit files use 'systemctl list-unit-files'.
起動直後のディスク使用量
dfで確認してみると、以下のような感じ。
core@coreos-1 ~ $ df -T -h Filesystem Type Size Used Avail Use% Mounted on rootfs rootfs 18G 16M 18G 1% / devtmpfs devtmpfs 489M 0 489M 0% /dev tmpfs tmpfs 500M 0 500M 0% /dev/shm tmpfs tmpfs 500M 224K 499M 1% /run tmpfs tmpfs 500M 0 500M 0% /sys/fs/cgroup /dev/vda9 btrfs 18G 16M 18G 1% / /dev/vda3 ext4 1008M 288M 670M 31% /usr tmpfs tmpfs 500M 0 500M 0% /tmp tmpfs tmpfs 500M 0 500M 0% /media /dev/vda6 ext4 108M 56K 99M 1% /usr/share/oem
使用中のパーティション
core@core01 ~ $ findmnt -n --raw --output=source --target=/usr /dev/vda3
起動直後のメモリの使用状況
freeで確認してみると、以下のような感じ。
core@core0s-1 ~ $ free -k total used free shared buffers cached Mem: 1022240 138748 883492 0 3856 83504 -/+ buffers/cache: 51388 970852 Swap: 0 0 0 core@core0s-1 ~ $
CoreOS、噂通りの省メモリっぷり。