Terraform vs. Cloudify; How they compare
There are many tools in the marketplace to perform automation. There are many ways to break down the types of automation, whether it’s imperative versus declarative, or orchestration versus desired configuration state. Orchestration tools are extremely popular for many reasons: they are usually fast to get moving, they deploy quickly and easily, and they can typically manage automated stand-up and configuration from start to finish.
In this post, we will review the strengths and use cases for two orchestrators: HashiCorp’s Terraform, and Cloudify. Both have a powerful and multi-faceted ability to fully manage diversified landscapes across multiple cloud providers.
Terraform provides support for a diverse list of providers. This means you can get up and running with basic configurations on major cloud platforms such as AWS, Azure, Google, and Oracle; it also works with others, such as Digital Ocean, VMware, and VSphere. Terraform offers compatibility with popular provisioners like Rancher, Docker, Kubernetes, and OpsGenie, or even services like Cloudflare.
Using HCL configuration files, Terraform can manage entire buildouts in a state file (tfstate). This state file allows Terraform to create, destroy, and modify components idempotently in a dependency understood methodology.
Easy to Get Started
Terraform’s HCL is similar in nature to most YAML-like configurations with plenty of examples in its documentation as well as online articles. You can quickly create a few instances, a VPC, or an entire stack. The language is constructed so referencing other created items can be done dynamically, rather than having to create resources in stages.
There is also a fast evaluation of your managed environment and then deciding additions, deletions, resource cycling, and updates. Using resource imports. Terraform manually deploys created resources into management. This provides the ability to retrofit an existing environment or stacks into code. The API is lightweight for smaller to mid-sized deployments.
Terraform is a binary, not an installed agent. It can be run from servers or laptops. It appeals to DevOps shops for performing ad-hoc changes and full deployments far quicker than full-scale server/agent systems with supporting architecture, such as a Chef server. Even though Terraform state management is challenging, there are multiple strategies available such as the Amazon S3 remote state.
Wide Adoption (and Open Source)
There is broad market adoption of Terraform. Terraform requires a much lighter lift to get changes into production compared to some of its competitors. Many organizations choose Terraform to create scaffolding for infrastructure. Some use it for server provisioning, or even to deploy Kubernetes nodes.
Full-Scale Service Orchestration
The beauty of Cloudify is that it can be used to deploy a web server, an application ecosystem, or an entire environment. By creating blueprints, the application allows you to deploy and reuse entire configurations without having to DRY your code.
Blueprints allow for dependable and repeatable configurations for entire stacks, but there are additional hooks here that take some of the design lift out of code. These lifts allow you to auto heal, scale up or down on actions, and collapse and deploy environments with ease. There is no need for state management, or for building in lifecycle actions. This allows customers to either fully automate deployments, or inject strict governance into the lifecycle—something required by many enterprise customers.
Controlled Operations as Code or GUI
Most orchestrators are fully CLI based, or offer very limited GUI operations. Cloudify offers a rich experience for both. Whether you want to configure blueprints that are fully TOSCA-compliant or manage blueprints and deployments through the Cloudify portal, both options are available. This makes the Cloudify orchestrator more adaptable than Terraform.
A distinct advantage here is that Cloudify enables you to one-click your way through architectural relationship diagrams. For simple server-to-database models, this isn’t so important. But when you consider entire ecosystems, the connecting tissue is not so obvious from code observation alone.
While the overview screens of a deployment give a lot of relevant information about the deployed systems, a focal point is the list of configuration code and its dependencies. Unlike other orchestrators where you have to pass through multiple files to dive through configs, Cloudify’s UI allows you easily click and see dependencies, and actual server/app level configs and their dependency chains in one pane of glass.
Manage All Sizes of Environments – Scales With Business
Because Cloudify handles calls, error handling, and provider connections (even Terraform) through Cloudify Plugins, it assists in the provisioning of even large-scale environments. Blueprints are reusable for one or 10 deployments in a region, or across 10 regions. This means that blueprints can be written for simple greenfield applications. They can also be easily expanded to deploy additional and/or larger environments without having to redesign your deployment architecture.
Deployment of Terraform – Use Cases
Stacks and Environments
Terraform deployment shines when it manages stacks or environments. Ever since Terraform released modules and additional open-source tools such as Terragrunt came into play, Terraform has become even easier to use to create entire environments that can be managed from a single state file.
Creating Terraform stacks for lab, POC, and testing environments is fantastic considering the ease and speed of deployment. Since Terraform is already very good at understanding resource dependencies and allows for customizable dependencies, stacks can be created with confidence rather than having to manually handle the orchestration.
Small to Large
The more an environment grows, the more difficult it gets to DRY out Terraform code. Also, evaluating very large environments can be a slow process, not to mention dangerous if not planned correctly. As the environment grows larger, it’s best to design sections of your environment as small chunks of managed state files. This will help control potential changes, keep compilation of changes shorter, and make it easier to manage multiple changes.
Fully Cloud Native
Terraform really shines when it is managing stacks utilizing statelessness, such as auto-scaling groups, lambda functions, and network resources. It’s better to avoid having Terraform manage individual stateful instances or volumes because it can easily destroy resources.
Cloudify Use Cases
Given Cloudify’s ability to manage large deployments in a graphical and codified way, it provides the greatest value when showing dependencies and managing those dependencies in a seamless method. Instead of having deployments such as “Web frontend” or “Mongo Cluster,” blueprints can better resemble “ERP system,” or “BI Solution.”
Cloudify is TOSCA compliant and is designed to provide end-to-end orchestration. This cradle-to-grave construct means that users can deploy an environment and manage that environment through Cloudify until decommission. This provides enterprise customers change management, auditing, and provisioning capabilities to control deployments of interdependent resources through their entire lifecycle.
Small to Very Large
Blueprints can be a single component or mixed ecosystems containing thousands of servers. Since the API handles the calls and regulates the deployment of resources, it removes some of the design burdens for very large constructs. Cloudify’s portal allows the user to gain quick insights across all deployments or individual deployments without the additional implementation of logging and metrics. In large environments, this is critical.
On-Prem to Cloud Native
Cloudify’s premium features are targeted for enterprises, whether they are more on-premises focused, or multi-cloud. Since cloud plugins handle a lot of the provisioning, DevOps coders need only focus on blueprints and handle consistent deployments across different mediums through Cloudify APIs. This helps to enable mixed environments, and migrations to the cloud using a common language.
There are many automation tools in the industry. Knowing the right tool and when to use it can be critical. Orchestration is a popular method of automation, and for good reason. It reduces the amount of complex step-by-steps that would require maintaining tremendous know-how, runbooks, and tribal knowledge in a much faster, repeatable, and scalable way. When researching your orchestration needs, consider the deep and powerful toolsets Cloudify has to offer for companies ranging from open-source startups to full-fledged enterprises. Request a Cloudify demo or get started in just a few minutes with Cloudify Community.