Container orchestration is at the heart of a successful container architecture. Orchestration takes as input a definition of how a deployed application should look. This usually includes how many containers for a certain image are needed, volumes for persistent data, networking for communication between containers and awareness of various discovery mechanisms. Discovery may include such things as identifying other containers which are also participating with the application or how to access services required by the running containers. Here’s a high level view. Infrastructure Containers need infrastructure to run. Both virtual and physical infrastructure......
Continue Reading
This post builds on the discussion of Managed Services in CloudFoundry and covers the first of the two methods for using unmanaged services in CloudFoundry. It makes use of the Python echo service and Python service broker API implementation used previously. Manually provision the service This method assumes that an existing service has been provisioned outside of CloudFoundry. An instance of the echo service can be manually provisioned using cURL using the following commands. In this example, a new instance is provisioned with the id user-service-instance and bound to an app with id......
Continue Reading
CloudFoundry defines a Service Broker API which can be implemented and added to a CloudFoundry installation to provide managed services for apps. In order to better understand the way managed services are created and integrated with CloudFoundry (and derivative technologies like Stackato and HP Helion Development Platform), I created an example service and implemented the Service Broker API to manage it. The code for both implementations are on github. https://github.com/dwatrous/cf-echo-service https://github.com/dwatrous/cf-service-broker-python Deploy the services For this exercise I deployed bosh-lite on my Windows 7 laptop. I then follow the documented procedure to push......
Continue Reading
CloudFoundry, Stackato and Helion Development Platform accommodate (and encourage) external services for persistent application needs. The types of services include relational databases, like MySQL or PostgreSQL, NoSQL datastores, like MongoDB, messaging services like RabbitMQ and even cache technologies like Redis and Memcached. In each case, connection details, such as a URL, PORT and credentials, are maintained by the cloud controller and injected into the environment of new application instances. Injection It’s important to understand that regardless of how the cloud controller receives details about the service, the process of getting those details to......
Continue Reading
I have observed that discussions about CloudFoundry often lack accurate context. Some questions I get that indicate context is missing include: What Java version does CloudFoundry support? What database products/versions are available How can I access the server directly? There are a few reasons that the questions above are not relevant for CloudFoundry (or any modern PaaS environment). To understand why, it’s important to understand how we got to PaaS and where we came from. Landscape When computers were first becoming a common requirement for the enterprise, most applications were monolithic. All applicaiton......
Continue Reading
It’s possible to add a custom buildpack to Stackato or Helion Development Platform so that it’s available to all applications. When using an installed buildpack it is not necessary to include a manifest or identify the buildpack. Instead it will be selected by the detect script in the buildpack. All files are on the cloud controller node which eliminates download time and bandwidth. Package the buildpack Prepare your buildpack for installation by adding all files to a zip file (of any name). The bin folder should be in the root of the zip......
Continue Reading
In the past PaaS has been rigid and invasive for application developers. CloudFoundry aims to change that perception of PaaS with the use of Buildpacks. A Buildpack allows an application developer to define his deployment environment in plain text. Some refer to this as infrastructure as code since the aspects of a deployment environment that were previously handled by system administrators on dedicated servers now exist in plain text alongside the application files. What’s available out-of-the-box? Before diving into custom buildpacks, a lot of people will ask “What is available out-of-the-box with CloudFoundry?”.......
Continue Reading
Previously I detailed the process to create a buildpack for Stackato or Helion, including reconfiguring the buildpack to be self-contained. In both previous examples, the compile script performed a configure and make on source to build the binaries for the application. Since the configure->make process is often slow, this can be done once and the binaries added to the git repository for the buildpack. Pre-compile nginx The first step is to build nginx to run in the docker container for Stackato or Helion. These steps were previously in the compile script, but now......
Continue Reading
I previously documented the process to create a buildpack for nginx to use with Stackato or Helion Dev Platform. In that buildpack example, the compile script would download the nginx source using wget. In some cases, the time, bandwidth or access required to download external resources may be undesirable. In those cases the buildpack can be adjusted to work offline by adding the external resources to the git repository. The new structure would look like this. Updated compile script The only bulidpack related file that would need to change to accommodate this is......
Continue Reading
CloudFoundry accommodates buildpacks which define a deployment environment. A buildpack is distinct from an application and provides everything the application needs to run, including web server, language runtime, libraries, etc. The most basic structure for a buildpack requires three files inside a directory named bin. The buildpack files discussed in this post can be cloned or forked at https://github.com/dwatrous/buildpack-nginx Some quick points about these buildpack files All three files must be executable via bash Can be shell scripts or any language that can be invoked using bash Explicit use of paths recommended detect......
Continue Reading