Cloud hosting platform is nowadays a broadly used concept. A couple of months ago, while looking for a comprehensive solution for CI/CD pipeline and we have discovered Pivotal Cloud Foundry. As some of our friends have asked us for more details about using Pivotal, we have decided to write this article containing some of the most common questions. In a further article, we will show you a great solution found by our DevOps to run Drupal 8 inside PCF.
What is Pivotal Cloud Foundry?
Pivotal Cloud Foundry is an open-source PaaS (Platform as a service). The ready to use cloud computing platform can be used to run, deploy and build applications, making it a great solution for digital companies everywhere. The platform is licensed under Apache 2.0, but it can support some of the most used programming languages out there. Our personal favorites are PHP, Java, and Node.js, but it can also support Ruby and Go (some of the languages in which the platform was written), as well as Python or .NET. You can run PCF inside Amazon or on top of your own stack running OpenStack. In short, with PCF you can run your own Drupal (&more) hosting cloud on the Amazon stack.
Why using Pivotal Cloud Foundry?
Previously we’ve used and still use, dedicated Drupal cloud hosting platforms. These are more than ok for your development needs and hosting your production projects. However, we’ve found out that with PCF you can have most of the same features under your own cloud and have a better control of the resources that are allocated to your projects.
First of all, PCF can run entirely on your own cloud (Amazon being the simplest option or your own OpenStack). This makes things easier to secure as you control entirely the access to your services and the location of your data. You can also control easily the performance of the VMs that are allocated to your cloud.
PCF allows you to run your own authentication/authorization system connected to your wider company-level system.
PCF also allows you to run more types of applications (other than Drupal, NodeJS) and has a unified approach for CI/CD pipeline across all projects.
PCF enables you to control your CI pipeline and customize your unit tests in an easy way. While we’ve found all the other Drupal cloud platforms to offer nowadays ability to run CI tests easily, we found PCF just as easy to use and configure for CI tests.
Most of the Drupal cloud platforms make use of their own template. Some of the providers have more flexibility, some less. Nevertheless, we found the PCF template for Drupal 8 as easy to use as the other platforms. Furthermore, since you can control the whole stack and the PCF is actually your own private cloud, you can publish easier custom configuration for Drupal and the Apache stack.
In the case of Drupal projects, we’ve made it easy to connect your private files folder to an S3 bucket. Since this is running on our own Amazon cloud, it is easier to control the access, the location and the costs of our S3 buckets.
We’ve created a Drupal 8 template for PCF that makes use of a composer so that each time you deploy your project, your Drupal core & modules are completely recreated adding security to your development practice.
Why not using Drupal with Pivotal Cloud Foundry?
Nowadays, the Drupal cloud hosting platforms offers some functionality that is not currently available on PCF, or we haven’t managed to configure it. I will highlight two important ones:
- Automatic deployment of frontend caching (such as Varnish) for Dev & Staging environments
- GUI to manage and install SSL certificates for your URLs.
- Auto-scaling: while auto-scaling is possible in theory, we haven’t yet addressed this feature
What about the costs of running PCF?
In a minimum configuration (2 instances for any cloud service), PCF running costs are for about 800$-1000$/month for around 10 projects with 3 environments (30 environments). A much more powerful and redundant architecture (3 instances for any cloud services) and about 30-50 environment, we reckon will costs you about 1600$ to 2000$/month. These are not small money, however, consider that this is not something that a small Drupal agency would run or even need to run. In this regard, Drupal hosting clouds are a much better choice.
Deploy Drupal to Pivotal Cloud Foundry
Pivotal features a PHP runtime connected to a web server, a relational database, and a storage system for generated or uploaded assets. This makes the initial preparation steps relatively simple when it comes to Drupal. If you want to deploy another PaaS (other than Cloud Foundry that is) you may need to have these three components sorted out before proceeding with the actual installation.
Pivotal offers a great documentation on the subject-matter (available for Drupal 7), so you may want to check it out. Attention, as the documentation is available only for Drupal 7. You will surely notice that when it comes to deploying Drupal 8, the situation will be quite different, as you will see in a future article.
If you still have doubts about going with Pivotal, please address them. Maybe we can help with some info, or with a piece of information, although the info will sure be on the Pivotal website.
Also read: Pivotal Cloud Foundry for Drupal 8