From SoylentNews
Revision as of 16:37, 9 May 2014 by Paulej72 (talk | contribs) (MySQL Updtes)

Jump to: navigation, search

Development - parent

The Dev VM can be downloaded from This is a vim that is designed to run on VirtualBox. Information and downloads of VirtualBox are available here:

Once you get the VM downloaded and the VirtualBox up and ruining, you will want to do a File:Import Appliance in VirtualBox. This will unpack the VM into you environment. Start up the VM and log in with the username and password of slash.

The VM has port forwarding setup to you local system for ssh and http.

ssh: 8022
http; 1337

For ssh your connection string should be:

ssh slash@ -p 8022

For websites, apache will use the name localhost instead of so you will need to use:


Apache is turned off in the VM. You will need to turn it on using the command:

apacheclt start

The slash user home directory is in /srv/slashdev/. The slashcode GitHub repository is located in slashcode. This is where you will make changes to the code you want to test. The actual slashcode install is located in slash.

The first thing you should probably do is update the repo to the latest version. cd to slashcode and run git pull.

Now we need to install the new code to slash. Here is a script that will help with that. Create a new file called in the slash home directory and give chmod it to 755.

#! /bin/sh

echo === Install from git repo ===
cd /srv/slashdev/slashcode
make USER=slash GROUP=slash SLASH_PREFIX=/srv/slashdev/slash install

echo === Clean up CSS and install Templates ==
rm -rf /srv/slashdev/slash/site/slashdev/htdocs/*css

/srv/slashdev/slash/bin/symlink-tool -U
/srv/slashdev/slash/bin/template-tool -U

echo === Restart Apache==
/srv/slashdev/apache/bin/apachectl restart

This script will be part of the next version of the Dev VM.

MySQL Updtes

Making Your Own Changes

To do simple updates, you would make changes to the files in slashcode and redeploy using the script.

What if you want to develop code and have it merged into the main repo? In this case you will need to setup your own copy of the repo do do your development work. First if you do not have your own account on GitHub please set one up. Next go to the slashcode site and click on Fork in the upper right. Fork the repo to your user account.

Now on the VM go to slashcode. We will setup your copy of the repo as a remote. Run the commands:

git remote add {name} {url-to-your-GitHub-repo}

git fetch {name}

checkout {name}/master

Redeploy slash and you are working from your own repo. As you may have noticed the primary work is being done on the master branch. You will not need to worry about the other branches of the code for now.

Once you get code you like, and have it committed to your personal fork, you can do a Pull Request,, that will create a ticket for the SoylentNews/slashcode repo to merge your commits to the master branch. After proper testing by the Dev team and other sanity checks, you code will be merged and eventually put on to the production servers. See GitUse for more info about using git.

Just a note: I am new to git, so the above directions are what I have been using. If people have a better method for doing this please feel free to update this page with the new information --pauulej72.