Skip to content

Commit 5fa7f3a

Browse files
author
Alexander Paliarush
committed
- Included tests run into build script
- Added PHP 5.6 - Added ElasticSearch
1 parent 6d1813e commit 5fa7f3a

File tree

3 files changed

+36
-4
lines changed

3 files changed

+36
-4
lines changed

build.sh

100644100755
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
11
#!/usr/bin/env bash
22

3+
# Configuration
4+
path_to_tests="../magento2-vagrant-for-developers-tests"
5+
36
# Enable trace printing and exit on the first error
47
set -ex
58

9+
# Clear environment
10+
vagrant destroy -f
11+
rm -f magento2.ubuntu-14.04.ova
12+
rm -f packer_virtualbox-ovf_virtualbox.box
13+
14+
# Build box
615
vagrant up
716
vagrant halt
817
VBoxManage export -o "magento2.ubuntu-14.04.ova" --ovf20 "magento2.ubuntu-14.04"
918
vagrant destroy -f
10-
packer build template.json
19+
./scripts/packer/packer build template.json
20+
vagrant box remove --force paliarush/magento2.ubuntu.rc
21+
vagrant box add paliarush/magento2.ubuntu.rc packer_virtualbox-ovf_virtualbox.box
22+
23+
# Run tests
24+
cd ${path_to_tests}
25+
bash ./testsuite.sh

scripts/packer/packer

39.5 MB
Binary file not shown.

scripts/vagrant/install_magento_environment.sh

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,20 @@ a2enmod mpm_prefork
1919
sed -i 's|www-data|vagrant|g' /etc/apache2/envvars
2020

2121
# Setup PHP
22-
# Workaround until php7.0 is available in official ubuntu repository
2322
apt-get install -y language-pack-en-base
2423
LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
2524
apt-get update
2625

27-
# TODO: Install PHP 5.6 and disable it by default
26+
# Install PHP 5.6
27+
sudo apt-get install -y php5.6 php-xdebug php5.6-xml php5.6-mcrypt php5.6-curl php5.6-cli php5.6-mysql php5.6-gd php5.6-intl php5.6-bcmath php5.6-mbstring php5.6-soap php5.6-zip libapache2-mod-php5.6
28+
echo '
29+
xdebug.max_nesting_level=200
30+
xdebug.remote_enable=1
31+
xdebug.remote_host=192.168.10.1
32+
xdebug.idekey=phpstorm' >> /etc/php/5.6/mods-available/xdebug.ini
33+
a2dismod php5.6
34+
rm -rf /etc/php/5.6/apache2
35+
ln -s /etc/php/5.6/cli /etc/php/5.6/apache2
2836

2937
# Install PHP 7.0 and enable it by default
3038
apt-get install -y php7.0 php7.0-mcrypt php7.0-curl php7.0-cli php7.0-mysql php7.0-gd php7.0-intl php7.0-xsl php7.0-bcmath php7.0-mbstring php7.0-soap php7.0-zip libapache2-mod-php7.0
@@ -44,11 +52,14 @@ touch /etc/php/7.0/cli/conf.d/20-xdebug.ini
4452
echo 'zend_extension=/usr/lib/xdebug/modules/xdebug.so
4553
xdebug.max_nesting_level=200
4654
xdebug.remote_enable=1
47-
xdebug.remote_connect_back=1' >> /etc/php/7.0/cli/conf.d/20-xdebug.ini
55+
xdebug.remote_host=192.168.10.1
56+
xdebug.idekey=phpstorm' >> /etc/php/7.0/cli/conf.d/20-xdebug.ini
4857
echo "date.timezone = America/Chicago" >> /etc/php/7.0/cli/php.ini
4958
rm -rf /etc/php/7.0/apache2
5059
ln -s /etc/php/7.0/cli /etc/php/7.0/apache2
5160

61+
update-alternatives --set php /usr/bin/php7.0
62+
5263
# Restart Apache
5364
service apache2 restart
5465

@@ -77,3 +88,9 @@ invoke-rc.d rabbitmq-server start
7788

7889
# Install Varnish
7990
apt-get install -y varnish
91+
92+
# Install ElasticSearch
93+
apt-get install -y openjdk-7-jre
94+
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.2.deb
95+
dpkg -i elasticsearch-1.7.2.deb
96+
update-rc.d elasticsearch defaults

0 commit comments

Comments
 (0)