opskeleton 0.8.6 → 0.8.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef00dd6fb0ac41b70615e21f299a397bc40b8c57
4
- data.tar.gz: 09b41ae8257525772adef606cdcc2c6f958f5e9b
3
+ metadata.gz: 5a7ab747c40fdb17d278bf754f80d77eee667da8
4
+ data.tar.gz: 5c55804fe475b30bb28ffc0e1b630461e1b47400
5
5
  SHA512:
6
- metadata.gz: f5d34e874e9bf99ffc5e576ba0bf686061681aa4e37a15e70aff3e864549c7b6e15b688be8316bc0beec8fa25bbc49c231a2e5dc11c9dabead7818f0d00843b3
7
- data.tar.gz: d7dc02c32054516d94de2180f97093b003c9859ca4ea348380ed36352e9cf60511ce6cf7a41bc5d63458555f6d64f5a0774a53fde81649d88d791cbf4b95d04e
6
+ metadata.gz: a28a029f8e5a7a2a32567ed4c9a2ebac54fcdfac2e34fe3b413bb0e86b75f0930f9d6d8b2fd40d04a2232c951589e8cadfa9e52f4fc2dafb1cd4fcee56a40bf6
7
+ data.tar.gz: 6a93fbcb3984ad46ce746d3ad033c050e58169d68404995dcda6391a7ade98980411fda117f1374eafb033c03ff4e43e8149d8a654174bf8b5f4d7d50f4a38f4
data/Gemfile.lock CHANGED
@@ -1,106 +1,179 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- opskeleton (0.8.6)
4
+ opskeleton (0.8.7)
5
5
  bintray_deploy
6
6
  thor
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- CFPropertyList (2.2.7)
11
+ CFPropertyList (2.2.8)
12
+ aws-sdk (2.0.38)
13
+ aws-sdk-resources (= 2.0.38)
14
+ aws-sdk-core (2.0.38)
15
+ builder (~> 3.0)
16
+ jmespath (~> 1.0)
17
+ multi_json (~> 1.0)
18
+ aws-sdk-resources (2.0.38)
19
+ aws-sdk-core (= 2.0.38)
12
20
  bintray_deploy (0.0.4)
13
21
  configuration
14
22
  rest-client
15
23
  thor
16
- chef (11.6.2)
24
+ builder (3.2.2)
25
+ chef (12.2.1)
26
+ chef-zero (~> 4.0)
27
+ diff-lcs (~> 1.2, >= 1.2.4)
17
28
  erubis (~> 2.7)
29
+ ffi-yajl (>= 1.2, < 3.0)
18
30
  highline (~> 1.6, >= 1.6.9)
19
- json (>= 1.4.4, <= 1.7.7)
20
31
  mixlib-authentication (~> 1.3)
21
- mixlib-cli (~> 1.3)
22
- mixlib-config (~> 1.1, >= 1.1.2)
32
+ mixlib-cli (~> 1.4)
33
+ mixlib-config (~> 2.0)
23
34
  mixlib-log (~> 1.3)
24
- mixlib-shellout (~> 1.1)
35
+ mixlib-shellout (>= 2.0.0.rc.0, < 3.0)
25
36
  net-ssh (~> 2.6)
26
- net-ssh-multi (~> 1.1.0)
27
- ohai (>= 0.6.0, < 7.0.0)
28
- rest-client (>= 1.0.4, < 1.7.0)
29
- yajl-ruby (~> 1.1)
37
+ net-ssh-multi (~> 1.1)
38
+ ohai (~> 8.0)
39
+ plist (~> 3.1.0)
40
+ pry (~> 0.9)
41
+ rspec-core (~> 3.2)
42
+ rspec-expectations (~> 3.2)
43
+ rspec-mocks (~> 3.2)
44
+ rspec_junit_formatter (~> 0.2.0)
45
+ serverspec (~> 2.7)
46
+ specinfra (~> 2.10)
47
+ chef-zero (4.2.1)
48
+ ffi-yajl (>= 1.1, < 3.0)
49
+ hashie (~> 2.0)
50
+ mixlib-log (~> 1.3)
51
+ rack
52
+ uuidtools (~> 2.1)
30
53
  coderay (1.1.0)
