Showing posts with label Buildpack. Show all posts
Showing posts with label Buildpack. Show all posts

Thursday, May 29, 2014

How do I learn BlueMix

I have wroten my blog for sometime.Today I will conclude my leaning way on BlueMix.If you are a newbie you can draw lesson from me.The below are my steps to learn BlueMix.

1.First you need to understand Paas concept before you started BlueMix.I strongly recommand you to read "Programming for PaaS" book.




Whether you’re an entrepreneur or part of a large enterprise development team, this book shows you how PaaS can help you focus on innovative applications, rather than spend your time worrying about technical operations.
  • Track the cloud’s evolution from IaaS and DevOps to PaaS
  • Learn how PaaS combines the simplicity of shared web hosting with the control of dedicated hosting
  • Explore the benefits of both portable and non-portable PaaS options
  • Apply best practices for moving legacy apps to PaaS—and understand the challenges involved
  • Write new applications for PaaS from scratch with RESTful meta-services
  • Use PaaS to build mobile apps with backend services that scale
  • Examine the core services that each major provider currently offers
  • Learn the situations in which PaaS might not be advantageous
2.Register an account in https://ace.ng.bluemix.net/,now it is in beta status free to use by now.You can follow the offical document(lots of sample) to push your application to the BlueMix.You can try thee way to deploy it on the BlueMix.There are lots of opensource you might need to learn.I post some of links for your reference.

OAuth
---------
http://oauth.net/2/

https://developers.google.com/accounts/docs/OAuth2

OData
---------
http://www.odata.org/developers/articles/

http://msdn.microsoft.com/en-in/data/gg601462.aspx

http://jaydata.org/tutorials/how-to-build-a-simple-odata-based-ajax-application


JSON
-------
http://www.w3schools.com/json/

http://www.json.org/js.html

PostgreSQL
---------------
Bluemix link --> http://ng.w3.bluemix.net/docs/Services/PostgreSQL/Index.html

http://www.postgresql.org/docs/8.0/static/tutorial.html

http://www.postgresql.org/files/documentation/pdf/7.2/tutorial-7.2-US.pdf


PHP Tutorial
----------------
http://www.w3schools.com/php/

http://www.php.net/manual/en/tutorial.php


Python Tutorial
-------------------
http://www.python.org/about/gettingstarted/

http://www.php.net/manual/en/tutorial.php


MQTT
--------
http://w3.itso.ibm.com/redpieces/abstracts/sg248054.html

http://pic.dhe.ibm.com/infocenter/wmqv7/v7r1/index.jsp?topic=%2Fcom.ibm.mq.doc%2Ftt60100_.htm

http://pic.dhe.ibm.com/infocenter/wmqv7/v7r5/index.jsp?topic=%2Fcom.ibm.mm.tc.doc%2Ftc10140_.htm

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=%2Fcom.ibm.mq.amqtat.doc%2Ftt20026_.htm

http://www.hivemq.com/build-javascript-mqtt-web-application/

Ruby on Rails
-----------------
http://ruby.railstutorial.org/

http://ruby.railstutorial.org/ruby-on-rails-tutorial-book


RabbitMQ
-------------
Bluemix link -->http://ng.w3.bluemix.net/docs/Services/RabbitMQ/Index.html

http://www.rabbitmq.com/getstarted.html

http://www.rabbitmq.com/tutorials/tutorial-one-java.html


MongoDB
--------------
http://docs.mongodb.org/manual/tutorial/getting-started/

http://tour.mongohq.com/Mongo?k=Mongodb%20php&gclid=CLLkqsWojLwCFUom4god1gMA6w

https://education.mongodb.com/courses/10gen/M101J/2014_January/courseware/Week_1_Introduction/5254637ee2d4231cc6083fd5/


Node JS
----------
http://www.nodebeginner.org/

http://nodejs.org/docs/v0.4.1/api/modules.html

http://www.thinkster.io/pick/GtaQ0oMGIl/a-better-way-to-learn-angularjs

http://docs.angularjs.org/guide/concepts#directive

Cloudant
http://www.cloudant.com/

3.Practitioners should start with a quick grasp of CloudFounry.Esp for command line tools,most of your application you have to use command line tools to do that.
Cloudfoundry introduction from Pivotal - http://www.cloudfoundry.com/use
Cloudfoundry github repo - https://github.com/cloudfoundry
Cloudfoundry developer's mailing list on Google Groups - https://groups.google.com/a/cloudfoundry.org/forum/#!forum/vcap-dev

4.Try to develop or create your application on BlueMix.Like create a blog,rss site,phpAdmin etc.If you want to deploy othere language like php,perl you might need to use Buildpacks.
Buildpacks provide framework and runtime support for your applications. Buildpacks typically examine user-provided artifacts to determine what dependencies to download and how to configure applications to communicate with bound services.

5.If you have questions about BlueMix usage ,you can visit the Bluemix forum
This forum is hosted by IBM.You can ask questions and get experienced IBM staff support.

If you are an IBM staff,you can subscibe the email list in below address.
 http://webconf.ibm.com/mail/CloudOE-dev


Friday, May 9, 2014

How let BlueMix support PHP?

Default BlueMix support the below four run time environment.So if you want to run some other environment,you might need to use customize buildpack to do this.
Today I will introduce how to run PHP in the BlueMix.
What you need to prepare before building and runing the app ?

a)A BlueMix account
b)Familiarity with the Cloud Foundry cf command-line interface, which you can download directly from the BlueMix site

c)Elementary knowledge of the PHP programming language

1.Write the php code
<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php echo '<p>Hello World</p>'; ?>
 </body>
</html>
2.Choose the php buildpack,actually there are many php buildpack provided.The most popular php buildpack is heroku-buildpack-php.You can also try others as well.
3. Use cf command to login into the bluemix,it will let you enter the email and password
cf login -a https://api.ng.bluemix.net
4.After log in to your BlueMix account and run this command from the root folder of your application, where appname represents a unique name for your BlueMix-hosted app.I have tested below three buildpack,they both support php,you can pick anyone of three to test it.

cf push myphptest -b https://github.com/dmikusa-pivotal/cf-php-build-pack.git --no-manifest --no-start
cf push myphptest -b https://github.com/cyberdelia/heroku-buildpack-php.git --no-manifest --no-start
cf push myphptest -bhttps://github.com/zendtech/zend-server-php-buildpack.git --no-manifest --no-start

Note:you can also write a  manifest.yml to include the BlueMix deploy information.For example:
---
applications:
- name: myphptest
  memory: 256M
  instances: 1
  host: myphptest
  buildpack: https://github.com/zendtech/zend-server-php-buildpack.git

So you can use only cf push command to do that.

5.When you deploy sucessfully,you can launch the url  myphptest.bluemix.net/hello.php,when you see the hello world page,it means your deployment is sucessfully.