Cloud Foundry

You are viewing an old version (v. 12) of this page.
The latest version is v. 25, last edited on Nov 01, 2012 (view differences | )
<< View previous version | view page history | view next version >>

Table of Contents


Introduction

This tutorial covers deploying an ICEfaces application to Micro Cloud Foundry and Cloud Foundry. Cloud Foundry is described by VMware, Inc. as:

"Cloud Foundry is an open platform as a service, providing a choice of clouds, developer frameworks and application services. Initiated by VMware, with broad industry support, Cloud Foundry makes it faster and easier to build, test, deploy and scale applications. It is an open source project and is available through a variety of private cloud distributions and public cloud instances, including CloudFoundry.com."

Optionally, the developer can utilize Micro Cloud Foundry as well, which is described by VMware, Inc. as:

"Micro Cloud Foundry provides the VMware open platform as a service in a standalone environment running in a virtual machine. It is a self-contained local development environment as similar as possible to the Cloud Foundry cloud, making application development for the cloud and the transition from development to production much more seamless."


Legend

Terms Description
[micro-cloud-foundry-home] This is the user defined home directory in which the Micro Cloud Foundry VM is (to be) unpacked.
[icefaces-application-home] This is the user defined home directory in which the ICEfaces application is (to be) unpacked.

Requirements

This tutorial assumes the following requirements are met before continuing:

Note
Other VMware products can be used instead, like VMware Workstation or others, but this tutorial focuses on VMware Player.

Cloud Foundry

Creating a Domain

  • Log into https://my.cloudfoundry.com/micro using your credentials.
  • Enter the desired Domain Name and click on the Create button.
  • Save the configuration token for later use.
  • Click on the Download Micro Cloud Foundry VM button.
  • Select the desired location for "micro-1.x.x.zip" and download the VM.

Configuring the Micro Cloud Foundry VM

  • Unpack the "micro-1.x.x.zip" into the [micro-cloud-foundry-home] directory.
  • Using VMware Player:
    • Navigate to File -> Open a Virtual Machine....
    • Navigate to the [micro-cloud-foundry-home] directory, select the "micro.vmx" file and click on the Open button.
    • Select the Micro Cloud Foundry v1.x.x virtual machine and click on the Play virtual machine link.
    • Enter "1" to configure and press [Enter] to continue.
    • Enter the desired Password and press [Enter] to continue.
    • Enter the desired Password again as the Confirmation and press [Enter] to continue.
    • Enter the desired network (e.g. "1" for DHCP) and press [Enter] to continue.
    • Enter the desired HTTP proxy and press [Enter] to continue.
    • Enter the _confirmation token (as saved earlier) and press [Enter] to continue.
    • Press [Enter] to continue.
    • Confirm that the status of Identity and Services is ok and that the status of IP Address is network up.

Deployment and Management

In order to deploy and manage ICEfaces applications VMware provides two Cloud Foundry tools:

Installing one or both is a requirement in order to deploy and manage ICEfaces applications using Cloud Foundry.

VMC (Command-Line Interface)

Installing VMC

Deployment

Micro Cloud Foundry
Configuring VMC for Micro Cloud Foundry
  • Target the Micro Cloud Foundry using the following single-line command where the [hostname] placeholder needs to be replaced with the desired hostname (e.g. "icesoft.cloudfoundry.me"):
    vmc target api.[hostname]
  • Create a new account using the following single-line command:
    vmc register
  • Enter the desired Email and press [Enter] to continue.
  • Enter the desired Password and press [Enter] to continue.
  • Enter the desired Password again as the Verify Password and press [Enter] to continue.
Deploying an ICEfaces Application to Micro Cloud Foundry

In order to deploy an ICEfaces application using a command prompt or console follow these steps:

  • Navigate to the [icefaces-application-home] directory.
  • Deploy an ICEfaces application using the following single-line command:
    vmc push
  • Enter "Y" to the "Would you like to deploy from the current directory? [Yn]" question and press [Enter] to continue.
  • Enter the desired Application Name (e.g. "showcase") and press [Enter] to continue.
  • Enter "Y" to the "Detected a Java Web Application, is this correct? [Yn]" question and press [Enter] to continue.
  • Enter the desired Application Deployed URL (e.g. "showcase.icesoft.cloudfoundry.me") and press [Enter] to continue.
  • Enter the desired Memory reservation (e.g. "512M") and press [Enter] to continue.
  • Enter the desired number of instances (e.g. "1") and press [Enter] to continue.
  • Enter "N" to the "Create services to bind to '[application-name]'? [yN]" question and press [Enter] to continue.
  • Enter "N" to the "Would you like to save this configuration? [yN]" question and press [Enter] to continue.
  • Confirm the ICEfaces application is running correctly by going to http://[application-name].[hostname].cloudfoundry.me/ (e.g. http://showcase.icesoft.cloudfoundry.me/).
Cloud Foundry
Configuring VMC for Cloud Foundry
  • Target the Cloud Foundry using the following single-line command:
    vmc target api.cloudfoundry.com
  • Log into Cloud Foundry using the following single-line command:
    vmc login
  • Enter your Email and press [Enter] to continue.
  • Enter your Password and press [Enter] to continue.
Deploying an ICEfaces Application to Cloud Foundry

In order to deploy an ICEfaces application using a command prompt or console follow these steps:

  • Navigate to the [icefaces-application-home] directory.
  • Deploy an ICEfaces application using the following single-line command:
    vmc push
  • Enter "Y" to the "Would you like to deploy from the current directory? [Yn]" question and press [Enter] to continue.
  • Enter the desired Application Name (e.g. "showcase") and press [Enter] to continue.
  • Enter "Y" to the "Detected a Java Web Application, is this correct? [Yn]" question and press [Enter] to continue.
  • Enter the desired Application Deployed URL (e.g. "showcase.cloudfoundry.com") and press [Enter] to continue.
  • Enter the desired Memory reservation (e.g. "512M") and press [Enter] to continue.
  • Enter the desired number of instances (e.g. "1") and press [Enter] to continue.
  • Enter "N" to the "Create services to bind to '[application-name]'? [yN]" question and press [Enter] to continue.
  • Enter "N" to the "Would you like to save this configuration? [yN]" question and press [Enter] to continue.
  • Confirm the ICEfaces application is running correctly by going to http://[application-name].cloudfoundry.com/ (e.g. http://showcase.cloudfoundry.com/).

Cloud Foundry Extension to Eclipse (Graphical IDE)

Installing Cloud Foundry Integration for Eclipse

  • Using the menu bar at the top, navigate to Help -> Eclipse Marketplace....
  • Using the Eclipse Marketplace pop-up window:
    • Enter "Cloud Foundry" as the Find and click on the Go button.
    • Click on the Install button of the Cloud Foundry Integration for Eclipse.
    • Confirm the selected features and click on the Next button.
    • Select the I accept the terms of the license agreements radio button and click on the Finish button.
  • Using the Software Updates pop-up window, click on the Restart Now button.

Deployment


External Link(s)

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2017 ICEsoft Technologies Canada Corp.