Hey folks! Let's do some spring winter cleaning! If you do work using Homestead, now might be a good time to update and re-build your box: we want to make sure everyone's environments are up to date and as close to production as possible (newer Ubuntu, MariaDB, and ext-newrelic
extension).
This should take between 10-60 minutes (depending on whether you need to download a new box). ⏱️
To make sure you're using the latest and greatest, download the latest VirtualBox (5.2.22) and Vagrant (2.2.2).
Update your Homestead.yaml
to use MariaDB for SQL databases:
# Install MongoDB. If you're not working on
# Northstar, you can set this to `false`.
mongodb: true
+ # Use MariaDB for SQL databases.
+ mariadb: true
Update your after.sh
to set your default PHP to 7.2 & install the New Relic PHP extension:
#!/bin/sh
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
# Switch to PHP 7.2 for the default CLI.
sudo update-alternatives --set php /usr/bin/php7.2
sudo update-alternatives --set php-config /usr/bin/php-config7.2
sudo update-alternatives --set phpize /usr/bin/phpize7.2
# Install New Relic agent:
sudo sh -c "echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' > /etc/apt/sources.list.d/newrelic.list"
wget -O- https://download.newrelic.com/548C16BF.gpg | sudo apt-key add -
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install newrelic-php5
Then, run the following from your Homestead directory:
# Download the latest box, with Ubuntu 18.04:
vagrant box update
# Get the latest Homestead release and re-build:
git fetch --tags && git checkout v7.20.0
cp resources/aliases aliases
vagrant destroy && vagrant up
And you're good to go! Your local databases have been reset, so be sure to run migrations & seeders.
🎉