仮想マシンを構築後、http://192.168.55.116:8080/でダッシュボードにアクセスできます。
Vagratfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/centos-7.4"
config.vm.hostname = "co74rethinkdb"
config.vm.network :public_network, ip:"192.168.1.116"
config.vm.network "private_network", ip: "192.168.55.116", :netmask => "255.255.255.0"
config.vm.provider :virtualbox do |vbox|
vbox.name = "co74rethinkdb"
vbox.cpus = 4
vbox.memory = 4096
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.provision "shell", inline: <<-SHELL
wget http://download.rethinkdb.com/centos/7/`uname -m`/rethinkdb.repo -O /etc/yum.repos.d/rethinkdb.repo
yum update
yum -y install rethinkdb
cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf
mkdir -p /opt/rethinkdb
cd /opt/rethinkdb
rethinkdb create -d "rethinkdb_data"
chown -R rethinkdb:rethinkdb /opt/rethinkdb
cat << EOF > /etc/systemd/system/rethinkdb.service
[Unit]
Description=RethinkDB database server'
[Service]
User=rethinkdb
Group=rethinkdb
ExecStart=/usr/bin/rethinkdb serve --config-file /etc/rethinkdb/instances.d/instance1.conf --bind all
WorkingDirectory=/opt/rethinkdb
KillMode=process
PrivateTmp=true
[Install]
WantedBy=multi-user.target
EOF
systemctl enable rethinkdb.service
systemctl start rethinkdb.service
SHELL
end
RethinkDBのダッシュボード画面
○関連情報
・RethinkDBに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