SlideShare a Scribd company logo

Django dev-env-my-way

This talk will try to cover the most important techniques and best practices used when creating Django web application. Overview of the topics covered: - development general principles and goals - python/django project initial setup - project layout, git&venv&pip&shell, settings - central project shell command - contains all commands to manage project - "IDE" - editor & shell - edit/run/test cycle - deploy/test-remotely cycle Disclaimer: techniques and practices presented are current AUTHOR'S optimal choice used for usual django project.

1 of 37
Download to read offline
Development environment 
for Django project - my way 
! 
Robert Lujo, 2014
about me 
• software 
• professionally 17 y. 
• python since 2.0, django since 0.96 
• freelancer 
• more info -> linkedin
“Software Development 
Environment” is …? 
I found no unique / unified answer …
Software Development 
Environment (1) 
refers to a server tier designated to a specific stage in a 
release process. 
List of tiers: Local, Development, Integration, Test/QA, UAT, 
Stage/Pre-production, Production/Live 
Hm…! 
https://en.wikipedia.org/wiki/Development_environment_ 
%28software_development_process%29
Software Development 
Environment (2) 
a collection of procedures and tools for developing, testing 
and debugging an application or program. 
Getting closer …! 
http://www.techopedia.com/definition/16376/development-environment
Integrated development 
environment - IDE 
! 
software application that provides comprehensive facilities to 
computer programmers for software development. 
… source code editor, build automation tools and a debugger... 
Intelligent code completion features ... compiler, interpreter, ... 
version control system and various tools are integrated to simplify 
the construction of a GUI ... class browser, an object browser, 
and a class hierarchy diagram. 
Closer and closer …! 
https://en.wikipedia.org/wiki/Integrated_development_environment
Ad

Recommended

The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer ToolboxPablo Godel
 
Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014Mandi Walls
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chefLeanDog
 
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...
PHP Conference Argentina 2013 - Independizate de tu departamento IT - Habilid...Pablo Godel
 
Continuous Delivery Workshop with Ansible x GitLab CI (2nd+)
Continuous Delivery Workshop with Ansible x GitLab CI (2nd+)Continuous Delivery Workshop with Ansible x GitLab CI (2nd+)
Continuous Delivery Workshop with Ansible x GitLab CI (2nd+)Chu-Siang Lai
 
How to integrate front end tool via gruntjs
How to integrate front end tool via gruntjsHow to integrate front end tool via gruntjs
How to integrate front end tool via gruntjsBo-Yi Wu
 

More Related Content

What's hot

PHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding stylePHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding styleBo-Yi Wu
 
Package Management and Chef - ChefConf 2015
Package Management and Chef - ChefConf 2015Package Management and Chef - ChefConf 2015
Package Management and Chef - ChefConf 2015Chef
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and PracticeBo-Yi Wu
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at ScaleKris Buytaert
 
Giving back with GitHub - Putting the Open Source back in iOS
Giving back with GitHub - Putting the Open Source back in iOSGiving back with GitHub - Putting the Open Source back in iOS
Giving back with GitHub - Putting the Open Source back in iOSMadhava Jay
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovskyphp-user-group-minsk
 
Docker for Development
Docker for DevelopmentDocker for Development
Docker for Developmentallingeek
 
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinDeploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinAlessandro Nadalin
 
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim MeuselModulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim MeuselPuppet
 
The Scientific Filesystem
The Scientific FilesystemThe Scientific Filesystem
The Scientific FilesystemVanessa S
 
Wonderful world of (distributed) SCM or VCS
Wonderful world of (distributed) SCM or VCSWonderful world of (distributed) SCM or VCS
Wonderful world of (distributed) SCM or VCSVlatko Kosturjak
 
Building and deploying PHP applications with Phing
Building and deploying PHP applications with PhingBuilding and deploying PHP applications with Phing
Building and deploying PHP applications with PhingMichiel Rook
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidVlatko Kosturjak
 
Optimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerOptimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerGraham Charters
 
Ripping web accessible .git files
Ripping web accessible .git filesRipping web accessible .git files
Ripping web accessible .git filesVlatko Kosturjak
 
