cloudstrap 0.41.4.pre → 0.42.0.pre
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.
- checksums.yaml +4 -4
- data/README.org +3 -3
- data/bin/cloudstrap +5 -5
- data/lib/cloudstrap/agent.rb +5 -5
- data/lib/cloudstrap/config.rb +12 -12
- data/lib/cloudstrap/{hdp → hcp}/bootstrap_properties.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11d32f55031d1813bbd9ecaa3f80b845b826e722
|
4
|
+
data.tar.gz: 5800733a18d84833c7a4e5ae1300b279ec91b52d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9047d56df43ae9593e14b53b25155ffa76906362f0d10746f751638287ab6a02ca1db3e579b0b3f0c8abcd00aebefb7d2ca3ba59540ac3213ff804968cf6efca
|
7
|
+
data.tar.gz: 3cd02a6069ed4ac75eddb6d707a999226f50f4c5a300bc46d2807ef489c857f5a14ebcafc977cfeb1df2192eb451ad2b736feee03bf361b7e0bcf3cd3837a76c
|
data/README.org
CHANGED
@@ -44,7 +44,7 @@ The output describes the results, and all settings used in the process.
|
|
44
44
|
BOOTSTRAP_INSTANCE_TYPE=t2.micro
|
45
45
|
BOOTSTRAP_SSH_DIR=/Users/colstrom/cloudstrap/.ssh
|
46
46
|
BOOTSTRAP_SSH_USERNAME=ubuntu
|
47
|
-
|
47
|
+
BOOTSTRAP_HCP_DIR=/Users/colstrom/cloudstrap
|
48
48
|
|
49
49
|
# Cached Configuration
|
50
50
|
# These settings can be overridden via ENV only
|
@@ -73,10 +73,10 @@ The output describes the results, and all settings used in the process.
|
|
73
73
|
# Route to NAT Gateway from Private Subnet? true
|
74
74
|
# SSH Allowed to Jumpbox? true
|
75
75
|
# SSH Key uploaded to AWS? 1a:c4:ec:25:94:90:ed:ee:c2:66:2e:3c:9c:c8:7a:12
|
76
|
-
#
|
76
|
+
# HCP bootstrap.properties configured? true
|
77
77
|
# Jumpbox Running? true
|
78
78
|
|
79
|
-
# No version specified for
|
79
|
+
# No version specified for HCP Bootstrap, falling back to default version
|
80
80
|
INFO [0942f874] Running /usr/bin/env rm -f /home/ubuntu/.ssh/id_rsa as ubuntu@52.89.237.123
|
81
81
|
INFO [0942f874] Finished in 11.547 seconds with exit status 0 (successful).
|
82
82
|
INFO Uploading /Users/colstrom/cloudstrap/.ssh/lkg@colstrom/97cb1464-cf44-479e-be47-9a212131ad4c 100.0%
|
data/bin/cloudstrap
CHANGED
@@ -40,10 +40,10 @@ BOOTSTRAP_UBUNTU_RELEASE=#{config.ubuntu_release}
|
|
40
40
|
BOOTSTRAP_INSTANCE_TYPE=#{config.instance_type}
|
41
41
|
BOOTSTRAP_SSH_DIR=#{config.ssh_dir}
|
42
42
|
BOOTSTRAP_SSH_USERNAME=#{config.ssh_username}
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
43
|
+
BOOTSTRAP_HCP_DIR=#{config.hcp_dir}
|
44
|
+
BOOTSTRAP_HCP_BOOTSTRAP_ORIGIN=#{config.hcp_origin}
|
45
|
+
BOOTSTRAP_HCP_BOOTSTRAP_VERSION=#{config.hcp_version}
|
46
|
+
BOOTSTRAP_HCP_BOOTSTRAP_PACKAGE_URL=#{config.hcp_package_url}
|
47
47
|
BOOTSTRAP_PROPERTIES_SEED_URL=#{config.bootstrap_properties_seed_url}
|
48
48
|
|
49
49
|
# Cached Configuration
|
@@ -80,7 +80,7 @@ BOOTSTRAP_WITHOUT_HUMAN_OVERSIGHT=#{!agent.requires_human_oversight?}
|
|
80
80
|
# Route to NAT Gateway from Private Subnets? #{agent.configure_nat_routes}
|
81
81
|
# SSH Allowed to Jumpbox? #{agent.allow_ssh}
|
82
82
|
# SSH Key uploaded to AWS? #{agent.upload_ssh_key}
|
83
|
-
#
|
83
|
+
# HCP bootstrap.properties configured? #{agent.configure_hcp}
|
84
84
|
# Jumpbox Tagged? #{agent.tag_jumpbox}
|
85
85
|
# Jumpbox Running? #{agent.jumpbox_running?}
|
86
86
|
|
data/lib/cloudstrap/agent.rb
CHANGED
@@ -5,7 +5,7 @@ require 'securerandom'
|
|
5
5
|
require_relative 'amazon'
|
6
6
|
require_relative 'config'
|
7
7
|
require_relative 'errors'
|
8
|
-
require_relative '
|
8
|
+
require_relative 'hcp/bootstrap_properties'
|
9
9
|
require_relative 'network'
|
10
10
|
require_relative 'ssh'
|
11
11
|
|
@@ -397,7 +397,7 @@ module Cloudstrap
|
|
397
397
|
end
|
398
398
|
|
399
399
|
Contract None => Bool
|
400
|
-
def
|
400
|
+
def configure_hcp
|
401
401
|
bootstrap_properties
|
402
402
|
.define('Provider', 'AWS')
|
403
403
|
.define('KeepTerraform', 'true')
|
@@ -433,7 +433,7 @@ module Cloudstrap
|
|
433
433
|
def configure_jumpbox
|
434
434
|
private_key = ssh_key.private_file
|
435
435
|
properties = bootstrap_properties.file
|
436
|
-
package = config.
|
436
|
+
package = config.hcp_package_url
|
437
437
|
|
438
438
|
ssh.to(jumpbox_ip) do
|
439
439
|
'/home/ubuntu/.ssh/id_rsa'.tap do |target|
|
@@ -479,9 +479,9 @@ module Cloudstrap
|
|
479
479
|
@ssh ||= SSH::Client.new(ssh_key.private_file)
|
480
480
|
end
|
481
481
|
|
482
|
-
Contract None =>
|
482
|
+
Contract None => HCP::BootstrapProperties
|
483
483
|
def bootstrap_properties
|
484
|
-
@
|
484
|
+
@hcp ||= HCP::BootstrapProperties.new
|
485
485
|
end
|
486
486
|
|
487
487
|
Contract None => Amazon::EC2
|
data/lib/cloudstrap/config.rb
CHANGED
@@ -92,32 +92,32 @@ module Cloudstrap
|
|
92
92
|
end
|
93
93
|
|
94
94
|
Contract None => String
|
95
|
-
def
|
96
|
-
@
|
95
|
+
def hcp_dir
|
96
|
+
@hcp_dir ||= File.expand_path(ENV.fetch('BOOTSTRAP_HCP_DIR') { dir })
|
97
97
|
end
|
98
98
|
|
99
99
|
Contract None => String
|
100
|
-
def
|
101
|
-
lookup(:
|
100
|
+
def hcp_bootstrap_origin
|
101
|
+
lookup(:hcp_bootstrap_origin) { 'https://release.stackato.com/downloads/hcp/bootstrap' }
|
102
102
|
end
|
103
103
|
|
104
|
-
alias
|
104
|
+
alias hcp_origin hcp_bootstrap_origin
|
105
105
|
|
106
106
|
Contract None => String
|
107
|
-
def
|
108
|
-
lookup(:
|
107
|
+
def hcp_bootstrap_version
|
108
|
+
lookup(:hcp_bootstrap_version) { '1.0.20-0-gda74de0' }
|
109
109
|
end
|
110
110
|
|
111
|
-
alias
|
111
|
+
alias hcp_version hcp_bootstrap_version
|
112
112
|
|
113
113
|
Contract None => String
|
114
|
-
def
|
115
|
-
lookup(:
|
116
|
-
"#{
|
114
|
+
def hcp_bootstrap_package_url
|
115
|
+
lookup(:hcp_bootstrap_package_url) do
|
116
|
+
"#{hcp_origin}/hcp-bootstrap_#{hcp_version.gsub('+', '%2B')}_amd64.deb"
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
-
alias
|
120
|
+
alias hcp_package_url hcp_bootstrap_package_url
|
121
121
|
|
122
122
|
Contract None => String
|
123
123
|
def properties_seed_url
|
@@ -5,7 +5,7 @@ require_relative '../config'
|
|
5
5
|
require_relative '../seed_properties'
|
6
6
|
|
7
7
|
module Cloudstrap
|
8
|
-
module
|
8
|
+
module HCP
|
9
9
|
class BootstrapProperties
|
10
10
|
include ::Contracts::Core
|
11
11
|
include ::Contracts::Builtin
|
@@ -44,7 +44,7 @@ module Cloudstrap
|
|
44
44
|
|
45
45
|
Contract None => String
|
46
46
|
def file
|
47
|
-
@file ||= [config.
|
47
|
+
@file ||= [config.hcp_dir, 'bootstrap.properties'].join('/')
|
48
48
|
end
|
49
49
|
|
50
50
|
private
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.42.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Olstrom
|
@@ -298,7 +298,7 @@ files:
|
|
298
298
|
- lib/cloudstrap/bootstrap_agent.rb
|
299
299
|
- lib/cloudstrap/config.rb
|
300
300
|
- lib/cloudstrap/errors.rb
|
301
|
-
- lib/cloudstrap/
|
301
|
+
- lib/cloudstrap/hcp/bootstrap_properties.rb
|
302
302
|
- lib/cloudstrap/network.rb
|
303
303
|
- lib/cloudstrap/seed_properties.rb
|
304
304
|
- lib/cloudstrap/ssh.rb
|