simplygenius-atmos 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5761d35141b55d13b0e372081647d0a898aa0dda202d12c02f4c6728d671600f
4
- data.tar.gz: b2b0650b44c07c757f106b7f8f4c55ac3a0b44457f337c06620adb934340db16
3
+ metadata.gz: 10ee93da3ad938995a76994c9652134b9761f7dd79dbb848667655b36c666c37
4
+ data.tar.gz: 3a6cfa01bf2693dd9ffb3b8b95ff9c9a8a989eb1bc954a385b5b58603da671da
5
5
  SHA512:
6
- metadata.gz: 889d94f2c5743bccab0a8e53d76a936585f4410bd1a18ee9df46036da8a3b718833a73f8aaed475ae1278708532f113f4f96b7dc43833bef8b5bab7fac0520d6
7
- data.tar.gz: 87c5c8896b562ed95898584284a741bb0d7dc903e0365e197054f73e00c795eaf4200a6c0ec4cfccc8a66f4aa5f15c0ede4e8e7c16b628ce83cdf6eb96deb2ef
6
+ metadata.gz: 778183427db0fcc75a8dd2a9365ad7a12824d7d1271333044896d130b58d371ae824c97e888fc2f125e0946beccd1d2bdc6f830238383321511b5a73774bd594
7
+ data.tar.gz: bb37c2acdac734795af2c6c1b7182fc97d07d46e74181b0d4257618b1e1b1318a054e5acbf53214cd7e971702d423d16e62674780f7772316ee1a3b1465f9422
data/README.md CHANGED
@@ -165,8 +165,8 @@ atmos -e dev destroy
165
165
 
166
166
  # Destroys the bootstrap resources (state, secret, lock storage and
167
167
  # cross-account access role)
168
- TF_VAR_force_destroy_buckets=true atmos -e dev apply --group bootstrap
169
- atmos -e dev destroy --group bootstrap
168
+ TF_VAR_force_destroy_buckets=true atmos -e dev -g bootstrap apply
169
+ atmos -e dev -g bootstrap destroy
170
170
 
171
171
  # For normal usage you should rarely need to cleanup the ops account, but
172
172
  # included here in case you want to completely purge the atmos resources after
@@ -177,8 +177,8 @@ AWS_PROFILE=<root_profile_name> TF_VAR_force_destroy_buckets=true atmos -e ops a
177
177
  AWS_PROFILE=<root_profile_name> atmos -e ops destroy
178
178
 
179
179
  # Cleanup ops bootstrap
180
- AWS_PROFILE=<root_profile_name> TF_VAR_force_destroy_buckets=true atmos -e ops apply --group bootstrap
181
- AWS_PROFILE=<root_profile_name> atmos -e ops destroy --group bootstrap
180
+ AWS_PROFILE=<root_profile_name> TF_VAR_force_destroy_buckets=true atmos -e ops -g bootstrap apply
181
+ AWS_PROFILE=<root_profile_name> atmos -e ops -g bootstrap destroy
182
182
 
