Giter Site home page Giter Site logo

tiffanyehrhart / intro-to-programming-2014 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nickdaugherty/intro-to-programming-2014

0.0 1.0 0.0 15.3 MB

Virtual Machine for the Automattic Grand Meetup 2014 Intro to Programming Code Academy course

Home Page: http://automattic.com

License: GNU General Public License v2.0

Ruby 0.45% Shell 5.18% Awk 1.00% Puppet 8.69% PowerShell 3.36% PHP 80.77% CSS 0.56%

intro-to-programming-2014's Introduction

Intro to Programming 2014

Overview

This is the Virtual Machine for the Automattic Grand Meetup 2014 Intro to Programming course.

It contains a full WordPress environment, slides, and exercises.

It is based off VIP Quickstart.

Requirements

Getting Started

The first time you run the installer will be the slowest. It’s also the most dependent on the speed of your internet connection. This is because it has to download the virtual machine image, Ubuntu package updates, the full checkout of WordPress trunk, and the full VIP Plugins repository. Subsequent runs will only update this base.

If Subversion is installed to your local PATH, the init script (no matter what operating system you're using) will use that. If not, no worries; we'll just offload SVN to the VM.

Unix

If you’re on a Unix-based machine with a Bash shell, setup is pretty easy:

  1. Clone the Intro to Programming Github repo
  2. Run the init script: ./bin/vip-init
  3. Go to http://vip.dev in your browser, login with username: wordpress, password: wordpress

The init script is setup such that you can run it multiple times and nothing will break. This means that you can also use it to update your environment in the future. If parts of the system are already up-to-date it will just skip those parts of the installer. So if you manually keep WordPress trunk up-to-date by running svn up, the init script will just show a message that the WordPress install is already at the latest changeset.

Windows

After installing all the requirements, complete the following steps to install VIP Quickstart.

Note: When you run the Git installer, make sure to install Git to your system PATH as the VIP Quickstart installer requires it.

  1. Clone the Intro to Programming Github repo
  2. Run the vip-init.bat file in wbin
  3. Go to http://vip.dev in your browser

If you receive a File cannot be loaded because the execution of scripts is disabled on this system error. Make sure you're using a PowerShell interface. Use tools -> options to manage your default shell. (Right click on the repository and choose "Open a shell here")

Usernames and Passwords

MySQL

  • root:(blank)
  • wordpress:wordpress

WordPress

  • wordpress:wordpress

Vagrant Primer

The Vagrant CLI documentation will be useful for developers that haven't used Vagrant before. Since VIP Quickstart is built on top of Vagrant, the Vagrant CLI commands will also work.

Some useful commands:

  • vagrant up - Start and provisions the VM
  • vagrant halt - Stops the VM
  • vagrant reload - Restarts and provisions the VM
  • vagrant provision - Provisions the VM
  • vagrant ssh - Logs into the VM with ssh
  • vagrant destroy - Deletes the VM

Unit Testing

VIP Quickstart comes with a checkout of the WordPress-Tests automated testing framework. You can use this to run the unit tests for WordPress itself or for any plugin or theme that has phpunit tests defined.

To run the WordPress unit tests

  1. CD to /srv/www/wp-tests from within the VM.
  2. Run phpunit

To create unit tests for your plugin/theme

  1. Navigate to your theme or plugin within the VM. (eg. /srv/www/wp-content/plugins/my-plugin)
  2. Use WP CLI to the generate the plugin test files. Eg. /srv/www/wp-cli/bin/wp scaffold plugin-tests my-plugin
  3. Run phpunit inside your theme or plugin directory.
  4. Start building your tests within the newly created tests directory.

Customize

If you want to add custom packages, install custom dotfiles, or make any other customizations, there are a few methods.

First, you can add a Vagrantfile to the ~/.vagrant.d directory. Vagrant loads this before the Vagrantfile for the project so you can do things like install text editors or other tools, sync local directories to the VM, or anything else you might want to do to customize the environment. You can even add a shell provisioner to run your own shell script. One of the great parts about this method is that it will run on every Vagrant machine you used so all of your projects can benefit from it.

Another method is to add new manifests to puppet/manifests/sections and they'll be automatically loaded. You'll probably want to add them to your .gitignore file so they don't interfere with other git operations.

Submodules

The puppet modules are all set up as submodules in puppet/modules. In general, you shouldn't have to worry about this because the vip-init script will update the submodules automatically. Just noting here for documentation purposes at this point.

Acknowledgements

Thanks to the following projects that VIP Quickstart is built on:

If you're not developing for WordPress.com VIP, you might want to check out these other Vagrant/WordPress projects

intro-to-programming-2014's People

Contributors

joshbetz avatar nickdaugherty avatar mobius5150 avatar danielbachhuber avatar mjangda avatar johnpbloch avatar sboisvert avatar whyisjake avatar ziz avatar mattoperry avatar nickgernert avatar developdaly avatar pdclark avatar

Watchers

 avatar

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.