Slide 1

Slide 1 text

www.20tab.com/startup-growth [email protected] Corpo livello uno Corpo livello due Corpo livello tre Corpo livello quattro Corpo livello cinque Titolo Testo www.20tab.com 20tab.com @raffaelecox | @20tab rafleze | 20tab /raffaele-colace [email protected] How to start a Django project in less than a minute! @raffaelecox | @twentytab

Slide 2

Slide 2 text

www.20tab.com Co-founder @ 20tab srl Python Senior developer (PHP, Java, Swift, C#, …) Project Manager Colace Raffaele

Slide 3

Slide 3 text

www.20tab.com • a DBA • a DevOps • a front-end developer Nobody understands me! What do you mean? https://psico.it I’m not:

Slide 4

Slide 4 text

www.20tab.com ?

Slide 5

Slide 5 text

www.20tab.com How to start a new project?

Slide 6

Slide 6 text

www.20tab.com Goals • Fast project setup

Slide 7

Slide 7 text

www.20tab.com © pixabay.com Goals • Fast project setup • Simple and standard structure

Slide 8

Slide 8 text

www.20tab.com ? Goals • Fast project setup • Simple and standard structure • Multi-platform

Slide 9

Slide 9 text

www.20tab.com Goals • Fast project setup • Simple and standard structure • Multi-platform • Best practices

Slide 10

Slide 10 text

www.20tab.com Goals • Fast project setup • Simple and standard structure • Multi-platform • Best practices • Simple deploy

Slide 11

Slide 11 text

www.20tab.com Goals • Fast project setup • Simple and standard structure • Multi-platform • Best practices • Simple deploy • Respecting our methodologies

Slide 12

Slide 12 text

Me (15 years ago) New project © Mery Nunez/Barcroft Media

Slide 13

Slide 13 text

www.20tab.com Problem Start project with: • different approaches • different configurations • different structures

Slide 14

Slide 14 text

www.20tab.com Problem Start project with: • different approaches • different configurations • different structures and without a method for: • automatic deploy • quality assurance

Slide 15

Slide 15 text

www.20tab.com At the beginning

Slide 16

Slide 16 text

www.20tab.com

Slide 17

Slide 17 text

www.20tab.com Now

Slide 18

Slide 18 text

www.20tab.com

Slide 19

Slide 19 text

www.20tab.com The first approach

Slide 20

Slide 20 text

www.20tab.com

Slide 21

Slide 21 text

www.20tab.com

Slide 22

Slide 22 text

www.20tab.com

Slide 23

Slide 23 text

www.20tab.com

Slide 24

Slide 24 text

www.20tab.com The second approach

Slide 25

Slide 25 text

www.20tab.com The second approach •django-admin startproject --template •default requirements.txt •quick setup on local environment •quick start on local uwsgi server

Slide 26

Slide 26 text

www.20tab.com The second approach • standard process • local server configuration • remote servers configuration • CI configuration • deploy process

Slide 27

Slide 27 text

www.20tab.com

Slide 28

Slide 28 text

www.20tab.com Needs???

Slide 29

Slide 29 text

www.20tab.com Required environments • Development • User Acceptance Testing • Staging • Production (same as Staging) • develop • develop • master • master

Slide 30

Slide 30 text

www.20tab.com Required environments Source Test Build Development User Acceptance Testing Approval Staging Approval Production Approval

Slide 31

Slide 31 text

www.20tab.com Required environments Source Test Build Development User Acceptance Testing Approval Staging Approval Production Approval

Slide 32

Slide 32 text

www.20tab.com Needs • Quick installation on local environment • Quick and standard configuration • Simple requirements management • Some automatism for front-end development • Simple testing process • CI configuration • Deploy process

Slide 33

Slide 33 text

www.20tab.com Solution django-uwsgi-template

Slide 34

Slide 34 text

www.20tab.com Prerequisites https://uwsgi-docs.readthedocs.io/en/latest/ django-emperor-mode on GitHub

Slide 35

Slide 35 text

www.20tab.com Prerequisites Virtualenv 2.7 3.6 3.7 django==1.8 django==1.11 django==2.1

Slide 36

Slide 36 text

www.20tab.com Prerequisites pip install -U django

Slide 37

Slide 37 text

www.20tab.com Prerequisites pip install -U invoke

Slide 38

Slide 38 text

www.20tab.com Installation django-admin.py startproject --template https:// github.com/20tab/django-uwsgi-template/zipball/ master -e cfg,ini,md,py,yaml,template -n Makefile {{project_name}} Just copy and paste it!

Slide 39

Slide 39 text

www.20tab.com Configuration (venv) $ inv init

Slide 40

Slide 40 text

www.20tab.com

Slide 41

Slide 41 text

www.20tab.com

Slide 42

Slide 42 text

www.20tab.com

Slide 43

Slide 43 text

Recommendations • Choose the right tools

Slide 44

Slide 44 text

Recommendations • Choose the right tools • DRY

Slide 45

Slide 45 text

• Choose the right tools • DRY • Automate processes Recommendations

Slide 46

Slide 46 text

www.20tab.com

Slide 47

Slide 47 text

www.20tab.com Hiring Python developer [email protected]

Slide 48

Slide 48 text

www.20tab.com/startup-growth [email protected] Corpo livello uno Corpo livello due Corpo livello tre Corpo livello quattro Corpo livello cinque Titolo Testo www.20tab.com 20tab.com @raffaelecox | @20tab rafleze | 20tab /raffaele-colace [email protected] Thank you! @raffaelecox | @twentytab