SLIDE 1
Managing Custom Plugin Deployments at Scale
WPCampus 2019
Matt Fields (he/him) @0x6d617474 mafields@ncsu.edu
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 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
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
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
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
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 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
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 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
Image Credit: https://hyperboleandahalf.blogspot.com/2010/06/this-is-why-ill-never-be-adult.html
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
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 Options We Explored
- Deal with it…
- Per plugin update systems
- GitHub Updater
- Instance management systems
- Build something to solve the problem
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 WordPress View
- Browse plugins just like ones hosted on WP.org
- Native one-click install and update
- Search functionality
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
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 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
functionality
Cons:
- Maintenance of web app
- Requires initial plugin install
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 Community Project
Bringing the functionality of Cthulhu to the community as an
https://github.com/magmaticlabs/obsidian Looking for contributors and people interested in testing
SLIDE 21
Live Demo
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
Contact
Matt Fields @0x6d617474 mafields@ncsu.edu