https://github.com/niklasb/boxes
Stuff to manage virtual machines
https://github.com/niklasb/boxes
Last synced: 12 months ago
JSON representation
Stuff to manage virtual machines
- Host: GitHub
- URL: https://github.com/niklasb/boxes
- Owner: niklasb
- Created: 2015-01-11T14:31:49.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-04-09T14:55:29.000Z (over 9 years ago)
- Last Synced: 2025-04-26T09:35:55.683Z (about 1 year ago)
- Language: Python
- Size: 56.6 KB
- Stars: 3
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Boxes
=====
Collection of vagrant files, packer configurations and various shell scripts to manage virtual machines for different purposes.
Prerequisites
-------------
To use this repository you'll at least need [vagrant](https://www.vagrantup.com/) and VirtualBox.
If you want to build your own base images you'll also need [packer](https://packer.io/).
How to use this repo
--------------------
There are three main parts in this repository:
1. Packer configurations to build vagrant boxes (in packer/)
2. Provisioning scripts (in scripts/)
3. Virtual machine profiles containing at least a Vagrantfile (everything else)
With this spinning up a webserver in a VM can be as easy as
```bash
cd ./websrv
vagrant up
```
And you'll have an apache webserver serving the content in ./websrv/webroot/ to you on http://localhost:8000.
Getting the base images
-----------------------
Before being able to use the VM profiles you'll need some base images (called [boxes](https://docs.vagrantup.com/v2/boxes.html)) for vagrant to use. You can either build those yourself using packer but you can also just grab prebuilt images from e.g. [here](https://vagrantcloud.com/hashicorp).
Building the boxes yourself with packer is straight forward:
```bash
cd packer/ubuntu-14.04-amd64
packer-io build ubuntu-14.04-amd64.json
# and, to register the new box with vagrant:
vagrant box add ubuntu-14.04-amd64 ubuntu-14.04-amd64_virtualbox.box
```
Note: You may want to change the keyboard layout and timezone settings for the boxes as well as the username. Also you'll need to configure the public SSH keys to use in packer/scripts/common/access.sh ;)
If you're using different boxes be sure to change the config.vm.box setting in the Vagrantfiles.