Written by

Here’s the third arti­cle of this series ded­i­cat­ed to our new Marketplace. We intro­duced it a few weeks ago, and we added many frame­works for dev learn­ing and quick prototyping.

So, in this last post, enjoy…

… custom scripts for editors, DevOps, and everyone!

Among the rea­sons we had to rebuild our mar­ket­place, is the abil­i­ty to cre­ate and dis­trib­ute install scripts effi­cient­ly. What we had in mind was use-cas­es where you’re devel­op­ing a Web ser­vice or appli­ca­tion, and you need to deploy it reg­u­lar­ly1) or you want to dis­trib­ute it in a 1‑click install2).

To help you through this process, we built this new plat­form that pow­ers our mar­ket­place. As we said ear­li­er, we now rely on sim­ple scripts to pro­vi­sion a new instance. You choose your pre­ferred lan­guage3), and we run it.

Specify your environment

Each script cre­ates a new Sites type instance to host your app. You some­times need to con­fig­ure it a bit, espe­cial­ly regard­ing URL rewrit­ing and all. To spec­i­fy com­mon set­tings, you must declare a YFM4) with the regard­ing options and values.

Here we declare a PHP site, stick to PHP 7.25), with a MySQL data­base. If you run the script right now, it will do noth­ing more than cre­at­ing a new Sites and a MySQL database.

Then, clear the envi­ron­ment6), and exe­cute your install process, like down­load­ing the last release, extract it, install and con­fig­ure stuff, etc.

Collect user informations

You some­times need to grab some user infor­ma­tion, like the locale, admin pass­word, and user­name, to pre­set the instance accurately.

You can declare a list of form fields you want the user to fill-in before pro­vi­sion­ing the instance. Rely on the YMF part to add the fields def­i­n­i­tions, with val­i­da­tion rules:

That’s all! You can now use them in your script as they are sourced by the plat­form when run­ning it:

We want the expe­ri­ence to be the more fric­tion­less for users when they run install scripts. That’s why we rec­om­mend not to ask for too much infor­ma­tion before pro­vi­sion­ing the instance, but only the manda­to­ry ones. It lets them con­fig­ure their instance when the pro­vi­sion­ing has finished.

Distribute your code

If you write a script to install an open source soft­ware or your solu­tion, why not to dis­trib­ute it through our plat­form? That’s pre­cise­ly why we built this new mar­ket­place: for the community!

Just go to the add an appli­ca­tion script view in your admin­is­tra­tion inter­face, fill in the form, and check the Public appli­ca­tion check­box. It reg­is­ters your app for a review, and we’ll pub­lish it quick­ly on the marketplace.

Administration interface: Add a new application script
Administration inter­face: Add a new appli­ca­tion script

We do a review of the scripts before releas­ing them pub­licly in the mar­ket­place. It ensures no one will try to com­pro­mise your account by dis­tri­b­u­tion mali­cious scripts. Nevertheless, we can’t review the sources dis­trib­uted across the script itself when down­load­ing the release tar­ball. As a cus­tomer, you must check your install and ver­i­fy its con­sis­ten­cy. If you write a script, please inline check­sum and sig­na­ture tests to ensure the sources integrity.

You’ve got a new way to increase the qual­i­ty of the always­da­ta’s com­mu­ni­ty, and we hope you will con­tribute by releas­ing scripts for your own solutions.

Take a look at the offi­cial doc­u­men­ta­tion (it includes the whole script used in this blog post), and let us know which scripts you want to add!


1 i.e., if you’re agency and this is your home­made solution
2 i.e., you’re edit­ing an open source soft­ware and want it avail­able to every­one easily
3 from Bash to Python or Ruby
4 which is a sim­ple YAML dataset in comments
5 it auto­mat­i­cal­ly takes the last minor release of the 7.2 branch
6 always bet­ter to avoid conditions