<<

Cloud Foundry on the Nebula Infrastructure: Reference Architecture + Deployment Guide

A step-by-step guide on installing the Foundry PaaS on Nebula, a turn-key solution for a distributed infrastructure By Alexey Makarevich, DevOps Engineer at Altoros

Q4 2014

Table of Contents

1. EXECUTIVE SUMMARY ...... 3

2. INTENDED AUDIENCE ...... 3

3. REFERENCE ARCHITECTURE FOR ON NEBULA ...... 3

4. DEPLOYMENT GUIDE ...... 5

5. SUMMARY ...... 6

6. ABOUT THE AUTHOR ...... 7

[email protected] +1 (650) 265-2266 Schedule a demo 2 www.altoros.com | twitter.com/altoros of CF on Nebula!

1. Executive Summary

The Cloud Foundry PaaS can be deployed on a variety of IaaS systems to create powerful self- service solutions for automated app deployment. However, you need to know how to select appropriate hardware and set up OpenStack or another infrastructure. Even if you do have the expertise, deploying and adapting an IaaS to work with Cloud Foundry is not easy.

Turn-key solutions, such as Nebula, are designed for those who want to minimize deployment expenses and get a working system with a user-friendly interface in hours, not days. In addition to a cloud solution complete with hardware and IaaS, customers also get support and other managed services. Finally, ready-to-use products, such as Nebula, have been tested and are generally more stable than most open source options.

This document provides guidance on deploying Cloud Foundry on Nebula with a specific selected set of hardware components. It describes the steps necessary to successfully create a Cloud Foundry cluster with eight VMs that may be scaled to a larger size with additional DEA compute nodes. The paper also includes a reference architecture diagram for the Cloud Foundry cluster and recommended VM sizing for clusters on Nebula OpenStack.

2. Intended Audience

To be successful with this guide, we assume that:

● you are familiar with OpenStack, the distribution of , and ● you know how to administer and configure multiple Linux machines for networking

The guide describes how to install Cloud Foundry on your Nebula infrastructure. So, the main requirement is that your cloud must be available and operating normally. Below is the list of components you will need for installation:

1. The BOSH Command Line Interface (Please note that it requires the latest version of Ruby.) 2. MicroBOSH 3. A BOSH Stemcell 4. The Cloud Foundry PaaS

Note: This tutorial was created for Cloud Foundry v153. We used hosted Nebula IaaS, but the process should be identical if you want to install the open source version (OpenNebula) on your private cloud.

3. Reference Architecture for Cloud Foundry on Nebula

The reference architecture described in this document consists of 10 virtual machines:

[email protected] +1 (650) 265-2266 Schedule a demo 3 www.altoros.com | twitter.com/altoros of CF on Nebula!

● eight VMs with Cloud Foundry ● one VM for BOSH Director ● eight VM for BOSH Deployer

The diagram below outlines its major components and the process of installation.

Figure 1. Reference Architecture: Cloud Foundry on Nebula

Prerequisites

The table below outlines the infrastructure necessary to successfully deploy Cloud Foundry using this guide.

Table 1: Infrastructure for deploying a CF cluster of eight nodes on Nebula Cloud Foundry Component # of VMs Type of VM

Router 1 n1.medium

OAuth2 (UAA), Login Server 1 n1.medium

Cloud Controller 1 n1.medium

Health Manager 1 n1.medium

Application Execution (DEA) 2 n1.large

Cloud 1 n1.medium

Message Bus (NATS) 1 n1.medium

Log Aggregator 1 n1.medium

[email protected] +1 (650) 265-2266 Schedule a demo 4 www.altoros.com | twitter.com/altoros of CF on Nebula!

4. Deployment Guide

Deploying Cloud Foundry on Nebula is similar to deploying it on OpenStack. Still, when modifying the BOSH CLI, you need to take into account the differences in accepted names of instances, disk images, networks, security groups, instance types, etc. Nebula API end-points are also different, as well as some of the ports.

It may take several days to prepare everything: check how BOSH CLI and CF work on Nebula, modify the BOSH Bootstrap and BOSH Cloud Foundry gems, and take into account all the differences. However, the actual deployment takes around 3–4 hours; and this is how long it should take, if you follow the instructions below:

