Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Docker and SDL Web/Tridion - SDL UK User Group April 2017

349 views

Published on

Robert Stevenson-Leggett's slides from his talk on using Docker with SDL Tridion/Web in production and some plans for the future.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Docker and SDL Web/Tridion - SDL UK User Group April 2017

  1. 1. Using Docker with SDL Tridion/Web SDL Web/Tridion UK User Group Robert Stevenson/Leggett - April 2017
  2. 2. Who am I? Robert Stevenson-Leggett • Technical Architect at Building Blocks • ex-MVP - not enough blog posts! • Twitter: @rsleggett • r.leggett@building-blocks.com
  3. 3. Agenda 1. What is Docker? 2. How we used Docker with SDL Tridion 2013 SP1 and DD4T Java 3. Messing around with Docker and SDL Web 8.5 4. Next steps 5. Q&A
  4. 4. What is Docker?
  5. 5. What is Docker? “Docker is the world's leading software containerization platform” “Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.” https://www.docker.com/what-docker
  6. 6. Containers vs VMs source: Linkedin
  7. 7. Why Docker? 1. The client asked for it! 2. Removes risk from deployments by having a consistent configuration 3. Build once, deploy everywhere 4. Aiming for creating base images to put in our ProGet repository 5. It was new and cool!
  8. 8. How we used Docker with SDL Tridion 2013 SP1 Lessons learned in the real world
  9. 9. NGinx Proxy ContainerWeb Application Container What we created Tomcat Oracle JDK Linux Base Image DD4T Java Web App Nginx Proxy Ubuntu Base Image
  10. 10. Tridion Gotchas • Grey area for Support - i.e. not really supported! • Licensing • Not good support for Windows images - bad news for .NET • We only want to run the Content Delivery in Docker - not the CMS so limited to Java
  11. 11. The licence problem • Licences are server-bound so you need to match your Docker configuration to your server (hostname, CPUs etc) • We use 1 docker image per server (+ deployer) so as not to break licence agreement • All configs need to be in the image so the same image can be deployed to any server/environment • How do you tell the docker container which environment it is on?
  12. 12. Solving the licence problem Step 1 Place all licences for all environments in the container using your Dockerfile
  13. 13. Solving the licence problem Step 2 Use Tomcat’s setenv.sh file to set the CLASSPATH environment variable
  14. 14. Solving the licence problem Step 3 Tell Docker which environment and server the image is on via Docker Compose Segway - Why Docker Compose? Without compose: sudo docker run -d -t -i -e REDIS_NAMESPACE='staging' -e POSTGRES_ENV_POSTGRES_PASSWORD='foo' -e POSTGRES_ENV_POSTGRES_USER='bar' -e POSTGRES_ENV_DB_NAME='mysite_staging' -e POSTGRES_PORT_5432_TCP_ADDR='docker-db- 1.hidden.us-east-1.rds.amazonaws.com' -e SITE_URL='staging.mysite.com' -p 80:80 - -link redis:redis --name container_name dockerhub_id/image_name With compose: docker-compose up
  15. 15. Logging Set logback.xml as normal Use Docker Compose Volumes feature to map path inside container to a path on the host - then logs appear as normal!
  16. 16. Let’s look at some code
  17. 17. Docker and SDL Web 8.5
  18. 18. Docker Friendly Docker Friendly Features in SDL Web Parameterised config files (Web 8.5) Java based Microservices No need for licences in your web application
  19. 19. Let’s look at some code
  20. 20. What’s next?
  21. 21. Taking this further • Database server - needs to load data from external volumes and only really useful for local testing See: Renze’s post: https://renzedevries.wordpress.com/2015/12/23/continuous- deployment-with-docker-compose-and-spring-boot/ • Multiple web app containers • Active MQ and the Deployer • How to do licences better?
  22. 22. Swarms & Orchestration
  23. 23. Licensing & SDL Support • Current Licensing model restricts what is allowed / possible with Docker • Swarm/Kubernetes features like rolling upgrades may temporarily invalidate licence. • Greater clarity from SDL on what is supported is required.
  24. 24. Summary • Why Docker - because it allows “build once, deploy everywhere” and reduces risk of deployment. • Docker - SDL Tridion 2013 SP1 - possible but has a lot of gotchas! • Docker - SDL Web 8.5 - great features but not officially supported. • Next up - Swarms, rolling updates and licensing!
  25. 25. Thanks!

×