Webmaker/Code/Dev/Environment: Difference between revisions

Jump to navigation Jump to search
 
(5 intermediate revisions by 2 users not shown)
Line 6: Line 6:


== Option 1: Installing Webmaker Locally ==
== Option 1: Installing Webmaker Locally ==
Webmaker can be configured locally to allow for development and testing. This process can be accomplished in a number of ways, but they all require all dependancies to be working before they can succeed.
Webmaker can be configured locally to allow for development and testing. This process can be accomplished in a number of ways, but they all require all dependencies to be working before they can succeed.


=== External Dependancies ===
=== External Dependencies ===
Webmaker relies on a number of technologies and tools, which must first be installed.  The following list needs to be installed and working before you can run or test Webmaker locally, and we provide instructions for doing so on Linux, Mac OS X and Windows below.
Webmaker relies on a number of technologies and tools, which must first be installed.  The following list needs to be installed and working before you can run or test Webmaker locally, and we provide instructions for doing so on Linux, Mac OS X and Windows below.


Line 37: Line 37:
This is the easiest way to setup a Webmaker dev environment on Ubuntu Linux.
This is the easiest way to setup a Webmaker dev environment on Ubuntu Linux.


# Install git and a C/C++ toolchain with <code>sudo apt-get -y -q install git g++</code>
# Install git and a C/C++ toolchain with <code>sudo apt-get -y -q install git g++ make pkg-config</code>
# Install the Java Development Kit with <code>sudo apt-get -y -q install openjdk-7-jre-headless</code>
# Install the Java Development Kit with <code>sudo apt-get -y -q install openjdk-7-jre-headless</code>
# Install the MongoDB server
# Install the MongoDB server
Line 53: Line 53:


==== Setting up your dev environment in Fedora Linux ====
==== Setting up your dev environment in Fedora Linux ====
TODO
 
# Install git and a C/C++ toolchain with <code>sudo yum install -y git gcc-c++ make pkgconfig</code>
# Install the Java Development Kit with <code>sudo yum install -y java-1.7.0-openjdk-headless</code>
# Install the MongoDB server
## Install the package with <code>sudo yum install -y mongodb-server</code>
# Install Elasticsearch
## Download [http://www.elasticsearch.org/download/ Elasticsearch] as a <code>.rpm</code> file and install it with <code>sudo rpm -i elasticsearch*.rpm</code>
## You may need to run a few commands:
### <code> sudo /bin/systemctl daemon-reload</code>
### <code>sudo /bin/systemctl enable elasticsearch.service</code>
## You can then start it with <code>sudo /bin/systemctl start elasticsearch.service</code>
# Install Nodejs  with <code>sudo yum install -y nodejs npm</code>


