Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Craft CMS: Beyond the Small Business; Advanced ...

Nate Iler
September 27, 2018

Craft CMS: Beyond the Small Business; Advanced tools and configurationsCraft CMS: Beyond the Small Business; Advanced tools and configurations

A high level look at DevOps with Craft CMS. We cover infrastructure architectures, local development with Docker containers, and continuous integration / delivery.

Nate Iler

September 27, 2018
Tweet

Other Decks in Technology

Transcript

  1. • We owe it to our clients • Protect data

    in transit and at rest ◦ SSL ◦ Encryption • Managing access/policies • Omit sensitive data in plain text Security
  2. • Automate scaling ◦ Up for high demand ◦ Down

    for low demand • Automate recovery • Loosely coupling resources • Monitoring Reliability
  3. • Experiment • Decouple with growth ◦ Database ◦ App

    • Appropriate Type / Size • Tune Performance
  4. • Evaluate providers • Leverage efficient services • Automation ◦

    Last project as starting point ◦ Autoscale • Build -vs- Buy Cost
  5. Infrastructures of Today • Expensive • Physical Hardware • Maintenance

    Staff • Single point of failure Datacenter On Premise Cloud / Iaas Infrastructure as Code
  6. Assets Amazon S3, Google Cloud Storage, Rackspace Cloud Files, DigitalOcean

    Spaces, fortrabbit Object Storage Storage Volume Providers <?php $bucketBaseName = 'assets.bucket'; $baseS3Url = 'https://s3.amazonaws.com/'; $baseCDNUrl = 'https://cdn.your-site.com/'; $cloudFrontId = 'XXXXXXX'; return [ '*' => [ 'gallery' => [ 'bucket' => 'test.' . $bucketBaseName , 'hasUrls' => true, 'url' => $baseS3Url . 'test.' . $bucketBaseName . '/', 'subfolder' => 'gallery', 'region' => 'us-east-1', 'expires' => '1 months' ] ], 'production' => [ 'gallery' => [ 'bucket' => $bucketBaseName , 'url' => $baseCDNUrl . '/', 'cfDistributionId' => $cloudFrontId ] ] ]; config/volumes.php
  7. Session Management config/app.php <?php return [ 'components' => [ 'redis'

    => [ 'class' => yii\redis\Connection::class, 'hostname' => getenv('REDIS_HOSTNAME') ], 'session' => [ 'class' => flipbox\craft\session\Redis::class, 'keyPrefix' => 'session_' ] ] ]; composer require flipboxfactory/craft-session-redis 2) 1)
  8. Cache config/app.php <?php return [ 'components' => [ 'redis' =>

    [ 'class' => yii\redis\Connection::class, 'hostname' => getenv('REDIS_HOSTNAME') ], 'cache' => [ 'class' => yii\redis\Cache::class ] ] ]; ApcCache, ArrayCache, DbCache, DummyCache, FileCache, MemCache, WinCache, XCache, ZendDataCache Native Cache Providers
  9. Queues File, Db, Redis, RabbitMQ, AMQP Interop, Beanstalk, Gearman, AWS

    SQS config/app.php Native Queue Providers <?php return [ 'components' => [ 'queue' => [ 'class' => yii\queue\sqs\Queue::class, 'url' => getenv('SQS_URL'), 'region' => getenv('SQS_REGION') ] ] ];
  10. Pipeline: Project PASS FAIL artifact Only perform deployment from master/develop

    branches git push via webhook Continuous Integration Continuous Delivery deployment provider
  11. Pipeline: Plugin PASS FAIL /docs Only deploy docs from master

    branch git push via webhook Continuous Integration Continuous Delivery
  12. 4) 3) 2) 1) Install Docker: https://docs.docker.com/install/ composer create-project flipboxlabs/craft

    <SOME_DIR> make craft-setup make test Example Project Testing starts container, begins craft setup run all tests (via codeception) create new project (forked craftcms/craft)
  13. Thank You! We know; this topic is vast. Join us

    as we take a closer look at the topics covered in this presentation. (click to view this series) DevOps with Craft CMS
  14. Resources • 1Password • LastPass • Let’s Encrypt • AWS

    Certificate Manager • OpenVPN • AWS Auto Scaling • AWS Auto Recovery • Service-oriented architecture
  15. Resources • Terraform (IaC) • CloudFormation (IaC) • Docker •

    Docker for Craft (our starter project) • Scaling Up to Your First 10 Million Users • Shootout at the Local Dev Corral • Containers on AWS • AWS Well-Architected Framework
  16. Resources • Codeception Testing • AWS Instance Types • Splunk

    • Papertrail • Elastic (Beats, Logstash / Kibana / Elasticsearch) • Travis CI • Scrutinizer CI • Jenkins