lono 7.5.2 → 8.0.0.pre.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (458) hide show
  1. checksums.yaml +4 -4
  2. data/.cody/README.md +5 -15
  3. data/.cody/acceptance/bin/build.sh +52 -0
  4. data/.cody/acceptance/buildspec.yml +10 -0
  5. data/.cody/acceptance/project.rb +6 -0
  6. data/.cody/{role.rb → acceptance/role.rb} +0 -0
  7. data/.cody/shared/script/install/lono.sh +40 -0
  8. data/.cody/shared/script/install.sh +5 -0
  9. data/CHANGELOG.md +21 -4
  10. data/CONTRIBUTING.md +2 -2
  11. data/Gemfile +5 -1
  12. data/LICENSE.txt +201 -1
  13. data/README.md +4 -4
  14. data/lib/lono/api/client.rb +3 -2
  15. data/lib/lono/app/inits.rb +13 -0
  16. data/lib/lono/app.rb +71 -0
  17. data/lib/lono/app_file/base.rb +1 -1
  18. data/lib/lono/app_file/build/lambda_layer/ruby_packager.rb +9 -9
  19. data/lib/lono/app_file/build/lambda_layer.rb +3 -3
  20. data/lib/lono/app_file/build.rb +9 -14
  21. data/lib/lono/app_file/registry/item.rb +4 -4
  22. data/lib/lono/app_file/upload.rb +1 -1
  23. data/lib/lono/autoloader.rb +2 -2
  24. data/lib/lono/aws_services/helper.rb +43 -6
  25. data/lib/lono/aws_services.rb +37 -6
  26. data/lib/lono/blueprint.rb +18 -9
  27. data/lib/lono/booter.rb +28 -0
  28. data/lib/lono/{template → builder}/context/helpers.rb +1 -1
  29. data/lib/lono/{template → builder}/context/loader/load_files.rb +5 -6
  30. data/lib/lono/builder/context/loader.rb +35 -0
  31. data/lib/lono/builder/context/params.rb +7 -0
  32. data/lib/lono/{template → builder}/context/ssm_fetcher.rb +1 -1
  33. data/lib/lono/{template → builder}/context.rb +5 -9
  34. data/lib/lono/{param/generator.rb → builder/param.rb} +21 -22
  35. data/lib/lono/builder/template/aws_service.rb +15 -0
  36. data/lib/lono/builder/template/bashify.rb +43 -0
  37. data/lib/lono/{template → builder/template}/configset_injector.rb +4 -4
  38. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/fn.rb +2 -2
  39. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/helpers/core_helper.rb +1 -1
  40. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/helpers/ec2_helper.rb +1 -1
  41. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/helpers/file_helper.rb +8 -12
  42. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/helpers/s3_helper.rb +2 -2
  43. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/helpers/stack_helper.rb +11 -8
  44. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/helpers/tags_helper.rb +1 -1
  45. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/helpers.rb +2 -2
  46. data/lib/lono/builder/template/dsl/evaluator/section/base.rb +23 -0
  47. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/section/condition.rb +1 -1
  48. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/section/mapping.rb +1 -1
  49. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/section/methods.rb +7 -7
  50. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/section/output.rb +1 -1
  51. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/section/parameter.rb +1 -1
  52. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/section/resource/property_mover.rb +1 -1
  53. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/section/resource.rb +1 -1
  54. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/section/section.rb +1 -1
  55. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/squeezer.rb +1 -1
  56. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/stringify.rb +1 -1
  57. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/syntax/extend_with.rb +1 -1
  58. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/syntax/parameter_group.rb +1 -1
  59. data/lib/lono/{template/strategy/dsl/builder → builder/template/dsl/evaluator}/syntax.rb +3 -3
  60. data/lib/lono/builder/template/dsl/evaluator.rb +45 -0
  61. data/lib/lono/{template/strategy → builder/template}/dsl/finalizer/parameter_groups.rb +2 -2
  62. data/lib/lono/{template/strategy → builder/template}/dsl/finalizer.rb +1 -1
  63. data/lib/lono/builder/template/dsl.rb +14 -0
  64. data/lib/lono/{template → builder/template}/evaluate.rb +18 -6
  65. data/lib/lono/builder/template/helpers.rb +149 -0
  66. data/lib/lono/{output/template.rb → builder/template/output.rb} +14 -7
  67. data/lib/lono/{template → builder/template}/post_processor.rb +4 -4
  68. data/lib/lono/{template → builder/template}/upload.rb +3 -5
  69. data/lib/lono/builder/template.rb +55 -0
  70. data/lib/lono/bundler/cli/base.rb +10 -0
  71. data/lib/lono/bundler/cli/bundle.rb +44 -0
  72. data/lib/lono/bundler/cli/clean.rb +27 -0
  73. data/lib/lono/bundler/cli/help/bundle.md +3 -0
  74. data/lib/lono/bundler/cli/help.rb +11 -0
  75. data/lib/lono/bundler/cli.rb +7 -0
  76. data/lib/lono/bundler/component/concerns/local_concern.rb +10 -0
  77. data/lib/lono/bundler/component/concerns/notation_concern.rb +59 -0
  78. data/lib/lono/bundler/component/concerns/path_concern.rb +68 -0
  79. data/lib/lono/bundler/component/concerns/stack_concern.rb +60 -0
  80. data/lib/lono/bundler/component/fetcher/base.rb +27 -0
  81. data/lib/lono/bundler/component/fetcher/gcs.rb +69 -0
  82. data/lib/lono/bundler/component/fetcher/git.rb +69 -0
  83. data/lib/lono/bundler/component/fetcher/local.rb +15 -0
  84. data/lib/lono/bundler/component/fetcher/s3.rb +66 -0
  85. data/lib/lono/bundler/component/fetcher.rb +18 -0
  86. data/lib/lono/bundler/component/http/concern.rb +45 -0
  87. data/lib/lono/bundler/component/http/source.rb +19 -0
  88. data/lib/lono/bundler/component/org_repo.rb +65 -0
  89. data/lib/lono/bundler/component/props/extension.rb +19 -0
  90. data/lib/lono/bundler/component/props/typer.rb +41 -0
  91. data/lib/lono/bundler/component/props.rb +122 -0
  92. data/lib/lono/bundler/component/registry.rb +136 -0
  93. data/lib/lono/bundler/component.rb +52 -0
  94. data/lib/lono/bundler/config.rb +18 -0
  95. data/lib/lono/bundler/dsl/syntax.rb +46 -0
  96. data/lib/lono/bundler/dsl.rb +21 -0
  97. data/lib/lono/bundler/exporter/base.rb +6 -0
  98. data/lib/lono/bundler/exporter/copy.rb +22 -0
  99. data/lib/lono/bundler/exporter.rb +50 -0
  100. data/lib/lono/bundler/extract/tar.rb +34 -0
  101. data/lib/lono/bundler/extract/zip.rb +16 -0
  102. data/lib/lono/bundler/info.rb +39 -0
  103. data/lib/lono/bundler/list.rb +26 -0
  104. data/lib/lono/bundler/lockfile/version_comparer.rb +56 -0
  105. data/lib/lono/bundler/lockfile/yamler.rb +36 -0
  106. data/lib/lono/bundler/lockfile.rb +66 -0
  107. data/lib/lono/bundler/lonofile.rb +32 -0
  108. data/lib/lono/bundler/runner.rb +27 -0
  109. data/lib/lono/bundler/syncer.rb +70 -0
  110. data/lib/lono/bundler/util/git.rb +37 -0
  111. data/lib/lono/bundler/util/logging.rb +7 -0
  112. data/lib/lono/bundler/util/sure.rb +5 -0
  113. data/lib/lono/{bundle.rb → bundler.rb} +38 -4
  114. data/lib/lono/cfn/base.rb +9 -195
  115. data/lib/lono/cfn/cancel.rb +9 -26
  116. data/lib/lono/cfn/concerns/build.rb +10 -0
  117. data/lib/lono/cfn/concerns/template_output.rb +10 -0
  118. data/lib/lono/cfn/concerns.rb +43 -0
  119. data/lib/lono/cfn/delete.rb +8 -32
  120. data/lib/lono/cfn/deploy/base.rb +4 -0
  121. data/lib/lono/cfn/deploy/iam.rb +49 -0
  122. data/lib/lono/cfn/deploy/notification.rb +8 -0
  123. data/lib/lono/cfn/deploy/operable.rb +18 -0
  124. data/lib/lono/cfn/deploy/opts.rb +49 -0
  125. data/lib/lono/cfn/deploy/rollback.rb +46 -0
  126. data/lib/lono/cfn/deploy/tags.rb +18 -0
  127. data/lib/lono/cfn/deploy.rb +71 -5
  128. data/lib/lono/cfn/download.rb +5 -7
  129. data/lib/lono/cfn/output.rb +49 -0
  130. data/lib/lono/cfn/plan/base.rb +19 -0
  131. data/lib/lono/cfn/plan/changeset/base.rb +19 -0
  132. data/lib/lono/cfn/plan/changeset/notifications.rb +24 -0
  133. data/lib/lono/cfn/plan/changeset/outputs.rb +25 -0
  134. data/lib/lono/cfn/plan/changeset/resources.rb +48 -0
  135. data/lib/lono/cfn/plan/changeset/tags.rb +16 -0
  136. data/lib/lono/cfn/plan/changeset.rb +136 -0
  137. data/lib/lono/cfn/plan/concerns.rb +10 -0
  138. data/lib/lono/cfn/plan/delete.rb +16 -0
  139. data/lib/lono/cfn/plan/diff/base.rb +10 -0
  140. data/lib/lono/cfn/plan/diff/data.rb +52 -0
  141. data/lib/lono/cfn/plan/diff/file.rb +56 -0
  142. data/lib/lono/cfn/plan/new.rb +26 -0
  143. data/lib/lono/cfn/{preview → plan}/param.rb +26 -34
  144. data/lib/lono/cfn/plan/summary.rb +16 -0
  145. data/lib/lono/cfn/plan/template.rb +28 -0
  146. data/lib/lono/cfn/plan.rb +33 -0
  147. data/lib/lono/cfn/show.rb +30 -0
  148. data/lib/lono/cfn/status.rb +1 -1
  149. data/lib/lono/cli/abstract.rb +17 -0
  150. data/lib/lono/cli/base.rb +9 -0
  151. data/lib/lono/cli/build.rb +101 -0
  152. data/lib/lono/cli/bundle.rb +21 -0
  153. data/lib/lono/cli/cfn/opts.rb +59 -0
  154. data/lib/lono/cli/cfn.rb +19 -0
  155. data/lib/lono/cli/clean.rb +22 -0
  156. data/lib/lono/{code.rb → cli/code.rb} +2 -2
  157. data/lib/lono/{completion.rb → cli/completion.rb} +2 -2
  158. data/lib/lono/{help → cli/help}/blueprint/new.md +4 -4
  159. data/lib/lono/{help/generate.md → cli/help/build.md} +6 -6
  160. data/lib/lono/{help → cli/help}/cfn/cancel.md +0 -0
  161. data/lib/lono/cli/help/cfn/download.md +3 -0
  162. data/lib/lono/{help → cli/help}/cfn/preview.md +9 -8
  163. data/lib/lono/{help → cli/help}/cfn/status.md +0 -0
  164. data/lib/lono/cli/help/cfn.md +4 -0
  165. data/lib/lono/{help → cli/help}/code/convert.md +0 -0
  166. data/lib/lono/{help → cli/help}/code/import.md +2 -2
  167. data/lib/lono/{help → cli/help}/completion.md +3 -3
  168. data/lib/lono/{help → cli/help}/completion_script.md +0 -0
  169. data/lib/lono/{help → cli/help}/configsets.md +0 -0
  170. data/lib/lono/cli/help/down.md +13 -0
  171. data/lib/lono/cli/help/new/project.md +34 -0
  172. data/lib/lono/{help → cli/help}/param/generate.md +0 -0
  173. data/lib/lono/cli/help/param.md +6 -0
  174. data/lib/lono/{help → cli/help}/pro/blueprints.md +0 -0
  175. data/lib/lono/{help → cli/help}/pro/configsets.md +0 -0
  176. data/lib/lono/{help → cli/help}/script/build.md +0 -0
  177. data/lib/lono/{help → cli/help}/script/upload.md +0 -0
  178. data/lib/lono/{help → cli/help}/seed.md +2 -2
  179. data/lib/lono/cli/help/summary.md +33 -0
  180. data/lib/lono/{help → cli/help}/template/bashify.md +0 -0
  181. data/lib/lono/cli/help/template/generate.md +7 -0
  182. data/lib/lono/{help → cli/help}/template.md +0 -0
  183. data/lib/lono/cli/help/up.md +30 -0
  184. data/lib/lono/{help → cli/help}/user_data.md +3 -3
  185. data/lib/lono/cli/help.rb +56 -0
  186. data/lib/lono/cli/list.rb +28 -0
  187. data/lib/lono/cli/new/blueprint.rb +33 -0
  188. data/lib/lono/cli/new/concerns.rb +16 -0
  189. data/lib/lono/{configset/new.rb → cli/new/configset.rb} +2 -9
  190. data/lib/lono/{extension/new.rb → cli/new/extension.rb} +2 -10
  191. data/lib/lono/cli/new/helper.rb +32 -0
  192. data/lib/lono/cli/new/project.rb +77 -0
  193. data/lib/lono/cli/new/sequence.rb +51 -0
  194. data/lib/lono/cli/new/shim.rb +59 -0
  195. data/lib/lono/cli/new/test/blueprint.rb +23 -0
  196. data/lib/lono/cli/new/test/sequence.rb +10 -0
  197. data/lib/lono/cli/new/test.rb +8 -0
  198. data/lib/lono/cli/new.rb +31 -0
  199. data/lib/lono/{opts.rb → cli/opts.rb} +9 -12
  200. data/lib/lono/{s3.rb → cli/s3.rb} +9 -7
  201. data/lib/lono/cli/script/base.rb +5 -0
  202. data/lib/lono/cli/script/build.rb +72 -0
  203. data/lib/lono/cli/script/upload.rb +49 -0
  204. data/lib/lono/{script.rb → cli/script.rb} +2 -2
  205. data/lib/lono/cli/seed.rb +9 -0
  206. data/lib/lono/cli/test.rb +35 -0
  207. data/lib/lono/cli.rb +80 -109
  208. data/lib/lono/command.rb +27 -0
  209. data/lib/lono/configset/{generator.rb → builder.rb} +9 -7
  210. data/lib/lono/configset/combiner.rb +8 -6
  211. data/lib/lono/configset/evaluate_file.rb +1 -1
  212. data/lib/lono/configset/meta.rb +1 -1
  213. data/lib/lono/configset/s3_file/build.rb +5 -4
  214. data/lib/lono/configset/s3_file/item.rb +1 -1
  215. data/lib/lono/configset/s3_file/upload.rb +2 -2
  216. data/lib/lono/configset/strategy/base.rb +6 -6
  217. data/lib/lono/configset/strategy/helpers/dsl/core.rb +1 -1
  218. data/lib/lono/core.rb +25 -54
  219. data/lib/lono/extensions/dsl.rb +2 -5
  220. data/lib/lono/extensions/loader.rb +1 -12
  221. data/lib/lono/extensions.rb +2 -2
  222. data/lib/lono/importer/base.rb +5 -5
  223. data/lib/lono/importer/download.rb +7 -7
  224. data/lib/lono/importer/dsl.rb +3 -3
  225. data/lib/lono/importer/service/coder.rb +10 -10
  226. data/lib/lono/importer.rb +1 -10
  227. data/lib/lono/inspector/base.rb +7 -7
  228. data/lib/lono/inspector/summary.rb +19 -17
  229. data/lib/lono/layering/layer.rb +126 -0
  230. data/lib/lono/layering.rb +13 -55
  231. data/lib/lono/logger/formatter.rb +13 -0
  232. data/lib/lono/logger.rb +33 -0
  233. data/lib/lono/lookup.rb +12 -0
  234. data/lib/lono/names.rb +50 -0
  235. data/lib/lono/plugin/meta.rb +30 -0
  236. data/lib/lono/plugin/tester.rb +13 -0
  237. data/lib/lono/plugin.rb +10 -0
  238. data/lib/lono/s3/aws_setup.rb +4 -3
  239. data/lib/lono/s3/bucket.rb +19 -19
  240. data/lib/lono/s3/uploader.rb +10 -12
  241. data/lib/lono/script/base.rb +3 -3
  242. data/lib/lono/script/build.rb +11 -12
  243. data/lib/lono/script/upload.rb +7 -7
  244. data/lib/lono/{seed → seeder}/service_role.rb +1 -1
  245. data/lib/lono/{seed/base.rb → seeder.rb} +21 -36
  246. data/lib/lono/user_data.rb +8 -13
  247. data/lib/lono/utils/context.rb +15 -0
  248. data/lib/lono/utils/item/zip.rb +5 -5
  249. data/lib/lono/utils/logging.rb +7 -0
  250. data/lib/lono/utils/{pretty_time.rb → pretty.rb} +6 -2
  251. data/lib/lono/utils/quit.rb +7 -0
  252. data/lib/lono/utils/rsync.rb +4 -2
  253. data/lib/lono/utils/sure.rb +4 -4
  254. data/lib/lono/version.rb +1 -1
  255. data/lib/lono.rb +7 -12
  256. data/lib/templates/blueprint/template.rb +2 -0
  257. data/lib/templates/configset/{lib/configset.rb → configset.rb} +0 -0
  258. data/lib/templates/examples/blueprint/template.rb +9 -0
  259. data/lib/templates/helper/%underscore_name%_helper.rb.tt +6 -0
  260. data/lib/templates/{skeleton → project}/.gitignore +1 -2
  261. data/lib/templates/project/Gemfile.tt +11 -0
  262. data/lib/templates/project/README.md +9 -0
  263. data/lib/templates/project/config/app.rb +3 -0
  264. data/lib/templates/shim/lono +7 -0
  265. data/lono.gemspec +51 -44
  266. metadata +246 -269
  267. data/.circleci/README.md +0 -3
  268. data/.circleci/config.yml +0 -58
  269. data/.cody/acceptance.sh +0 -49
  270. data/.cody/buildspec.yml +0 -9
  271. data/.cody/demo.rb +0 -38
  272. data/.cody/project.rb +0 -6
  273. data/.gitmodules +0 -3
  274. data/lib/lono/abstract_base.rb +0 -25
  275. data/lib/lono/aws_services/stack.rb +0 -41
  276. data/lib/lono/aws_services/stack_set.rb +0 -41
  277. data/lib/lono/blueprint/configset/loader.rb +0 -7
  278. data/lib/lono/blueprint/helper.rb +0 -24
  279. data/lib/lono/blueprint/meta.rb +0 -30
  280. data/lib/lono/blueprint/new.rb +0 -127
  281. data/lib/lono/blueprint/root.rb +0 -25
  282. data/lib/lono/cfn/create.rb +0 -41
  283. data/lib/lono/cfn/opts.rb +0 -88
  284. data/lib/lono/cfn/preview/changeset.rb +0 -168
  285. data/lib/lono/cfn/preview/codediff.rb +0 -41
  286. data/lib/lono/cfn/preview/diff_viewer.rb +0 -23
  287. data/lib/lono/cfn/rollback.rb +0 -26
  288. data/lib/lono/cfn/update.rb +0 -71
  289. data/lib/lono/cfn.rb +0 -75
  290. data/lib/lono/clean.rb +0 -14
  291. data/lib/lono/configset/list.rb +0 -67
  292. data/lib/lono/configset/preparer.rb +0 -44
  293. data/lib/lono/configset/register/base.rb +0 -122
  294. data/lib/lono/configset/register/blueprint.rb +0 -16
  295. data/lib/lono/configset/register/dsl.rb +0 -14
  296. data/lib/lono/configset/register/project.rb +0 -13
  297. data/lib/lono/configset/resolver.rb +0 -47
  298. data/lib/lono/configset.rb +0 -16
  299. data/lib/lono/conventions.rb +0 -23
  300. data/lib/lono/core/config.rb +0 -22
  301. data/lib/lono/default/settings.yml +0 -21
  302. data/lib/lono/ext/bundler.rb +0 -7
  303. data/lib/lono/extension/helper.rb +0 -13
  304. data/lib/lono/extension/list.rb +0 -40
  305. data/lib/lono/extension.rb +0 -9
  306. data/lib/lono/extensions/preparer.rb +0 -26
  307. data/lib/lono/extensions/register.rb +0 -15
  308. data/lib/lono/file_uploader.rb +0 -21
  309. data/lib/lono/finder/base.rb +0 -152
  310. data/lib/lono/finder/blueprint/configset.rb +0 -17
  311. data/lib/lono/finder/blueprint.rb +0 -11
  312. data/lib/lono/finder/configset.rb +0 -11
  313. data/lib/lono/finder/extension.rb +0 -11
  314. data/lib/lono/generate.rb +0 -111
  315. data/lib/lono/help/cfn/create.md +0 -26
  316. data/lib/lono/help/cfn/delete.md +0 -13
  317. data/lib/lono/help/cfn/deploy.md +0 -21
  318. data/lib/lono/help/cfn/download.md +0 -3
  319. data/lib/lono/help/cfn/update.md +0 -49
  320. data/lib/lono/help/cfn.md +0 -7
  321. data/lib/lono/help/new.md +0 -57
  322. data/lib/lono/help/param.md +0 -6
  323. data/lib/lono/help/set_instances/delete.md +0 -21
  324. data/lib/lono/help/set_instances/deploy.md +0 -31
  325. data/lib/lono/help/set_instances/list.md +0 -14
  326. data/lib/lono/help/set_instances/status.md +0 -15
  327. data/lib/lono/help/set_instances/sync.md +0 -92
  328. data/lib/lono/help/sets/delete.md +0 -8
  329. data/lib/lono/help/sets/deploy.md +0 -76
  330. data/lib/lono/help/sets/status.md +0 -23
  331. data/lib/lono/help/summary.md +0 -33
  332. data/lib/lono/help/template/generate.md +0 -7
  333. data/lib/lono/help/upgrade.md +0 -1
  334. data/lib/lono/help/xgraph.md +0 -16
  335. data/lib/lono/help.rb +0 -15
  336. data/lib/lono/importer/erb.rb +0 -31
  337. data/lib/lono/inspector/graph.rb +0 -125
  338. data/lib/lono/jade/circular.rb +0 -26
  339. data/lib/lono/jade/materializer/final.rb +0 -10
  340. data/lib/lono/jade/materializer/gems_builder.rb +0 -81
  341. data/lib/lono/jade/materializer/source.rb +0 -54
  342. data/lib/lono/jade/materializer.rb +0 -15
  343. data/lib/lono/jade/registry.rb +0 -64
  344. data/lib/lono/jade.rb +0 -110
  345. data/lib/lono/jadespec.rb +0 -68
  346. data/lib/lono/new/helper.rb +0 -15
  347. data/lib/lono/new.rb +0 -95
  348. data/lib/lono/param.rb +0 -14
  349. data/lib/lono/pro/base.rb +0 -16
  350. data/lib/lono/pro/repo.rb +0 -28
  351. data/lib/lono/pro.rb +0 -15
  352. data/lib/lono/project_checker.rb +0 -35
  353. data/lib/lono/registration/base.rb +0 -37
  354. data/lib/lono/registration/check.rb +0 -15
  355. data/lib/lono/registration/temp.rb +0 -53
  356. data/lib/lono/registration/user.rb +0 -60
  357. data/lib/lono/seed.rb +0 -39
  358. data/lib/lono/sequence.rb +0 -35
  359. data/lib/lono/set_instances/base.rb +0 -30
  360. data/lib/lono/set_instances/changeable.rb +0 -53
  361. data/lib/lono/set_instances/create.rb +0 -7
  362. data/lib/lono/set_instances/delete.rb +0 -47
  363. data/lib/lono/set_instances/deploy.rb +0 -52
  364. data/lib/lono/set_instances/list.rb +0 -13
  365. data/lib/lono/set_instances/opts.rb +0 -37
  366. data/lib/lono/set_instances/status.rb +0 -12
  367. data/lib/lono/set_instances/sync.rb +0 -181
  368. data/lib/lono/set_instances/update.rb +0 -15
  369. data/lib/lono/set_instances.rb +0 -54
  370. data/lib/lono/sets/base.rb +0 -50
  371. data/lib/lono/sets/create.rb +0 -27
  372. data/lib/lono/sets/delete.rb +0 -43
  373. data/lib/lono/sets/deploy.rb +0 -11
  374. data/lib/lono/sets/list.rb +0 -35
  375. data/lib/lono/sets/opts.rb +0 -18
  376. data/lib/lono/sets/preview/codediff.rb +0 -35
  377. data/lib/lono/sets/preview/param.rb +0 -32
  378. data/lib/lono/sets/status/instance/base.rb +0 -120
  379. data/lib/lono/sets/status/instance/completed.rb +0 -35
  380. data/lib/lono/sets/status/instance/deleted.rb +0 -32
  381. data/lib/lono/sets/status/instance/show.rb +0 -7
  382. data/lib/lono/sets/status/instance.rb +0 -20
  383. data/lib/lono/sets/status/instances.rb +0 -136
  384. data/lib/lono/sets/status.rb +0 -128
  385. data/lib/lono/sets/summarize.rb +0 -22
  386. data/lib/lono/sets/time_spent.rb +0 -11
  387. data/lib/lono/sets/update.rb +0 -74
  388. data/lib/lono/sets/waiter.rb +0 -23
  389. data/lib/lono/sets.rb +0 -34
  390. data/lib/lono/setting.rb +0 -75
  391. data/lib/lono/template/aws_service.rb +0 -20
  392. data/lib/lono/template/bashify.rb +0 -39
  393. data/lib/lono/template/context/loader.rb +0 -52
  394. data/lib/lono/template/generator.rb +0 -23
  395. data/lib/lono/template/helper.rb +0 -152
  396. data/lib/lono/template/strategy/base.rb +0 -4
  397. data/lib/lono/template/strategy/common/helpers.rb +0 -44
  398. data/lib/lono/template/strategy/dsl/builder/section/base.rb +0 -30
  399. data/lib/lono/template/strategy/dsl/builder.rb +0 -59
  400. data/lib/lono/template/strategy/dsl.rb +0 -14
  401. data/lib/lono/template/strategy/erb.rb +0 -82
  402. data/lib/lono/template/strategy/source.rb +0 -8
  403. data/lib/lono/template/template.rb +0 -54
  404. data/lib/lono/template/util.rb +0 -8
  405. data/lib/lono/template.rb +0 -24
  406. data/lib/lono/upgrade.rb +0 -20
  407. data/lib/lono/utils/generators/tree.rb +0 -18
  408. data/lib/templates/blueprint/%blueprint_name%.gemspec.tt +0 -45
  409. data/lib/templates/blueprint/.gitignore +0 -11
  410. data/lib/templates/blueprint/CHANGELOG.md +0 -7
  411. data/lib/templates/blueprint/Gemfile +0 -4
  412. data/lib/templates/blueprint/README.md.tt +0 -33
  413. data/lib/templates/blueprint/Rakefile.tt +0 -9
  414. data/lib/templates/blueprint/seed/configs.rb +0 -28
  415. data/lib/templates/blueprint_types/dsl/app/templates/%blueprint_name%.rb +0 -36
  416. data/lib/templates/blueprint_types/dsl/app/user_data/bootstrap.sh +0 -2
  417. data/lib/templates/blueprint_types/erb/app/definitions/base.rb.tt +0 -1
  418. data/lib/templates/blueprint_types/erb/app/templates/%blueprint_name%.yml +0 -67
  419. data/lib/templates/configset/%configset_name%.gemspec.tt +0 -42
  420. data/lib/templates/configset/.gitignore +0 -10
  421. data/lib/templates/configset/CHANGELOG.md +0 -7
  422. data/lib/templates/configset/Gemfile +0 -4
  423. data/lib/templates/configset/README.md.tt +0 -3
  424. data/lib/templates/configset/Rakefile.tt +0 -9
  425. data/lib/templates/extension/%extension_name%.gemspec.tt +0 -46
  426. data/lib/templates/extension/.gitignore +0 -11
  427. data/lib/templates/extension/.rspec +0 -3
  428. data/lib/templates/extension/CHANGELOG.md +0 -7
  429. data/lib/templates/extension/Gemfile.tt +0 -4
  430. data/lib/templates/extension/Rakefile.tt +0 -9
  431. data/lib/templates/extension/spec/spec_helper.rb.tt +0 -29
  432. data/lib/templates/skeleton/Gemfile +0 -3
  433. data/lib/templates/skeleton/README.md +0 -58
  434. data/lib/templates/skeleton/configs/settings.yml +0 -13
  435. data/vendor/cfn-status/CHANGELOG.md +0 -14
  436. data/vendor/cfn-status/Gemfile +0 -4
  437. data/vendor/cfn-status/Gemfile.lock +0 -49
  438. data/vendor/cfn-status/LICENSE.txt +0 -21
  439. data/vendor/cfn-status/README.md +0 -58
  440. data/vendor/cfn-status/Rakefile +0 -6
  441. data/vendor/cfn-status/bin/console +0 -14
  442. data/vendor/cfn-status/bin/setup +0 -8
  443. data/vendor/cfn-status/cfn-status.gemspec +0 -30
  444. data/vendor/cfn-status/lib/cfn-status.rb +0 -1
  445. data/vendor/cfn-status/lib/cfn_status/aws_service.rb +0 -51
  446. data/vendor/cfn-status/lib/cfn_status/version.rb +0 -3
  447. data/vendor/cfn-status/lib/cfn_status.rb +0 -245
  448. data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-1.json +0 -1103
  449. data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-2.json +0 -1104
  450. data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-3.json +0 -1103
  451. data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-1.json +0 -1103
  452. data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-2.json +0 -1104
  453. data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-3.json +0 -1103
  454. data/vendor/cfn-status/spec/fixtures/cfn/stack-events-complete.json +0 -1080
  455. data/vendor/cfn-status/spec/fixtures/cfn/stack-events-in-progress.json +0 -1080
  456. data/vendor/cfn-status/spec/fixtures/cfn/stack-events-update-rollback-complete.json +0 -1086
  457. data/vendor/cfn-status/spec/lib/cfn_status_spec.rb +0 -153
  458. data/vendor/cfn-status/spec/spec_helper.rb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9bb488fbda283f04107b4e461bf641727b5235d748a3a417bc6dced426fe67f1
