| OLD | NEW |
| 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 | 6 |
| 7 # although aufs is being replaced by overlayfs, it's not clear | 7 # although aufs is being replaced by overlayfs, it's not clear |
| 8 # to me if overlayfs is completely supported by schroot yet. | 8 # to me if overlayfs is completely supported by schroot yet. |
| 9 sudo apt-get install aufs-tools | 9 sudo apt-get install aufs-tools |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 CHROOT_JAIL=/srv/chroot/webtry_gyp | 23 CHROOT_JAIL=/srv/chroot/webtry_gyp |
| 24 # Build the chroot environment | 24 # Build the chroot environment |
| 25 if [ ! -d ${CHROOT_JAIL} ]; then | 25 if [ ! -d ${CHROOT_JAIL} ]; then |
| 26 sudo mkdir -p ${CHROOT_JAIL} | 26 sudo mkdir -p ${CHROOT_JAIL} |
| 27 | 27 |
| 28 sudo debootstrap --variant=minbase wheezy ${CHROOT_JAIL} | 28 sudo debootstrap --variant=minbase wheezy ${CHROOT_JAIL} |
| 29 sudo cp setup_jail.sh ${CHROOT_JAIL}/bin | 29 sudo cp setup_jail.sh ${CHROOT_JAIL}/bin |
| 30 sudo chmod 755 ${CHROOT_JAIL}/bin/setup_jail.sh | 30 sudo chmod 755 ${CHROOT_JAIL}/bin/setup_jail.sh |
| 31 sudo chroot ${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 | 32 » sudo sh -c "echo 'none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0' >> ${C
HROOT_JAIL}/etc/fstab" |
| 33 fi | 33 fi |
| 34 | 34 |
| 35 # the continue_install script will fetch the latest versions of | 35 # the continue_install script will fetch the latest versions of |
| 36 # skia and depot_tools. We split up the installation process into | 36 # skia and depot_tools. We split up the installation process into |
| 37 # two pieces like this so that the continue_install script can | 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. | 38 # be run independently of this one to fetch and build the latest skia. |
| 39 | 39 |
| 40 ./continue_install.sh | 40 ./continue_install.sh |
| 41 | 41 |
| 42 sudo cp ../sys/webtry_init /etc/init.d/webtry | 42 sudo cp ../sys/webtry_init /etc/init.d/webtry |
| 43 sudo cp ../sys/webtry_monit /etc/monit/conf.d/webtry | 43 sudo cp ../sys/webtry_monit /etc/monit/conf.d/webtry |
| 44 sudo cp ../sys/webtry_squid /etc/squid3/squid.conf | 44 sudo cp ../sys/webtry_squid /etc/squid3/squid.conf |
| 45 sudo chmod 744 /etc/init.d/webtry | 45 sudo chmod 744 /etc/init.d/webtry |
| 46 | 46 |
| 47 # Confirm that monit is happy. | 47 # Confirm that monit is happy. |
| 48 | 48 |
| 49 sudo monit -t | 49 sudo monit -t |
| 50 sudo monit reload | 50 sudo monit reload |
| OLD | NEW |