python docker kubernetes python docker kubernetes and
play

Python, Docker, Kubernetes, Python, Docker, Kubernetes, and beyond? - PowerPoint PPT Presentation

Python, Docker, Kubernetes, Python, Docker, Kubernetes, and beyond? and beyond? Peter Bbics Peter Bbics | EuroPython 2018 EuroPython 2018 July 25, 2018 July 25, 2018 Based in Prague Small team of developers Developing a trading


  1. Python, Docker, Kubernetes, Python, Docker, Kubernetes, and beyond? and beyond? Peter Bábics Peter Bábics | EuroPython 2018 EuroPython 2018 July 25, 2018 July 25, 2018

  2. Based in Prague Small team of developers Developing a trading platform and strategies Using open source

  3. Our trading platform and tooling Our trading platform and tooling Python 3.6 + React.js asyncio Redis & TimescaleDB for storage Integrating third party libraries using Cython Dozens of processes Messaging - Kafka / RabbitMQ

  4. In the beginning In the beginning There was chaos There was chaos

  5. In the beginning In the beginning Applications deployed on physical servers Managed by circus Packages installed in virtualenv Under a single user

  6. Pros Pros Simple implementation and deployment Cons Cons Package versioning hell No failover

  7. A wild blue whale appeared A wild blue whale appeared

  8. The promise of a brighter future The promise of a brighter future Unified environment Simple deployment Simple migrations Faster Continuous Integration (CI) Atomic releases

  9. Migration challenges Migration challenges Image storage - GitLab registry Image caching Dedicated building environment build_job: script: - docker build -t $CI_IMAGE_NAME . build_job: script: - 'docker run -d -p 9000:9000 -v "/:/data" sleep 1y' CI pipeline design Cleaning up old images

  10. Migration highlights Migration highlights Unified, stable environment Fast builds Isolated environments Faster CI pipeline

  11. Cons of plain Docker Cons of plain Docker Known bugs No failover dockerd is a single point of failure

  12. Docker gotchas Docker gotchas PID 1 pitfall User permissions within containers

  13. Ahoy! Ahoy!

  14. Warmly welcomed features Warmly welcomed features Failover when a server fails Configuration stored in namespaces Service discovery my-service.my-namespace.svc.cluster.local Ingress controller Deployment history $ kubectl rollout undo deployment my-app

  15. Where we are now Where we are now Migration to Kubernetes is in progress Environment is configured by namespace variables Deployments are described in Jinja2 templates {% set env_type, profile_name = PROFILE.split('_', 1) %} {% set namespace = "my-ns-" + env_type %} {% set data_directory_mount = '/data' %} {% if profile_name == 'cthulu' %} - name: API_KEY valueFrom: secretKeyRef: name: secret key: api_key - name: SUBSCRIPTION_INSTRUMENT_FILTER value: 'False' {% endif %}

  16. Notable features Notable features Probes Update strategies

  17. Update strategies - Rolling update Update strategies - Rolling update

  18. Update strategies - Recreate Update strategies - Recreate

  19. Thank you Thank you peter.babics@ peter.babics@quantlane.com quantlane.com github.com/qntln github.com/qntln

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend