GithubHelp home page GithubHelp logo

joesb / wundertools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wunderio/wundertools

0.0 2.0 0.0 532 KB

Project reference configuration for use with Ansible & Vagrant

License: MIT License

Shell 13.31% Python 46.78% PHP 36.69% Gherkin 3.21%

wundertools's Introduction

Project reference setup with ansible & vagrant

##Setup

You can setup the IP address and the url of your vagrant machine on the Vagrantfile.

Edit the variables.yml file to setup the URL and dir for the docs of your project.

Remember to add also the entries in your hosts file for both the drupal install and the docs.

Requirements:

##Introduction

Start by running:

$ vagrant up

This will do the following:

  • clone the latest WunderMachina ansible/vagrant setup (or the version specified in conf/project.yml)
  • Bring up & provision the virtual machine (if needed)
  • Build the drupal site under drupal/current (not yet actually)

After finishing provisioning (first time is always slow) and building the site you need to install the Drupal site in http://x.x.x.x:8080/install.php (Note: on rare occasion php-fpm/varnish/e.g. requires to be restarted before starting to work. You can do this by issuing the following command:

$ vagrant ssh -c "sudo service php-fpm restart" $ vagrant ssh -c "sudo service varnish restart"

All Drupal related configurations are under drupal/conf

Drush is usable without ssh access with the drush.sh script e.g:

$ ./drush.sh cc all

To open up ssh access to the virtual machine:

$ vagrant ssh


Useful things

At the moment IP is configured in Vagrantfile variable INSTANCE_IP

Varnish responds to http://x.x.x.x/

Nginx responds to http://x.x.x.x:8080/

Solr responds to http://x.x.x.x:8983/solr

MailHOG responds to http://x.x.x.x:8025

Docs are in http://x.x.x.x:8080/index.html You can setup the dir where the docs are taken from and their URL from the variables.yml file.

    #Docs
    docs:
      hostname : 'docs.local.ansibleref.com'
      dir : '/vagrant/docs'

##Vagrant + Ansible configuration

Vagrant is using Ansible provision stored under the ansible subdirectory. The inventory file (which stores the hosts and their IP's) is located under ansible/inventory. Host specific configurations for Vagrant are stored in ansible/vagrant.yml and the playbooks are under ansible/playbook directory. Variable overrides are defined in ansible/variables.yml.

You should only bother with the following:

Vagrant box setup conf/vagrant.yml

What components do you want to install? conf/vagrant.yml

And how are those set up? conf/variables.yml

You can also fix your vagrant/ansible base setup to certain branch/revision conf/project.yml There you can also do the same for build.sh

Debugging tools

XDebug tools are installed via the devtools role. Everything should work out of the box for PHPStorm. PHP script e.g. drush debugging should also work.

Example sublime text project configuration (via Project->Edit Project):

{
   "folders":
   [
     {
       "follow_symlinks": true,
       "path": "/path/to/ansibleref"
     }
   ],

   "settings":
   {
     "xdebug": {
          "path_mapping": {
                "/vagrant" : "/path/to/ansibleref"
             }
        }
      }
}

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.