28
Floating on a cloud: dev env. on AWS Prashant Kandathil Co-Founder @ Tech Samurais [email protected]

Development environments in the AWS cloud - Vancouver PHP Meetup

  • Upload
    vanphp

  • View
    92

  • Download
    1

Embed Size (px)

DESCRIPTION

In this talk we will discuss the advantages of doing remote PHP development. We'll cover the challenges we faced working with large distributed teams with different OS's, hardware and knowledge. Presented by Prashant Kandathil.

Citation preview

Page 1: Development environments in the AWS cloud - Vancouver PHP Meetup

Floating on a cloud: dev env. on AWSPrashant KandathilCo-Founder @ Tech Samurais [email protected]

Page 2: Development environments in the AWS cloud - Vancouver PHP Meetup

Overview

Page 3: Development environments in the AWS cloud - Vancouver PHP Meetup

BackgroundTask @ Hand

SolutionConclusionQuestions

Page 4: Development environments in the AWS cloud - Vancouver PHP Meetup

Background

Page 5: Development environments in the AWS cloud - Vancouver PHP Meetup

Varied Skills

7 Front-end devs

4 Full stack devs

1 Dev-ops

Page 6: Development environments in the AWS cloud - Vancouver PHP Meetup

Hardware

Works on low powered machines

Page 7: Development environments in the AWS cloud - Vancouver PHP Meetup

Different Operating Systems

40% 50% 10%

Page 8: Development environments in the AWS cloud - Vancouver PHP Meetup

Task @ Hand

Page 9: Development environments in the AWS cloud - Vancouver PHP Meetup

Product vs ProjectMultiple project streams for one product

Framework

Usage Billing Registration

Self Serve telus.com

Page 10: Development environments in the AWS cloud - Vancouver PHP Meetup

Devs/project

~3 devs / project x 4 streams = 12 devs

Page 11: Development environments in the AWS cloud - Vancouver PHP Meetup

Config requirements

No local configuration

Page 12: Development environments in the AWS cloud - Vancouver PHP Meetup

Prototyping requirements

Easily prototype new technologies

Page 13: Development environments in the AWS cloud - Vancouver PHP Meetup

Speed requirements

Switch easily between dev and testing

Page 14: Development environments in the AWS cloud - Vancouver PHP Meetup

Flexible workstyle requirements

Work from home or the office

Page 15: Development environments in the AWS cloud - Vancouver PHP Meetup

Solution

Page 16: Development environments in the AWS cloud - Vancouver PHP Meetup

Major Tech

Page 17: Development environments in the AWS cloud - Vancouver PHP Meetup

Remote DevelopmentCode is synced to AWS on save

AWS

Page 18: Development environments in the AWS cloud - Vancouver PHP Meetup

Grunt and Bash scriptsRun action based on file type

.scss

.js

Grunt

language file bash script

.css

valid.js

loaded into cache

Page 19: Development environments in the AWS cloud - Vancouver PHP Meetup

Code structureSmart syncing of files

Framework> controllers>> framework>>> files.php

AWS

telus.com> controllers>> framework>>> files.php>> billing>>> files.php>> registration>>> files.php>> usage>>> files.php

Usage> controllers>> usage>>> files.php

Billing> controllers>> billing>>> files.php

Registration> controllers>> registration>>> files.php

Page 20: Development environments in the AWS cloud - Vancouver PHP Meetup

WFH or Office

App is public. Protected with auth

Page 21: Development environments in the AWS cloud - Vancouver PHP Meetup

Managed Environments

Dev-Ops or senior devs build & manage AWS

Page 22: Development environments in the AWS cloud - Vancouver PHP Meetup

Scaling Nginx Configserver {

listen 80;

server_name ~^(?<user>.+)\.servername.domainname\.com$;

. . . location ~ index.php {

if ( -d /home/$user/uss/docroot ) {

root /home/$user/uss/docroot;

}

fastcgi_index index.php;

include /etc/nginx/fastcgi_params;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param PHP_VALUE "error_log=\"/data/log/nginx/$user-error.log\"";

Page 23: Development environments in the AWS cloud - Vancouver PHP Meetup

Deployment FlowStart

Download git repo

Run init script

smart sync code visit url End

development

testing

select env

Page 24: Development environments in the AWS cloud - Vancouver PHP Meetup

Trial new tech

Ansible to install apps. Git feature branches with new tech

Page 25: Development environments in the AWS cloud - Vancouver PHP Meetup

Issues with Vagrant

Setting up Vagrant- Virtual Machine BIOS setting

- Bandwidth issues downloading large VMs - CPU intensive

Page 26: Development environments in the AWS cloud - Vancouver PHP Meetup

Conclusion

Page 27: Development environments in the AWS cloud - Vancouver PHP Meetup

AWS for dev and testingManaged environments

Init scripts and smart syncGrunt & Bash on sync

Page 28: Development environments in the AWS cloud - Vancouver PHP Meetup

Questions