Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: experimental/webtry/setup/webtry_setup.sh

Issue 619943002: complete overhaul of webtry work partition between jail and host (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Replace missing pre-build of jpeg, etc1, flags Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « experimental/webtry/setup/setup_jail.sh ('k') | experimental/webtry/sys/webtry_schroot » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # Script to setup a GCE instance to run the webtry server. 3 # Script to setup a GCE instance to run the webtry server.
4 # For full instructions see the README file. 4 # For full instructions see the README file.
5 sudo apt-get install schroot debootstrap monit squid3 5 sudo apt-get install schroot debootstrap monit squid3
6 sudo apt-get install g++ libfreetype6 libfreetype6-dev libpng12-0 libpng12-dev l ibglu1-mesa-dev mesa-common-dev freeglut3-dev libgif-dev libfontconfig libfontco nfig-dev 6
7 # although aufs is being replaced by overlayfs, it's not clear
8 # to me if overlayfs is completely supported by schroot yet.
9 sudo apt-get install aufs-tools
7 10
8 echo "Adding the webtry user account" 11 echo "Adding the webtry user account"
9 sudo adduser webtry 12 sudo adduser webtry
10 13
11 sudo cp continue_install /home/webtry/continue_install 14 sudo mkdir /home/webtry/cache
12 sudo chmod 766 /home/webtry/continue_install 15 sudo mkdir /home/webtry/cache/src
13 sudo chown webtry:webtry /home/webtry/continue_install 16 sudo mkdir /home/webtry/inout
14 sudo su webtry -c /home/webtry/continue_install 17 sudo chmod 777 /home/webtry/inout
18 sudo chmod 777 /home/webtry/cache
19 sudo chmod 777 /home/webtry/cache/src
15 20
16 sudo mkdir -p /srv/chroot/webtry 21 sudo cp ../sys/webtry_schroot /etc/schroot/chroot.d/webtry
17 sudo cp /home/webtry/skia/experimental/webtry/sys/webtry_schroot /etc/schroot/ch root.d/webtry
18 22
19 sudo mkdir /srv/chroot/webtry/etc 23 CHROOT_JAIL=/srv/chroot/webtry_gyp
20 sudo mkdir /srv/chroot/webtry/bin 24 # Build the chroot environment
21 sudo cp /bin/sh /srv/chroot/webtry/bin/sh 25 if [ ! -d ${CHROOT_JAIL} ]; then
26 » sudo mkdir -p ${CHROOT_JAIL}
22 27
23 # Copy all the dependent libraries into the schroot. 28 » sudo debootstrap --variant=minbase wheezy ${CHROOT_JAIL}
24 sudo cp --parents `ldd /home/webtry/skia/out/Debug/webtry | cut -d " " -f 3` /sr v/chroot/webtry 29 » sudo cp setup_jail.sh ${CHROOT_JAIL}/bin
25 sudo cp --parents `ldd /bin/sh | cut -d " " -f 3` /srv/chroot/webtry 30 » sudo chmod 755 ${CHROOT_JAIL}/bin/setup_jail.sh
31 » sudo chroot ${CHROOT_JAIL} /bin/setup_jail.sh
32 » sudo echo "none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0" >> ${CHROOT_J AIL}/etc/fstab
33 fi
26 34
27 sudo cp /home/webtry/skia/experimental/webtry/sys/webtry_init /etc/init.d/webtry 35 # the continue_install script will fetch the latest versions of
28 sudo cp /home/webtry/skia/experimental/webtry/sys/webtry_monit /etc/monit/conf.d /webtry 36 # skia and depot_tools. We split up the installation process into
29 sudo cp /home/webtry/skia/experimental/webtry/sys/webtry_squid /etc/squid3/squid .conf 37 # two pieces like this so that the continue_install script can
38 # be run independently of this one to fetch and build the latest skia.
39
40 ./continue_install.sh
41
42 sudo cp ../sys/webtry_init /etc/init.d/webtry
43 sudo cp ../sys/webtry_monit /etc/monit/conf.d/webtry
44 sudo cp ../sys/webtry_squid /etc/squid3/squid.conf
30 sudo chmod 744 /etc/init.d/webtry 45 sudo chmod 744 /etc/init.d/webtry
31 46
32 # Confirm that monit is happy. 47 # Confirm that monit is happy.
48
33 sudo monit -t 49 sudo monit -t
34 sudo monit reload 50 sudo monit reload
OLDNEW
« no previous file with comments | « experimental/webtry/setup/setup_jail.sh ('k') | experimental/webtry/sys/webtry_schroot » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698