kurgan 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.travis.yml +17 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +22 -0
- data/LICENSE.txt +21 -0
- data/README.md +20 -0
- data/Rakefile +2 -0
- data/exe/kurgan +4 -0
- data/kurgan.gemspec +37 -0
- data/lib/kurgan.rb +39 -0
- data/lib/kurgan/add.rb +35 -0
- data/lib/kurgan/component.rb +43 -0
- data/lib/kurgan/globals.rb +10 -0
- data/lib/kurgan/init.rb +69 -0
- data/lib/kurgan/list.rb +59 -0
- data/lib/kurgan/projects.rb +33 -0
- data/lib/kurgan/templates/Jenkinsfile.tt +39 -0
- data/lib/kurgan/templates/MITLICENSE +21 -0
- data/lib/kurgan/templates/README.md.tt +34 -0
- data/lib/kurgan/templates/cfhighlander.rb.tt +17 -0
- data/lib/kurgan/templates/cfndsl.rb.tt +3 -0
- data/lib/kurgan/templates/config.yaml.tt +0 -0
- data/lib/kurgan/templates/gitignore.tt +1 -0
- data/lib/kurgan/templates/travis.yml.tt +6 -0
- data/lib/kurgan/version.rb +3 -0
- metadata +112 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: aa42f950ad3cb1bf07eb4bc1f465bb0f49208eddda21e376038b121e15207d7b
|
4
|
+
data.tar.gz: 1fe9dfd5e80f2bcbce439d520d6bd50b386a7e3bf5225aa344057fba4800071b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4c0cc35a6abb39c0a4c1a8bd48f24762f46ac93357fb7302639b265ab9bed5fb27baf6fe86372d6c241f99215494dd54613680e3d150473f856c36336115e9bc
|
7
|
+
data.tar.gz: 03524ea72aff8ca3bf8d31712a5fdd445517091363172f9612f178517c023ef0f732bfdb2132798b0741ea4f65ea9547d199cdf89bf28d3911084cc2c581605a
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
sudo: required
|
2
|
+
dist: trusty
|
3
|
+
language: ruby
|
4
|
+
rvm:
|
5
|
+
- 2.5
|
6
|
+
script:
|
7
|
+
- bundle install
|
8
|
+
- gem build kurgan.gemspec
|
9
|
+
- gem install kurgan-*.gem
|
10
|
+
- kurgan help
|
11
|
+
deploy:
|
12
|
+
provider: rubygems
|
13
|
+
api_key: "${RUBYGEMS_API_KEY}"
|
14
|
+
gem: kurgan
|
15
|
+
on:
|
16
|
+
all_branches: true
|
17
|
+
condition: $TRAVIS_BRANCH =~ ^develop|master && $TRAVIS_EVENT_TYPE =~ ^push|api$ && $TRAVIS_REPO_SLUG == "theonestack/kurgan"
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
kurgan (0.1.1)
|
5
|
+
thor (~> 0.19)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
rake (10.5.0)
|
11
|
+
thor (0.20.3)
|
12
|
+
|
13
|
+
PLATFORMS
|
14
|
+
ruby
|
15
|
+
|
16
|
+
DEPENDENCIES
|
17
|
+
bundler (~> 1.16)
|
18
|
+
kurgan!
|
19
|
+
rake (~> 10.0)
|
20
|
+
|
21
|
+
BUNDLED WITH
|
22
|
+
1.16.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Guslington
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Kurgan
|
2
|
+
---
|
3
|
+
|
4
|
+
[![Build Status](https://travis-ci.org/theonestack/kurgan.svg?branch=develop)](https://travis-ci.org/theonestack/kurgan) [![Join the chat at https://gitter.im/theonestack/cfhighlander](https://badges.gitter.im/theonestack/cfhighlander.svg)](https://gitter.im/theonestack/cfhighlander?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
5
|
+
|
6
|
+
Tool to manage CfHighlander stacks
|
7
|
+
|
8
|
+
```bash
|
9
|
+
Commands:
|
10
|
+
kurgan --version, -v # print the version
|
11
|
+
kurgan add [component] # Adds a new component to an existing CfHighlander project
|
12
|
+
kurgan component [name] # Generates a new CfHighlander component
|
13
|
+
kurgan help [COMMAND] # Describe available commands or one specific command
|
14
|
+
kurgan list # List available components and latest version from theonestack github
|
15
|
+
kurgan project [name] # Generates a new CfHighlander project
|
16
|
+
```
|
17
|
+
|
18
|
+
## License
|
19
|
+
|
20
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/exe/kurgan
ADDED
data/kurgan.gemspec
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "kurgan/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "kurgan"
|
8
|
+
spec.version = Kurgan::VERSION
|
9
|
+
spec.authors = ["Guslington"]
|
10
|
+
spec.email = ["theonestackcfhighlander@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Manage a cfhighalnder project}
|
13
|
+
spec.description = %q{Manage a cfhighalnder project}
|
14
|
+
spec.homepage = "http://iamkurgan.com"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata["allowed_push_host"] = "http://mygemserver.com"
|
21
|
+
else
|
22
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
23
|
+
"public gem pushes."
|
24
|
+
end
|
25
|
+
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_dependency "thor", "~> 0.19"
|
34
|
+
|
35
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
36
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
37
|
+
end
|
data/lib/kurgan.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require "thor"
|
2
|
+
require "json"
|
3
|
+
require "kurgan/version"
|
4
|
+
require 'kurgan/globals'
|
5
|
+
require "kurgan/init"
|
6
|
+
require "kurgan/component"
|
7
|
+
require "kurgan/add"
|
8
|
+
require "kurgan/list"
|
9
|
+
|
10
|
+
module Kurgan
|
11
|
+
class Cli < Thor
|
12
|
+
|
13
|
+
map %w[--version -v] => :__print_version
|
14
|
+
desc "--version, -v", "print the version"
|
15
|
+
def __print_version
|
16
|
+
puts Kurgan::VERSION
|
17
|
+
end
|
18
|
+
|
19
|
+
register Kurgan::Init, 'project', 'project [name]', 'Generates a new CfHighlander project'
|
20
|
+
tasks["project"].options = Kurgan::Init.class_options
|
21
|
+
|
22
|
+
register Kurgan::Component, 'component', 'component [name]', 'Generates a new CfHighlander component'
|
23
|
+
tasks["component"].options = Kurgan::Component.class_options
|
24
|
+
|
25
|
+
register Kurgan::Add, 'add', 'add [component]', 'Adds a new component to an existing CfHighlander project'
|
26
|
+
tasks["add"].options = Kurgan::Add.class_options
|
27
|
+
|
28
|
+
desc "list", "List available components and latest version from theonestack github"
|
29
|
+
method_option :filter, aliases: '-f', type: :string, desc: "filter components by service type"
|
30
|
+
method_option :component, aliases: '-c', type: :string, desc: "list all versions for matched components"
|
31
|
+
method_option :update, aliases: '-u', type: :boolean, lazy_default: true, default: false, desc: "Update components list"
|
32
|
+
def list
|
33
|
+
cmd = Kurgan::List.new(options)
|
34
|
+
cmd.execute
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
data/lib/kurgan/add.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
module Kurgan
|
2
|
+
class Add < Thor::Group
|
3
|
+
include Thor::Actions
|
4
|
+
|
5
|
+
argument :template
|
6
|
+
|
7
|
+
class_option :name, aliases: :n, type: :string
|
8
|
+
class_option :version, aliases: :v, type: :string
|
9
|
+
|
10
|
+
def get_cfhighlander_template
|
11
|
+
@cfhighlander_template = Dir['*.cfhighlander.rb'][0]
|
12
|
+
if @cfhighlander_template.nil?
|
13
|
+
raise "No cfhighlander.rb file found in #{Dir.pwd}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def get_component_name
|
18
|
+
@name = options[:name] || template
|
19
|
+
end
|
20
|
+
|
21
|
+
def get_template_version
|
22
|
+
@template = options[:version] ? "#{template}@#{options[:version]}" : template
|
23
|
+
say "adding #{@template} to the #{@cfhighlander_template.split('.')[0]} project"
|
24
|
+
end
|
25
|
+
|
26
|
+
def add_component
|
27
|
+
insert_into_file @cfhighlander_template, " Component name: '#{@name}', template: '#{@template}'\n\n", :before => /^end/
|
28
|
+
end
|
29
|
+
|
30
|
+
def create_config
|
31
|
+
create_file "#{@name}.config.yaml"
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'kurgan/init'
|
2
|
+
|
3
|
+
module Kurgan
|
4
|
+
class Component < Kurgan::Init
|
5
|
+
|
6
|
+
def set_directory
|
7
|
+
@dir = ask "directory name ", default: "hl-component-#{name}"
|
8
|
+
empty_directory @dir
|
9
|
+
end
|
10
|
+
|
11
|
+
def set_description
|
12
|
+
@description = ask "template description ", default: "#{name} - \#{component_version}"
|
13
|
+
end
|
14
|
+
|
15
|
+
def set_template_parameters
|
16
|
+
@parameters = [
|
17
|
+
{ name: 'EnvironmentName', default: 'dev', options: 'isGlobal: true' },
|
18
|
+
{ name: 'EnvironmentType', default: 'development', options: "allowedValues: ['development','production'], isGlobal: true" }
|
19
|
+
]
|
20
|
+
end
|
21
|
+
|
22
|
+
def create_cfndsl_template
|
23
|
+
template('templates/cfndsl.rb.tt', "#{@dir}/#{name}.cfndsl.rb")
|
24
|
+
end
|
25
|
+
|
26
|
+
def copy_licence
|
27
|
+
if yes?("Use MIT license?")
|
28
|
+
copy_file "templates/MITLICENSE", "#{@dir}/LICENSE"
|
29
|
+
else
|
30
|
+
say "Skipping license", :yellow
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def create_travis_config
|
35
|
+
if yes?("Use Travis-ci?")
|
36
|
+
copy_file "templates/travis.yml.tt", "#{@dir}/travis-ci.yml"
|
37
|
+
else
|
38
|
+
say "skipping travis", :yellow
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
data/lib/kurgan/init.rb
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'kurgan/projects'
|
3
|
+
|
4
|
+
module Kurgan
|
5
|
+
class Init < Thor::Group
|
6
|
+
include Thor::Actions
|
7
|
+
|
8
|
+
argument :name
|
9
|
+
|
10
|
+
class_option :type, aliases: :t, default: 'empty', enum: ['empty','vpc','ecs'], desc: "Create a pre-canned project"
|
11
|
+
|
12
|
+
def self.source_root
|
13
|
+
File.dirname(__FILE__)
|
14
|
+
end
|
15
|
+
|
16
|
+
def set_directory
|
17
|
+
@dir = ask "directory name ", default: name
|
18
|
+
empty_directory @dir
|
19
|
+
end
|
20
|
+
|
21
|
+
def set_description
|
22
|
+
@description = ask "template description ", default: name
|
23
|
+
end
|
24
|
+
|
25
|
+
def set_template_parameters
|
26
|
+
@parameters = Kurgan::Projects.properties[options['type'].to_sym][:parameters]
|
27
|
+
end
|
28
|
+
|
29
|
+
def set_template_components
|
30
|
+
@components = Kurgan::Projects.properties[options['type'].to_sym][:components]
|
31
|
+
end
|
32
|
+
|
33
|
+
def create_cfhighlander_template
|
34
|
+
opts = {parameters: @parameters, components: @components, description: @description}
|
35
|
+
template('templates/cfhighlander.rb.tt', "#{@dir}/#{name}.cfhighlander.rb", opts)
|
36
|
+
end
|
37
|
+
|
38
|
+
def create_config_yaml
|
39
|
+
template 'templates/config.yaml.tt', "#{@dir}/#{name}.config.yaml"
|
40
|
+
end
|
41
|
+
|
42
|
+
def git_init
|
43
|
+
if yes?("git init project?")
|
44
|
+
run "git init #{@dir}"
|
45
|
+
template 'templates/gitignore.tt', "#{@dir}/.gitignore"
|
46
|
+
template 'templates/README.md.tt', "#{@dir}/README.md"
|
47
|
+
else
|
48
|
+
say "Skipping git init", :yellow
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def ci_init
|
53
|
+
if yes?("Setup a CI pipeline?")
|
54
|
+
type = ask "CI flavour", limited_to: ['jenkins', 'travis-ci', 'codepipeline']
|
55
|
+
case type
|
56
|
+
when 'jenkins'
|
57
|
+
template('templates/Jenkinsfile.tt', "#{@dir}/Jenkinsfile")
|
58
|
+
when 'travis-ci'
|
59
|
+
template('templates/travis-ci.yaml.tt', "#{@dir}/.travis-ci.yaml")
|
60
|
+
when 'codepipeline'
|
61
|
+
say 'AWS CodePipeline is not supported yet...', :red
|
62
|
+
end
|
63
|
+
else
|
64
|
+
say "Skipping CI setup", :yellow
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
end
|
data/lib/kurgan/list.rb
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'open-uri'
|
2
|
+
|
3
|
+
module Kurgan
|
4
|
+
class List
|
5
|
+
|
6
|
+
def initialize(options)
|
7
|
+
@filter = options[:filter]
|
8
|
+
@component = options[:component]
|
9
|
+
if options[:update] || !File.exists?(Kurgan.components_file)
|
10
|
+
update_component_list
|
11
|
+
end
|
12
|
+
content = File.read(Kurgan.components_file)
|
13
|
+
@components = JSON.parse(content)['components']
|
14
|
+
end
|
15
|
+
|
16
|
+
def execute
|
17
|
+
puts "\n\s\s============================="
|
18
|
+
puts "\s\s## CfHighlander Components ##"
|
19
|
+
puts "\s\s=============================\n\n"
|
20
|
+
if @component
|
21
|
+
return component
|
22
|
+
elsif @filter
|
23
|
+
return filter
|
24
|
+
else
|
25
|
+
return all
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def component
|
30
|
+
components = @components.select { |comp| comp['name'].include? @component }
|
31
|
+
abort "no match for component #{@component}" if !components.any?
|
32
|
+
components.each { |comp| puts "\s\s\s\s#{comp['name']} (#{comp['versions'].join(', ')})" }
|
33
|
+
end
|
34
|
+
|
35
|
+
def filter
|
36
|
+
components = @components.select { |comp| comp['filter'].include? @filter }
|
37
|
+
abort "no match for filter #{@filter}" if !components.any?
|
38
|
+
components.each { |comp| format(comp['name'],comp['latest']) }
|
39
|
+
end
|
40
|
+
|
41
|
+
def all
|
42
|
+
@components.each { |comp| format(comp['name'],comp['latest']) }
|
43
|
+
end
|
44
|
+
|
45
|
+
def format(name,version)
|
46
|
+
version = version != "" ? version : 'latest'
|
47
|
+
puts "\s\s\s\s#{name}@#{version}"
|
48
|
+
end
|
49
|
+
|
50
|
+
def update_component_list
|
51
|
+
puts "Updating components list"
|
52
|
+
FileUtils.mkdir_p File.dirname(Kurgan.components_file)
|
53
|
+
content = open('https://s3-ap-southeast-2.amazonaws.com/cfhighlander-component-specification/components.json').read
|
54
|
+
File.open(Kurgan.components_file, 'w') { |f| f.puts content }
|
55
|
+
puts "Succesfully updated components list #{Kurgan.components_file}"
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Kurgan
|
2
|
+
class Projects
|
3
|
+
class << self
|
4
|
+
|
5
|
+
attr_reader :properties
|
6
|
+
|
7
|
+
def properties
|
8
|
+
@projects={
|
9
|
+
empty: {
|
10
|
+
components:[],
|
11
|
+
parameters:[]
|
12
|
+
},
|
13
|
+
vpc: {
|
14
|
+
components: [
|
15
|
+
{ name: 'vpc', template: 'vpc' }
|
16
|
+
],
|
17
|
+
parameters: []
|
18
|
+
},
|
19
|
+
ecs: {
|
20
|
+
components: [
|
21
|
+
{ name: 'vpc', template: 'vpc' },
|
22
|
+
{ name: 'bastion', template: 'bastion'},
|
23
|
+
{ name: 'loadbalancer', template: 'loadbalancer'},
|
24
|
+
{ name: 'ecs', template: 'ecs'}
|
25
|
+
],
|
26
|
+
parameters: []
|
27
|
+
}
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
pipeline {
|
2
|
+
|
3
|
+
environment {
|
4
|
+
AWS_REGION = 'us-east-1'
|
5
|
+
PROJECT_NAME = '<%= @name %>'
|
6
|
+
}
|
7
|
+
|
8
|
+
agent {
|
9
|
+
docker {
|
10
|
+
image 'theonestack/cfhighlander'
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
stages {
|
15
|
+
|
16
|
+
stage('Compile and validate templates') {
|
17
|
+
steps {
|
18
|
+
sh 'cfndsl -u'
|
19
|
+
sh "cfcompile --validate"
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
stage('Publish templates to S3') {
|
24
|
+
steps {
|
25
|
+
script {
|
26
|
+
env['VERSION'] = ${env.BRANCH_NAME}-${env.SHORT_COMMIT}
|
27
|
+
}
|
28
|
+
sh "cfpublish ${PROJECT_NAME} --version ${VERSION}"
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
stage('Deploy') {
|
33
|
+
steps {
|
34
|
+
println "Deploying ${env.PROJECT_NAME} version ${env.VERSION}"
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
}
|
39
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 theonestack
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# <%= name %> CfHighlander project
|
2
|
+
---
|
3
|
+
|
4
|
+
## Cfhighlander Setup
|
5
|
+
|
6
|
+
install cfhighlander [gem](https://github.com/theonestack/cfhighlander)
|
7
|
+
|
8
|
+
```bash
|
9
|
+
gem install cfhighlander
|
10
|
+
```
|
11
|
+
|
12
|
+
or via docker
|
13
|
+
|
14
|
+
```bash
|
15
|
+
docker pull theonestack/cfhighlander
|
16
|
+
```
|
17
|
+
|
18
|
+
compiling the templates
|
19
|
+
|
20
|
+
```bash
|
21
|
+
cfcompile <%= name %>
|
22
|
+
```
|
23
|
+
|
24
|
+
compiling with the vaildate fag to validate the templates
|
25
|
+
|
26
|
+
```bash
|
27
|
+
cfcompile <%= name %> --validate
|
28
|
+
```
|
29
|
+
|
30
|
+
publish the templates to s3
|
31
|
+
|
32
|
+
```bash
|
33
|
+
cfpublish <%= name %> --version latest
|
34
|
+
```
|
@@ -0,0 +1,17 @@
|
|
1
|
+
CfhighlanderTemplate do
|
2
|
+
Name '<%= name %>'
|
3
|
+
Description "<%= config[:description] %>"
|
4
|
+
|
5
|
+
<%- if config[:parameters].any? -%>
|
6
|
+
Parameters do
|
7
|
+
<%- config[:parameters].each do |param| -%>
|
8
|
+
ComponentParam '<%= param[:name] %>', '<%= param[:default] %>', <%= param[:options] %>
|
9
|
+
<%- end -%>
|
10
|
+
end
|
11
|
+
<%- end -%>
|
12
|
+
|
13
|
+
<%- config[:components].each do |comp| -%>
|
14
|
+
Component template: '<%= comp[:template] %>', name: '<%= comp[:name] %>'
|
15
|
+
<%- end if config[:components].any? -%>
|
16
|
+
|
17
|
+
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
out/
|
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: kurgan
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Guslington
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-01-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.19'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.19'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.16'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.16'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
description: Manage a cfhighalnder project
|
56
|
+
email:
|
57
|
+
- theonestackcfhighlander@gmail.com
|
58
|
+
executables:
|
59
|
+
- kurgan
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".gitignore"
|
64
|
+
- ".travis.yml"
|
65
|
+
- Gemfile
|
66
|
+
- Gemfile.lock
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- exe/kurgan
|
71
|
+
- kurgan.gemspec
|
72
|
+
- lib/kurgan.rb
|
73
|
+
- lib/kurgan/add.rb
|
74
|
+
- lib/kurgan/component.rb
|
75
|
+
- lib/kurgan/globals.rb
|
76
|
+
- lib/kurgan/init.rb
|
77
|
+
- lib/kurgan/list.rb
|
78
|
+
- lib/kurgan/projects.rb
|
79
|
+
- lib/kurgan/templates/Jenkinsfile.tt
|
80
|
+
- lib/kurgan/templates/MITLICENSE
|
81
|
+
- lib/kurgan/templates/README.md.tt
|
82
|
+
- lib/kurgan/templates/cfhighlander.rb.tt
|
83
|
+
- lib/kurgan/templates/cfndsl.rb.tt
|
84
|
+
- lib/kurgan/templates/config.yaml.tt
|
85
|
+
- lib/kurgan/templates/gitignore.tt
|
86
|
+
- lib/kurgan/templates/travis.yml.tt
|
87
|
+
- lib/kurgan/version.rb
|
88
|
+
homepage: http://iamkurgan.com
|
89
|
+
licenses:
|
90
|
+
- MIT
|
91
|
+
metadata:
|
92
|
+
allowed_push_host: http://mygemserver.com
|
93
|
+
post_install_message:
|
94
|
+
rdoc_options: []
|
95
|
+
require_paths:
|
96
|
+
- lib
|
97
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
requirements: []
|
108
|
+
rubygems_version: 3.0.2
|
109
|
+
signing_key:
|
110
|
+
specification_version: 4
|
111
|
+
summary: Manage a cfhighalnder project
|
112
|
+
test_files: []
|