4
- data.tar.gz: 90530c32b44d161ac7a0b5bdd546a15bb37b04946ed8a4de6ce39f9b968ad4a6
3
+ metadata.gz: 93888f3a1dc76f9c5e21f98c0edf5d03ee7ba4cdcf9e5a4115b0ee1ce0f3b518
4
+ data.tar.gz: 22b18e2ccc2e98a41c57903aef1e67677f40dd48a953359447ef5546942f7ccb
5
5
  SHA512:
6
- metadata.gz: cf60e6101ecad062a69f04ec343e7cb7e73d5b07252cf9546fbe71f5bae3a39a13b2b09faaa5213b44f86309e9bf7907022c337ad4f14cb57af3afacc1be3658
7
- data.tar.gz: a3ddbafb4524a7f885e680021cd5fb07e8dc228e28b7a1c13dac73ebc475233f57e1ec93c35eecbe4eb155182cf807947791d875ac055042fa43c12a856462cf
6
+ metadata.gz: 67562f7b0059f63f0cd33c93157f4bc0d7182125305b9602f67cb6d3a13094c1d6c1f84f0fe493800ba917cb2404b0f31c789744ff6ef2232b1629b7b51ef34f
7
+ data.tar.gz: 7f9c0b5998e36e2acf9cef7dacdfd115ce8bcb49fde35c6664008fe31820e0ed4ce14c36897fc733c93ac93a5033770d1cdf4bf29d170420cc8335b0432cb35d
data/.cody/README.md CHANGED
@@ -2,28 +2,18 @@
2
2
 
