Skip to content

Instantly share code, notes, and snippets.

@atl
Created March 7, 2013 09:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atl/5106787 to your computer and use it in GitHub Desktop.
Save atl/5106787 to your computer and use it in GitHub Desktop.
IPython on Joyent provisioning scripts
#!/usr/bin/bash
# startup-controller.sh
# by Adam T. Lindsay, 2013
# free to use and modify
export PRIVATE=$(ifconfig -a | /opt/local/gnu/bin/grep -A 1 net1 | /opt/local/gnu/bin/awk '/inet/ { print $2 }');
export ABI=`/opt/local/bin/bmake -D BSD_PKG_MK -f /opt/local/etc/mk.conf -V ABI`
/opt/local/sbin/pkg_add http://pkgsrc.atl.me/2012Q4/$ABI/All/py27-zmq-2.1.11.tgz
/opt/local/sbin/pkg_add http://pkgsrc.atl.me/2012Q4/$ABI/All/py27-tornado-2.3.tgz
/opt/local/sbin/pkg_add http://pkgsrc.atl.me/2012Q4/$ABI/All/py27-ipython-0.13.1.tgz
/opt/local/sbin/pkg_add http://pkgsrc.atl.me/2012Q4/$ABI/All/py27-pygments-1.5.tgz
/opt/local/bin/pkgin -y install py27-sqlite3
/opt/local/sbin/pkg_add http://pkgsrc.atl.me/2012Q4/$ABI/All/py27-matplotlib-1.2.0.tgz
/usr/sbin/svccfg -s py27-ipython:controller setprop config/ip=astring: $PRIVATE
/usr/sbin/svcadm refresh py27-ipython:controller
/usr/sbin/svcadm enable py27-ipython:controller
#!/usr/bin/bash
# startup-engine.sh
# by Adam T. Lindsay, 2013
# free to use and modify
export ABI=`/opt/local/bin/bmake -D BSD_PKG_MK -f /opt/local/etc/mk.conf -V ABI`
/opt/local/sbin/pkg_add http://pkgsrc.atl.me/2012Q4/$ABI/All/py27-zmq-2.1.11.tgz
/opt/local/sbin/pkg_add http://pkgsrc.atl.me/2012Q4/$ABI/All/py27-ipython-0.13.1.tgz
/opt/local/sbin/pkg_add http://pkgsrc.atl.me/2012Q4/$ABI/All/py27-numpy-1.6.2.tgz
/usr/sbin/svccfg -s py27-ipython:engine setprop config/url=astring: `/usr/sbin/mdata-get ipython.url`
/usr/sbin/svccfg -s py27-ipython:engine setprop config/exec_key=astring: `/usr/sbin/mdata-get ipython.key`
/usr/sbin/svcadm refresh py27-ipython:engine
/usr/sbin/svcadm enable py27-ipython:engine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment