SlideShare a Scribd company logo
Using PHPwith IBM Bluemix
Vikram Vaswani
July 2017
Vikram Vaswani
Founder, Melonfire
● Product design and implementation with open source
technologies
● 20+ productslaunched for customersworldwide
Author and activePHPcommunity participant
● 7 booksfor McGraw-Hill USA
● 250+ tutorialsfor IBM dW, Zend Developer Zoneand
others
Moreinformation at http://vikram-vaswani.in
Vikram Vaswani
ActiveIBM Bluemix user since2014
● IBM Cloud Champion
● 15+ PHPapplicationson IBM Bluemix
● Stray assist: http://stray-assist.mybluemix.net/
● Invoicegenerator: https://invoice-generator.mybluemix.net/
● ATM finder: http://atm-finder.mybluemix.net/
● Document indexer: https://pdf-keyword-search.mybluemix.net
Codesamplesat https://github.com/vvaswani
Bluemix
● Cloud PaaS
● Secureand scalable
● Pay-per-use
● Multipleprogramming languages
● PHP, Java, Go, Ruby, Swift, ...
● Multipleservices(own and third-party)
● Text to Speech, Object Storage, Spark, Sendgrid, ...
Bluemix
● Serverlesscomputing
● ApacheOpenWhisk
● Integrated continuousdelivery toolchains
● Own and externally-hosted repositories
● Web IDE
● Third-party integrations: Slack, GitHub
● Blue-green deployment and rollback
Bluemix and PHP
● PHPruntimeviaCloud Foundry PHPbuildpack
● Key features
● Choiceof Web servers: Apacheor nginx
● Choiceof PHPversions: PHP5 or PHP7
● Support for variousPHPextensionsand modules
● Support for Composer and custom startup scripts
● Debug logs
PHPbuildpack docsat
http://docs.cloudfoundry.org/buildpacks/php/
Prerequisites
● Bluemix account
● Third-party serviceaccounts(if needed)
● Local PHPdevelopment environment
● CloudFoundry CLI
● Application sourcecode(obviously!)
CloudFoundry CLI installation instructionsat
https://docs.cloudfoundry.org/cf-cli/install-go-cli.html
ConfigurationArtifacts
● Application manifest (manifest.yml)
● Buildpack configuration data(.bp-co nfig/* )
● Dependency manifest (co mpo ser.jso n)
Development Approaches
UsethePHPstarter application asbase
● Deploy thestarter application to Bluemix
● Download thesourcecodeand modify locally
● Incorporatelocal or remoteservices
● Redeploy thefinal application to Bluemix and bind
servicesasneeded
Benefits
● Simple, easy to understand
● Best for first-timeusers
Development Approaches
Start from scratch
● Develop theapplication locally
● Incorporatelocal or remoteservices
● Deploy thefinal application to Bluemix and bind
servicesasneeded
Benefits
● Greater flexibility and customization options
● Best for experienced developers
Development Steps
1.Defineand install application dependencies
2.Configureapplication with local servicecredentials
3.Find and instantiateany remoteservicesneeded for
development
4.Configureapplication with remoteservice
credentials
5.Develop, test and finalize
Deployment Steps
1.Find and instantiateremoteservices
2.Updateapplication to retrieveremoteservice
credentialsfrom Bluemix
3.Defineapplication manifest
4.Push application
5.Bind remoteservices
6.Test application
Development
Development: Dependencies
● Useco mpo ser.jso n to
● Specify thePHPversion
● Declaredependenciesand version constraints
● Useco mpo ser.lo ck to
● Lock your application to specific versionsof
dependencies
Development: Dependencies
Sampleco mpo ser.jso n file:
{
"require": {
"php": ">=7.0.0",
"slim/slim": "^3.8",
"slim/php-view": "^2.2"
}
}
Development: ServiceDiscovery
Find servicesusing theBluemix Dashboard
● 120+ services, IBM and third-party
● Many servicesincludeafreetier
Development: ServiceInstantiation
Instantiatenew servicesusing theBluemix Dashboard
● Leaveservicesunbound for local development
● Obtain credentialsfrom each servicepanel
Deployment
Pre-Deployment: ServiceCredentials
● Availablein Bluemix environment for all bound services
viaVCAP_ SERVICES variable
● Structured asJSON document
Pre-Deployment: ServiceCredentials
Samplecode:
<?php
// if BlueMix VCAP_SERVICES environment available
// overwrite local credentials with BlueMix credentials
if ($services = getenv("VCAP_SERVICES")) {
$json = json_decode($services, true);
$config['db']['hostname'] = $json['cleardb'][0]['credentials']['hostname'];
$onfig['db']['username'] = $json['cleardb'][0]['credentials']['username'];
$config['db']['password'] = $json['cleardb'][0]['credentials']['password'];
$config['db']['name'] = $json['cleardb'][0]['credentials']['name'];
}
Deployment: Application Manifest
Usemanifest.yml to defineapplication attributes:
● Host name
● Application name
● Memory
● Number of instances
● Buildpack
Deployment: Application Manifest
Samplemanifest.yml file:
---
applications:
- name: myapp-[initials]
memory: 256M
instances: 1
host: myapp-[initials]
buildpack: https://github.com/cloudfoundry/php-buildpack.git
stack: cflinuxfs2
Deployment: Buildpack Configuration
● Use.bp-co nfig/o ptio ns.jso n to:
● ConfiguretheWeb server and document root
● Set thePHPversion (if conflict, co mpo ser.jso n getspriority)
● EnablePHPmodulesand Zend extensions
● Use.bp-co nfig/php/php.ini.d/*.ini to:
● ConfigurePHPsettings
● EnablePHPextensions
● Use.bp-co nfig/httpd/httpd.co nf to:
● ConfigureApachesettings
Deployment: Buildpack Configuration
Sample.bp-co nfig/o ptio ns.jso n file:
{
"WEB_SERVER": "httpd",
"COMPOSER_VENDOR_DIR": "vendor",
"WEBDIR": "public",
"PHP_VERSION": "{PHP_70_LATEST}"
}
Deployment: Buildpack Configuration
Sample.bp-co nfig/php/php.ini.d/php.ini file:
extension=mysqli.so
default_charset="UTF-8"
display_errors="1"
display_startup_errors="1"
error_reporting="E_ALL"
List of PHPbuildpack extensionsenabled by default at
https://github.com/cloudfoundry/php-buildpack/releases/
Deployment: CodePush
● Set API endpoint
cf api https://api.ng.bluemix.net
● Log in
cf login
● Push application
cf push
Deployment: CodePush Results
When aPHPapplication ispushed:
● Theapplication metadataisstored and arouteand record iscreated for it.
● Theapplication assetsareuploaded.
● ThePHPbuildpack isdownloaded and executed.
● ThePHPbuildpack downloadsand configurestheWeb server and PHPbinary.
● ThePHPbuildpack usesComposer to install application dependencies.
● Thestaged PHPapplication ispackaged into a"droplet".
● Thedroplet isuploaded and thestaged PHPapplication isstarted.
Moreinformation at https://docs.cloudfoundry.org/concepts/how-
applications-are-staged.html
Deployment: ServiceBinding
● Bind services:
cf bind-service APP-NAME SERVICE-
NAME
● Set custom environment variables:
cf set-env APP-NAME VARIABLE VALUE
● Restageapplication:
cf restage APP-NAME
Post-Deployment: Debugging
● View logs:
cf logs APP-NAME
cf logs APP-NAME --recent
● Start secureshell session:
cf ssh APP-NAME
Learn moreat http://vikram-
vaswani.in/weblog/2015/03/19/debugging-php-errors-
on-ibm-bluemix/
Demonstration
SampleApplication
● PHP+MySQL application using Slim micro-
framework
● UsesBluemix ClearDB Managed MySQL service
● Usescustomized buildpack configuration
Codeat https://github.com/vvaswani/bluemix-cities
Demonstration Overview
● Cloneapplication sourcecode
● Configurewith local development MySQL database
● CreateClearDB Managed MySQL Databaseserviceon Bluemix
● Updateapplication codeto useservicecredentialsin Bluemix
environment
● Createapplication manifest
● ConfigureCloud Foundry PHPbuildpack
● Deploy application to Bluemix
● Bind ClearDB Managed MySQL Databaseserviceto application
● Test and debug deployment
Questions?
Contact Information
Email:
● vikram-vaswani.in/contact
Web:
● www.melonfire.com
● vikram-vaswani.in
Social networks:
● plus.google.com/100028886433648406825
MySQL/PHPuser group:
● https://plus.google.com/+mmpugindia/
Using PHP with IBM Bluemix
Using PHP with IBM Bluemix
Using PHP with IBM Bluemix
Using PHP with IBM Bluemix

More Related Content

ODP
Jade: Open Source Case Management for SME Law Firms (Oct 2017)
PDF
Do It Yourself :: Web App - Web Api
PDF
WSO2 Product Release webinar - WSO2 BAM 2.5
PDF
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
PDF
Top Node.JS Frameworks to Look at in 2020
PDF
Bodin - Hullin & Potencier - Magento Performance Profiling and Best Practices
PDF
Scaling Production Data across Microservices
PDF
Microservices Communication Patterns with gRPC
Jade: Open Source Case Management for SME Law Firms (Oct 2017)
Do It Yourself :: Web App - Web Api
WSO2 Product Release webinar - WSO2 BAM 2.5
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
Top Node.JS Frameworks to Look at in 2020
Bodin - Hullin & Potencier - Magento Performance Profiling and Best Practices
Scaling Production Data across Microservices
Microservices Communication Patterns with gRPC

What's hot (20)

PPTX
O futuro do desenvolvimento .NET
PPTX
What is new in ASP.NET Core
PPTX
Get IT together
PDF
[Webinar] Automating Developer Workspace Construction for the Nuxeo Platform ...
PDF
James Zetlen - PWA Studio Integration…With You
PDF
Jayway Web Tech Radar 2015
ODP
Nagios Conference 2014 - Andy Brist - Intro to Incident Manager
PDF
DDD Strategic Patterns and Microservices by Example
PDF
Inter process communication
PDF
[Nuxeo World 2013] A DOCUMENT ACQUISITION SOLUTION FOR THE NUXEO PLATFORM - S...
PPTX
Content Management and Marketing Automation: Best Practices for Customer Expe...
PPTX
Microsoft Azure Cloud Services
ODP
ORusu_Apps
PDF
Micro frontends with react and redux dev day
PPTX
Quick workflow of a nodejs api
ODP
Polymer, HTML includes y core-ajax
PDF
GitLab Remote Meetup: Enhance Your Kubernetes CI/CD Pipelines with GitLab & ...
PDF
MongoDB 2.8 bug hunt
PPT
Piwik Presentation
ODP
[Nuxeo World 2013] EXTENSIBILITY AND USE OF NUXEO AS A DOCUMENT MANAGEMENT PL...
O futuro do desenvolvimento .NET
What is new in ASP.NET Core
Get IT together
[Webinar] Automating Developer Workspace Construction for the Nuxeo Platform ...
James Zetlen - PWA Studio Integration…With You
Jayway Web Tech Radar 2015
Nagios Conference 2014 - Andy Brist - Intro to Incident Manager
DDD Strategic Patterns and Microservices by Example
Inter process communication
[Nuxeo World 2013] A DOCUMENT ACQUISITION SOLUTION FOR THE NUXEO PLATFORM - S...
Content Management and Marketing Automation: Best Practices for Customer Expe...
Microsoft Azure Cloud Services
ORusu_Apps
Micro frontends with react and redux dev day
Quick workflow of a nodejs api
Polymer, HTML includes y core-ajax
GitLab Remote Meetup: Enhance Your Kubernetes CI/CD Pipelines with GitLab & ...
MongoDB 2.8 bug hunt
Piwik Presentation
[Nuxeo World 2013] EXTENSIBILITY AND USE OF NUXEO AS A DOCUMENT MANAGEMENT PL...
Ad

Similar to Using PHP with IBM Bluemix (20)

PPT
Bluemix and DevOps workshop lab
PDF
Get over the Cloud with Bluemix
PPTX
Out of the Blue: Getting started with IBM Bluemix development
PDF
IBM Bluemix hands on
PPT
IBM Bluemix and Docker Guest Lecture at Cork Institute of Technology
PDF
Introduction to Bluemix and Watson
PPT
IBM Bluemix Talk at University College Cork (UCC)
PDF
Introduction to IBM Bluemix
PDF
Easy integration of Bluemix services with your applications
PDF
Php through the eyes of a hoster confoo
PPTX
Bluemix - Overview & Benefits
PPTX
How does IBM Bluemix work?
PPTX
Bluemixoverview
PPTX
IBM Bluemix Overview
PPTX
FIU cloud-hackathon-lec1
PDF
IBM BlueMix Architecture and Deep Dive (Powered by CloudFoundry)
PDF
2016 05-cloudsoft-amp-and-brooklyn-new
PDF
IBM Codename: Bluemix - Cloudfoundry, PaaS development and deployment trainin...
PDF
Intro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twist
PDF
What is IBM Bluemix , Une nouvelle façon de coder , dans le cloud
Bluemix and DevOps workshop lab
Get over the Cloud with Bluemix
Out of the Blue: Getting started with IBM Bluemix development
IBM Bluemix hands on
IBM Bluemix and Docker Guest Lecture at Cork Institute of Technology
Introduction to Bluemix and Watson
IBM Bluemix Talk at University College Cork (UCC)
Introduction to IBM Bluemix
Easy integration of Bluemix services with your applications
Php through the eyes of a hoster confoo
Bluemix - Overview & Benefits
How does IBM Bluemix work?
Bluemixoverview
IBM Bluemix Overview
FIU cloud-hackathon-lec1
IBM BlueMix Architecture and Deep Dive (Powered by CloudFoundry)
2016 05-cloudsoft-amp-and-brooklyn-new
IBM Codename: Bluemix - Cloudfoundry, PaaS development and deployment trainin...
Intro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twist
What is IBM Bluemix , Une nouvelle façon de coder , dans le cloud
Ad

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Big Data Technologies - Introduction.pptx
PPT
Teaching material agriculture food technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
sap open course for s4hana steps from ECC to s4
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Big Data Technologies - Introduction.pptx
Teaching material agriculture food technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Understanding_Digital_Forensics_Presentation.pptx
Spectroscopy.pptx food analysis technology
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Programs and apps: productivity, graphics, security and other tools
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Diabetes mellitus diagnosis method based random forest with bat algorithm
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
“AI and Expert System Decision Support & Business Intelligence Systems”
Spectral efficient network and resource selection model in 5G networks
20250228 LYD VKU AI Blended-Learning.pptx
NewMind AI Weekly Chronicles - August'25 Week I
sap open course for s4hana steps from ECC to s4

Using PHP with IBM Bluemix

  • 1. Using PHPwith IBM Bluemix Vikram Vaswani July 2017
  • 2. Vikram Vaswani Founder, Melonfire ● Product design and implementation with open source technologies ● 20+ productslaunched for customersworldwide Author and activePHPcommunity participant ● 7 booksfor McGraw-Hill USA ● 250+ tutorialsfor IBM dW, Zend Developer Zoneand others Moreinformation at http://vikram-vaswani.in
  • 3. Vikram Vaswani ActiveIBM Bluemix user since2014 ● IBM Cloud Champion ● 15+ PHPapplicationson IBM Bluemix ● Stray assist: http://stray-assist.mybluemix.net/ ● Invoicegenerator: https://invoice-generator.mybluemix.net/ ● ATM finder: http://atm-finder.mybluemix.net/ ● Document indexer: https://pdf-keyword-search.mybluemix.net Codesamplesat https://github.com/vvaswani
  • 4. Bluemix ● Cloud PaaS ● Secureand scalable ● Pay-per-use ● Multipleprogramming languages ● PHP, Java, Go, Ruby, Swift, ... ● Multipleservices(own and third-party) ● Text to Speech, Object Storage, Spark, Sendgrid, ...
  • 5. Bluemix ● Serverlesscomputing ● ApacheOpenWhisk ● Integrated continuousdelivery toolchains ● Own and externally-hosted repositories ● Web IDE ● Third-party integrations: Slack, GitHub ● Blue-green deployment and rollback
  • 6. Bluemix and PHP ● PHPruntimeviaCloud Foundry PHPbuildpack ● Key features ● Choiceof Web servers: Apacheor nginx ● Choiceof PHPversions: PHP5 or PHP7 ● Support for variousPHPextensionsand modules ● Support for Composer and custom startup scripts ● Debug logs PHPbuildpack docsat http://docs.cloudfoundry.org/buildpacks/php/
  • 7. Prerequisites ● Bluemix account ● Third-party serviceaccounts(if needed) ● Local PHPdevelopment environment ● CloudFoundry CLI ● Application sourcecode(obviously!) CloudFoundry CLI installation instructionsat https://docs.cloudfoundry.org/cf-cli/install-go-cli.html
  • 8. ConfigurationArtifacts ● Application manifest (manifest.yml) ● Buildpack configuration data(.bp-co nfig/* ) ● Dependency manifest (co mpo ser.jso n)
  • 9. Development Approaches UsethePHPstarter application asbase ● Deploy thestarter application to Bluemix ● Download thesourcecodeand modify locally ● Incorporatelocal or remoteservices ● Redeploy thefinal application to Bluemix and bind servicesasneeded Benefits ● Simple, easy to understand ● Best for first-timeusers
  • 10. Development Approaches Start from scratch ● Develop theapplication locally ● Incorporatelocal or remoteservices ● Deploy thefinal application to Bluemix and bind servicesasneeded Benefits ● Greater flexibility and customization options ● Best for experienced developers
  • 11. Development Steps 1.Defineand install application dependencies 2.Configureapplication with local servicecredentials 3.Find and instantiateany remoteservicesneeded for development 4.Configureapplication with remoteservice credentials 5.Develop, test and finalize
  • 12. Deployment Steps 1.Find and instantiateremoteservices 2.Updateapplication to retrieveremoteservice credentialsfrom Bluemix 3.Defineapplication manifest 4.Push application 5.Bind remoteservices 6.Test application
  • 14. Development: Dependencies ● Useco mpo ser.jso n to ● Specify thePHPversion ● Declaredependenciesand version constraints ● Useco mpo ser.lo ck to ● Lock your application to specific versionsof dependencies
  • 15. Development: Dependencies Sampleco mpo ser.jso n file: { "require": { "php": ">=7.0.0", "slim/slim": "^3.8", "slim/php-view": "^2.2" } }
  • 16. Development: ServiceDiscovery Find servicesusing theBluemix Dashboard ● 120+ services, IBM and third-party ● Many servicesincludeafreetier
  • 17. Development: ServiceInstantiation Instantiatenew servicesusing theBluemix Dashboard ● Leaveservicesunbound for local development ● Obtain credentialsfrom each servicepanel
  • 19. Pre-Deployment: ServiceCredentials ● Availablein Bluemix environment for all bound services viaVCAP_ SERVICES variable ● Structured asJSON document
  • 20. Pre-Deployment: ServiceCredentials Samplecode: <?php // if BlueMix VCAP_SERVICES environment available // overwrite local credentials with BlueMix credentials if ($services = getenv("VCAP_SERVICES")) { $json = json_decode($services, true); $config['db']['hostname'] = $json['cleardb'][0]['credentials']['hostname']; $onfig['db']['username'] = $json['cleardb'][0]['credentials']['username']; $config['db']['password'] = $json['cleardb'][0]['credentials']['password']; $config['db']['name'] = $json['cleardb'][0]['credentials']['name']; }
  • 21. Deployment: Application Manifest Usemanifest.yml to defineapplication attributes: ● Host name ● Application name ● Memory ● Number of instances ● Buildpack
  • 22. Deployment: Application Manifest Samplemanifest.yml file: --- applications: - name: myapp-[initials] memory: 256M instances: 1 host: myapp-[initials] buildpack: https://github.com/cloudfoundry/php-buildpack.git stack: cflinuxfs2
  • 23. Deployment: Buildpack Configuration ● Use.bp-co nfig/o ptio ns.jso n to: ● ConfiguretheWeb server and document root ● Set thePHPversion (if conflict, co mpo ser.jso n getspriority) ● EnablePHPmodulesand Zend extensions ● Use.bp-co nfig/php/php.ini.d/*.ini to: ● ConfigurePHPsettings ● EnablePHPextensions ● Use.bp-co nfig/httpd/httpd.co nf to: ● ConfigureApachesettings
  • 24. Deployment: Buildpack Configuration Sample.bp-co nfig/o ptio ns.jso n file: { "WEB_SERVER": "httpd", "COMPOSER_VENDOR_DIR": "vendor", "WEBDIR": "public", "PHP_VERSION": "{PHP_70_LATEST}" }
  • 25. Deployment: Buildpack Configuration Sample.bp-co nfig/php/php.ini.d/php.ini file: extension=mysqli.so default_charset="UTF-8" display_errors="1" display_startup_errors="1" error_reporting="E_ALL" List of PHPbuildpack extensionsenabled by default at https://github.com/cloudfoundry/php-buildpack/releases/
  • 26. Deployment: CodePush ● Set API endpoint cf api https://api.ng.bluemix.net ● Log in cf login ● Push application cf push
  • 27. Deployment: CodePush Results When aPHPapplication ispushed: ● Theapplication metadataisstored and arouteand record iscreated for it. ● Theapplication assetsareuploaded. ● ThePHPbuildpack isdownloaded and executed. ● ThePHPbuildpack downloadsand configurestheWeb server and PHPbinary. ● ThePHPbuildpack usesComposer to install application dependencies. ● Thestaged PHPapplication ispackaged into a"droplet". ● Thedroplet isuploaded and thestaged PHPapplication isstarted. Moreinformation at https://docs.cloudfoundry.org/concepts/how- applications-are-staged.html
  • 28. Deployment: ServiceBinding ● Bind services: cf bind-service APP-NAME SERVICE- NAME ● Set custom environment variables: cf set-env APP-NAME VARIABLE VALUE ● Restageapplication: cf restage APP-NAME
  • 29. Post-Deployment: Debugging ● View logs: cf logs APP-NAME cf logs APP-NAME --recent ● Start secureshell session: cf ssh APP-NAME Learn moreat http://vikram- vaswani.in/weblog/2015/03/19/debugging-php-errors- on-ibm-bluemix/
  • 31. SampleApplication ● PHP+MySQL application using Slim micro- framework ● UsesBluemix ClearDB Managed MySQL service ● Usescustomized buildpack configuration Codeat https://github.com/vvaswani/bluemix-cities
  • 32. Demonstration Overview ● Cloneapplication sourcecode ● Configurewith local development MySQL database ● CreateClearDB Managed MySQL Databaseserviceon Bluemix ● Updateapplication codeto useservicecredentialsin Bluemix environment ● Createapplication manifest ● ConfigureCloud Foundry PHPbuildpack ● Deploy application to Bluemix ● Bind ClearDB Managed MySQL Databaseserviceto application ● Test and debug deployment
  • 34. Contact Information Email: ● vikram-vaswani.in/contact Web: ● www.melonfire.com ● vikram-vaswani.in Social networks: ● plus.google.com/100028886433648406825 MySQL/PHPuser group: ● https://plus.google.com/+mmpugindia/