==== Setting up your dev environment  in Windows 7 ====
==== Setting up your dev environment  in Windows 7 ====
Our [https://github.com/mozilla/webmaker-suite Webmaker-suite npm module] has excellent documentation on preparing a Windows development environment. You can find it [http://mozilla.github.io/webmaker-suite/windows.html here].
Our [https://github.com/mozilla/webmaker-suite Webmaker-suite npm module] has excellent documentation on preparing a Windows development environment. You can find it [http://mozilla.github.io/webmaker-suite/windows.html here].


=== NodeJS dependancies ===
=== NodeJS dependencies ===
If you followed the Windows-specific external-dependency instructions, this step has already been completed. Otherwise, once your Development environment is set up, you must install some global NPM packages.
If you followed the Windows-specific external-dependency instructions, this step has already been completed. Otherwise, once your Development environment is set up, you must install some global NPM packages.


Line 94: Line 105:


==== Manual installation ====
==== Manual installation ====
Each server will need to updated separately, though the process is identical.
Each server will need to be updated separately, though the process is identical.


These commands use <code>git</code> to pull the latest updates from the Mozilla repo, and then reinstall the node ''modules'' (or libraries).  If you followed each server's installation instructions exactly, <code>[mozilla upstream remote]</code> should be replaced with <code>origin</code>.  Otherwise, replace it with whatever you labeled the Mozilla [http://git-scm.com/book/en/Git-Basics-Working-with-Remotes git remote].  
These commands use <code>git</code> to pull the latest updates from the Mozilla repo, and then reinstall the node ''modules'' (or libraries).  If you followed each server's installation instructions exactly, <code>[mozilla upstream remote]</code> should be replaced with <code>origin</code>.  Otherwise, replace it with whatever you labeled the Mozilla [http://git-scm.com/book/en/Git-Basics-Working-with-Remotes git remote].  
Line 105: Line 116:


== Option 3: Installing Webmaker with Vagrant ==
== Option 3: Installing Webmaker with Vagrant ==
  '''''NOTE: This is a work in progress, and may have bugs.  See https://github.com/mozilla/webmaker-suite for more on using webmaker-suite itself'''''
* Download and install vagrant first ( http://www.vagrantup.com/downloads.html )
* Download the Vagrantfile from https://github.com/mozilla/webmaker-suite/tree/master/vagrant/localdev into a folder where you want to run your webmaker-suite VM from (ie, /Users/myuser/vagrant/webmaker-suite)
* In terminal.app, cd into that folder, and issue the command ''vagrant up''
      It will download the current version box (this is 1.7gb, may take a while)
* Once complete building, issue the command ''vagrant ssh''
* Now in vagrant, issue the command ''./webmaker-suite.sh''
      This will start mongo, elasticsearch, webmaker, popcorn, thimble, makeapi, goggles, etc


Now, point your web browser to
'''NOTE:''' This is a work in progress, and may have bugs.  See https://github.com/mozilla/webmaker-suite for more info on using webmaker-suite itself. '''You will need a 64bit OS for vagrant to run.
http://127.0.0.1:3000 - login.webmaker.org
'''
http://127.0.0.1:3500 - thimble.webmaker.org
 
http://127.0.0.1:5000 - makeapi
# Download and install [https://www.virtualbox.org/wiki/Downloads Virtualbox] and [http://www.vagrantup.com/downloads.html Vagrant].
http://127.0.0.1:5050 - htmlsanitizer.org
# Download the Vagrantfile from [https://github.com/mozilla/webmaker-suite/blob/aws-vagrant/vagrant/localdev/Vagrantfile github] into a folder where you want to run your webmaker-suite VM from (ie, <code>/Users/myuser/vagrant/webmaker-suite</code>).
http://127.0.0.1:7777 - webmaker.org
# Open a terminal, cd into that folder, and issue the command <code>vagrant up</code>. This will download the current version box (an Ubuntu-12.04-x86_64 1.7gb image) and may take a while.
http://127.0.0.1:8888 - popcorn.webmaker.org
# Once the building is complete, issue the command <code>vagrant ssh</code> to ssh in your new vagrant box.
http://127.0.0.1:12416 - goggles.webmaker.org
# Now in vagrant, issue the command <code>./webmaker-suite.sh</code>. This will start mongo, elasticsearch, webmaker, popcorn, thimble, makeapi, goggles, etc.


More detailed information available here: https://github.com/mozilla/webmaker-suite/blob/master/vagrant/localdev/README.md
After it completes, point your web browser to:
* http://127.0.0.1:3000 - login.webmaker.org
* http://127.0.0.1:3500 - thimble.webmaker.org
* http://127.0.0.1:5000 - makeapi
* http://127.0.0.1:5050 - htmlsanitizer.org
* http://127.0.0.1:7777 - webmaker.org
* http://127.0.0.1:8888 - popcorn.webmaker.org
* http://127.0.0.1:12416 - goggles.webmaker.org


    Example Output
More detailed information available [https://github.com/mozilla/webmaker-suite/tree/aws-vagrant/vagrant/localdev/README.md here].


  ''localmac-23:24:58-imagetest# vagrant up
Example Output:


<pre>
localmac-23:24:58-imagetest# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
Bringing machine 'default' up with 'virtualbox' provider...
[default] Box 'webmakersuitev3test' was not found. Fetching box from specified URL for
[default] Box 'webmakersuitev3test' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
full box prior to discovering this error.
Downloading or copying the box...
Downloading or copying the box...
<1.7gb of downloading occurs here>
<1.7gb of downloading occurs here>
Successfully added box 'webmakersuitev3test' with provider 'virtualbox'!
Successfully added box 'webmakersuitev3test' with provider 'virtualbox'!
[default] Importing base box 'webmakersuitev3test'...
[default] Importing base box 'webmakersuitev3test'...
[default] Matching MAC address for NAT networking...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 22 => 2222 (adapter 1)
[default] -- 3000 => 3000 (adapter 1)
[default] -- 3000 => 3000 (adapter 1)
[default] -- 3500 => 3500 (adapter 1)
[default] -- 3500 => 3500 (adapter 1)
[default] -- 5000 => 5000 (adapter 1)
[default] -- 5000 => 5000 (adapter 1)
[default] -- 5050 => 5050 (adapter 1)
[default] -- 5050 => 5050 (adapter 1)
[default] -- 7777 => 7777 (adapter 1)
[default] -- 7777 => 7777 (adapter 1)
[default] -- 8888 => 8888 (adapter 1)
[default] -- 8888 => 8888 (adapter 1)
[default] -- 12416 => 12416 (adapter 1)
[default] -- 12416 => 12416 (adapter 1)
[default] Booting VM...
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] Machine booted and ready!
[default] Mounting shared folders...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /vagrant
localmac-23:42:19-imagetest# vagrant ssh
localmac-23:42:19-imagetest# vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
  * Documentation:  https://help.ubuntu.com/
  * Documentation:  https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Welcome to your Vagrant-built virtual machine.
Last login: Fri Jan 17 20:52:50 2014 from 10.0.2.2
Last login: Fri Jan 17 20:52:50 2014 from 10.0.2.2
 
vagrant@precise64:~$ ./webmaker-suite.sh
vagrant@precise64:~$ ./webmaker-suite.sh''
</pre>
Confirmed users
8

edits

Navigation menu