By Tim Hopper: tdhopper.com
Automating Python with Ansible is an interactive tutorial about how to use the Ansbile configuration management tool to run a long-running Python process on a remote machine in a repeatable manner. It's particularly oriented towards data scientists.
$ brew install ansible
on a Mac.$ sudo apt-get install ansible
on a Debian/Ubuntu system.
- Install Conda
$ conda env update
to create Conda environment fromenvironment.yml
.$ source activate automating_python
(in Bash).$ python -m bash_kernel.install
to install Jupyter bash kernel.
I used DigitalOcean. They have a nice UI and clear instructions. You'll want to add an SSH key so you can ssh without a password.
To make it easy to SSH to the box, add something like this to your ~/.ssh/config
:
Host digitalocean
HostName VPS.IP.ADDR.ESS
User root
Port 22
IdentityFile "/Users/USER/.ssh/id_rsa"
ForwardAgent yes
$ jupyter-notebook
to launch a local Jupyter notebook server.- Open the
Automating Python with Ansible.ipynb
notebook.