large web applications development

23
Large Web-applications development

Upload: taras-omelianenko

Post on 14-Apr-2017

235 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Large web applications development

Large Web-applications development

Page 2: 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

Page 3: Large web applications development

APIBEST www.apibest.com 3

Agenda

- How we start? - Environment setup - Environments - Working with Git - Highload & scalability - Deploy automation - Testing - Continuous integration - Monitoring

Page 4: Large web applications development

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

Page 5: Large web applications development

APIBEST www.apibest.com 5

How we start?

Page 6: Large web applications development

APIBEST www.apibest.com 6

What is Minimum Viable Product?

Page 7: Large web applications development

APIBEST www.apibest.com 7

Our technology stack

Page 8: Large web applications development

APIBEST www.apibest.com 8

Single server

- Apache - Nginx (reverse proxy) - MySQL / PostgreSQL - Memcached - Redis - ElasticSearch - Symfony

Page 9: Large web applications development

APIBEST www.apibest.com 9

LIVE

DEV 1

DEV 2

QA 1

Environments (pre production)

Page 10: Large web applications development

APIBEST www.apibest.com 10

LIVEDEMO

DEV 1

DEV 2

QA 1

Environments (production)

Page 11: Large web applications development

APIBEST www.apibest.com 11

LIVEDEMO

DEV 1

DEV 2

QA 1

Environments (production). Sync devevelopment & demo versions

Page 12: Large web applications development

APIBEST www.apibest.com 12

DATABASE

WEB-SERVER

Scaling Web application

DATABASE

WEB-SERVER

Single server Multiple server

Page 13: Large web applications development

APIBEST www.apibest.com 13

Git branching model

- master always stable - tag for each deploy - branch name started

with issue #

Proper for us

Page 14: Large web applications development

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

Page 15: Large web applications development

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/ # ""

Page 16: Large web applications development

APIBEST www.apibest.com 16

Deploy automation

Page 17: Large web applications development

APIBEST www.apibest.com 17

Continuous integration

Page 18: Large web applications development

APIBEST www.apibest.com 18

Codeception

Page 19: Large web applications development

APIBEST www.apibest.com 19

Performance test

Page 20: Large web applications development

APIBEST www.apibest.com 20

Monitoring

Page 21: Large web applications development

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

Page 22: Large web applications development

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

Page 23: Large web applications development

Сп а с и б о з а в н и м а н и е+380 94 710 26 35

www.apibest.com [email protected]

Skype: taras.omelyanenko