Business Portal Drupal Distro
We are using the conventional Fork and Pull development workflow, which is common for teams working with Github repositories.
Developers will have two remotes on their local repository, 1. the developer's fork, 2. the upstream repository.
Pull requests will be submitted from their fork into the upstream repository. This will be reviewed by a peer, any comments left on the pull request need resolved, and then the pull request can be merged. The merge will stage the pull request code for the daily deployments facilitated by ITA and CivicActions.
Github outlines this process well in their documentation:
We have instructions below for a sandbox solution built with DrupalVM. This can be used for a local setup and help affords consistency in our development operations. It's a recommendation, but not a requirement.
- Ansible - This is an automation tool that can be installed from pip with the following instructions: http://docs.ansible.com/ansible/intro_installation.html#latest-releases-via-pip . Make sure you have version 2.0.2.0 or later.
- Vagrant - This is a VM operations tool that can be downloaded: https://www.vagrantup.com/downloads.html. Make sure you have version 1.8.1
- VirtualBox - This is a VM hypervisor that can be downloaded: https://www.virtualbox.org/wiki/Downloads
- If you're not on a Mac: your BIOS must have Virtualization enabled. Here's a guide for Lenovo
- Install vagrant and virtualbox
- Clone repository into
~/Projects
directory cd ~/Projects/business_portal/box
vagrant plugin install vagrant-auto_network
vagrant plugin install vagrant-hostsupdater
sudo ansible-galaxy install -r provisioning/requirements.yml --force
Note: If you are running Ubuntu with an encrypted hard drive, you will need to updateconfig.yml
to use rsync instead of nsf. Later on, you'll need to runvagrant rsync-auto
to automatically sync file changes.vagrant up
vagrant ssh
- Install the profile with
drush @labp.dev si labp --account-name=admin --account-pass=admin
orbash ~/Projects/business_portal/assets/install-local-drupalvm.sh
- Visit labp.dev on your browser
If you receive a permissions error on the .ansible_galaxy
file in your home directory on OSX, follow these steps:
- open a Finder window
- right click on the file
- click Get Info
- click the lock icon in the bottom right corner and type your OSX admin password
- add your user and select read & write permissions
- Follow steps below for rebuilding your VM
- Go to the
box
directory vagrant destroy -f
vagrant up
- If you have Drush installed on your host machine, DrupalVM will automatically set up an alias
@labp.labp.dev
to interact with DrupalVM - If you require SSH access to access logs, manually alter system configuration, or access other tools
in the VM, run
vagrant ssh
from the box directory after set up
All steps below are assumed to be run from the command line
cd /var/www/labp
drush sql-drop -y
drush sql-cli < /assets/FULL-2016-06-22T12-28-51.sql
drush en stage_file_proxy -y
drush dis acsf -y
drush dis acquia_spi -y
drush dis acquia_search_multi_subs -y
drush uli
- Go to
admin/config/system/stage_file_proxy
- Enter
http://labp.cityofla.acsitefactory.com
for origin - Enter
sites/g/files/wph521/f
for the directory - Save configuration.
- Go to
admin/config/search/search_api
- Enable
LABP VM
by clickingEnable
underOperations
(might already be enabled) - Disable
Acquia Search
by clickingDisable
underOperations
- Switch the server to LABP VM by clicking
Edit
underOperations
forDefault node index
- Switch the server to LABP VM by clicking
Edit
underOperations
forResources & Incentives
drush cc all
Since Zen grids requires a specific set of versions for Compass/SASS/Zen grids gems, it is advisable to compile the SASS files with bundler.
Using compass watch
results in unreliable zen grids width calculations.
Note: The directories below assume you are running gem from your local computer.
If running from Outside DrupalVM, please substitute /var/www/labp
with ~/Projects/business_portal/docroot
.
cd /var/www/labp/docroot/profiles/labp/themes/la/labusinessportaltheme
gem install bundler
Please use sudo gem install bundler
when running on DrupalVM
bundle install
bundle exec compass clean
bundle exec compass compile
bundle exec compass watch
bash /assets/configure-solr.sh
The following patches are currently in use. When updating modules for this project please check to see if the module you are updating is listed here. If so be sure the functionality contained in all patches listed below has been included in the new version you're installing.