.NET on Cloud Foundry, Part 1: Installing on Windows and Using Iron Foundry

by Alex MakarenkoJuly 17, 2014
Learn what problems you may encounter while installing Cloud Foundry on Windowns and how ironfoundry.me can come to rescue.

Part 1 | Part 2 | Part 3

Creating .NET apps with Iron Foundry

PaaS has revolutionized the way applications are developed and deployed. With reduced delivery cycles and full automation, PaaS users can reach the market faster, significantly improving ROI and time-to-revenue. Cloud Foundry is one of the most popular open-source solutions for enterprises.

Until recently, .NET developers—who constitute a large part of software delivery folks—had rather limited access to Cloud Foundry’s services. The Iron Foundry project has corrected this imbalance by providing support for .NET on Cloud Foundry. It is not merely an extension, but an entire collection of tools and services .NET developers are used to working with, e.g. MS SQL and Message Bus-as-a-Service. These services can be bound to applications, so you do not have to worry about infrastructure and maintenance.

This post starts a series that will explore the capabilities of Iron Foundry. To show you how this platform works and try its services in action, we are going to create a validation prototype using a mixture of .NET and Node.js. We will rely on the cloud-first approach in our investigation on how application interaction, management, and deployment are implemented in this platform. By the end of the series, you will learn everything you need to know about creating .NET apps on Iron Foundry.

 

Installing Cloud Foundry on Windows: failed

The standard Cloud Foundry edition supports a great variety of programming languages and operating systems, but Windows is not on that list, unfortunately. Still, it does not mean you cannot use this PaaS on Windows machines. In this post, we will share our experience of integrating Cloud Foundry with Iron Foundry, an open-source framework for running .NET applications.

Although, we had never installed Cloud Foundry on Windows before creating this post, we knew that—in theory—it could be done with BOSH-lite. Once the PaaS is installed, you can add DEA and Warden components from Iron Foundry. If you choose this way and use Cygwin, you will also have to install Ruby, Python, and Go to enable compilation of components locally.

However, the reality was not as simple. In the beginning, we were rather excited by the idea of deploying a local cloud, but something went wrong at the end of the installation. We got a “Package is corrupted” error, which means that uploading Cloud Foundry packages failed. We tried different releases, but it seems the BOSH CLI has a bug specific to the Windows environment. Hopefully, this will be fixed very soon.

We recorded the installation process, which you can check out in a two-minute video with all the commands below.

So, we were only two steps away from finishing the installation: generating a manifest and deployment. We are sure that a solution will be available in the coming months. For now, we will try to deploy Cloud Foundry on another platform or use Iron Foundry’s virtual machines.

 

Kubernetes-Training-Courses

ironfoundry.me

Since we didn’t manage to install Iron Foundry on my local machine, we decided to use , a publicly available sandbox for developers that enables to explore and interact with Iron Foundry on top of a full-featured Cloud Foundry v2 installation.

Iron Foundry allows for running web applications via the IIS Hostable Web Core and executing console applications. Remember, if you are working with console apps, you should name them app.exe, since it was the only name supported when we were writing this post.

Since we were going to run console applications for the background operations, we were more than pleased with the capabilities of the ironfoundry.me service. Creating Windows services was not our goal, that is why we didn’t feel upset by the fact that Iron Foundry does not support them for now, but hopefully, this feature will be added very soon. Anyway, a Windows service is just a method of running some components in Iron Foundry that is enabled via console apps.

To work with Cloud Foundry or Iron Foundry, we downloaded a command line interface (read more about it in the official docs). So, now it’s time to see what services are available on Iron Foundry.

A list of free Iron Foundry services

As you can see, Iron Foundry supports MS SQL and MongoDB. Of course this list will be extended as adding new services does not affect Iron Foundry operation. To be honest, we were expecting to see Message Bus or RabbitMQ, but unfortunately currently there are no message exchange services on ironfoundry.me. This was important for our application, because its background workers were to talk to each other. However, this is not a big deal, and we will be able to avoid this limitation by using MongoDB’s capped collections or some other online messaging services.

 

Further reading


This series was written by Alex Makarenko; edited by Volha Kurylionak and Alex Khizhniak.
Get an ultimate architect's guide to understand what you need for a successful Cloud Foundry implementation
  •  
  •  
  •