in it2
PHP	
  Azure
A	
  brand	
  new	
  day
PFCongresHét Web Development Congres
in it2
email:	
  michelangelo@in2it.be
twi;er:	
  @dragonbe
facebook:	
  dragonbe
ContactTrainer
Community	
  
LeaderPHP	
...
in it2
#phpazure
in it2
Why	
  Windows	
  Azure?
‣ PHP	
  Developer
‣ Write	
  web	
  applicaFons
‣ Want	
  to	
  deploy	
  fast	
  and	
  ...
in it2
Azure	
  for	
  PHP	
  devs
‣ Supports	
  most	
  common	
  PHP	
  frameworks
‣ Symfony,	
  Zend	
  Framework,	
  S...
in it2
Move	
  to	
  the	
  cloud
in it2
Or	
  more	
  complex
Centric Architecture
Web Application
Database
Queue
Storage
Cache
Proxy
Log
Mail
in it2
Windows	
  Azure	
  Stack
Custom
Ready to go
Technology
Services
Data
Storage Blob Tables Queues CDN Cache
in it2
Azure	
  SDK	
  for	
  PHP
‣ Contents
‣ PHP	
  client	
  libraries	
  for	
  Windows	
  Azure
‣ Command	
  line	
  ...
in it2
SDK	
  for	
  PHP
‣ WindowsAzure
‣ Blob
‣ Common
‣ Queue
‣ ServiceBus
‣ ServiceManagement
‣ ServiceRunFme
‣ Table
in it2
Composer
$	
  svn	
  export	
  h:ps://github.com/WindowsAzure/azure-­‐sdk-­‐for-­‐
php/trunk/WindowsAzure	
  librar...
in it2
PEAR	
  dependencies
‣ HTTP_Request2
‣ Mail_mime
‣ Mail_mimeDecode
in it2
Websites
Storage
Cloud	
  ServicesVirtual	
  Machines
Windows	
  Azure
CDN
SSL
SLA
Mobile
Media Big	
  Data
QAVPN
I...
in it2
Azure	
  Websites
in it2
The	
  quickest	
  way	
  to	
  deploy	
  
to	
  the	
  cloud
in it2
Requirements
‣ A	
  PHP	
  project
‣ A	
  version	
  control	
  system
