My Raspberry Pi bootstrap virtualizing with Vagrant and provisioning with Ansible.
Create a Raspbian bootable SD card:
curl -LO http://downloads.raspberrypi.org/raspbian_latest
unzip ./YYYY-MM-DD-codename-raspbian.zip -d .
dd bs=1m if=./YYYY-MM-DD-codename-raspbian.img of=/dev/diskN
Finish the Raspbian initial configuration with rasp-config
. Make sure to allow access to the Raspberry Pi through SSH.
Create .env
file in this directory and save your server IP address, user name, and password of the Raspberry Pi:
SERVER='192.168.1.100'
USERNAME='pi'
PASSWORD='raspberry'
Install Vagrant plugins:
vagrant plugin install dotenv vagrant-managed-servers
First of all, copy this repository as your project bootstrap, then follow the instruction below.
Start working on the project:
cd /path/to/proj
vagrant up --provider=managed
Provision the work environment:
vagrant provision
Log in to the virtualized SSH environment:
vagrant ssh
Stop working on the project and unlink it:
vagrant destroy
- #20 RaspberryPiを仕事で使うためにAnsibleを使う話 | tech.kayac.com - KAYAC engineers' blog
- Ansible - Provisioning - Vagrant Documentation
- Using Vagrant and Ansible — Ansible Documentation
- Best Practices — Ansible Documentation
- Insanely complete Ansible playbook, showing off all the options
Distributed under Unlicense