Updated Vagrant for Ubuntu Bionic.

pull/2/head
Cédric Bonhomme 2018-09-21 15:33:20 +02:00
parent 173b0706dc
commit 83c41371f4
No known key found for this signature in database
GPG Key ID: A1CB94DE57B7A70D
3 changed files with 32 additions and 7 deletions

View File

@ -14,7 +14,7 @@ Installation of VirtualBox and Vagrant
.. code-block:: bash
$ sudo apt-get install virtualbox vagrant
$ sudo apt install virtualbox vagrant
Deployment of the back office
@ -30,7 +30,7 @@ MONARC will be automatically deployed in an Ubuntu Artful Server.
$ vagrant up
Once the VM will be configured by Vagrant, go to the address
http://127.0.0.1:5001.
http://127.0.0.1:5000.
The username is *admin@admin.test* and the password is *admin*.

2
vagrant/Vagrantfile vendored
View File

@ -10,7 +10,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "fso/artful64"
config.vm.box = "ubuntu/bionic64"
config.vm.provision :shell, path: "bootstrap.sh", args: "#{ENV['GITHUB_AUTH_TOKEN']}"
# Disable automatic box update checking. If you disable this, then

View File

@ -26,7 +26,7 @@ post_max_size=50M
max_execution_time=100
max_input_time=223
memory_limit=512M
PHP_INI=/etc/php/7.1/apache2/php.ini
PHP_INI=/etc/php/7.2/apache2/php.ini
export DEBIAN_FRONTEND=noninteractive
export LANGUAGE=en_US.UTF-8
@ -44,14 +44,39 @@ echo -e "\n--- Install base packages… ---\n"
apt-get -y install vim zip unzip git gettext > /dev/null
echo -e "\n--- Install MariaDB specific packages and settings… ---\n"
echo "mysql-server mysql-server/root_password password $DBPASSWORD_ADMIN" | debconf-set-selections
echo "mysql-server mysql-server/root_password_again password $DBPASSWORD_ADMIN" | debconf-set-selections
# echo "mysql-server mysql-server/root_password password $DBPASSWORD_ADMIN" | debconf-set-selections
# echo "mysql-server mysql-server/root_password_again password $DBPASSWORD_ADMIN" | debconf-set-selections
apt-get -y install mariadb-server mariadb-client > /dev/null
# Secure the MariaDB installation (especially by setting a strong root password)
systemctl restart mariadb.service > /dev/null
sleep 5
apt-get -y install expect > /dev/null
## do we need to spawn mysql_secure_install with sudo in future?
expect -f - <<-EOF
set timeout 10
spawn mysql_secure_installation
expect "Enter current password for root (enter for none):"
send -- "\r"
expect "Set root password?"
send -- "y\r"
expect "New password:"
send -- "${DBPASSWORD_ADMIN}\r"
expect "Re-enter new password:"
send -- "${DBPASSWORD_ADMIN}\r"
expect "Remove anonymous users?"
send -- "y\r"
expect "Disallow root login remotely?"
send -- "y\r"
expect "Remove test database and access to it?"
send -- "y\r"
expect "Reload privilege tables now?"
send -- "y\r"
expect eof
EOF
sudo apt-get purge -y expect > /dev/null 2>&1
echo -e "\n--- Installing PHP-specific packages… ---\n"
apt-get -y install php apache2 libapache2-mod-php php-curl php-gd php-mcrypt php-mysql php-pear php-apcu php-xml php-mbstring php-intl php-imagick php-zip > /dev/null
apt-get -y install php apache2 libapache2-mod-php php-curl php-gd php-mysql php-pear php-apcu php-xml php-mbstring php-intl php-imagick php-zip > /dev/null
echo -e "\n--- Configuring PHP ---\n"
for key in upload_max_filesize post_max_size max_execution_time max_input_time memory_limit