11 tools for your PHP devops stack
11 tools for your PHP devops stack11 tools for your PHP devops stack
11 tools for your PHP devops stackKris Buytaert
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayPuppet
 

What's hot (20)

PHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding stylePHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding style
 
Package Management and Chef - ChefConf 2015
Package Management and Chef - ChefConf 2015Package Management and Chef - ChefConf 2015
Package Management and Chef - ChefConf 2015
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Ansible project-deploy
Ansible project-deployAnsible project-deploy
Ansible project-deploy
 
The Environment Restaurant
The Environment RestaurantThe Environment Restaurant
The Environment Restaurant
 
Giving back with GitHub - Putting the Open Source back in iOS
Giving back with GitHub - Putting the Open Source back in iOSGiving back with GitHub - Putting the Open Source back in iOS
Giving back with GitHub - Putting the Open Source back in iOS
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
 
Docker for Development
Docker for DevelopmentDocker for Development
Docker for Development
 
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinDeploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
 
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim MeuselModulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
 
The Scientific Filesystem
The Scientific FilesystemThe Scientific Filesystem
The Scientific Filesystem
 
Wonderful world of (distributed) SCM or VCS
Wonderful world of (distributed) SCM or VCSWonderful world of (distributed) SCM or VCS
Wonderful world of (distributed) SCM or VCS
 
Building and deploying PHP applications with Phing
Building and deploying PHP applications with PhingBuilding and deploying PHP applications with Phing
Building and deploying PHP applications with Phing
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to Android
 
Optimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerOptimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for Docker
 
Ripping web accessible .git files
Ripping web accessible .git filesRipping web accessible .git files
Ripping web accessible .git files
 
11 tools for your PHP devops stack
11 tools for your PHP devops stack11 tools for your PHP devops stack
11 tools for your PHP devops stack
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 May
 

Similar to Django dev-env-my-way

Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Michael Lihs
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsGR8Conf
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?AFUP_Limoges
 
What makes me "Grunt"?
What makes me "Grunt"? What makes me "Grunt"?
What makes me "Grunt"? Fabien Doiron
 
Prescriptive System Security with InSpec
Prescriptive System Security with InSpecPrescriptive System Security with InSpec
Prescriptive System Security with InSpecAll Things Open
 
Prescriptive Security with InSpec - All Things Open 2019
Prescriptive Security with InSpec - All Things Open 2019Prescriptive Security with InSpec - All Things Open 2019
Prescriptive Security with InSpec - All Things Open 2019Mandi Walls
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with DjangoRoger Barnes
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis OverviewLeo Lorieri
 
Pipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodePipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodeKris Buytaert
 
Deliver Python Apps with Docker
Deliver Python Apps with DockerDeliver Python Apps with Docker
Deliver Python Apps with DockerAnton Egorov
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios
 
IzPack at LyonJUG'11
IzPack at LyonJUG'11IzPack at LyonJUG'11
IzPack at LyonJUG'11julien.ponge
 
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...NETWAYS
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017Mandi Walls
 
Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment TacticsIan Barber
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsPablo Godel
 

Similar to Django dev-env-my-way (20)

Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
 
What makes me "Grunt"?
What makes me "Grunt"? What makes me "Grunt"?
What makes me "Grunt"?
 
Django
DjangoDjango
Django
 
Prescriptive System Security with InSpec
Prescriptive System Security with InSpecPrescriptive System Security with InSpec
Prescriptive System Security with InSpec
 
Prescriptive Security with InSpec - All Things Open 2019
Prescriptive Security with InSpec - All Things Open 2019Prescriptive Security with InSpec - All Things Open 2019
Prescriptive Security with InSpec - All Things Open 2019
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with Django
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Pipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodePipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as Code
 
Deliver Python Apps with Docker
Deliver Python Apps with DockerDeliver Python Apps with Docker
Deliver Python Apps with Docker
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
 
IzPack at LyonJUG'11
IzPack at LyonJUG'11IzPack at LyonJUG'11
IzPack at LyonJUG'11
 
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017InSpec For DevOpsDays Amsterdam 2017
InSpec For DevOpsDays Amsterdam 2017
 
Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment Tactics
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 

More from Robert Lujo

