You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by Mike Zaccardo <mi...@cloudsoftcorp.com> on 2015/08/10 21:16:06 UTC

[PROPOSAL] Brooklyn Terraform Support

Hi all,

I will be adding basic Terraform support to Brooklyn soon. Below is an
overview of the Terraform tool itself, as well as the Brooklyn entity to be
created. Any thoughts / feedback would be greatly appreciated. Thanks!

-Mike

----------------------------------------------------------------------------------------------------------------------------------
Overview

A new open source project titled “brooklyn-terraform” will add basic
support for deploying and managing Terraform configuration files in
Brooklyn. This document describes Terraform at a high level and provides a
specification for the Brooklyn Terraform entity to be created.


Terraform High Level Overview

The following are excerpts from a high-level description of Terraform from
the official website <https://terraform.io/intro/index.html>.



Terraform is a tool for building, changing, and versioning infrastructure
safely and efficiently.



Configuration files describe to Terraform the components needed to run a
single application or your entire datacenter. Terraform generates an
execution plan describing what it will do to reach the desired state, and
then executes it to build the described infrastructure. As the
configuration changes, Terraform is able to determine what changed and
create incremental execution plans which can be applied.



The infrastructure Terraform can manage includes low-level components such
as compute instances, storage, and networking, as well as high-level
components such as DNS entries, SaaS features, etc.


Model

Terraform runs entirely in one location and focuses primarily on the
creation of resources, rather than their configuration. Unlike Chef, for
example, with its workstation/server/client model, there are no Terraform
entities living on the resources that it creates.



Terraform supports provisioners
<https://terraform.io/docs/provisioners/index.html> which configure
resources by executing scripts (or Chef recipes) on the created remote
resources via SSH, but Terraform itself is not present anywhere but on the
single host.


Brooklyn Terraform Entity

A new Brooklyn Terraform entity will be created for deploying and managing
Terraform configurations.


Location

When deploying a Terraform entity, the location specified is simply where
Terraform will be installed and executed. This does not reflect the
location(s) of any of the infrastructure to be created; these are specified
entirely in the Terraform configuration itself.


Config Keys

Below are the Terraform-specific config keys supported by the entity.


configuration.contents

Contents of the configuration file that will de applied by Terraform.


configuration.url

URL of the configuration file that will be applied by Terraform.


Sensors

Below are the Terraform-specific sensors supported by the entity.


configuration.isValid

Whether the supplied Terraform configuration contains no errors and can be
applied.


configuration.isApplied

Whether the supplied Terraform configuration has been successfully applied.


configuration.show

The contents of the Terraform show command
<https://terraform.io/docs/commands/show.html> which provides a
human-readable view of the state of the configuration.


configuration.state

A map that is constructed from the state file
<https://terraform.io/docs/state/index.html> on disk which contains the
state of all managed infrastructure – the refresh command
<https://terraform.io/docs/commands/refresh.html> is called prior reading
the state file to ensure freshness.


configuration.plan

The contents of the Terraform plan command
<https://terraform.io/docs/commands/plan.html> which specifies exactly what
actions will be taken upon applying the configuration.


Effectors

Below are the Terraform-specific sensors supported by the entity.


apply

Performs the Terraform apply command
<https://terraform.io/docs/commands/apply.html> which will create all of
the infrastructure specified by the configuration.


destroy

Performs the Terraform destroy command
<https://terraform.io/docs/commands/destroy.html> which will destroy all of
the infrastructure that has been previously created by the configuration.

-- 
Cloudsoft Corporation Limited, Registered in Scotland No: SC349230. 
 Registered Office: 13 Dryden Place, Edinburgh, EH9 1RP
 
This e-mail message is confidential and for use by the addressee only. If 
the message is received by anyone other than the addressee, please return 
the message to the sender by replying to it and then delete the message 
from your computer. Internet e-mails are not necessarily secure. Cloudsoft 
Corporation Limited does not accept responsibility for changes made to this 
message after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of 
viruses, it is the responsibility of the recipient to ensure that the 
onward transmission, opening or use of this message and any attachments 
will not adversely affect its systems or data. No responsibility is 
accepted by Cloudsoft Corporation Limited in this regard and the recipient 
should carry out such virus and other checks as it considers appropriate.