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
@@ -1,92 +0,0 @@
|
|
1
|
-
IMPORTANT: The `lono set_instances sync` command is deprecated in favor of `lono set_instances deploy`. With stack sets, found more success with explicitness.
|
2
|
-
|
3
|
-
Lono uses the `config/accounts` and `config/regions` to calculate whether `create-stack-set` or `delete-stack-set` need to be called and calls them accordingly. You use this instead of `lono sets deploy` when only configs have been adjust and you want to keep the existing template.
|
4
|
-
|
5
|
-
Provided:
|
6
|
-
|
7
|
-
configs/demo/accounts/development/my-set.txt
|
8
|
-
|
9
|
-
112233445566
|
10
|
-
223344556677
|
11
|
-
|
12
|
-
configs/demo/regions/development/my-set.txt
|
13
|
-
|
14
|
-
us-east-1
|
15
|
-
us-east-2
|
16
|
-
us-west-1
|
17
|
-
us-west-2
|
18
|
-
|
19
|
-
And then we update:
|
20
|
-
|
21
|
-
configs/demo/regions/development/my-set.txt
|
22
|
-
|
23
|
-
us-west-1
|
24
|
-
us-west-2
|
25
|
-
ap-northeast-1
|
26
|
-
ap-northeast-2
|
27
|
-
|
28
|
-
Running `lono set_instances sync` will delete and add the stack instances accordingly.
|
29
|
-
|
30
|
-
$ lono set_instances sync my-set --blueprint demo
|
31
|
-
Using regions for development: configs/demo/regions/development/my-set.sh
|
32
|
-
Using accounts for development: configs/demo/accounts/development/my-set.sh
|
33
|
-
Are you sure you want to sync stack instances?
|
34
|
-
lono will run:
|
35
|
-
create_stack_instances for:
|
36
|
-
accounts: 112233445566,223344556677
|
37
|
-
regions: ap-northeast-1,ap-northeast-2
|
38
|
-
|
39
|
-
Number of stack instances to be created: 4
|
40
|
-
delete_stack_instances for:
|
41
|
-
accounts: 112233445566,223344556677
|
42
|
-
regions: us-east-1,us-east-2
|
43
|
-
|
44
|
-
Number of stack instances to be deleted: 4
|
45
|
-
|
46
|
-
Are you sure? (y/N) y
|
47
|
-
=> Running create_stack_instances on:
|
48
|
-
accounts: 112233445566,223344556677
|
49
|
-
regions: ap-northeast-1,ap-northeast-2
|
50
|
-
Stack Instance statuses... (takes a while)
|
51
|
-
2019-12-19 10:59:07 PM Stack Instance: account 112233445566 region ap-northeast-1 status OUTDATED reason User initiated operation
|
52
|
-
2019-12-19 10:59:07 PM Stack Instance: account 223344556677 region ap-northeast-1 status OUTDATED reason User initiated operation
|
53
|
-
2019-12-19 10:59:07 PM Stack Instance: account 223344556677 region ap-northeast-2 status OUTDATED reason User initiated operation
|
54
|
-
2019-12-19 10:59:07 PM Stack Instance: account 112233445566 region ap-northeast-2 status OUTDATED reason User initiated operation
|
55
|
-
2019-12-19 10:59:17 PM Stack Instance: account 112233445566 region ap-northeast-1 status OUTDATED reason User Initiated
|
56
|
-
2019-12-19 10:59:26 PM Stack Instance: account 112233445566 region ap-northeast-1 status CURRENT
|
57
|
-
2019-12-19 10:59:40 PM Stack Instance: account 223344556677 region ap-northeast-1 status OUTDATED reason User Initiated
|
58
|
-
2019-12-19 10:59:49 PM Stack Instance: account 223344556677 region ap-northeast-1 status CURRENT
|
59
|
-
2019-12-19 11:00:04 PM Stack Instance: account 112233445566 region ap-northeast-2 status OUTDATED reason User Initiated
|
60
|
-
2019-12-19 11:00:17 PM Stack Instance: account 112233445566 region ap-northeast-2 status CURRENT
|
61
|
-
2019-12-19 11:00:27 PM Stack Instance: account 223344556677 region ap-northeast-2 status OUTDATED reason User Initiated
|
62
|
-
Time took to complete stack set operation: 1m 40s
|
63
|
-
Stack set operation completed.
|
64
|
-
Stack Set Operation Summary:
|
65
|
-
account 112233445566 region ap-northeast-2 status SUCCEEDED
|
66
|
-
account 112233445566 region ap-northeast-1 status SUCCEEDED
|
67
|
-
account 223344556677 region ap-northeast-2 status SUCCEEDED
|
68
|
-
account 223344556677 region ap-northeast-1 status SUCCEEDED
|
69
|
-
=> Running delete_stack_instances on:
|
70
|
-
accounts: 112233445566,223344556677
|
71
|
-
regions: us-east-1,us-east-2
|
72
|
-
Stack Instance statuses... (takes a while)
|
73
|
-
2019-12-19 11:00:40 PM Stack Instance: account 112233445566 region us-east-2 status CURRENT
|
74
|
-
2019-12-19 11:00:40 PM Stack Instance: account 112233445566 region us-east-1 status CURRENT
|
75
|
-
2019-12-19 11:00:40 PM Stack Instance: account 223344556677 region us-east-2 status CURRENT
|
76
|
-
2019-12-19 11:00:40 PM Stack Instance: account 223344556677 region us-east-1 status CURRENT
|
77
|
-
2019-12-19 11:00:40 PM Stack Instance: account 223344556677 region us-east-1 status OUTDATED reason User initiated operation
|
78
|
-
2019-12-19 11:00:41 PM Stack Instance: account 223344556677 region ap-northeast-2 status CURRENT
|
79
|
-
2019-12-19 11:00:44 PM Stack Instance: account 112233445566 region us-east-2 status OUTDATED reason User initiated operation
|
80
|
-
2019-12-19 11:00:45 PM Stack Instance: account 112233445566 region us-east-1 status OUTDATED reason User initiated operation
|
81
|
-
2019-12-19 11:00:45 PM Stack Instance: account 223344556677 region us-east-2 status OUTDATED reason User initiated operation
|
82
|
-
2019-12-19 11:01:03 PM Stack Instance: account 112233445566 region us-east-1 status DELETED
|
83
|
-
2019-12-19 11:01:17 PM Stack Instance: account 223344556677 region us-east-1 status DELETED
|
84
|
-
2019-12-19 11:01:31 PM Stack Instance: account 112233445566 region us-east-2 status DELETED
|
85
|
-
Time took to complete stack set operation: 1m 3s
|
86
|
-
Stack set operation completed.
|
87
|
-
Stack Set Operation Summary:
|
88
|
-
account 112233445566 region us-east-1 status SUCCEEDED
|
89
|
-
account 112233445566 region us-east-2 status SUCCEEDED
|
90
|
-
account 223344556677 region us-east-2 status SUCCEEDED
|
91
|
-
account 223344556677 region us-east-1 status SUCCEEDED
|
92
|
-
$
|
@@ -1,76 +0,0 @@
|
|
1
|
-
## Example
|
2
|
-
|
3
|
-
$ lono sets deploy my-set --blueprint demo
|
4
|
-
Generating CloudFormation templates for blueprint demo:
|
5
|
-
output/demo/templates/demo.yml
|
6
|
-
Uploading CloudFormation templates...
|
7
|
-
Uploaded: output/demo/templates/demo.yml to s3://lono-bucket-12di8xz5sy72z/development/output/demo/templates/demo.yml
|
8
|
-
Templates uploaded to s3.
|
9
|
-
Generating parameter files for blueprint demo:
|
10
|
-
Using params for development: configs/demo/params/development.txt
|
11
|
-
output/demo/params/development.json
|
12
|
-
Parameter Diff Preview:
|
13
|
-
Running: colordiff /tmp/lono/params-preview/existing.json /tmp/lono/params-preview/new.json
|
14
|
-
There were no differences.
|
15
|
-
Generating CloudFormation source code diff...
|
16
|
-
Running: colordiff /tmp/existing_stack_set.yml /home/ec2-user/environment/infra/output/demo/templates/demo.yml
|
17
|
-
33c33
|
18
|
-
< Value: '2019-12-19 22:46:33 +0000'
|
19
|
-
---
|
20
|
-
> Value: '2019-12-19 23:08:05 +0000'
|
21
|
-
Parameters passed to cfn.update_stack_set:
|
22
|
-
---
|
23
|
-
stack_set_name: my-set
|
24
|
-
parameters:
|
25
|
-
- parameter_key: GroupDescription
|
26
|
-
parameter_value: my-group-description-1
|
27
|
-
template_url: https://lono-bucket-12di8xz5sy72z.s3.us-west-2.amazonaws.com/development/output/demo/templates/demo.yml
|
28
|
-
template_body: 'Hidden due to size... View at: output/demo/templates/demo.yml'
|
29
|
-
Are you sure you want to update the my-set stack set?
|
30
|
-
Will deploy to:
|
31
|
-
account: 112233445566
|
32
|
-
regions: ap-northeast-1,ap-northeast-2,us-west-1,us-west-2
|
33
|
-
account: 223344556677
|
34
|
-
regions: ap-northeast-1,ap-northeast-2,us-west-1,us-west-2
|
35
|
-
|
36
|
-
Number of stack instances to be updated: 8
|
37
|
-
Are you sure? (y/N) y
|
38
|
-
Updating my-set stack set
|
39
|
-
Stack Set Operation Status: RUNNING
|
40
|
-
Stack Instance statuses... (takes a while)
|
41
|
-
2019-12-19 11:08:21 PM Stack Instance: account 112233445566 region ap-northeast-1 status OUTDATED reason User initiated operation
|
42
|
-
2019-12-19 11:08:21 PM Stack Instance: account 112233445566 region us-west-2 status OUTDATED reason User initiated operation
|
43
|
-
2019-12-19 11:08:23 PM Stack Instance: account 112233445566 region ap-northeast-2 status OUTDATED reason User initiated operation
|
44
|
-
2019-12-19 11:08:30 PM Stack Instance: account 223344556677 region ap-northeast-1 status OUTDATED reason User initiated operation
|
45
|
-
2019-12-19 11:08:30 PM Stack Instance: account 223344556677 region ap-northeast-2 status OUTDATED reason User initiated operation
|
46
|
-
2019-12-19 11:08:30 PM Stack Instance: account 112233445566 region us-west-1 status OUTDATED reason User initiated operation
|
47
|
-
2019-12-19 11:08:30 PM Stack Instance: account 223344556677 region us-west-1 status OUTDATED reason User Initiated
|
48
|
-
2019-12-19 11:08:31 PM Stack Instance: account 223344556677 region us-west-2 status OUTDATED reason User initiated operation
|
49
|
-
2019-12-19 11:08:49 PM Stack Instance: account 223344556677 region us-west-1 status CURRENT
|
50
|
-
2019-12-19 11:08:58 PM Stack Instance: account 112233445566 region us-west-1 status OUTDATED reason User Initiated
|
51
|
-
2019-12-19 11:09:17 PM Stack Instance: account 112233445566 region us-west-1 status CURRENT
|
52
|
-
2019-12-19 11:09:28 PM Stack Instance: account 112233445566 region ap-northeast-2 status OUTDATED reason User Initiated
|
53
|
-
2019-12-19 11:09:51 PM Stack Instance: account 112233445566 region ap-northeast-2 status CURRENT
|
54
|
-
2019-12-19 11:10:03 PM Stack Instance: account 223344556677 region ap-northeast-2 status OUTDATED reason User Initiated
|
55
|
-
2019-12-19 11:10:27 PM Stack Instance: account 223344556677 region ap-northeast-2 status CURRENT
|
56
|
-
2019-12-19 11:10:36 PM Stack Instance: account 112233445566 region ap-northeast-1 status OUTDATED reason User Initiated
|
57
|
-
2019-12-19 11:10:59 PM Stack Instance: account 112233445566 region ap-northeast-1 status CURRENT
|
58
|
-
2019-12-19 11:11:08 PM Stack Instance: account 223344556677 region ap-northeast-1 status OUTDATED
|
59
|
-
2019-12-19 11:11:13 PM Stack Instance: account 223344556677 region ap-northeast-1 status OUTDATED reason User Initiated
|
60
|
-
2019-12-19 11:11:36 PM Stack Instance: account 223344556677 region ap-northeast-1 status CURRENT
|
61
|
-
2019-12-19 11:11:46 PM Stack Instance: account 112233445566 region us-west-2 status OUTDATED reason User Initiated
|
62
|
-
2019-12-19 11:12:09 PM Stack Instance: account 112233445566 region us-west-2 status CURRENT
|
63
|
-
2019-12-19 11:12:19 PM Stack Instance: account 223344556677 region us-west-2 status OUTDATED reason User Initiated
|
64
|
-
Stack Set Operation Status: SUCCEEDED
|
65
|
-
2019-12-19 11:12:42 PM Stack Instance: account 223344556677 region us-west-2 status CURRENT
|
66
|
-
Time took to complete stack set operation: 4m 29s
|
67
|
-
Stack Set Operation Summary:
|
68
|
-
account 223344556677 region us-west-1 status SUCCEEDED
|
69
|
-
account 112233445566 region us-west-2 status SUCCEEDED
|
70
|
-
account 112233445566 region ap-northeast-1 status SUCCEEDED
|
71
|
-
account 112233445566 region ap-northeast-2 status SUCCEEDED
|
72
|
-
account 223344556677 region ap-northeast-2 status SUCCEEDED
|
73
|
-
account 223344556677 region us-west-2 status SUCCEEDED
|
74
|
-
account 112233445566 region us-west-1 status SUCCEEDED
|
75
|
-
account 223344556677 region ap-northeast-1 status SUCCEEDED
|
76
|
-
demo
|
@@ -1,23 +0,0 @@
|
|
1
|
-
## Example
|
2
|
-
|
3
|
-
$ lono sets status my-set
|
4
|
-
Stack Set Operation Status: SUCCEEDED
|
5
|
-
Stack Instance statuses... (takes a while)
|
6
|
-
Stack Instance: account 112233445566 region ap-northeast-2 status CURRENT
|
7
|
-
Stack Instance: account 112233445566 region ap-northeast-1 status CURRENT
|
8
|
-
Stack Instance: account 223344556677 region us-west-1 status CURRENT
|
9
|
-
Stack Instance: account 223344556677 region ap-northeast-1 status CURRENT
|
10
|
-
Stack Instance: account 223344556677 region ap-northeast-2 status CURRENT
|
11
|
-
Stack Instance: account 112233445566 region us-west-1 status CURRENT
|
12
|
-
Stack Instance: account 112233445566 region us-west-2 status CURRENT
|
13
|
-
Stack Instance: account 223344556677 region us-west-2 status CURRENT
|
14
|
-
Stack Set Operation Summary:
|
15
|
-
account 223344556677 region us-west-1 status SUCCEEDED
|
16
|
-
account 112233445566 region us-west-2 status SUCCEEDED
|
17
|
-
account 112233445566 region ap-northeast-1 status SUCCEEDED
|
18
|
-
account 112233445566 region ap-northeast-2 status SUCCEEDED
|
19
|
-
account 223344556677 region ap-northeast-2 status SUCCEEDED
|
20
|
-
account 223344556677 region us-west-2 status SUCCEEDED
|
21
|
-
account 112233445566 region us-west-1 status SUCCEEDED
|
22
|
-
account 223344556677 region ap-northeast-1 status SUCCEEDED
|
23
|
-
$
|
data/lib/lono/help/summary.md
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
The `lono summary` command helps you quickly understand a CloudFormation template.
|
2
|
-
|
3
|
-
## Examples
|
4
|
-
|
5
|
-
$ bundle exec lono summary ec2
|
6
|
-
Generating CloudFormation templates for blueprint ec2:
|
7
|
-
output/ec2/templates/ec2-old.yml
|
8
|
-
output/ec2/templates/ec2-new.yml
|
9
|
-
=> CloudFormation Template Summary for template ec2-new:
|
10
|
-
Required Parameters (0):
|
11
|
-
There are no required parameters.
|
12
|
-
Optional Parameters (3):
|
13
|
-
InstanceType (String) Default: t3.micro
|
14
|
-
Subnet (String) Default:
|
15
|
-
Vpc (String) Default:
|
16
|
-
Resources:
|
17
|
-
1 AWS::EC2::Instance
|
18
|
-
1 AWS::EC2::SecurityGroup
|
19
|
-
2 Total
|
20
|
-
=> CloudFormation Template Summary for template ec2-old:
|
21
|
-
Required Parameters (0):
|
22
|
-
There are no required parameters.
|
23
|
-
Optional Parameters (3):
|
24
|
-
InstanceType (String) Default: t3.micro
|
25
|
-
Subnet (String) Default:
|
26
|
-
Vpc (String) Default:
|
27
|
-
Resources:
|
28
|
-
1 AWS::EC2::Instance
|
29
|
-
1 AWS::EC2::SecurityGroup
|
30
|
-
2 Total
|
31
|
-
$
|
32
|
-
|
33
|
-
Blog Post also covers this: [lono summary Tutorial Introduction](https://blog.boltops.com/2017/09/18/lono-inspect-summary-tutorial-introduction)
|
data/lib/lono/help/upgrade.md
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
The lono upgrade command works for v6 and onward.
|
data/lib/lono/help/xgraph.md
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
## Example
|
2
|
-
|
3
|
-
With more complex CloudFormation templates, the dependency can get difficult to follow. Visualizing the dependencies is helpful.
|
4
|
-
|
5
|
-
lono code import https://s3.amazonaws.com/solutions-reference/aws-waf-security-automations/latest/aws-waf-security-automations.template --blueprint waf
|
6
|
-
lono xgraph waf
|
7
|
-
|
8
|
-
This above command generates a dependency chart. The command uses the DependsOn attribute specified in each resource to figure this out. It does not show implied dependencies that CloudFormaton automatically computes for us. The chart looks like this:
|
9
|
-
|
10
|
-
![](/img/tutorial/waf-chart.png){:.doc-photo}
|
11
|
-
|
12
|
-
The chart is generated with [Graphviz](http://www.graphviz.org/). To install:
|
13
|
-
|
14
|
-
brew install graphviz
|
15
|
-
|
16
|
-
Blog Post also covers this: [lono inspect depends Tutorial Introduction](https://blog.boltops.com/2017/09/20/lono-inspect-depends-tutorial-introduction)
|
data/lib/lono/help.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
module Lono::Help
|
2
|
-
class << self
|
3
|
-
# namespaced_command: cfn/create or cfn:create both work.
|
4
|
-
def text(namespaced_command)
|
5
|
-
path = namespaced_command.to_s.gsub(':','/')
|
6
|
-
path = File.expand_path("../help/#{path}.md", __FILE__)
|
7
|
-
IO.read(path) if File.exist?(path)
|
8
|
-
end
|
9
|
-
|
10
|
-
# Generates a markdown file for site docuemtation
|
11
|
-
def markdown
|
12
|
-
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
data/lib/lono/importer/erb.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
class Lono::Importer
|
2
|
-
class Erb < Base
|
3
|
-
def run
|
4
|
-
puts "=> Imported CloudFormation template.".color(:green)
|
5
|
-
template_path = "#{Lono.config.templates_path}/#{@template}.yml"
|
6
|
-
download_template(@source, template_path)
|
7
|
-
puts "Template created: #{pretty_path(template_path)}"
|
8
|
-
|
9
|
-
create_dot_lono("erb")
|
10
|
-
template_definition_path = add_template_definition
|
11
|
-
puts "Template definition added: #{pretty_path(template_definition_path)}"
|
12
|
-
|
13
|
-
create_params(template_path)
|
14
|
-
summarize
|
15
|
-
end
|
16
|
-
|
17
|
-
# Add template definition to app/definitions/base.rb.
|
18
|
-
def add_template_definition
|
19
|
-
path = "#{Lono.config.definitions_path}/base.rb"
|
20
|
-
lines = File.exist?(path) ? IO.readlines(path) : []
|
21
|
-
new_template_definition = %Q|template "#{@template}"|
|
22
|
-
unless lines.detect { |l| l.include?(new_template_definition) }
|
23
|
-
lines << ["\n", new_template_definition]
|
24
|
-
result = lines.join('')
|
25
|
-
FileUtils.mkdir_p(File.dirname(path))
|
26
|
-
IO.write(path, result)
|
27
|
-
end
|
28
|
-
path
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
data/lib/lono/inspector/graph.rb
DELETED
@@ -1,125 +0,0 @@
|
|
1
|
-
require "yaml"
|
2
|
-
require "graph"
|
3
|
-
|
4
|
-
module Lono::Inspector
|
5
|
-
class Graph < Base
|
6
|
-
def initialize(options={})
|
7
|
-
super
|
8
|
-
@nodes = [] # lookup map
|
9
|
-
end
|
10
|
-
|
11
|
-
def perform(template)
|
12
|
-
# little dirty but @template is used in data method so we dont have to pass it to the data method
|
13
|
-
@template = template
|
14
|
-
|
15
|
-
puts "Generating dependencies tree for template #{@template}..."
|
16
|
-
return if @options[:noop]
|
17
|
-
|
18
|
-
# First loop through top level nodes and build set depends_on property
|
19
|
-
node_list = [] # top level node list
|
20
|
-
resources = data["Resources"]
|
21
|
-
resources.each do |logical_id, resource|
|
22
|
-
node = Node.new(logical_id)
|
23
|
-
node.depends_on = normalize_depends_on(resource)
|
24
|
-
node.resource_type = normalize_resource_type(resource)
|
25
|
-
node_list << node
|
26
|
-
end
|
27
|
-
|
28
|
-
# Now that we have loop through all the top level resources once
|
29
|
-
# we can use the depends_on attribute on each node and set the
|
30
|
-
# children property since the identity nodes are in memory.
|
31
|
-
node_list.each do |node|
|
32
|
-
node.children = normalize_children(node_list, node)
|
33
|
-
end
|
34
|
-
|
35
|
-
# At this point we have a tree of nodes.
|
36
|
-
if @options[:display] == "text"
|
37
|
-
puts "CloudFormation Dependencies:"
|
38
|
-
node_list.each { |node| print_tree(node) }
|
39
|
-
else
|
40
|
-
print_graph(node_list)
|
41
|
-
puts "CloudFormation Dependencies graph generated."
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
# normalized DependOn attribute to an Array of Strings
|
46
|
-
def normalize_depends_on(resource)
|
47
|
-
dependencies = resource["DependOn"] || []
|
48
|
-
[dependencies].flatten
|
49
|
-
end
|
50
|
-
|
51
|
-
def normalize_resource_type(resource)
|
52
|
-
type = resource["Type"]
|
53
|
-
type.sub("AWS::", "") # strip out AWS to make less verbose
|
54
|
-
end
|
55
|
-
|
56
|
-
# It is possible with bad CloudFormation templates that the dependency is not
|
57
|
-
# resolved, but we wont deal with that. Users can validate their CloudFormation
|
58
|
-
# template before using this tool.
|
59
|
-
def normalize_children(node_list, node)
|
60
|
-
kids = []
|
61
|
-
node.depends_on.each do |dependent_logical_id|
|
62
|
-
node = node_list.find { |n| n.name == dependent_logical_id }
|
63
|
-
kids << node
|
64
|
-
end
|
65
|
-
kids
|
66
|
-
end
|
67
|
-
|
68
|
-
def print_tree(node, depth=0)
|
69
|
-
spacing = " " * depth
|
70
|
-
puts "#{spacing}#{node.name}"
|
71
|
-
node.children.each do |node|
|
72
|
-
print_tree(node, depth+1)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
def print_graph(node_list)
|
77
|
-
check_graphviz_installed
|
78
|
-
digraph do
|
79
|
-
# graph_attribs << 'size="6,6"'
|
80
|
-
node_attribs << lightblue << filled
|
81
|
-
|
82
|
-
node_list.each do |n|
|
83
|
-
node(n.graph_name)
|
84
|
-
n.children.each do |child|
|
85
|
-
edge n.graph_name, child.graph_name
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
random = (0...8).map { (65 + rand(26)).chr }.join
|
90
|
-
path = "/tmp/cloudformation-depends-on-#{random}"
|
91
|
-
save path, "png"
|
92
|
-
# Check if open command exists and use it to open the image.
|
93
|
-
system "open #{path}.png" if system("type open > /dev/null 2>&1")
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
# Check if Graphiz is installed and prints a user friendly message if it is not installed.
|
98
|
-
# Provide instructions if on macosx.
|
99
|
-
def check_graphviz_installed
|
100
|
-
installed = system("type dot > /dev/null 2>&1") # dot is a command that is part of the graphviz package
|
101
|
-
unless installed
|
102
|
-
puts "It appears that the Graphviz is not installed. Please install it to generate the graph."
|
103
|
-
if RUBY_PLATFORM =~ /darwin/
|
104
|
-
puts "You can install Graphviz with homebrew:"
|
105
|
-
puts " brew install graphviz"
|
106
|
-
end
|
107
|
-
exit 1
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
class Node
|
112
|
-
attr_accessor :name, :resource_type, :children, :depends_on
|
113
|
-
def initialize(name)
|
114
|
-
@name = name
|
115
|
-
@children = []
|
116
|
-
@depends_on = []
|
117
|
-
end
|
118
|
-
|
119
|
-
def graph_name
|
120
|
-
type = "(#{resource_type})" if resource_type
|
121
|
-
[name, type].compact.join("\n")
|
122
|
-
end
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
data/lib/lono/jade/circular.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
class Lono::Jade
|
2
|
-
module Circular
|
3
|
-
def check_for_circular_dependency!
|
4
|
-
circular = circular_dependency?
|
5
|
-
return unless circular
|
6
|
-
|
7
|
-
puts "ERROR: jade circular dependency detected".color(:red)
|
8
|
-
puts "circular dependency: #{parent_names.join(" => ")}"
|
9
|
-
exit 1
|
10
|
-
end
|
11
|
-
|
12
|
-
def circular_dependency?
|
13
|
-
parent_names.uniq.size != parent_names.size
|
14
|
-
end
|
15
|
-
|
16
|
-
def parent_names
|
17
|
-
names = [self.name] # include initial jade name to detect circular dependency earlier
|
18
|
-
parent = registry.parent
|
19
|
-
while parent
|
20
|
-
names << parent.name
|
21
|
-
parent = parent.registry.parent
|
22
|
-
end
|
23
|
-
names
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
class Lono::Jade::Materializer
|
2
|
-
class Final
|
3
|
-
def build(jades)
|
4
|
-
return if jades.empty?
|
5
|
-
list = jades.map(&:name).uniq.join(", ") # possible to have different versions. only showing names and removing duplicates
|
6
|
-
puts "Materializing #{list}..."
|
7
|
-
GemsBuilder.new(jades).build
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
@@ -1,81 +0,0 @@
|
|
1
|
-
require 'open3'
|
2
|
-
|
3
|
-
class Lono::Jade::Materializer
|
4
|
-
class GemsBuilder
|
5
|
-
extend Memoist
|
6
|
-
|
7
|
-
def initialize(*jades)
|
8
|
-
@jades = jades.flatten
|
9
|
-
@build_root = "#{Lono.root}/tmp/jades"
|
10
|
-
end
|
11
|
-
|
12
|
-
def build
|
13
|
-
puts "GemsBuilder#build materializing #{@jades.map(&:name)}" if ENV['LONO_DEBUG']
|
14
|
-
remove_gemfile
|
15
|
-
gemfile = build_gemfile(@jades)
|
16
|
-
return unless gemfile
|
17
|
-
write(gemfile)
|
18
|
-
bundle
|
19
|
-
end
|
20
|
-
|
21
|
-
def build_gemfile(jades)
|
22
|
-
return if jades.empty?
|
23
|
-
|
24
|
-
lines = []
|
25
|
-
jades.each do |jade|
|
26
|
-
return if local_exist?(jade)
|
27
|
-
args = source.gem_args(jade)
|
28
|
-
line = %Q|gem #{args}|
|
29
|
-
lines << line unless lines.include?(line)
|
30
|
-
end
|
31
|
-
lines.sort!
|
32
|
-
lines.join("\n") + "\n"
|
33
|
-
end
|
34
|
-
|
35
|
-
def bundle
|
36
|
-
Bundler.with_unbundled_env do
|
37
|
-
bundle_install
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def bundle_install
|
42
|
-
command = "cd #{@build_root} && bundle install"
|
43
|
-
puts "=> #{command}" if ENV['LONO_DEBUG']
|
44
|
-
stdout, stderr, status = Open3.capture3(command)
|
45
|
-
|
46
|
-
unless status.success?
|
47
|
-
names = @jades.map(&:name)
|
48
|
-
gem_text = names.size == 1 ? "gem" : "gems"
|
49
|
-
puts "Fail to build #{gem_text} #{names.join(', ')}".color(:red)
|
50
|
-
puts "Failed running => #{command}"
|
51
|
-
puts stdout
|
52
|
-
puts stderr
|
53
|
-
if stderr.include?("correct access rights")
|
54
|
-
puts "Are you sure you have access to the git repo and the repo exists?".color(:yellow)
|
55
|
-
end
|
56
|
-
exit 1
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
# When a local version is found, will use that version
|
61
|
-
def local_exist?(jade)
|
62
|
-
!!jade.finder.find(jade.name, local_only: true)
|
63
|
-
end
|
64
|
-
|
65
|
-
def write(gemfile)
|
66
|
-
path = "#{@build_root}/Gemfile"
|
67
|
-
FileUtils.mkdir_p(File.dirname(path))
|
68
|
-
IO.write(path, gemfile)
|
69
|
-
end
|
70
|
-
|
71
|
-
def remove_gemfile
|
72
|
-
FileUtils.rm_f("#{@build_root}/Gemfile")
|
73
|
-
FileUtils.rm_f("#{@build_root}/Gemfile.lock")
|
74
|
-
end
|
75
|
-
|
76
|
-
def source
|
77
|
-
Source.new
|
78
|
-
end
|
79
|
-
memoize :source
|
80
|
-
end
|
81
|
-
end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
class Lono::Jade::Materializer
|
2
|
-
class Source
|
3
|
-
def initialize(lono_settings=nil)
|
4
|
-
@lono_settings = lono_settings || Lono::Setting.new.data
|
5
|
-
end
|
6
|
-
|
7
|
-
# String provide to gem method in Gemfile. Example:
|
8
|
-
#
|
9
|
-
# gem "mygem", "v0.1.0", git: "xxx"
|
10
|
-
#
|
11
|
-
def gem_args(jade)
|
12
|
-
args = jade.registry.args
|
13
|
-
args = args.map { |s| %Q|"#{s}"| }.join(', ')
|
14
|
-
|
15
|
-
options = options(jade)
|
16
|
-
options = options.inject([]) { |r,(k,v)| r << %Q|#{k}: "#{v}"| }.join(', ')
|
17
|
-
|
18
|
-
"#{args}, #{options}"
|
19
|
-
end
|
20
|
-
|
21
|
-
def options(jade)
|
22
|
-
registry = jade.registry
|
23
|
-
options = registry.gem_options
|
24
|
-
# Direct source provided as part of configset call
|
25
|
-
#
|
26
|
-
# configset("ssm", git: "https://github.com/owner/ssm")
|
27
|
-
# configset("ssm", path: "/path/to/ssm")
|
28
|
-
# configset("ssm", source: "https://rubygems.org")
|
29
|
-
#
|
30
|
-
if options.key?(:git) || options.key?(:path) || options.key?(:source)
|
31
|
-
return(options)
|
32
|
-
end
|
33
|
-
|
34
|
-
# Otherwise use the sources location settings, which does not include the repo name
|
35
|
-
materalized_options = if location.include?("git@") || location.include?("https")
|
36
|
-
{git: "#{location}/#{jade.repo}"}
|
37
|
-
else
|
38
|
-
{path: "#{location}/#{jade.repo}"}
|
39
|
-
end
|
40
|
-
materalized_options.merge(options)
|
41
|
-
end
|
42
|
-
|
43
|
-
def location
|
44
|
-
ENV["LONO_MATERIALIZED_GEMS_SOURCE"] ||
|
45
|
-
Lono::Configset::Register::Blueprint.source ||
|
46
|
-
settings["source"] ||
|
47
|
-
"git@github.com:boltopspro" # default_location
|
48
|
-
end
|
49
|
-
|
50
|
-
def settings
|
51
|
-
@lono_settings.dig("materialized_gems") || {}
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|