1) Deploy a Linux VM (preferably Ubuntu 12.04 or 14.04) using the Web UI.

Figure 2. The Web UI for Nebula

2) Install Ruby 1.93:

\curl -sSL https://get.rvm.io | source /home/ubuntu/.rvm/scripts/rvm sudo apt-get update && sudo apt-get install libxslt1-dev libxml2-dev libmysqlclient-dev libpq-dev mc git rvm install 1.9.3

3) Install the required gems from GemStore:

[email protected] +1 (650) 265-2266 Schedule a demo 5 www.altoros.com | twitter.com/altoros of CF on Nebula!

gem install fog -bootstrap --no-ri --no-rdoc gem install bosh_cli_plugin_micro --pre --no-ri --no-rdoc gem install bosh_cli -v "~> 1.5.0.pre" --source https://s3.amazonaws.com/bosh-jenkins-gems/ --no-ri --no-rdoc gem install bosh-cloudfoundry

4) Run bosh-bootstrap deploy and create a deployment manifest for microBOSH.

5) Target your installation at microBOSH once it has been deployed.

bosh -u admin -p admin target https://192.168.113.5:25555 bosh -u admin -p admin create user bosh login bosh upload stemcell .microbosh/deployments/firstbosh/bosh-stemcell-latest- -kvm-ubuntu.tgz

6) Create a sample Cloud Foundry deployment manifest using bosh prepare cf and bosh create cf. You can download the deployment.yml we used for this reference architecture here.

7) Finally, set up CF CLI tools on your local machine after installation and test installation are finished.

wget http://go-cli.s3-website-us-east-1.amazonaws.com/releases/v6.1.2/cf- cli_amd64.deb sudo dpkg -i cf-cli_amd64.deb

Now you should have your own Cloud Foundry PaaS up and running on the Nebula infrastructure.

5. Summary

In general, installing a CF template on Nebula is rather fast. The system is stable and we did not encounter major issues. So, after understanding and walking through the steps described, you should have a small working Cloud Foundry cluster that can be scaled by adding Cloud Foundry DEA nodes.

Being a turn-key solution with pre-configured hardware and OpenStack, Nebula provides powerful, dense compute and storage capabilities via the servers we have selected for this reference architecture. Using it can save you a considerable amount of time.

Naturally, Cloud Foundry is a complex suite of software that may be configured in many different ways: e.g., you may want to get better availability, increase redundancy, etc. This reference architecture provides a baseline for implementation and can serve as a functional environment for many workloads.

To learn more about the individual components and architectural choices available when setting up and running Cloud Foundry, visit our blog or the official Cloud Foundry documentation. To schedule a demo of CF on Nebula, contact us at [email protected].

[email protected] +1 (650) 265-2266 Schedule a demo 6 www.altoros.com | twitter.com/altoros of CF on Nebula!

6. About the Author

Alexey Makarevich is an Infrastructure Engineer at Altoros with 10+ years of experience in system administration. He is an expert in Cloud Foundry deployment, specializing in complex cloud infrastructures based on OpenStack (and its distributions), CloudStack, and other IaaS systems.

Altoros brings Cloud Foundry-based “software factories” and NoSQL-driven “data lakes” into organizations through training, deployment, and integration. With 250+ employees across 9 countries in Europe and Americas, Altoros is the company behind some of the world’s largest Cloud Foundry deployments. For more, please visit www.altoros.com or follow @altoros.

[email protected] +1 (650) 265-2266 Schedule a demo 7 www.altoros.com | twitter.com/altoros of CF on Nebula!

Featured: A Production-grade Cloud Foundry Deployment

 By integrating solutions offered by the Cloud Foundry ecosystem, Altoros continuously perfects delivery and operation of “software assembly lines” for its customers.

 We understand the difference between success and failure in implementing Cloud Foundry at large enterprises, including those in highly regulated industries.

 As a result, Altoros’s customers discover and monetize application-driven competitive advantages sooner than competition. They get turn-key, managed ”software factories” and “data lakes” using best-of-breed solutions developed by members of the Cloud Foundry ecosystem.

 Altoros is proud to be behind some of the largest Cloud Foundry implementations in the world.

Customers:

Partners:

[email protected] +1 (650) 265-2266 Schedule a demo 8 www.altoros.com | twitter.com/altoros of CF on Nebula!