Skip to content

Latest commit

 

History

History
157 lines (110 loc) · 4.71 KB

0.3.0.md

File metadata and controls

157 lines (110 loc) · 4.71 KB
title date slug menu
0.3.0
2016-10-20
0-3-0
main
parent identifier
release-notes
0.3.0

Release Date

2016-10-21 0.3.0-beta1

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.

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

User and group

Linux user groups can now be modified via #279

wait.query and wait.port

Converge now supports waiting for a task to complete or port #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:

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:

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.

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

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. Locks are added as a node in the graph and released after all tasks sharing the lock are complete. #392

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

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.

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

Output Improvements

Rendered graphs have been cleaned and arrows now indicate the order of tasks #387.

Text output for changes is now aligned via #317.

Bug Fixes

  • docker.container regression #343
  • handle parameters with valid zero value #338
  • shell module should not set StatusLevel based on process exit code #323
  • param dependency fails in samples/shellContext.hcl #313
  • Execution Engine Ignoring Warning Levels #243
  • Make pipeline functions use mult-return instead of Either #225
  • cmd/server.go: use errgroup instead of waitgroup #363

Examples/Documentation

A Docker image was created in #372 to speed up Wercker builds and automated tests.

Documentation was updated in #371 so that links like converge.aster.is/0.2.0 will resolve documentation for that version.

Support

We provide support via the Converge Slack team and through GitHub issues