Skip to content

Precip 2.0.0

Latest
Compare
Choose a tag to compare
@jeffgeorge jeffgeorge released this 01 Aug 20:50
· 52 commits to master since this release

Precip 2.0.0 - Now on Ubuntu 16.04

With Precip 2 we've moved to Ubuntu 16.04, swapped from mod_php to php-fpm, added PHP 7 support, added theme-compilation tools to the box, and nearly cleared our backlog of known issues.

Upgrading

As usual, you should just need to do the following:

vagrant halt
git pull
vagrant up --provision

If you experience any weirdness in doing so, then vagrant destory -f && vagrant up.

What's New

Ubuntu 16.04

Acquia recently completed their organization-wide upgrade to Ubuntu 16.04, to pave the way for PHP7 support and other stuff. As such, it was time for us to do the same.

PHP-FPM & PHP 7

PHP-FPM is the preferred means of running FastCGI worker pools for PHP. It's good for us because it's both the way Acquia runs PHP and also the way we're running PHP 5.6 and PHP 7 concurrently.

PHP-FPM allows us to define "pools" of PHP processes with different configurations. In our case, the main difference between our pools is that one's PHP 5.6 and one is PHP 7. Eventually we'll also add one for PHP 7.1. This means we can now switch individual docroots between 5.6 and 7. How? config.rb. By default all docroots are still using PHP 5.6. If you add a new directive to config.rb it'll swap between the two. For instance:

drupal_sites = {
  "test" => {
    "host" => "test.vm",
    "path" => "test/docroot",
    "php_version" => "7.0",
  }
}

vagrant reload --provision and when it's done your test host will be running PHP 7. Want to switch it back to 5.6? Change it to "php_version" => "5.6" or just remove that line, reload and reprovision. This will let you selectively test sites vs PHP 7 without breaking ones which might still depend on 5.6.

More tools baked in

nodejs, npm, yarn, compass, suzy, etc are all now baked in. That should be all you need to build a Radix or Omega-based theme, should you not be able to build it on your Host.

Similarly, we've fixed how composer is managed, got it upgraded, and also upgraded drush to 8.x. We also fixed our vmi.* aliases, so you've got an easy way to run stuff in Precip from your Host.

A bunch of new Flags & Extras

Precip 2 brings some new flags to config.rb:

forward_ssh_agent - Set it to true if you want to forward your Host's SSH Agent to Vagrant. Good if you want to be able to clone private repos inside the box without messing around with adding private keys and setting up an agent manually.

vm_name - Set it to "some_string" if you want to run precip with a different name. Good if you want to run two instances of precip. For instance, if you want to clone Precip 2.0.0 into a new directory without blowing up an existing and working instance of Precip 1.x.

use_packaged_precip - Set it to true if you want to use our slightly-more-bootstrapped version of Precip. Tradeoff: More downloading up-front for less time spent provisioning. Helpful if you're on a network that has restrictions around pulling Keys via HKP.

shell/custom.sh - We also added this 'custom' shell script, to help you run extra stuff as a last step in provisioning. It'll automatically get pulled in if it's present, and will automatically run during the provisioning phase and will run last. This is great for doing stuff we don't necessarily want to codify in Precip, but which you may want done. For instance, if you prefer zsh over bash, you can have it install zsh, oh-my-zsh and change your shell automatically. This file isn't tracked, so feel free to add whatever changes you want.