Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

How to test the most recent Vanilla version

R_JR_J Cheerleader & TroubleshooterMunich Moderator

Have you ever wanted to get a glimpse on what the bright Vanilla future will bring? Well, you can fork the GitHub repo, download phing and composer to build an installable package from the sources, upload that to a server, setup PHP, a http server and start testing. Sounds complicated? Well, yes it is.

But there is a far more easy way to test it: get a free account at Cloud9 and use an installer script!
(I admit, I have stolen the idea and I have already written about it, but I thought it would be the perfect platform for testing the master branch and therefore I have written the installer script)

Cloud9 provides an online IDE and in order to be able to use it, they provide you with "workspaces". Those workspaces are like virtual servers: they are fully usable Linux (Ubuntu) virtual machines. Don't panic, you will not need any Linux knowledge at all!

Just follow those easy steps and you will be able to see what the developers are looking at:

1. Register a free account at Cloud9

No help from my side on that ;)

2. Create a new workspace

You have to fill out only a few fields:
Workspace name: "vanilla"
Description: "The latest and greatest Vanilla forums version"
Clone from Git or Mercurial URL: "https://github.com/vanilla/vanilla.git"
Choose a template: "PHP, Apache & MySQL"

Ready. Click the "Create workspace" button.
While you can freely choose "Workspace name" and "Description", you have to use the repo's url and the template just like given above

3. Run the script

  1. Open the new workspace
  2. You see a terminal at the bottom of the page: type the following in there nano build/build.sh to open a simple editor.
  3. Copy the complete installer script from here. Ctrl+a, Ctrl+c is a fool proof way to be sure you really have copied the complete content.
  4. Open the browser window with the open workspace (from the first step). Click on the terminal window at the bottom. And now: forget about your mouse. You will not need it for the following steps
  5. Paste the content of the clipboard to the terminal in your browser window. Paste with Ctrl+v, using the mouse will give some strange message which I didn't even bothered to read =)
  6. Close the editor by first pressing Ctrl+x, answering the next question with "y" and simply hit return when prompted afterwards to give the file name.
  7. This is Linux so we have to make that file executable. First change to the folder: type cd built and hit enter. Then type chmod u+x build.sh and hit enter again.
  8. Now you can start the script! Type ./build.sh and hit enter.
  9. The script does a lot of things and will ask a lot of questions. All those "are you really sure"/"do you really want" questions must be answered with "y" for yes. If you see a dialog asking for a MySQL password simply hit enter or if you insert a password there, don't forget it! You will need it later. If you are asked to overwrite files, say yes, again

4. Start the server

When the script is finished, you're good to go! At the top of the c9 workspace screen there is a "Run Project" menu entry - you can't miss the green "play" symbol ;)
When you click that button, a new window will open up at the bottom telling you that Apache is starting (that is the name of the web server) and it shows you a link to your new test forum. Click on that "link". You will find that it is not a clickable link but it will show a menu with an "Open" menu entry. Well, what else would we want to do? Click "Open"!

5. Install Vanilla

Now you will see Vanillas setup page. Use the following database information:
Database Host: "0.0.0.0"
Database Name: "c9"
Database User: "root"
Database Password: leave that field blank (or fill in the password from step 3.9.)

Fill out the rest of the fields as you like and you are finished: BAM!


WARNING! What you are looking at after that is the developer version and it is constantly worked on. If you create your copy at the wrong moment it might happen that your installation isn't usable at all. But fear not, I will describe what to do to keep it in sync with the GitHub master branch in a later post

