Skip to content
This repository has been archived by the owner on Feb 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #17 from e7d/develop
Browse files Browse the repository at this point in the history
Neap Box 1.2.11
  • Loading branch information
e7d committed Jul 12, 2016
2 parents f014cf8 + 3582aac commit 74d1df2
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 36 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
## v1.2.11 (2016-07-13)
* improved build script
* updated nginx-rtmp-module to version 1.1.8
* updated NodeJS to version 6.3.0
* updated NPM to version 3.10.5

## v1.2.10 (2016-07-04)
* fixed Debian reference box to version 8.5.0 as 8.5.1 is not usable as is
* updated VirtualBox Gust additions to version 5.0.24
* updated VirtualBox Guest additions to version 5.0.24
* updated NPM to version 3.10.3
* updated Newman to version 2.1.2

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This project aims to give you the necessary tools to build yourself the Neap Box

## About

**Version:** 1.2.10
**Version:** 1.2.11
**Web:** Coming later, [box.neap.io](http://box.neap.io)
**Project Owner:** Michaël "[e7d](https://github.com/e7d)" Ferrand

Expand All @@ -20,17 +20,17 @@ This project aims to give you the necessary tools to build yourself the Neap Box
In order to build the Neap Box effectively, you'll need to have a few tools installed:

1. Install [Git](https://git-scm.com)
1. Install [VirtualBox](http://virtualbox.org)
1. Install [Vagrant](http://vagrantup.com)
2. Install [VirtualBox](http://virtualbox.org)
3. Install [Vagrant](http://vagrantup.com)

### Windows-specific ###

1. Add the Git executables to your path
1. Add the Git binaries to your path

### Recommended

1. Use a development workstation with at least 2 cores and 8GB of RAM, as Vagrant should be allocated 1GB of RAM
1. Install [Vagrant::VBGuest](https://github.com/dotless-de/vagrant-vbguest), to manage the host's VirtualBox Guest Additions on the guest system
2. Install [Vagrant::VBGuest](https://github.com/dotless-de/vagrant-vbguest), to manage the host's VirtualBox Guest Additions on the guest system
`vagrant plugin install vagrant-vbguest`

## Build ##
Expand Down Expand Up @@ -61,14 +61,14 @@ Once Vagrant is done provisioning the VM, you will have a box containing:
* [MailCatcher](https://mailcatcher.me/) 0.6.4 as mail catching server
* [nginx](http://nginx.org/) 1.10.1, as web server, with:
* [OpenSSL](https://www.openssl.org/) 1.0.2h, as SSL module
* [nginx-rtmp-module](https://github.com/arut/nginx-rtmp-module) 1.1.7, as streaming handler (RTMP, HLS and DASH protocols)
* [nginx-rtmp-module](https://github.com/arut/nginx-rtmp-module) 1.1.8, as streaming handler (RTMP, HLS and DASH protocols)
* [PHP](http://php.net/) 7.0.8, as server-side scripting language, with:
* [PHP-FPM](http://php-fpm.org/) 7.0.8, as PHP process manager
* [PhpRedis](https://github.com/phpredis/phpredis) 3.0.0, as PHP extension for Redis
* [Xdebug](http://xdebug.org/) 2.4.0, as debugger and profiler tool
* [Composer](https://getcomposer.org/) 1.1.3, as dependency manager
* [NodeJS](https://nodejs.org/) 6.2.2, as JavaScript runtime
* [NPM](https://www.npmjs.com/) 3.10.3, as JavaScript package Manager
* [NodeJS](https://nodejs.org/) 6.3.0, as JavaScript runtime
* [NPM](https://www.npmjs.com/) 3.10.5, as JavaScript package Manager
* [Newman](https://github.com/postmanlabs/newman) 2.1.2, as [Postman](http://getpostman.com/) collection runner
* [FFmpeg](https://www.ffmpeg.org/) 2.8.7, as media converter
* [UnrealIRCd](https://www.unrealircd.org/) 4.0.4, as IRC server daemon, with:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.10
1.2.11
36 changes: 25 additions & 11 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,48 @@ Vagrant.configure(2) do |config|
cpus = 2
end

config.vm.define "Neap Box" do |node|
config.vm.define 'Neap Box' do |node|
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.

# General configuration
node.vm.hostname = "box.neap.dev"
node.vm.box = "debian/contrib-jessie64"
node.vm.box_version = "= 8.5.0"
node.vm.hostname = 'box.neap.dev'
node.vm.box = 'debian/contrib-jessie64'
node.vm.box_version = '= 8.5.2'

# Synced folder configuration
node.vm.synced_folder ".", "/vagrant"
node.vm.synced_folder '.', '/vagrant'

# VirtualBox provider
node.vm.provider "virtualbox" do |vb|
node.vm.provider 'virtualbox' do |provider|
# System configuration
vb.name = "Neap Box"
vb.cpus = cpus
vb.memory = "1024"
provider.name = 'Neap Box'
provider.cpus = cpus
provider.memory = '1024'
end

# VirtualBox Guest update
node.vbguest.auto_update = true
node.vbguest.installer = DebianVbguest
node.vbguest.no_remote = true

# Provisioning script
node.vm.provision "shell" do |s|
s.inline = "/vagrant/bootstrap.sh | tee /vagrant/bootstrap.log"
node.vm.provision 'shell' do |s|
s.inline = '/vagrant/bootstrap.sh | tee /vagrant/bootstrap.log'
s.keep_color = true
end
end
end

class DebianVbguest < VagrantVbguest::Installers::Debian
def install(opts=nil, &block)
communicate.sudo('apt-get -y -q purge virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11', opts, &block)
@vb_uninstalled = true
super
end

def running?(opts=nil, &block)
return false if @vb_uninstalled
super
end
end
2 changes: 1 addition & 1 deletion bootstrap/build-anope.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ try

echo "Download sources"
cd /usr/src
wget https://github.com/anope/anope/releases/download/${ANOPE_VERSION}/anope-${ANOPE_VERSION}-source.tar.gz
wget -nv https://github.com/anope/anope/releases/download/${ANOPE_VERSION}/anope-${ANOPE_VERSION}-source.tar.gz
tar -zxvf anope-${ANOPE_VERSION}-source.tar.gz
cd anope*

Expand Down
8 changes: 4 additions & 4 deletions bootstrap/build-nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi

NGINX_VERSION=1.10.1 # http://nginx.org/en/download.html
OPENSSL_VERSION=1.0.2h # https://openssl.org/source/
NGINX_RTMP_VERSION=1.1.7 # https://github.com/arut/nginx-rtmp-module/releases
NGINX_RTMP_VERSION=1.1.8 # https://github.com/arut/nginx-rtmp-module/releases

try
(
Expand All @@ -22,17 +22,17 @@ try

echo "Download source code"
cd /usr/src
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
wget -nv http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
tar -zxvf nginx-${NGINX_VERSION}.tar.gz

echo "Download OpenSSL source code"
cd /usr/src
wget https://openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
wget -nv https://openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
tar -zxvf openssl-${OPENSSL_VERSION}.tar.gz

echo "Download nginx-rtmp-module source code"
cd /usr/src
wget https://github.com/arut/nginx-rtmp-module/archive/v${NGINX_RTMP_VERSION}.tar.gz -O nginx-rtmp-module-v${NGINX_RTMP_VERSION}.tar.gz
wget -nv https://github.com/arut/nginx-rtmp-module/archive/v${NGINX_RTMP_VERSION}.tar.gz -O nginx-rtmp-module-v${NGINX_RTMP_VERSION}.tar.gz
tar -zxvf nginx-rtmp-module-v${NGINX_RTMP_VERSION}.tar.gz

echo "Build binaries"
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/build-redis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ try
echo "Download source code"
cd /usr/src
if [ ! -f /usr/src/redis-${REDIS_VERSION}.tar.gz ]; then
wget http://download.redis.io/releases/redis-${REDIS_VERSION}.tar.gz
wget -nv http://download.redis.io/releases/redis-${REDIS_VERSION}.tar.gz
tar -zxvf redis-${REDIS_VERSION}.tar.gz
else
echo "skipped..."
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/build-unreal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ try
echo "Download sources"
cd /usr/src
if [ ! -f /usr/src/unreal*.tar.gz ]; then
wget --no-check-certificate --trust-server-names https://www.unrealircd.org/unrealircd4/unrealircd-${UNREAL_VERSION}.tar.gz
wget -nv --no-check-certificate --trust-server-names https://www.unrealircd.org/unrealircd4/unrealircd-${UNREAL_VERSION}.tar.gz
tar -zxvf unrealircd-*.tar.gz
else
echo "skipped..."
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/setup-certbot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ try
rm -rf ${LETS_ENCRYPT_PATH}
mkdir -p ${LETS_ENCRYPT_PATH}
cd ${LETS_ENCRYPT_PATH}
wget https://dl.eff.org/certbot-auto
wget -nv https://dl.eff.org/certbot-auto
chmod a+x certbot-auto

echo "Link executable in environment"
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/setup-ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ try

echo "Add 'deb-multimedia' repository to Aptitude"
cd /tmp
wget http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.3.7_all.deb
wget -nv http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.3.7_all.deb
dpkg -i deb-multimedia-keyring_2016.3.7_all.deb
echo "deb http://www.deb-multimedia.org jessie main non-free" >/etc/apt/sources.list.d/ffmpeg.list
echo "deb http://www.deb-multimedia.org jessie-backports main" >>/etc/apt/sources.list.d/ffmpeg.list
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/setup-jq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ try

echo "Install binary"
cd /tmp
wget https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64
wget -nv https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64
chmod +x jq-linux64
mv jq-linux64 /usr/bin/jq

Expand Down
2 changes: 1 addition & 1 deletion bootstrap/setup-phpredis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ try

echo "Download sources"
cd /usr/src
wget https://github.com/phpredis/phpredis/archive/${PHPREDIS_TAG}.tar.gz -O phpredis-${PHPREDIS_VERSION}.tar.gz
wget -nv https://github.com/phpredis/phpredis/archive/${PHPREDIS_TAG}.tar.gz -O phpredis-${PHPREDIS_VERSION}.tar.gz
tar -zxvf phpredis-${PHPREDIS_VERSION}.tar.gz

echo "Build library"
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/setup-xdebug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ try

echo "Download sources"
cd /usr/src
wget https://github.com/xdebug/xdebug/archive/XDEBUG_2_4_0.tar.gz -O xdebug-${XDEBUG_VERSION}.tar.gz
wget -nv https://github.com/xdebug/xdebug/archive/XDEBUG_2_4_0.tar.gz -O xdebug-${XDEBUG_VERSION}.tar.gz
tar -zxvf xdebug-${XDEBUG_VERSION}.tar.gz

echo "Build library"
Expand Down
18 changes: 17 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
#!/bin/bash

vagrant_plugin_install() {
echo "Install Vagrant plugin: $1"
plugins=$(vagrant plugin list | grep $1)
if [[ -z $plugins ]]; then
vagrant plugin install $1
else
vagrant plugin update $1
fi
}

echo "Configure Vagrant"
vagrant_plugin_install vagrant-vbguest

echo "Build box"
vagrant destroy --force
vagrant up --install-provider --destroy-on-error
vagrant up --provider=virtualbox --install-provider --destroy-on-error

echo "Package box"
rm -rf neap.box
vagrant package --output neap.box
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "e7d/neap-box",
"versions": [
{
"version": "1.2.10",
"version": "1.2.11",
"providers": [{
"name": "virtualbox",
"url": "neap.box"
Expand Down
4 changes: 3 additions & 1 deletion resources/analytics.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# require curl
apt-get -y -q install curl >/dev/null

. /vagrant/resources/colors.sh

ANALYTICS=UA-66226242-7
Expand Down Expand Up @@ -97,7 +100,6 @@ QUERY="${QUERY} --data-urlencode \"z=${EPOCH}\""
QUERY="${QUERY} --user-agent \"${USER_AGENT}\""
QUERY="${QUERY} --compressed --silent --output /dev/null"
QUERY="\"http://www.google-analytics.com/collect\" ${QUERY}"
export toto=$QUERY

if [ ! -z $HELP ]; then
display_help
Expand Down

0 comments on commit 74d1df2

Please sign in to comment.