- Ubuntu Server 12.04 LTS (x86_64) HVM イメージでインスタンスを作成
- root ユーザとしてログインし、 run_root.sh を実行
- ubuntu ユーザとしてログインし、run_user.sh を実行
- インスタンスをシャットダウン
- EBS のスナップショットを作成
- 作成されたスナップショットに対して AMI を作成
Last active
February 15, 2016 11:17
-
-
Save kmaehashi/e30520f38d2b74534a2d to your computer and use it in GitHub Desktop.
Jubatus AMI の作成手順
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -uex | |
# Configure Jubatus repository | |
echo 'deb http://download.jubat.us/apt binary/' > /etc/apt/sources.list.d/jubatus.list | |
APT_GET='/usr/bin/apt-get -y --force-yes' | |
# Update package index | |
${APT_GET} update | |
${APT_GET} upgrade | |
# Install development packages | |
${APT_GET} install build-essential git | |
# Install Jubatus Server | |
${APT_GET} install jubatus | |
# Install Jubatus Python Client | |
${APT_GET} install python-dev python-pip | |
pip install jubatus | |
# Install Jubatus Ruby Client | |
${APT_GET} install ruby1.9.1 ruby1.9.1-dev | |
gem install jubatus --no-rdoc --no-ri | |
# Install Jubatus Java Client | |
${APT_GET} install openjdk-7-jdk maven2 | |
# Install Jubatus Build Requirements | |
${APT_GET} install liblog4cxx10-dev pkg-config | |
# Install OPAM (to build jenerator) | |
${APT_GET} install m4 unzip | |
pushd /tmp | |
/usr/bin/wget https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh | |
/bin/sh ./opam_installer.sh /usr/local/bin | |
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -uex | |
cat << '_EOF_' >> ~/.bash_profile | |
# Jubatus | |
source /opt/jubatus/profile | |
# OPAM (for Jubatus jenerator) | |
export PATH="/usr/local/bin:${PATH}" | |
eval `/usr/local/bin/opam config env` | |
. ~/.opam/opam-init/init.sh | |
_EOF_ | |
soruce ~/.bash_profile | |
opam --yes init --comp 4.02.1 | |
opam --yes install ounit extlib omake ppx_deriving | |
# ------ Repositories ------- | |
pushd ~ | |
git clone https://github.com/jubatus/jubatus.git | |
popd | |
pushd ~/jubatus/tools/jenerator | |
omake | |
sudo cp src/jenerator.opt /usr/local/bin/jenerator | |
popd | |
pushd ~ | |
git clone https://github.com/jubatus/jubatus-example.git | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO: apt-get に
-y
をつける