1.Visit https://ace.ng.bluemix.net/ and setup an IBM account.After login into the BlueMix site, Click the catalog link,you will see below screen.
2.Double Click the Ruby Sinatra,it will popup a dialog for you to create your Ruby Sinatra name and host name. For example I create the app name to HelloWordlRuby,the domain name is also HelloWorld.ng.bluemix.net.After click the "Create" Button,it will automatic create this app into the DashBoard.
3.You can double click the HelloWorldRuby app link http://hellowordlruby.ng.bluemix.net to see the actual result.
4.Actually the web UI show the most variable of the Ruby(version 1.9.3) Sinatra environment info.I want to make some changes on the UI. Just click on the settings(gear) icon next to your application name and select view guide to download the whole package.
5.Unzip the package to my local machine to c:\sinatra, open the helloWorld.rb and change the content to below screen.
6.Visit this CLI link and download the installer for your OS.Use below command to connect your bluemix
cf api https://api.ng.bluemix.net
Setting api endpint to https://api.ng.bluemix.net... OK
Notes:
Since the package already shipped with manifest.yml file,so we can directly use cf push command to deploy it.
applications:
- host: HelloWordlRuby
disk: 1024M
name: HelloWordlRuby
path: .
domain: ng.bluemix.net
instances: 1
memory: 128M
No comments:
Post a Comment