Creating an Drupal App Server
I have just figured out, how I can create my own app server. If you want to follow in my steps, I have created an install profile, you could utilize (and maybe give some feedback to). The install profile for the Drupal App Server is available at github. As a working title I have called the install profile Open Apps.
Create the App
First, you should create an app. You can find directions for building the app here. Put the appname.info and appname.module file into your appname-folder with the files stated in the mentioned howto about Drupal Apps. Package the folder using your zip program and name it appname-7.x-X.Z.zip. There is probably smarter ways to do it - and if, please let me know in the comments.
Create the App Server
Use the installation profile, I have created. Fire up your command line (you should have git, drush and drush make installed):
$ git clone git://github.com/lsolesen/apps-deploy.git
$ cd apps-deploy
$ drush make openapps.make ~/localhost/openapps
Make sure that all the correct permissions is set for the files directory and the settings.php file. Create a database for your openapps. Then open your webbrowser and point it to your Open Apps installation. You should see a normal Drupal installation with the Open Apps installation profile. Go through all the settings, and you should be ready to create your own apps.
First, go to admin/structure and edit the taxonomies. A vocabulary with Server Type has already been setup. Add a term, e.g. Production.
Second, create your App release with your manifest. You can see an example here. Make sure that the App you created is downloadable from somewhere. Right now, I have just uploaded it via FTP to a public location. However, I would prefer to make it available on a featureserver (and I am still playing around with the installation profile to have it install e.g. fserver also).
Third, now the server should work. The url for the server’s JSON feed is at app/query/SERVERTYPE. If you choose Production it will be on app/query/Production. This url i used for your Drupal site which have installed the apps module.
Using the server
You should tell apps about your apps server. You can do that by creating and enabling a module, that exposes the url to apps. The module to enable the apps server should look like this. It seems that you have to fiddle with the permissions on the sites folder to get apps to work correctly.
Caveats
Both appserver and apps is fairly early in development, so there are still some bugs. It seems that the required modules are not enabled automatically yet, and stuff is not automatically uninstalled when unenabling the apps. Also, I am not sure how different dependencies in different apps will be handles (e.g. some using views-3.x-dev and other using views-3.0-rc3). But you should start playing around with it now.
Please let me know if things could have been smarter, but please keep away from comments about Drupal Apps being poison for the Drupal Community. IMHO Apps will improve the usability of Drupal. Hopefully most developers and companys will keep their apps free.
You can be the first to add a comment below.
Leave a Comment
Din e-mail bliver ikke offentliggjort. Obligatoriske felter er markeret Required fields are marked *.