‣ local	
  (GIT,	
  Subversion,	
  TFS,	
  W...
in it2
One	
  important	
  thing!
‣ DocumentRoot	
  in	
  project	
  subdir
‣ e.g.	
  public/index.php
‣ Requirement	
  fo...
in it2
in it2
Virtual	
  Machines
in it2
AlternaFve	
  way	
  to	
  achieve	
  
cloud	
  power
in it2
Usages
‣ Run	
  arbitrary	
  processes
‣ e.g.	
  cron	
  processes
‣ Provide	
  uFlity	
  services
‣ e.g.	
  forwar...
in it2
in it2
Cloud	
  Services
in it2
I	
  was	
  clueless
? ?
?:-(
in it2
Background
‣ Coming	
  from	
  a	
  UNIX/Linux	
  environment
‣ Worked	
  as	
  system	
  administrator
‣ Wrote	
  ...
in it2
Figuring	
  it	
  out
‣ Web	
  Role
‣ A	
  web	
  site	
  or	
  service	
  running	
  on	
  the	
  internet
‣ Can	
...
in it2
Why	
  Cloud	
  Services?
‣ All	
  the	
  power	
  of	
  Web	
  Sites
‣ With	
  smart	
  scaling	
  capabiliFes
‣ M...
in it2
Command	
  line	
  tools
h;p://www.windowsazure.com/en-­‐us/manage/linux/how-­‐to-­‐guides/command-­‐line-­‐tools/
...
in it2
Endless	
  posibiliFes
WebApp WebApp WorkerApp
WinCache
Blob	
  Storage Table	
  Storage Queues
Azure	
  SQL 3rd-­‐...
in it2
DTAP	
  environment
Web	
  Fabric Staging ProducHon
WorkstaHon Windows
Azure
Windows
Azure
in it2
Web	
  Role	
  for	
  PHP	
  Local
‣ Start	
  Azure	
  Emulator
‣ PS	
  C:devmyProject>	
  Start-­‐AzureEmulator
Cr...
in it2
in it2
in it2
in it2
in it2
in it2
in it2
Storage
in it2
Blob	
  storage
‣ Storage	
  for	
  binary	
  large	
  objects	
  (BLOB)
‣ Block	
  blobs	
  (200GB)
‣ Page	
  blob...
in it2
Blob	
  Storage	
  overview
My	
  Company
images
movies
image1.jpg
image2.jpg
movie1.mov
in it2
Usage	
  of	
  blobs
https://mycompany.blob.core.windows.net/image/image1.jpg
https://cdn01.mycompany.com/image/ima...
in it2
Table	
  storage
‣ Storage	
  of	
  structured	
  data
‣ Oken	
  referred	
  to	
  as	
  NoSQL
‣ Implements	
  tree...
in it2
Table	
  Storage	
  overview
Company
customer
product
name	
  =	
  …
email	
  =	
  …
name	
  =	
  …
email	
  =	
  …...
in it2
Accessing	
  Table	
  Store	
  data
‣ Using	
  REST	
  directly
‣ GET	
  h;p://mycompany.table.core.windows.net/
cu...
in it2
Queue	
  Storage
‣ FIFO	
  type	
  storage
‣ Processing	
  one	
  item	
  a	
  Fme
‣ Messages	
  in	
  any	
  forma...
in it2
Queue	
  Storage	
  overview
Email	
  2
Email	
  1
Email	
  3
Worker
Role
Email	
  1Queue Email	
  2
in it2
Accessing	
  Queue	
  Messages
‣ Directly	
  with	
  REST
‣ GET	
  h;ps://
mycompany.queue.core.windows.net/
mailTo...
in it2
Conclusion
in it2
Conclusion
‣ PHP	
  for	
  web	
  applicaFon	
  development
‣ WAWS	
  for	
  rapid	
  prototyping
‣ WACS	
  for	
  ...
in it2
PHP	
  checklist
‣ Get	
  your	
  prototypes	
  online	
  quickly
‣ Ensure	
  your	
  apps	
  stay	
  online	
  all...
in it2
No	
  system	
  knowledge	
  necessary!
Limited
✓
in it2
Michelangelo	
  van	
  Dam
Zend	
  CerFfied	
  Engineer
michelangelo@in2it.be
in it2
PHP	
  ConsulFng	
  -­‐	
  QA	
...
in it2
CreaFve	
  Commons	
  Credits
‣ sunny	
  clouds:	
  h;p://www.flickr.com/
photos/andyfitz/2340298916
‣ balloon:	
  h;...
in it2
8957
If	
  you	
  liked	
  it,	
  thanks!
If	
  not,	
  tell	
  me	
  how	
  to	
  improve
in it2Thank	
  you
Upcoming SlideShare
Loading in...5
×

Php Azure, A bright new day! - PFCongres 2013

62,873

Published on

Windows Azure is one of the best cloud solutions out there and offers many services and tools for professionals to scale and extend their public and private applications. But as a professional web developer you need sometimes a quick solution to run your newest idea on. Most cloud solution providers ask you to download their stuff, upload your stuff and fight with numerous configurations while most of the things you do with Windows Azure you can do with a simple git repository, hosted on Github or BitBucket. This talk shows how fast you can develop a new idea with PHP and have it up-and-running in no time for your customers to see your latest idea and brainstorm about additional features. Generation Now, yes I am.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
62,873
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Php Azure, A bright new day! - PFCongres 2013

  1. 1. in it2 PHP  Azure A  brand  new  day PFCongresHét Web Development Congres
  2. 2. in it2 email:  michelangelo@in2it.be twi;er:  @dragonbe facebook:  dragonbe ContactTrainer Community   LeaderPHP  Consultant Michelangelo  van  Dam
  3. 3. in it2 #phpazure
  4. 4. in it2 Why  Windows  Azure? ‣ PHP  Developer ‣ Write  web  applicaFons ‣ Want  to  deploy  fast  and  safe ‣ Prototyping ‣ Not  a  sysadmin ‣ Don’t  have  Fme  to  worry  about  plaIorms ‣ Don’t  want  to  worry  about  scalability
  5. 5. in it2 Azure  for  PHP  devs ‣ Supports  most  common  PHP  frameworks ‣ Symfony,  Zend  Framework,  Silex,  Slim,  … ‣ Building  robust  web  applicaFons ‣ storage  and  CDN ‣ easy  separaFon  of  responsibiliFes
  6. 6. in it2 Move  to  the  cloud
  7. 7. in it2 Or  more  complex Centric Architecture Web Application Database Queue Storage Cache Proxy Log Mail
  8. 8. in it2 Windows  Azure  Stack Custom Ready to go Technology Services Data Storage Blob Tables Queues CDN Cache
  9. 9. in it2 Azure  SDK  for  PHP ‣ Contents ‣ PHP  client  libraries  for  Windows  Azure ‣ Command  line  tools  for  Mac  &  Linux ‣ Windows  Azure  powershell  for  Windows ‣ Windows  Azure  Emulators  for  Windows
  10. 10. in it2 SDK  for  PHP ‣ WindowsAzure ‣ Blob ‣ Common ‣ Queue ‣ ServiceBus ‣ ServiceManagement ‣ ServiceRunFme ‣ Table
  11. 11. in it2 Composer $  svn  export  h:ps://github.com/WindowsAzure/azure-­‐sdk-­‐for-­‐ php/trunk/WindowsAzure  library/WindowsAzure Subversion  Hp GITPEAR SDK  installaFon
  12. 12. in it2 PEAR  dependencies ‣ HTTP_Request2 ‣ Mail_mime ‣ Mail_mimeDecode
  13. 13. in it2 Websites Storage Cloud  ServicesVirtual  Machines Windows  Azure CDN SSL SLA Mobile Media Big  Data QAVPN IdenHty Mgmt ACL
  14. 14. in it2 Azure  Websites
  15. 15. in it2 The  quickest  way  to  deploy   to  the  cloud
  16. 16. in it2 Requirements ‣ A  PHP  project ‣ A  version  control  system ‣ local  (GIT,  Subversion,  TFS,  WebDeploy) ‣ on  line  (GitHub,  Bitbucket,  DropBox) ‣ AlternaFve  tools ‣ FTP  deploy ‣ Using  VisualStudio  or  WebMatrix  to  deploy ‣ About  15  minutes
  17. 17. in it2 One  important  thing! ‣ DocumentRoot  in  project  subdir ‣ e.g.  public/index.php ‣ Requirement  for  web.config <rule name="GoPub" patternSyntax="Wildcard"> <match url="*" />     <action type="Rewrite" url="public/index.php" /> </rule>
  18. 18. in it2
  19. 19. in it2 Virtual  Machines
  20. 20. in it2 AlternaFve  way  to  achieve   cloud  power
  21. 21. in it2 Usages ‣ Run  arbitrary  processes ‣ e.g.  cron  processes ‣ Provide  uFlity  services ‣ e.g.  forward  proxy ‣ Cloud  OS ‣ Windows,  SQL  Server  or  Linux  in  the  cloud
  22. 22. in it2
  23. 23. in it2 Cloud  Services
  24. 24. in it2 I  was  clueless ? ? ?:-(
  25. 25. in it2 Background ‣ Coming  from  a  UNIX/Linux  environment ‣ Worked  as  system  administrator ‣ Wrote  tools  in  Perl  (yeah,  I  know) ‣ Used  to  Cron,  Shell,  CGI  and  Daemons ‣ Worked  with  Windows  IIS ‣ Never  had  to  set  things  up ‣ Used  FTP  to  deploy  on  the  system ‣ Never  knew  the  fact  it  was  a  web  role  in  IIS
  26. 26. in it2 Figuring  it  out ‣ Web  Role ‣ A  web  site  or  service  running  on  the  internet ‣ Can  use  all  Windows  Azure  services ‣ Worker  Role ‣ Runs  processes  in  the  background ‣ Can  use  all  Windows  Azure  services
  27. 27. in it2 Why  Cloud  Services? ‣ All  the  power  of  Web  Sites ‣ With  smart  scaling  capabiliFes ‣ Memcache  like  caching  layer  per  instance ‣ Staging/ProducFon  environments ‣ With  smart  swapping ‣ Allows  controlled  automated  deployments
  28. 28. in it2 Command  line  tools h;p://www.windowsazure.com/en-­‐us/manage/linux/how-­‐to-­‐guides/command-­‐line-­‐tools/ h;p://msdn.microsok.com/en-­‐us/library/windowsazure/jj156055.aspx
  29. 29. in it2 Endless  posibiliFes WebApp WebApp WorkerApp WinCache Blob  Storage Table  Storage Queues Azure  SQL 3rd-­‐party  MySQL
  30. 30. in it2 DTAP  environment Web  Fabric Staging ProducHon WorkstaHon Windows Azure Windows Azure
  31. 31. in it2 Web  Role  for  PHP  Local ‣ Start  Azure  Emulator ‣ PS  C:devmyProject>  Start-­‐AzureEmulator Creating local package... Starting Emulator... Role is running at http://127.0.0.1:81 Started
  32. 32. in it2
  33. 33. in it2
  34. 34. in it2
  35. 35. in it2
  36. 36. in it2
  37. 37. in it2
  38. 38. in it2 Storage
  39. 39. in it2 Blob  storage ‣ Storage  for  binary  large  objects  (BLOB) ‣ Block  blobs  (200GB) ‣ Page  blobs  (1TB) ‣ Unlimited  storage  capacity ‣ Content  delivery  network  (CDN) ‣ HTTP  and  HTTPS  support ‣ CNAME  support ‣ To  integrate  within  your  own  domain (e.g.  blob.mycompany.com) ‣ Data  replicaFon
  40. 40. in it2 Blob  Storage  overview My  Company images movies image1.jpg image2.jpg movie1.mov
  41. 41. in it2 Usage  of  blobs https://mycompany.blob.core.windows.net/image/image1.jpg https://cdn01.mycompany.com/image/image1.jpg
  42. 42. in it2 Table  storage ‣ Storage  of  structured  data ‣ Oken  referred  to  as  NoSQL ‣ Implements  tree-­‐like  data  storage  and   retrieval ‣ Scalable  and  replicated ‣ Supports  OData  protocol
  43. 43. in it2 Table  Storage  overview Company customer product name  =  … email  =  … name  =  … email  =  … code  =  … price  =  …
  44. 44. in it2 Accessing  Table  Store  data ‣ Using  REST  directly ‣ GET  h;p://mycompany.table.core.windows.net/ customer ‣ Using  SDK ‣ h;ps://github.com/WindowsAzure/azure-­‐sdk-­‐ for-­‐php
  45. 45. in it2 Queue  Storage ‣ FIFO  type  storage ‣ Processing  one  item  a  Fme ‣ Messages  in  any  format  of  64KB ‣ Useful  for  deferred  acFons ‣ Resize  of  images ‣ Sending  out  mails ‣ …
  46. 46. in it2 Queue  Storage  overview Email  2 Email  1 Email  3 Worker Role Email  1Queue Email  2
  47. 47. in it2 Accessing  Queue  Messages ‣ Directly  with  REST ‣ GET  h;ps:// mycompany.queue.core.windows.net/ mailToSend ‣ Indirectly  using  SDK ‣ h;ps://github.com/WindowsAzure/azure-­‐sdk-­‐ for-­‐php
  48. 48. in it2 Conclusion
  49. 49. in it2 Conclusion ‣ PHP  for  web  applicaFon  development ‣ WAWS  for  rapid  prototyping ‣ WACS  for  scaling  web  apps  and  workers ‣ WAVM  for  proxy,  tooling  and  scheduling
  50. 50. in it2 PHP  checklist ‣ Get  your  prototypes  online  quickly ‣ Ensure  your  apps  stay  online  all  the  Fme ‣ Distribute  responsibiliFes ‣ Integrate  3rd-­‐party  soluFons  easily
  51. 51. in it2 No  system  knowledge  necessary! Limited ✓
  52. 52. in it2 Michelangelo  van  Dam Zend  CerFfied  Engineer michelangelo@in2it.be in it2 PHP  ConsulFng  -­‐  QA  Audits  -­‐  Training  Courses www.in2it.be
  53. 53. in it2 CreaFve  Commons  Credits ‣ sunny  clouds:  h;p://www.flickr.com/ photos/andyfitz/2340298916 ‣ balloon:  h;p://www.flickr.com/photos/ ashraful/5836601848 ‣ flight:  h;p://www.flickr.com/photos/ unfinishedportrait/7712845996 ‣ train:  h;p://www.flickr.com/photos/ nomadic_lass/8508000688  
  54. 54. in it2 8957 If  you  liked  it,  thanks! If  not,  tell  me  how  to  improve
  55. 55. in it2Thank  you
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×