try before you buy
play

Try before you buy User provisioned sites targeting multiple - PowerPoint PPT Presentation

Try before you buy User provisioned sites targeting multiple providers Murray Woodman, Marji Cermak February 15, 2014 How did we get here? How can we make it easy for users to spin up sites? Drupal As A Service There are lots of options


  1. Try before you buy User provisioned sites targeting multiple providers Murray Woodman, Marji Cermak February 15, 2014

  2. How did we get here?

  3. How can we make it easy for users to spin up sites?

  4. Drupal As A Service There are lots of options now

  5. APIs which allow installing or cloning

  6. Introducing Cyclone Drupal contrib module Open source Jenkins scripts http://drupal.org/projects/cyclone http://github.com/morpht/cyclone-jenkins

  7. Architecture

  8. Demo User provisioning a site with Cyclone

  9. Platform APIs

  10. .+. .+?: .+??. ??? . +???. +?????????=. .???????????. .????????????. ########### ######## ############.#######. ####### #### ....... ######## #### ####### 50 41 4E 54 48 45 4F 4E #########.####.###### _____________ __ ________ ____ ______ ###### ... /_ __/ __/ _ \/ |/ / _/ |/ / / / / __/ #######.??.########## / / / _// , _/ /|_/ // // / /_/ /\ \ #######~+??.######### /_/ /___/_/|_/_/ /_/___/_/|_/\____/___/ ########.??.. #########.??.#######. #########.+?? ######. .+?. .????????????. +??????????, .????++++++. ????. .???, .~??. .?? .?,.

  11. Terminus (Pantheon) ● Command Line Interface (CLI) ● Drush plugin ● Open-source https://github.com/pantheon-systems/terminus

  12. CLI version of Pantheon ● Create new sites. ● Deploy code. ● Sync environments. ● Perform backup on demand. ● Connect to services: database, filesystem.

  13. Terminus session $ drush pantheon-auth $ drush pantheon-site-create my-site --label='My Site' -- product=21e1fada-199c-492b-97bd-0b36b53a9da0 $ drush pantheon-aliases $ drush -y @pantheon.my-site.dev si --site-name='My site' pantheon $ drush -y @pantheon.my-site.dev en views ctools $ drush psite-dash my-site -y $ drush psite-clone $SITE_UUID dev test

  14. Cyclone methods for Pantheon site_create ● import <archive_url> <new_site> ● install <product_id> <inst_profile> <new_site> ● clone <src_site> <new_site> site_destroy <site>

  15. Pantheon heads up Upstream repos are coming! https://groups.google.com/a/getpantheon.com/forum/#!forum/engineering-talk

  16. Provision (Aegir) A backend component of the Aegir hosting system. https://drupal.org/project/provision Access functionality via drush. ● manage drush aliases ● provision sites ● delete sites ● perform backup on demand https://drupal.org/project/provision

  17. Provision (Aegir) Clone an existing site $ drush @wellington.cyclone.morpht.com provision-clone @my- wellington.cyclone.morpht.com $ drush @hostmaster hosting-task --force @platform_drupal726 verify https://drupal.org/project/provision

  18. Provision (Aegir) Install a new site from installation profile $ drush provision-save @kiwi.cyclone.morpht.com --context_type=site --uri=kiwi.cyclone.morpht.com --platform=@platform_drupal726 --profile=standard --db_server=@server_localhost --client_name=admin $ drush @kiwi.cyclone.morpht.com provision-install $ drush @hostmaster hosting-task --force @platform_drupal726 verify https://drupal.org/project/provision

  19. Cyclone methods for Aegir site_create ● clone <src_site> <new_site> ● install <platform_alias> <inst_profile> <new_site> site_destroy <site>

  20. Cyclone The contrib project

  21. Demo A walkthrough of the backend UI

  22. ctools plugins Making things extensible

  23. Builders $plugin = array( 'name' => 'cyclone_builder_jenkins', 'label' => t('Jenkins Builder'), 'description' => t("Builds sites with Jenkins."), 'handler' => array( 'class' => 'CycloneJenkinsBuilder', ), );

  24. Webhook: Jenkins talks to Cyclone

  25. webhook module $plugin = array( 'title' => t('URL encoded key=value'), 'handler' => array( 'class' => 'Webhook_Plugins_ Unserializer _UrlEncoded', ), ); $plugin = array( 'title' => t('Cyclone Status Processor'), 'handler' => array( 'class' => 'CycloneStatus Processor ', ), );

  26. Objective 1 No hacky Jenkins scripts

  27. Cyclone Jenkins Builders Cyclone cyclone_jenkins/cyclone/builders.py passes the class Aegir(Builder): def __init__(self, provider): Builder def site_create(self, site_id, target, params, extensions): def site_destroy(self, site_id, target, params, extensions): class as a class Pantheon(Builder): string down def __init__(self, provider): to Cyclone def site_create(self, site_id, target, params, extensions): def site_destroy(self, site_id, target, params, extensions): Jenkins.

  28. Objective 2 Easily extensible

  29. Extensible Extensions ;-) Cyclone cyclone_jenkins/cyclone/extensions.py passes the class Variables(Extension): def extend(self, ext_params): Extension class Enable(Extension): class as a def extend(self, ext_params): class Disable(Extension): string down def extend(self, ext_params): to Cyclone class SomethingReallyBespoke(Extension): def extend(self, ext_params): Jenkins.

  30. Cyclone Jenkins The backend companion https://github.com/morpht/cyclone-jenkins

  31. Why Jenkins? ● Auditing ● Serialise jobs ● Security

  32. Jenkins security: a few worries ● Superpowers ● No SSL with basic auth ● Logged in users often can do anything ● Anonymous user can see too much

  33. Jenkins hardening tips ● HTTPS offloader ● firewall when possible ● user TOKENS for evoking scripts ● use the LTS Jenkins version, installed from a package

  34. Conclusion User provisioned sites

  35. Who is this for? ● Trainers can provide sandboxes for education. ● Agencies can demo for leads. ● Entrepreneurs can provide subscription services. ● Institutions can give power to departments. ● Evangelists can expose new users to Drupal.

  36. Drupal site showcase Not trivial to set up Jenkins. Agencies can try out Cyclone. Proof of concept. http://drupal.site-showcase.com

  37. The future ● Refactoring is required. ● Stabilise code for current providers. ● Integrate new providers: ○ Acquia ○ Aberdeen ● Helpful extensions

  38. Thanks Murray Woodman (@murrayw) Marji Cermak (@cermakm) Ivan Zugec (@zugec) Morpht (@morphtmedia) Slides http://tinyurl.com/cyclone-project

Recommend


More recommend