Natural language processing (NLP) introduction
Natural language processing (NLP) introductionNatural language processing (NLP) introduction
Natural language processing (NLP) introductionRobert Lujo
 
ElasticSearch - index server used as a document database
ElasticSearch - index server used as a document databaseElasticSearch - index server used as a document database
ElasticSearch - index server used as a document databaseRobert Lujo
 
Object.__class__.__dict__ - python object model and friends - with examples
Object.__class__.__dict__ - python object model and friends - with examplesObject.__class__.__dict__ - python object model and friends - with examples
Object.__class__.__dict__ - python object model and friends - with examplesRobert Lujo
 
Funkcija, objekt, python
Funkcija, objekt, pythonFunkcija, objekt, python
Funkcija, objekt, pythonRobert Lujo
 
Python - na uzlazu ili silazu?
Python - na uzlazu ili silazu?Python - na uzlazu ili silazu?
Python - na uzlazu ili silazu?Robert Lujo
 
Razvoj softvera: crno/bijeli svijet?
Razvoj softvera: crno/bijeli svijet?Razvoj softvera: crno/bijeli svijet?
Razvoj softvera: crno/bijeli svijet?Robert Lujo
 

More from Robert Lujo (6)

Natural language processing (NLP) introduction
Natural language processing (NLP) introductionNatural language processing (NLP) introduction
Natural language processing (NLP) introduction
 
ElasticSearch - index server used as a document database
ElasticSearch - index server used as a document databaseElasticSearch - index server used as a document database
ElasticSearch - index server used as a document database
 
Object.__class__.__dict__ - python object model and friends - with examples
Object.__class__.__dict__ - python object model and friends - with examplesObject.__class__.__dict__ - python object model and friends - with examples
Object.__class__.__dict__ - python object model and friends - with examples
 
Funkcija, objekt, python
Funkcija, objekt, pythonFunkcija, objekt, python
Funkcija, objekt, python
 
Python - na uzlazu ili silazu?
Python - na uzlazu ili silazu?Python - na uzlazu ili silazu?
Python - na uzlazu ili silazu?
 
Razvoj softvera: crno/bijeli svijet?
Razvoj softvera: crno/bijeli svijet?Razvoj softvera: crno/bijeli svijet?
Razvoj softvera: crno/bijeli svijet?
 

Recently uploaded

Software Testing life cycle (STLC) Importance, Phases, Benefits...
Software Testing life cycle (STLC) Importance, Phases, Benefits...Software Testing life cycle (STLC) Importance, Phases, Benefits...
Software Testing life cycle (STLC) Importance, Phases, Benefits...Flexsin
 
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A..."Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...ISPMAIndia
 
Getting Started with Trello for Beginners.pptx
Getting Started with Trello for Beginners.pptxGetting Started with Trello for Beginners.pptx
Getting Started with Trello for Beginners.pptxmavinoikein
 
Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Asher Sterkin
 
AI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriAI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriISPMAIndia
 
Sql server types of joins with example.pptx
Sql server types of joins with example.pptxSql server types of joins with example.pptx
Sql server types of joins with example.pptxsameer gaikwad
 
maximum subarray ppt for killing camp students
maximum subarray ppt for killing camp studentsmaximum subarray ppt for killing camp students
maximum subarray ppt for killing camp studentsssuser82c38d
 
OpenChain AI Study Group - North America and Europe - 2024-02-20
OpenChain AI Study Group - North America and Europe - 2024-02-20OpenChain AI Study Group - North America and Europe - 2024-02-20
OpenChain AI Study Group - North America and Europe - 2024-02-20Shane Coughlan
 
P1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetP1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetMatthewTHawley
 
SPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementSPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementISPMAIndia
 
100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS
100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS
100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTSi-engage
 
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이ssuser82c38d
 
LLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flowLLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flowNaoki (Neo) SATO
 
sql ppt for students who preparing for sql
sql ppt for students who preparing for sqlsql ppt for students who preparing for sql
sql ppt for students who preparing for sqlbharatjanadharwarud
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkTimothy Spann
 
Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Jeffrey Haguewood
 
killing camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfkilling camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfssuser82c38d
 
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...ISPMAIndia
 
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)GDSCNiT
 