183
183
  ```
184
184
 
@@ -40,6 +40,10 @@ module SimplyGenius
40
40
  'ENV', "The atmos environment\n",
41
41
  environment_variable: 'ATMOS_ENV', default: 'ops'
42
42
 
43
+ option ["-g", "--atmos-group"],
44
+ 'GROUP', "The atmos working group\n for selecting recipe groups\n",
45
+ default: 'default'
46
+
43
47
  option ["-l", "--load-path"],
44
48
  "PATH", "adds additional paths to ruby load path",
45
49
  multivalued: true
@@ -99,7 +103,7 @@ module SimplyGenius
99
103
  def parse(arguments)
100
104
  super
101
105
  if Atmos.config.nil?
102
- Atmos.config = Config.new(atmos_env)
106
+ Atmos.config = Config.new(atmos_env, atmos_group)
103
107
  log = Atmos.config.is_atmos_repo? && log? ? "atmos.log" : nil
104
108
  Logging.setup_logging(debug?, color?, log)
105
109
  UI.color_enabled = color?
@@ -12,7 +12,7 @@ module SimplyGenius
12
12
 
13
13
  def execute
14
14
  args = ["apply"]
15
- args << "--get-modules" unless Atmos.config["disable_auto_modules"].to_s == "true"
15
+ args << "--get-modules" unless Atmos.config["atmos.terraform.disable_auto_modules"].to_s == "true"
16
16
  @terraform_arguments.insert(0, *args)
17
17
  super
18
18
  end
@@ -14,8 +14,10 @@ module SimplyGenius
14
14
  :flag, "forces bootstrap\n"
15
15
 
16
16
  def execute
17
+ orig_config = Atmos.config
18
+ Atmos.config = Config.new(Atmos.config.atmos_env, 'bootstrap')
17
19
 
18
- tf_init_dir = File.join(Atmos.config.tf_working_dir('bootstrap'), '.terraform')
20
+ tf_init_dir = File.join(Atmos.config.tf_working_dir, '.terraform')
19
21
  tf_initialized = File.exist?(tf_init_dir)
20
22
  backend_initialized = File.exist?(File.join(tf_init_dir, 'terraform.tfstate'))
21
23
 
@@ -30,7 +32,7 @@ module SimplyGenius
30
32
 
31
33
  Atmos.config.provider.auth_manager.authenticate(ENV, bootstrap: true) do |auth_env|
32
34
  begin
33
- exe = TerraformExecutor.new(process_env: auth_env, working_group: 'bootstrap')
35
+ exe = TerraformExecutor.new(process_env: auth_env)
34
36
 
35
37
  skip_backend = true
36
38
  skip_secrets = true
@@ -59,6 +61,7 @@ module SimplyGenius
59
61
 
60
62
  # Might as well init the non-bootstrap case as well once the state
61
63
  # storage has been setup in bootstrap
64
+ Atmos.config = orig_config
62
65
  exe = TerraformExecutor.new(process_env: auth_env)
63
66
  exe.run("init", "-input=false", skip_secrets: true)
64
67
 
@@ -57,7 +57,7 @@ module SimplyGenius
57
57
 
58
58
  # don't want to fail for new repo
59
59
  if Atmos.config && Atmos.config.is_atmos_repo?
60
- Atmos.config['template_sources'].try(:each) do |item|
60
+ Atmos.config['atmos.template_sources'].try(:each) do |item|
61
61
  SourcePath.register(item.name, item.location)
62
62
  end
63
63
  end
@@ -141,7 +141,7 @@ module SimplyGenius
141
141
  end
142
142
 
143
143
  def state_file
144
- @state_file ||= Atmos.config["generate.state_file"]
144
+ @state_file ||= Atmos.config["atmos.generate.state_file"]
145
145
  end
146
146
 
147
147
  def state
@@ -1,10 +1,13 @@
1
1
  require_relative 'terraform'
2
+ require 'fileutils'
3
+ require 'os'
2
4
 
3
5
  module SimplyGenius
4
6
  module Atmos
5
7
  module Commands
6
8
 
7
9
  class Init < Terraform
10
+ include FileUtils
8
11
 
9
12
  def self.description
10
13
  "Runs terraform init"
@@ -13,6 +16,18 @@ module SimplyGenius
13
16
  def execute
14
17
  @terraform_arguments.insert(0, "init")
15
18
  super
19
+
20
+ if ! Atmos.config["atmos.terraform.disable_shared_plugins"]
21
+ home_dir = OS.windows? ? File.join("~", "Application Data") : "~"
22
+ shared_plugins_dir = File.expand_path(File.join(home_dir,".terraform.d", "plugins"))
23
+ logger.debug("Updating shared terraform plugins dir: #{shared_plugins_dir}")
24
+ mkdir_p(shared_plugins_dir)
25
+ terraform_plugins_dir = File.join(Atmos.config.tf_working_dir,'recipes', '.terraform', 'plugins')
26
+ if File.exist?(terraform_plugins_dir)
27
+ cp_r("#{terraform_plugins_dir}/.", shared_plugins_dir)
28
+ end
29
+ end
30
+
16
31
  end
17
32
 
18
33
  end
@@ -12,7 +12,7 @@ module SimplyGenius
12
12
 
13
13
  def execute
14
14
  args = ["plan"]
15
- args << "--get-modules" unless Atmos.config["disable_auto_modules"].to_s == "true"
15
+ args << "--get-modules" unless Atmos.config["atmos.terraform.disable_auto_modules"].to_s == "true"
16
16
  @terraform_arguments.insert(0, *args)
17
17
  super
18
18
  end
@@ -28,19 +28,7 @@ module SimplyGenius
28
28
 
29
29
  Atmos.config.provider.auth_manager.authenticate(ENV) do |auth_env|
30
30
  begin
31
-
32
- # TODO: hack to allow apply/etc for bootstrap group
33
- # Fix this once we allow more extensive recipe grouping
34
- working_group = 'default'
35
- @terraform_arguments.each_with_index do |a, i|
36
- if a == "--group"
37
- @terraform_arguments.delete_at(i)
38
- working_group = @terraform_arguments.delete_at(i)
39
- break
40
- end
41
- end
42
-
43
- exe = TerraformExecutor.new(process_env: auth_env, working_group: working_group)
31
+ exe = TerraformExecutor.new(process_env: auth_env)
44
32
  get_modules = @terraform_arguments.delete("--get-modules")
45
33
  exe.run(*@terraform_arguments, get_modules: get_modules.present?)
46
34
  rescue TerraformExecutor::ProcessFailed => e
@@ -13,12 +13,14 @@ module SimplyGenius
13
13
  include GemLogger::LoggerSupport
14
14
  include FileUtils
15
15
 
16
- attr_accessor :atmos_env, :root_dir,
16
+ attr_accessor :atmos_env, :working_group,
17
+ :root_dir,
17
18
  :config_file,
18
19
  :tmp_root
19
20
 
20
- def initialize(atmos_env)
21
+ def initialize(atmos_env, working_group = 'default')
21
22
  @atmos_env = atmos_env
23
+ @working_group = working_group
22
24
  @root_dir = File.expand_path(Dir.pwd)
23
25
  @config_file = File.join(root_dir, "config", "atmos.yml")
24
26
  @tmp_root = File.join(root_dir, "tmp")
@@ -45,7 +47,7 @@ module SimplyGenius
45
47
  end
46
48
 
47
49
  def plugin_manager
48
- @plugin_manager ||= PluginManager.new(self[:plugins])
50
+ @plugin_manager ||= PluginManager.new(self["atmos.plugins"])
49
51
  end
50
52
 
51
53
  def all_env_names
@@ -80,10 +82,9 @@ module SimplyGenius
80
82
  end
81
83
  end
82
84
 
83
- def tf_working_dir(group='default')
84
- @tf_working_dir ||= {}
85
- @tf_working_dir[group] ||= begin
86
- dir = File.join(tmp_dir, 'tf', group)
85
+ def tf_working_dir
86
+ @tf_working_dir ||= begin
87
+ dir = File.join(tmp_dir, 'tf', working_group)
87
88
  logger.debug("Terraform working dir: #{dir}")
88
89
  mkdir_p(dir)
89
90
  dir
@@ -91,7 +92,7 @@ module SimplyGenius
91
92
  end
92
93
 
93
94
  def add_user_load_path(*paths)
94
- load_path = paths + Array(self[:load_path])
95
+ load_path = paths + Array(self["atmos.load_path"])
95
96
  if load_path.present?
96
97
  load_path = load_path.collect { |path| File.expand_path(path) }
97
98
  logger.debug("Adding to load path: #{load_path.inspect}")
@@ -156,9 +157,14 @@ module SimplyGenius
156
157
 
157
158
  Dir[pattern].each do |f|
158
159
  logger.debug("Loading atmos config file: #{f}")
159
- h = SettingsHash.new(YAML.load_file(f))
160
- config = config_merge(config, h)
161
- @included_configs << f
160
+ data = YAML.load_file(f)
161
+ if data == false
162
+ logger.debug("Skipping empty config file: #{f}")
163
+ else
164
+ h = SettingsHash.new(data)
165
+ config = config_merge(config, h)
166
+ @included_configs << f
167
+ end
162
168
  end
163
169
  end
164
170
 
@@ -170,9 +176,14 @@ module SimplyGenius
170
176
  submap_file = File.join(submap_dir, "#{name}.yml")
171
177
  if File.exist?(submap_file)
172
178
  logger.debug("Loading atmos #{group} config file: #{submap_file}")
173
- h = SettingsHash.new({group => {name => YAML.load_file(submap_file)}})
174
- config = config_merge(config, h)
175
- @included_configs << submap_file
179
+ data = YAML.load_file(submap_file)
180
+ if data == false
181
+ logger.debug("Skipping empty config file: #{submap_file}")
182
+ else
183
+ h = SettingsHash.new({group => {name => data}})
184
+ config = config_merge(config, h)
185
+ @included_configs << submap_file
186
+ end
176
187
  end
177
188
 
178
189
  begin
@@ -199,7 +210,7 @@ module SimplyGenius
199
210
  @included_configs << config_file
200
211
  end
201
212
 
202
- @full_config = load_config_sources(File.dirname(config_file), @full_config, *Array(@full_config[:config_sources]))
213
+ @full_config = load_config_sources(File.dirname(config_file), @full_config, *Array(@full_config.notation_get("atmos.config_sources")))
203
214
 
204
215
  @full_config['provider'] = provider_name = @full_config['provider'] || 'aws'
205
216
 
@@ -209,6 +220,7 @@ module SimplyGenius
209
220
  global = SettingsHash.new(@full_config.reject {|k, v| ['providers', 'environments'].include?(k) })
210
221
  conf = config_merge(global, {
211
222
  atmos_env: atmos_env,
223
+ atmos_working_group: working_group,
212
224
  atmos_version: VERSION
213
225
  })
214
226
  expand(conf, conf)
@@ -273,6 +285,7 @@ module SimplyGenius
273
285
 
274
286
  return filename, line
275
287
  end
288
+
276
289
  end
277
290
 
278
291
  end
@@ -19,7 +19,7 @@ module SimplyGenius
19
19
  'success' => ''
20
20
  }
21
21
 
22
- return result if Atmos.config["ipc.notify.disable"].to_s == "true"
22
+ return result if Atmos.config["atmos.ipc.notify.disable"].to_s == "true"
23
23
  return notify(**opts)
24
24
 
25
25
  end
@@ -10,7 +10,7 @@ module SimplyGenius
10
10
  include GemLogger::LoggerSupport
11
11
 
12
12
  def initialize
13
- @secret_file = Atmos.config["otp.secret_file"] || "~/.atmos.yml"
13
+ @secret_file = Atmos.config["atmos.otp.secret_file"] || "~/.atmos.yml"
14
14
  @secret_file = File.expand_path(@secret_file)
15
15
  yml_hash = YAML.load_file(@secret_file) rescue Hash.new
16
16
  @secret_store = SettingsHash.new(yml_hash)
@@ -16,11 +16,9 @@ module SimplyGenius
16
16
 
17
17
  class ProcessFailed < RuntimeError; end
18
18
 
19
- def initialize(process_env: ENV, working_group: 'default')
19
+ def initialize(process_env: ENV)
20
20
  @process_env = process_env
21
- @working_group = working_group
22
- @working_dir = Atmos.config.tf_working_dir(@working_group)
23
- @recipes = Atmos.config["recipes.#{@working_group}"]
21
+ @recipes = Atmos.config["recipes.#{Atmos.config.working_group}"]
24
22
  end
25
23
 
26
24
  def run(*terraform_args, skip_backend: false, skip_secrets: false, get_modules: false, output_io: nil)
@@ -70,15 +68,15 @@ module SimplyGenius
70
68
 
71
69
  stdout_writer.sync = stderr_writer.sync = true
72
70
 
73
- stdout_filters = Atmos.config.plugin_manager.output_filters(:stdout, {process_env: @process_env, working_group: @working_group})
74
- stderr_filters = Atmos.config.plugin_manager.output_filters(:stderr, {process_env: @process_env, working_group: @working_group})
71
+ stdout_filters = Atmos.config.plugin_manager.output_filters(:stdout, {process_env: @process_env, working_group: Atmos.config.working_group})
72
+ stderr_filters = Atmos.config.plugin_manager.output_filters(:stderr, {process_env: @process_env, working_group: Atmos.config.working_group})
75
73
 
76
74
  stdout_thr = pipe_stream(stdout, output_io.nil? ? $stdout : output_io, &stdout_filters.filter_block)
77
75
  stderr_thr = pipe_stream(stderr, output_io.nil? ? $stderr : output_io, &stderr_filters.filter_block)
78
76
 
79
77
  ipc.listen do |sock_path|
80
78
 
81
- if Atmos.config['ipc.disable']
79
+ if Atmos.config['atmos.ipc.disable']
82
80
  # Using : as the command makes execution of ipc from the
83
81
  # terraform side a no-op in both cases of how we call it. This
84
82
  # way, terraform execution continues to work when IPC is disabled
@@ -135,7 +133,6 @@ module SimplyGenius
135
133
 
136
134
  def setup_working_dir(skip_backend: false)
137
135
  clean_links
138
- link_shared_plugin_dir
139
136
  link_support_dirs
140
137
  link_recipes
141
138
  write_atmos_vars
@@ -149,11 +146,6 @@ module SimplyGenius
149
146
  if backend_config.present? && ! skip_backend
150
147
  logger.debug("Writing out terraform state backend config")
151
148
 
152
- # Use a different state file per group
153
- if @working_group
154
- backend_config['key'] = "#{@working_group}-#{backend_config['key']}"
155
- end
156
-
157
149
  backend_type = backend_config.delete("type")
158
150
 
159
151
  backend = {
@@ -206,7 +198,7 @@ module SimplyGenius
206
198
 
207
199
  def tf_recipes_dir
208
200
  @tf_recipes_dir ||= begin
209
- dir = File.join(@working_dir, 'recipes')
201
+ dir = File.join(Atmos.config.tf_working_dir, 'recipes')
210
202
  logger.debug("Tf recipes dir: #{dir}")
211
203
  mkdir_p(dir)
212
204
  dir
@@ -221,12 +213,11 @@ module SimplyGenius
221
213
  # declared, we also merge in atmos config with only the values homogenized (vs the entire map) so that hash
222
214
  # variables if declared in terraform can be managed from yml, set here and accessed from terraform
223
215
  #
224
- atmos_config = homogenize_for_terraform(Atmos.config.to_h)
216
+ homogenized_config = homogenize_for_terraform(Atmos.config.to_h)
225
217
  var_hash = {
226
- atmos_env: Atmos.config.atmos_env,
227
218
  all_env_names: Atmos.config.all_env_names,
228
219
  account_ids: Atmos.config.account_hash,
229
- atmos_config: atmos_config
220
+ atmos_config: homogenized_config
230
221
  }
231
222
  var_hash = var_hash.merge(Atmos.config.to_h)
232
223
  f.puts(JSON.pretty_generate(var_hash))
@@ -246,7 +237,7 @@ module SimplyGenius
246
237
  end
247
238
 
248
239
  def clean_links
249
- Find.find(@working_dir) do |f|
240
+ Find.find(Atmos.config.tf_working_dir) do |f|
250
241
  Find.prune if f =~ /\/.terraform\/modules\//
251
242
  File.delete(f) if File.symlink?(f)
252
243
  end
@@ -254,18 +245,7 @@ module SimplyGenius
254
245
 
255
246
  def link_support_dirs
256
247
  ['modules', 'templates'].each do |subdir|
257
- ln_sf(File.join(Atmos.config.root_dir, subdir), @working_dir)
258
- end
259
- end
260
-
261
- def link_shared_plugin_dir
262
- if ! Atmos.config["terraform.disable_shared_plugins"]
263
- shared_plugins_dir = File.join(Atmos.config.tmp_root, "terraform_plugins")
264
- mkdir_p(shared_plugins_dir)
265
- terraform_state_dir = File.join(tf_recipes_dir, '.terraform')
266
- mkdir_p(terraform_state_dir)
267
- terraform_plugins_dir = File.join(terraform_state_dir, 'plugins')
268
- ln_sf(shared_plugins_dir, terraform_plugins_dir)
248
+ ln_sf(File.join(Atmos.config.root_dir, subdir), Atmos.config.tf_working_dir)
269
249
  end
270
250
  end
271
251
 
@@ -99,13 +99,13 @@ module SimplyGenius
99
99
  message = message.to_s
100
100
  title = title.present? ? title.to_s : "Atmos Notification"
101
101
  modal = ["true", "1"].include?(modal.to_s)
102
- modal = false if Atmos.config["ui.notify.disable_modal"]
102
+ modal = false if Atmos.config["atmos.ui.notify.disable_modal"]
103
103
 
104
- return result if Atmos.config["ui.notify.disable"].to_s == "true"
104
+ return result if Atmos.config["atmos.ui.notify.disable"].to_s == "true"
105
105
 
106
- force_inline = opts[:inline].to_s == "true" || Atmos.config["ui.notify.force_inline"].to_s == "true"
106
+ force_inline = opts[:inline].to_s == "true" || Atmos.config["atmos.ui.notify.force_inline"].to_s == "true"
107
107
 
108
- command = Atmos.config["ui.notify.command"]
108
+ command = Atmos.config["atmos.ui.notify.command"]
109
109
 
110
110
  if command.present? && ! force_inline
111
111
 
@@ -1,5 +1,5 @@
1
1
  module SimplyGenius
2
2
  module Atmos
3
- VERSION = "0.8.0"
3
+ VERSION = "0.9.0"
4
4
  end
5
5
  end
@@ -0,0 +1,8 @@
1
+ # Environment specific overrides for the dev environment
2
+ #
3
+ # You can add overrides for other environments by creating a <env>.yml file in
4
+ # this directory where <env> is the environment name.
5
+ #
6
+ # Overrides in this file should NOT be scoped under a "environments ->
7
+ # <env>" hash like they need to be in atmos.yml
8
+ #
@@ -1,52 +1,74 @@
1
- # Optional configuration for controlling the behavior of the atmos runtime
1
+ # Configuration for controlling the behavior of the atmos runtime
2
+ atmos:
2
3
 
3
- # Sets a prefix on the root keys when passed into terraform as a var value
4
- var_prefix:
4
+ # Sources for atmos templates
5
+ # To circumvent the version lock and get the latest git master recipes, use the git
6
+ # location, e.g.:
7
+ # location: https://github.com/simplygenius/atmos-recipes.git
8
+ #
9
+ template_sources:
10
+ - name: atmos-recipes
11
+ location: https://github.com/simplygenius/atmos-recipes/archive/v#{atmos_version}.zip#atmos-recipes-#{atmos_version}
12
+ #- name: atmos-pro-recipes
13
+ # location: https://YOUR_API_KEY@releases.simplygenius.com/recipes/v#{atmos_version}#atmos-pro-recipes-#{atmos_version}
5
14
 
6
- # Disable module fetch from convenience plan/apply commandss
7
- disable_auto_modules: false
15
+ # To get the atmos-pro gem, add the gem source like:
16
+ # gem sources -a https://YOUR_API_KEY@releases.simplygenius.com/gems/
17
+ # then install the gem:
18
+ # gem install simplygenius-atmos-pro
19
+ # then add simplygenius-atmos-pro to the plugins key below
20
+ #
21
+ # The list of plugin gems to load when running atmos
22
+ #
23
+ plugins:
24
+ # - simplygenius-atmos-pro
8
25
 
9
- # Allows one to add a custom ruby load path list for extending atmos without
10
- # having to publish a gem
11
- load_path:
26
+ # Allows one to add a custom ruby load path list for extending atmos without
27
+ # having to publish a gem
28
+ load_path:
12
29
 
13
- # Configure the mechanism that allows terraform to callback into atmos
14
- ipc:
15
- # Disables all IPC callbacks into atmos from terraform
16
- disable: false
17
- # Configures the notify IP callback
18
- notify:
19
- # Disable notify callbacks
30
+ # Configure the mechanism that allows terraform to callback into atmos
31
+ ipc:
32
+ # Disables all IPC callbacks into atmos from terraform
20
33
  disable: false
34
+ # Configures the notify IP callback
35
+ notify:
36
+ # Disable notify callbacks
37
+ disable: false
21
38
 
22
- # Configure the integrated otp mechanism
23
- otp:
24
- # The file where otp secrets are stored
25
- secret_file: ~/.atmos.yml
26
-
27
- # Configure the template generator
28
- generate:
29
- # The file storing the record of each generated template
30
- state_file: .atmos-templates.yml
31
-
32
- # Configure the UI components
33
- ui:
34
- # Configures UI notifications
35
- notify:
36
- # Disable notifications
37
- disable: false
38
- # Force notifications to never be modal
39
- disable_modal: false
40
- # Set a custom command for notifications, embedded {{title|message|modal}}
41
- # will be replaced with the value passed from terraform
42
- command:
43
- # Force notifications inline in atmos' stdout output rather than launching
44
- # a GUI notification
45
- force_inline: false
46
-
47
- # Configure terraform execution details
48
- terraform:
49
- # By default, all terraform plugins are placed in a directory so they can be
50
- # reused across all envs/groups. This can be disabled here (you can also
51
- # override using the terraform cli options for plugins)
52
- disable_shared_plugins: false
39
+ # Configure the integrated otp mechanism
40
+ otp:
41
+ # The file where otp secrets are stored
42
+ secret_file: ~/.atmos.yml
43
+
44
+ # Configure the template generator
45
+ generate:
46
+ # The file storing the record of each generated template
47
+ state_file: .atmos-templates.yml
48
+
49
+ # Configure the UI components
50
+ ui:
51
+ # Configures UI notifications
52
+ notify:
53
+ # Disable notifications
54
+ disable: false
55
+ # Force notifications to never be modal
56
+ disable_modal: false
57
+ # Set a custom command for notifications, embedded {{title|message|modal}}
58
+ # will be replaced with the value passed from terraform
59
+ command:
60
+ # Force notifications inline in atmos' stdout output rather than launching
61
+ # a GUI notification
62
+ force_inline: false
63
+
64
+ # Configure terraform execution details
65
+ terraform:
66
+ # Disable module fetch from convenience plan/apply commands
67
+ disable_auto_modules: false
68
+ # By default (value=false), `atmos init` will update the terraform user
69
+ # plugin directory (~/.terraform.d/plugins) with the plugins for the current
70
+ # env/group so that they can be reused across all env/group combinations.
71
+ # Otherwise, disabling this functionality (value=true) means that each
72
+ # env/group combination will be independent and download all plugins for
73
+ # itself only
74
+ disable_shared_plugins: false
@@ -1,3 +1,24 @@
1
+ # The atmos configuration system merges together all the yml files into one
2
+ # giant hash, starting with this atmos.yml, then adding in all the files
3
+ # matching the patterns in atmos.config_sources
4
+ #
5
+ # Hashes and arrays are merged in an additive fashion, and scalars are replaced
6
+ # based on the merge order (last wins). e.g.
7
+ # "foo: {bar: 1}, hum: [1]" + "foo: {baz: 2}, hum: [2]" => "foo: {bar: 1, baz: 2}, , hum: [1, 2]"
8
+ # You can force an override (vs merge) of a hash or array by prefixing the key
9
+ # with a caret (^)
10
+ # "foo: {bar: 1}" + "^foo: {baz: 2}" => "foo: {baz: 2}"
11
+ #
12
+ # Providers and environment overrides get merged in on top of the hash based on
13
+ # the selected provider (aws) and environment (ops/dev/prod/etc).
14
+ # The providers and environments key/hash are excluded from the final merged
15
+ # configuration hash
16
+ #
17
+ # The merged configuration hash is provided to terraform at execution time via a
18
+ # generated tfvars.json To access those variables you still need to declare the
19
+ # variables you use with a terraform variable declaration in a tf file
20
+ #
21
+
1
22
  # The short name of your organization
2
23
  #
3
24
  org:
@@ -29,33 +50,14 @@ environments:
29
50
  # running in a development environment, for example:
30
51
  # {is_dev ? 'dev val' : 'prod val'}
31
52
  #
32
- is_dev: "#{ /dev|test|demo/.match?(atmos_env) }"
33
-
34
- # A list of glob patterns for finding atmos yml files
35
- # Patterns can be absolute (beginning with /), but if not are applied relative
36
- # to the directory containing atmos.yml
37
- #
38
- config_sources:
39
- - atmos/*.y{,a}ml
40
-
41
- # Sources for atmos templates
42
- # To circumvent the version lock and get the latest git master recipes, use the git
43
- # location, e.g.:
44
- # location: https://github.com/simplygenius/atmos-recipes.git
45
- #
46
- template_sources:
47
- - name: atmos-recipes
48
- location: https://github.com/simplygenius/atmos-recipes/archive/v#{atmos_version}.zip#atmos-recipes-#{atmos_version}
49
- #- name: atmos-pro-recipes
50
- # location: https://YOUR_API_KEY@releases.simplygenius.com/recipes/v#{atmos_version}#atmos-pro-recipes-#{atmos_version}
51
-
52
- # To get the atmos-pro gem, add the gem source like:
53
- # gem sources -a https://YOUR_API_KEY@releases.simplygenius.com/gems/
54
- # then install the gem:
55
- # gem install simplygenius-atmos-pro
56
- # then add simplygenius-atmos-pro to the plugins key below
57
- #
58
- # The list of plugin gems to load when running atmos
59
- #
60
- plugins:
61
- # - simplygenius-atmos-pro
53
+ is_dev: "#{ !! /dev|test|demo/.match(atmos_env) }"
54
+
55
+ # Configuration required in this file for finding other atmos config. See
56
+ # config/atmos/runtime.yml for atmos runtime configuration settings
57
+ atmos:
58
+ # A list of glob patterns for finding atmos yml files
59
+ # Patterns can be absolute (beginning with /), but if not are applied relative
60
+ # to the directory containing atmos.yml
61
+ #
62
+ config_sources:
63
+ - atmos/*.y{,a}ml
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplygenius-atmos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Conway
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-19 00:00:00.000000000 Z
11
+ date: 2018-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -126,324 +126,324 @@ dependencies:
126
126
  name: pry
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: 0.11.3
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: 0.11.3
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: pry-byebug
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: 3.6.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: 3.6.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: activesupport
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0'
159
+ version: 5.2.1
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0'
166
+ version: 5.2.1
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: gem_logger
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ">="
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '0'
173
+ version: 0.3.0
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '0'
180
+ version: 0.3.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: logging
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '0'
187
+ version: 2.2.2
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '0'
194
+ version: 2.2.2
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: sigdump
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ">="
199
+ - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: '0'
201
+ version: 0.2.4
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ">="
206
+ - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: '0'
208
+ version: 0.2.4
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: clamp
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - ">="
213
+ - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: '0'
215
+ version: 1.3.0
216
216
  type: :runtime
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
- - - ">="
220
+ - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: '0'
222
+ version: 1.3.0
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: thor
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - ">="
227
+ - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: '0'
229
+ version: 0.19.4
230
230
  type: :runtime
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - ">="
234
+ - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: '0'
236
+ version: 0.19.4
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: highline
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
- - - ">="
241
+ - - "~>"
242
242
  - !ruby/object:Gem::Version
243
- version: '0'
243
+ version: 2.0.0
244
244
  type: :runtime
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
- - - ">="
248
+ - - "~>"
249
249
  - !ruby/object:Gem::Version
250
- version: '0'
250
+ version: 2.0.0
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: rainbow
253
253
  requirement: !ruby/object:Gem::Requirement
254
254
  requirements:
255
- - - ">="
255
+ - - "~>"
256
256
  - !ruby/object:Gem::Version
257
- version: '0'
257
+ version: 3.0.0
258
258
  type: :runtime
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
- - - ">="
262
+ - - "~>"
263
263
  - !ruby/object:Gem::Version
264
- version: '0'
264
+ version: 3.0.0
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: git
267
267
  requirement: !ruby/object:Gem::Requirement
268
268
  requirements:
269
- - - ">="
269
+ - - "~>"
270
270
  - !ruby/object:Gem::Version
271
- version: '0'
271
+ version: 1.5.0
272
272
  type: :runtime
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
- - - ">="
276
+ - - "~>"
277
277
  - !ruby/object:Gem::Version
278
- version: '0'
278
+ version: 1.5.0
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: rubyzip
281
281
  requirement: !ruby/object:Gem::Requirement
282
282
  requirements:
283
- - - ">="
283
+ - - "~>"
284
284
  - !ruby/object:Gem::Version
285
- version: '0'
285
+ version: 1.2.2
286
286
  type: :runtime
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
289
289
  requirements:
290
- - - ">="
290
+ - - "~>"
291
291
  - !ruby/object:Gem::Version
292
- version: '0'
292
+ version: 1.2.2
293
293
  - !ruby/object:Gem::Dependency
294
294
  name: hashie
295
295
  requirement: !ruby/object:Gem::Requirement
296
296
  requirements:
297
- - - ">="
297
+ - - "~>"
298
298
  - !ruby/object:Gem::Version
299
- version: '0'
299
+ version: 3.6.0
300
300
  type: :runtime
301
301
  prerelease: false
302
302
  version_requirements: !ruby/object:Gem::Requirement
303
303
  requirements:
304
- - - ">="
304
+ - - "~>"
305
305
  - !ruby/object:Gem::Version
306
- version: '0'
306
+ version: 3.6.0
307
307
  - !ruby/object:Gem::Dependency
308
308
  name: climate_control
309
309
  requirement: !ruby/object:Gem::Requirement
310
310
  requirements:
311
- - - ">="
311
+ - - "~>"
312
312
  - !ruby/object:Gem::Version
313
- version: '0'
313
+ version: 0.2.0
314
314
  type: :runtime
315
315
  prerelease: false
316
316
  version_requirements: !ruby/object:Gem::Requirement
317
317
  requirements:
318
- - - ">="
318
+ - - "~>"
319
319
  - !ruby/object:Gem::Version
320
- version: '0'
320
+ version: 0.2.0
321
321
  - !ruby/object:Gem::Dependency
322
322
  name: aws-sdk-core
323
323
  requirement: !ruby/object:Gem::Requirement
324
324
  requirements:
325
- - - ">="
325
+ - - "~>"
326
326
  - !ruby/object:Gem::Version
327
- version: '0'
327
+ version: 3.28.0
328
328
  type: :runtime
329
329
  prerelease: false
330
330
  version_requirements: !ruby/object:Gem::Requirement
331
331
  requirements:
332
- - - ">="
332
+ - - "~>"
333
333
  - !ruby/object:Gem::Version
334
- version: '0'
334
+ version: 3.28.0
335
335
  - !ruby/object:Gem::Dependency
336
336
  name: aws-sdk-iam
337
337
  requirement: !ruby/object:Gem::Requirement
338
338
  requirements:
339
- - - ">="
339
+ - - "~>"
340
340
  - !ruby/object:Gem::Version
341
- version: '0'
341
+ version: 1.8.0
342
342
  type: :runtime
343
343
  prerelease: false
344
344
  version_requirements: !ruby/object:Gem::Requirement
345
345
  requirements:
346
- - - ">="
346
+ - - "~>"
347
347
  - !ruby/object:Gem::Version
348
- version: '0'
348
+ version: 1.8.0
349
349
  - !ruby/object:Gem::Dependency
350
350
  name: aws-sdk-organizations
351
351
  requirement: !ruby/object:Gem::Requirement
352
352
  requirements:
353
- - - ">="
353
+ - - "~>"
354
354
  - !ruby/object:Gem::Version
355
- version: '0'
355
+ version: 1.13.0
356
356
  type: :runtime
357
357
  prerelease: false
358
358
  version_requirements: !ruby/object:Gem::Requirement
359
359
  requirements:
360
- - - ">="
360
+ - - "~>"
361
361
  - !ruby/object:Gem::Version
362
- version: '0'
362
+ version: 1.13.0
363
363
  - !ruby/object:Gem::Dependency
364
364
  name: aws-sdk-s3
365
365
  requirement: !ruby/object:Gem::Requirement
366
366
  requirements:
367
- - - ">="
367
+ - - "~>"
368
368
  - !ruby/object:Gem::Version
369
- version: '0'
369
+ version: 1.20.0
370
370
  type: :runtime
371
371
  prerelease: false
372
372
  version_requirements: !ruby/object:Gem::Requirement
373
373
  requirements:
374
- - - ">="
374
+ - - "~>"
375
375
  - !ruby/object:Gem::Version
376
- version: '0'
376
+ version: 1.20.0
377
377
  - !ruby/object:Gem::Dependency
378
378
  name: aws-sdk-ecr
379
379
  requirement: !ruby/object:Gem::Requirement
380
380
  requirements:
381
- - - ">="
381
+ - - "~>"
382
382
  - !ruby/object:Gem::Version
383
- version: '0'
383
+ version: 1.6.0
384
384
  type: :runtime
385
385
  prerelease: false
386
386
  version_requirements: !ruby/object:Gem::Requirement
387
387
  requirements:
388
- - - ">="
388
+ - - "~>"
389
389
  - !ruby/object:Gem::Version
390
- version: '0'
390
+ version: 1.6.0
391
391
  - !ruby/object:Gem::Dependency
392
392
  name: aws-sdk-ecs
393
393
  requirement: !ruby/object:Gem::Requirement
394
394
  requirements:
395
- - - ">="
395
+ - - "~>"
396
396
  - !ruby/object:Gem::Version
397
- version: '0'
397
+ version: 1.20.0
398
398
  type: :runtime
399
399
  prerelease: false
400
400
  version_requirements: !ruby/object:Gem::Requirement
401
401
  requirements:
402
- - - ">="
402
+ - - "~>"
403
403
  - !ruby/object:Gem::Version
404
- version: '0'
404
+ version: 1.20.0
405
405
  - !ruby/object:Gem::Dependency
406
406
  name: os
407
407
  requirement: !ruby/object:Gem::Requirement
408
408
  requirements:
409
- - - ">="
409
+ - - "~>"
410
410
  - !ruby/object:Gem::Version
411
- version: '0'
411
+ version: 1.0.0
412
412
  type: :runtime
413
413
  prerelease: false
414
414
  version_requirements: !ruby/object:Gem::Requirement
415
415
  requirements:
416
- - - ">="
416
+ - - "~>"
417
417
  - !ruby/object:Gem::Version
418
- version: '0'
418
+ version: 1.0.0
419
419
  - !ruby/object:Gem::Dependency
420
420
  name: rotp
421
421
  requirement: !ruby/object:Gem::Requirement
422
422
  requirements:
423
- - - ">="
423
+ - - "~>"
424
424
  - !ruby/object:Gem::Version
425
- version: '0'
425
+ version: 3.3.1
426
426
  type: :runtime
427
427
  prerelease: false
428
428
  version_requirements: !ruby/object:Gem::Requirement
429
429
  requirements:
430
- - - ">="
430
+ - - "~>"
431
431
  - !ruby/object:Gem::Version
432
- version: '0'
432
+ version: 3.3.1
433
433
  - !ruby/object:Gem::Dependency
434
434
  name: clipboard
435
435
  requirement: !ruby/object:Gem::Requirement
436
436
  requirements:
437
- - - ">="
437
+ - - "~>"
438
438
  - !ruby/object:Gem::Version
439
- version: '0'
439
+ version: 1.1.2
440
440
  type: :runtime
441
441
  prerelease: false
442
442
  version_requirements: !ruby/object:Gem::Requirement
443
443
  requirements:
444
- - - ">="
444
+ - - "~>"
445
445
  - !ruby/object:Gem::Version
446
- version: '0'
446
+ version: 1.1.2
447
447
  description: Atmos provides a terraform scaffold for creating cloud system architectures
448
448
  email:
449
449
  - matt@simplygenius.com
@@ -503,6 +503,7 @@ files:
503
503
  - lib/simplygenius/atmos/utils.rb
504
504
  - lib/simplygenius/atmos/version.rb
505
505
  - templates/new/config/atmos.yml
506
+ - templates/new/config/atmos/environments/dev.yml
506
507
  - templates/new/config/atmos/recipes.yml
507
508
  - templates/new/config/atmos/runtime.yml
508
509
  - templates/new/templates.yml