UGent Django Infrastructure
-
Upload
kevinvw -
Category
Technology
-
view
148 -
download
2
Transcript of UGent Django Infrastructure
![Page 1: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/1.jpg)
Django Infrastructure @ UGentKevin Van Wilder
![Page 2: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/2.jpg)
Why We Set Up the Django Infrastructure
As an Alternative to Plomino● Rapid application development● yet Reliable, Maintainable, Scaleable● Better at Handling Large Loads● Seperate Applications from Portal Site
![Page 3: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/3.jpg)
Source Code Infrastructure
![Page 4: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/4.jpg)
Git Repositories
Each project has 2 repositories
● site-<projectname>.git○ Django Source Code○ Business Logic of the application
● pkg-<projectname>.git○ Debian Package Source Code○ Installation Logic of the application
Each repository has a specific code structure.
○ Why? Automation!
![Page 5: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/5.jpg)
Git Flow
http://nvie.com/posts/a-successful-git-branching-model/
![Page 6: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/6.jpg)
Server Infrastructure
![Page 7: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/7.jpg)
Load Balancerdjprd
Web + Appdjprd1
Web + Appdjprd2
...
DB
Overview Production Infrastructure
![Page 8: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/8.jpg)
Managed by Developers
Managed by Jenkins Pipeline & Puppet
Load Balancerdjprd
Web + Appdjprd1
Web + Appdjprd2
DBframboo
s
Load Balancerdjqas
Web + Appdjqas1
Web + Appdjqas2
Web + Appdjtst1
Web + Appdjdev1
Complete Infrastructure
![Page 9: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/9.jpg)
“Web + App” Servers
PuppetizedContinuous Deployment via JenkinsEach server contains all the appsLoad Balanced
![Page 10: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/10.jpg)
Database
framboos.ugent.beMaar migratiemogelijkheden naar:● PostgreSQL● MySQL● SQLite● Oracle
![Page 11: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/11.jpg)
Support Tools
![Page 12: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/12.jpg)
Version Overview
![Page 13: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/13.jpg)
Supporting Tools
![Page 14: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/14.jpg)
Supporting Tools
![Page 15: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/15.jpg)
Other Tools
AnsibleMaintenance Task Orchestration● db syncs● process restarts● etc
![Page 16: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/16.jpg)
Continuous Deployment Pipeline
![Page 17: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/17.jpg)
Jenkins
![Page 18: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/18.jpg)
Project Specific Buildsteps
Project Independent Buildsteps
Build Unit Test Acceptance Test Package Deploy TST
Deploy QAS
Deploy PRD
Onderwijstips
Kwalifacts
Telefoonboek
UGent Mobile
Abstract Jenkins Pipeline
![Page 19: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/19.jpg)
Abstract Jenkins Pipeline
Build
Unit Test
Acceptance Test
Package
Deploy TST
Deploy QAS
Deploy PRD
Start Project Build The only part of the pipeline that is specific to a project
Starts execution of the pipeline
Calls the “Build” job with the project-specific parameters:
PROJECT_NAME
PACKAGE_NAME
To add a new project pipeline, simply...
Duplicate this job
Change the values of the parameters
![Page 20: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/20.jpg)
Abstract Jenkins Pipeline
Build
Unit Test
Acceptance Test
Package
Deploy TST
Deploy QAS
Deploy PRD
Start Project Build
Build
Clones the Git code for the web application
Unit Test
Finds all the written unit tests and executes them
Acceptance Test
Currently not yet implemented.
Finds all the written acceptance tests and executes them
Package
Clones the Git code for the debian package
Copies over the tested source code
Builds a Debian Package
![Page 21: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/21.jpg)
Abstract Jenkins Pipeline
Package
Deploy TST
Deploy QAS
Deploy PRD
Start Project Build
Deploy TST
Built packages are automatically deployed to Testing
Deploy QAS
Manual trigger for deployment to Quality Assurance
Can only be triggered if successful deploy to TST
Deploy PRD
Manual trigger for deployment to Production
Can only be triggered if successful deploy to QAS
Build
Unit Test
Acceptance Test
![Page 22: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/22.jpg)
Future
![Page 23: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/23.jpg)
Future
Asynchronous Messaging (RabbitMQ)Caching
Response Caching (Varnish)Low-Level Caching (Memcached)
Acceptance Testing (Selenium)Seperate database for each environmentMore Monitoring (Graphite)
![Page 24: UGent Django Infrastructure](https://reader033.fdocuments.us/reader033/viewer/2022052822/554fa1f4b4c90586258b4a22/html5/thumbnails/24.jpg)
Kevin Van Wilder@KevinVanWilderOpen Source Consultant
INUITSDuboisstraat 50 - 2060 Antwerphttp://www.inuits.eu
QUESTIONS ?