31
54
  configuration (1.3.4)
32
55
  diff-lcs (1.2.5)
56
+ domain_name (0.5.23)
57
+ unf (>= 0.0.5, < 1.0.0)
33
58
  erubis (2.7.0)
34
- facter (2.0.1)
59
+ facter (2.4.3)
35
60
  CFPropertyList (~> 2.2.6)
36
- hiera (1.3.2)
61
+ ffi (1.9.8)
62
+ ffi-yajl (2.0.0)
63
+ ffi (~> 1.5)
64
+ libyajl2 (~> 1.2)
65
+ hashie (2.1.2)
66
+ hiera (1.3.4)
37
67
  json_pure
38
- highline (1.6.21)
68
+ highline (1.7.1)
69
+ http-cookie (1.0.2)
70
+ domain_name (~> 0.5)
39
71
  ipaddress (0.8.0)
40
- json (1.7.7)
41
- json_pure (1.8.1)
72
+ jmespath (1.0.2)
73
+ multi_json (~> 1.0)
74
+ json_pure (1.8.2)
75
+ libyajl2 (1.2.0)
42
76
  metaclass (0.0.4)
43
77
  method_source (0.8.2)
44
- mime-types (2.2)
78
+ mime-types (2.4.3)
45
79
  mixlib-authentication (1.3.0)
46
80
  mixlib-log
47
81
  mixlib-cli (1.5.0)
48
- mixlib-config (1.1.2)
82
+ mixlib-config (2.1.0)
49
83
  mixlib-log (1.6.0)
50
- mixlib-shellout (1.4.0)
51
- mocha (1.0.0)
84
+ mixlib-shellout (2.0.1)
85
+ mocha (1.1.0)
52
86
  metaclass (~> 0.0.1)
53
- net-ssh (2.9.1)
87
+ multi_json (1.11.0)
88
+ net-scp (1.2.1)
89
+ net-ssh (>= 2.6.5)
90
+ net-ssh (2.9.2)
54
91
  net-ssh-gateway (1.2.0)
55
92
  net-ssh (>= 2.6.5)
56
- net-ssh-multi (1.1)
57
- net-ssh (>= 2.1.4)
58
- net-ssh-gateway (>= 0.99.0)
59
- ohai (6.22.0)
93
+ net-ssh-multi (1.2.1)
94
+ net-ssh (>= 2.6.5)
95
+ net-ssh-gateway (>= 1.2.0)
96
+ netrc (0.10.3)
97
+ ohai (8.2.0)
98
+ ffi (~> 1.9)
99
+ ffi-yajl (>= 1.1, < 3.0)
60
100
  ipaddress
101
+ mime-types (~> 2.0)
61
102
  mixlib-cli
62
- mixlib-config
103
+ mixlib-config (~> 2.0)
63
104
  mixlib-log
64
- mixlib-shellout
65
- systemu (~> 2.5.2)
66
- yajl-ruby
67
- pry (0.9.12.6)
68
- coderay (~> 1.0)
69
- method_source (~> 0.8)
105
+ mixlib-shellout (~> 2.0)
106
+ rake (~> 10.1)
107
+ systemu (~> 2.6.4)
108
+ wmi-lite (~> 1.0)
109
+ plist (3.1.0)
110
+ pry (0.10.1)
111
+ coderay (~> 1.1.0)
112
+ method_source (~> 0.8.1)
70
113
  slop (~> 3.4)
71
- puppet (3.5.1)
114
+ puppet (3.7.5)
72
115
  facter (> 1.6, < 3)
73
116
  hiera (~> 1.0)
74
117
  json_pure
