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 #23 from e7d/develop
Browse files Browse the repository at this point in the history
Neap Box 1.4.0
  • Loading branch information
e7d committed May 20, 2017
2 parents 8d10d3e + dc0383b commit dab0bdd
Show file tree
Hide file tree
Showing 17 changed files with 150 additions and 90 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## v1.4.0 (2017-05-20)
* updated Debian Jessie to version 8.8
* updated VirtualBox Guest additions to version 5.1.22
* updated Lets Encrypt Certbot to version 0.14.1
* updated PostgreSQL to version 9.6.3
* updated Redis to version 3.2.9
* updated nginx to version 1.13.0
* updated OpenSSL to version 1.1.0e
* updated nginx-rtmp-module to version 1.1.11
* changed from "dotdeb" to "sury" repository for PHP and PHP-FPM
* updated PHP and PHP-FPM to version 7.1.5
* updated PhpRedis to version 3.1.2
* updated Xdebug to version 2.5.1
* updated Composer to version 1.4.2
* updated NodeJS to version 6.10.3
* updated NPM to version 4.6.1
* updated Newman to version 3.6.0
* added Yarn in version 0.24.5
* updated FFmpeg to version 2.8.11
* updated UnrealIRCd to version 4.0.12
* updated Anope to version 2.0.5
* fixed composer alias behavior in composer.bashrc

