lono 7.5.2 → 8.0.0.pre.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.cody/README.md +5 -15
- data/.cody/acceptance/bin/build.sh +52 -0
- data/.cody/acceptance/buildspec.yml +10 -0
- data/.cody/acceptance/project.rb +6 -0
- data/.cody/{role.rb → acceptance/role.rb} +0 -0
- data/.cody/shared/script/install/lono.sh +40 -0
- data/.cody/shared/script/install.sh +5 -0
- data/CHANGELOG.md +46 -5
- data/CONTRIBUTING.md +2 -2
- data/Gemfile +3 -1
- data/LICENSE.txt +201 -1
- data/README.md +6 -11
- data/lib/lono/api/client.rb +3 -2
- data/lib/lono/app/callable_option/concern.rb +12 -0
- data/lib/lono/app/callable_option.rb +56 -0
- data/lib/lono/app/inits.rb +13 -0
- data/lib/lono/app.rb +73 -0
- data/lib/lono/autoloader.rb +3 -2
- data/lib/lono/aws_services/helper.rb +41 -6
- data/lib/lono/aws_services.rb +37 -6
- data/lib/lono/blueprint.rb +3 -11
- data/lib/lono/booter.rb +28 -0
- data/lib/lono/builder/allow/base.rb +54 -0
- data/lib/lono/builder/allow/env.rb +17 -0
- data/lib/lono/builder/allow/region.rb +20 -0
- data/lib/lono/builder/allow.rb +8 -0
- data/lib/lono/builder/configset/combiner.rb +145 -0
- data/lib/lono/builder/configset/definition/base.rb +47 -0
- data/lib/lono/builder/configset/definition/context.rb +29 -0
- data/lib/lono/{configset/strategy/helpers/dsl → builder/configset/definition/dsl/syntax}/auth.rb +1 -1
- data/lib/lono/{configset/strategy/helpers/dsl/core.rb → builder/configset/definition/dsl/syntax/content.rb} +11 -3
- data/lib/lono/{configset/strategy/helpers/dsl/syntax.rb → builder/configset/definition/dsl/syntax/core.rb} +15 -9
- data/lib/lono/{configset/strategy/helpers/dsl → builder/configset/definition/dsl/syntax}/package.rb +1 -1
- data/lib/lono/builder/configset/definition/dsl/syntax.rb +5 -0
- data/lib/lono/{configset/strategy → builder/configset/definition}/dsl.rb +10 -14
- data/lib/lono/{configset/strategy → builder/configset/definition}/erb.rb +13 -16
- data/lib/lono/builder/configset/definition.rb +18 -0
- data/lib/lono/builder/configset/evaluator.rb +10 -0
- data/lib/lono/builder/configset/registration.rb +35 -0
- data/lib/lono/builder/context.rb +40 -0
- data/lib/lono/builder/dsl/evaluator.rb +45 -0
- data/lib/lono/builder/dsl/finalizer/base.rb +8 -0
- data/lib/lono/builder/dsl/finalizer/configsets.rb +20 -0
- data/lib/lono/builder/dsl/finalizer/files/base.rb +4 -0
- data/lib/lono/builder/dsl/finalizer/files/build.rb +58 -0
- data/lib/lono/builder/dsl/finalizer/files/replace.rb +31 -0
- data/lib/lono/builder/dsl/finalizer/files.rb +9 -0
- data/lib/lono/{template/strategy → builder}/dsl/finalizer/parameter_groups.rb +6 -5
- data/lib/lono/builder/dsl/finalizer.rb +15 -0
- data/lib/lono/{template/strategy/dsl/builder/helpers/ec2_helper.rb → builder/dsl/helpers/ec2.rb} +3 -3
- data/lib/lono/builder/dsl/helpers/files.rb +7 -0
- data/lib/lono/builder/dsl/helpers/partials.rb +140 -0
- data/lib/lono/{template/strategy/dsl/builder/helpers/s3_helper.rb → builder/dsl/helpers/s3.rb} +3 -3
- data/lib/lono/{template/context/ssm_fetcher.rb → builder/dsl/helpers/ssm/fetcher.rb} +5 -3
- data/lib/lono/{template/context/helpers.rb → builder/dsl/helpers/ssm.rb} +3 -3
- data/lib/lono/{template/strategy/dsl/builder/helpers/stack_helper.rb → builder/dsl/helpers/stack.rb} +14 -9
- data/lib/lono/{template/strategy/dsl/builder/helpers/tags_helper.rb → builder/dsl/helpers/tags.rb} +2 -2
- data/lib/lono/builder/dsl/helpers/template_file.rb +66 -0
- data/lib/lono/builder/dsl/helpers.rb +5 -0
- data/lib/lono/builder/dsl/syntax/core/base.rb +22 -0
- data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/condition.rb +1 -1
- data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/mapping.rb +1 -1
- data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/output.rb +1 -1
- data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/parameter.rb +1 -1
- data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/resource/property_mover.rb +12 -2
- data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/resource.rb +1 -1
- data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/section.rb +1 -1
- data/lib/lono/builder/dsl/syntax/core/squeezer.rb +38 -0
- data/lib/lono/{template/strategy/dsl/builder/section/methods.rb → builder/dsl/syntax/core.rb} +8 -8
- data/lib/lono/{template/strategy/dsl/builder → builder/dsl/syntax}/fn.rb +2 -2
- data/lib/lono/{template/strategy/dsl/builder → builder/dsl}/syntax/parameter_group.rb +1 -1
- data/lib/lono/builder/dsl/syntax.rb +9 -0
- data/lib/lono/builder/dsl.rb +14 -0
- data/lib/lono/{param/generator.rb → builder/param.rb} +24 -22
- data/lib/lono/builder/template/aws_service.rb +15 -0
- data/lib/lono/builder/template/bashify.rb +43 -0
- data/lib/lono/{output/template.rb → builder/template/output.rb} +14 -7
- data/lib/lono/{template → builder/template}/post_processor.rb +4 -4
- data/lib/lono/builder/template/upload.rb +8 -0
- data/lib/lono/builder/template.rb +55 -0
- data/lib/lono/{template/strategy/dsl/builder → builder/util}/stringify.rb +1 -1
- data/lib/lono/bundler/cli/base.rb +10 -0
- data/lib/lono/bundler/cli/bundle.rb +44 -0
- data/lib/lono/bundler/cli/clean.rb +27 -0
- data/lib/lono/bundler/cli/help/bundle.md +3 -0
- data/lib/lono/bundler/cli/help.rb +11 -0
- data/lib/lono/bundler/cli.rb +7 -0
- data/lib/lono/bundler/component/concerns/local_concern.rb +10 -0
- data/lib/lono/bundler/component/concerns/notation_concern.rb +59 -0
- data/lib/lono/bundler/component/concerns/path_concern.rb +68 -0
- data/lib/lono/bundler/component/concerns/stack_concern.rb +60 -0
- data/lib/lono/bundler/component/fetcher/base.rb +27 -0
- data/lib/lono/bundler/component/fetcher/gcs.rb +69 -0
- data/lib/lono/bundler/component/fetcher/git.rb +69 -0
- data/lib/lono/bundler/component/fetcher/local.rb +15 -0
- data/lib/lono/bundler/component/fetcher/s3.rb +66 -0
- data/lib/lono/bundler/component/fetcher.rb +18 -0
- data/lib/lono/bundler/component/http/concern.rb +45 -0
- data/lib/lono/bundler/component/http/source.rb +19 -0
- data/lib/lono/bundler/component/org_repo.rb +65 -0
- data/lib/lono/bundler/component/props/extension.rb +18 -0
- data/lib/lono/bundler/component/props/typer.rb +41 -0
- data/lib/lono/bundler/component/props.rb +122 -0
- data/lib/lono/bundler/component/registry.rb +136 -0
- data/lib/lono/bundler/component.rb +52 -0
- data/lib/lono/bundler/config.rb +18 -0
- data/lib/lono/bundler/dsl/syntax.rb +46 -0
- data/lib/lono/bundler/dsl.rb +21 -0
- data/lib/lono/bundler/exporter/base.rb +6 -0
- data/lib/lono/bundler/exporter/copy.rb +22 -0
- data/lib/lono/bundler/exporter.rb +50 -0
- data/lib/lono/bundler/extract/tar.rb +33 -0
- data/lib/lono/bundler/extract/zip.rb +16 -0
- data/lib/lono/bundler/info.rb +39 -0
- data/lib/lono/bundler/list.rb +26 -0
- data/lib/lono/bundler/lockfile/version_comparer.rb +56 -0
- data/lib/lono/bundler/lockfile/yamler.rb +36 -0
- data/lib/lono/bundler/lockfile.rb +66 -0
- data/lib/lono/bundler/lonofile.rb +32 -0
- data/lib/lono/bundler/runner.rb +27 -0
- data/lib/lono/bundler/syncer.rb +70 -0
- data/lib/lono/bundler/util/git.rb +37 -0
- data/lib/lono/bundler/util/logging.rb +7 -0
- data/lib/lono/bundler/util/sure.rb +5 -0
- data/lib/lono/{bundle.rb → bundler.rb} +38 -4
- data/lib/lono/cfn/base.rb +9 -195
- data/lib/lono/cfn/cancel.rb +12 -29
- data/lib/lono/cfn/concerns/build.rb +10 -0
- data/lib/lono/cfn/concerns/template_output.rb +10 -0
- data/lib/lono/cfn/concerns.rb +43 -0
- data/lib/lono/cfn/delete.rb +8 -32
- data/lib/lono/cfn/deploy/base.rb +4 -0
- data/lib/lono/cfn/deploy/iam.rb +48 -0
- data/lib/lono/cfn/deploy/notification.rb +8 -0
- data/lib/lono/cfn/deploy/operable.rb +18 -0
- data/lib/lono/cfn/deploy/opts.rb +49 -0
- data/lib/lono/cfn/deploy/rollback.rb +46 -0
- data/lib/lono/cfn/deploy/tags.rb +18 -0
- data/lib/lono/cfn/deploy.rb +100 -5
- data/lib/lono/cfn/download.rb +4 -7
- data/lib/lono/cfn/output.rb +49 -0
- data/lib/lono/cfn/plan/base.rb +19 -0
- data/lib/lono/cfn/plan/changeset/base.rb +19 -0
- data/lib/lono/cfn/plan/changeset/notifications.rb +24 -0
- data/lib/lono/cfn/plan/changeset/outputs.rb +25 -0
- data/lib/lono/cfn/plan/changeset/resources.rb +48 -0
- data/lib/lono/cfn/plan/changeset/tags.rb +16 -0
- data/lib/lono/cfn/plan/changeset.rb +136 -0
- data/lib/lono/cfn/plan/concerns.rb +10 -0
- data/lib/lono/cfn/plan/delete.rb +16 -0
- data/lib/lono/cfn/plan/diff/base.rb +10 -0
- data/lib/lono/cfn/plan/diff/data.rb +62 -0
- data/lib/lono/cfn/plan/diff/file.rb +57 -0
- data/lib/lono/cfn/plan/new.rb +26 -0
- data/lib/lono/cfn/{preview → plan}/param.rb +26 -34
- data/lib/lono/cfn/plan/summary.rb +16 -0
- data/lib/lono/cfn/plan/template.rb +28 -0
- data/lib/lono/cfn/plan.rb +34 -0
- data/lib/lono/cfn/show.rb +30 -0
- data/lib/lono/cfn/status.rb +1 -1
- data/lib/lono/cli/abstract.rb +11 -0
- data/lib/lono/cli/base.rb +11 -0
- data/lib/lono/cli/build.rb +47 -0
- data/lib/lono/cli/bundle.rb +21 -0
- data/lib/lono/cli/cfn/opts.rb +59 -0
- data/lib/lono/cli/cfn.rb +19 -0
- data/lib/lono/cli/clean.rb +23 -0
- data/lib/lono/cli/code.rb +22 -0
- data/lib/lono/{completion.rb → cli/completion.rb} +2 -2
- data/lib/lono/{help → cli/help}/blueprint/new.md +4 -4
- data/lib/lono/{help/generate.md → cli/help/build.md} +6 -6
- data/lib/lono/{help → cli/help}/cfn/cancel.md +0 -0
- data/lib/lono/cli/help/cfn/download.md +3 -0
- data/lib/lono/{help → cli/help}/cfn/preview.md +9 -8
- data/lib/lono/{help → cli/help}/cfn/status.md +0 -1
- data/lib/lono/cli/help/cfn.md +4 -0
- data/lib/lono/{help → cli/help}/code/convert.md +0 -0
- data/lib/lono/{help → cli/help}/code/import.md +2 -2
- data/lib/lono/{help → cli/help}/completion.md +3 -3
- data/lib/lono/{help → cli/help}/completion_script.md +0 -0
- data/lib/lono/{help → cli/help}/configsets.md +0 -0
- data/lib/lono/cli/help/down.md +13 -0
- data/lib/lono/cli/help/new/helper/blueprint.md +17 -0
- data/lib/lono/cli/help/new/helper/project.md +16 -0
- data/lib/lono/cli/help/new/project.md +34 -0
- data/lib/lono/{help → cli/help}/param/generate.md +0 -0
- data/lib/lono/cli/help/param.md +6 -0
- data/lib/lono/{help → cli/help}/pro/blueprints.md +0 -0
- data/lib/lono/{help → cli/help}/pro/configsets.md +0 -0
- data/lib/lono/{help → cli/help}/script/build.md +0 -0
- data/lib/lono/{help → cli/help}/script/upload.md +0 -0
- data/lib/lono/cli/help/seed.md +24 -0
- data/lib/lono/cli/help/summary.md +33 -0
- data/lib/lono/{help → cli/help}/template/bashify.md +0 -0
- data/lib/lono/cli/help/template/generate.md +7 -0
- data/lib/lono/{help → cli/help}/template.md +0 -0
- data/lib/lono/cli/help/up.md +30 -0
- data/lib/lono/{help → cli/help}/user_data.md +3 -3
- data/lib/lono/cli/help.rb +56 -0
- data/lib/lono/cli/list.rb +25 -0
- data/lib/lono/cli/new/blueprint.rb +29 -0
- data/lib/lono/cli/new/concerns.rb +16 -0
- data/lib/lono/cli/new/configset.rb +37 -0
- data/lib/lono/{extension/new.rb → cli/new/extension.rb} +2 -10
- data/lib/lono/cli/new/helper/blueprint.rb +26 -0
- data/lib/lono/cli/new/helper/project.rb +24 -0
- data/lib/lono/cli/new/helper.rb +13 -0
- data/lib/lono/cli/new/project.rb +77 -0
- data/lib/lono/cli/new/sequence.rb +56 -0
- data/lib/lono/cli/new/shim.rb +59 -0
- data/lib/lono/cli/new/test/blueprint.rb +23 -0
- data/lib/lono/cli/new/test/sequence.rb +10 -0
- data/lib/lono/cli/new/test.rb +8 -0
- data/lib/lono/cli/new.rb +27 -0
- data/lib/lono/{opts.rb → cli/opts.rb} +9 -12
- data/lib/lono/{s3.rb → cli/s3.rb} +9 -7
- data/lib/lono/cli/script/base.rb +5 -0
- data/lib/lono/cli/script/build.rb +72 -0
- data/lib/lono/cli/script/upload.rb +49 -0
- data/lib/lono/{script.rb → cli/script.rb} +2 -2
- data/lib/lono/cli/seed.rb +9 -0
- data/lib/lono/cli/status.rb +18 -0
- data/lib/lono/cli/test.rb +35 -0
- data/lib/lono/cli.rb +78 -109
- data/lib/lono/command.rb +27 -1
- data/lib/lono/component.rb +29 -0
- data/lib/lono/concerns/aws_info.rb +14 -0
- data/lib/lono/concerns/names.rb +9 -0
- data/lib/lono/configset.rb +11 -10
- data/lib/lono/core.rb +25 -54
- data/lib/lono/ext/core/module.rb +31 -0
- data/lib/lono/ext/core/object.rb +32 -0
- data/lib/lono/ext/core/string.rb +9 -0
- data/lib/lono/ext.rb +4 -0
- data/lib/lono/files/base.rb +12 -0
- data/lib/lono/files/builder.rb +37 -0
- data/lib/lono/files/compressor.rb +53 -0
- data/lib/lono/files/concerns/post_processing.rb +35 -0
- data/lib/lono/files/concerns/registration.rb +13 -0
- data/lib/lono/files/registry.rb +6 -0
- data/lib/lono/files.rb +37 -0
- data/lib/lono/importer/base.rb +6 -6
- data/lib/lono/importer/download.rb +7 -7
- data/lib/lono/importer/dsl.rb +3 -3
- data/lib/lono/importer/service/coder.rb +67 -63
- data/lib/lono/importer.rb +1 -10
- data/lib/lono/inspector/base.rb +7 -7
- data/lib/lono/inspector/summary.rb +18 -19
- data/lib/lono/layering/layer.rb +112 -0
- data/lib/lono/layering.rb +13 -55
- data/lib/lono/logger/formatter.rb +13 -0
- data/lib/lono/logger.rb +32 -0
- data/lib/lono/names.rb +50 -0
- data/lib/lono/plugin/meta.rb +30 -0
- data/lib/lono/plugin/tester.rb +13 -0
- data/lib/lono/plugin.rb +10 -0
- data/lib/lono/s3/aws_setup.rb +4 -3
- data/lib/lono/s3/bucket.rb +42 -42
- data/lib/lono/s3/rollback.rb +8 -0
- data/lib/lono/s3/uploader.rb +33 -34
- data/lib/lono/script/base.rb +3 -3
- data/lib/lono/script/build.rb +11 -12
- data/lib/lono/script/upload.rb +7 -7
- data/lib/lono/seeder.rb +110 -0
- data/lib/lono/user_data.rb +10 -13
- data/lib/lono/utils/logging.rb +7 -0
- data/lib/lono/utils/{pretty_time.rb → pretty.rb} +6 -2
- data/lib/lono/utils/quit.rb +7 -0
- data/lib/lono/utils/rsync.rb +4 -2
- data/lib/lono/utils/sure.rb +4 -4
- data/lib/lono/version.rb +1 -1
- data/lib/lono/yamler/validator.rb +7 -22
- data/lib/lono.rb +15 -12
- data/lib/templates/blueprint/template.rb +2 -0
- data/lib/templates/configset/configset.rb +2 -0
- data/lib/templates/examples/blueprint/template.rb +9 -0
- data/lib/templates/{configset/lib → examples/configset}/configset.rb +0 -0
- data/lib/templates/helper/%underscore_name%_helper.rb.tt +6 -0
- data/lib/templates/{skeleton → project}/.gitignore +1 -2
- data/lib/templates/project/Gemfile.tt +11 -0
- data/lib/templates/project/README.md +9 -0
- data/lib/templates/project/config/app.rb +3 -0
- data/lib/templates/shim/lono +7 -0
- data/lono.gemspec +51 -44
- metadata +282 -296
- data/.circleci/README.md +0 -3
- data/.circleci/config.yml +0 -58
- data/.cody/acceptance.sh +0 -49
- data/.cody/buildspec.yml +0 -9
- data/.cody/demo.rb +0 -38
- data/.cody/project.rb +0 -6
- data/.gitmodules +0 -3
- data/lib/lono/abstract_base.rb +0 -25
- data/lib/lono/app_file/base.rb +0 -28
- data/lib/lono/app_file/build/lambda_layer/ruby_packager.rb +0 -153
- data/lib/lono/app_file/build/lambda_layer.rb +0 -20
- data/lib/lono/app_file/build.rb +0 -84
- data/lib/lono/app_file/registry/item.rb +0 -24
- data/lib/lono/app_file/registry.rb +0 -16
- data/lib/lono/app_file/upload.rb +0 -12
- data/lib/lono/aws_services/stack.rb +0 -41
- data/lib/lono/aws_services/stack_set.rb +0 -41
- data/lib/lono/blueprint/configset/loader.rb +0 -7
- data/lib/lono/blueprint/helper.rb +0 -24
- data/lib/lono/blueprint/meta.rb +0 -30
- data/lib/lono/blueprint/new.rb +0 -127
- data/lib/lono/blueprint/root.rb +0 -25
- data/lib/lono/cfn/create.rb +0 -41
- data/lib/lono/cfn/opts.rb +0 -88
- data/lib/lono/cfn/preview/changeset.rb +0 -168
- data/lib/lono/cfn/preview/codediff.rb +0 -41
- data/lib/lono/cfn/preview/diff_viewer.rb +0 -23
- data/lib/lono/cfn/rollback.rb +0 -26
- data/lib/lono/cfn/update.rb +0 -71
- data/lib/lono/cfn.rb +0 -75
- data/lib/lono/clean.rb +0 -14
- data/lib/lono/code.rb +0 -22
- data/lib/lono/configset/combiner.rb +0 -162
- data/lib/lono/configset/evaluate_file.rb +0 -8
- data/lib/lono/configset/generator.rb +0 -57
- data/lib/lono/configset/list.rb +0 -67
- data/lib/lono/configset/meta/dsl.rb +0 -12
- data/lib/lono/configset/meta.rb +0 -19
- data/lib/lono/configset/new.rb +0 -77
- data/lib/lono/configset/preparer.rb +0 -44
- data/lib/lono/configset/register/base.rb +0 -122
- data/lib/lono/configset/register/blueprint.rb +0 -16
- data/lib/lono/configset/register/dsl.rb +0 -14
- data/lib/lono/configset/register/project.rb +0 -13
- data/lib/lono/configset/resolver.rb +0 -47
- data/lib/lono/configset/s3_file/build.rb +0 -33
- data/lib/lono/configset/s3_file/item.rb +0 -38
- data/lib/lono/configset/s3_file/registry.rb +0 -12
- data/lib/lono/configset/s3_file/upload.rb +0 -12
- data/lib/lono/configset/strategy/base.rb +0 -83
- data/lib/lono/configset/strategy/helpers/dsl.rb +0 -8
- data/lib/lono/configset/strategy/helpers/erb.rb +0 -9
- data/lib/lono/conventions.rb +0 -23
- data/lib/lono/core/config.rb +0 -22
- data/lib/lono/default/settings.yml +0 -21
- data/lib/lono/extension/helper.rb +0 -13
- data/lib/lono/extension/list.rb +0 -40
- data/lib/lono/extension.rb +0 -9
- data/lib/lono/extensions/dsl.rb +0 -11
- data/lib/lono/extensions/loader.rb +0 -30
- data/lib/lono/extensions/preparer.rb +0 -26
- data/lib/lono/extensions/register.rb +0 -15
- data/lib/lono/extensions.rb +0 -18
- data/lib/lono/file_uploader.rb +0 -21
- data/lib/lono/finder/base.rb +0 -152
- data/lib/lono/finder/blueprint/configset.rb +0 -17
- data/lib/lono/finder/blueprint.rb +0 -11
- data/lib/lono/finder/configset.rb +0 -11
- data/lib/lono/finder/extension.rb +0 -11
- data/lib/lono/generate.rb +0 -111
- data/lib/lono/help/cfn/create.md +0 -26
- data/lib/lono/help/cfn/delete.md +0 -13
- data/lib/lono/help/cfn/deploy.md +0 -21
- data/lib/lono/help/cfn/download.md +0 -3
- data/lib/lono/help/cfn/update.md +0 -49
- data/lib/lono/help/cfn.md +0 -7
- data/lib/lono/help/new.md +0 -57
- data/lib/lono/help/param.md +0 -6
- data/lib/lono/help/seed.md +0 -23
- data/lib/lono/help/set_instances/delete.md +0 -21
- data/lib/lono/help/set_instances/deploy.md +0 -31
- data/lib/lono/help/set_instances/list.md +0 -14
- data/lib/lono/help/set_instances/status.md +0 -15
- data/lib/lono/help/set_instances/sync.md +0 -92
- data/lib/lono/help/sets/delete.md +0 -8
- data/lib/lono/help/sets/deploy.md +0 -76
- data/lib/lono/help/sets/status.md +0 -23
- data/lib/lono/help/summary.md +0 -33
- data/lib/lono/help/template/generate.md +0 -7
- data/lib/lono/help/upgrade.md +0 -1
- data/lib/lono/help/xgraph.md +0 -16
- data/lib/lono/help.rb +0 -15
- data/lib/lono/importer/erb.rb +0 -31
- data/lib/lono/inspector/graph.rb +0 -125
- data/lib/lono/jade/circular.rb +0 -26
- data/lib/lono/jade/materializer/final.rb +0 -10
- data/lib/lono/jade/materializer/gems_builder.rb +0 -81
- data/lib/lono/jade/materializer/source.rb +0 -54
- data/lib/lono/jade/materializer.rb +0 -15
- data/lib/lono/jade/registry.rb +0 -64
- data/lib/lono/jade.rb +0 -110
- data/lib/lono/jadespec.rb +0 -68
- data/lib/lono/new/helper.rb +0 -15
- data/lib/lono/new.rb +0 -95
- data/lib/lono/param.rb +0 -14
- data/lib/lono/pro/base.rb +0 -16
- data/lib/lono/pro/repo.rb +0 -28
- data/lib/lono/pro.rb +0 -15
- data/lib/lono/project_checker.rb +0 -35
- data/lib/lono/registration/base.rb +0 -37
- data/lib/lono/registration/check.rb +0 -15
- data/lib/lono/registration/temp.rb +0 -53
- data/lib/lono/registration/user.rb +0 -60
- data/lib/lono/seed/base.rb +0 -116
- data/lib/lono/seed/service_role.rb +0 -11
- data/lib/lono/seed.rb +0 -39
- data/lib/lono/sequence.rb +0 -35
- data/lib/lono/set_instances/base.rb +0 -30
- data/lib/lono/set_instances/changeable.rb +0 -53
- data/lib/lono/set_instances/create.rb +0 -7
- data/lib/lono/set_instances/delete.rb +0 -47
- data/lib/lono/set_instances/deploy.rb +0 -52
- data/lib/lono/set_instances/list.rb +0 -13
- data/lib/lono/set_instances/opts.rb +0 -37
- data/lib/lono/set_instances/status.rb +0 -12
- data/lib/lono/set_instances/sync.rb +0 -181
- data/lib/lono/set_instances/update.rb +0 -15
- data/lib/lono/set_instances.rb +0 -54
- data/lib/lono/sets/base.rb +0 -50
- data/lib/lono/sets/create.rb +0 -27
- data/lib/lono/sets/delete.rb +0 -43
- data/lib/lono/sets/deploy.rb +0 -11
- data/lib/lono/sets/list.rb +0 -35
- data/lib/lono/sets/opts.rb +0 -18
- data/lib/lono/sets/preview/codediff.rb +0 -35
- data/lib/lono/sets/preview/param.rb +0 -32
- data/lib/lono/sets/status/instance/base.rb +0 -120
- data/lib/lono/sets/status/instance/completed.rb +0 -35
- data/lib/lono/sets/status/instance/deleted.rb +0 -32
- data/lib/lono/sets/status/instance/show.rb +0 -7
- data/lib/lono/sets/status/instance.rb +0 -20
- data/lib/lono/sets/status/instances.rb +0 -136
- data/lib/lono/sets/status.rb +0 -128
- data/lib/lono/sets/summarize.rb +0 -22
- data/lib/lono/sets/time_spent.rb +0 -11
- data/lib/lono/sets/update.rb +0 -74
- data/lib/lono/sets/waiter.rb +0 -23
- data/lib/lono/sets.rb +0 -34
- data/lib/lono/setting.rb +0 -75
- data/lib/lono/template/aws_service.rb +0 -20
- data/lib/lono/template/bashify.rb +0 -39
- data/lib/lono/template/configset_injector.rb +0 -52
- data/lib/lono/template/context/loader/load_files.rb +0 -24
- data/lib/lono/template/context/loader.rb +0 -52
- data/lib/lono/template/context.rb +0 -29
- data/lib/lono/template/evaluate.rb +0 -40
- data/lib/lono/template/generator.rb +0 -23
- data/lib/lono/template/helper.rb +0 -152
- data/lib/lono/template/strategy/base.rb +0 -4
- data/lib/lono/template/strategy/common/helpers.rb +0 -44
- data/lib/lono/template/strategy/dsl/builder/helpers/core_helper.rb +0 -14
- data/lib/lono/template/strategy/dsl/builder/helpers/file_helper.rb +0 -48
- data/lib/lono/template/strategy/dsl/builder/helpers.rb +0 -16
- data/lib/lono/template/strategy/dsl/builder/section/base.rb +0 -30
- data/lib/lono/template/strategy/dsl/builder/squeezer.rb +0 -24
- data/lib/lono/template/strategy/dsl/builder/syntax/extend_with.rb +0 -9
- data/lib/lono/template/strategy/dsl/builder/syntax.rb +0 -11
- data/lib/lono/template/strategy/dsl/builder.rb +0 -59
- data/lib/lono/template/strategy/dsl/finalizer.rb +0 -12
- data/lib/lono/template/strategy/dsl.rb +0 -14
- data/lib/lono/template/strategy/erb.rb +0 -82
- data/lib/lono/template/strategy/source.rb +0 -8
- data/lib/lono/template/template.rb +0 -54
- data/lib/lono/template/upload.rb +0 -23
- data/lib/lono/template/util.rb +0 -8
- data/lib/lono/template.rb +0 -24
- data/lib/lono/upgrade.rb +0 -20
- data/lib/lono/utils/generators/tree.rb +0 -18
- data/lib/lono/utils/item/file_methods.rb +0 -29
- data/lib/lono/utils/item/zip.rb +0 -42
- data/lib/templates/blueprint/%blueprint_name%.gemspec.tt +0 -45
- data/lib/templates/blueprint/.gitignore +0 -11
- data/lib/templates/blueprint/CHANGELOG.md +0 -7
- data/lib/templates/blueprint/Gemfile +0 -4
- data/lib/templates/blueprint/README.md.tt +0 -33
- data/lib/templates/blueprint/Rakefile.tt +0 -9
- data/lib/templates/blueprint/seed/configs.rb +0 -28
- data/lib/templates/blueprint_types/dsl/app/templates/%blueprint_name%.rb +0 -36
- data/lib/templates/blueprint_types/dsl/app/user_data/bootstrap.sh +0 -2
- data/lib/templates/blueprint_types/erb/app/definitions/base.rb.tt +0 -1
- data/lib/templates/blueprint_types/erb/app/templates/%blueprint_name%.yml +0 -67
- data/lib/templates/configset/%configset_name%.gemspec.tt +0 -42
- data/lib/templates/configset/.gitignore +0 -10
- data/lib/templates/configset/CHANGELOG.md +0 -7
- data/lib/templates/configset/Gemfile +0 -4
- data/lib/templates/configset/README.md.tt +0 -3
- data/lib/templates/configset/Rakefile.tt +0 -9
- data/lib/templates/extension/%extension_name%.gemspec.tt +0 -46
- data/lib/templates/extension/.gitignore +0 -11
- data/lib/templates/extension/.rspec +0 -3
- data/lib/templates/extension/CHANGELOG.md +0 -7
- data/lib/templates/extension/Gemfile.tt +0 -4
- data/lib/templates/extension/Rakefile.tt +0 -9
- data/lib/templates/extension/spec/spec_helper.rb.tt +0 -29
- data/lib/templates/skeleton/Gemfile +0 -3
- data/lib/templates/skeleton/README.md +0 -58
- data/lib/templates/skeleton/configs/settings.yml +0 -13
- data/vendor/cfn-status/CHANGELOG.md +0 -14
- data/vendor/cfn-status/Gemfile +0 -4
- data/vendor/cfn-status/Gemfile.lock +0 -49
- data/vendor/cfn-status/LICENSE.txt +0 -21
- data/vendor/cfn-status/README.md +0 -58
- data/vendor/cfn-status/Rakefile +0 -6
- data/vendor/cfn-status/bin/console +0 -14
- data/vendor/cfn-status/bin/setup +0 -8
- data/vendor/cfn-status/cfn-status.gemspec +0 -30
- data/vendor/cfn-status/lib/cfn-status.rb +0 -1
- data/vendor/cfn-status/lib/cfn_status/aws_service.rb +0 -51
- data/vendor/cfn-status/lib/cfn_status/version.rb +0 -3
- data/vendor/cfn-status/lib/cfn_status.rb +0 -245
- data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-1.json +0 -1103
- data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-2.json +0 -1104
- data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-3.json +0 -1103
- data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-1.json +0 -1103
- data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-2.json +0 -1104
- data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-3.json +0 -1103
- data/vendor/cfn-status/spec/fixtures/cfn/stack-events-complete.json +0 -1080
- data/vendor/cfn-status/spec/fixtures/cfn/stack-events-in-progress.json +0 -1080
- data/vendor/cfn-status/spec/fixtures/cfn/stack-events-update-rollback-complete.json +0 -1086
- data/vendor/cfn-status/spec/lib/cfn_status_spec.rb +0 -153
- data/vendor/cfn-status/spec/spec_helper.rb +0 -14
data/lib/lono/finder/base.rb
DELETED
@@ -1,152 +0,0 @@
|
|
1
|
-
require "bundler"
|
2
|
-
require "text-table"
|
3
|
-
|
4
|
-
module Lono::Finder
|
5
|
-
class Base
|
6
|
-
extend Memoist
|
7
|
-
|
8
|
-
def initialize(lono_root: nil, blueprint_root: nil)
|
9
|
-
@lono_root = lono_root || Lono.root
|
10
|
-
@blueprint_root = blueprint_root || Lono.blueprint_root
|
11
|
-
end
|
12
|
-
|
13
|
-
# Returns root path of component: blueprint or configset
|
14
|
-
def find(name, local_only: false)
|
15
|
-
all = find_all(local_only: local_only)
|
16
|
-
all.find { |jadespec| jadespec.name == name }
|
17
|
-
end
|
18
|
-
|
19
|
-
def find_all(local_only: false)
|
20
|
-
if local_only
|
21
|
-
local
|
22
|
-
else
|
23
|
-
local + materialized
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def local
|
28
|
-
project + vendor + gems
|
29
|
-
end
|
30
|
-
|
31
|
-
def project
|
32
|
-
roots = path_roots("#{@lono_root}/app/#{type.pluralize}")
|
33
|
-
components(roots, "project")
|
34
|
-
end
|
35
|
-
|
36
|
-
def vendor
|
37
|
-
roots = path_roots("#{@lono_root}/vendor/#{type.pluralize}")
|
38
|
-
components(roots, "vendor")
|
39
|
-
end
|
40
|
-
|
41
|
-
def gems
|
42
|
-
components(gem_roots, "gem")
|
43
|
-
end
|
44
|
-
|
45
|
-
# Folders that each materialized gems to tmp/jades
|
46
|
-
def materialized
|
47
|
-
components(materialized_gem_roots, "materialized")
|
48
|
-
end
|
49
|
-
|
50
|
-
# Components: blueprints or configsets
|
51
|
-
# Returns array of config Hashes. Example structure:
|
52
|
-
#
|
53
|
-
# [{
|
54
|
-
# name: "cfn-hup",
|
55
|
-
# root: "/path/to/gem/root",
|
56
|
-
# source_type: "project",
|
57
|
-
# },...]
|
58
|
-
#
|
59
|
-
def components(roots, source_type)
|
60
|
-
components = []
|
61
|
-
roots.each do |root|
|
62
|
-
next unless detect?(root)
|
63
|
-
jadespec = Lono::Jadespec.new(root, source_type)
|
64
|
-
components << jadespec
|
65
|
-
end
|
66
|
-
components
|
67
|
-
end
|
68
|
-
memoize :components
|
69
|
-
|
70
|
-
def detect?(root)
|
71
|
-
expr = "#{root}/#{detection_path}"
|
72
|
-
Dir.glob(expr).size > 0
|
73
|
-
end
|
74
|
-
|
75
|
-
# Used for blueprints, configsets, and blueprint/configsets
|
76
|
-
def list(options={})
|
77
|
-
table = Text::Table.new
|
78
|
-
table.head = ["Name", "Path", "Type"]
|
79
|
-
|
80
|
-
components = find_all.sort_by { |jadespec| jadespec.name }
|
81
|
-
components.each do |jadespec|
|
82
|
-
pretty_path = jadespec.root.sub("#{Lono.root}/", "").sub(ENV['HOME'], "~")
|
83
|
-
unless options[:filter_materialized] && jadespec.source_type == "materialized"
|
84
|
-
table.rows << [jadespec.name, pretty_path, jadespec.source_type]
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
if table.rows.empty?
|
89
|
-
puts "No #{type.pluralize} found."
|
90
|
-
else
|
91
|
-
puts(options[:message] || "Available #{type.pluralize}:")
|
92
|
-
puts table
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
private
|
97
|
-
def path_roots(path)
|
98
|
-
Dir.glob("#{path}/*").to_a
|
99
|
-
end
|
100
|
-
|
101
|
-
# Example return:
|
102
|
-
#
|
103
|
-
# [
|
104
|
-
# "/home/ec2-user/.rbenv/versions/2.5.6/lib/ruby/gems/2.5.0/gems/rake-13.0.1",
|
105
|
-
# "/home/ec2-user/.rbenv/versions/2.5.6/lib/ruby/gems/2.5.0/gems/thor-0.20.3"
|
106
|
-
# ]
|
107
|
-
#
|
108
|
-
def gem_roots
|
109
|
-
Bundler.load.specs.map do |spec|
|
110
|
-
spec.full_gem_path
|
111
|
-
end
|
112
|
-
end
|
113
|
-
memoize :gem_roots
|
114
|
-
|
115
|
-
def materialized_gem_roots
|
116
|
-
gemfile_lock = "#{Lono.root}/tmp/jades/Gemfile.lock"
|
117
|
-
return [] unless File.exist?(gemfile_lock)
|
118
|
-
|
119
|
-
parser = Bundler::LockfileParser.new(Bundler.read_file(gemfile_lock))
|
120
|
-
specs = parser.specs
|
121
|
-
# __materialize__ only exists in Gem::LazySpecification and not in Gem::Specification
|
122
|
-
specs.each { |spec| spec.__materialize__ }
|
123
|
-
begin
|
124
|
-
specs.map do |spec|
|
125
|
-
spec.full_gem_path
|
126
|
-
end
|
127
|
-
rescue RuntimeError => e
|
128
|
-
if e.message.include?("LazySpecification has not been materialized yet")
|
129
|
-
# Thinking quiet behavior is preferred. Leaving comment here for now.
|
130
|
-
# puts "WARN: The Finder class is having trouble using the cached tmp/jades/Gemfile.lock to search for materialized gems."
|
131
|
-
# puts "This can happen when materialized gems are updated. It is generally safe to ignore."
|
132
|
-
# puts "To remove this warning you can remove the cached Gemfile.lock"
|
133
|
-
return []
|
134
|
-
else
|
135
|
-
raise(e)
|
136
|
-
end
|
137
|
-
end
|
138
|
-
end
|
139
|
-
memoize :materialized_gem_roots
|
140
|
-
|
141
|
-
public
|
142
|
-
class << self
|
143
|
-
def find(name)
|
144
|
-
new.find(name)
|
145
|
-
end
|
146
|
-
|
147
|
-
def list(options={})
|
148
|
-
new.list(options)
|
149
|
-
end
|
150
|
-
end
|
151
|
-
end
|
152
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class Lono::Finder::Blueprint
|
2
|
-
class Configset < Lono::Finder::Configset
|
3
|
-
def initialize(options={})
|
4
|
-
super(**options) # **options to remove: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
|
5
|
-
@blueprint_root = options[:blueprint_root] || Lono.blueprint_root
|
6
|
-
end
|
7
|
-
|
8
|
-
def local
|
9
|
-
project + vendor + blueprint_app + gems
|
10
|
-
end
|
11
|
-
|
12
|
-
def blueprint_app
|
13
|
-
roots = path_roots("#{@blueprint_root}/app/#{type.pluralize}")
|
14
|
-
components(roots, "blueprint")
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
data/lib/lono/generate.rb
DELETED
@@ -1,111 +0,0 @@
|
|
1
|
-
module Lono
|
2
|
-
class Generate < AbstractBase
|
3
|
-
# Use class variable to cache this only runs once across all classes. base.rb, diff.rb, preview.rb
|
4
|
-
@@parameters = nil
|
5
|
-
def all
|
6
|
-
return @@parameters if @@parameters
|
7
|
-
|
8
|
-
ensure_s3_bucket_exist unless generate_only?
|
9
|
-
pre_generate
|
10
|
-
generate_templates # generates with some placeholders for build_files IE: file://app/files/my.rb
|
11
|
-
post_generate
|
12
|
-
upload unless generate_only?
|
13
|
-
|
14
|
-
@@parameters = param_generator.generate # Writes the json file in CamelCase keys format
|
15
|
-
check_for_errors
|
16
|
-
@@parameters
|
17
|
-
end
|
18
|
-
|
19
|
-
def generate_only?
|
20
|
-
ENV['LONO_GENERATE_ONLY'] || @options[:generate_only]
|
21
|
-
end
|
22
|
-
|
23
|
-
def pre_generate
|
24
|
-
build_scripts
|
25
|
-
end
|
26
|
-
|
27
|
-
def post_generate
|
28
|
-
return if @options[:noop]
|
29
|
-
return if @options[:source]
|
30
|
-
|
31
|
-
build_files # builds app/files to output/BLUEPRINT/files
|
32
|
-
post_process_template
|
33
|
-
end
|
34
|
-
|
35
|
-
def param_generator
|
36
|
-
o = {
|
37
|
-
regenerate: true,
|
38
|
-
allow_not_exists: true,
|
39
|
-
}.merge(@options)
|
40
|
-
o = HashWithIndifferentAccess.new(o)
|
41
|
-
Lono::Param::Generator.new(o)
|
42
|
-
end
|
43
|
-
memoize :param_generator
|
44
|
-
|
45
|
-
def ensure_s3_bucket_exist
|
46
|
-
bucket = Lono::S3::Bucket.new
|
47
|
-
return if bucket.exist?
|
48
|
-
bucket.deploy
|
49
|
-
end
|
50
|
-
|
51
|
-
def build_scripts
|
52
|
-
Lono::Script::Build.new(@options).run
|
53
|
-
end
|
54
|
-
|
55
|
-
def build_files
|
56
|
-
Lono::AppFile::Build.new(@options).run
|
57
|
-
Lono::Configset::S3File::Build.new(@options).run # copies files to the output folder
|
58
|
-
end
|
59
|
-
|
60
|
-
def generate_templates
|
61
|
-
Lono::Template::Generator.new(@options).run # write templates to disk
|
62
|
-
inject_configsets
|
63
|
-
end
|
64
|
-
|
65
|
-
def inject_configsets
|
66
|
-
# The inject_configsets reads it back from disk. Leaving as-is instead of reading all in memory in case there's a reason.
|
67
|
-
Lono::Configset::Preparer.new(@options).run # register and materialize gems
|
68
|
-
Lono::Template::ConfigsetInjector.new(@options).run
|
69
|
-
end
|
70
|
-
|
71
|
-
def post_process_template
|
72
|
-
Lono::Template::PostProcessor.new(@options).run
|
73
|
-
end
|
74
|
-
|
75
|
-
def upload
|
76
|
-
upload_files
|
77
|
-
upload_scripts
|
78
|
-
upload_templates
|
79
|
-
end
|
80
|
-
|
81
|
-
def upload_templates
|
82
|
-
Lono::Template::Upload.new(@options).run
|
83
|
-
end
|
84
|
-
|
85
|
-
def upload_scripts
|
86
|
-
Lono::Script::Upload.new(@options).run
|
87
|
-
end
|
88
|
-
|
89
|
-
def upload_files
|
90
|
-
Lono::AppFile::Upload.new(@options).upload
|
91
|
-
Lono::Configset::S3File::Upload.new(@options).upload
|
92
|
-
end
|
93
|
-
|
94
|
-
def check_for_errors
|
95
|
-
errors = check_files
|
96
|
-
unless errors.empty?
|
97
|
-
puts "Please double check the command you ran. There were some errors."
|
98
|
-
puts "ERROR: #{errors.join("\n")}".color(:red)
|
99
|
-
exit
|
100
|
-
end
|
101
|
-
end
|
102
|
-
|
103
|
-
def check_files
|
104
|
-
errors = []
|
105
|
-
unless File.exist?(template_path)
|
106
|
-
errors << "Template file missing: could not find #{template_path}"
|
107
|
-
end
|
108
|
-
errors
|
109
|
-
end
|
110
|
-
end
|
111
|
-
end
|
data/lib/lono/help/cfn/create.md
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
## Examples
|
2
|
-
|
3
|
-
Provided that you are in a lono project and have a `demo` lono blueprint that contains a `demo` template. To create a stack you can run:
|
4
|
-
|
5
|
-
lono cfn create demo
|
6
|
-
|
7
|
-
The above command will generate:
|
8
|
-
|
9
|
-
* template: output/demo/templates/demo.yml
|
10
|
-
* parameters: output/demo/params/development.json
|
11
|
-
|
12
|
-
By [convention]({% link _docs/conventions/cli.md %}), the blueprint name is the same as the stack name. In turn, template name is the same as the blueprint name. Lastly, the param name will default to the template name.
|
13
|
-
|
14
|
-
Here are examples of overriding the template and params name conventions.
|
15
|
-
|
16
|
-
lono cfn create demo --template different1
|
17
|
-
|
18
|
-
The template used is `app/templates/different1.rb` and the parameters used is `configs/demo/params/development/demo/different1.txt`.
|
19
|
-
|
20
|
-
lono cfn create demo --param different2
|
21
|
-
|
22
|
-
The template used is `app/templates/demo.rb` and the parameters used is `configs/demo/params/development/demo/different2.json`.
|
23
|
-
|
24
|
-
lono cfn create demo --template different3 --param different4
|
25
|
-
|
26
|
-
The template used is `app/templates/different3.rb` and the parameters used is `configs/demo/params/different3/different4.json`.
|
data/lib/lono/help/cfn/delete.md
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
## Examples
|
2
|
-
|
3
|
-
$ lono cfn delete ec2
|
4
|
-
Are you sure you want to delete the stack? (y/N)
|
5
|
-
y
|
6
|
-
Deleted example stack.
|
7
|
-
$
|
8
|
-
|
9
|
-
Lono prompts you with an "Are you sure?" message before the stack gets deleted. If you would like to bypass the prompt, you can use the `--sure` flag.
|
10
|
-
|
11
|
-
$ lono cfn delete example --sure
|
12
|
-
Deleted example stack.
|
13
|
-
$
|
data/lib/lono/help/cfn/deploy.md
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The `cfn deploy` command figures out whether or not it should perform a stack create or update. It delegates to `cfn create` or `cfn update`. This saves you from thinking about it
|
2
|
-
|
3
|
-
## Examples
|
4
|
-
|
5
|
-
Provided that you are in a lono project and have a `demo` lono blueprint that contains a `demo` template. To create a stack you can run:
|
6
|
-
|
7
|
-
lono cfn deploy demo
|
8
|
-
|
9
|
-
The above command will generate:
|
10
|
-
|
11
|
-
* template: output/demo/templates/demo.yml
|
12
|
-
* parameters: output/demo/params/development.json
|
13
|
-
|
14
|
-
|
15
|
-
## Conventions
|
16
|
-
|
17
|
-
By [convention]({% link _docs/conventions/cli.md %}), the blueprint name is the same as the stack name. In turn, template name is the same as the blueprint name. Lastly, the param name will match the stack name unless it's explicitly specified with `--config` or `--param`.
|
18
|
-
|
19
|
-
Often you want to create a stack name that is different from the blueprint name. Here’s an example of overriding the blueprint name.
|
20
|
-
|
21
|
-
lono cfn deploy my-stack --blueprint demo
|
data/lib/lono/help/cfn/update.md
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
## Examples
|
2
|
-
|
3
|
-
Let's say we make a simple change to a template, like changing the default InstanceType from `t2.small` to `t2.micro`. Here's what happens when you run `lono cfn update`
|
4
|
-
|
5
|
-
lono cfn update ec2
|
6
|
-
|
7
|
-
The output should look similiar to this:
|
8
|
-
|
9
|
-
<img src="/img/tutorials/ec2/cfn-update-instance-type.png" alt="Stack Update" class="doc-photo">
|
10
|
-
|
11
|
-
Notice that before the update gets performed lono provides a preview of the changes that are about to take place. There are two types of "diffs" in the preview.
|
12
|
-
|
13
|
-
1. Source code diff of the templates. This is generated by downloading the current CloudFormation template and comparing it with the locally generated one using `colordiff`.
|
14
|
-
2. CloudFormation Change Set list of changes. This is generated using [AWS CloudFormation Change Set](https://medium.com/boltops/a-simple-introduction-to-cloudformation-part-4-change-sets-dry-run-mode-c14e41dfeab7) feature.
|
15
|
-
|
16
|
-
You are prompted with an "Are you sure?" confirmation before lono continues.
|
17
|
-
|
18
|
-
By default, the update command will display a preview of the stack changes before applying the update and prompt to check if you are sure. If you want to bypass the are you sure prompt, use the `--sure` option.
|
19
|
-
|
20
|
-
lono cfn update ec2 --sure
|
21
|
-
|
22
|
-
## Conventions: template and param
|
23
|
-
|
24
|
-
Lono follows some [coventions](https://lono.cloud/docs/conventions/) that helps keep the commands short. We'll go through an example to explain:
|
25
|
-
|
26
|
-
Provided that you are in a lono project and have a `demo` lono blueprint that contains a `demo` template. To update a stack you can run:
|
27
|
-
|
28
|
-
lono cfn update demo
|
29
|
-
|
30
|
-
The above command will generate:
|
31
|
-
|
32
|
-
* template: output/demo/templates/demo.yml
|
33
|
-
* parameters: output/demo/params/development.json
|
34
|
-
|
35
|
-
By [convention]({% link _docs/conventions/cli.md %}), the blueprint name is the same as the stack name. In turn, template name is the same as the blueprint name. Lastly, the param name will default to the template name.
|
36
|
-
|
37
|
-
Here are examples of overriding the template and params name conventions.
|
38
|
-
|
39
|
-
lono cfn update demo --template different1
|
40
|
-
|
41
|
-
The template used is `app/templates/different1.rb` and the parameters used is `configs/demo/params/development/demo/different1.txt`.
|
42
|
-
|
43
|
-
lono cfn update demo --param different2
|
44
|
-
|
45
|
-
The template used is `app/templates/demo.rb` and the parameters used is `configs/demo/params/development/demo/different2.json`.
|
46
|
-
|
47
|
-
lono cfn update demo --template different3 --param different4
|
48
|
-
|
49
|
-
The template used is `app/templates/different3.rb` and the parameters used is `configs/demo/params/different3/different4.json`.
|
data/lib/lono/help/cfn.md
DELETED
data/lib/lono/help/new.md
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
## Examples
|
2
|
-
|
3
|
-
lono new infra # starter project with demo blueprint
|
4
|
-
|
5
|
-
By default, `lono new` generates a skeleton project. Use `TEMPLATE` to generate different starter projects. List of the [starter templates](https://github.com/tongueroo/lono/tree/master/lib/starter_projects).
|
6
|
-
|
7
|
-
## Example Output
|
8
|
-
|
9
|
-
$ lono new infra
|
10
|
-
=> Creating new project called infra.
|
11
|
-
create infra
|
12
|
-
create infra/.gitignore
|
13
|
-
create infra/Gemfile
|
14
|
-
create infra/Guardfile
|
15
|
-
create infra/README.md
|
16
|
-
create infra/configs/settings.yml
|
17
|
-
=> Creating new blueprint called demo.
|
18
|
-
create infra/blueprints/demo
|
19
|
-
create infra/blueprints/demo/demo.gemspec
|
20
|
-
create infra/blueprints/demo/.gitignore
|
21
|
-
create infra/blueprints/demo/Gemfile
|
22
|
-
create infra/blueprints/demo/README.md
|
23
|
-
create infra/blueprints/demo/seed/configs.rb
|
24
|
-
exist infra/blueprints/demo
|
25
|
-
create infra/blueprints/demo/app/templates/demo.rb
|
26
|
-
create infra/blueprints/demo/app/user_data/bootstrap.sh
|
27
|
-
exist infra/blueprints/demo/app/templates
|
28
|
-
exist infra
|
29
|
-
create infra/configs/demo/params/base.txt
|
30
|
-
create infra/configs/demo/params/development.txt
|
31
|
-
create infra/configs/demo/variables/base.rb
|
32
|
-
create infra/configs/demo/variables/development.rb
|
33
|
-
=> Initialize git repo
|
34
|
-
=> Installing dependencies with: bundle install
|
35
|
-
=> Commit git repo
|
36
|
-
================================================================
|
37
|
-
Congrats You have successfully created a lono project. A starter demo blueprint was created
|
38
|
-
and is at blueprints/demo. Check things out by going into the created infra folder.
|
39
|
-
|
40
|
-
cd infra
|
41
|
-
|
42
|
-
To create a new blueprint run:
|
43
|
-
|
44
|
-
lono blueprint new demo
|
45
|
-
|
46
|
-
To deploy the blueprint:
|
47
|
-
|
48
|
-
lono cfn deploy my-demo --blueprint demo
|
49
|
-
|
50
|
-
If you name the stack according to conventions, you can simply run:
|
51
|
-
|
52
|
-
lono cfn deploy demo
|
53
|
-
|
54
|
-
To list and create additional blueprints refer to https://lono.cloud/docs/core/blueprints
|
55
|
-
|
56
|
-
More info: https://lono.cloud/
|
57
|
-
$
|
data/lib/lono/help/param.md
DELETED
data/lib/lono/help/seed.md
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
## Example
|
2
|
-
|
3
|
-
$ lono seed ecs-asg
|
4
|
-
Creating starter config files for ecs-asg
|
5
|
-
create configs/ecs-asg/params/development.txt
|
6
|
-
$ cat configs/ecs-asg/params/development.txt
|
7
|
-
# Required parameters:
|
8
|
-
VpcId=vpc-111 # Find at vpc CloudFormation Outputs
|
9
|
-
Subnets=subnet-111,subnet-222,subnet-333 # Find at vpc CloudFormation Outputs
|
10
|
-
# Optional parameters:
|
11
|
-
# InstanceType=m5.large
|
12
|
-
# KeyName=...
|
13
|
-
# SshLocation=...
|
14
|
-
# EcsCluster=development
|
15
|
-
# TagName=ecs-asg-development
|
16
|
-
# ExistingIamInstanceProfile=...
|
17
|
-
# ExistingSecurityGroups=...
|
18
|
-
# EbsVolumeSize=50
|
19
|
-
# MinSize=1
|
20
|
-
# MaxSize=4
|
21
|
-
# MinInstancesInService=2
|
22
|
-
# MaxBatchSize=1
|
23
|
-
$
|
@@ -1,21 +0,0 @@
|
|
1
|
-
## Example
|
2
|
-
|
3
|
-
$ lono set_instances delete my-set --accounts 112233445566 --regions us-west-1 us-west-2
|
4
|
-
Are you sure you want to delete the my-set instances?
|
5
|
-
These stack instances will be deleted:
|
6
|
-
|
7
|
-
accounts: 112233445566
|
8
|
-
regions: us-west-1,us-west-2
|
9
|
-
|
10
|
-
|
11
|
-
Are you sure? (y/N) y
|
12
|
-
Stack Instance statuses... (takes a while)
|
13
|
-
Stack Instance: account 112233445566 region us-west-1 status CURRENT
|
14
|
-
Stack Instance: account 112233445566 region us-west-2 status CURRENT
|
15
|
-
Stack Instance: account 112233445566 region us-west-2 status OUTDATED reason User initiated operation
|
16
|
-
Stack Instance: account 112233445566 region us-west-1 status OUTDATED reason User initiated operation
|
17
|
-
Stack Instance: account 112233445566 region us-west-1 status DELETED
|
18
|
-
Stack Instance: account 112233445566 region us-west-2 status DELETED
|
19
|
-
Time took to complete stack set operation: 30s
|
20
|
-
Stack set operation completed.
|
21
|
-
$
|
@@ -1,31 +0,0 @@
|
|
1
|
-
The deploy command delegates to the `lono set_instances create` or `lono set_instances update` commands. This spares you from having to manually figuring out which stack instances need to be created and updated.
|
2
|
-
|
3
|
-
## Example
|
4
|
-
|
5
|
-
$ lono set_instances deploy enable-aws-config --accounts 111111111111 222222222222 --regions us-west-2 us-east-2Running lono set_instances create on account: 111111111111 regions: us-west-2,us-east-2
|
6
|
-
Deploying enable-aws-config stack set
|
7
|
-
Stack Set Operation Status: RUNNING
|
8
|
-
Stack Instance statuses... (takes a while)
|
9
|
-
You can also check with StackSets console at the Operations Tab.
|
10
|
-
Here is also the cli command to check:
|
11
|
-
|
12
|
-
aws cloudformation describe-stack-set-operation --stack-set-name enable-aws-config --operation-id 44a50065-1b10-49f0-b6b9-853092a0cb09
|
13
|
-
|
14
|
-
2020-04-25 10:58:32PM Stack Instance: account 222222222222 region us-east-2 status CURRENT
|
15
|
-
2020-04-25 10:58:32PM Stack Instance: account 111111111111 region us-west-2 status OUTDATED reason User initiated operation
|
16
|
-
2020-04-25 10:58:32PM Stack Instance: account 222222222222 region us-west-2 status CURRENT
|
17
|
-
2020-04-25 10:58:32PM Stack Instance: account 111111111111 region us-east-2 status OUTDATED reason User initiated operation
|
18
|
-
Stack Set Operation Status: SUCCEEDED
|
19
|
-
Time took to complete stack set operation: 1m 23s
|
20
|
-
Stack Set Operation Summary:
|
21
|
-
account 111111111111 region us-west-2 status SUCCEEDED
|
22
|
-
account 111111111111 region us-east-2 status SUCCEEDED
|
23
|
-
Running lono set_instances update on account: 222222222222 regions: us-west-2,us-east-2
|
24
|
-
Deploying enable-aws-config stack set
|
25
|
-
Stack Set Operation Status: RUNNING
|
26
|
-
Stack Set Operation Status: SUCCEEDED
|
27
|
-
Time took to complete stack set operation: 23s
|
28
|
-
Stack Set Operation Summary:
|
29
|
-
account 222222222222 region us-west-2 status SUCCEEDED
|
30
|
-
account 222222222222 region us-east-2 status SUCCEEDED
|
31
|
-
$
|
@@ -1,14 +0,0 @@
|
|
1
|
-
## Example
|
2
|
-
|
3
|
-
$ lono set_instances list my-set
|
4
|
-
Stack Instance: account 112233445566 region ap-northeast-1 status CURRENT
|
5
|
-
Stack Instance: account 223344556677 region us-west-1 status CURRENT
|
6
|
-
Stack Instance: account 223344556677 region ap-northeast-1 status CURRENT
|
7
|
-
Stack Instance: account 223344556677 region us-west-2 status CURRENT
|
8
|
-
Stack Instance: account 223344556677 region ap-northeast-2 status CURRENT
|
9
|
-
Stack Instance: account 112233445566 region ap-northeast-2 status CURRENT
|
10
|
-
Stack Instance: account 112233445566 region us-west-2 status CURRENT
|
11
|
-
Stack Instance: account 112233445566 region us-west-1 status CURRENT
|
12
|
-
Time took to complete stack set operation: 4m 29s
|
13
|
-
Stack set operation completed.
|
14
|
-
$
|
@@ -1,15 +0,0 @@
|
|
1
|
-
## Example
|
2
|
-
|
3
|
-
$ lono set_instances status my-set
|
4
|
-
Stack Instance statuses... (takes a while)
|
5
|
-
Stack Instance: account 112233445566 region ap-northeast-1 status CURRENT
|
6
|
-
Stack Instance: account 112233445566 region us-west-1 status CURRENT
|
7
|
-
Stack Instance: account 112233445566 region us-west-2 status CURRENT
|
8
|
-
Stack Instance: account 112233445566 region ap-northeast-2 status CURRENT
|
9
|
-
Stack Instance: account 223344556677 region us-west-2 status CURRENT
|
10
|
-
Stack Instance: account 223344556677 region ap-northeast-2 status CURRENT
|
11
|
-
Stack Instance: account 223344556677 region us-west-1 status CURRENT
|
12
|
-
Stack Instance: account 223344556677 region ap-northeast-1 status CURRENT
|
13
|
-
Time took to complete stack set operation: 4m 29s
|
14
|
-
Stack set operation completed.
|
15
|
-
$
|