SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
6.
No Power Warning
Raspberry Pi ADSL
UPS
Internet
⌁ X
Notification
Ruby
mailer
Email
7.
The “problem”
★ I bought another Raspberry Pi
★ Possible uses:
• Learning computer
• Git server
• File downloader
• File server (even ownCloud)
• Rails test environment
• Domotics server
Want them all!
13.
Automation requirements
★ No dependencies (or few): root and ssh. The image can
be used as is
★ No central server
★ No constant updating
★Reusable solution with my cloud servers
★Configuration in VCS
★My own recipes, but lots available
★Better if language is known
15.
Alternatives
★Docker:Go; container portability, Linux x86
★ PalletOps:Clojure/JVM; targets cloud servers
★ cfengine: C; steep learning curve, agent
★ Puppet: Ruby; agent based, pull, declarative
★Chef: Ruby; agent based, more imperative
★ Ansible: Python; just ssh access, modules for *
★ Fabric: Python; like scripting SSH, deploy apps
★Capistrano: Ruby; like fabric
16.
Ansible
★ Python based (but modules in other langs)
★ Agent-less (SSH with public key auth)
★Declarative
★ Idempotent
★ Playbooks are equal for my cloud server and my
raspberry pi (Ubuntu & Raspbian) and even VM.
★ Talks to other devices (like my Mikrotik)
18.
Linux before ansible
★Download latest Raspbian
★Copy image to SD with dd (bs=4M)
★ Setup connected to monitor&kbd
(preserve)
★ Extend FS (preserve to use)
19.
Hints
★Don’t put everything in a playbook
★ Some basics:
• Update system
• ntp, ssh, tmux
• iptables
• gitolite
• nginx, postgreSQL,…
★ Playbooks available in:
http://galaxy.ansible.com
27.
Use your mock server
with your apps
★Use a small router (airport express is
perfect)
★ IP parameter in the settings bundle
★ Another settings bundle for production
code.
★Consume web services as always