asteris-llc/converge

View on GitHub
docs/content/release-notes/0.3.0.md

Summary

Maintainability
Test Coverage
---
title: "0.3.0"
date: "2016-10-20"
slug: "0-3-0"

menu:
  main:
    parent: "release-notes"
    identifier: 0.3.0
    weight: -030

---

## Release Date

2016-10-27 0.3.0

## Features

This release includes a number of significant improvements to the core engine including conditionals,
wait queries, sequential task groups, and the ability to use lists and maps in parameters. The internal API has
also been simplified to make it easier for programmers to create new modules.

### Module Improvements

#### RPM Resource

RPM package install/uninstall support has been added via [#373](https://github.com/asteris-llc/converge/pull/373).

```hcl
rpm.package "mc" {
    name  = "mc"
    state = "present"
}
```

#### User and group

Linux user groups can now be modified via [#279](https://github.com/asteris-llc/converge/issues/279)

#### wait.query and wait.port

Converge now supports waiting for a task to complete or port [#334](https://github.com/asteris-llc/converge/pull/334).
Users can create a dependency for a port to be open or a condition to be met.

Below is an example of waiting for a port to be open using the `wait.port` resource:

```hcl
wait.port "8080" {
  host         = "localhost"
  port         = 8080
  interval     = "1s"
  max_retry    = 10
  grace_period = "2s"
}
```

The following shows using `wait.query` to wait using a task:

```hcl
wait.query "service-health" {
  check        = "nc -z localhost 8080"
  interval     = "1s"
  max_retry    = 10
  grace_period = "1s"
}
```

Wait is documented at: [wait.port]({{< relref "resources/wait.port.md" >}}) and [wait.query]({{< relref "resources/wait.query.md" >}}).


### Engine Improvements

#### Conditional Support

Support for conditionals via [#362](https://github.com/asteris-llc/converge/pull/362).

In the following example, the contents of file `greetings.txt` depend on the value of
the `lang` parameter:

```hcl
param "lang" {
  default = ""
}

switch "test-switch" {
  case "eq `spanish` `{{param `lang`}}`" "spanish" {
    file.content "foo-file" {
      destination = "greeting.txt"
      content     = "hola\n"
    }
  }

  case "eq `french` `{{param `lang`}}`" "french" {
    file.content "foo-file" {
      destination = "greeting.txt"
      content     = "salut\n"
    }
  }

```

#### Task Groups

Tasks can be assigned to a group to force multiple tasks to run
one at a time instead of in parallel. When a node is added to a task
group the engine creates a dependency on another node in the group.

Please note that task groups are not supported in conditionals in 0.3.

[#392](https://github.com/asteris-llc/converge/pull/392)

For example, `apt` package installs cannot run in parallel. In the following example
each task with the `apt` lock is run sequentially.

```hcl
task "install-jq" {
  check = "dpkg -s jq >/dev/null 2>&1"
  apply = "apt-get update 2>&1 > /dev/null && apt-get -y install jq"
  group  = "apt"
}

task "install-build-essential" {
  check = "dpkg -s build-essential >/dev/null 2>&1"
  apply = "apt-get update 2>&1 > /dev/null && apt-get -y install build-essential"
  group  = "apt"
}
```

#### Enhanced Parameter Values

`bool`, `list`, and `map` types have been added to parameters via [#340](https://github.com/asteris-llc/converge/pull/340).

See [values]({{< ref "params-and-templates.md#Values" >}})

#### Output Improvements

Rendered graphs have been cleaned and arrows now indicate the order of tasks [#387](https://github.com/asteris-llc/converge/pull/387).

Text output for changes is now aligned via [#317](https://github.com/asteris-llc/converge/pull/317).

#### Installation Script

An installation script (`install-converge.sh`) has been added that downloads the correct
binary of converge after detecting the underlying Operating System and Processor.

This can be used to install converge during system boot.

For example, the [terraform provisioner](https://github.com/asteris-llc/terraform-provisioner-converge)
uses this script download the latest release of converge before configuring a node.

## Bug Fixes

Please refer to the [changelog](https://github.com/asteris-llc/converge/blob/master/CHANGELOG.md) for
a detailed report.

## Examples/Documentation

A Docker image was created in [#372](https://github.com/asteris-llc/converge/pull/372) to speed up Wercker builds and automated tests.

Documentation was updated in [#371](https://github.com/asteris-llc/converge/pull/371) so that links like
[converge.aster.is/0.2.0](https://converge.aster.is/0.2.0) will resolve documentation for that version.

The elasticsearch example has been updated to use new features in 0.3.0 [#419](https://github.com/asteris-llc/converge/pull/419)

## Support

We provide support via [the Converge Slack team](http://converge-slack.aster.is/) and through [GitHub issues](https://github.com/asteris-llc/converge/issues)