Showing posts with label CF. Show all posts
Showing posts with label CF. 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


Tuesday, May 20, 2014

Quick learn Cloud Foundry command line Tool

In the previous post,I referred the cf tools.This command line interface, or CLI, allows users to do almost everything necessary to deploy apps to Cloud Foundry, bind services to them, look at log files, and so on. If you are a beginner ,I suggest  you download the latest release version 6 and install it and  have a try.
installation:
(1) git clone https://github.com/cloudfoundry/cli
(2) git checkout v6.0.0
(3) run bin/build
(4)the binary build will be  be built into the the out/cf

Also you can directly download the release version  package based on your OS  from below url .
 https://github.com/cloudfoundry/cli/releases

Below are some useful commands.
1. cf login

cf login -a https://api.ng.bluemix.net

It will prompt you to enter the email and password to login into the CloudFoundry.Upon successful login, cf v6 saves a config.json file containing your API endpoint, organization, space values, and access token.

2.cf push

cf push APP [-b URL] [-c COMMAND] [-d DOMAIN] [-i NUM_INSTANCES] [-m MEMORY] [-n HOST] [-p PATH] [-s STACK] [--no-hostname] [--no-route] [--no-start]

Here I suggest you to use the manifests.yml to do the automate deployment. Application manifests tell cf push what to do with applications. This includes everything from how many instances to create and how much memory to allocate to what services applications should use.The detail you can reference the below link.You can learn more detail from http://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html

3. cf apps

Check on the health of the app you pushed

4.cf logs XXX --recently

List the specified app logs dump

5. cf service
List all the services you have created

6. cf create-service
You can create a managed service instance with the command: cf create-service SERVICE PLAN SERVICE_INSTANCE
cf create-service takes the following required arguments:
  • SERVICE: The service you choose.
  • PLAN: Service plans are a way for providers to offer varying levels of resources or features for the same service.
  • SERVICE_INSTANCE: A name you provide for your service instance. This is an alias for the instance which is meaningful to you. Use any series of alpha-numeric characters, hyphens (-), and underscores (_). You can rename the instance at any time.
Following this step, your managed service instance is provisioned:

$ cf create-service rabbitmq small-plan my_rabbitmq

Notes: SERVICE,PLAN you get from cf marketplace command

7.cf bind-service
You can bind a service to an application with the command cf bind-service APPLICATION SERVICE_INSTANCE. Example:

$ cf bind-service my_app example_service

8.cf files XXX logs/env.log

XXX stands for your app
show the specified app  detail logs.Sometimes it is useful to check the log through the command.


8.cf marketplace

List all the support service and plans in this platform


9. cf files XXX

List deployed app file structure. You can even use like cf files MyNodeSample app/ to list the detail folder content.

There is help inside the CLI using cf help, which prints out the list of commands and a quick summary of each. You can also get additional help for a particular command using cf help <command>

Monday, May 19, 2014

Three ways to deploy your applications on BlueMix

If you are a newbie,you might not be clearly all three ways to deploy your applications on BlueMix. Today I will talk about these three tools a little bit.
Developers have the freedom to choose the development tools that work best for them. Developers don’t always want to work with the same tool sets and BlueMix provides several options, including the following:

Command line: The Cloud Foundry (CF) command line provides integration for developers that prefer coding without an integrated development environment (IDE). This is also helpful for developing automation scripts with BlueMix. The CF application programming interfaces (APIs) can be integrated with multiple languages, frameworks and services.

BlueMix for Eclipse Kepler Beta: Since Eclipse is widely used by developers, they can continue to use the tools with which they are comfortable.This plug-in expose some of the unique features of the Liberty buildpack such as deploying a Liberty packaged server. In addition, support for deploying node.js applications allows you to target your JavaScript project, and then deploy and run your server side JavaScript application in the Cloud.

IDS(IBM DevOps Services): The cloud-based software development service(the former name is jazz hub) is based on IBM's software development tool Rational Team Concert.Developers can work with the IDS using web IDE to edit the code online and  provide  automatically deployment to BlueMix . It also provide integration to several source control management (SCM) systems like Git, GitHub and Jazz SCM.

I will blog  three tools details in the next few days.