75
- rgen (~> 0.6.5)
76
- puppetlabs_spec_helper (0.4.1)
77
- mocha (>= 0.10.5)
118
+ puppet-lint (1.1.0)
119
+ puppet-syntax (2.0.0)
120
+ rake
121
+ puppetlabs_spec_helper (0.10.1)
122
+ mocha
123
+ puppet-lint
124
+ puppet-syntax
78
125
  rake
79
- rspec (>= 2.9.0)
80
- rspec-puppet (>= 0.1.1)
81
- rake (10.3.1)
82
- rest-client (1.6.7)
83
- mime-types (>= 1.16)
84
- rgen (0.6.6)
85
- rspec (2.14.1)
86
- rspec-core (~> 2.14.0)
87
- rspec-expectations (~> 2.14.0)
88
- rspec-mocks (~> 2.14.0)
89
- rspec-core (2.14.8)
90
- rspec-expectations (2.14.5)
91
- diff-lcs (>= 1.1.3, < 2.0)
92
- rspec-mocks (2.14.6)
93
- rspec-puppet (1.0.1)
126
+ rspec-puppet
127
+ rack (1.6.0)
128
+ rake (10.4.2)
129
+ rest-client (1.8.0)
130
+ http-cookie (>= 1.0.2, < 2.0)
131
+ mime-types (>= 1.16, < 3.0)
132
+ netrc (~> 0.7)
133
+ rspec (3.2.0)
134
+ rspec-core (~> 3.2.0)
135
+ rspec-expectations (~> 3.2.0)
136
+ rspec-mocks (~> 3.2.0)
137
+ rspec-core (3.2.3)
138
+ rspec-support (~> 3.2.0)
139
+ rspec-expectations (3.2.1)
140
+ diff-lcs (>= 1.2.0, < 2.0)
141
+ rspec-support (~> 3.2.0)
142
+ rspec-its (1.2.0)
143
+ rspec-core (>= 3.0.0)
144
+ rspec-expectations (>= 3.0.0)
145
+ rspec-mocks (3.2.1)
146
+ diff-lcs (>= 1.2.0, < 2.0)
147
+ rspec-support (~> 3.2.0)
148
+ rspec-puppet (2.0.1)
94
149
  rspec
95
- slop (3.5.0)
96
- systemu (2.5.2)
150
+ rspec-support (3.2.2)
151
+ rspec_junit_formatter (0.2.0)
152
+ builder (< 4)
153
+ rspec (>= 2, < 4)
154
+ rspec-core (!= 2.12.0)
155
+ serverspec (2.14.1)
156
+ multi_json
157
+ rspec (~> 3.0)
158
+ rspec-its
159
+ specinfra (~> 2.25)
160
+ slop (3.6.0)
161
+ specinfra (2.28.1)
162
+ net-scp
163
+ net-ssh
164
+ systemu (2.6.5)
97
165
  thor (0.19.1)
98
- yajl-ruby (1.2.1)
166
+ unf (0.1.4)
167
+ unf_ext
168
+ unf_ext (0.0.6)
169
+ uuidtools (2.1.5)
170
+ wmi-lite (1.0.0)
99
171
 
100
172
  PLATFORMS
101
173
  ruby
102
174
 
103
175
  DEPENDENCIES
176
+ aws-sdk (~> 2)
104
177
  chef
105
178
  opskeleton!
106
179
  pry
data/RELEASE-NOTES.md CHANGED
@@ -1,4 +1,12 @@
1
- # Celestial 0.6.0 (06/08/14):
1
+ # Opskeleton 0.8.7 (13/04/15):
2
+
3
+ ## Fixes:
4
+
5
+ ## New Features:
6
+
7
+ * Supporting s3 upload.
8
+
9
+ # Opskeleton 0.6.0 (06/08/14):
2
10
 
3
11
  ## Fixes:
4
12
  * Changing opsk yml extension to yaml (matching proper extension name).
data/bin/opsk CHANGED
@@ -22,7 +22,8 @@ module Opsk
22
22
  register Opsk::Dockerize, 'dockerize', 'dockerize [from] [os_type]', 'Creates a docker image from the current sandbox'
