Settings

Some of jack’s behavior can be configured by creating a ~/.jack/settings.yml or jack/settings.yml within the project. The options from the files get merged with the following precedence:

  1. current folder - The current folder’s jack/settings.yml values take the highest precedence.
  2. user - The user’s ~/.jack/settings.yml values take the second highest precedence.
  3. default - The default settings bundled with the tool takes the lowest precedence.

Let’s take a look at an example jack settings.yml:

create:
  keyname: default
  platform: "64bit Amazon Linux 2017.03 v2.6.0 running Docker 1.12.6"
conventions:
  app_name_pattern: !ruby/regexp /(\w+)-\w+-\w+/

The table below covers what each setting does:

Setting Description
create.keyname This sets the keyname to use when creating Elastic Beanstalk environment. This is the ssh key you can use to login into the server.
create.platform The solution stack to use when launching the EB environment. You can use aws elasticbeanstalk list-available-solution-stacks to get a full list of the available EB solution stacks. This is covered in more detail below.
conventions.app_name_pattern This allows you to override the jack naming convention and determines how jack extracts the application name from the environment. This is covered in detailed in Conventions.

Override Convention

Jack follows a convention for the environment and application name. This is done in order to keep the jack commands simple and short. The convention is:

environment_name: [app]-[role]-[env]
application_name: [app]

A concrete example is helpful:

environment_name: hi-web-prod
application_name: hi

The example above means the EB application name will be hi and the environment name will be hi-web-prod. By convention, the first word, separated by a ‘-‘, of the environment name is the application name.

This convention can be overridden easily via by configuring the the conventions.app_name_pattern setting. The value is a ruby regexp and must have 1 capture group. The capture group determines the application name. Here is an example override:

create:
  keyname: default
  platform: "64bit Amazon Linux 2016.09 v2.2.0 running Docker 1.11.2"
conventions:
  app_name_pattern: !ruby/regexp /\w+-(\w+)-\w+/

In the example above, the capture group is the second word and this will result in:

environment_name: prod-hi-web
application_name: hi

Chosing Solution Stack Platform

If the project is brand new and has never had eb init ran on it before then calling any of the jack commands will automatically call eb init in the project. eb init sets the platform and defaults to “64bit Amazon Linux 2017.03 v2.6.0 running Docker 1.12.6”. You can override that by setting the create.platform key.

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!