3
3
  CodeBuild is used to run **acceptance-level tests**.
4
4
 
5
- ## Cody Files
6
-
7
- The files in folder are used by cody to build AWS CodeBuild projects. For more info, check out the [cody docs](https://cody.run). Here's a quick start.
8
-
9
- ## Install Tool
10
-
11
- gem install cody
12
-
13
- This installs the `cody` command to manage the AWS CodeBuild project.
14
-
15
- ## Update Project
5
+ ## Deploy Project
16
6
 
17
7
  To update the CodeBuild project that handles deployment:
18
8
 
19
- cody deploy lono
9
+ cody deploy lono -t acceptance
20
10
 
21
- ## Start a Deploy
11
+ ## Start Build
22
12
 
23
13
  To start a CodeBuild build:
24
14
 
25
- cody start lono
15
+ cody start lono -t acceptance
26
16
 
27
17
  To specify a branch:
28
18
 
29
- cody start lono -b feature
19
+ cody start lono -t acceptance -b feature
@@ -0,0 +1,52 @@
1
+ #!/bin/bash
2
+
3
+ final_status=0
4
+ function final_status {
5
+ if [ "$?" -ne "0" ] && [ $final_status -ne 1 ] ; then
6
+ final_status=1
7
+ fi
8
+ }
9
+
10
+ set -eu
11
+ # will build from /tmp because terraspace/Gemfile may interfere
12
+ cd /tmp
13
+ export PATH=~/bin:$PATH # ~/bin/lono wrapper
14
+
15
+ lono new project infra
16
+ cd infra
17
+
18
+ # Rewrite the Gemfile to use the local lono gem for testing
19
+ cat << EOF > Gemfile
20
+ source "https://rubygems.org"
21
+ gem "lono", path: "$CODEBUILD_SRC_DIR", submodules: true
22
+ gem "rspec-lono", git: "https://github.com/boltops-tools/rspec-lono", branch: "master"
23
+ EOF
24
+ cat Gemfile
25
+
26
+ bundle # install lono gem in the infra project
27
+
28
+ export LONO_ENV="test-$(date +%Y%m%d%H%M%S)"
29
+ lono new blueprint demo --examples
30
+
31
+ # Continue on error and capture final exit status so lono down always and cleans up stack
32
+ set +e
33
+ # Test new stack creation
34
+ lono up demo -y
35
+ final_status
36
+
37
+ lono seed demo # just to test it. will overwrite file
38
+ final_status
39
+
40
+ # Test stack update
41
+ cat << EOF > config/blueprints/demo/params/$LONO_ENV.txt
42
+ AccessControl=PublicRead
43
+ EOF
44
+ lono up demo -y
45
+ final_status
46
+
47
+ # Clean up resources
48
+ lono down demo -y
49
+ final_status
50
+ set -e
51
+
52
+ exit $final_status
@@ -0,0 +1,10 @@
1
+ version: 0.2
2
+
3
+ phases:
4
+ install:
5
+ runtime-versions:
6
+ ruby: latest
7
+ build:
8
+ commands:
9
+ - .cody/shared/script/install.sh
10
+ - .cody/acceptance/bin/build.sh
@@ -0,0 +1,6 @@
1
+ github_url("https://github.com/boltops-tools/lono")
2
+ linux_image("aws/codebuild/amazonlinux2-x86_64-standard:3.0")
3
+ # triggers(
4
+ # webhook: true,
5
+ # filter_groups: [[{type: "EVENT", pattern: "PUSH"}]]
6
+ # )
File without changes
@@ -0,0 +1,40 @@
1
+ #!/bin/bash
2
+
3
+ set -eux
4
+
5
+ export PATH=~/bin:$PATH
6
+
7
+ cat << 'EOF' > ~/.gemrc
8
+ ---
9
+ :backtrace: false
10
+ :bulk_threshold: 1000
11
+ :sources:
12
+ - https://rubygems.org
13
+ :update_sources: true
14
+ :verbose: true
15
+ benchmark: false
16
+ install: "--no-ri --no-rdoc --no-document"
17
+ update: "--no-ri --no-rdoc --no-document"
18
+ EOF
19
+
20
+ gem install bundler # upgrade bundler
21
+
22
+ # In original lono source and install lono
23
+ cd $CODEBUILD_SRC_DIR # lono folder - in case code is added later above this that uses cd
24
+ bundle install
25
+ bundle exec rake install
26
+
27
+ mkdir -p ~/bin
28
+ cat << EOF > ~/bin/lono
29
+ #!/bin/bash
30
+ # If there's a Gemfile, assume we're in a lono project with a Gemfile for lono
31
+ if [ -f Gemfile ]; then
32
+ exec bundle exec $CODEBUILD_SRC_DIR/exe/lono "\$@"
33
+ else
34
+ exec $CODEBUILD_SRC_DIR/exe/lono "\$@"
35
+ fi
36
+ EOF
37
+
38
+ cat ~/bin/lono
39
+
40
+ chmod a+x ~/bin/lono
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+
3
+ set -eu
4
+
5
+ .cody/shared/script/install/lono.sh
data/CHANGELOG.md CHANGED
@@ -1,7 +1,24 @@
1
1
  # Change Log
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
- This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
4
+ This project *tries* to adhere to [Semantic Versioning](http://semver.org/).
5
+
6
+ ## [8.0.0.rc1] - 2022-02-21
7
+
8
+ * v8 cleaner and simplier interface
9
+ * commands: lono up, down, bundle, list, new, output, plan
10
+ * conventional stack name
11
+ * lono new generators
12
+ * improve lono plan previews
13
+ * improve layering
14
+ * boot hooks
15
+ * change default env to dev
16
+ * app config support: config.names.stack, etc
17
+ * change --sure to --yes option
18
+ * remove core settings in favor of config/app.rb
19
+ * logger support
20
+ * remove docs. move to separate repo
21
+ * plugin system and test framework
5
22
 
6
23
  ## [7.5.2] - 2022-02-08
7
24
  - [#74](https://github.com/boltops-tools/lono/pull/74) activesupport require fix
@@ -137,7 +154,7 @@ This project *tries* to adhere to [Semantic Versioning](http://semver.org/), eve
137
154
  ## [6.1.9]
138
155
  - #30 fix md5 sum calcuation for single file
139
156
  - #31 Add app files ERB support docs
140
- - options `--sure` and `--iam` add `CAPABILITY_AUTO_EXPAND` for serverless transform
157
+ - options `-y` and `--iam` add `CAPABILITY_AUTO_EXPAND` for serverless transform
141
158
 
142
159
  ## [6.1.8]
143
160
  - #28 add user_data_script helper
@@ -243,7 +260,7 @@ This project *tries* to adhere to [Semantic Versioning](http://semver.org/), eve
243
260
 
244
261
  ## [5.2.2]
245
262
  - seed only support params for main conventional template in blueprint
246
- - set --iam with --sure option also
263
+ - set --iam with -y option also
247
264
 
248
265
  ## [5.2.1]
249
266
  - improve param lookup
@@ -265,7 +282,7 @@ This project *tries* to adhere to [Semantic Versioning](http://semver.org/), eve
265
282
  ## [5.0.1]
266
283
  - Introduce lono DSL and set as default mode
267
284
  - Introduce blueprints concept
268
- - Introduce lono cfn deploy command
285
+ - Introduce lono up command
269
286
  - Auto-create lono managed s3 bucket
270
287
  - Zeitwerk autoloader
271
288
  - Restructure project structure
data/CONTRIBUTING.md CHANGED
@@ -13,7 +13,7 @@ Here are some ways *you* can contribute:
13
13
  * by closing [issues][]
14
14
  * by reviewing patches
15
15
 
16
- [issues]: https://github.com/tongueroo/lono/issues
16
+ [issues]: https://github.com/boltops-tools/lono/issues
17
17
 
18
18
  ## Submitting an Issue
19
19
 
@@ -48,7 +48,7 @@ already been submitted.
48
48
  asking for help. We love helping!
49
49
  * Please don't update the Gem version.
50
50
 
51
- [repo]: https://github.com/tongueroo/lono/tree/master
51
+ [repo]: https://github.com/boltops-tools/lono/tree/master
52
52
  [fork]: https://help.github.com/articles/fork-a-repo/
53
53
  [branch]: https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/
54
54
  [pr]: https://help.github.com/articles/using-pull-requests/
data/Gemfile CHANGED
@@ -3,4 +3,8 @@ source "https://rubygems.org"
3
3
  # Specify your gem dependencies in lono.gemspec
4
4
  gemspec
5
5
 
6
- gem "codeclimate-test-reporter", group: :test, require: nil
6
+ if ENV['C9_USER']
7
+ gem "rspec-lono", path: "~/boltops-tools/rspec-lono"
8
+ else
9
+ gem "rspec-lono", git: "https://github.com/boltops-tools/rspec-lono", branch: "master"
10
+ end
data/LICENSE.txt CHANGED
@@ -1 +1,201 @@
1
- https://www.boltops.com/boltops-community-license
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
data/README.md CHANGED
@@ -18,7 +18,7 @@ Lono is a CloudFormation framework. It builds, manages, and deploys CloudFormati
18
18
  * Simple CLI interface to launch CloudFormation stacks.
19
19
  * Ability to use [Existing CloudFormation Templates](https://lono.cloud/docs/existing-templates/).
20
20
  * [The Lono DSL](https://lono.cloud/docs/dsl/) - Generate templates from beautiful code.
21
- * Write your CloudFormation parameters with [simple env-like values](https://lono.cloud/docs/configs/params/).
21
+ * Write your CloudFormation parameters with [simple env-like values](https://lono.cloud/docs/config/params/).
22
22
  * Preview CloudFormation changes before pressing the big red button.
23
23
  * [Layering](https://lono.cloud/docs/core/layering/) - Allows you to build multiple environments like development and production with the same template.
24
24
  * [Variables](https://lono.cloud/docs/layering/variables/) - Allows you to construct templates where runtime Parameters do not suffice.
@@ -39,7 +39,7 @@ It only takes a couple of commands to start using lono.
39
39
  lono new infra
40
40
  cd infra
41
41
  lono blueprint new demo
42
- lono cfn deploy demo
42
+ lono up demo
43
43
 
44
44
  ![Lono flowchart](https://lono.cloud/img/tutorial/lono-flowchart.png "Lono flowchart")
45
45
 
@@ -73,9 +73,9 @@ output("SecurityGroup", get_att("SecurityGroup.GroupId"))
73
73
 
74
74
  ### Lono Cfn Deploy
75
75
 
76
- Lono provides a `lono cfn` lifecycle command that allows you to launch stacks quickly. The `lono cfn deploy` generates and launches the CloudFormation stack. If you are in a lono project and have a `demo` lono blueprint. To create a stack run:
76
+ Lono provides a `lono cfn` lifecycle command that allows you to launch stacks quickly. The `lono up` generates and launches the CloudFormation stack. If you are in a lono project and have a `demo` lono blueprint. To create a stack run:
77
77
 
78
- $ lono cfn deploy demo
78
+ $ lono up demo
79
79
 
80
80
  ## Contributing
81
81
 
@@ -3,6 +3,7 @@ module Lono::Api
3
3
  extend Memoist
4
4
  include Verify
5
5
  include Repos
6
+ include Lono::Utils::Logging
6
7
 
7
8
  def http
8
9
  Proxy.new
@@ -20,8 +21,8 @@ module Lono::Api
20
21
  end
21
22
  else
22
23
  if ENV['LONO_DEBUG_API']
23
- puts "Error: Non-successful http response status code: #{res.code}"
24
- puts "headers: #{res.each_header.to_h.inspect}"
24
+ logger.info "Error: Non-successful http response status code: #{res.code}"
25
+ logger.info "headers: #{res.each_header.to_h.inspect}"
25
26
  end
26
27
  nil
27
28
  end
@@ -0,0 +1,13 @@
1
+ class Lono::App
2
+ class Inits
3
+ class << self
4
+ include DslEvaluator
5
+
6
+ def run_all
7
+ Dir.glob("#{Lono.root}/config/inits/*.rb").each do |path|
8
+ evaluate_file(path)
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
data/lib/lono/app.rb ADDED
@@ -0,0 +1,71 @@
1
+ module Lono
2
+ class App
3
+ extend Memoist
4
+ include DslEvaluator
5
+ include Singleton
6
+ include Lono::Utils::Logging
7
+
8
+ attr_reader :config
9
+ def initialize
10
+ @config = defaults
11
+ end
12
+
13
+ def defaults
14
+ config = ActiveSupport::OrderedOptions.new
15
+
16
+ config.log = ActiveSupport::OrderedOptions.new
17
+ config.log.root = Lono.log_root
18
+ config.logger = lono_logger
19
+ config.logger.formatter = Logger::Formatter.new
20
+ config.logger.level = ENV['LONO_LOG_LEVEL'] || :info
21
+
22
+ config.names = ActiveSupport::OrderedOptions.new
23
+ config.names.stack = ":APP-:BLUEPRINT-:ENV"
24
+ config.names.output = ActiveSupport::OrderedOptions.new
25
+ config.names.output.stack = ":BLUEPRINT-:ENV" # does not include APP by default. Think this is more common
26
+ config.names.output.expand = true
27
+
28
+ config.paths = ActiveSupport::OrderedOptions.new
29
+ config.paths.scripts = "scripts"
30
+ config.paths.content = "content"
31
+ config.paths.helpers = "helpers"
32
+ config.paths.user_data = "user_data"
33
+
34
+ config.up = ActiveSupport::OrderedOptions.new
35
+ config.up.capabilities = nil
36
+ config.up.notification_arns = nil
37
+ config.up.rollback = true
38
+ config.up.tags = nil
39
+
40
+ config.diff = ActiveSupport::OrderedOptions.new
41
+ config.diff.changeset = true
42
+ config.diff.params = "full"
43
+ config.diff.template = "summary" # summary is same as true
44
+
45
+ config.extract_scripts = {}
46
+
47
+ config.test = ActiveSupport::OrderedOptions.new
48
+ config.test.framework = "rspec"
49
+
50
+ config.layering = ActiveSupport::OrderedOptions.new
51
+ config.layering.names = {}
52
+
53
+ config
54
+ end
55
+
56
+ def lono_logger
57
+ Logger.new(ENV['LONO_LOG_PATH'] || $stderr)
58
+ end
59
+ memoize :lono_logger
60
+
61
+ def configure
62
+ yield(@config)
63
+ end
64
+
65
+ def load_project_config
66
+ evaluate_file("#{Lono.root}/config/app.rb")
67
+ path = "#{Lono.root}/config/envs/#{Lono.env}.rb"
68
+ evaluate_file(path)
69
+ end
70
+ end
71
+ end
@@ -1,6 +1,6 @@
1
1
  # Naming AppFile instead of File so we dont to use ::File for normal regular File class
2
2
  module Lono::AppFile
3
- class Base < Lono::AbstractBase
3
+ class Base < Lono::CLI::Base
4
4
  # What's needed for a Thor::Group or "Sequence". Gives us Thor::Actions commands like create_file
5
5
  # Must be included before `def initialize` as we override the Thor initialize
6
6
  include Thor::Actions
@@ -4,10 +4,10 @@ class Lono::AppFile::Build::LambdaLayer
4
4
  include Lono::Utils::Rsync
5
5
 
6
6
  def initialize(blueprint, registry_item)
7
- @blueprint, @registry_item = blueprint, registry_item
7
+ @blueprint.name, @registry_item = blueprint, registry_item
8
8
 
9
9
  @registry_name = @registry_item.name.sub(/\/$/,'')
10
- @app_root = "#{Lono.blueprint_root}/app/files/#{@registry_name}"
10
+ @app_root = "#{@blueprint.root}/app/files/#{@registry_name}"
11
11
  end
12
12
 
13
13
  def build
@@ -42,7 +42,7 @@ class Lono::AppFile::Build::LambdaLayer
42
42
 
43
43
  # create symlink in output path not the cache path
44
44
  symlink_dest = "#{output_area}/vendor/gems/ruby/#{ruby_folder}"
45
- puts "symlink_dest #{symlink_dest}"
45
+ logger.info "symlink_dest #{symlink_dest}"
46
46
  FileUtils.rm_rf(symlink_dest) # blow away original 2.5.0 folder
47
47
 
48
48
  # Create symlink that will point to the gems in the Lambda Layer:
@@ -68,7 +68,7 @@ class Lono::AppFile::Build::LambdaLayer
68
68
  # project gets built again not all the gems from get installed from the
69
69
  # beginning.
70
70
  def bundle_install
71
- puts "Bundling: running bundle install in cache area: #{cache_area}."
71
+ logger.info "Bundling: running bundle install in cache area: #{cache_area}."
72
72
 
73
73
  rsync(output_area, cache_area)
74
74
 
@@ -85,15 +85,15 @@ class Lono::AppFile::Build::LambdaLayer
85
85
  FileUtils.rm_rf("#{cache_area}/.bundle")
86
86
  require "bundler" # dynamically require bundler so user can use any bundler
87
87
  setup_bundle_config(cache_area)
88
- Bundler.with_unbundled_env do
88
+ ::Bundler.with_unbundled_env do
89
89
  sh "cd #{cache_area} && env bundle install"
90
90
  end
91
91
 
92
92
  remove_bundled_with("#{cache_area}/Gemfile.lock")
93
93
  # Fixes really tricky bug where Gemfile and Gemfile.lock is out-of-sync. Details: https://gist.github.com/tongueroo/b5b0d0c924a4a1633eee514795e4b04b
94
- FileUtils.cp("#{cache_area}/Gemfile.lock", "#{Lono.config.output_path}/#{@blueprint}/files/#{@registry_name}/Gemfile.lock")
94
+ FileUtils.cp("#{cache_area}/Gemfile.lock", "#{Lono.root}/output/#{@blueprint.name}/files/#{@registry_name}/Gemfile.lock")
95
95
 
96
- puts 'Bundle install success.'
96
+ logger.info 'Bundle install success.'
97
97
  end
98
98
 
99
99
  # Remove the BUNDLED WITH line since we don't control the bundler gem version on AWS Lambda
@@ -130,11 +130,11 @@ EOL
130
130
  end
131
131
 
132
132
  def output_area
133
- "#{Lono.config.output_path}/#{@blueprint}/files/#{@registry_name}"
133
+ "#{Lono.root}/output/#{@blueprint.name}/files/#{@registry_name}"
134
134
  end
135
135
 
136
136
  def build_area
137
- "#{Lono.config.output_path}/#{@blueprint}/lambda_layers/#{@registry_name}"
137
+ "#{Lono.root}/output/#{@blueprint.name}/lambda_layers/#{@registry_name}"
138
138
  end
139
139
 
140
140
  def cache_area