phreak

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    "What exactly is that script doing?" you might ask. Let me explain...

    1. System

    It starts like that:

    sudo apt-get update
    sudo apt-get upgrade
    

    This updates every installed "program"/package on an Ubuntu system to the most stable version. While you might get a message telling you that this is not needed, I think it doesn't hurt! But honestly, for the purpose of testing it could have been skipped.

    2. PHP

    c9 provides an Ubuntu that runs PHP 5.5 and MySQL 5.5. Both versions are outdated. So the next stephappening is updating PHP (I used a script by Ferdie De Oliveira for that:

    sudo add-apt-repository ppa:ondrej/php -y
    sudo apt-get update -y
    
    sudo apt-get install php7.1-curl php7.1-cli php7.1-dev php7.1-gd php7.1-intl php7.1-mcrypt php7.1-json php7.1-mysql php7.1-opcache php7.1-bcmath php7.1-mbstring php7.1-soap php7.1-xml php7.1-zip -y
    
    sudo mv /etc/apache2/envvars /etc/apache2/envvars.bak
    
    sudo apt-get remove libapache2-mod-php5 -y
    
    sudo apt-get install libapache2-mod-php7.1 -y
    
    sudo cp /etc/apache2/envvars.bak /etc/apache2/envvars
    

    3. MySQL

    Updating MySQL is a simple:
    sudo apt-get install mysql-server-5.6

    4. Phing

    Vanillas master branch needs a build process which includes a tool: phing. We need to download that: wget http://www.phing.info/get/phing-latest.phar

    5. Composer

    Composer is also required. WHile it is already available, the path of the executable is "not correct": the build-script expects it to be in another folder. So we have to creat a symlink for that: sudo ln -s /usr/bin/composer /usr/local/bin/composer

    6. Building Vanilla

    With php phing-latest.phar we start the build process. The build process includes getting required packages via composer and its result is a zip file.

    7. Unzipping the built package

    The previous steps result was a zip file and we simply unzip it to the workspace folder, overwriting every previously existing file: unzip -o vanilla*.zip -d ../

    8. "Create" a .htaccess file

    When you update Vanilla, you normally can copy all files over your installation. The only critical file is the .htaccess file that you can find in your forums root folder. Sometimes admins need to change that. In order not to destroy a running forum with an update, the current master branch only provides a blueprint which must be renamed/copied: cp ../.htaccess.dist ../.htaccess.

    9. Database credentials

    Since the database credentials are needed for setting Vanilla up and they are difficult to find, I decided to give that info at the end of the script:

    echo "That's it! you can now start your workspace, open the url that will be shown to you and you will see Vanillas setup page."
    echo "You will need the following info for the database setup"
    echo "Database Host: \"0.0.0.0\""
    echo "Database Name: \"c9\""
    echo "Database User: \"root\""
    echo "Database Password: leave that field blank"
    

    Instead of running the script, you can also paste the above commands one by one, if you want to get a little more confident when having to deal with the Linux command line: if you really manage to mess something up, you can simply delete the workspace and restart =)

    rbrahmson
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Do you want to test one of the plugins that you can find here? Simple!

    You have to use the terminal, though... Change to the uploads folder (search the internet for the cd = "change directory" command if you do not know how)
    Afterwards clone the addons repo by entering git clone https://github.com/vanilla/addons.git. Now let's say you want to use the famous Q'n'A plugin. Enter the following: ln -s /home/ubuntu/workspace/uploads/addons/plugins/QnA/ /home/ubuntu/workspace/plugins/QnA (again search the net for help on ln if you need it) and afterwards the plugin is available in your new forum's dashboard!

    By the way: you can also test other repos on your new test forum, you only have to take a look as to which folder they would have to go. e.g. change to the forums plugins folder and do this git clone https://github.com/R-J/aeConfig.git. Or a more famos one: go to the applications folder and enter git clone https://github.com/hgtonight/Application-Yaga.git Yaga!

    whu606rbrahmson
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Whatever you do: if you find an error, see on the issues list of the repo and if it has not been reported by now, take the opportunity to make Vanilla even better by reporting your observations ;)

    In such a case you would even be able to share your forum so that developers could take a look at it!

    rbrahmson
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Alright, let's assume you have played with the test forum for a few weeks now and you want to get the newest GitHub version. You have created your workspace by "cloning a GitHub repo" and that is great! It means that you simpy can get all changes from that GitHub repo by entering git pull origin master. Simple as that.

    If you made some changes to your installation, edited code somewhere, you might get merge conflicts. In the case that you like to keep that changes somehow, you should search the net for "git" and what you can do with it. If your changes and really unimportant, try a simple git stash and afterwards git pull origin master (that might not be the best way and maybe not even working, but I'm a git-beginner myself)

    rbrahmson
  • My question may sound irrelevant. I heard that there is a MongoDB instead of MYSQL. Any feedback on that?

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @carol3 said:
    My question may sound irrelevant. I heard that there is a MongoDB instead of MYSQL. Any feedback on that?

    Nope

  • gustavohgustavoh New
    edited June 2017
Sign In or Register to comment.