Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
A Byte of
Software Deployment
@dylanninin
What is Software Deployment ?
Software Development Life Cycle
All the Activities
that Make a Software System
Available for Use
Definition
It refers to:
Deployment Activities
• Requirements — The Missing Piece of Software Development
• Planning — An Objective of Each and Eve...
How to Deploy Software
A Minimum Python Web Application
An Overview of Realword Web Application
It’s so complicated … …
MVP In Deployment
Just Before You Start
• Test your code
- We Do Not Ship Bugs At All
- Confirm That It Is Deployable
Let’s start
• Get a Server
• Apply a Public IP
- Try AWS or Linode/DigitalOcean …
- Login via SSH/VNC …
- Apply an IP
- At...
Preparing
• Install Required Packages
- Install Project Based Libraries
- Install Redis/Mongodb/ElasticSearch/…
- Edit YAM...
Run Stand-alone
• Run the App
- export PYTHON_ENV=production
- python run.py —port=8888
- http :8888/the/actual/url
Web Server
• DNS
- Choose a Domain Name
- Add an A Record in DNS Console
• Nginx
- Listen on 80/443
- Proxy Pass Requests ...
It is simple!
The Well-Known Three
Supervisor: Progress Manager
• Convenience
• Accuracy
• Centralised
Nginx - Web Server
• Simplicity
• High Concurrency
• Extensibility
Sentry - Logging
• Log as Event Stream
Trouble Shooting
A Minimum Python Web Application
There may be problems anywhere
With Outlined Tech Stack
How to Trouble Shooting
The So-Called “Interface”
A Minimum Python Web Application
What does “interface” mean?
a Protocol Describes
How the Web Server Talks with an Application
Definition
It refers to:
CGI
mod_python
FastCGI/SCGI
WSGI
Integrated Web Server
Proxy Pass
Proxy Pass
There Are Some Other Topics
Standardisation
Explicitly declare and isolate dependencies
• Virtual Environment for Isolation
• requirements.txt for Dep...
Standardisation
Store config in the environment
• YAML/TOML/JSON
• Dev/Test/Staging/Production
Standardisation
Treat backing services as attached resources
• Configurable
• Detached/Attached
Automation
Monitoring
Aware of Your Application
• Console
• Utilities
• Services
Availability
Max Availability
• Max Mean Time between Failures
• Min Mean Time to Recover
• >= 99.9%
Q & A
Reference
• Comparison of web server software
• http://www.fullstackpython.com/deployment.html
• http://www.fullstackpytho...
A Byte of Software Deployment
Upcoming SlideShare
Loading in …5
×

A Byte of Software Deployment

185 views

Published on

- What's Software Deployment
- A Minimal Python Web Application
- Trouble Shoot
- Interface between Web Server and Application
- Standardization/Automation/Monitoring/Availability

  • Be the first to comment

  • Be the first to like this

A Byte of Software Deployment

  1. 1. A Byte of Software Deployment @dylanninin
  2. 2. What is Software Deployment ?
  3. 3. Software Development Life Cycle
  4. 4. All the Activities that Make a Software System Available for Use Definition It refers to:
  5. 5. Deployment Activities • Requirements — The Missing Piece of Software Development • Planning — An Objective of Each and Every Activity • Testing — Do Not Ship Bugs At All • Designing — Overall Pictures of Both High/Low-Level • Deployment — What Does this Deployment Mean
  6. 6. How to Deploy Software
  7. 7. A Minimum Python Web Application
  8. 8. An Overview of Realword Web Application
  9. 9. It’s so complicated … …
  10. 10. MVP In Deployment
  11. 11. Just Before You Start • Test your code - We Do Not Ship Bugs At All - Confirm That It Is Deployable
  12. 12. Let’s start • Get a Server • Apply a Public IP - Try AWS or Linode/DigitalOcean … - Login via SSH/VNC … - Apply an IP - Attatch the IP to Your Server - Initialize Security Rules …
  13. 13. Preparing • Install Required Packages - Install Project Based Libraries - Install Redis/Mongodb/ElasticSearch/… - Edit YAML/TOML/JSON Configuration - Maintain Environment Aware of Production/Staging/Test • Setup Dependencies • Build Code/Config into Release - Make them Daemon
  14. 14. Run Stand-alone • Run the App - export PYTHON_ENV=production - python run.py —port=8888 - http :8888/the/actual/url
  15. 15. Web Server • DNS - Choose a Domain Name - Add an A Record in DNS Console • Nginx - Listen on 80/443 - Proxy Pass Requests to Your App - http https://your_domain_name/the/actual/url - Get the Public IP of Your Server
  16. 16. It is simple!
  17. 17. The Well-Known Three
  18. 18. Supervisor: Progress Manager • Convenience • Accuracy • Centralised
  19. 19. Nginx - Web Server • Simplicity • High Concurrency • Extensibility
  20. 20. Sentry - Logging • Log as Event Stream
  21. 21. Trouble Shooting
  22. 22. A Minimum Python Web Application
  23. 23. There may be problems anywhere
  24. 24. With Outlined Tech Stack
  25. 25. How to Trouble Shooting
  26. 26. The So-Called “Interface”
  27. 27. A Minimum Python Web Application
  28. 28. What does “interface” mean?
  29. 29. a Protocol Describes How the Web Server Talks with an Application Definition It refers to:
  30. 30. CGI
  31. 31. mod_python
  32. 32. FastCGI/SCGI
  33. 33. WSGI
  34. 34. Integrated Web Server
  35. 35. Proxy Pass
  36. 36. Proxy Pass
  37. 37. There Are Some Other Topics
  38. 38. Standardisation Explicitly declare and isolate dependencies • Virtual Environment for Isolation • requirements.txt for Dependencies
  39. 39. Standardisation Store config in the environment • YAML/TOML/JSON • Dev/Test/Staging/Production
  40. 40. Standardisation Treat backing services as attached resources • Configurable • Detached/Attached
  41. 41. Automation
  42. 42. Monitoring Aware of Your Application • Console • Utilities • Services
  43. 43. Availability Max Availability • Max Mean Time between Failures • Min Mean Time to Recover • >= 99.9%
  44. 44. Q & A
  45. 45. Reference • Comparison of web server software • http://www.fullstackpython.com/deployment.html • http://www.fullstackpython.com/wsgi-servers.html • https://docs.python.org/3.5/howto/webservers.html • https://github.com/fouber/blog/issues/6 • https://ruby-china.org/topics/12686 • http://supervisord.org/ • http://nginx.org/ • https://jenkins.io/ • https://newrelic.com/ • http://12factor.net/ • https://github.com/alex/what-happens-when

×