## v1.3.1 (2016-12-22)
* added apt packages clean
* updated VirtualBox Guest additions to version 5.1.12
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Michael "e7d" Ferrand.
Copyright (c) 2017 Michael "e7d" Ferrand.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
41 changes: 21 additions & 20 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.3.1
**Version:** 1.4.0
**Web:** Coming later, [box.neap.io](http://box.neap.io)
**Project Owner:** Michaël "[e7d](https://github.com/e7d)" Ferrand

Expand Down Expand Up @@ -52,24 +52,25 @@ Neap box uses Vagrant's [shell provisioner](https://docs.vagrantup.com/v2/provis

Once Vagrant is done provisioning the VM, you will have a box containing:

* [Debian](https://www.debian.org/) Jessie 8.6, as operating system, with:
* [VirtualBox](https://www.virtualbox.org/) Guest Additions 5.1.12
* [Let's Encrypt Certbot](https://certbot.eff.org/) 0.9.3, as SSL certificate generator
* [Debian](https://www.debian.org/) Jessie 8.8, as operating system, with:
* [VirtualBox](https://www.virtualbox.org/) Guest Additions 5.1.22
* [Let's Encrypt Certbot](https://certbot.eff.org/) 0.14.1, as SSL certificate generator
* [jq](https://stedolan.github.io/jq/) 1.5, as JSON processor
* [PostgreSQL](http://www.postgresql.org/) 9.6.1, as database system
* [Redis](http://redis.io/) 3.2.6, as data structure store
* [PostgreSQL](http://www.postgresql.org/) 9.6.3, as database system
* [Redis](http://redis.io/) 3.2.9, as data structure store
* [MailCatcher](https://mailcatcher.me/) 0.6.5 as mail catching server
* [nginx](http://nginx.org/) 1.10.2, as web server, with:
* [OpenSSL](https://www.openssl.org/) 1.0.2j, as SSL module
* [nginx-rtmp-module](https://github.com/arut/nginx-rtmp-module) 1.1.10, as streaming handler (RTMP, HLS and DASH protocols)
* [PHP](http://php.net/) 7.0.14, as server-side scripting language, with:
* [PHP-FPM](http://php-fpm.org/) 7.0.14, as PHP process manager
* [PhpRedis](https://github.com/phpredis/phpredis) 3.0.0, as PHP extension for Redis
* [Xdebug](http://xdebug.org/) 2.5.0, as debugger and profiler tool
* [Composer](https://getcomposer.org/) 1.2.4, as dependency manager
* [NodeJS](https://nodejs.org/) 6.9.2, as JavaScript runtime
* [NPM](https://www.npmjs.com/) 4.0.5, as JavaScript package Manager
* [Newman](https://github.com/postmanlabs/newman) 3.3.1, as [Postman](http://getpostman.com/) collection runner
* [FFmpeg](https://www.ffmpeg.org/) 2.8.9, as media converter
* [UnrealIRCd](https://www.unrealircd.org/) 4.0.9, as IRC server daemon, with:
* [Anope](https://www.anope.org/) 2.0.4, as IRC services daemon
* [nginx](http://nginx.org/) 1.13.0, as web server, with:
* [OpenSSL](https://www.openssl.org/) 1.1.0e, as SSL module
* [nginx-rtmp-module](https://github.com/arut/nginx-rtmp-module) 1.1.11, as streaming handler (RTMP, HLS and DASH protocols)
* [PHP](http://php.net/) 7.1.5, as server-side scripting language, with:
* [PHP-FPM](http://php-fpm.org/) 7.1.5, as PHP process manager
* [PhpRedis](https://github.com/phpredis/phpredis) 3.1.2, as PHP extension for Redis
* [Xdebug](http://xdebug.org/) 2.5.1, as debugger and profiler tool
* [Composer](https://getcomposer.org/) 1.4.2, as dependency manager
* [NodeJS](https://nodejs.org/) 6.10.3, as JavaScript runtime
* [NPM](https://www.npmjs.com/) 4.6.1, as JavaScript package manager
* [Newman](https://github.com/postmanlabs/newman) 3.6.0, as [Postman](http://getpostman.com/) collection runner
* [Yarn](https://yarnpkg.com/) 0.24.5, as dependency manager
* [FFmpeg](https://www.ffmpeg.org/) 2.8.11, as media converter
* [UnrealIRCd](https://www.unrealircd.org/) 4.0.12, as IRC server daemon, with:
* [Anope](https://www.anope.org/) 2.0.5, as IRC services daemon
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.1
1.4.0
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Vagrant.configure(2) do |config|
# General configuration
node.vm.hostname = "box.neap.dev"
node.vm.box = "debian/contrib-jessie64"
node.vm.box_version = ">= 8.6.2"
node.vm.box_version = ">= 8.7.0"

# Synced folder configuration
node.vm.synced_folder ".", "/vagrant"
Expand Down
3 changes: 3 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ try
echox "${text_cyan}Setup Newman"
/vagrant/bootstrap/setup-newman.sh

echox "${text_cyan}Setup Yarn"
/vagrant/bootstrap/setup-yarn.sh

echox "${text_cyan}Setup ffmpeg"
/vagrant/bootstrap/setup-ffmpeg.sh

Expand Down
2 changes: 1 addition & 1 deletion bootstrap/build-anope.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ 0 != $(id -u) ]; then
exit 1
fi

ANOPE_VERSION=2.0.4 # https://github.com/anope/anope/releases/
ANOPE_VERSION=2.0.5 # https://github.com/anope/anope/releases/

try
(
Expand Down
6 changes: 3 additions & 3 deletions bootstrap/build-nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ if [ 0 != $(id -u) ]; then
exit 1
fi

NGINX_VERSION=1.10.2 # http://nginx.org/en/download.html
OPENSSL_VERSION=1.0.2j # https://openssl.org/source/
NGINX_RTMP_VERSION=1.1.10 # https://github.com/arut/nginx-rtmp-module/releases
NGINX_VERSION=1.13.0 # http://nginx.org/en/download.html
OPENSSL_VERSION=1.1.0e # https://openssl.org/source/
NGINX_RTMP_VERSION=1.1.11 # https://github.com/arut/nginx-rtmp-module/releases

try
(
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/build-redis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ 0 != $(id -u) ]; then
exit 1
fi

REDIS_VERSION=3.2.6 # http://redis.io/download
REDIS_VERSION=3.2.9 # http://redis.io/download

try
(
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/build-unreal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ 0 != $(id -u) ]; then
exit 1
fi

UNREAL_VERSION=4.0.9 # https://www.unrealircd.org/download/4.0/
UNREAL_VERSION=4.0.12 # https://www.unrealircd.org/download/4.0/

try
(
Expand Down
4 changes: 3 additions & 1 deletion bootstrap/check-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ NGINX=$(echo `nginx -v 2>&1` | sed 's/.*nginx\/\(.*\)/\1/')
OPENSSL=$(echo `nginx -V 2>&1` | sed 's/.*openssl-\([^ ]*\).*/\1/')
NGINX_RTMP=$(echo `nginx -V 2>&1` | sed 's/.*nginx-rtmp-module-\(.*\)/\1/')
PHP=$(echo `php -v` | sed 's/PHP \([^-]*\).*/\1/')
PHPFPM=$(echo `php-fpm7.0 -v` | sed 's/PHP \([^-]*\).*/\1/')
PHPFPM=$(echo `php-fpm7.1 -v` | sed 's/PHP \([^-]*\).*/\1/')
PHPREDIS=$(echo `php -i | grep 'Redis Version'` | sed 's/Redis Version => \(.*\)/\1/')
XDEBUG=$(echo `php -v` | sed 's/.*Xdebug v\([^,]*\).*/\1/')
COMPOSER=$(echo `composer 2>&1` | sed 's/.*Composer version \([^ ]*\).*/\1/')
NODEJS=$(echo `node -v` | sed 's/v\([^,]*\).*/\1/')
NPM=$(npm -v)
NEWMAN=$(newman --version)
YARN=$(yarn -V)
FFMPEG=$(echo `ffmpeg -version` | sed 's/.*ffmpeg version \([^ ]*\).*/\1/')
UNREALIRCD=$(echo `sudo -u irc /etc/unrealircd/bin/unrealircd -v 2>&1` | sed 's/.*UnrealIRCd-\([^ ]*\).*/\1/')
ANOPE=$(echo `/etc/anope/bin/services -v` | sed 's/Anope-\([^ ]*\).*/\1/')
Expand All @@ -50,6 +51,7 @@ echo ' | `-- Composer: '$COMPOSER
echo ' +-- NodeJS: '$NODEJS
echo ' | +-- NPM: '$NPM
echo ' | `-- Newman: '$NEWMAN
echo ' +-- Yarn: '$YARN
echo ' +-- FFmpeg: '$FFMPEG
echo ' `-- UnrealIRCd: '$UNREALIRCD
echo ' `-- Anope: '$ANOPE
6 changes: 3 additions & 3 deletions bootstrap/prepare-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ try

echo "Update packages to the latest version"
export DEBIAN_FRONTEND=noninteractive
apt-get -y -q update
apt-get -y -q update --fix-missing
apt-get -y -q -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
apt-get -y -q dist-upgrade
apt-get -y -q upgrade

echo "Install prerequisite packages"
apt-get -y -q install build-essential cmake curl facter g++ gcc git libcurl4-openssl-dev libpcre++-dev \
libpcre3-dev libreadline-gplv2-dev libsqlite3-dev libssl-dev make pkg-config \
apt-get -y -q install apt-transport-https build-essential cmake curl facter g++ gcc git libcurl4-openssl-dev \
libpcre++-dev libpcre3-dev libreadline-gplv2-dev libsqlite3-dev libssl-dev make pkg-config \
ruby-dev unzip zlib1g-dev

echo "Tweak SSH daemon"
Expand Down
22 changes: 8 additions & 14 deletions bootstrap/setup-php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,19 @@ try
(
throwErrors

echo "Add 'dotdeb' repository to Aptitude"
wget --quiet -O - https://www.dotdeb.org/dotdeb.gpg | apt-key add -
echo "deb http://packages.dotdeb.org jessie all" >/etc/apt/sources.list.d/dotdeb.list
echo "deb-src http://packages.dotdeb.org jessie all" >>/etc/apt/sources.list.d/dotdeb.list
echo "Add 'sury' repository to Aptitude"
wget --quiet -O - https://packages.sury.org/php/apt.gpg | apt-key add -
echo "deb https://packages.sury.org/php jessie main" >/etc/apt/sources.list.d/sury.list
echo "deb-src https://packages.sury.org/php jessie main" >>/etc/apt/sources.list.d/sury.list
apt-get -y -q update

echo "Install packages"
apt-get -y -q install php7.0 php7.0-cli php7.0-common php7.0-curl php7.0-dev php7.0-fpm php7.0-gd \
php7.0-intl php7.0-json php7.0-mbstring php7.0-opcache php7.0-pgsql php7.0-sqlite3 \
php7.0-xdebug php7.0-xml php7.0-zip

echo "Remove unused additional packages"
apt-get -y -q autoremove --purge php5-*

echo "Disable OPcache"
sed -i 's/;\?opcache.enable=.\+/opcache.enable=0/g' /etc/php/7.0/fpm/php.ini
apt-get -y -q install php7.1 php7.1-cli php7.1-common php7.1-curl php7.1-dev php7.1-fpm php7.1-gd \
php7.1-intl php7.1-json php7.1-mbstring php7.1-opcache php7.1-pgsql php7.1-sqlite3 \
php7.1-xml php7.1-zip php-xdebug

echo "Restart PHP-FPM service"
service php7.0-fpm restart
service php7.1-fpm restart
)
catch || {
case $ex_code in
Expand Down
35 changes: 17 additions & 18 deletions bootstrap/setup-phpredis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,48 @@ if [ 0 != $(id -u) ]; then
exit 1
fi

PHPREDIS_TAG=3.0.0 # https://github.com/phpredis/phpredis/releases
PHPREDIS_VERSION=3.0.0
PHPREDIS_VERSION=3.1.2 # https://github.com/phpredis/phpredis/releases

try
(
throwErrors

echo "Download sources"
cd /usr/src
wget -nv 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_VERSION}.tar.gz -O phpredis-${PHPREDIS_VERSION}.tar.gz
tar -zxvf phpredis-${PHPREDIS_VERSION}.tar.gz

echo "Build library"
cd phpredis-${PHPREDIS_TAG}
cd phpredis-${PHPREDIS_VERSION}
phpize
./configure
make -j$(nproc)
make install

echo "Write mod configuration file"
echo '; configuration for php redis module' >/etc/php/7.0/mods-available/redis.ini
echo '; priority=20' >>/etc/php/7.0/mods-available/redis.ini
echo 'extension=redis.so' >>/etc/php/7.0/mods-available/redis.ini
echo '; configuration for php redis module' >/etc/php/7.1/mods-available/redis.ini
echo '; priority=20' >>/etc/php/7.1/mods-available/redis.ini
echo 'extension=redis.so' >>/etc/php/7.1/mods-available/redis.ini

echo "Link configuration file to PHP"
ln -sf /etc/php/7.0/mods-available/redis.ini /etc/php/7.0/fpm/conf.d/20-redis.ini
ln -sf /etc/php/7.0/mods-available/redis.ini /etc/php/7.0/cli/conf.d/20-redis.ini
ln -sf /etc/php/7.1/mods-available/redis.ini /etc/php/7.1/fpm/conf.d/20-redis.ini
ln -sf /etc/php/7.1/mods-available/redis.ini /etc/php/7.1/cli/conf.d/20-redis.ini

echo "Write PHP configuration files"
echo >>/etc/php/7.0/cli/php.ini
echo '[redis]' >>/etc/php/7.0/cli/php.ini
echo 'session.save_handler = redis' >>/etc/php/7.0/cli/php.ini
echo 'session.save_path = "tcp://127.0.0.1:6379" ' >>/etc/php/7.0/cli/php.ini
echo >>/etc/php/7.0/fpm/php.ini
echo '[redis]' >>/etc/php/7.0/fpm/php.ini
echo 'session.save_handler = redis' >>/etc/php/7.0/fpm/php.ini
echo 'session.save_path = "tcp://127.0.0.1:6379"' >>/etc/php/7.0/fpm/php.ini
echo >>/etc/php/7.1/cli/php.ini
echo '[redis]' >>/etc/php/7.1/cli/php.ini
echo 'session.save_handler = redis' >>/etc/php/7.1/cli/php.ini
echo 'session.save_path = "tcp://127.0.0.1:6379" ' >>/etc/php/7.1/cli/php.ini
echo >>/etc/php/7.1/fpm/php.ini
echo '[redis]' >>/etc/php/7.1/fpm/php.ini
echo 'session.save_handler = redis' >>/etc/php/7.1/fpm/php.ini
echo 'session.save_path = "tcp://127.0.0.1:6379"' >>/etc/php/7.1/fpm/php.ini

echo "Restart service"
service redis restart

echo "Restart PHP-FPM service"
service php7.0-fpm restart
service php7.1-fpm restart
)
catch || {
case $ex_code in
Expand Down
31 changes: 31 additions & 0 deletions bootstrap/setup-yarn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

. /vagrant/resources/colors.sh
. /vagrant/resources/trycatch.sh

# This script needs admin rights
if [ 0 != $(id -u) ]; then
echox "${text_red}Error:${text_reset} This script must be run as root!"
exit 1
fi

try
(
throwErrors

echo "Add repository to Aptitude"
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
apt-get -y -q update

echo "Install Yarn dependency manager"
apt-get -y -q install yarn
)
catch || {
case $ex_code in
*)
echox "${text_red}Error:${text_reset} An unexpected exception was thrown"
throw $ex_code
;;
esac
}
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.3.1",
"version": "1.4.0",
"providers": [{
"name": "virtualbox",
"url": "neap.box"
Expand Down
Loading

0 comments on commit dab0bdd

Please sign in to comment.