Skip to content

An interactive tutorial about how to use the Ansible configuration management tool to run a long-running Python process on a remote machine in a repeatable manner

License

Notifications You must be signed in to change notification settings

tdhopper/automating_python

Repository files navigation

By Tim Hopper: tdhopper.com

alt text alt text

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.

Install Instructions

  • $ brew install ansible on a Mac.
  • $ sudo apt-get install ansible on a Debian/Ubuntu system.

Setup Jupyter Environment

  • Install Conda
  • $ conda env update to create Conda environment from environment.yml.
  • $ source activate automating_python (in Bash).
  • $ python -m bash_kernel.install to install Jupyter bash kernel.

Launch a Virtual Private Server

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.

Setup ~/.ssh/config

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

Launch Notebook

  • $ jupyter-notebook to launch a local Jupyter notebook server.
  • Open the Automating Python with Ansible.ipynb notebook.

About

An interactive tutorial about how to use the Ansible configuration management tool to run a long-running Python process on a remote machine in a repeatable manner

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published