Date post: | 14-Apr-2017 |
Category: |
Software |
Upload: | taras-omelianenko |
View: | 235 times |
Download: | 0 times |
Large Web-applications development
APIBEST www.apibest.com 2
Taras Omelianenko
Speaker
- APIBEST, CEO, Co-founder - ThinkPHP community, Co-organizer - Architect - Full Stack developer - DevOps
APIBEST www.apibest.com 3
Agenda
- How we start? - Environment setup - Environments - Working with Git - Highload & scalability - Deploy automation - Testing - Continuous integration - Monitoring
APIBEST www.apibest.com 4
Minimum Viable Product
Viable
Minimum• Minimum - Crappy products.
Nobody wants to use • Viable - products built by companies
better financed than you • Minimum + Viable: good products
for startups to build
Minimum + Viable
APIBEST www.apibest.com 8
Single server
- Apache - Nginx (reverse proxy) - MySQL / PostgreSQL - Memcached - Redis - ElasticSearch - Symfony
APIBEST www.apibest.com 9
LIVE
DEV 1
DEV 2
QA 1
Environments (pre production)
APIBEST www.apibest.com 10
LIVEDEMO
DEV 1
DEV 2
QA 1
Environments (production)
APIBEST www.apibest.com 11
LIVEDEMO
DEV 1
DEV 2
QA 1
Environments (production). Sync devevelopment & demo versions
APIBEST www.apibest.com 12
DATABASE
WEB-SERVER
Scaling Web application
DATABASE
WEB-SERVER
Single server Multiple server
APIBEST www.apibest.com 13
Git branching model
- master always stable - tag for each deploy - branch name started
with issue #
Proper for us
APIBEST www.apibest.com 14
Scaling (multiple servers with load balancing)
DATABASE(master)
LOAD BALANCER
WEB-SERVER
WEB-SERVER
WEB-SERVER
DATABASE (slave)
example.com
APIBEST www.apibest.com 15
Deploy automation
site.yml # master playbook webservers.yml # playbook for webserver tier dbservers.yml # playbook for dbserver tier roles/ common/ # this hierarchy represents a "role" tasks/ # main.yml # <-- tasks file can include smaller files if warranted handlers/ # main.yml # <-- handlers file templates/ # <-- files for use with the template resource ntp.conf.j2 # <------- templates end in .j2 files/ # bar.txt # <-- files for use with the copy resource foo.sh # <-- script files for use with the script resource vars/ # main.yml # <-- variables associated with this role webtier/ # same kind of structure as "common" was above, done for the webtier role monitoring/ # "" fooapp/ # ""
APIBEST www.apibest.com
Hardware
21
Monitoring - attention points
Hypervisor (ESXi, KVM, XEN, ...)
• Performance • Agentless Monitoring • Network Devices • VMware Monitoring • Monitor Databases • Built-in Java Application
Server Monitoring • Web Services • Hardware Monitoring • Custom monitoring
L i n k s• http://nvie.com/posts/a-successful-git-branching-model/ • http://jenkins-php.org/ • http://www.slideshare.net/SimoneSoldateschi/ansible-crash-course-35783512 • http://codeception.com/11-20-2013/webdriver-tests-with-codeception.html • https://github.com/Codeception/SeleniumEnv • http://ruhighload.com/scale • http://www.zabbix.com/ru/monitor_everything.php • https://www.zabbix.org/wiki/Zabbix_Templates
Сп а с и б о з а в н и м а н и е+380 94 710 26 35
www.apibest.com [email protected]
Skype: taras.omelyanenko