Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installs Suitable with Mitogen using Python 2.7 for Testing
#!/usr/bin/env bash
path="$1"
set -eu
if [ -z "$path" ]; then
echo "Please pass an install directory"
exit 1
fi
if [ -d "$path" ]; then
echo "The install directory may not exist"
exit 1
fi
mkdir "$path"
cd "$path"
virtualenv -p python2.7 .
bin/pip install git+https://github.com/seantis/suitable#egg=suitable
curl -O -L https://github.com/dw/mitogen/archive/master.tar.gz
tar xzvf master.tar.gz --strip-components=1
bin/pip install -e .
cat <<EOF > test.py
from suitable import Api, install_strategy_plugins
install_strategy_plugins('./ansible_mitogen/plugins/strategy')
api = Api('localhost', strategy='mitogen_linear')
print api.command('whoami')
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.