Close
  • Latest News
  • Artificial Intelligence
  • Video
  • Big Data and Analytics
  • Cloud
  • Networking
  • Cybersecurity
  • Applications
  • IT Management
  • Storage
  • Sponsored
  • Mobile
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
Read Down
Sign in
Close
Welcome!Log into your account
Forgot your password?
Read Down
Password recovery
Recover your password
Close
Search
Logo
Logo
  • Latest News
  • Artificial Intelligence
  • Video
  • Big Data and Analytics
  • Cloud
  • Networking
  • Cybersecurity
  • Applications
  • IT Management
  • Storage
  • Sponsored
  • Mobile
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
More
    Home Cloud
    • Cloud
    • Development
    • Networking
    • Servers

    Cloud Foundry Integration for Eclipse Allows Instant App Deployment

    Written by

    Jeff Cogswell
    Published June 11, 2012
    Share
    Facebook
    Twitter
    Linkedin

      eWEEK content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

      Cloud Foundry is a platform as a service environment for hosting cloud technology and software frameworks. The name Cloud Foundry refers to the software, which is free and open-source and available at CloudFoundry.org, while the site CloudFoundry.com hosts Cloud Foundry software that you can use if you don€™t want to install it locally.

      As of this writing, CloudFoundry.com is in beta and is free for developers to use. So far, the site hasn€™t announced pricing using the site€™s services. Recently, Cloud Foundry released an extension for Eclipse called Cloud Foundry Integration Extension for Eclipse that allows developers to deploy Java applications to their Cloud Foundry account right from within Eclipse. eWEEK Labs tried out the Eclipse extension and found it to be an excellent and necessary tool for Java developers using Cloud Foundry.

      The first thing I did to get started was to sign up with Cloud Foundry by simply going to the site and registering (which only required an email address and nothing more). Soon, I received an email with my registration information, which included a link to download the command-line tools, as well as a link to instructions for installing the extension in Eclipse.

      I purposely skipped the command-line tools, because I was determined to do everything right from within Eclipse, even though I didn€™t know yet if I€™d be able to. The email also said that the first thing that I needed to do was to sign in with the command-line tools and change my password. I wondered if I€™d be able to do that from within Eclipse. (As you€™ll see later, the short answer is that I was indeed able to and didn€™t need the command-line tools at all.)

      Next, I started up the version of Eclipse that I had installed on my computer, which is the current 3.7 €œIndigo€ release. However, I only had the Java edition, whereas Cloud Foundry needs the JEE (Java Enterprise Edition) Web tools. I didn€™t want to download the entire JEE edition of Eclipse, so before proceeding, I installed the additional JEE tools from within Eclipse. I then installed the Cloud Foundry Integration Extension for Eclipse by going to the Eclipse Marketplace right within Eclipse itself and searching for the words €œCloud Foundry€. The extension appeared in the list and I clicked the Install button. After a couple minutes, the extension installed, and Eclipse restarted.

      Next, I had to set up a server. Still inside Eclipse, I followed the instructions the email referred to, which included how to create a new server. There was an option to connect either to a local installation of Cloud Foundry or to a €œMicrocloud,€ which refers to a local Cloud Foundry running inside a VMware player, or to the remote Cloud Foundry servers that I€™d registered with already.

      Deploying Newly Created Apps a Snap

      I chose the Cloud Foundry servers and provided my username and password that I€™d been given in the introductory email. Then a message box popped up to remind me that I needed to change my password, just as the email said I would have to do. But I was able to do it all from within Eclipse, without even installing the command-line tools.

      The next step was to build an actual Web application. I created a new Dynamic Web project in Eclipse, and created a JavaServer Pages (JSP) file called index.jsp, and a servlet file that contained Java code. Neither contained much; the index.jsp file just contained a €œHello Cloud Foundry!€ message with a link called Run Servlet. That link opens the servlet page, which in turn displays a message €œHello Cloud Foundry Servlet.€

      After that, I was pleasantly surprised with the deployment procedure. Typically deploying a Web application in other platforms is a bit of a headache. Tools such as Microsoft Visual Studio include publishing features that are a bit clunky. But here, deployment was a snap. I double-clicked the entry in the Server window for Cloud Foundry, which opened a window containing information about my server (including buttons for connecting, changing password and disconnecting).

      I was already connected, so I didn€™t need to connect again. At the bottom of that window is an Applications tab. I clicked that, which presented me with an empty list box. Then I used the mouse and dragged the project name in the Project Explorer window right onto the list box.

      A window opened asking for the application name (you can change it for the remote server, but I chose not to) and the application type (the options are Spring, Lift, Grails and Java Web). I clicked Next, and it wanted a URL that ends with cloudfoundry.com. I put in €œhellocloudfoundry.cloudfoundry.com.€

      The application uploaded, but I then saw a message that it couldn€™t launch because the name €œhellocloudfoundry€ was already taken. So I right-clicked the application and deleted it from the server and tried again. I went through the same process, but this time chose the name eweek1.cloudfoundry.com. Then I saw a console open at the bottom showing me details of the application starting up.

      But was it really live? I wasn€™t sure, but there was a link next to the list box with my URL, so I clicked it. A Web browser opened inside Eclipse and, lo and behold, there was my index.jsp rendered inside the browser. But just to be sure, I left Eclipse and went to my Chrome browser and put that same URL in. Sure enough, I was looking at my JSP page I€™d created earlier.

      Just Push a Single Button to Update and Restart New Apps

      I clicked the link on the page and realized I€™d made a mistake in the address of the link. I received a 404 error. So I went back to Eclipse and made the change in my index.jsp file.

      Then I wasn€™t sure how to update my change to the server. But once I discovered it, I found that this was the easiest part of the entire deployment process. Next to the application list is an €œUpdate and Restart€ button. I clicked it, and that€™s all. With that single click of a button, my updates got uploaded to the server. I didn€™t have to do anything else. I then refreshed the page in Chrome, did a view-source, and could see my change. Clicking on the link, I saw my €œHello Cloud Foundry Servlet€ message.

      By now, things were going extremely well, except there was one feature missing. I saw in the instructions that in the original deployment, if I€™d chosen a local €œMicrocloud€ running in a VMware Player, I would have remote debugging capabilities. But that option isn€™t there when your application is hosted on the CloudFoundry.com Website as was my case.

      As a professional Web developer, I know that remote debugging is missing from a lot of platforms, or if it€™s present, it doesn€™t work well. So we learn to live without it, debugging locally and using raw creativity and sheer brainpower to figure out what€™s wrong when something doesn€™t work on the server but does locally. But in this case, I was disappointed to see it missing primarily because of a review I wrote for eWEEK three years ago.

      Amazon Web Services has an Eclipse Extension that works very similarly to this Cloud Foundry one. You can create your Java Web application and deploy it to Amazon€™s server€™s right from within Eclipse. And that extension includes remote debugging.

      Nevertheless, I would not use that as a reason to switch away from Cloud Foundry to AWS. Instead, I would recommend using the Cloud Foundry extension, but do your development locally, probably against the free and open-source Tomcat server that you can install on your own machine.

      Or you can even install the Micro Cloud Foundry and debug against that, by setting up two servers from within Eclipse€”one for the local Micro version and one for the remote CloudFoundry.com version. Then, when you€™re ready to deploy, click that one button I was telling you about, and you€™ll be good to go. It works, and it works well. As a result, I definitely give this product a thumbs-up.

      Jeff Cogswell
      Jeff Cogswell
      Jeff Cogswell is the author of Designing Highly Useable Software (http://www.amazon.com/dp/0782143016) among other books and is the owner/operator of CogsMedia Training and Consulting.Currently Jeff is a senior editor with Ziff Davis Enterprise. Prior to joining Ziff, he spent about 15 years as a software engineer, working on Windows and Unix systems, mastering C++, PHP, and ASP.NET development. He has written over a dozen books.

      Get the Free Newsletter!

      Subscribe to Daily Tech Insider for top news, trends & analysis

      Get the Free Newsletter!

      Subscribe to Daily Tech Insider for top news, trends & analysis

      MOST POPULAR ARTICLES

      Artificial Intelligence

      9 Best AI 3D Generators You Need...

      Sam Rinko - June 25, 2024 0
      AI 3D Generators are powerful tools for many different industries. Discover the best AI 3D Generators, and learn which is best for your specific use case.
      Read more
      Cloud

      RingCentral Expands Its Collaboration Platform

      Zeus Kerravala - November 22, 2023 0
      RingCentral adds AI-enabled contact center and hybrid event products to its suite of collaboration services.
      Read more
      Artificial Intelligence

      8 Best AI Data Analytics Software &...

      Aminu Abdullahi - January 18, 2024 0
      Learn the top AI data analytics software to use. Compare AI data analytics solutions & features to make the best choice for your business.
      Read more
      Latest News

      Zeus Kerravala on Networking: Multicloud, 5G, and...

      James Maguire - December 16, 2022 0
      I spoke with Zeus Kerravala, industry analyst at ZK Research, about the rapid changes in enterprise networking, as tech advances and digital transformation prompt...
      Read more
      Video

      Datadog President Amit Agarwal on Trends in...

      James Maguire - November 11, 2022 0
      I spoke with Amit Agarwal, President of Datadog, about infrastructure observability, from current trends to key challenges to the future of this rapidly growing...
      Read more
      Logo

      eWeek has the latest technology news and analysis, buying guides, and product reviews for IT professionals and technology buyers. The site’s focus is on innovative solutions and covering in-depth technical content. eWeek stays on the cutting edge of technology news and IT trends through interviews and expert analysis. Gain insight from top innovators and thought leaders in the fields of IT, business, enterprise software, startups, and more.

      Facebook
      Linkedin
      RSS
      Twitter
      Youtube

      Advertisers

      Advertise with TechnologyAdvice on eWeek and our other IT-focused platforms.

      Advertise with Us

      Menu

      • About eWeek
      • Subscribe to our Newsletter
      • Latest News

      Our Brands

      • Privacy Policy
      • Terms
      • About
      • Contact
      • Advertise
      • Sitemap
      • California – Do Not Sell My Information

      Property of TechnologyAdvice.
      © 2024 TechnologyAdvice. All Rights Reserved

      Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.

      ×