On-premises Serverless with Backand and KubernetesPosted by Itay Herskovits on Nov 21, 2017
Projects like kubeless.io and FnProject give you a lot of flexibility when working with serverless functions. Coupled with Kubernetes, you can easily build a FaaS offering for your IT organization that can scale as needed within the secure confines of your organization’s technology infrastructure. However, if you’re looking to build a fully serverless application, local access to a FaaS install is only a step along that path. This is where Backand comes in. Backand lets you build an on-premises serverless platform, letting you embrace serverless development on your own terms. In this post, we’ll look at some strategies you can use to build out your organization’s serverless platform with Backand, providing you with a full suite of serverless capabilities built on a tech stack managed internally.
The Shortcomings of FaaS-Only
While an on-premises serverless stack provides a powerful resource that meets your security standards while leveraging your existing IT infrastructure, a platform with only support for serverless functions is lacking in several vital components for fully serverless applications. The first is file storage – many serverless applications require data storage and processing capabilities, and as such a fully-serverless platform on-premises needs to also have support for some kind of cloud storage. While a database server will generally be a stand-alone machine or cluster, you’ll need to devise a way to get your database talking with your serverless functions if you want to have a robust, non-trivial web application. Finally, to complete our platform, we’ll need solutions for any of the other bits of functionality considered standard in a web application – logging, routing, and hosting, for example, are vital to a production-ready web app. In order to address these shortcomings of an FaaS-only approach, we’ll look at a couple technologies we can use to create an on-premises serverless development platform.
Building a Serverless Platform with Backand and Minio
While serverless functions are phenomenal for reducing IT support needs for bits of common functionality, they are not in themselves a sufficient platform for building web applications. You’ll need to build out a platform to tie your serverless functionality together. To manage this, you’ll need both storage mechanisms and a platform to manage your full suite of technology assets.
We’ll address these shortcomings in two parts. The first involves installing Minio, and AWS S3-compatible cloud storage solution built to run on your local stack using Docker and Kubernetes. By using Minio, you gain access to localized file storage with similar operability to S3, allowing you to store these files within the secure confines of your organization’s network. Furthermore, as Minio’s API is S3-compatible, you can easily leverage the same tools you use for your Minio install on a live solution built on top of S3, giving your developers the power to switch between online and offline paradigms as necessary.
While the above has given us an interface for functionality, and a full cloud storage solution deployed within your trusted IT stack, we’re just about ready to provide internal developers with a fully-functional serverless environment. The final piece is a local install of Backand. The team at Backand has been working hard on containerizing and operationalizing our revolutionary ORM and security architectures, allowing you to use a local install of Backand as the platform that can unify all of your stack’s serverless technologies into a single, easy-to-use interface. Built on top of Docker and Kubernetes, Backand has all of the hooks necessary to tie into local database instances, local FaaS installations, and your local Minio host, providing your organization with a full on-premises serverless platform that can be guaranteed to meet your organization’s security and availability needs.
Exploring Use Cases
One of the challenges with serverless platforms is in identifying how to fit the technology approach into a larger development organization.To help with this, we’ve explored several use cases for on-premises serverless support. These focus on several different problem areas: cost, security, and resiliency. If you’d like us to explore additional use cases, please don’t hesitate to contact us at firstname.lastname@example.org.
Full On-Premises Serverless
One of the common complaints leveled against serverless function providers is that you have no control over the security of your functions as they run. Google, Microsoft, Amazon, Oracle, and others have an impressive track record when it comes to security, and have ingrained best practices that reduce risk and mitigate attacks, but these security requirements may not meet the standards of your organization. Using a fully on-site serverless solution, you can rest assured that you have full control over your application’s serverless platform, securing the product to the standards demanded by your organization.
Increasing Resiliency with an Internal Fallback
Despite the massive resources of large tech organizations offering serverless platforms, problems still occur from time to time. In a traditional provider-hosted approach, such as a tech stack built entirely on top of AWS, when these outages occur you are left with a non-functional application and angry users. With Backand, Minio, and your on-site FaaS solution of choice, you can easily recover from a failure of a major service provider, using your own technology stack as a fallback. Simply adjust a configuration setting, and your application’s can switch instantaneously from running against your cloud provider’s solution to running against your own local installation. Couple this with data retention policies, regular backups, and a slave environment that tracks the main production environment as closely as possible, and these transitions can be nearly seamless.
Using a Serverless Install for Smoke Testing
With FnProject, Minio, and Backand all operating in a fully containerized solution, you now have the capability to fully replicate your tech stack both quickly and at low expense. Leveraging the flexibility of these technologies lets you build a development environment that mirrors your production environment almost exactly. As the underlying technologies are server-agnostic, running in a containerized ecosystem, you can install your full tech stack anywhere. This makes creating a smoke test environment a snap, and gives your developers the added peace of mind of knowing that the production environment their code runs on will share the same characteristics as their local testing environment.
Quick White-label Development
One of the advantages of a containerized approach to application development is the ease with which you can deploy an entire platform. This gives you the capability to quickly and easily deploy your application in a number of different environments. This approach can greatly benefit software resellers, allowing you to provide a fully-functional, fully-customizable solution that can be deployed in seconds on any appropriate tech stack. If you couple this with a conscious approach to configurability in your application development, you can quickly develop an application that can be rapidly switched to a different look and feel simply through the replacement of art and localization assets. This gives you the capability to provide an easy white-label resale solution, allowing your customers to brand your application to their desires, and enhancing the attractiveness of your product to potential sales opportunities.
With a fully-containerized stack, your application has a lot of flexibility when it comes to physical hosting location. By building a local serverless platform on top of Minio and a FaaS solution like OpenFaas, FnProject and kubeless.io, you can expand that flexibility to also include your organization’s internal IT infrastructure. This gives you all of the flexibility and benefit of a cloud architecture, while still giving you the capability to secure and protect assets to your exacting standards. With Backand, your platform can be responsive, highly-scalable, secure, and most importantly it can integrate deeply with the rest of your technology stack, letting your organization embrace serverless development on your own terms.