Giter Site home page Giter Site logo

civicactions / business_portal Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 82.46 MB

Business Portal Drupal Distro

License: MIT License

PHP 72.19% HTML 5.85% JavaScript 13.81% CSS 7.47% Shell 0.27% Gherkin 0.18% ApacheConf 0.02% CoffeeScript 0.01% Groff 0.01% Makefile 0.01% Perl 0.01% Ruby 0.17% Lua 0.02%

business_portal's Introduction

LA Business Portal

Business Portal Drupal Distro

Developer Workflow

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:

  1. https://help.github.com/articles/fork-a-repo/
  2. https://help.github.com/articles/using-pull-requests/

Sandbox

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.

DrupalVM dependencies

  1. 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.
  2. 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
  3. VirtualBox - This is a VM hypervisor that can be downloaded: https://www.virtualbox.org/wiki/Downloads
  4. If you're not on a Mac: your BIOS must have Virtualization enabled. Here's a guide for Lenovo

DrupalVM set up

  1. Install vagrant and virtualbox
  2. Clone repository into ~/Projects directory
  3. cd ~/Projects/business_portal/box
  4. vagrant plugin install vagrant-auto_network
  5. vagrant plugin install vagrant-hostsupdater
  6. sudo ansible-galaxy install -r provisioning/requirements.yml --force Note: If you are running Ubuntu with an encrypted hard drive, you will need to update config.yml to use rsync instead of nsf. Later on, you'll need to run vagrant rsync-auto to automatically sync file changes.
  7. vagrant up
  8. vagrant ssh
  9. Install the profile with drush @labp.dev si labp --account-name=admin --account-pass=admin or bash ~/Projects/business_portal/assets/install-local-drupalvm.sh
  10. 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:

  1. open a Finder window
  2. right click on the file
  3. click Get Info
  4. click the lock icon in the bottom right corner and type your OSX admin password
  5. add your user and select read & write permissions
  6. Follow steps below for rebuilding your VM

Rebuilding your VM

  1. Go to the box directory
  2. vagrant destroy -f
  3. vagrant up

DrupalVM usage

  1. If you have Drush installed on your host machine, DrupalVM will automatically set up an alias @labp.labp.dev to interact with DrupalVM
  2. 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

Using the example database

All steps below are assumed to be run from the command line

Step 0. While inside your VM (vagrant ssh), move to the labp directory

cd /var/www/labp

Step 1. Clear out your database

drush sql-drop -y

Step 2. Load prod database

drush sql-cli < /assets/FULL-2016-06-22T12-28-51.sql

Step 3. Enable stage file proxy

drush en stage_file_proxy -y

Step 4. Disable Acquia modules

drush dis acsf -y drush dis acquia_spi -y drush dis acquia_search_multi_subs -y

Step 5. Login as admin

drush uli

Step 6. Configure stage file proxy

  • 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.

Step 7. Change back to the development solr server

  • Go to admin/config/search/search_api
  • Enable LABP VM by clicking Enable under Operations (might already be enabled)
  • Disable Acquia Search by clicking Disable under Operations
  • Switch the server to LABP VM by clicking Edit under Operations for Default node index
  • Switch the server to LABP VM by clicking Edit under Operations for Resources & Incentives

Step 8. Clear cache

drush cc all

Compass and SASS installation with Bundler

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.

Step 1. Install bundler

cd /var/www/labp/docroot/profiles/labp/themes/la/labusinessportaltheme
gem install bundler

Please use sudo gem install bundler when running on DrupalVM

Step 2. Install required gems

bundle install

Step 3. Clean compass from the bundle

bundle exec compass clean

Step 4. Execute compass from the bundle

bundle exec compass compile

Step 5. Start a compass watch task

bundle exec compass watch

Step 6. Configure Solr

  • bash /assets/configure-solr.sh

Patches

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.

Field Group

Twitter Block

Text Hierarchical

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.