0.3.0
This is the final release for Converge 0.3.0. Please refer to the release notes (also included below) for changes and the 0.3.0 documentation for usage.
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 and wait.query.
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. 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.
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
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.
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
uses this script download the latest release of converge before configuring a node.
Bug Fixes
Please refer to the changelog for
a detailed report.
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.
The elasticsearch example has been updated to use new features in 0.3.0 #419
Support
We provide support via the Converge Slack team and through GitHub issues