Recently uploaded (20)

Software Testing life cycle (STLC) Importance, Phases, Benefits...
Software Testing life cycle (STLC) Importance, Phases, Benefits...Software Testing life cycle (STLC) Importance, Phases, Benefits...
Software Testing life cycle (STLC) Importance, Phases, Benefits...
 
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A..."Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
 
Getting Started with Trello for Beginners.pptx
Getting Started with Trello for Beginners.pptxGetting Started with Trello for Beginners.pptx
Getting Started with Trello for Beginners.pptx
 
Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024
 
AI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriAI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit Bendigiri
 
Sql server types of joins with example.pptx
Sql server types of joins with example.pptxSql server types of joins with example.pptx
Sql server types of joins with example.pptx
 
maximum subarray ppt for killing camp students
maximum subarray ppt for killing camp studentsmaximum subarray ppt for killing camp students
maximum subarray ppt for killing camp students
 
OpenChain AI Study Group - North America and Europe - 2024-02-20
OpenChain AI Study Group - North America and Europe - 2024-02-20OpenChain AI Study Group - North America and Europe - 2024-02-20
OpenChain AI Study Group - North America and Europe - 2024-02-20
 
P1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 SmartsheetP1 Inspection Types in Municity 5 Smartsheet
P1 Inspection Types in Municity 5 Smartsheet
 
SPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product ManagementSPM 2024 – Overview of and benefits of AI in Product Management
SPM 2024 – Overview of and benefits of AI in Product Management
 
100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS
100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS
100 TOOLS TO MEASURE AND ANALYSE YOUR DIGITAL MARKETING EFFORTS
 
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
 
LLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flowLLMOps with Azure Machine Learning prompt flow
LLMOps with Azure Machine Learning prompt flow
 
sql ppt for students who preparing for sql
sql ppt for students who preparing for sqlsql ppt for students who preparing for sql
sql ppt for students who preparing for sql
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
 
Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)
 
killing camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfkilling camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdf
 
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
 
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
 
eLearning Content Development Company Code and Pixels.pdf
eLearning Content Development Company Code and Pixels.pdfeLearning Content Development Company Code and Pixels.pdf
eLearning Content Development Company Code and Pixels.pdf
 

