Building and Deploying MediaSalsa, an Open Source DAM as Saas platform
-
Upload
kris-buytaert -
Category
Technology
-
view
216 -
download
3
Transcript of Building and Deploying MediaSalsa, an Open Source DAM as Saas platform
Building and Deploying MediaSalsa
A Digital Asset Management System as a Service
Kris Buytaert@krisbuytaert
Slides by Michel van de Ven and Julien Pivotto
Kris Buytaert
I used to be a Dev,
Then Became an Op
Chief Trolling Officer and Open Source Consultant @inuits.eu
Everything is an effing DNS Problem
Building Clouds since before the bookstore
Some books, some papers, some blogs
Evangelizing devops
MediaMosa
Drupal-based Digital Asset Management system
Commissioned by SURFnet and Kennisnet
Open Source (GPLv2), Open Standards
Webservice oriented: REST
Store & retrieve assets
Manage metadata using open standardsDublin Core, Qualied DC, IEEE/LOM, CZP
OAI-PMH, BagIt
Transcode video, audio, images, PDF &c, stream content
Users: Kennisnet, NIBG, UGent, UvA, TiU, RUG, Radboud, UOslo, Avans, PolitieAcademie, Acquia (NBC Sport), Cineca &c
http://mediamosa.org
=
MediaMosa as a Service
MediaSalsa infrastructure (simplied)
For each environment (OTAP)Backends: Core service (MediaMosa)
Frontends: Optional
Web servers
Database servers
Solr servers
Transcoding servers
Instance @ RUG DC for NL .edu
Instances @ Commercial DCs for non-edu
CultureAutomationMeasurementSharing
Inuits
Inuits is an Open Source companyWe contribute back
+40 people in 3 countries (BE, NL, UA)
One language: English
We offerConsultingDevelopment
System Administration
and a niche Saas Platform
Ideal world vs budget and reality pragmatic approach
Distributed team
Communication = HELL
How to x it?
Distributed team
Daily virtual stand-up over XMPP / Hangout
Redmine project managementIssues, tasks, sprints
Repositories
Documentation (wiki)
Internal mailing lists
Jenkins notications by mail and XMPP
Internal training
Dev and Ops
Dev
Architecture
Develop new features
Write unit tests (!)
Ops
Infrastructure (puppet)
CD and CI (jenkins)
Ops teach dev about monitoring and distributed services Dev teach ops about required libraries and testing, dependencies
CultureAutomationMeasurementSharing
Puppet
Puppet automates all the things
mcollective orchestrates all the things
CD
Continuous Delivery vs Continuous DeploymentContinuous Delivery doesn't mean every change is deployed to production ASAP. It means every change is proven to be deployable at any time (@ccaum)
Puppet codeDeployed to dev environment
Same puppet code for each environment
User-triggered deployments to UAT & Prod
Feature ags in Puppet code per environment (switchable architecture)
Application codeContinuous integration in dev
User-triggered deployments to UAT
Deployment to prod is a business decision
Testing
Developers test a lot, butThe tests dont work
It works on my machine
Wrong platform
Wrong PHP version
Fixed now, thanks to Jenkins!
and Vagrant...
Version Control
Git
Code is under revision controlPrefer small commits
Local features branches
Infrastructure as code git / hiera
Using OS packaging system
Consistency, security, dependencies
Uniquely identify where les are coming from
Source repo may not be reacheable
Little overhead when you automate
Conguration does not belong in a package
Pipelines
A collection of jobs
Run in sequence
Start on checkout, end on deployment
From the developers side:
Git push
Mail with changes + link to deploy
Our current pipelines
Puppetized
Puppet code and Application code (backend and frontends)
1 pipeline / project / customer
Dening a pipeline:salsajobs::pipeline::frontend { qwerty-inc: git_repository => ssh://git@redmine/qwerty.git, dashboard_view => mds-frontends, target_urls => { uat => http://qwerty.uat.mediasalsa.eu, prod => http://qwerty.mediasalsa.eu, }, require => Salsajobs::Views::Dashboard[mds-frontends],}
Pipelines steps
Checkout
Syntax: php -l
Style: Drupal Coder
Package: FPM
Deploy to dev environment: mcollective
Tests in dev environment: drush run-tests
Publish package and promote: mcollective
Promotion
At the end of the pipeline
Send a simple emailA link to the promotion page
The changelog
Promotion page contains one button per environment
Must promote to UAT before Production
Tools used with Jenkins
Pulp to manage RPM repositories
Mcollective to update packages, run drush
Same Pipelines, Tools, Patterns are used by both devs and ops
CultureAutomationMeasurementSharing
Logstash
Collect all the logsDrupal logs
Apache logs
Deployment logs
System logs
Interprete, filter and correlate them
Logstash, ElasticSearch, Kibana, statsd, Graphite
Icinga
Monitor everythingvhosts
databases
cronjobs
unit test suites
Graphite + gdash
Collectd
Monitor platform usage
FFmpeg usage
Number of accounts
Pipelined !
CultureAutomationMeasurementSharing
Open Source
Mediamosa is Fully Open Source
Lots of the PuppetCode to deploy it is
Our passwords etc aren't
Experiences
We have just shared our experience...
But also at the NLUUG Fall Conference, DrupalCon Prague
Contact
Kris Buytaert [email protected]
Further Reading@krisbuytaert http://www.krisbuytaert.be/blog/http://www.inuits.be/
Inuits HQ
Duboistraat 502060 AntwerpenBelgium891.514.231
+32 475 961221