... | ... | @@ -55,4 +55,56 @@ These should likely mostly be situated on the queue worker, so as to be accessib |
|
|
|
|
|
## User experience
|
|
|
|
|
|
By default, entities should provide only admin UI components. But, being built on fieldable entities, these should then all be accessible to Views, Panels, etc. to allow for better end-user experience. We should provide a "default" UI, but ensure that this can be easily customized, or replaced entirely. |
|
|
\ No newline at end of file |
|
|
By default, entities should provide only admin UI components. But, being built on fieldable entities, these should then all be accessible to Views, Panels, etc. to allow for better end-user experience. We should provide a "default" UI, but ensure that this can be easily customized, or replaced entirely.
|
|
|
|
|
|
## Front-end class hierarchies (examples)
|
|
|
|
|
|
### Scenario 1
|
|
|
|
|
|
* Distribution (Application?)
|
|
|
* Platform (Codebase?)
|
|
|
* Site (ApplicationInstance?)
|
|
|
* CmsSite
|
|
|
* DrupalSite
|
|
|
* Drupal7Site
|
|
|
* CiviCrmDrupal7Site
|
|
|
* Drupal8Site
|
|
|
* WorpPressSite
|
|
|
* WordPress4Site
|
|
|
* CiviCrmWordPress4Site
|
|
|
* Task
|
|
|
* AnsibleTask
|
|
|
* AnsiblePlatformTask
|
|
|
* AnsibleSiteTask
|
|
|
* AnsibleDrupalSiteTask
|
|
|
* AnsibleInstallDrupalSiteTask
|
|
|
* AnsibleDisableDrupalSiteTask
|
|
|
* AnsibleBackupDrupalSiteTask
|
|
|
* ...
|
|
|
|
|
|
|
|
|
|
|
|
### Scenario 2
|
|
|
|
|
|
* Compose Sites, Platforms, (etc.) from Tasks (e.g., WriteNginxVhostTask, ProvisionMySqlDatabaseTask,...).
|
|
|
* Operations combine Tasks into user-facing actions (e.g., InstallCmsSiteOperation).
|
|
|
* Tasks are re-usable within other Operations.
|
|
|
|
|
|
## Backend implementation (examples)
|
|
|
|
|
|
### Ansible-playbook queue worker
|
|
|
|
|
|
1. Celery queue worker receives task.
|
|
|
2. Writes temporary playbook:
|
|
|
```
|
|
|
- hosts: web0
|
|
|
vars:
|
|
|
( populated from task )
|
|
|
roles:
|
|
|
( populated from task )
|
|
|
```
|
|
|
3. Runs playbook.
|
|
|
4. Posts log output to front-end URL, where it populates the task log.
|
|
|
5. Roles may receive a "feedback_url" variable, whence it can post data required by the front-end (e.g., backup path, git commit hash, etc.)
|
|
|
1. Role is responsible for a cURL (or whatever) call to post data to the provided URL.
|
|
|
6. Cleans up playbook. |