Week12 Slides
Week12 Slides
Deploying an App ●
●
Components of an App
Service approaches
● Automation and Containers
Developing an App
● Idea
Developing an App
● Idea
● Local development
○ File system
○ Editors, Desktop, Documents, File
management
Developing an App
● Idea
● Local development
○ File system
○ Editors, Desktop, Documents, File
management
● Single computer
Developing an App
● Idea
● Local development
○ File system
○ Editors, Desktop, Documents, File
management
● Single computer
● Multiple services
○ Web server
○ Database server
Permanent Deployment
Permanent Deployment
● Dedicated servers
Permanent Deployment
● Dedicated servers
● Always-on internet connection
Permanent Deployment
● Dedicated servers
● Always-on internet connection
● Uninterrupted power
Permanent Deployment
● Dedicated servers
● Always-on internet connection
● Uninterrupted power
Infrastructure!
● Data Centers
Cloud
Scaling
Scaling
User
Scaling
User
Scaling
User
Scaling
User
Scaling
User
Scaling
User
Scaling
User
Summary
● Base development of an app is easy
● Deployment is hard!
● Infrastructure
○ Always on servers - auto restart
○ Always on network
○ Uninterrupted power
○ Monitoring and logging
Services Approach ●
●
SaaS
IaaS
● PaaS
Service approach
● Specialization
● Datacenter operators specialize in infrastructure
● Developers focus on app development
● Standard software deployments?
Software-as-a-Service (SaaS)
● Online office platforms
○ Google docs, spreadsheets, Office 365
● Content Management Systems
○ Drupal, Wordpress
● Issue tracking
○ Trello, Redmine
● AWS
● Google Compute Engine
● Azure
● DigitalOcean, Linode, ...
Platforms
● Combination of hardware and software
● Specific hardware requirements
○ Computing power, RAM, disk
● Specific software requirements
○ OS version, automated updates and security, firewalls
● Custom application code
○ Flask, RoR, Laravel, ...
Platform-as-a-Service
● Provider takes care of:
○ Power, network, machine management
○ OS installation, security patches
○ Base application platform: Python+Flask, PHP+Laravel: maintain multiple versions, manage
security updates
○ Multiple databases and connectivity options
● Developer needs to:
○ Manage application code
○ Specify requirements on server sizing, database, connectivity
● Scaling
○ Combined inputs from developer and provider
Examples
● Replit: https://replit.com/@nchandra/flasktest#main.py
● Glitch:
https://glitch.com/edit/#!/gusty-sage-constellation?path=server.py%3A1%3A0
● GAE: https://flasktest-328815.uc.r.appspot.com/
● https://shell.cloud.google.com/?page=editor&show=ide%2Cterminal
●
Summary
● PaaS: provide platforms to build on
○ developers focus on code
● Varying degrees of complexity, ease of use
○ Replit, Glitch - GAE, AWS ElasticBeanStalk, Heroku
● Integrate with other code development practices:
○ version control
○ continuous integration (testing)
○ continuous deployment
○ scaling and automation
Deployment
Version control
● How to manage changes to code?
● Retain backups of old code
● Develop new features
● Fix bugs
Version control
● Centralized
○ central server, many clients
○ push changes to server each time
○ multiple editors? Lock files? Merge?
● Distributed
○ can have central server but not needed
○ changes managed using “patches” - email, merge requests, …
● github, gitlab etc.
○ centralized on top of distributed
○ friendly interfaces
○ worth learning command line
Continuous integration