etude_for_aws 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +103 -0
  3. data/.rspec +2 -0
  4. data/.ruby-version +1 -0
  5. data/.yardopts +10 -0
  6. data/Dockerfile +17 -0
  7. data/Dockerfile-dev +20 -0
  8. data/Gemfile +6 -0
  9. data/Gemfile.lock +89 -0
  10. data/Guardfile +22 -0
  11. data/Jenkinsfile +11 -0
  12. data/README.md +26 -0
  13. data/Rakefile +12 -0
  14. data/Vagrantfile +15 -0
  15. data/bin/aws_console.rb +10 -0
  16. data/bin/console +14 -0
  17. data/bin/setup +8 -0
  18. data/circle.yml +22 -0
  19. data/config.yml +124 -0
  20. data/docker-compose.yml +9 -0
  21. data/docs/README.md +54 -0
  22. data/docs/_config.yml +6 -0
  23. data/docs/dev/cfm/cfm.md +9 -0
  24. data/docs/dev/cfm/images/vpc_core_model.png +0 -0
  25. data/docs/dev/cfm/images/vpc_type1.png +0 -0
  26. data/docs/dev/cfm/images/vpc_type2.png +0 -0
  27. data/docs/dev/cfm/images/vpc_type3.png +0 -0
  28. data/docs/dev/cfm/images/vpc_type4.png +0 -0
  29. data/docs/dev/cfm/images/vpc_type5.png +0 -0
  30. data/docs/dev/cfm/images/vpc_type6.png +0 -0
  31. data/docs/dev/cfm/images/vpc_type7.png +0 -0
  32. data/docs/dev/cfm/vpc/core_model.puml +35 -0
  33. data/docs/dev/cfm/vpc/vpc.md +39 -0
  34. data/docs/dev/cfm/vpc/vpc_type1.puml +17 -0
  35. data/docs/dev/cfm/vpc/vpc_type2.puml +23 -0
  36. data/docs/dev/cfm/vpc/vpc_type3.puml +24 -0
  37. data/docs/dev/cfm/vpc/vpc_type4.puml +23 -0
  38. data/docs/dev/cfm/vpc/vpc_type5.puml +25 -0
  39. data/docs/dev/cfm/vpc/vpc_type6.puml +26 -0
  40. data/docs/dev/cfm/vpc/vpc_type7.puml +39 -0
  41. data/docs/dev/ec2/core_model.puml +43 -0
  42. data/docs/dev/ec2/ec2.md +36 -0
  43. data/docs/dev/ec2/ec2_type1.puml +27 -0
  44. data/docs/dev/ec2/ec2_type2.puml +43 -0
  45. data/docs/dev/ec2/ec2_type3.puml +44 -0
  46. data/docs/dev/ec2/ec2_type4.puml +43 -0
  47. data/docs/dev/ec2/ec2_type5.puml +45 -0
  48. data/docs/dev/ec2/ec2_type6.puml +46 -0
  49. data/docs/dev/ec2/ec2_type7.puml +79 -0
  50. data/docs/dev/ec2/images/.keep +0 -0
  51. data/docs/dev/ec2/images/ec2_core_model.png +0 -0
  52. data/docs/dev/ec2/images/ec2_type1.png +0 -0
  53. data/docs/dev/ec2/images/ec2_type2.png +0 -0
  54. data/docs/dev/ec2/images/ec2_type3.png +0 -0
  55. data/docs/dev/ec2/images/ec2_type4.png +0 -0
  56. data/docs/dev/ec2/images/ec2_type5.png +0 -0
  57. data/docs/dev/ec2/images/ec2_type6.png +0 -0
  58. data/docs/dev/ec2/images/ec2_type7.png +0 -0
  59. data/docs/dev/vpc/core_model.puml +49 -0
  60. data/docs/dev/vpc/images/core_model.png +0 -0
  61. data/docs/dev/vpc/images/simple.png +0 -0
  62. data/docs/dev/vpc/images/standard.png +0 -0
  63. data/docs/dev/vpc/simple.puml +17 -0
  64. data/docs/dev/vpc/standard.puml +24 -0
  65. data/docs/dev/vpc/vpc.md +19 -0
  66. data/docs/ops/build_aws_sdk_repl.md +19 -0
  67. data/docs/ops/images/.keep +0 -0
  68. data/docs/ops/run_rake_task.md +89 -0
  69. data/docs/ops/ship_circleci.md +9 -0
  70. data/docs/ops/ship_jenkins.md +20 -0
  71. data/docs/ops/ship_ruby_gem.md +26 -0
  72. data/docs/template_catalog.md +6 -0
  73. data/docs/template_pattern.md +13 -0
  74. data/docs/template_recipe.md +6 -0
  75. data/docs/template_spec.md +8 -0
  76. data/etude_for_aws.gemspec +41 -0
  77. data/etude_for_aws.iml +42 -0
  78. data/exe/etude_for_aws +3 -0
  79. data/lib/etude_for_aws.rb +38 -0
  80. data/lib/etude_for_aws/cfm/configuration.rb +39 -0
  81. data/lib/etude_for_aws/cfm/vpc/cfm_templates/vpc-1az-1subnet-pub.template +529 -0
  82. data/lib/etude_for_aws/cfm/vpc/cfm_templates/vpc-1az-2subnet-pub-pri.template +790 -0
  83. data/lib/etude_for_aws/cfm/vpc/cfm_templates/vpc-1az-2subnet-pub.template +634 -0
  84. data/lib/etude_for_aws/cfm/vpc/cfm_templates/vpc-2az-2subnet-pri.template +645 -0
  85. data/lib/etude_for_aws/cfm/vpc/cfm_templates/vpc-2az-2subnet-pub-pri.template +611 -0
  86. data/lib/etude_for_aws/cfm/vpc/cfm_templates/vpc-2az-2subnet-pub.template +646 -0
  87. data/lib/etude_for_aws/cfm/vpc/cfm_templates/vpc-2az-4subnet-pub-pri.template +1010 -0
  88. data/lib/etude_for_aws/cfm/vpc/null_vpc.rb +13 -0
  89. data/lib/etude_for_aws/cfm/vpc/one_az_one_public_subnet_vpc.rb +45 -0
  90. data/lib/etude_for_aws/cfm/vpc/one_az_two_public_and_private_subnet_vpc.rb +47 -0
  91. data/lib/etude_for_aws/cfm/vpc/one_az_two_public_subnet_vpc.rb +47 -0
  92. data/lib/etude_for_aws/cfm/vpc/two_az_one_public_subnet_and_private_subnet_vpc.rb +52 -0
  93. data/lib/etude_for_aws/cfm/vpc/two_az_two_private_subnet_vpc.rb +38 -0
  94. data/lib/etude_for_aws/cfm/vpc/two_az_two_public_subnet_and_private_subnet_vpc.rb +38 -0
  95. data/lib/etude_for_aws/cfm/vpc/two_az_two_public_subnet_vpc.rb +38 -0
  96. data/lib/etude_for_aws/cfm/vpc/vpc.rb +104 -0
  97. data/lib/etude_for_aws/ec2/configuration.rb +66 -0
  98. data/lib/etude_for_aws/ec2/ec2.rb +218 -0
  99. data/lib/etude_for_aws/ec2/ec2_api_gateway.rb +127 -0
  100. data/lib/etude_for_aws/ec2/ec2_instance.rb +107 -0
  101. data/lib/etude_for_aws/ec2/key_pair.rb +46 -0
  102. data/lib/etude_for_aws/ec2/security_group.rb +75 -0
  103. data/lib/etude_for_aws/ec2/vpc_interface.rb +11 -0
  104. data/lib/etude_for_aws/helpers/certification_helper.rb +16 -0
  105. data/lib/etude_for_aws/helpers/configuration_helper.rb +103 -0
  106. data/lib/etude_for_aws/tasks/cfm.rake +73 -0
  107. data/lib/etude_for_aws/tasks/ec2.rake +210 -0
  108. data/lib/etude_for_aws/tasks/vpc.rake +47 -0
  109. data/lib/etude_for_aws/version.rb +3 -0
  110. data/lib/etude_for_aws/vpc/configuration.rb +77 -0
  111. data/lib/etude_for_aws/vpc/customer_gateway.rb +28 -0
  112. data/lib/etude_for_aws/vpc/internet_gateway.rb +15 -0
  113. data/lib/etude_for_aws/vpc/route_table.rb +42 -0
  114. data/lib/etude_for_aws/vpc/simple_vpc.rb +57 -0
  115. data/lib/etude_for_aws/vpc/standard_vpc.rb +94 -0
  116. data/lib/etude_for_aws/vpc/subnet.rb +22 -0
  117. data/lib/etude_for_aws/vpc/vpc.rb +147 -0
  118. data/lib/etude_for_aws/vpc/vpc_api_gateway.rb +277 -0
  119. data/lib/etude_for_aws/vpc/vpc_director.rb +43 -0
  120. data/lib/etude_for_aws/vpc/vpn.rb +244 -0
  121. data/lib/etude_for_aws/vpc/vpn_connection.rb +28 -0
  122. data/lib/etude_for_aws/vpc/vpn_director.rb +47 -0
  123. data/lib/etude_for_aws/vpc/vpn_gateway.rb +36 -0
  124. metadata +280 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6c8178f4217e48daca40d13d4b0e7f2aebf3f076
