cfhighlander 0.2.1.alpha.16 → 0.2.1.alpha.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7e3dc363c120e270b173d9d06b32f2b9c7f3b616aae6a7967b2c72861b86948
4
- data.tar.gz: 4459ae657c47d2bd3a24d09c635c9a30e441c13be99c165f014f74875fdd905d
3
+ metadata.gz: 4a7d7d97f9d94570594d6c075bd489aa6ae3058d6ce7c096a532ea65288c9de0
4
+ data.tar.gz: 19df3d0459ef71885b3f9e85f7067e2bcf73d7fc9e612af579d72a0fe59f1ad3
5
5
  SHA512:
6
- metadata.gz: 086be5bfdc71f40ae9802bb8d7256a9a21abbc106a8943e77a95d378e80e127dc2db811ff7766281c88a5feeee7ad4fde6a0ed56b7e1f36bf4f95b172af3f620
7
- data.tar.gz: 7ce4d1afa76815d1b9e64ee19982d27b31757956effc7a05c12e57aaaa05e2ec8296a2651653f46b6067c9128ed372f0a71ea5d579fe3ed6213bfc64b3ab400b
6
+ metadata.gz: 32eefcd197e05029a8d176dffef997238aa794fdd51684d31e9099d919e0bba9fe42ec7182f87c74437d074b91c0e3d4ab261b8624c8057e33c0595f960e473b
7
+ data.tar.gz: c3521f255a7f6509524b2df2e8a72289d6912375fd13a98e7270c38858db4dbcb9b0d08a723cff1603102fdf621ffa11c741c2f3a65d0af22f765390f272a309
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  [![Build Status](https://travis-ci.com/theonestack/cfhighlander.svg?branch=develop)](https://travis-ci.com/theonestack/cfhighlander)
2
2
 
3
- # Highlander
3
+ # Cfhighlander
4
4
 
5
- Highlander is DSL processor that enables composition and orchestration of Amazon CloudFormation templates
5
+ Cfhighlander is DSL processor that enables composition and orchestration of Amazon CloudFormation templates
6
6
  written using [CfnDsl](https://github.com/cfndsl/cfndsl) in an abstract way. It tries to tackle problem of merging multiple templates into master
7
7
  template in an elegant way, so higher degree of template reuse can be achieved. It does so by formalising commonly
8
8
  used patterns via DSL statements. For an example, passing output of one stack into other stack is achieved using
@@ -48,7 +48,7 @@ this file defines map used within component itself
48
48
  - Define cfndsl template used for building CloudFormation resources
49
49
 
50
50
 
51
- **Outer component** is component that defines other component via higlander dsl `Component` statement. Defined component
51
+ **Outer component** is component that defines other component via cfhighlander dsl `Component` statement. Defined component
52
52
  is called **inner component**. Components defined under same outer component are **sibling components**
53
53
 
54
54
  ## Usage
@@ -58,30 +58,30 @@ For both ways, highlander is distributed as ruby gem
58
58
 
59
59
 
60
60
  ```bash
61
- $ gem install highlander
62
- $ highlander help
63
- highlander commands:
64
- highlander cfcompile component[@version] -f, --format=FORMAT # Compile Highlander component to CloudFormation templates
65
- highlander cfpublish component[@version] -f, --format=FORMAT # Publish CloudFormation template for component, and it' referenced subcomponents
66
- highlander configcompile component[@version] # Compile Highlander components configuration
67
- highlander dslcompile component[@version] -f, --format=FORMAT # Compile Highlander component configuration and create cfndsl templates
68
- highlander help [COMMAND] # Describe available commands or one specific command
69
- highlander publish component[@version] [-v published_version] # Publish CloudFormation template for component, and it' referenced subcomponents
61
+ $ gem install cfhighlander
62
+ $ cfhighlander help
63
+ cfhighlander commands:
64
+ cfhighlander cfcompile component[@version] -f, --format=FORMAT # Compile Highlander component to CloudFormation templates
65
+ cfhighlander cfpublish component[@version] -f, --format=FORMAT # Publish CloudFormation template for component, and it' referenced subcomponents
66
+ cfhighlander configcompile component[@version] # Compile Highlander components configuration
67
+ cfhighlander dslcompile component[@version] -f, --format=FORMAT # Compile Highlander component configuration and create cfndsl templates
68
+ cfhighlander help [COMMAND] # Describe available commands or one specific command
69
+ cfhighlander publish component[@version] [-v published_version] # Publish CloudFormation template for component, and it' referenced subcomponents
70
70
 
71
71
  ```
72
72
  ### Working directory
73
73
 
74
74
  All templates and configuration generated are placed in `$WORKDIR/out` directory. Optionally, you can alter working directory
75
- via `HIGHLANDER_WORKDIR` environment variable.
75
+ via `CFHIGHLANDER_WORKDIR` environment variable.
76
76
 
77
77
  ### Commands
78
78
 
79
79
  To get full list of options for any of cli commands use `highlander help command_name` syntax
80
80
 
81
81
  ```bash
82
- $ highlander help publish
82
+ $ cfhighlander help publish
83
83
  Usage:
84
- highlander publish component[@version] [-v published_version]
84
+ cfhighlander publish component[@version] [-v published_version]
85
85
 
86
86
  Options:
87
87
  [--dstbucket=DSTBUCKET] # Distribution S3 bucket
@@ -95,7 +95,7 @@ Publish CloudFormation template for component,
95
95
 
96
96
  #### Silent mode
97
97
 
98
- Highlander DSL processor has built-in support for packaging and deploying AWS Lambda functions. Some of these lambda
98
+ Cfhighlander DSL processor has built-in support for packaging and deploying AWS Lambda functions. Some of these lambda
99
99
  functions may require shell command to be executed (e.g. pulling library dependencies) prior their packaging in ZIP archive format.
100
100
  Such commands are potential security risk, as they allow execution of arbitrary code, so for this reason user agreement is required
101
101
  e.g:
@@ -136,11 +136,11 @@ cfndsl templates. Check component configuration section for more details.
136
136
 
137
137
  #### dslcompile
138
138
 
139
- *dslcompile* will produce intermediary cfndsl templates. This is useful for debugging highlander components
139
+ *dslcompile* will produce intermediary cfndsl templates. This is useful for debugging cfhighlander components
140
140
 
141
141
  #### publish
142
142
 
143
- *publish* command publishes highlander components source code to s3 location (compared to *cfpublish* which is publishing
143
+ *publish* command publishes cfhighlander components source code to s3 location (compared to *cfpublish* which is publishing
144
144
  compiled cloudformation templates). Same CLI / DSL options apply as for *cfpublish* command. Version defaults to `latest`
145
145
 
146
146
 
@@ -408,4 +408,4 @@ so extension methods can be consumed within cfndsl template.
408
408
 
409
409
  Any extensions placed within `cfndsl_ext` folder will be
410
410
  available in cfndsl templates of all components. Any extensions placed within `hl_ext` folder are
411
- available in highlander templates of all components.
411
+ available in cfhighlander templates of all components.
data/bin/cfhighlander CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require_relative('./highlander')
3
+ require_relative('./cfhighlander')
@@ -9,7 +9,7 @@
9
9
 
10
10
  require 'thor'
11
11
  require 'rubygems'
12
- require_relative '../lib//highlander.compiler'
12
+ require_relative '../lib/highlander.compiler'
13
13
  require_relative '../lib/highlander.factory'
14
14
  require_relative '../lib/highlander.publisher'
15
15
  require_relative '../lib/highlander.validator'
@@ -138,9 +138,7 @@ end
138
138
 
139
139
  # build component from passed cli options
140
140
  def build_component(options, component_name)
141
- if ENV['HIGHLANDER_WORKDIR'].nil?
142
- ENV['HIGHLANDER_WORKDIR'] = Dir.pwd
143
- end
141
+
144
142
  component_version = options[:version]
145
143
  distribution_bucket = options[:dstbucket]
146
144
  distribution_prefix = options[:dstprefix]
@@ -155,4 +153,11 @@ def build_component(options, component_name)
155
153
  component
156
154
  end
157
155
 
156
+ if ENV['CFHIGHLANDER_WORKDIR'].nil?
157
+ ENV['CFHIGHLANDER_WORKDIR'] = Dir.pwd
158
+ end
159
+ if ENV['HIGHLANDER_WORKDIR'].nil?
160
+ ENV['HIGHLANDER_WORKDIR'] = Dir.pwd
161
+ end
162
+
158
163
  HighlanderCli.start
@@ -33,7 +33,7 @@ module Highlander
33
33
 
34
34
  def initialize(component)
35
35
 
36
- @workdir = ENV['HIGHLANDER_WORKDIR']
36
+ @workdir = ENV['CFHIGHLANDER_WORKDIR']
37
37
  @component = component
38
38
  @sub_components = []
39
39
  @component_name = component.highlander_dsl.name.downcase
@@ -397,7 +397,6 @@ def HighlanderComponent(&block)
397
397
  puts "Processing higlander component #{@name}\n\tLocation:#{@highlander_dsl_path}" +
398
398
  "\n\tConfig:#{@config}"
399
399
 
400
- component_config = @config
401
400
 
402
401
  instance.config = @config
403
402
 
@@ -426,3 +425,7 @@ def HighlanderComponent(&block)
426
425
 
427
426
  return instance
428
427
  end
428
+
429
+ def CfhighlanderComponent(&block)
430
+ HighlanderComponent(&block)
431
+ end
@@ -2,7 +2,7 @@ require_relative './highlander.dsl'
2
2
  require 'fileutils'
3
3
  require 'git'
4
4
 
5
- LOCAL_HIGHLANDER_CACHE_LOCATION = "#{ENV['HOME']}/.highlander/components"
5
+ LOCAL_HIGHLANDER_CACHE_LOCATION = "#{ENV['HOME']}/.cfhighlander/components"
6
6
 
7
7
  module Highlander
8
8
 
@@ -40,6 +40,7 @@ module Highlander
40
40
  def load_config()
41
41
  @config = {} if @config.nil?
42
42
  Dir["#{@component_dir}/*.config.yaml"].each do |config_file|
43
+ puts "Loading config for #{@name}:\n\tread #{config_file} "
43
44
  partial_config = YAML.load(File.read(config_file))
44
45
  unless partial_config.nil?
45
46
  @config.extend(partial_config)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfhighlander
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1.alpha.16
4
+ version: 0.2.1.alpha.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikola Tosic
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-05-28 00:00:00.000000000 Z
12
+ date: 2018-05-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline
@@ -214,7 +214,7 @@ extra_rdoc_files: []
214
214
  files:
215
215
  - README.md
216
216
  - bin/cfhighlander
217
- - bin/highlander.rb
217
+ - bin/cfhighlander.rb
218
218
  - cfndsl_ext/config/managed_policies.yaml
219
219
  - cfndsl_ext/iam_helper.rb
220
220
  - cfndsl_ext/lambda_helper.rb