2018年1月16日火曜日

VagrantでTalend Open Studio for Data Integration、Xfce Desktop環境、XRDPがインストールされた仮想マシン(CentOS7.4)を構築する

TalendはオープンソースのETLソフトウェアです。

仮想マシンの構築方法

以下のVagrantfileを使用して、Talend Open Studio for Data Integration、XfceDesktop環境、XRDPをインストールした仮想マシン(CentOS7.4)を構築できます。
XRDPがインストールされているので、Windowsのリモートデスクトップで接続することができます。ユーザ名はVagrant、パスワードもVagrantでログオンできます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/centos-7.4"
  config.vm.hostname = "co74xfcetosdi"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "co74xfcetosdi"
     vbox.gui = true
     vbox.cpus = 4
     vbox.memory = 4096
     vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
  end
  config.vm.network "public_network", ip: "192.168.1.116", :netmask => "255.255.255.0"
  config.vm.provision "shell", inline: <<-SHELL
localectl set-locale LANG=ja_JP.UTF-8
yum install -y epel-release
yum check-update
yum -y update

yum -y groupinstall yum groupinstall "X Window System"  Xfce "Input Methods"
yum -y install vlgothic-*  ipa-gothic-fonts ipa-mincho-fonts ipa-pgothic-fonts ipa-pmincho-fonts xrdp

cat << EOF >> /home/vagrant/.Xclients
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
ibus-daemon -drx
exec /usr/bin/xfce4-session
EOF
chmod +x /home/vagrant/.Xclients
chown vagrant:vagrant /home/vagrant/.Xclients

# 不要なダイアログを表示されないようにする
sudo sh -c "echo 'X-GNOME-Autostart-enabled=false' >> /etc/xdg/autostart/gnome-welcome-tour.desktop"
sudo sh -c "echo 'X-GNOME-Autostart-enabled=false' >> /etc/xdg/autostart/gnome-software-service.desktop"
sudo sh -c "echo 'X-GNOME-Autostart-enabled=false' >> /etc/xdg/autostart/gnome-settings-daemon.desktop"
sudo systemctl disable initial-setup-graphical.service
sudo systemctl disable initial-setup-text.service

systemctl set-default graphical.target

systemctl enable xrdp.service
systemctl start xrdp.service

# javaをインストール
yum -y install java-1.8.0-openjdk

# Talend Open Studioのインストール
yum -y install unzip firefox
wget 'https://sourceforge.net/projects/talend-studio/files/Talend%20Open%20Studio/6.4.1/TOS_DI-20170623_1246-V6.4.1.zip';
unzip TOS_DI-20170623_1246-V6.4.1.zip
mv TOS_DI-20170623_1246-V6.4.1 /opt/tosdi

# Talend Open Studio for Data Integrationのショートカットを作成
cat << EOF > /usr/share/applications/tosdi.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/tosdi/TOS_DI-linux-gtk-x86_64
Name=Talend Open Studio for Data Integration
Categories=Utility;Development;
EOF


telinit 5
SHELL
end

〇Talend Open Studio for Data Integrationの画面


関連情報

・Talendに関する他の記事はこちらを参照してください。

0 件のコメント:

コメントを投稿