skia2/experimental/webtry/setup/webtry_setup.sh
commit-bot@chromium.org 70222fadf0 Run Squid as a reverse caching proxy on port 80 and proxy the requests
to the server running on port 8000.

BUG=skia:
R=mtklein@google.com

Author: jcgregorio@google.com

Review URL: https://codereview.chromium.org/261023002

git-svn-id: http://skia.googlecode.com/svn/trunk@14515 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-01 20:10:03 +00:00

34 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
#
# Script to setup a GCE instance to run the webtry server.
# For full instructions see the README file.
sudo apt-get install schroot debootstrap monit squid3
sudo apt-get install g++ libfreetype6 libfreetype6-dev libpng12-0 libpng12-dev libglu1-mesa-dev mesa-common-dev freeglut3-dev libgif-dev libfontconfig libfontconfig-dev
echo "Adding the webtry user account"
sudo adduser webtry
sudo cp continue_install /home/webtry/continue_install
sudo chmod 766 /home/webtry/continue_install
sudo chown webtry:webtry /home/webtry/continue_install
sudo su webtry -c /home/webtry/continue_install
sudo mkdir -p /srv/chroot/webtry
sudo cp /home/webtry/skia/experimental/webtry/sys/webtry_schroot /etc/schroot/chroot.d/webtry
sudo mkdir /srv/chroot/webtry/etc
sudo mkdir /srv/chroot/webtry/bin
sudo cp /bin/sh /srv/chroot/webtry/bin/sh
# Copy all the dependent libraries into the schroot.
sudo cp --parents `ldd /home/webtry/skia/out/Debug/webtry | cut -d " " -f 3` /srv/chroot/webtry
sudo cp --parents `ldd /bin/sh | cut -d " " -f 3` /srv/chroot/webtry
sudo cp /home/webtry/skia/experimental/webtry/sys/webtry_init /etc/init.d/webtry
sudo cp /home/webtry/skia/experimental/webtry/sys/webtry_monit /etc/monit/conf.d/webtry
sudo cp /home/webtry/skia/experimental/webtry/sys/webtry_squid /etc/squid3/squid.conf
sudo chmod 744 /etc/init.d/webtry
# Confirm that monit is happy.
sudo monit -t