仮想マシン構築後、ブラウザからhttp://192.168.55.103:8080にアクセスします。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# debian stretch/9.2
config.vm.box = "bento/debian-9.2"
config.vm.hostname = "db92zeppelin"
config.vm.provider :virtualbox do |vbox|
vbox.name = "db92zeppelin"
vbox.cpus = 2
vbox.memory = 2048
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.103", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.103", :netmask => "255.255.255.0"
config.vm.provision "shell", inline: <<-SHELL
# update packages
apt-get update
#DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
locale-gen ja_JP.UTF-8
localectl set-locale LANG=ja_JP.UTF-8
apt-get -y install unzip
# install java
apt-get -y install default-jdk
# install Apache Zeppelin
wget http://ftp.riken.jp/net/apache/zeppelin/zeppelin-0.7.3/zeppelin-0.7.3-bin-all.tgz
tar xvfz zeppelin-0.7.3-bin-all.tgz
mv zeppelin-0.7.3-bin-all /opt/zeppelin
cat << EOF > /etc/systemd/system/zeppelin.service
[Unit]
Description=Apache Zeppelin
[Service]
Type=forking
ExecStart=/opt/zeppelin/bin/zeppelin-daemon.sh start
ExecStop=/opt/zeppelin/bin/zeppelin-daemon.sh stop
WorkingDirectory=/opt/zeppelin
KillMode=process
PrivateTmp=true
[Install]
WantedBy=multi-user.target
EOF
systemctl enable zeppelin.service
systemctl start zeppelin.service
echo 'access http://192.168.55.103:8080'
SHELL
end
○関連情報
・Apache Zeppelinに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