Skip to content
/ DareBox Public

DareBox (dárɛ box) is a pre provisioned LAMP vagrant box in the vein of scotchbox, but up to date.

License

Notifications You must be signed in to change notification settings

zwrawr/DareBox

Repository files navigation

DareBox Logo

DareBox (dárɛ box) is a pre provisioned LAMP vagrant box in the vein of scotchbox, but up to date.


This is a Work in Progress / Test.

No garauntees this will work , continue being supported, updated etc. At this time it is purely a test to gain understanding of how vagrant base boxes works.


What is included

Item Version Notes
Kernel 5.4.0
Ubuntu 20.04.4 current LTS
VBoxService 6.1.30
php 7.4.28
node 16.14.0 others avalible via nvm
npm 8.3.1
python3 3.8.10
pip3 20.0.2
rustc 1.59.0
cargo 1.59.0
git 2.25.1
mysql 10.3.34 miriaDB
searchd 2.2.11 sphinx
apache2 2.4.52
imagemagick 6.9.10
ffmpeg 4.2.4

How to use

The vagrant base box is uploaded on vagrant cloud's box repository. You can see it here. To use it you just need to add it into your 'VagrantFile'.

Vagrant.configure("2") do |config|
	config.vm.box = "zwrawr/DareBox"
	config.vm.box_version = "0.0.10"
end

How to develop

Prerequisite

  • Bash
  • System set up for vitualisation
  • Virtual Box
  • Vagrant

Cloning the Repo

  1. Clone this repo from github.
  2. Run ./darebox.sh build, this will take a while (10 mins)
  3. In your project's Vagrantfile add /path/to/cloned/repo/output-darebox/package.box as your source box.
  4. You need to add a file called vars.pkvars.hcl and add the following to get packer to run fully.
    apikey = "#######################################################"
    

Tips

  • If you have a built box (0.0.0-package.box) in build directory output-darebox then you can cd into test and launch the test VM. You can then vagrant ssh and poke around the VM to check stuff.

Building and Testing

./darebox.sh <command>
	- build: Runs packer build generating a provisioned vagrant box
	- test: Runs our custom shell script to see if everything installed correctly
	- all: Runs build then test
	- clean: Removes build and test artifacts after shuting vms down
	- upload: Uploads the box to vagrant
	- size: Reports the size of the packaged Box
	- config: Reports the current config
	- help: Print this info

Layout

  • scripts/ Scripts used to provision the vm and are called by vagrant based on there inclusion in Vagrantfile. These are the most important part.
    • motd/ Files defining the custom message of the day and are copied by the motd.sh script.
  • test/ Test vagrant setup. Nothing in here contributes to building or configuring darebox.
    • test.sh Checks that the programs we want are installed.
    • versions.csv List of program versions generated by the test.sh script.
  • output/ Build box end up in here.
  • darebox.sh Simple build and test runner.
  • Vagrantfile The base vagrant config that the box will be based upon

About

DareBox (dárɛ box) is a pre provisioned LAMP vagrant box in the vein of scotchbox, but up to date.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages