User Tools

Site Tools


platform:cf

SmartCampus CloudFoundry PaaS Resources

Environment Setup

There are two ways to deploy and manage your apps on the PaaS:

  • using Eclipse plugin
  • using VMC command line tool (Linux/OS X)

You can set up the Eclpise plugin by following the steps in the official guide:

http://docs.cloudfoundry.org/buildpacks/java/sts.html

ATTENTION! The current CloudFoundry installation supports API v1.0 only. This means that the Eclipse plugin 1.5 or later will not work with this instance. You should install the Eclipse plugin version 1.4 as follows:

  1. open 'Help > Install New Software…'

NEW ATTENTION! It seems that plugin 1.4.0 is not more available in eclipse repo, so when you try use http://dist.springsource.com/release/TOOLS/cloudfoundry/1.4.0/ Eclipse presents you a newer version. Here you can download bin of 1.4 plugin (Tested sucessfully on Eclipse Luna)

Please also keep in mind that the endpoint URL must be: http://vcap.smartcampuslab.it instead of the default one.

If you would like to use the command line tool instead, you should:

  • install Ruby (at least 1.9.3) through your package manager or https://rvm.io/
  • install the vmc gem:
    gem install vmc
  • and configure it:
    vmc target http://vcap.smartcampuslab.it
    vmc login

Deploy an Application

Before starting you should know that your applications can be deployed only under the following domain name: *.app.smartcampuslab.it.

So for example if you have a “HelloWorld” application then you should provide “helloworld.app.smartcampuslab.it” as domain during the deployment procedure.

If you would like to deploy by using the Eclpise plugin please check the official guide here: http://docs.cloudfoundry.org/buildpacks/java/sts.html#deploy-an-application

If you prefer VMC, follow this sample steps instead:

cd /your/app/folder
vmc push 
Name> HelloWorld

Instances> 1

1: sinatra
2: other
Framework> sinatra #the framework is auto detected but can be also provided manually

1: ruby18
2: ruby19
3: ruby193
4: other
Runtime> 3

1: 64M
2: 128M
3: 256M
4: 512M
5: 1G
6: 2G
7: 4G
8: 8G
9: 16G
Memory Limit> 128M

Creating HelloWorld... OK

1: HelloWorld.smartcampuslab.it
2: none
Domain> helloworld.app.smartcampuslab.it #

Updating HelloWorld... OK

Create services for application?> y  #you can bind to your app additional services like a DB

1: blob 0.51
2: mongodb 2.0
3: mongodb 1.8
4: mysql 5.1
5: postgresql 9.0
6: rabbitmq 2.4
7: redis 2.4
8: redis 2.6
What kind?> 2

Name?> mongodb-HelloWorld

Creating service mongodb-HelloWorld... OK
Binding mongodb-HelloWorld to HelloWorld... OK
Create another service?> n

Bind other services to application?> n

Save configuration?> y

Save configuration?> n

Uploading HelloWorld... OK

Sample projects

Below the links to sample projects that uses spring and connected to mysql or mongodb database in cloudfoundry environment.


~~DISQUS~~

platform/cf.txt · Last modified: 11/07/2014 16:59 by Mirko Perillo