Django dev-env-my-way

  • 1. Development environment for Django project - my way ! Robert Lujo, 2014
  • 2. about me • software • professionally 17 y. • python since 2.0, django since 0.96 • freelancer • more info -> linkedin
  • 3. “Software Development Environment” is …? I found no unique / unified answer …
  • 4. Software Development Environment (1) refers to a server tier designated to a specific stage in a release process. List of tiers: Local, Development, Integration, Test/QA, UAT, Stage/Pre-production, Production/Live Hm…! https://en.wikipedia.org/wiki/Development_environment_ %28software_development_process%29
  • 5. Software Development Environment (2) a collection of procedures and tools for developing, testing and debugging an application or program. Getting closer …! http://www.techopedia.com/definition/16376/development-environment
  • 6. Integrated development environment - IDE ! software application that provides comprehensive facilities to computer programmers for software development. … source code editor, build automation tools and a debugger... Intelligent code completion features ... compiler, interpreter, ... version control system and various tools are integrated to simplify the construction of a GUI ... class browser, an object browser, and a class hierarchy diagram. Closer and closer …! https://en.wikipedia.org/wiki/Integrated_development_environment
  • 7. Software Development Environment (3) contains everything required by a team to build and deploy software-intensive systems (where software is an essential and indispensable element) I approve!! http://www.ibm.com/developerworks/rational/library/define-scope-development- environment/index.html
  • 8. What is “everything”? Software development lifecycle (SDLC) • Planning • Designing • Implementation, testing and documenting • Deployment and maintenance https://en.wikipedia.org/wiki/Software_development !
  • 9. What about “a team”? Interacts with: • Software project management - organisation, coordination, covers: risk, change, software configuration and release management https://en.wikipedia.org/wiki/Software_project_management • Software development process a.k.a. software development methodology - e.g. waterfall, agile … https://en.wikipedia.org/wiki/Software_development_process
  • 10. My priorities 1. implement at least 90% of the most important requested features 2. shortest possible time needed for “from request to deploy” cycle 3. low-cost scaling - human/machines - initial setup of DevEnv or running system 4. ensure high quality deliverables
  • 11. ! now, the real stuff ! btw. where has Django disappeared?
  • 12. Initial setup - proj layout ~/env ├── proj-1 ├── cli-1 ├── … ├── biz ├── … └── proj-N
  • 13. Initial setup - proj layout ~/env/biz ├── archive ├── biz-web (GIT) │ ├── ... (to be continued) ├── biz-data(GIT) ├── biz-ie (GIT) ├── doc -> ln -s ~/Dropbox/…/biz/doc └── temp
  • 14. Initial setup - python proj layout ~/env/biz/biz-web (GIT) ├── bin ├── doc (sphinx,rst: readme,todo, │ install, ...) ├── pybiz (venv python installation) ├── reqs (base.txt, dev.txt) ├── src │ ├── (to be continued) │ ... └── var ├── biz.sqlite ├── biz-app.log ├── biz-jobs.log └── bulk-data
  • 15. Initial setup - django proj layout ~/env/biz/biz-web/src ├── bizproj (global project folder - formats, settings) ├── bizjobs │ ├── ... ├── bizapp │ ├── management / commands │ ├── migrations │ ├── scripts │ ├── templates │ │ ├── biz │ │ │ ├── components │ │ │ ├── backoffice │ │ │ ├── protected │ │ │ ├── public │ │ │ └── trial │ │ ├── admin │ │ ├── rosetta │ └── templatetags ├── locale (de/en) ├── media └── static (js, css, images, libs, fonts) # to bizapp?
  • 16. Initial setup - django settings ~/env/biz/biz-web/src/bizproj/settings ! base.py from .secret import * ! dev.py dev_demo.py ! test.py ! secret.py # not in git repo EMAIL_HOST_USER = "..." DATABASES = { ! secrete.py.template # is in git repo ! dbrouter.py testrunner.py
  • 17. Initial setup - .gitignore ! ~/env/biz/biz-web/.gitignore … pybiz var src/media/* secret.py fabfile_settings.py *.pyc *.swp *.pickle *.sqlite *.bak …
  • 18. File and directory naming • very careful in naming ! • naming convention - inherit existing + adaptations! • very careful in choosing folder/structure! • bigger files better than many files! • less files/folders is better than more!
  • 19. Project dependencies • as small as possible - more components -> more complex -> more integration/ upgrade/other issues • choose very carefully • proven, stable, I/team is familiar with • easily installable/upgradeable • adaptable (when possible) • when choosing new • read documentation/read reviews/choose several/experiment/make decision • bigger community -> better
  • 20. Project dependencies • solutions 1. make a script to setup everything from the scratch 2. install manually/reuse existing images and then freeze state in VM, Vagrant, Docker image 3. combine both
  • 21. Project dependencies • make a shell script • two types of dependencies • pip installable pip install -r reqs/dev.txt • pip non-installable • set of shell commands to install everything that is missing • Problem: different OS-es, e.g. OSX, Linux CentOS? if [ $(uname) == 'Linux' ] …
  • 22. Project deps - pip requirements ! ~/env/biz/biz-web/reqs ! base.txt : django>=1.5,<1.6 pillow reportlab johnny-cache markdown elasticsearch beautifulsoup4 lxml requests celery[redis] … ! dev.txt : -r base.txt south django_extensions django-debug-toolbar django-rosetta # for translation mock ipdb …
  • 23. Project deps - shell script ! non-PIP installables ! ~/env/biz/biz-web/bin/biz # chmod u+x ! case "$1" in env) if [ ! -d $BIZ_HOME/pybiz ]; then cd $BIZ_HOME sudo apt-get install python-devel sudo apt-get install python-pip sudo apt-get install python-xml sudo apt-get install elasticsearch ... pip install virtualenv virtualenv pybiz fi ! (to be continued …)
  • 24. Project deps - shell script ! PIP installables ! (continued …) ! if [ -f $BIZ_HOME/pybiz/bin/activate ]; then source $BIZ_HOME/pybiz/bin/activate echo "pip=`which pip`, python=`which python`” ! pip install -q --requirement=$BIZ_HOME/reqs/dev.txt ! cd $BIZ_HOME/src/bizapp export PYTHONPATH=$PYTHONPATH:$BIZ_HOME/src echo "== env 'BIZ' initialized, checking base packages" python -c"import django; print(' Django - ok v%s' % django.get_version())" python -c"import redis ;print(' redis - ok')" python -c"import celery ;print(' celery - ok')" python -c"import bizappp ;print(' biz app - ok’)" … fi ! (to be continued …)
  • 25. Project deps - shell script ! check services ! echo "== Is redis running?" ps ax | grep -v grep | grep redis !! echo "== Is elasticsearch running?" ps ax | grep -v grep | grep elasticsearch | awk "{print $1, $2, $3, $4, $5, "..."}" ! …
  • 26. Project management shell script • why? • to have one central place where to do project management • what? everything that needs automation • setup initial environment, update environment • open editor/IDE • run tests • deployment, remote management
  • 27. Project management shell script ! # biz ! Usage: ! *env - will initialize dev environment ! redis - start redis in background elas - start elasticsearch in background cel - start celery worker in background ! doc-update/du - will update doc/build/html wiki doc doc - will open doc/build/html/index.html - home of wiki ! log2 - will tail app log (if located in local var directory) ! run/n - django-admin runserver django/d - django-admin sp - django-admin shell_plus ! test-ping/tp - ping production test/t - django-admin test --settings=test_settings trans-make|tm - TRANSLATION - calls makemessages ! r/remote - will call fabric script for deployment and remote operations ! migrate|mig - do south migration - only dev system mig-auto - create new south auto-migration - only dev system ! browse|b - browse to localhost:8000 issues - browse to opened issues on bitbucket ! * - should be called with source/.
  • 28. Editor: ViM • although steep learning curve, is: • very adaptable • unique features philosophy • not in the way, very effective • personal preference: • I don’t feel comfortable in IDE • I like to be close to “bare metal” • to use editor designed for source code editing
  • 29. • personal preference: Editor: ViM • I don’t like plugins too much, only .vimrc • when working on the server to have the same possibilities • configuration • server scp ~/.vimrc user@server:/home/user/ • local development machine ln -s ~/Dropbox/env/.vimrc ~ • flavors • gVim / MacVim - GUI, ViM - on every server
  • 30. Development on the server • with project shell script one can do directly on the server • devenv setup/upgrade • webapp setup/upgrade • vim & shell-script -> do “live” development • run dev server
  • 31. File browser • personal preference: • I like side by side file browsers • usual file operations: create folders, check files, search for files, zip etc. • easy integration with editor (F4) • not found “one-to-rule-them-all” • TotalCommander, FreeCommander, DoubleCmd …
  • 32. Idea evaluation • evaluate a new idea or to test concept • ipython / django shell_plus • use reload: from biz import models models.test_something() # change models and save reload(models) models.test_something() • next step is - create a module/function
  • 33. • I use a lot Debugging • plain-old pdb or sometimes ipdb • conditional breakpoints: if i==500: import pdb; pdb.set_trace() • conditional breakpoints (2): try: bad_bad_code() except: import pdb; pdb.set_trace() • server side - logging, send emails on error logger.error(“this will be send by email) logger.error(“in try/except - will be send by email with traceback”)
  • 34. • Unit tests • integration tests Testing • “click-testing” - local development server • automating http requests to staging/production servers (from curl, nagios to dedicated services) • “click-testing” - staging/production servers
  • 35. Deployment • must be simple, automated, fast and reliable • usually: • setup environment • git push+pull / collectstatic / restart server • analyse logs • run integration tests on server instance • example: git ci -am”very important fix” biz r test upgrade prod upgrade
  • 36. Philosophy • “Unix philosophy by Mike Gancarz” filtered: Make each program do one thing well. Use software leverage to your advantage. Use shell scripts to increase leverage and portability. (btw. Store data in flat text files) https://en.wikipedia.org/wiki/Unix_philosophy
  • 37. Thanks for the patience! Questions? ! robert.lujo@gmail.com @trebor74hr