@sampaccoud

![FUN Figures](../assets/images/fun_figures.jpg)

# Outline 1. Approach 2. Meet Arnold 3. Demo
# Approach

📦

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

Example:

github.com/openfun/richie

A FUN CMS for Open edX, based on Django-CMS

🤓

containerizing applications means
developers take responsibility
# 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/openshift-docker Docker images adapted to OpenShift for related services (nginx, elasticsearch, etc.)
github.com/openfun/fun-platform Native Docker image of Open edX
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](../materials/architecture_development.png)
![architecture](../materials/architecture.png)
# Blue/Green deployments ![blue green](../materials/blue_green.png) Note: for each deployment, we create unique objects with a stamp The stamp is datetime + random hash (short uuid)

SSL certificates

Environments

Environment Orchestrator Databases Routes
Development Local MiniShift Container https://development-example-lms.192.168.99.100.nip.io
https://development-example-cms.192.168.99.100.nip.io
Feature OpenShift dev Container https://feature-example-lms--feature-description.dev.openfun.fr
https://feature-example-cms--feature-description.dev.openfun.fr
Staging OpenShift dev Cluster dev https://staging-example-lms.dev.openfun.fr
https://staging-example-cms.dev.openfun.fr
PreProduction OpenShift dev Cluster dev https://preproduction-example-lms.dev.openfun.fr
https://preproduction-example-cms.dev.openfun.fr
Production OpenShift prod Cluster prod https://www.example.com
https://studio.example.com
![init container](../materials/init_container.png) Note: The CI does not have access to our secrets
# Demo
``` git clone git@github.com:openfun/arnold.git git checkout django-cong-2018 ``` ✨ follow the README...

🍻

Contributions welcome

🙏 Thank you!

👊 Get in touch:

fun.dev@fun-mooc.fr

github: openfun

🚀 We are recruiting!

🎓 Opensource for education