Version Locking

You have a lot of control over which configset version to use.

Project Configsets: Standard Gemfile

Project configsets versions can be specified in a standard Gemfile. This means all standard bundler Gemfile options are available. Some examples:

Gemfile:

gem "awslogs", "0.1.0", git: "git@github.com:boltopspro/awslogs"
gem "ruby", ">= 0.5.5", "< 0.8.8", git: "git@github.com:boltopspro/ruby"
gem "ssm", "~> 0.2", git: "git@github.com:boltopspro/ssm" # pessimistic version

The pessimistic version ssm ~> 0.2 example means configset version 0.2 or greater will be used. However, the next major version bump will not be used, IE: 1.0.0. More info about the pessimistic operation here.

The configset version is locked by bundler and your Gemfile. In the configset declaration, you do not have to specify version numbers. Example:

configs/ec2/configsets/base.rb:

configset "awslogs", resource: "Instance"
configset "ruby", resource: "Instance"
configset "ssm", resource: "Instance"

Git Options

Git repository sources support additional options: branch, tag, and ref. Only one of these options are allowed to be used. The default is branch: "master". Examples:

Gemfile:

gem "awslogs", git: "git@github.com:boltopspro/awslogs", branch: "master"
gem "cfn-hup", git: "git@github.com:boltopspro/cfn-hup", ref: "7212d17"
gem "httpd", git: "git@github.com:boltopspro/httpd", tag: "v0.1.0"

Blueprint Configsets: Materialized

Blueprints can use configsets. Blueprints configure configsets their config/configsets.rb file. Example:

config/configsets.rb:

configset "ruby", resource: "Instance"

When the configset is not declared anywhere else in the Lookup Locations, Lono materializes and uses the latest version. If a version is has be specified and is in a Lookup location with higher precedence, then that version will be used.

Blueprint Configsets: Advanced Locking

It is also possible to specify the version in the blueprint configset declaration. Example:

configset "ruby", "~> 0.1", resource: "Instance"

Lono will then materialize the specific version.

Note: You can still override the version to use by specifying their own version in their project’s Gemfile. You can also create a configset with the same name in a Blueprint Configsets Search Locations with higher precedence.

The bundler Gemfile options are supported in the configset method. Examples:

configset "ruby", resource: "Instance", branch: "master"
configset "cfn-hup", resource: "Instance", ref: "7212d17"
configset "toolset", resource: "Instance", tag: "v0.1.0"

Meta: depends_on

Configsets can depend on other configsets. You can specify versions in the depends_on method also.

depends_on "amazon-linux-extras", "0.1.0"

Note: Once again, you can still override the version with your own project Gemfile or defining configset with the same name in a Blueprint Configsets Search Locations with higher precedence. Ultimately, this means you have control over which to version to use.

Pro tip: Use the <- and -> arrow keys to move back and forward.

Edit this page

See a typo or an error? You can improve this page. This website is available on GitHub and contributions are encouraged and welcomed. We love pull requests from you!