4
+ data.tar.gz: e155e917efaf0fecd2de474f3198b4d36e324992
5
+ SHA512:
6
+ metadata.gz: ae64ffc96f59f776b601e8aa78b8829278938cf8211b8ff335442fc2e3eb57f694534def3c8583b1bd25577bef2ae26656656e7fa6c81efbdfb26d632fa47ca6
7
+ data.tar.gz: 4657acd404b7f5c05f6348f99d020c6c2415a428eb5f7fb19bdeb1b5550332e75b273dd68315b07a5b91b60ad9efa4b5de55b3d99bd8a94b802d9b5da2f0f329
data/.gitignore ADDED
@@ -0,0 +1,103 @@
1
+ # Created by .ignore support plugin (hsz.mobi)
2
+ ### JetBrains template
3
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
4
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
5
+
6
+ # User-specific stuff:
7
+ .idea/workspace.xml
8
+ .idea/tasks.xml
9
+
10
+ # Sensitive or high-churn files:
11
+ .idea/dataSources/
12
+ .idea/dataSources.ids
13
+ .idea/dataSources.xml
14
+ .idea/dataSources.local.xml
15
+ .idea/sqlDataSources.xml
16
+ .idea/dynamic.xml
17
+ .idea/uiDesigner.xml
18
+
19
+ # Gradle:
20
+ .idea/gradle.xml
21
+ .idea/libraries
22
+
23
+ # Mongo Explorer plugin:
24
+ .idea/mongoSettings.xml
25
+
26
+ ## File-based project format:
27
+ *.iws
28
+
29
+ ## Plugin-specific files:
30
+
31
+ # IntelliJ
32
+ /out/
33
+ .idea
34
+
35
+ # mpeltonen/sbt-idea plugin
36
+ .idea_modules/
37
+
38
+ # JIRA plugin
39
+ atlassian-ide-plugin.xml
40
+
41
+ # Crashlytics plugin (for Android Studio and IntelliJ)
42
+ com_crashlytics_export_strings.xml
43
+ crashlytics.properties
44
+ crashlytics-build.properties
45
+ fabric.properties
46
+ ### Vagrant template
47
+ .vagrant/
48
+
49
+ .env
50
+ ### Ruby template
51
+ *.gem
52
+ *.rbc
53
+ /.config
54
+ /coverage/
55
+ /InstalledFiles
56
+ /pkg/
57
+ /spec/reports/
58
+ /spec/examples.txt
59
+ /test/tmp/
60
+ /test/version_tmp/
61
+ /tmp/
62
+
63
+ # Used by dotenv library to load environment variables.
64
+ # .env
65
+
66
+ ## Specific to RubyMotion:
67
+ .dat*
68
+ .repl_history
69
+ build/
70
+ *.bridgesupport
71
+ build-iPhoneOS/
72
+ build-iPhoneSimulator/
73
+
74
+ ## Specific to RubyMotion (use of CocoaPods):
75
+ #
76
+ # We recommend against adding the Pods directory to your .gitignore. However
77
+ # you should judge for yourself, the pros and cons are mentioned at:
78
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
79
+ #
80
+ # vendor/Pods/
81
+
82
+ ## Documentation cache and generated files:
83
+ /.yardoc/
84
+ /_yardoc/
85
+ /doc/
86
+ /rdoc/
87
+
88
+ ## Environment normalization:
89
+ /.bundle/
90
+ /vendor/bundle
91
+ /lib/bundler/man/
92
+
93
+ # for a library or gem, you might want to ignore these files since the code is
94
+ # intended to run in multiple environments; otherwise, check them in:
95
+ # Gemfile.lock
96
+ # .ruby-version
97
+ # .ruby-gemset
98
+
99
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
100
+ .rvmrc
101
+
102
+ .rspec_status
103
+ *.pem
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.3.1
data/.yardopts ADDED
@@ -0,0 +1,10 @@
1
+ -
2
+ docs/README.md
3
+ docs/dev/cfm/cfm.md
4
+ docs/dev/ec2/ec2.md
5
+ docs/dev/vpc/vpc.md
6
+ docs/ops/build_aws_sdk_repl.md
7
+ docs/ops/run_rake_task.md
8
+ docs/ops/ship_circleci.md
9
+ docs/ops/ship_jenkins.md
10
+ docs/ops/ship_ruby_gem.md
data/Dockerfile ADDED
@@ -0,0 +1,17 @@
1
+ FROM alpine:3.5
2
+ ENV AWSCLI_VERSION "1.11.80"
3
+ RUN apk -v --update add \
4
+ python \
5
+ py-pip \
6
+ groff \
7
+ less \
8
+ mailcap \
9
+ bash \
10
+ && \
11
+ pip install --upgrade awscli==${AWSCLI_VERSION} && \
12
+ apk -v --purge del py-pip && \
13
+ rm /var/cache/apk/*
14
+ VOLUME /root/.aws
15
+ VOLUME /project
16
+ WORKDIR /project
17
+ CMD ["bash"]
data/Dockerfile-dev ADDED
@@ -0,0 +1,20 @@
1
+ FROM ruby:2.3.1
2
+
3
+ RUN apt-get update
4
+ RUN apt-get install ruby-dev -y
5
+ RUN gem install bundler
6
+
7
+ ENV APP_ROOT /container
8
+ ADD . $APP_ROOT
9
+ WORKDIR $APP_ROOT
10
+ COPY Gemfile $APP_ROOT
11
+ COPY Gemfile.lock $APP_ROOT
12
+ COPY etude_for_aws.gemspec $APP_ROOT
13
+
14
+ COPY . $APP_ROOT
15
+ RUN bundle
16
+ RUN bundle exec rspec
17
+ RUn bundle exec rake build
18
+
19
+ EXPOSE 5000
20
+ CMD ["bin/console"]
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in etude_for_aws.gemspec
4
+ gemspec
5
+
6
+ gem 'guard-yard'
data/Gemfile.lock ADDED
@@ -0,0 +1,89 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ etude_for_aws (0.7.4)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ aws-sdk (2.9.12)
10
+ aws-sdk-resources (= 2.9.12)
11
+ aws-sdk-core (2.9.12)
12
+ aws-sigv4 (~> 1.0)
13
+ jmespath (~> 1.0)
14
+ aws-sdk-resources (2.9.12)
15
+ aws-sdk-core (= 2.9.12)
16
+ aws-sigv4 (1.0.0)
17
+ coderay (1.1.1)
18
+ diff-lcs (1.3)
19
+ dotenv (2.1.2)
20
+ ffi (1.9.18)
21
+ formatador (0.2.5)
22
+ guard (2.14.1)
23
+ formatador (>= 0.2.4)
24
+ listen (>= 2.7, < 4.0)
25
+ lumberjack (~> 1.0)
26
+ nenv (~> 0.1)
27
+ notiffany (~> 0.0)
28
+ pry (>= 0.9.12)
29
+ shellany (~> 0.0)
30
+ thor (>= 0.18.1)
31
+ guard-yard (2.2.0)
32
+ guard (>= 1.1.0)
33
+ yard (>= 0.7.0)
34
+ jmespath (1.3.1)
35
+ listen (3.1.5)
36
+ rb-fsevent (~> 0.9, >= 0.9.4)
37
+ rb-inotify (~> 0.9, >= 0.9.7)
38
+ ruby_dep (~> 1.2)
39
+ lumberjack (1.0.11)
40
+ method_source (0.8.2)
41
+ nenv (0.3.0)
42
+ notiffany (0.1.1)
43
+ nenv (~> 0.1)
44
+ shellany (~> 0.0)
45
+ pry (0.10.4)
46
+ coderay (~> 1.1.0)
47
+ method_source (~> 0.8.1)
48
+ slop (~> 3.4)
49
+ rake (10.5.0)
50
+ rb-fsevent (0.9.8)
51
+ rb-inotify (0.9.8)
52
+ ffi (>= 0.5.0)
53
+ redcarpet (3.4.0)
54
+ rspec (3.5.0)
55
+ rspec-core (~> 3.5.0)
56
+ rspec-expectations (~> 3.5.0)
57
+ rspec-mocks (~> 3.5.0)
58
+ rspec-core (3.5.4)
59
+ rspec-support (~> 3.5.0)
60
+ rspec-expectations (3.5.0)
61
+ diff-lcs (>= 1.2.0, < 2.0)
62
+ rspec-support (~> 3.5.0)
63
+ rspec-mocks (3.5.0)
64
+ diff-lcs (>= 1.2.0, < 2.0)
65
+ rspec-support (~> 3.5.0)
66
+ rspec-support (3.5.0)
67
+ ruby_dep (1.5.0)
68
+ shellany (0.0.1)
69
+ slop (3.6.0)
70
+ thor (0.19.4)
71
+ yard (0.9.9)
72
+
73
+ PLATFORMS
74
+ ruby
75
+
76
+ DEPENDENCIES
77
+ aws-sdk (~> 2.9)
78
+ bundler (~> 1.14)
79
+ dotenv
80
+ etude_for_aws!
81
+ guard-yard
82
+ pry (~> 0.10.4)
83
+ rake (~> 10.0)
84
+ redcarpet (~> 3.4)
85
+ rspec (~> 3.0)
86
+ yard (~> 0.8)
87
+
88
+ BUNDLED WITH
89
+ 1.14.6
data/Guardfile ADDED
@@ -0,0 +1,22 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec features) \
6
+ # .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
7
+
8
+ ## Note: if you are using the `directories` clause above and you are not
9
+ ## watching the project directory ('.'), then you will want to move
10
+ ## the Guardfile to a watched dir and symlink it back, e.g.
11
+ #
12
+ # $ mkdir config
13
+ # $ mv Guardfile config/
14
+ # $ ln -s config/Guardfile .
15
+ #
16
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
+
18
+ guard 'yard' do
19
+ watch(%r{app\/.+\.rb})
20
+ watch(%r{lib\/.+\.rb})
21
+ watch(%r{ext\/.+\.c})
22
+ end
data/Jenkinsfile ADDED
@@ -0,0 +1,11 @@
1
+ node {
2
+ stage("Build") {
3
+ checkout scm
4
+
5
+ docker.build('app','. -f Dockerfile-dev').inside {
6
+ }
7
+ }
8
+
9
+ // Clean up workspace
10
+ step([$class: 'WsCleanup'])
11
+ }
data/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # Etude for AWS
2
+
3
+ ## Quick Start
4
+ Create`.env`
5
+ ```text
6
+ AWS_ACCESS_KEY_ID="<id>"
7
+ AWS_SECRET_ACCESS_KEY="<key>"
8
+ AWS_REGION="<region>"
9
+ ```
10
+
11
+ ### Using Vagrant
12
+ ```bash
13
+ vagrant up
14
+ vagrant ssh
15
+ cd /vagrant
16
+ aws configure
17
+ ```
18
+
19
+ ### Using Docker
20
+ ```bash
21
+ docker-compose build
22
+ docker-compose run app bash
23
+ complete -C '/usr/bin/aws_completer' aws
24
+ ```
25
+
26
+ ### [Documents](./docs/README.md)
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+ require 'yard'
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task :default => :spec
8
+ YARD::Rake::YardocTask.new
9
+
10
+ load 'lib/etude_for_aws/tasks/cfm.rake'
11
+ load 'lib/etude_for_aws/tasks/ec2.rake'
12
+ load 'lib/etude_for_aws/tasks/vpc.rake'
data/Vagrantfile ADDED
@@ -0,0 +1,15 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ Vagrant.configure("2") do |config|
5
+ config.vm.box = "hiroshima-arc/gin_and_bitters"
6
+ config.vm.box_version = "0.3.0"
7
+
8
+ config.vm.network :forwarded_port, guest:8080, host:9000, id:"jenkins"
9
+ config.vm.network :private_network, ip:"127.0.0.1"
10
+
11
+ config.vm.provider :virtualbox do |vb|
12
+ vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
13
+ vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
14
+ end
15
+ end
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "etude_for_aws"
5
+
6
+ Dotenv.load
7
+ system("export AWS_ACCESS_KEY_ID=#{ENV['AWS_ACCESS_KEY_ID']}")
8
+ system("export AWS_SECRET_ACCESS_KEY=#{ENV['AWS_SECRET_ACCESS_KEY']}")
9
+ system("export AWS_DEFAULT_REGION=#{ENV['AWS_DEFAULT_REGION']}")
10
+ system("aws.rb")
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "etude_for_aws"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ require "pry"
11
+ Pry.start()
12
+
13
+ #require "irb"
14
+ #IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/circle.yml ADDED
@@ -0,0 +1,22 @@
1
+ machine:
2
+ ruby:
3
+ version: 2.3.1
4
+ timezone: Asia/Tokyo
5
+
6
+ test:
7
+ pre:
8
+ - bundle
9
+ override:
10
+ - bundle exec rspec
11
+
12
+ deployment:
13
+ rubygems:
14
+ branch: master
15
+ commands:
16
+ - curl -u $RUBYGEMS_USER:$RUBYGEMS_PASSWORD https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials
17
+ - git config user.name $RUBYGEMS_USER
18
+ - git config user.email $RUBYGEMS_EMAIL
19
+ - bundle exec rake build
20
+ - git add .
21
+ - git commit -am 'Release Gem'
22
+ - bundle exec rake release
data/config.yml ADDED
@@ -0,0 +1,124 @@
1
+ DEV:
2
+ REGION: 'us-west-2'
3
+ CFM:
4
+ VPC:
5
+ STACK_NAME: 'VPCtestStack'
6
+ TEMPLATE_PATH: '/lib/etude_for_aws/cfm/vpc/cfm_templates/'
7
+ TEMPLATE_FILE_TYPE_01: 'vpc-1az-1subnet-pub.template'
8
+ TEMPLATE_FILE_TYPE_02: 'vpc-1az-2subnet-pub.template'
9
+ TEMPLATE_FILE_TYPE_03: 'vpc-1az-2subnet-pub-pri.template'
10
+ TEMPLATE_FILE_TYPE_04: 'vpc-2az-2subnet-pri.template'
11
+ TEMPLATE_FILE_TYPE_05: 'vpc-2az-2subnet-pub.template'
12
+ TEMPLATE_FILE_TYPE_06: 'vpc-2az-2subnet-pub-pri.template'
13
+ TEMPLATE_FILE_TYPE_07: 'vpc-2az-4subnet-pub-pri.template'
14
+ TEMPLATE_PARAMS_AZ1: 'us-west-2a'
15
+ TEMPLATE_PARAMS_AZ2: 'us-west-2b'
16
+ TEMPLATE_PARAMS_AZ3: 'us-west-2c'
17
+ TAG_VALUE: 'test'
18
+ VPC:
19
+ VPC_TAGS:
20
+ NAME:
21
+ KEY: 'Name'
22
+ VALUE: 'TestVpc'
23
+ GROUP:
24
+ KEY: 'GroupName'
25
+ VALUE: 'TestVpcGroup'
26
+ VPC_CIDR_BLOCK: '10.0.0.0/16'
27
+ SUBNETS:
28
+ PUBLIC:
29
+ - CONFIG:
30
+ SUBNET_TAGS:
31
+ - NAME:
32
+ KEY: 'Name'
33
+ VALUE: 'TestVpcPublicSubnet1'
34
+ SUBNET_CIDR_BLOCK:
35
+ - '10.0.0.0/24'
36
+ AZ:
37
+ - 'us-west-2a'
38
+ PRIVATE:
39
+ - CONFIG:
40
+ SUBNET_TAGS:
41
+ - NAME:
42
+ KEY: 'Name'
43
+ VALUE: 'TestVpcPrivateSubnet1'
44
+ SUBNET_CIDR_BLOCK:
45
+ - '10.0.1.0/24'
46
+ AZ:
47
+ - 'us-west-2a'
48
+ ROUTE_TABLES:
49
+ PUBLIC:
50
+ - CONFIG:
51
+ ROUTE_TABLE_TAGS:
52
+ - NAME:
53
+ KEY: 'Name'
54
+ VALUE: 'TestVpcPublicRouteTable1'
55
+ DESTINATION_CIDR_BLOCK:
56
+ - '0.0.0.0/0'
57
+ PRIVATE:
58
+ - CONFIG:
59
+ ROUTE_TABLE_TAGS:
60
+ - NAME:
61
+ KEY: 'Name'
62
+ VALUE: 'TestVpcPrivateSubnet1'
63
+ DESTINATION_CIDR_BLOCK:
64
+ - '10.0.0.0/16'
65
+ INTERNET_GATEWAY:
66
+ IG_TAGS:
67
+ NAME:
68
+ KEY: 'Name'
69
+ VALUE: 'TestVpcInternetGateway'
70
+ VPN:
71
+ CUSTOMER_GATEWAYS:
72
+ - CONFIG:
73
+ CUSTOMER_GATEWAY:
74
+ BGP_ASN: '65534'
75
+ PUBLIC_IP: '110.4.157.54'
76
+ TYPE: 'ipsec.1'
77
+ TAGS:
78
+ NAME:
79
+ KEY: 'Name'
80
+ VALUE: 'TestCustomerGateway'
81
+ VPN_GATEWAY:
82
+ TYPE: 'ipsec.1'
83
+ DESTINATION_CIDR_BLOCKS:
84
+ - CIDR: '192.168.0.0/16'
85
+ TAGS:
86
+ NAME:
87
+ KEY: 'Name'
88
+ VALUE: 'TestVpnGateway'
89
+ VPN_CONNECTIONS:
90
+ - CONFIG:
91
+ VPN_CONNECTION:
92
+ TYPE: 'ipsec.1'
93
+ OPTIONS:
94
+ STATIC_ROUTES_ONLY: true
95
+ TAGS:
96
+ NAME:
97
+ KEY: 'Name'
98
+ VALUE: 'TestVpnConnection'
99
+
100
+ EC2:
101
+ INSTANCE_TAGS:
102
+ NAME_VALUE: 'MyGroovyInstance'
103
+ GROUP_VALUE: 'MyGroovyGroup'
104
+ SECURITY_GROUP_NAME: 'MyGroovySecurityGroup'
105
+ SECURITY_GROUP_DESCRIPTION: 'Security group for MyGroovyInstance'
106
+ KEY_PAIR_NAME: 'my-key-pair'
107
+ KEY_PAIR_PATH: '/lib/etude_for_aws/ec2/'
108
+ IMAGE_ID: 'ami-4836a428'
109
+ INSTANCE_TYPE: 't2.micro'
110
+ MIN_COUNT: '1'
111
+ MAX_COUNT: '1'
112
+ INSTANCES:
113
+ PUBLIC:
114
+ - CONFIG:
115
+ INSTANCE_TAGS:
116
+ - NAME:
117
+ KEY: 'Name'
118
+ VALUE: 'PublicInstance1'
119
+ PRIVATE:
120
+ - CONFIG:
121
+ INSTANCE_TAGS:
122
+ - NAME:
123
+ KEY: 'Name'
124
+ VALUE: 'PrivateInstance1'