# Outline 1. Introduction - 20 minutes 2. Coding Dojo - 60 minutes 3. Conclusion - 10 minutes
# Introduction


Container-native development

Develop, build, test & deploy on the same container

Push ready-to-run Docker images to a registry
instead of
pushing code to a code repository


containerizing applications means
developers take responsibility


inviting edx-configuration and devstack inside edx-platform
# Meet Arnold
🐙 [github.com/openfun/arnold](https://www.github.com/openfun/arnold) - Packaged as a Docker image - Ansible with [openshift_raw](https://docs.ansible.com/ansible/2.5/modules/openshift_raw_module.html) - [OC](https://docs.openshift.org/latest/cli_reference/index.html) (OpenShift CLI client) Note: container can be used directly in CI

🐳 Docker images

github.com/openfun/fun-platform Native Docker image of edxapp
github.com/openfun/openshift-docker Docker images adapted to OpenShift for related services (nginx, elasticsearch, etc.)
github.com/openfun/richie Native Docker image of Richie, a CMS for Open edX based on DjangoCMS

Built on CircleCI and pushed to Docker Hub

# 🍱 Configuration management - Multi-customer, multi-environment - Built on Ansible - Flexible defaults / overrides - Make extensive use of variable precedence - Credentials are encrypted with Ansible vault and pushed to OpenShift secrets
# 🏭 Generate OpenShift objects Using Jinja templates and Ansible playbook tasks: - Routes - Services (SVC) - Deployment Configurations (DC) - Endpoints (EP) - Jobs (e.g. collectstatic, migrate,...) - Volumes (PVC) 💾 - Configmaps 📁 - Secrets 🙈
![architecture development](img/architecture_development.png)
# Blue/Green deployments ![blue green](img/blue_green.png) Note: for each deployment, we create unique objects with a stamp The stamp is datetime + random hash (short uuid)

🔒 SSL certificates


Environment Orchestrator Databases Routes
Development Local MiniShift Container https://development-example-lms.
Feature OpenShift dev Container https://feature-example-lms--feature-description.dev.openfun.fr
Staging OpenShift dev Cluster dev https://staging-example-lms.dev.openfun.fr
PreProduction OpenShift dev Cluster dev https://preproduction-example-lms.dev.openfun.fr
Production OpenShift prod Cluster prod https://www.example.com
![init container](img/init_container.png) Note: The CI does not have access to our secrets
# Coding Dojo - All skill levels are welcome - Teams of 3 to 4 persons - At least 1 person who knows Docker per team - At least 1 person who knows Ansible per team - Call us when you need help
``` git clone git@github.com:openfun/arnold.git git checkout openedx-con ``` and follow the readme...
# Conclusion
# 🚧 Todo list - current routes and blue/green switch - load SQL dump for development/feature envs - refactor settings override mechanism - github issues...