Git Product home page Git Product logo

vlad-project's Introduction

vlad-project

Small python script to download and arrange the file structure for a new Drupal project using VLAD.

Developed mainly against Ubuntu 15.04, but should work as well on recent OSX versions.

Sample workflow

The project envisions a workflow like this (especially for quickly getting up-to-speed on existing projects):

$ mkdir example.com
$ cd example.com
$ cp ../example_drupal.sql example_drupal.sql
$ git clone [email protected]:ctorgalson/vlad-project.git
$ ./vlad-project/setup.py [email protected]:username/example.com.git
$ cp ../settings.php example.com/docroot/sites/default/settings.php
$ cd vlad
$ vagrant up
$ cd ..
$ cp vlad-project/tools/* .
$ npm install
$ grunt

Rationale

This setup involves three permanent git repositories:

  1. The repository of the actual Drupal project ("example.com" above),
  2. The repository of the Vlad configuration (created by setup.py),
  3. The Vlad repository (as a submodule of the Vlad configuration repository).

This makes it possible to:

  1. Keep the development environment configuration out of the main Drupal repository, but
  2. Maintain a shareable development environment repository, and
  3. Make use of upstream updates to Vlad.

Sample workflow explained

The Sample workflow section above performs the following tasks:

mkdir example.com

  • Creates the project directory.

cd example.com

  • Make the new project directory the current working directory.

cp ../example_drupal.sql example_drupal.sql

  • Copies a Drupal database dump from some other directory to the current (project) directory.

git clone [email protected]:ctorgalson/vlad-project.git

  • Clones this repository into the project directory.

./vlad-project/setup.py [email protected]:username/example.com.git

  • Runs the setup.py script in this repository. The script:
    • Requests the following information:
      • The webserver hostname (e.g. example.dev),
      • Webserver hostname aliases: (e.g. www.example.dev,www1.example.dev),
      • The IP address for the box (e.g. 192.168.10.10 or 10.0.10.10),
      • The name for the box (e.g. EXAMPLE).
      • The host synced folder (i.e. the document root of the project repository, e.g. example.com/docroot),
      • The synced folder type (e.g nfs or possibly rsync),
      • The database name (e.g. example_drupal.sql),
      • The database import up setting (i.e. whether or not to import a databse dump into the database, e.g. example_drupal.sql),
    • Creates a file at settings/vlad_settings.yml. A sample version of this file, vlad_settings.example.yml can be found in the root of this repository.
    • Copies the database dump (if one was provided) into the location expected by Vlad.
    • Copies the drupal.yml Ansible playbook into place in the project directory.
    • Initializes a git repository (including a .gitignore file) in the project directory that:
      • Ignores the main project, adds the ./vlad directory as a git submodule, and adds all other non-excluded files to the repo.
    • Clones the github project provided into the project repository.

cp ../settings.php example.com/docroot/sites/default/settings.php

  • Copies a drupal settings.php file into the appropriate location in the project.

cd vlad

  • Changes the working directory to ./vlad.

vagrant up

  • Starts the virtual machine (this will take some time at the beginning).

cd ..

  • Returns to the project directory.

Optional: cp ./vlad-project/tools/* .

  • Copies two files, package.json and Gruntfile.js into the project directory. The Grunt file can be used to auto-rsync the Vagrant synced folder in cases where a) synced_folder_type is set to rsync, and b) rsync can't be made to work in another way. See next steps.

Optional: npm install

  • Installs Grunt dependencies.

Optional: grunt

  • Runs Grunt watch task.

vlad-project's People

Contributors

ctorgalson avatar

Watchers

James Cloos avatar  avatar

vlad-project's Issues

Use input instead of arguments

We need slightly more information than just the repository of the other project. We also want to collect:

  • webserver_hostname
  • webserver_hostname_aliases
  • boxipaddress
  • boxname
  • host_synced_folder
  • dbname

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.