Tug Your Site
Into CI
With Tugboat
Lullabot
Strategy // Design // Development
We create digital experiences for the world's best brands.
Chris Albrecht
Developer
-
chris@lullabot.com
-
@ChrisAlbrecht
-
drupal.org/u/KeyboardCowboy
The Tour
- What is CI?
- Typical Development Workflow
- Drupal's Difficulties
- Lullabot's Process
- Tugboat to the Rescue
- Demo?
- Q&A?
What is Continuous Integration (CI)?Definition
Merging multiple development lines of code into a mainline on a daily basis.
A DAILY BASIS?!
More of an approach to rapid development
Tools & Services
Jenkins
Travis CI
Circle CI
Not Really CI
"Frequent Integration"
"Continuous Delivery"
Rapid Deployment
Ensure the mainline is always in a deployable state
Development EcosystemSimple Setup
- Local or Dev
- Staging or Testing
- Production
- Less overhead
- Higher risk
- Quicker deployments
Advanced Setup
- Local
- Dev or Integration
- QA
- Stage/Test/UAT
- Production
- More overhead
- Less risk
- Slower deployments
Drupal
What is the most frustrating part of building a site in Drupal?
- PHP, MySQL, Apache/NGINX
- Admin UI for Developers AND End Users
- In D7, Content & Config in DB
- Large volume of code with lots of working parts
- Multiple ways to accomplish one thing
How do you manage it?
Our ProcessConfig in Code
Extensive use of Features in D7
D8 Config Management
Disable UI Modules
- Field UI
- Views UI
- Rules Admin
All Config in Dev
- Features
- Update hooks
- Custom modules
Extensive Review*
What’s the worst thing that can happen in your client’s eyes?
- GitHub Pull Request Workflow
- Peer Review
- QA
- UAT
Each adds time to deployment
*Depends on client
Pain PointsTesting Install Processes
What’s the largest database you’ve had to work with?
- "It worked on my Local!"
- "How recent is your DB?"
- "Do you have X running?"
- "What if the deployment fails?"
Epic Tickets
- Showing progress updates
- Multiple developers pushing code to one server
- Testing/debugging on actual mobile devices
Stakeholders
- Designers"This doesn't work on my phone. Change it."
- Marketing"Why are the ads below the fold? Change it."
- SEO"AJAX content isn't being indexed. Change it."
- Management"They said pie but meant cake. Change it."
- CEO"Make the cake-pie design POP! It needs sizzle."
http://theoatmeal.com/comics/design_hell
Stakeholders
Wouldn't it be great if we could avoid this?
Problems SolvedPush and Forget
- Automated builds
- Comments success/failures
- Work on your next ticket
Clean Locals
- Don't checkout other feature branches
- No local code conflicts
- Keep local database clean
Fast DB Resets
- Tugboat DBs reset FAST
- Test installation processes
Configuration mimics PROD
- More accurate representation
- Catch errors early in the process
Prevents Conflict
- Full site for every ticket
- Easily support multiple devs
Show Stakeholders
On which server are your stakeholders usually finding bugs?
- Real URLs
- Prod + Your Ticket
- Log in, test features/fixes
In Summary
- Less time resetting, more time developing
- Less risk of merge conflict
- More accurate testing conditions
- Iterative feedback
FASTER, CLEANER DEVELOPMENT
There's More!Integration
- GitHub
- BitBucket
- More coming soon
Versatility
- Regular Drupal
- Multisite Drupal
- Any linux-based system
UI Tools
- Summary Overview
- Terminals
- Logging
- Reset/Rebuild
- Locking Builds
- Kill Environments
Plugins
- Email Notifications
- Redeploy
- Test Suite
- Visual Diffs
Powered by Lullabot
Tug Your Site
Into CI
With Tugboat