In a previous post, (Ansible Vs Terraform) we’ve seen how Terraform and Ansible are command-line-oriented tools that are complimentary, rather than adversarial, when it comes to capability.
It’s pretty safe to say that lifecycle management of infrastructure lends itself to a Terraform declarative approach, whereas the imperative approach of Ansible is better suited to management configuration because of its customizability.
Cloudify’s Ansible integration
Cloudify’s Ansible plugin enables the configuration of Cloudify resources with Ansible and provides an ‘agentless’ method for executing operations on hosts.
Cloudify Ansible Plugin Integration
Playbook Run Operation
Similar to Cloudify’s Script and Fabric Plugins, there are no node types associated with the Ansible plugin. Instead, you modify existing node types to perform one or more of their lifecycle operations using the Ansible plugin and any additional inputs that provided.
Cloudify’s Terraform Integration
Cloudify’s Terraform plugin enables the user to maintain a Terraform plan state via Cloudify and also allows the user to employ Terraform resources within Cloudify blueprints.
Cloudify Terraform Plugin Integration
Cloudify’s Terraform integration includes:
- Integration & installation of Terraform binary and modules
- Parameters & secret management – passing inputs to modules through Cloudify secrets and input
- Log aggregation – indexing all logs under a common log trail
- Passing Terraform state properties to other services via Cloudify Capabilities : save and share Terraform state properties (IP, tags,..) implicitly with other non-Terraform services via a service relationship
- Refreshing Terraform State (State Pull)
- Terraform binary and modules installation
- Reloading of Terraform Template – updating Terraform state from updated templates
- Configuration Management – configuration of the application infrastructure using Fabric, Ansible, Agent-based methods
- Full Life Cycle Management – management of Terraform installation and uninstallation as part of end-to-end service automation
Terraform & Ansible: Together as a Single Scale Unit
Using Cloudify as the ‘Orchestrator of Orchestrators’, which manages and controls multiple domains, combines both Terraform for infrastructure orchestration and Ansible for application setup and configuration.
The demo below reveals how Cloudify decouples environment and application, first creating EaaS ( Environment as a service) within an AWS infrastructure and then installing the application and configuring it.
During the demo, you can see how Cloudify manages both Terraform & Ansible as first-class citizens, with full lifecycle management and visibility for both tools.
Using Cloudify as an end-to-end orchestration for two siloed platforms, we create interoperability between the platforms using consistent workflows and passing runtime values between domains.
Dynamic elasticity and resizing is one of the major necessities for multi-cloud environments, and talking scale, it must be an integral part of the overall solution. Decommissioning the environment is also part of the same end to end automation, allowing users to decommission all resources in one go, and thus saving costs by quickly and easily removing environments that are no longer in use
Putting Terraform and Ansible together as a scaling unit