@@ -19,24 +19,34 @@ debconf-set-selections <<< "mysql-server mysql-server/root_password_again passwo
1919debconf-set-selections <<< " postfix postfix/mailname string $PROJECT_URL"
2020debconf-set-selections <<< " postfix postfix/main_mailer_type string 'Internet Site'"
2121
22- # Configure default locale
22+ # Set default locale
2323cp /etc/locale.gen /etc/locale.gen.old
2424sed -i " s/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g" /etc/locale.gen
2525/usr/sbin/locale-gen
26- export LANG=en_US.UTF-8*
26+ echo ' export LANG=en_US.UTF-8' | tee -a ~ /.bashrc >> /home/vagrant/.bashrc
27+ echo ' export LC_CTYPE=en_US.UTF-8' | tee -a ~ /.bashrc >> /home/vagrant/.bashrc
28+ echo ' export LC_ALL=en_US.UTF-8' | tee -a ~ /.bashrc >> /home/vagrant/.bashrc
2729
2830# Required packages
2931apt-get install -y \
30- curl graphviz htop net-tools rsync sudo tree wget unzip zip \
32+ curl graphviz htop net-tools rsync sudo tree wget unzip zip g++ \
3133 libsqlite3-dev libxml2-utils build-essential software-properties-common \
3234 postfix mailutils libsasl2-2 libsasl2-modules ca-certificates libnss3-tools \
33- apt-transport-https mysql-client mysql-server redis-server \
34- openssl nginx \
35- g++ vim git git-flow
35+ apt-transport-https openssl redis-server nginx \
36+ python ruby ruby-dev openjdk-8-jdk openjdk-8-jre \
37+ vim git git-flow
3638
37- # Sury Repository
38- wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
39- echo " deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list
39+ # Php Repository
40+ wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
41+ echo " deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php.list
42+
43+ # Percona repository
44+ wget https://repo.percona.com/apt/percona-release_latest.$( lsb_release -sc) _all.deb
45+ dpkg -i percona-release_latest.$( lsb_release -sc) _all.deb
46+
47+ # Elasticsearch repository
48+ wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
49+ echo " deb https://artifacts.elastic.co/packages/6.x/apt stable main" | tee /etc/apt/sources.list.d/elastic-6.x.list
4050
4151# Set php version
4252MAGENTO_PHP_VERSION=' 7.2' ;
5767sed -i ' /export PROJECT_PHP_VERSION*/c\' " export PROJECT_PHP_VERSION=${MAGENTO_PHP_VERSION} " /etc/profile.d/env.sh
5868source /etc/profile.d/env.sh
5969
60- # PHP packages
70+ # PHP and aditionals
6171apt-get update -y && apt-get install -y \
6272 php${PROJECT_PHP_VERSION} php${PROJECT_PHP_VERSION} -common php${PROJECT_PHP_VERSION} -cli \
6373 php${PROJECT_PHP_VERSION} -curl php${PROJECT_PHP_VERSION} -gd php${PROJECT_PHP_VERSION} -intl \
6474 php${PROJECT_PHP_VERSION} -mbstring php${PROJECT_PHP_VERSION} -soap php${PROJECT_PHP_VERSION} -zip \
6575 php${PROJECT_PHP_VERSION} -xml php${PROJECT_PHP_VERSION} -xml php${PROJECT_PHP_VERSION} -bcmath \
6676 php${PROJECT_PHP_VERSION} -mysql php${PROJECT_PHP_VERSION} -sqlite3 php${PROJECT_PHP_VERSION} -fpm \
6777 php${PROJECT_PHP_VERSION} -memcache php${PROJECT_PHP_VERSION} -redis php${PROJECT_PHP_VERSION} -opcache \
68- python ruby ruby-dev
78+ percona-server-server-5.7 elasticsearch
6979if $( dpkg --compare-versions " ${PROJECT_PHP_VERSION} " " lt" " 7.2" ) ; then
7080 apt-get install -y php${PROJECT_PHP_VERSION} -mcrypt
7181fi
7282
7383# Composer
74- curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
84+ curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
7585
7686# Prestissimo speed up installation
7787sudo -u vagrant composer global require hirak/prestissimo
@@ -86,7 +96,7 @@ gem install mime-types --version "< 3" --no-ri --no-rdoc
8696gem install mailcatcher --no-ri --no-rdoc
8797
8898# Grunt
89- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
99+ curl -sL https://deb.nodesource.com/setup_8.x | -E bash -
90100apt-get install -y nodejs
91101npm install -g grunt-cli
92102
@@ -104,7 +114,7 @@ mv /root/.magento-cloud/bin/magento-cloud /usr/local/bin
104114chmod +x /usr/local/bin/magento-cloud
105115
106116# Bash completion for magento cli
107- sudo curl -o /etc/bash_completion.d/magento2-bash-completion https://raw.githubusercontent.com/yvoronoy/magento2-bash-completion/master/magento2-bash-completion
117+ curl -o /etc/bash_completion.d/magento2-bash-completion https://raw.githubusercontent.com/yvoronoy/magento2-bash-completion/master/magento2-bash-completion
108118source /etc/bash_completion.d/magento2-bash-completion
109119
110120# Clean
0 commit comments