Managing Custom Plugin Deployments at Scale WPCampus 2019 Matt - - PowerPoint PPT Presentation

managing custom plugin deployments at scale
SMART_READER_LITE
LIVE PREVIEW

Managing Custom Plugin Deployments at Scale WPCampus 2019 Matt - - PowerPoint PPT Presentation

Managing Custom Plugin Deployments at Scale WPCampus 2019 Matt Fields (he/him) @0x6d617474 mafields@ncsu.edu About Myself - Systems Programmer at NC State University - Engineering - Started as a student web developer in 2009 - Full time


slide-1
SLIDE 1

Managing Custom Plugin Deployments at Scale

WPCampus 2019

Matt Fields (he/him) @0x6d617474 mafields@ncsu.edu

slide-2
SLIDE 2

About Myself

  • Systems Programmer at NC State University - Engineering
  • Started as a student web developer in 2009
  • Full time developer in 2016, transferred to Systems in 2018
  • Active in WordPress development for about 7 years
  • Designed much of the Engineering WordPress Environment
  • Mostly enjoys back-end work and integrations

Matt Fields (he/him) @0x6d617474 mafields@ncsu.edu

slide-3
SLIDE 3

Today’s Discussion

Managing Custom Plugin (and Theme) Deployments at Scale

  • A Journey through deploying custom WP packages
  • Meet Cthulhu
  • Available deployment options today
  • A shameless plug community project

“Package” being a generic term for a plugin or theme

slide-4
SLIDE 4

Let’s Go Back to 2013

NC State adopts WordPress as their main CMS Starting to move hand-coded sites into WordPress Recently deployed GitHub Enterprise to host in-house code

slide-5
SLIDE 5

WordPress at NC State

We have several different environment hosted by different units. Engineering - ~18 separate instances Office of Information Technology - Hundreds of separate instances Other Colleges - Multiple instances CPanel Hosting, Servers Under Desks, AWS, etc.

slide-6
SLIDE 6

Our First Custom Plugin - MultiAuth

At the time, our SSO implementation was “WRAP” We wanted to use SSO in WordPress No support for WRAP There was still value in having local accounts We wanted to support both types of authentication.

slide-7
SLIDE 7

Not Publishing to WP.org

WRAP auth was specific to NC State, and no one else would benefit from using the plugin but folks on campus We didn’t want to have to provide public support for it Security concerns about publishing the source code of our authentication plugin

slide-8
SLIDE 8

Install on ALL The Sites!

Development finished, plugin was ready to deploy Created a zip file by downloading source from github.ncsu.edu Uploaded the zip file to every site, and activated the plugin Mission accomplished! … Right?

Image Credit: https://hyperboleandahalf.blogspot.com/2010/06/this-is-why-ill-never-be-adult.html

slide-9
SLIDE 9

Critical Update

We had a critical bug that prevents users from logging in The fix was easy, but now we had to push out the update...

slide-10
SLIDE 10

Update ALL The Sites!

Download the zip file again, and upload to every site

  • again. We were lazy and didn’t bump the version

number, so we missed a few which caused more confusion. Wouldn’t it be nice if we could just push updates like

  • n WP.org?

Image Credit: https://hyperboleandahalf.blogspot.com/2010/06/this-is-why-ill-never-be-adult.html

slide-11
SLIDE 11

Getting Complicated

Pull in Twig and Javascript libraries to handle UI work Composer and NPM and Makefiles, Oh My! HowToInstall.txt

slide-12
SLIDE 12

Main Problems with Deploying Custom Packages

1.) Self-service installs are complicated and inconsistent 2.) Automated updates don’t work, or require custom code 3.) Packaging from source can be complicated 4.) Limiting access can be complicated without custom code 5.) Problems scale with number of deployments

slide-13
SLIDE 13

Options We Explored

  • Deal with it…
  • Per plugin update systems
  • GitHub Updater
  • Instance management systems
  • Build something to solve the problem
slide-14
SLIDE 14

Meet Cthulhu

Plugin and web service combination that uses the native WordPress installation and update capabilities to manage deployments of custom plugins and themes! Mostly invisible after installation - easy to use!

slide-15
SLIDE 15

WordPress View

  • Browse plugins just like ones hosted on WP.org
  • Native one-click install and update
  • Search functionality
slide-16
SLIDE 16

Developer’s View

  • Developer writes code, and triggers a new build
  • Plugins/themes are grouped into repositories
  • Each plugin/theme has three update channels:
  • Production
  • Staging
  • Development
  • Build history, deployment stats, and more
  • Optionally limit access via access codes
slide-17
SLIDE 17

Problems Revisited

1.) Self-service installs are complicated and inconsistent 2.) Automated updates don’t work, or require custom code 3.) Packaging from source can be complicated 4.) Limiting access can be complicated without custom code 5.) Problems scale with number of deployments All solved by using Cthulhu!

slide-18
SLIDE 18

Pros and Cons

Pros:

  • Solves our problems
  • Plugin authors don’t need to

write custom update code

  • Native WordPress interface
  • Doesn’t require plugins be

active to update

  • Override other update

functionality

Cons:

  • Maintenance of web app
  • Requires initial plugin install
slide-19
SLIDE 19

Available Options Today

  • Eliminate the need
  • Hosting provider services
  • Deal with it…
  • Per plugin update systems
  • GitHub Updater / WP Pusher
  • Custom development
slide-20
SLIDE 20

Community Project

Bringing the functionality of Cthulhu to the community as an

  • pen source project!

https://github.com/magmaticlabs/obsidian Looking for contributors and people interested in testing

slide-21
SLIDE 21

Live Demo

slide-22
SLIDE 22

Questions?

Please direct your questions to the website, and I will answer them shortly after the session! I’ll also be hanging around afterwards for more in-depth discussions.

slide-23
SLIDE 23

Contact

Matt Fields @0x6d617474 mafields@ncsu.edu