FastHandleをやってみている(1)

IaC [Infrastructure as Code] への取り組みとして、FastHandle を使ってみようと思ってさわりはじめている。

FastHandle - IT Operations Examples [FastHandle - IT Operations Examples]

複数インスタンス環境

VagrantCentOS(7)を1+4台とubuntu(16.04)を2台、上げてみた。
休日で他のことほぼやってないからかなと思うが、今のところそんなに重くはない。

github.com

インストール前段階

ガイドに従って設定を。
多少、自己流に調整している。
https://fasthandle.net/preparation/installing.html

fasthandle ユーザー追加

% vagrant ssh handle00  
[vagrant@handle00 ~]$ sudo su -

[root@handle00 ~]# useradd fasthandle
[root@handle00 ~]# echo 'fasthandle:fastpass' | chpasswd
[root@handle00 ~]# su - fasthandle
[fasthandle@handle00 ~]$

fasthandle ユーザー設定調整

[fasthandle@handle00 ~]$ cp -p ~/.bashrc ~/.bashrc.`date -d '1day ago' +%Y%m%d`
[fasthandle@handle00 ~]$ cat << @ >> ~/.bashrc
>
> # FastHandle env
> [ -f ~/fhhome/fh.env ] && source ~/fhhome/fh.env
>
>
> # history
> HISTSIZE=10000
> HISTFILESIZE=10000
> HISTTIMEFORMAT='%F %T %z '
> PROMPT_COMMAND="history -a"
>
> PS1="[\u@\h \w \t]\$ "   # -> あとで PS1="[\u@\h \w] に変更した
> @
[fasthandle@handle00 ~]$

[fasthandle@handle00 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/fasthandle/.ssh/id_rsa):
Created directory '/home/fasthandle/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/fasthandle/.ssh/id_rsa.
Your public key has been saved in /home/fasthandle/.ssh/id_rsa.pub.
・・・

[fasthandle@handle00 ~]$ vi ~/.ssh/config
[fasthandle@handle00 ~]$ cat ~/.ssh/config
# Don't listen yes/no.
host *
      # Ignore "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"
      StrictHostKeyChecking no
      UserKnownHostsFile=/dev/null
[fasthandle@handle00 ~]$
[fasthandle@handle00 ~]$ chmod 600 ~/.ssh/config
[fasthandle@handle00 ~]$ ls -la ~/.ssh/config
-rw-------. 1 fasthandle fasthandle 162 Apr 28 22:35 /home/fasthandle/.ssh/config
[fasthandle@handle00 ~]$