Skip to content

Extending the AppScale Tools to install on other distros

shatterednirvana edited this page Feb 23, 2013 · 2 revisions

The AppScale tools provide users with the ability to start, stop, and interact with their AppScale deployments from a command-line interface. To install the AppScale tools, users can download them (or fetch them via git), and then run bash appscale-tools/debian/appscale_install.sh. Currently, the AppScale tools are supported on the following distributions:

  • Ubuntu Lucid
  • Mac OS X 10.8 (Mountain Lion)

The list of supported distributions can be found by running ls appscale-tools/debian/appscale_install_*. Users looking to add support for the AppScale tools on a new distribution should follow this process:

  • Create a new file in appscale-tools/debian/ called appscale_install_<distro>, where <distro> is the result of running lsb_release -c -s on your machine (which gets the short name of your distribution).

  • Paste the following into it, replacing "distro" with the same distro name you used earlier:

#!/bin/bash

. debian/appscale_install_functions.sh

DESTDIR=$2
DIST=distro

case "$1" in
    tools)
        installappscaletools
        ;;
    all)
        # scratch install of appscale including post script.
        installappscaletools
        postinstallappscaletools
        keygen
        ;;
esac
  • In appscale_build.sh, this section assumes you're on a Debian-based system:
echo "Ubuntu ${DIST}"

# install runtime dependency
# for distro
PACKAGES=`find debian -regex ".*\/control\.${DIST}\$" -exec mawk -f debian/package-list.awk {} +`
apt-get install -y ${PACKAGES}
if [ $? -ne 0 ]; then
    echo "Fail to install depending packages for runtime."
    exit 1
fi

Use some bash-fu here to only do this on the Ubuntu distros, and on other distros, install whatever software dependencies that distro requires.

You should then be good to go! Run bash appscale-tools/debian/appscale_install.sh to test out that the whole process actually works, and send us a pull request for the new distro(s) you've added!

Hello World W3C 5.2 HTLM5

Clone this wiki locally