Getting Started - AamAadmiParty/india-standalone-drupal GitHub Wiki

Assumptions

This document assumes that you are okay with the prerequisites listed below that and you work on using a *nix (linux) based system or a mac. (If you use windows, most of the instructions remain same, but you would be using your widows specific tools. Feel free to create a new wiki page for details windows based instructions and link it here.)

Prerequisites

  1. Familiarity with drupal development - http://drupal.org/
  2. Familiarity with git and github
  3. Drupal development environment setup on your local machine (lamp, drush, saas/compass etc)

Get the site setup on your local machine

  1. Fork this repository to create a copy in your github account - https://github.com/AamAadmiParty/india-standalone-drupal
  2. git clone https://github.com/YOUR-GITHUB-ACCOUNT/india-standalone-drupal inside your webserver document root
  3. make sure you are on the develop branch - git branch -a > git checkout develop
  4. create a new empty database on your local machine
  5. create settings.php file inside the sites/default folder of your drupal clone and add in the details to connect to the database
    1. Early contributors - Download the latest database dump from here ( with, user / password = congress / bjp ) and source it into your empty local database (hint: you can use drush slq-cli for this.
    2. Trusted contributors - You probably already have access to the development server as per the notes here so you can just do a drush sql-sync between the development and the local machine. For this you would need to setup and aliases file as per the post here. Here is a sample file
  6. create a sites/default/files folder inside your local drupal clone, give it permissions such that your web server user can write to it, and get it populated with all the content
    1. Early contributors - Download the latest file dump from here ( with, user / password = congress / bjp )
    2. Trusted contributors - You can use the above method -- or -- use drush rsync @remote_dev_alias:%files @local_alias:%files (but with the correct alias names)
  7. drush cc all
  8. Optional: Create a new virtualhost within your server for the site you have just setup. You might also create an entry in /etc/hosts records.
  9. update the admin user password to anything easy for you to use - drush upwd admin --password=SOMETHING
  10. Test that the site is working now on your local machine.

Making changes and releasing them to dev or prod

  1. create a new git branch from the tip of develop branch git checkout develop + git pull + git checkout -b SOME_BRANCH
  2. make the changes (adding new modules, theme, css, whatever)
  3. export as many changes from the drupal admin UI as you can using the features module
  4. commit all your changes often
  5. send in a pull request against this original repository - https://github.com/AamAadmiParty/india-standalone-drupal . Read more about it here - https://help.github.com/articles/creating-a-pull-request
  6. create a new issue or update an existing issue with details about your work **especially mentioning any changes in step 3 above that you could not export to features (since they need to be manually repeated on the dev and prod server)