Code Monkey home page Code Monkey logo

vagrant-base-web's Introduction

WSU Magento Development platform

Overview

The goal of this project is to make a very simple way for someone to do development against the production version of the Magento solution. This setup is done in a way that should let the user follow only a few steps before then can login to the admin area and begin development work.

  1. install the base apps

    1. GITHUB (win|mac)
    2. Vagrant (for help installing see wiki)
    3. VirtualBox (for help installing see wiki)
    4. Ruby(only needed if using windows see the wiki for help) Note: if your on a mac you must have ruby 1.9 or above. Look to this article to update your ruby
  2. run in powershell/command line

     > git clone git://github.com/jeremyBass/vagrant-base-web.git webbase
    
  3. move to the new directory

     > cd webbase
    
  4. run in powershell/command line/terminal

     > rake start
    

Some this to note is that you wil be asked questions. If you need help, look to the task options wiki page

Now if this is the first time you have ever run then the rake start task will install anything that is needed and check to make sure everything is ok. It'll prompt you as it goes, but after a few minutes the first time around, you will have the admin area for Magento up and ready to log in. It really is as simple as these 4 steps to get up and running. On a fresh system, seeing the Magento admin page took about 5-10 minutes depending on the power of the machine your ran it on and it's internet connections. There will be a tune it up section in the wiki area later on.

If you have use Vagrant, then you'll know that most of the time you need to mess with config files, install plugins, and have to do some of your own clean up if you want to start from scratch.
What this project is designed to do it wrap Vagrant in a rake task for Ruby. By doing this we can perform tests that the host system is ready to vagrant up and can ask questions verse requiring the developer to mess around with the configs. This means you can totally bring up and down a box much faster by automating as much as possible.


##The Ruby wrapper ###Rake Tasks Although you could just use the Vagrant commands, the whole point of this project is that there are questions about the environment you want to set up. In order to take advantage of this, here are a list of the rake tasks:

Primary Tasks

  1. rake start :: basically vagrant up but with prompts (this runs a few other tasks to ensure that the system is ready to vagrant up)
  2. rake end :: this task is vagrant destroy with options to clean up the database if it needs it.
  3. rake hardclean :: runs all the cleaners
  4. rake fresh :: takes the system back to basic (will prompt to uninstall gems and vagrant plugins)
  5. rake restart :: this task will time the running of rake end and then rake up which should provide a very fast full down and up

Tasks to match Vagrant

  1. rake up :: vagrant up (only adds timer and events)
  2. rake destroy :: vagrant destroy (only adds timer and events)
  3. rake halt :: vagrant halt (only adds timer and events)
  4. rake reload :: vagrant reload (only adds timer and events)
  5. rake suspend :: vagrant suspend (only adds timer and events)
  6. rake pull :: match the local to the production
  7. rake push :: push up to production (would need to authenticate)

Utility tasks

  1. rake clean_db :: This is to clear the shared database folder
  2. rake clean_www :: This is to clear the shared web folder
  3. rake create_install_settings :: create the settings for the installer
  4. rake test :: this is for testing that all the plugins are there, if not then install them?
  5. rake open :: Opens up your default browser and loads your url from settings

Events

Because this is a ruby rake task wrapper for Vagrant, we can add a few helpers to improve the process. One of the first things is that there are event hooks that you can inject your personal parts to.
All event files are located in /rake/events and will have the file name in the format of {Event_type}_{Task_name}.rb. The events that are set up for you are

  1. Pre
  2. Post

So for example if you wanting to do something before everything else when rake start is ran, then you would need to add your event file named, /Pre_start.rb There is a sample file to look at as well in the /rake folder (EXAMPLE_Pre_start.rb). From there you area now able to do more custom actions like copying some files in place or something.

###Gems that are autoloaded

  1. json
  2. highline
  3. launchy

##Vagrant Just to note you can by pass the rake taskes and just use Vagrant on it's own, but you will have to magage your files on your own, and make sure that you edit your configs too. There is a lot to learn under the hood.

###Vagrant plugins that are autoloaded

  1. vagrant-hostsupdater

Customizable settings

Credentials and Such

MySQL Root (defaults)

  • User: root
  • Pass: blank

What's loaded on the systems?

There are 3 servers that run when mirroring the production servers, or just one if you want a development base. note: This set up is currently a Shell provisioner only. Later when branching, there will be a switch to CentOS and to a new provisioner option. Currently options are Chef and Salt as considered

  1. Ubuntu 12.04 LTS (Precise Pangolin)
  2. nginx 1.4.2
  3. mysql 5.5.32
  4. php-fpm 5.4.17
  5. memcached 1.4.13
  6. PHP memcache extension 3.0.8
  7. xdebug 2.2.3
  8. PHPUnit 3.7.24
  9. ack-grep 2.04
  10. git 1.8.3.4
  11. ngrep
  12. dos2unix
  13. phpMemcachedAdmin 1.2.2 BETA

Note this is the highlights, for a full list look here


Rightfully questioning this project extensiveness

So moving forward, the ruby wrapper is built out to be able to have use for Wordpress (or any other setup) like many of the other vagrant projects, but should it be totally abstracted enough for that? Maybe if there is interest it would be and at which point then there would be a wrapper project on its own and this would be reduced do to only the Magento parts of the environment.

Feedback?

keep it to your self.. no tell it like it is but atm there is no area to yell at except on here.

Contributing

If you find what looks like a bug:

  1. Search the [mailing list] COMING SOON
  2. Check the GitHub issue tracker to see if anyone else has reported issue.
  3. If you don't see anything, create an issue with information on how to reproduce it.

If you want to contribute an enhancement or a fix: (will be better defined later)

  1. Fork the project on GitHub.
  2. Make your changes with tests.
  3. Commit the changes to your fork.
  4. Send a pull request.

Original Author: jeremyBass

vagrant-base-web's People

Stargazers

 avatar

Forkers

laurieannbass

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.