オンプレミス環境でのDevOps
仕事に直結するメモを記載しておく
Vagrant導入
インストール
導入を確認
vagrant -v
CentOSををボックスに追加
vagrant box add centOS7 https://github.com/tommy-muehle/puppet-vagrant-boxes/releases/download/1.1.0/centos-7.0-x86_64.box
vagrant box list
追加したボックスを確認
適当なフォルダを作成
C:¥Users¥user>md centOS63_32
C:¥Users¥user>cd centOS63_32
vagrant init {name}
C:¥Users¥user¥centOS63_32>vagrant init centOS63_32
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network :private_network, ip: "192.168.33.10"
vagrant up
言語設定を日本語(又は英語)に
/etc/sysconfig/i18n のファイルの「LANG」を以下の通りに修正し更新
# 日本語の場合(恐ろしく文字化けしてしまったので英語の方がオススメです。)
LANG="ja_JP.eucJP"
# 英語の場合
LANG="en_US.UTF-8"
この後、 reboot
で適応。
localectl set-locale LANG=en_US.UTF-8
vagrant snapshot take initOS
yum -y install docker-io
curl -L https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
Peer reports incompatible or unsupported protocol version.
yum install openssl-devel libmetalink-devel libssh2-devel c-ares-devel lbzip2
wget https://curl.haxx.se/download/curl-7.61.0.tar.gz
tar xfvz curl-7.61.0.tar.gz
cd curl-7.61.0
./configure --enable-libcurl-option
make
sudo make install