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
@@ -0,0 +1,27 @@
1
+ @startuml
2
+ cloud Internet
3
+ frame "AWS" {
4
+ frame "VPC" {
5
+ Internet - [InternetGateway]
6
+ [InternetGateway] -- [RouteTable]
7
+ [RouteTable] -- PublicSubnet1
8
+ frame "AZ1" {
9
+ frame "PublicSubnet1" {
10
+ node ec2 [
11
+ EC2 Instance
12
+ ----
13
+ MyGroovyInstance
14
+ ====
15
+ ]
16
+ }
17
+ }
18
+ }
19
+ }
20
+ note right of PublicSubnet1
21
+ 10.0.0.0/24
22
+ end note
23
+ note left of ec2
24
+ SecurityGroup:MyGroovySecurityGroup
25
+ KeyPair:my-key-pair
26
+ end note
27
+ @enduml
@@ -0,0 +1,43 @@
1
+ @startuml
2
+ cloud Internet
3
+ frame "AWS" {
4
+ frame "VPC" {
5
+ Internet - [InternetGateway]
6
+ [InternetGateway] -- [RouteTable]
7
+ [RouteTable] -- PublicSubnet1
8
+ [RouteTable] -- PublicSubnet2
9
+ frame "AZ1" {
10
+ frame "PublicSubnet1" {
11
+ node ec2_1 [
12
+ EC2 Instance
13
+ ----
14
+ MyGroovyInstance
15
+ ====
16
+ ]
17
+ }
18
+ frame "PublicSubnet2" {
19
+ node ec2_2 [
20
+ EC2 Instance
21
+ ----
22
+ MyGroovyInstance
23
+ ====
24
+ ]
25
+ }
26
+ }
27
+ }
28
+ }
29
+ note right of PublicSubnet1
30
+ 10.0.0.0/24
31
+ end note
32
+ note right of PublicSubnet2
33
+ 10.0.1.0/24
34
+ end note
35
+ note left of ec2_1
36
+ SecurityGroup:MyGroovySecurityGroup
37
+ KeyPair:my-key-pair
38
+ end note
39
+ note left of ec2_2
40
+ SecurityGroup:MyGroovySecurityGroup
41
+ KeyPair:my-key-pair
42
+ end note
43
+ @enduml
@@ -0,0 +1,44 @@
1
+ @startuml
2
+ cloud Internet
3
+ frame "AWS" {
4
+ frame "VPC" {
5
+ Internet - [InternetGateway]
6
+ [InternetGateway] -- [RouteTable1]
7
+ [RouteTable1] -- PublicSubnet1
8
+ [RouteTable2] -- PublicSubnet1
9
+ [RouteTable2] -- PrivateSubnet1
10
+ frame "AZ1" {
11
+ frame "PublicSubnet1" {
12
+ node ec2_1 [
13
+ EC2 Instance
14
+ ----
15
+ MyGroovyInstance
16
+ ====
17
+ ]
18
+ }
19
+ frame "PrivateSubnet1" {
20
+ node ec2_2 [
21
+ EC2 Instance
22
+ ----
23
+ MyGroovyInstance
24
+ ====
25
+ ]
26
+ }
27
+ }
28
+ }
29
+ }
30
+ note right of PublicSubnet1
31
+ 10.0.0.0/24
32
+ end note
33
+ note right of PrivateSubnet1
34
+ 10.0.1.0/24
35
+ end note
36
+ note left of ec2_1
37
+ SecurityGroup:MyGroovySecurityGroup
38
+ KeyPair:my-key-pair
39
+ end note
40
+ note left of ec2_2
41
+ SecurityGroup:MyGroovySecurityGroup
42
+ KeyPair:my-key-pair
43
+ end note
44
+ @enduml
@@ -0,0 +1,43 @@
1
+ @startuml
2
+ cloud Internet
3
+ frame "AWS" {
4
+ frame "VPC" {
5
+ [RouteTable] -- PrivateSubnet1
6
+ [RouteTable] -- PrivateSubnet2
7
+ frame "AZ1" {
8
+ frame "PrivateSubnet1" {
9
+ node ec2_1 [
10
+ EC2 Instance
11
+ ----
12
+ MyGroovyInstance
13
+ ====
14
+ ]
15
+ }
16
+ }
17
+ frame "AZ2" {
18
+ frame "PrivateSubnet2" {
19
+ node ec2_2 [
20
+ EC2 Instance
21
+ ----
22
+ MyGroovyInstance
23
+ ====
24
+ ]
25
+ }
26
+ }
27
+ }
28
+ }
29
+ note right of PrivateSubnet1
30
+ 10.0.2.0/24
31
+ end note
32
+ note right of PrivateSubnet2
33
+ 10.0.3.0/24
34
+ end note
35
+ note left of ec2_1
36
+ SecurityGroup:MyGroovySecurityGroup
37
+ KeyPair:my-key-pair
38
+ end note
39
+ note left of ec2_2
40
+ SecurityGroup:MyGroovySecurityGroup
41
+ KeyPair:my-key-pair
42
+ end note
43
+ @enduml
@@ -0,0 +1,45 @@
1
+ @startuml
2
+ cloud Internet
3
+ frame "AWS" {
4
+ frame "VPC" {
5
+ Internet - [InternetGateway]
6
+ [InternetGateway] -- [RouteTable]
7
+ [RouteTable] -- PublicSubnet1
8
+ [RouteTable] -- PublicSubnet2
9
+ frame "AZ1" {
10
+ frame "PublicSubnet1" {
11
+ node ec2_1 [
12
+ EC2 Instance
13
+ ----
14
+ MyGroovyInstance
15
+ ====
16
+ ]
17
+ }
18
+ }
19
+ frame "AZ2" {
20
+ frame "PublicSubnet2" {
21
+ node ec2_2 [
22
+ EC2 Instance
23
+ ----
24
+ MyGroovyInstance
25
+ ====
26
+ ]
27
+ }
28
+ }
29
+ }
30
+ }
31
+ note right of PublicSubnet1
32
+ 10.0.0.0/24
33
+ end note
34
+ note right of PublicSubnet2
35
+ 10.0.1.0/24
36
+ end note
37
+ note left of ec2_1
38
+ SecurityGroup:MyGroovySecurityGroup
39
+ KeyPair:my-key-pair
40
+ end note
41
+ note left of ec2_2
42
+ SecurityGroup:MyGroovySecurityGroup
43
+ KeyPair:my-key-pair
44
+ end note
45
+ @enduml
@@ -0,0 +1,46 @@
1
+ @startuml
2
+ cloud Internet
3
+ frame "AWS" {
4
+ frame "VPC" {
5
+ Internet - [InternetGateway]
6
+ [InternetGateway] -- [RouteTable1]
7
+ [RouteTable1] -- PublicSubnet1
8
+ [RouteTable2] -- PublicSubnet1
9
+ [RouteTable2] -- PrivateSubnet1
10
+ frame "AZ1" {
11
+ frame "PublicSubnet1" {
12
+ node ec2_1 [
13
+ EC2 Instance
14
+ ----
15
+ MyGroovyInstance
16
+ ====
17
+ ]
18
+ }
19
+ }
20
+ frame "AZ2" {
21
+ frame "PrivateSubnet1" {
22
+ node ec2_2 [
23
+ EC2 Instance
24
+ ----
25
+ MyGroovyInstance
26
+ ====
27
+ ]
28
+ }
29
+ }
30
+ }
31
+ }
32
+ note right of PublicSubnet1
33
+ 10.0.0.0/24
34
+ end note
35
+ note right of PrivateSubnet1
36
+ 10.0.1.0/24
37
+ end note
38
+ note left of ec2_1
39
+ SecurityGroup:MyGroovySecurityGroup
40
+ KeyPair:my-key-pair
41
+ end note
42
+ note left of ec2_2
43
+ SecurityGroup:MyGroovySecurityGroup
44
+ KeyPair:my-key-pair
45
+ end note
46
+ @enduml
@@ -0,0 +1,79 @@
1
+ @startuml
2
+ cloud Internet
3
+ frame "AWS" {
4
+ frame "VPC" {
5
+ Internet - [InternetGateway]
6
+ [InternetGateway] -- [RouteTable1]
7
+ [RouteTable1] -- PublicSubnet1
8
+ [RouteTable1] -- PublicSubnet2
9
+ [RouteTable2] -- PublicSubnet1
10
+ [RouteTable2] -- PublicSubnet2
11
+ [RouteTable2] -- PrivateSubnet1
12
+ [RouteTable2] -- PrivateSubnet2
13
+ frame "AZ1" {
14
+ frame "PublicSubnet1" {
15
+ node ec2_1 [
16
+ EC2 Instance
17
+ ----
18
+ MyGroovyInstance
19
+ ====
20
+ ]
21
+ }
22
+ frame "PrivateSubnet1" {
23
+ node ec2_3 [
24
+ EC2 Instance
25
+ ----
26
+ MyGroovyInstance
27
+ ====
28
+ ]
29
+ }
30
+ }
31
+ frame "AZ2" {
32
+ frame "PublicSubnet2" {
33
+ node ec2_2 [
34
+ EC2 Instance
35
+ ----
36
+ MyGroovyInstance
37
+ ====
38
+ ]
39
+ }
40
+ frame "PrivateSubnet2" {
41
+ node ec2_4 [
42
+ EC2 Instance
43
+ ----
44
+ MyGroovyInstance
45
+ ====
46
+ ]
47
+ }
48
+ }
49
+ }
50
+ }
51
+ note right of PublicSubnet1
52
+ 172.16.1.0/24
53
+ end note
54
+ note right of PrivateSubnet1
55
+ 172.16.3.0/24
56
+ end note
57
+ note right of PublicSubnet2
58
+ 172.16.2.0/24
59
+ end note
60
+ note right of PrivateSubnet2
61
+ 172.16.4.0/24
62
+ end note
63
+ note left of ec2_1
64
+ SecurityGroup:MyGroovySecurityGroup
65
+ KeyPair:my-key-pair
66
+ end note
67
+ note left of ec2_2
68
+ SecurityGroup:MyGroovySecurityGroup
69
+ KeyPair:my-key-pair
70
+ end note
71
+ note left of ec2_3
72
+ SecurityGroup:MyGroovySecurityGroup
73
+ KeyPair:my-key-pair
74
+ end note
75
+ note left of ec2_4
76
+ SecurityGroup:MyGroovySecurityGroup
77
+ KeyPair:my-key-pair
78
+ end note
79
+ @enduml
File without changes
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,49 @@
1
+ @startuml
2
+
3
+ package Aws {
4
+ class EC2::Client
5
+ }
6
+
7
+ package EC2 {
8
+ Interface VpcInterface
9
+ }
10
+
11
+ Interface CertificationHelper
12
+ Interface ConfigurationHelper
13
+
14
+ package VPC {
15
+ class VpcDirector {
16
+ + builder
17
+ create()
18
+ destroy()
19
+ }
20
+ class VpnDirector {
21
+ + builder
22
+ create()
23
+ destroy()
24
+ }
25
+
26
+ VpcApiGateway -u-> EC2::Client
27
+ CertificationHelper <|-- VpcApiGateway
28
+ ConfigurationHelper <|-- Configuration
29
+
30
+ VpcInterface <|-r- Vpc
31
+ Vpc "1" *-u- Configuration
32
+ Vpc "1" *-u- VpcApiGateway
33
+ Vpc "1" *-r- "1..*" Subnet
34
+ Vpc "1" *-r- "1" InternetGateway
35
+ Vpc "1" *-d- "1..*" RouteTable
36
+ Vpc <|-- SimpleVpc
37
+ Vpc <|-- StandardVpc
38
+ VpcDirector *-r- Vpc
39
+ VpnDirector *-- Vpn
40
+ Vpn "1" *-- "1..*" CustomerGateway
41
+ Vpn "1" *-- "1" VpnGateway
42
+ Vpn "1" *-- "1..*" VpnConnection
43
+ Vpn "1" *-r- "1..*" RouteTable
44
+ Vpn "*" -u-> "1" Vpc
45
+
46
+
47
+ }
48
+
49
+ @enduml
Binary file
Binary file
Binary file
@@ -0,0 +1,17 @@
1
+ @startuml
2
+ cloud Internet
3
+ frame "AWS" {
4
+ frame "VPC" {
5
+ Internet - [InternetGateway]
6
+ [InternetGateway] -- [RouteTable]
7
+ [RouteTable] -- PublicSubnet1
8
+ frame "AZ1" {
9
+ frame "PublicSubnet1" {
10
+ }
11
+ }
12
+ }
13
+ }
14
+ note right of PublicSubnet1
15
+ 10.0.0.0/24
16
+ end note
17
+ @enduml
@@ -0,0 +1,24 @@
1
+ @startuml
2
+ cloud Internet
3
+ frame "AWS" {
4
+ frame "VPC" {
5
+ Internet - [InternetGateway]
6
+ [InternetGateway] -- [RouteTable1]
7
+ [RouteTable1] -- PublicSubnet1
8
+ [RouteTable2] -- PublicSubnet1
9
+ [RouteTable2] -- PrivateSubnet1
10
+ frame "AZ1" {
11
+ frame "PublicSubnet1" {
12
+ }
13
+ frame "PrivateSubnet1" {
14
+ }
15
+ }
16
+ }
17
+ }
18
+ note right of PublicSubnet1
19
+ 10.0.0.0/24
20
+ end note
21
+ note right of PrivateSubnet1
22
+ 10.0.1.0/24
23
+ end note
24
+ @enduml