From 2dfef6630d6876577fbf571e0611a875ad79431e Mon Sep 17 00:00:00 2001 From: Ryan Neufeld Date: Wed, 12 Feb 2014 13:54:33 -0800 Subject: [PATCH 1/3] Adding vagrantfile --- .gitignore | 1 + Vagrantfile | 32 ++++++++++++++++++++++++++++++++ uploads/.gitkeep | 0 3 files changed, 33 insertions(+) create mode 100644 Vagrantfile create mode 100644 uploads/.gitkeep diff --git a/.gitignore b/.gitignore index 90cbe058..3547f762 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /gw-resources/* +.vagrant diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 00000000..bbc3afa6 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,32 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : +VAGRANTFILE_API_VERSION = "2" +Vagrant.require_version ">= 1.4.0" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + + # use the config key as the vm identifier + config.vm.box = "jquery-wp-content" + config.vm.box_download_checksum_type = "sha256" + config.vm.box_download_checksum = "3182bc50668e86022e7d50bc8c096774b49de40cfaffc77f4fad75ca6cf83d3d" + + config.vm.box_url = "http://boxes.jquery.com/jquery-wp-content.box" + + config.vm.synced_folder "./", "/var/www/wordpress/jquery-wp-content" + + # assign an ip address in the hosts network + config.vm.network "private_network", ip: "172.27.72.27" + + # set the hostname of the vm so puppet site.pp will react + # with the right node config + # config.vm.provision :shell, :inline => "hostname vagrant.jquery.com" + config.vm.hostname = "vagrant.jquery.com" + + config.vm.provider "virtualbox" do |v| + # make sure that the name makes sense when seen in the vbox GUI + v.name = "jQuery Sites" + + # Be nice to our users. + v.customize ["modifyvm", :id, "--cpuexecutioncap", "50"] + end +end diff --git a/uploads/.gitkeep b/uploads/.gitkeep new file mode 100644 index 00000000..e69de29b From 99da3f30d13b50a6a84ba3feab573a761d03045c Mon Sep 17 00:00:00 2001 From: Ryan Neufeld Date: Wed, 19 Feb 2014 23:05:07 -0800 Subject: [PATCH 2/3] Adding docs --- INSTALL.md | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 118 ++++++++----------------------------------- 2 files changed, 166 insertions(+), 98 deletions(-) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 00000000..b7836431 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,146 @@ +# jQuery.com jquery-wp-content + +`jquery-wp-content` is a **custom replacement** for the `wp-content` directory which contains the plugins, themes and site configuration to run the jQuery multi-site WordPress network. + +## Prerequisites + +This install guide assumes you already have certain prerequisites already configured within your environment. + +* Apache +* Mysql +* PHP + +## Installation + +1. Configure your local webserver with a virtual host that covers the relevant jQuery domains, such as `*.jquery.com` and `*.jqueryui.com`, all pointing to the same root. For example, in Apache: + + ``` + + ServerName local.jquery.com + ServerAlias *.jquery.com *.jqueryui.com *.jquery.org *.qunitjs.com *.sizzlejs.com *.jquerymobile.com + DocumentRoot "/srv/www/jquery" + php_value memory_limit 256M + + Options All + AllowOverride All + Order allow,deny + Allow from all + + + ``` + + Make sure that virtual hosts are enabled as well: + + ``` + NameVirtualHost *:80 + ``` + + Both blocks of code should be pasted into `extra/httpd-vhosts.conf`. + Be sure to check `httpd.conf` to verify there is a line that includes + `httpd-vhosts.conf`. It may already exist, but be commented out. + + Check `httpd.conf` to ensure that the PHP module is enabled as well. + + You do not need to configure your `/etc/hosts` file for `local.*` because `jquery.com`'s DNS handles this for you. However, if you plan to work offline, you can use the following rules: + + ``` + 127.0.0.1 local.jquery.com local.api.jquery.com local.blog.jquery.com local.books.jquery.com local.codeorigin.jquery.com local.learn.jquery.com local.plugins.jquery.com + 127.0.0.1 local.jqueryui.com local.api.jqueryui.com local.blog.jqueryui.com + 127.0.0.1 local.jquerymobile.com local.api.jquerymobile.com local.blog.jquerymobile.com + 127.0.0.1 local.jquery.org local.brand.jquery.org local.contribute.jquery.org local.events.jquery.org local.irc.jquery.org local.meetings.jquery.org + 127.0.0.1 local.qunitjs.com local.api.qunitjs.com + 127.0.0.1 local.sizzlejs.com + ``` + +1. Place the WordPress core files **at** the document root you chose. For example, if you used `/srv/www/jquery`, you should unzip or clone WordPress directly into that directory, *not* a directory below it. **Do not install WordPress.** You can do this any number of ways: + * Download the latest version from http://wordpress.org/latest.zip + * Check out the latest tag from http://core.svn.wordpress.org/tags/ + * Clone the official WordPress Github mirror at https://github.com/WordPress/WordPress + +1. Clone `jquery-wp-content` inside of the directory where you put WordPress, so you have a file tree that looks like this: + + ``` + ├── jquery + │   ├── gw-resources + │   ├── index.php + │   ├── jquery-wp-content + │   ├── license.txt + │   ├── readme.html + │   ├── wp-activate.php + │   ├── wp-admin + │   ├── wp-blog-header.php + │   ├── wp-comments-post.php + │   ├── wp-config-sample.php + │   ├── wp-content + │   ├── ... + │   └── xmlrpc.php + ``` + +1. Create a MySQL database and user. You can choose any name you want for both. Follow the [WordPress instructions](http://codex.wordpress.org/Installing_WordPress#Step_2:_Create_the_Database_and_a_User) for a step by step guide. + +1. Copy `jquery-wp-content/wp-config-sample.php` and move it up one directory, to `wp-config.php`. Fill in your database credentials. + +1. Create an .htaccess file with the following content into that same document root: + + ``` + RewriteEngine On + RewriteBase / + RewriteRule ^index\.php$ - [L] + + RewriteRule ^resources/?$ index.php [L] + RewriteRule ^resources/(.+) gw-resources/%{HTTP_HOST}/$1 [L] + + # Add a trailing slash to the wp-admin of a subsite. + RewriteRule ^([_0-9a-zA-Z\.-]+/)?wp-admin$ $1wp-admin/ [R=301,L] + + RewriteCond %{REQUEST_FILENAME} -f [OR] + RewriteCond %{REQUEST_FILENAME} -d + RewriteRule ^ - [L] + + # Handle wp-admin, wp-includes, and root PHP files for subsites. + RewriteRule ^[_0-9a-zA-Z\.-]+/((wp-admin|wp-includes).*) $1 [L] + RewriteRule ^[_0-9a-zA-Z\.-]+/(.*\.php)$ $1 [L] + + RewriteRule . index.php [L] + ``` + +1. Make sure that you have assigned your WordPress files and directories the correct permissions. +For example, if your WordPress files are in the directory ```wordpress```, and you are running Apache under Mac OS X with the ```_www``` user: + + ``` + sudo chown -R _www wordpress + sudo chmod -R g+w wordpress + ``` + +1. Restart your web server so the changes above are in use. + +1. Go to `http://local.jquery.com` and walk through the standard WordPress installation. `jquery-wp-content` includes a special install script that will initialize the entire network. + +1. Be sure to have node >= 0.8 installed on your system. Some sites, such as download.jqueryui.com, require that version or greater. + +## Auto-Updates +Changes pushed to master will be pulled onto the stage domain. + +## Copyright + +Copyright 2014 jQuery Foundation and other contributors. All rights reserved. + +The `jquery-wp-content` repository contains themes for rendering all jQuery Foundation web sites. + +### What is licensed + +The contents of the web sites that run on top of `jquery-wp-content` are all available under the terms of the MIT license ( http://jquery.org/license ). + +Special exception: Code samples are given away for you to freely use, for any purpose. For code samples in API sites +and Learn articles (unlike the source code of jQuery projects) you don't even have to say where you got the code from. +Just use it. + +The PHP files in the `jquery-wp-content` repository are a derivative work of WordPress, and available under the +terms of the GPL license ( http://codex.wordpress.org/License ). + +### What is not licensed + +The design, layout, and look-and-feel of the `jquery-wp-content` repository, including all CSS, images, and +icons, are copyright jQuery Foundation, Inc. and are not licensed for use. Designs and CSS from `jquery-wp-content` may not be used on any site, personal or commerical, without prior written consent from the jQuery Foundation. `jquery-wp-content` contains CSS, images, and icons that are copyrighted by other individuals; those items are licensed under their original terms. + +The only permitted (and encouraged) exception to "use" is the case of cloning/forking this repository in order to create a local development environment to facilitate making contributions to jQuery Foundation websites. diff --git a/README.md b/README.md index 62a7eb84..523ce4b2 100644 --- a/README.md +++ b/README.md @@ -1,126 +1,48 @@ -# jQuery.com jquery-wp-content +# jQuery.com jquery-wp-content Virtual Machine Environment `jquery-wp-content` is a **custom replacement** for the `wp-content` directory which contains the plugins, themes and site configuration to run the jQuery multi-site WordPress network. +If you would like instructions for installing this plugin you can find them in the [INSTALL.md](INSTALL.md) file in this directory. ## Prerequisites This install guide assumes you already have certain prerequisites already configured within your environment. -* Apache -* Mysql -* PHP +* Virtualbox >=4.3+ +* Vagrant >=1.4.0 ## Installation -1. Configure your local webserver with a virtual host that covers the relevant jQuery domains, such as `*.jquery.com` and `*.jqueryui.com`, all pointing to the same root. For example, in Apache: +Assuming you've met the prerequisites the process of starting the VM is simple. - ``` - - ServerName local.jquery.com - ServerAlias *.jquery.com *.jqueryui.com *.jquery.org *.qunitjs.com *.sizzlejs.com *.jquerymobile.com - DocumentRoot "/srv/www/jquery" - php_value memory_limit 256M - - Options All - AllowOverride All - Order allow,deny - Allow from all - - - ``` - - Make sure that virtual hosts are enabled as well: - - ``` - NameVirtualHost *:80 - ``` - - Both blocks of code should be pasted into `extra/httpd-vhosts.conf`. - Be sure to check `httpd.conf` to verify there is a line that includes - `httpd-vhosts.conf`. It may already exist, but be commented out. - - Check `httpd.conf` to ensure that the PHP module is enabled as well. - - You do not need to configure your `/etc/hosts` file for `local.*` because `jquery.com`'s DNS handles this for you. However, if you plan to work offline, you can use the following rules: +From the root of your `jquery-wp-content` clone run the following command: ``` - 127.0.0.1 local.jquery.com local.api.jquery.com local.blog.jquery.com local.books.jquery.com local.codeorigin.jquery.com local.learn.jquery.com local.plugins.jquery.com - 127.0.0.1 local.jqueryui.com local.api.jqueryui.com local.blog.jqueryui.com - 127.0.0.1 local.jquerymobile.com local.api.jquerymobile.com local.blog.jquerymobile.com - 127.0.0.1 local.jquery.org local.brand.jquery.org local.contribute.jquery.org local.events.jquery.org local.irc.jquery.org local.meetings.jquery.org - 127.0.0.1 local.qunitjs.com local.api.qunitjs.com - 127.0.0.1 local.sizzlejs.com + vagrant up ``` -1. Place the WordPress core files **at** the document root you chose. For example, if you used `/srv/www/jquery`, you should unzip or clone WordPress directly into that directory, *not* a directory below it. **Do not install WordPress.** You can do this any number of ways: - * Download the latest version from http://wordpress.org/latest.zip - * Check out the latest tag from http://core.svn.wordpress.org/tags/ - * Clone the official WordPress Github mirror at https://github.com/WordPress/WordPress +Complete the installation process by pointing your browser at (http://vagrant.jquery.com/). Feel free to use any username/password/email combination that you choose, though keep note of the username and password as you will need to be able to deploy to your local vm. -1. Clone `jquery-wp-content` inside of the directory where you put WordPress, so you have a file tree that looks like this: - - ``` - ├── jquery - │   ├── gw-resources - │   ├── index.php - │   ├── jquery-wp-content - │   ├── license.txt - │   ├── readme.html - │   ├── wp-activate.php - │   ├── wp-admin - │   ├── wp-blog-header.php - │   ├── wp-comments-post.php - │   ├── wp-config-sample.php - │   ├── wp-content - │   ├── ... - │   └── xmlrpc.php - ``` - -1. Create a MySQL database and user. You can choose any name you want for both. Follow the [WordPress instructions](http://codex.wordpress.org/Installing_WordPress#Step_2:_Create_the_Database_and_a_User) for a step by step guide. - -1. Copy `jquery-wp-content/wp-config-sample.php` and move it up one directory, to `wp-config.php`. Fill in your database credentials. - -1. Create an .htaccess file with the following content into that same document root: - - ``` - RewriteEngine On - RewriteBase / - RewriteRule ^index\.php$ - [L] - - RewriteRule ^resources/?$ index.php [L] - RewriteRule ^resources/(.+) gw-resources/%{HTTP_HOST}/$1 [L] - - # Add a trailing slash to the wp-admin of a subsite. - RewriteRule ^([_0-9a-zA-Z\.-]+/)?wp-admin$ $1wp-admin/ [R=301,L] - - RewriteCond %{REQUEST_FILENAME} -f [OR] - RewriteCond %{REQUEST_FILENAME} -d - RewriteRule ^ - [L] - - # Handle wp-admin, wp-includes, and root PHP files for subsites. - RewriteRule ^[_0-9a-zA-Z\.-]+/((wp-admin|wp-includes).*) $1 [L] - RewriteRule ^[_0-9a-zA-Z\.-]+/(.*\.php)$ $1 [L] - - RewriteRule . index.php [L] - ``` +Yes, it's really that easy! -1. Make sure that you have assigned your WordPress files and directories the correct permissions. -For example, if your WordPress files are in the directory ```wordpress```, and you are running Apache under Mac OS X with the ```_www``` user: +You do not need to configure your `/etc/hosts` file for `vagrant.*` because `jquery.com`'s DNS handles this for you. However, if you plan to work offline, you can use the following rules: ``` - sudo chown -R _www wordpress - sudo chmod -R g+w wordpress + 172.27.72.27 vagrant.jquery.com vagrant.api.jquery.com vagrant.blog.jquery.com vagrant.books.jquery.com vagrant.codeorigin.jquery.com vagrant.learn.jquery.com vagrant.plugins.jquery.com + 172.27.72.27 vagrant.jqueryui.com vagrant.api.jqueryui.com vagrant.blog.jqueryui.com + 172.27.72.27 vagrant.jquerymobile.com vagrant.api.jquerymobile.com vagrant.blog.jquerymobile.com + 172.27.72.27 vagrant.jquery.org vagrant.brand.jquery.org vagrant.contribute.jquery.org vagrant.events.jquery.org vagrant.irc.jquery.org vagrant.meetings.jquery.org + 172.27.72.27 vagrant.qunitjs.com vagrant.api.qunitjs.com + 172.27.72.27 vagrant.sizzlejs.com ``` -1. Restart your web server so the changes above are in use. +## Stopping the Virtual Machine -1. Go to `http://local.jquery.com` and walk through the standard WordPress installation. `jquery-wp-content` includes a special install script that will initialize the entire network. +When you're not working on `jquery-wp-content` you'll probably want to run `vagrant halt` to turn off the VM to save yourself some system resources. Alternatively you can suspend the VM by using `vagrant suspend` -1. Be sure to have node >= 0.8 installed on your system. Some sites, such as download.jqueryui.com, require that version or greater. +## Unstallation -## Auto-Updates -Changes pushed to master will be pulled onto the stage domain. +Should you need to recover some harddrive space you can safely run the `vagrant destroy` command from within your `jquery-wp-content` clone. This will delete the VM image from your hard drive. **You will not lose any work by doing this.** ## Copyright From c998b954bb5e89279c24658a77d7039c3a60c6c6 Mon Sep 17 00:00:00 2001 From: Ryan Neufeld Date: Mon, 24 Feb 2014 18:10:35 -0800 Subject: [PATCH 3/3] Addressing Scott's requests from PR.package.box --- INSTALL.md | 181 +++++++++++++++++++++++------------------------------ README.md | 86 +++++++++++++++++-------- 2 files changed, 140 insertions(+), 127 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index b7836431..7f17a159 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,10 +1,14 @@ -# jQuery.com jquery-wp-content +# jquery-wp-content `jquery-wp-content` is a **custom replacement** for the `wp-content` directory which contains the plugins, themes and site configuration to run the jQuery multi-site WordPress network. +## Warning + +Configuring your own services can result in different configurations from the prodution environment. It is strongly encouraged to use the virtual machine environment as described in [README.md](README.md). + ## Prerequisites -This install guide assumes you already have certain prerequisites already configured within your environment. +This install guide assumes you have certain prerequisites already configured within your environment. * Apache * Mysql @@ -14,43 +18,43 @@ This install guide assumes you already have certain prerequisites already config 1. Configure your local webserver with a virtual host that covers the relevant jQuery domains, such as `*.jquery.com` and `*.jqueryui.com`, all pointing to the same root. For example, in Apache: - ``` - - ServerName local.jquery.com - ServerAlias *.jquery.com *.jqueryui.com *.jquery.org *.qunitjs.com *.sizzlejs.com *.jquerymobile.com - DocumentRoot "/srv/www/jquery" - php_value memory_limit 256M - - Options All - AllowOverride All - Order allow,deny - Allow from all - - - ``` - - Make sure that virtual hosts are enabled as well: - - ``` - NameVirtualHost *:80 - ``` - - Both blocks of code should be pasted into `extra/httpd-vhosts.conf`. - Be sure to check `httpd.conf` to verify there is a line that includes - `httpd-vhosts.conf`. It may already exist, but be commented out. - - Check `httpd.conf` to ensure that the PHP module is enabled as well. - - You do not need to configure your `/etc/hosts` file for `local.*` because `jquery.com`'s DNS handles this for you. However, if you plan to work offline, you can use the following rules: - - ``` - 127.0.0.1 local.jquery.com local.api.jquery.com local.blog.jquery.com local.books.jquery.com local.codeorigin.jquery.com local.learn.jquery.com local.plugins.jquery.com - 127.0.0.1 local.jqueryui.com local.api.jqueryui.com local.blog.jqueryui.com - 127.0.0.1 local.jquerymobile.com local.api.jquerymobile.com local.blog.jquerymobile.com - 127.0.0.1 local.jquery.org local.brand.jquery.org local.contribute.jquery.org local.events.jquery.org local.irc.jquery.org local.meetings.jquery.org - 127.0.0.1 local.qunitjs.com local.api.qunitjs.com - 127.0.0.1 local.sizzlejs.com - ``` +``` + + ServerName local.jquery.com + ServerAlias *.jquery.com *.jqueryui.com *.jquery.org *.qunitjs.com *.sizzlejs.com *.jquerymobile.com + DocumentRoot "/srv/www/jquery" + php_value memory_limit 256M + + Options All + AllowOverride All + Order allow,deny + Allow from all + + +``` + +Make sure that virtual hosts are enabled as well: + +``` +NameVirtualHost *:80 +``` + +Both blocks of code should be pasted into `extra/httpd-vhosts.conf`. +Be sure to check `httpd.conf` to verify there is a line that includes +`httpd-vhosts.conf`. It may already exist, but be commented out. + +Check `httpd.conf` to ensure that the PHP module is enabled as well. + +You do not need to configure your `/etc/hosts` file for `local.*` because `jquery.com`'s DNS handles this for you. However, if you plan to work offline, you can use the following rules: + +``` +127.0.0.1 local.jquery.com local.api.jquery.com local.blog.jquery.com local.books.jquery.com local.codeorigin.jquery.com local.learn.jquery.com local.plugins.jquery.com +127.0.0.1 local.jqueryui.com local.api.jqueryui.com local.blog.jqueryui.com +127.0.0.1 local.jquerymobile.com local.api.jquerymobile.com local.blog.jquerymobile.com +127.0.0.1 local.jquery.org local.brand.jquery.org local.contribute.jquery.org local.events.jquery.org local.irc.jquery.org local.meetings.jquery.org +127.0.0.1 local.qunitjs.com local.api.qunitjs.com +127.0.0.1 local.sizzlejs.com +``` 1. Place the WordPress core files **at** the document root you chose. For example, if you used `/srv/www/jquery`, you should unzip or clone WordPress directly into that directory, *not* a directory below it. **Do not install WordPress.** You can do this any number of ways: * Download the latest version from http://wordpress.org/latest.zip @@ -59,22 +63,22 @@ This install guide assumes you already have certain prerequisites already config 1. Clone `jquery-wp-content` inside of the directory where you put WordPress, so you have a file tree that looks like this: - ``` - ├── jquery - │   ├── gw-resources - │   ├── index.php - │   ├── jquery-wp-content - │   ├── license.txt - │   ├── readme.html - │   ├── wp-activate.php - │   ├── wp-admin - │   ├── wp-blog-header.php - │   ├── wp-comments-post.php - │   ├── wp-config-sample.php - │   ├── wp-content - │   ├── ... - │   └── xmlrpc.php - ``` +``` +├── jquery +│   ├── gw-resources +│   ├── index.php +│   ├── jquery-wp-content +│   ├── license.txt +│   ├── readme.html +│   ├── wp-activate.php +│   ├── wp-admin +│   ├── wp-blog-header.php +│   ├── wp-comments-post.php +│   ├── wp-config-sample.php +│   ├── wp-content +│   ├── ... +│   └── xmlrpc.php +``` 1. Create a MySQL database and user. You can choose any name you want for both. Follow the [WordPress instructions](http://codex.wordpress.org/Installing_WordPress#Step_2:_Create_the_Database_and_a_User) for a step by step guide. @@ -82,65 +86,38 @@ This install guide assumes you already have certain prerequisites already config 1. Create an .htaccess file with the following content into that same document root: - ``` - RewriteEngine On - RewriteBase / - RewriteRule ^index\.php$ - [L] +``` +RewriteEngine On +RewriteBase / +RewriteRule ^index\.php$ - [L] - RewriteRule ^resources/?$ index.php [L] - RewriteRule ^resources/(.+) gw-resources/%{HTTP_HOST}/$1 [L] +RewriteRule ^resources/?$ index.php [L] +RewriteRule ^resources/(.+) gw-resources/%{HTTP_HOST}/$1 [L] - # Add a trailing slash to the wp-admin of a subsite. - RewriteRule ^([_0-9a-zA-Z\.-]+/)?wp-admin$ $1wp-admin/ [R=301,L] +# Add a trailing slash to the wp-admin of a subsite. +RewriteRule ^([_0-9a-zA-Z\.-]+/)?wp-admin$ $1wp-admin/ [R=301,L] - RewriteCond %{REQUEST_FILENAME} -f [OR] - RewriteCond %{REQUEST_FILENAME} -d - RewriteRule ^ - [L] +RewriteCond %{REQUEST_FILENAME} -f [OR] +RewriteCond %{REQUEST_FILENAME} -d +RewriteRule ^ - [L] - # Handle wp-admin, wp-includes, and root PHP files for subsites. - RewriteRule ^[_0-9a-zA-Z\.-]+/((wp-admin|wp-includes).*) $1 [L] - RewriteRule ^[_0-9a-zA-Z\.-]+/(.*\.php)$ $1 [L] +# Handle wp-admin, wp-includes, and root PHP files for subsites. +RewriteRule ^[_0-9a-zA-Z\.-]+/((wp-admin|wp-includes).*) $1 [L] +RewriteRule ^[_0-9a-zA-Z\.-]+/(.*\.php)$ $1 [L] - RewriteRule . index.php [L] - ``` +RewriteRule . index.php [L] +``` 1. Make sure that you have assigned your WordPress files and directories the correct permissions. For example, if your WordPress files are in the directory ```wordpress```, and you are running Apache under Mac OS X with the ```_www``` user: - ``` - sudo chown -R _www wordpress - sudo chmod -R g+w wordpress - ``` +``` +sudo chown -R _www wordpress +sudo chmod -R g+w wordpress +``` 1. Restart your web server so the changes above are in use. 1. Go to `http://local.jquery.com` and walk through the standard WordPress installation. `jquery-wp-content` includes a special install script that will initialize the entire network. 1. Be sure to have node >= 0.8 installed on your system. Some sites, such as download.jqueryui.com, require that version or greater. - -## Auto-Updates -Changes pushed to master will be pulled onto the stage domain. - -## Copyright - -Copyright 2014 jQuery Foundation and other contributors. All rights reserved. - -The `jquery-wp-content` repository contains themes for rendering all jQuery Foundation web sites. - -### What is licensed - -The contents of the web sites that run on top of `jquery-wp-content` are all available under the terms of the MIT license ( http://jquery.org/license ). - -Special exception: Code samples are given away for you to freely use, for any purpose. For code samples in API sites -and Learn articles (unlike the source code of jQuery projects) you don't even have to say where you got the code from. -Just use it. - -The PHP files in the `jquery-wp-content` repository are a derivative work of WordPress, and available under the -terms of the GPL license ( http://codex.wordpress.org/License ). - -### What is not licensed - -The design, layout, and look-and-feel of the `jquery-wp-content` repository, including all CSS, images, and -icons, are copyright jQuery Foundation, Inc. and are not licensed for use. Designs and CSS from `jquery-wp-content` may not be used on any site, personal or commerical, without prior written consent from the jQuery Foundation. `jquery-wp-content` contains CSS, images, and icons that are copyrighted by other individuals; those items are licensed under their original terms. - -The only permitted (and encouraged) exception to "use" is the case of cloning/forking this repository in order to create a local development environment to facilitate making contributions to jQuery Foundation websites. diff --git a/README.md b/README.md index 523ce4b2..647daf1a 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,85 @@ -# jQuery.com jquery-wp-content Virtual Machine Environment +# jquery-wp-content `jquery-wp-content` is a **custom replacement** for the `wp-content` directory which contains the plugins, themes and site configuration to run the jQuery multi-site WordPress network. -If you would like instructions for installing this plugin you can find them in the [INSTALL.md](INSTALL.md) file in this directory. +Although we recommend using the pre-built VM, if you would like to manually install `jquery-wp-content` you will find instructions for installing in the [INSTALL.md](INSTALL.md) file in this directory. We strongly recommend using the VM as it will provide the same environment as our production servers. ## Prerequisites -This install guide assumes you already have certain prerequisites already configured within your environment. +This setup guide assumes you have certain prerequisites installed. -* Virtualbox >=4.3+ -* Vagrant >=1.4.0 +* [Virtualbox >=4.3+](https://www.virtualbox.org/) +* [Vagrant >=1.4.0](http://www.vagrantup.com/) -## Installation +## Vagrant and Virtualbox -Assuming you've met the prerequisites the process of starting the VM is simple. +We recommend the combination of Virtualbox and [Vagrant](http://www.vagrantup.com/about.html) for a local development environment. Vagrant simplifies download, installation, and management of the local environment VM with a few commands. -From the root of your `jquery-wp-content` clone run the following command: - - ``` - vagrant up - ``` +### Setup -Complete the installation process by pointing your browser at (http://vagrant.jquery.com/). Feel free to use any username/password/email combination that you choose, though keep note of the username and password as you will need to be able to deploy to your local vm. +From the root of your `jquery-wp-content` clone run the following command: -Yes, it's really that easy! +``` +vagrant up +``` + +This will start the VM for you, the output should look similar to what you see below. + +``` +Bringing machine 'default' up with 'virtualbox' provider... +[default] Box 'jquery-wp-content' was not found. Fetching box from specified URL for +the provider 'virtualbox'. Note that if the URL does not have +a box for this provider, you should interrupt Vagrant now and add +the box yourself. Otherwise Vagrant will attempt to download the +full box prior to discovering this error. +Downloading box from URL: http://boxes.jquery.com/jquery-wp-content.box +Calculating and comparing box checksum...ime remaining: 0:00:01) +Extracting box... +Successfully added box 'jquery-wp-content' with provider 'virtualbox'! +[default] Importing base box 'jquery-wp-content'... +[default] Matching MAC address for NAT networking... +[default] Setting the name of the VM... +[default] Clearing any previously set forwarded ports... +[default] Clearing any previously set network interfaces... +[default] Preparing network interfaces based on configuration... +[default] Forwarding ports... +[default] -- 22 => 2222 (adapter 1) +[default] Running 'pre-boot' VM customizations... +[default] Booting VM... +[default] Waiting for machine to boot. This may take a few minutes... +[default] Machine booted and ready! +[default] Setting hostname... +[default] Configuring and enabling network interfaces... +[default] Mounting shared folders... +[default] -- /vagrant +[default] -- /var/www/wordpress/jquery-wp-content +``` + +Complete the installation process by pointing your browser at http://vagrant.jquery.com/. Feel free to use any username/password/email combination that you choose, though keep note of the username and password as you will need them to deploy to your local VM. You do not need to configure your `/etc/hosts` file for `vagrant.*` because `jquery.com`'s DNS handles this for you. However, if you plan to work offline, you can use the following rules: - ``` - 172.27.72.27 vagrant.jquery.com vagrant.api.jquery.com vagrant.blog.jquery.com vagrant.books.jquery.com vagrant.codeorigin.jquery.com vagrant.learn.jquery.com vagrant.plugins.jquery.com - 172.27.72.27 vagrant.jqueryui.com vagrant.api.jqueryui.com vagrant.blog.jqueryui.com - 172.27.72.27 vagrant.jquerymobile.com vagrant.api.jquerymobile.com vagrant.blog.jquerymobile.com - 172.27.72.27 vagrant.jquery.org vagrant.brand.jquery.org vagrant.contribute.jquery.org vagrant.events.jquery.org vagrant.irc.jquery.org vagrant.meetings.jquery.org - 172.27.72.27 vagrant.qunitjs.com vagrant.api.qunitjs.com - 172.27.72.27 vagrant.sizzlejs.com - ``` +``` +172.27.72.27 vagrant.jquery.com vagrant.api.jquery.com vagrant.blog.jquery.com vagrant.books.jquery.com vagrant.codeorigin.jquery.com vagrant.learn.jquery.com vagrant.plugins.jquery.com +172.27.72.27 vagrant.jqueryui.com vagrant.api.jqueryui.com vagrant.blog.jqueryui.com +172.27.72.27 vagrant.jquerymobile.com vagrant.api.jquerymobile.com vagrant.blog.jquerymobile.com +172.27.72.27 vagrant.jquery.org vagrant.brand.jquery.org vagrant.contribute.jquery.org vagrant.events.jquery.org vagrant.irc.jquery.org vagrant.meetings.jquery.org +172.27.72.27 vagrant.qunitjs.com vagrant.api.qunitjs.com +172.27.72.27 vagrant.sizzlejs.com +``` -## Stopping the Virtual Machine +### Stopping and Restarting the Virtual Machine -When you're not working on `jquery-wp-content` you'll probably want to run `vagrant halt` to turn off the VM to save yourself some system resources. Alternatively you can suspend the VM by using `vagrant suspend` +When you're not working on `jquery-wp-content` you'll probably want to run `vagrant halt` to turn off the VM to save yourself some system resources. Alternatively you can suspend the VM by using `vagrant suspend`. You can always start the VM by running `vagrant up`. -## Unstallation +### Clean up Should you need to recover some harddrive space you can safely run the `vagrant destroy` command from within your `jquery-wp-content` clone. This will delete the VM image from your hard drive. **You will not lose any work by doing this.** +## Auto-Updates + +Changes pushed to master are automatically pulled onto the stage domain. + ## Copyright Copyright 2014 jQuery Foundation and other contributors. All rights reserved.