meet magento belarus 2015: jurģis lukss
Post on 16-Apr-2017
867 Views
Preview:
TRANSCRIPT
www.luxtechnology.eu
Building scalable Magento on Microsoft Azure
with Chef
Jurgis Lukss
About me
• CTO of Lux Technogy, Magento development company, Latvia
• In IT business for 15 years• Have done more than 150+ projects• 3 years Magento experience
• Email: jurgis.lukss@luxtechnology.lv
What is Scalable Magento stack?
• Web servers• Database servers• Cache servers• Media servers• Load balancers
What is Azure?
• cloud computing platform and infrastructure, created by Microsoft released in 2010
• 17+ Datacenters located in North America (6), South America (1), Asia(2+2), Europe (2), Japan (2), Australia(2)
• CDN nodes are located in 24 countries• Linux & Windows hosts• 99.95% availability SLA
What is Azure?
What is Azure?
Two admin portals
Magento stack on Azure
• 99.95% availability only if 2+ machines in a cloud service (availability set)
• 2 cloud services (Web & DB)• 2+ virtual machines for web• 2+ virtual machines for MySQL(master-slave
configuration)• Redis cache service (or servers)• Storage account for files (CIFS)• 1 virtual network
Magento stack diagram
Virtual network
web....cloudapp.net
db....cloudapp.net
Master Slave
File storage
Redis cache
Backend Frontend Frontend Frontend
3306
80
MySQL on Azure
• Available as a service or VM
• Service is provided by ClearDB
• Service is multi-tenant shared environment
• Service is geo-distributed + daily backups
Redis cache on Azure
• Available as a service• Needs 2+ VM if installed
on Linux
Cloud services
• Used to manage VM instances, load balancing and scaling
• Groups multiple VM instances under domain name [name].cloudapp.net
• Created automatically with a new VM instance
Cloud services
To group multiple VM instances under single cloud service choose existing service
Virtual networks
• Isolates virtual machines from internet
• Used for internal communications
Load balancing
• DNS level or network level• Network level is limited to
region• DNS level is cross-region• Traffic Manager for DNS
level balancing• Cloud service endpoints
for network level• Internal or internet facing
load balancing is available• UI is available only for
internet facing
Load balancing
Auto scaling
• Start and stop instances in cloud service automatically
• Scale by CPU usage
Process1. Create virtual network2. Create 2 Cloud services (Web, DB)3. Create VMs for DB & provision4. Create load balancer on DB port5. Create Redis cache service (new portal)6. Create File storage (CIFS*)7. Create VMs for Web8. Mount File storage as /media folder (cifs-utils)9. Provision Web servers10.Create availability sets
What is Chef?
• Configuration management tool
• Infrastructure-as-a-code• Chef server stores
recipes and configuration
• Chef client connects to store and updates infrastructure
• Idempotent resources
Chef and Magento
• Multipe cookbooks already availabe on supermarket - https://supermarket.chef.io/
• magerun 2.2.4 Updated April 9, 2015• magentostack 2.2.1 Updated September 17, 2015• magento 0.8.6 Updated August 8, 2014• magento-toolbox 0.0.3 Updated July 6, 2014
• magentostack cookbook already contains a lot of useful recipes
• varnish, apache2, mysql-multi, git, svn, build-essential, stack_commons, platformstack, rackspacecloud, rackspace_iptables, modman, apt, ark, certificate, chef-sugar, cron, database, git, logrotate, nfs, openssl, parted, partial_search, php-fpm, redisio, yum, yum-ius, yum-epel, xml, xmledit
Tips
• Recreate VMs from VHD images• Use production subscription from start• Install Chef server on Ubuntu VM• Create and use idempotent resources in Chef• Test recipes on Vagrant VM
The END
Questions?
top related