From 10effd5ffa1d678bd5593a155d8f4c129819f20e Mon Sep 17 00:00:00 2001 From: Lev Lazinskiy Date: Thu, 21 May 2015 01:34:32 -0400 Subject: [PATCH] Created Ubuntu Vagrantfile --- .gitignore | 3 +++ README.md | 20 ++++++++++++++++++++ Vagrantfile | 7 +++++++ bootstrap.sh | 15 +++++++++++++++ 4 files changed, 45 insertions(+) create mode 100644 Vagrantfile create mode 100644 bootstrap.sh diff --git a/.gitignore b/.gitignore index e5180738..2c0c6d34 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,6 @@ doc/sphinx/_build res/ngclient/node_modules/ res/ngclient/app/components/ + +# Vagrant +.vagrant/ \ No newline at end of file diff --git a/README.md b/README.md index 948d67d5..8867ca0e 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,26 @@ and then start the server and follow the instructions: (Leave out the --options for subsequent starts.) +Developing with Vagrant +----------------------- + +1. Install [Vagrant](https://www.vagrantup.com/downloads.html) + +2. Install [Virtualbox](https://www.virtualbox.org/) +3. Add a new Ubuntu box + + ```bash + vagrant box add ubuntu/trusty64 + ``` + +4. Clone this repo `git clone git://github.com/devsnd/cherrymusic.gitt` +5. Go to the repo `cd 2webm` +6. Launch the Development Environment + + ```bash + vagrant up + ``` +7. Navigate to localhost:8080 in a web browser. Changes you make in your local git repo will automatically appear on the website. Requirements ------------ diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 00000000..f055841b --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,7 @@ +Vagrant.configure("2") do |config| + # Base Ubuntu Box + config.vm.box = "ubuntu/trusty64" + config.vm.synced_folder ".", "/var/www" + config.vm.provision :shell, path: "bootstrap.sh" + config.vm.network :forwarded_port, guest: 8080, host: 8080 +end \ No newline at end of file diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100644 index 00000000..b8bff940 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Update Ubuntu +apt-get update +apt-get upgrade -y + +# Install Python Dependencies +apt-get install python-pip -y +pip install cherrypy + +# Install Cherry Music additional packages +apt-get install imagemagick vorbis-tools lame flac -y + +# Start Cherry Pi +python /var/www/cherrymusic --setup --port 8080 \ No newline at end of file