Currently, only servers can have services associated with them in Aegir's front-end. This is in contrast to Provision, where a service a required in order to write into a context, including platforms and sites. A couple examples might help to illustrate.
In #2412563: amazon s3 storage service, I've begun implementing S3 bucket provisioning for sites. My initial thought was to implement this as a Hosting service, but quickly realized that it didn't make sense to associate it to a server entity. Similarly, for CiviCRM, we provision a CiviCRM database, and provide cron tasks.
In the long run, it might be interesting to even abstract Drupal out of sites, and bundle its functionality in a site-level service.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2457425-hostingservice-site-form.patch | 15.54 KB | Jon Pugh |
#5 | Screenshot from 2017-05-25 12-29-24.png | 16.26 KB | Jon Pugh |
#5 | Screenshot from 2017-05-25 12-24-58.png | 75.35 KB | Jon Pugh |
Comments
Comment #1
ergonlogicIn fact, as for moving to entities/fields, I think we might want to consider a hosting_service entity as the basis for this re-factoring. Something akin to a simplified field_collection might work. Each service would essentially be a hosting_service bundle with the req'd fields attached. The base hosting_service entity might define 'enabled' and 'required' fields. We might also need a built-in 'type' field to allow a choice between multiple services of the same type.
With something like that, we should be able to also provide some simple wrappers to make adding fields programmatically easier, and allow a 'save_to_context' flag, to then inject the field data into the backend.
Comment #2
Jon PughI'm taking steps to at least bridge the gap.
I'm adding a way for HostingService classes to inject into Sites and Platforms forms via a method site_form() and platform_form().
Branch coming shortly.
Comment #3
Jon PughComment #5
Jon PughThe branch and patch do the following:
HostingService_TYPE_NAME->site_form()
into each fieldset.These screenshots are the bottom of the Site Node Edit page:
Comment #6
Jon PughComment #7
Jon Pugh