Migrating to Python 3 using Docker for your CI/CD pipeline (even if you can't use it in production)

Speaker: Cobus Bernard

Track: Infrastructure / DevOps

Type: Talk

Room: Marathon

Time: Oct 10 (Thu), 13:30

Duration: 0:45

When moving from Python 2 to 3, it is hard to make sure that you application will work as planned without having to also worry about your build and deployment pipeline. You may also be in a position where you are unable to run Docker in production. In this talk, I will show you how to use Docker for your CI/CD pipeline and how to approach the move to Python 3 using containers to minimise the risk and complexity of the move. We will look at how Docker simplifies the build and test process by running all the steps inside containers by starting with a Python 2 repo in Github, adding Dockerfiles, using CodePipeline to build/test and then deploy to an instance using Docker to transport the application, but not run it. We will then branch the project and start a mock conversion to Python 3 using the same containers, and ultimately deploy to the instance. In the middle of this, we will look at changing the build process to add virtual environments to the production instance as we need to be able to use different versions of Python. The session will include a demo of how to create all the infrastructure with code to help attendees automate their own workflows.