Skip to main content
Topic: [TOOL] Instant Addon Development Environment (Read 3135 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[TOOL] Instant Addon Development Environment

I've created a Vagrant environment for developing Elkarte addons for 1.1+.

The environment creates a virtual machine using Vagrant, then syncs your addon development folder so that you can simply refresh the page to see your changes. This is part of 3 such environments I'm creating: one for addons, one for themes and one for Elk itself. I will probably turn this into a CLI tool at some point for creating addons/themes with a single command.

The environment contains Nginx, PHP5, PHPUnit for testing, Xdebug and webgrind for profiling (just go to /webgrind to view), and MySQL, which is auto-populated with an empty Elk 1.1 database.

Simply download this repo, create a directory inside for your addon (same level as the provision directory), and then edit the Vagrantfile to sync your folder (change "./pages/" and "/var/www/addons/pages" to "./<your addon name>/" and "/var/www/addons/<your addon name>" respectively).

https://github.com/Ant59/elkarte-vagrant-addon

Admin username and password for Elk are "admin" and "1234", and for MySQL "root" and "1234".

Your addon will appear in the Core Features page.



Webgrind will display the output of Xdebug when requested. You can trigger Xdebug by adding XDEBUG_PROFILE as a GET/POST parameter, or a cookie set to 1. There are addons for every browser to do this easily.



(Sidenote, should we have a wiki to add stuff like this to?)
Last Edit: September 01, 2015, 07:58:46 am by ant59

Re: [TOOL] Instant Addon Development Environment

Reply #1

This is extremely COOL !  I'm really going to have to update my environment, feeling like a dinosaur now :P

Quote(Sidenote, should we have a wiki to add stuff like this to?)
There is one on GitHub, but there are limitations, and GitHub does not seem approachable to most doc writers either.  Perhaps docuwiki, @emanuele said there may be an ElkArte bridge to that which would be nice.

Re: [TOOL] Instant Addon Development Environment

Reply #2

This is terribly cool and wonderful! :D
Bugs creator.
Features destroyer.
Template killer.

Re: [TOOL] Instant Addon Development Environment

Reply #3

Any possibility to set this up for VirtualBox as well?

Re: [TOOL] Instant Addon Development Environment

Reply #4

Very nifty.

Question: why can't it just run on an existing local host?
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

 

Re: [TOOL] Instant Addon Development Environment

Reply #5

Quote from: Eliana Tamerin – Any possibility to set this up for VirtualBox as well?

This already uses VirtualBox as a backend :)

Quote from: Antechinus – Very nifty.

Question: why can't it just run on an existing local host?

This way guarantees the clean state of the environment and is reproducible on any machine. You can run the provisioning script locally if you like, but I wouldn't recommend it. Using Vagrant means everyone is on the same page when developing.