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

E2c56065efaa68d9db4ffdf4efb6ee74?s=47 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.

E2c56065efaa68d9db4ffdf4efb6ee74?s=128

Nate Iler

September 27, 2018
Tweet

Transcript

  1. 3.

    • 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. 4.

    • Automate scaling ◦ Up for high demand ◦ Down

    for low demand • Automate recovery • Loosely coupling resources • Monitoring Reliability
  3. 5.

    • Experiment • Decouple with growth ◦ Database ◦ App

    • Appropriate Type / Size • Tune Performance
  4. 6.

    • Evaluate providers • Leverage efficient services • Automation ◦

    Last project as starting point ◦ Autoscale • Build -vs- Buy Cost
  5. 7.

    Infrastructures of Today • Expensive • Physical Hardware • Maintenance

    Staff • Single point of failure Datacenter On Premise Cloud / Iaas Infrastructure as Code
  6. 21.

    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. 22.

    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. 23.

    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. 24.

    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. 25.
  11. 26.
  12. 27.

    Pipeline: Project PASS FAIL artifact Only perform deployment from master/develop

    branches git push via webhook Continuous Integration Continuous Delivery deployment provider
  13. 28.

    Pipeline: Plugin PASS FAIL /docs Only deploy docs from master

    branch git push via webhook Continuous Integration Continuous Delivery
  14. 29.
  15. 30.

    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)
  16. 31.

    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
  17. 32.

    Resources • 1Password • LastPass • Let’s Encrypt • AWS

    Certificate Manager • OpenVPN • AWS Auto Scaling • AWS Auto Recovery • Service-oriented architecture
  18. 33.

    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
  19. 34.

    Resources • Codeception Testing • AWS Instance Types • Splunk

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