23
23
  register Opsk::Clean, 'clean', 'clean', 'cleans up packaging products'
24
24
  register Opsk::Bump, 'bump', 'bump', 'bumps up version (clearing old version also)'
25
- register Opsk::Deploy, 'deploy', 'deploy [bintray repo]', 'deploy packge into bintray.com'
25
+ register Opsk::DeployBintray, 'deploy_bintray', 'deploy_bintray [repo]', 'deploy packge into bintray.com'
26
+ register Opsk::DeployS3, 'deploy_s3', 'deploy_s3 [bucket] [path]', 'deploy packge into s3 bucket under path folder'
26
27
 
27
28
  desc 'version', 'print opsk version'
28
29
  def version
data/chef.md CHANGED
@@ -101,15 +101,7 @@ $ sudo ./run.sh dev
101
101
 
102
102
  ## Deployment
103
103
 
104
- The packaged tar files can be consumed using any tool and protocol however http is recommended, opsk has built in support for deploying public sandboxes into bintray:
105
-
106
- ```bash
107
- $ opsk package
108
- $ opsk deploy <bintray-repo>
109
- deployed foo-sandbox-0.0.1.tar.gz to http://dl.bintray.com/narkisr/<bintray-repo>/foo-sandbox-0.0.1.tar.gz
110
- ```
111
-
112
- Make sure to [configure](https://github.com/narkisr/bintray-deploy#usage) configure the bintray API key.
104
+ See [deploy](deploy.md)
113
105
 
114
106
  ## Updating
115
107
 
data/deploy.md ADDED
@@ -0,0 +1,33 @@
1
+ # Deployment
2
+
3
+ The packaged tar files can be consumed using any tool and protocol (http, s3 etc), opsk has built in support for deploying public sandboxes into:
4
+
5
+ * Bintray Make sure to [configure](https://github.com/narkisr/bintray-deploy#usage) configure the bintray API key:
6
+
7
+ ```bash
8
+ $ opsk package
9
+ $ opsk deploy_bintray <bintray-repo>
10
+ deployed foo-sandbox-0.0.1.tar.gz to http://dl.bintray.com/narkisr/<bintray-repo>/foo-sandbox-0.0.1.tar.gz
11
+ ```
12
+
13
+
14
+ * S3:
15
+
16
+ ```bash
17
+ $ opsk package
18
+ $ opsk deploy_s3 <bucket> <path>
19
+ deployed foo-sandbox-0.0.1.tar.gz to opsk-boxes/foo/foo-sandbox-0.0.1.tar.gz
20
+ ```
21
+ Make sure to configure s3 section under ~/.configuration.rb:
22
+
23
+ ```ruby
24
+ Configuration.for('s3') {
25
+ access_key ''
26
+ secret_key ''
27
+ region ''
28
+ }
29
+ ```
30
+
31
+
32
+
33
+
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Opsk
3
- class Deploy < Thor::Group
3
+ class DeployBintray < Thor::Group
4
4
  include Thorable, Thor::Actions
5
5
 
6
6
  argument :repo, :type => :string, :desc => 'bintray repo'
@@ -0,0 +1,47 @@
1
+
2
+ require 'configuration'
3
+ conf = "#{ENV['HOME']}/.configuration.rb"
4
+ raise "#{conf} not found, please create a conf file with a s3 section" unless File.exists?(conf)
5
+ require conf
6
+
7
+ module Opsk
8
+ class DeployS3 < Thor::Group
9
+ include Thorable, Thor::Actions
10
+
11
+ argument :bucket, :type => :string, :desc => 'bucket'
12
+ argument :path, :type => :string, :desc => 'path'
13
+
14
+ desc 'Deploy sandbox into an s3 bucket'
15
+
16
+ def validate
17
+ check_root
18
+ end
19
+
20
+
21
+ def upload
22
+ require 'aws-sdk'
23
+ pkg = Opsk::Package.new
24
+ tar = "#{pkg.artifact_path}.tar.gz"
25
+ base = File.basename(tar)
26
+ if(File.exists?(tar))
27
+ begin
28
+ conf = Configuration.for 's3'
29
+ Aws.config.update({
30
+ region: conf.region,
31
+ credentials: Aws::Credentials.new(conf.access_key, conf.secret_key),
32
+ })
33
+ s3 = Aws::S3::Resource.new
34
+ s3.bucket(bucket).object("#{path}/#{base}").upload_file(tar)
35
+ say("deployed #{base} to #{bucket}/#{path}/#{base}")
36
+ rescue Exception => e
37
+ say("failed to deploy due to #{e}")
38
+ end
39
+ else
40
+ say('package is missing please run opsk package first')
41
+ end
42
+ end
43
+
44
+ end
45
+
46
+ end
47
+
@@ -1,3 +1,3 @@
1
1
  module Opskeleton
2
- VERSION = '0.8.6'
2
+ VERSION = '0.8.7'
3
3
  end
data/lib/opskeleton.rb CHANGED
@@ -10,6 +10,7 @@ require 'opskeleton/clean'
10
10
  require 'opskeleton/bump'
11
11
  require 'opskeleton/generate_puppet'
12
12
  require 'opskeleton/generate_chef'
13
- require 'opskeleton/deploy'
13
+ require 'opskeleton/deploy_bintray'
14
+ require 'opskeleton/deploy_s3'
14
15
  require 'opskeleton/module'
15
16
 
data/opskeleton.gemspec CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.add_development_dependency('chef')
18
18
  gem.add_development_dependency('rspec-puppet')
19
19
  gem.add_development_dependency('puppetlabs_spec_helper', '>= 0.1.0')
20
+ gem.add_development_dependency('aws-sdk', '~> 2')
20
21
  gem.add_development_dependency('pry')
21
22
 
22
23
  gem.files = `git ls-files`.split($/)
data/puppet.md CHANGED
@@ -94,15 +94,7 @@ An external node classifier based runner is also available under scripts/run.sh,
94
94
 
95
95
  ## Deployment
96
96
 
97
- The packaged tar files can be consumed using any tool and protocol however http is recommended, opsk has built in support for deploying public sandboxes into bintray:
98
-
99
- ```bash
100
- $ opsk package
101
- $ opsk deploy <bintray-repo>
102
- deployed foo-sandbox-0.0.1.tar.gz to http://dl.bintray.com/narkisr/<bintray-repo>/foo-sandbox-0.0.1.tar.gz
103
- ```
104
-
105
- Make sure to [configure](https://github.com/narkisr/bintray-deploy#usage) configure the bintray API key.
97
+ See [deploy](deploy.md)
106
98
 
107
99
  ## Updating
108
100
  Keeping you box up to date with latest opsk version is easy, just re-generate it again and resolve conflicts by answering y/n:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opskeleton
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - narkisr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-12 00:00:00.000000000 Z
11
+ date: 2015-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.1.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: aws-sdk
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '2'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '2'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: pry
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -131,6 +145,7 @@ files:
131
145
  - autocomplete/opsk_bash_completion
132
146
  - bin/opsk
133
147
  - chef.md
148
+ - deploy.md
134
149
  - img/chef-cycle.png
135
150
  - img/chef-layout.png
136
151
  - img/puppet-cycle.png
@@ -138,7 +153,8 @@ files:
138
153
  - lib/opskeleton.rb
139
154
  - lib/opskeleton/bump.rb
140
155
  - lib/opskeleton/clean.rb
141
- - lib/opskeleton/deploy.rb
156
+ - lib/opskeleton/deploy_bintray.rb
157
+ - lib/opskeleton/deploy_s3.rb
142
158
  - lib/opskeleton/dockerize.rb
143
159
  - lib/opskeleton/generate_chef.rb
144
160
  - lib/opskeleton/generate_puppet.rb