Skip to content

Packer machine template that generates a Vagrant box with embedded systems & Raspberry Pi programming tools.

License

Notifications You must be signed in to change notification settings

MrFlynn/embedded-systems-machine-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Embedded Systems Machine Template

This repository contains a packer template for building a Vagrant box for use in CS120B and CS122A at UCR. I created this template to allow for people to easily get started with an environment with all of the tools and scripts necessary to get started in those courses. It also allows people to forward their internet connection to a Raspberry Pi Zero W (v1.1+) for labs that require that device.

Caveats

This VM was designed with macOS in mind. The process here could be modified to support other operating systems, but I use a Mac and don't have access to other OSes so I can only offer a solution for a Mac environment. If you would like to contribute support for other operating systems, please feel free to submit a PR with your changes.

Getting Started

I'll assume you have the repository cloned to your machine already.

  1. First, you need to install VirtualBox, Packer, Vagrant, and Ansible.
$ brew install vagrant packer
$ brew cask install virtualbox
$ pip install --user ansible
  1. Run the packer script. This may take some time so grab a coffee or a snack while you wait.
$ cd /location/of/embedded-systems-machine-template
$ packer build machine.json
  1. cd into the output directory and run the VM.
$ cd output-vagrant/
$ vagrant up
  1. Once the machine is running, login using the vagrant account. The default password is vagrant (obviously change this to something more secure/less obvious).

Note: if you get any network interface errors, edit the Vagrantfile in your output directory and edit the end of line 34 (the one beginning with output.vm.network). Either comment the line out, or if you have your Raspberry Pi connected to your Mac, edit the last string of text with enX: RNDIS/Ethernet Gadget where X is the physical network interface that your Pi is connected to. You can get this number by running the command networksetup -listhardwareports.

Todos:

  • Implement script to autoselect Raspberry Pi network port.
  • Add support for Windows.

About

Packer machine template that generates a Vagrant box with embedded systems & Raspberry Pi programming tools.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages