opskeleton 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/Gemfile.lock +9 -9
- data/README.md +54 -14
- data/bin/opsk +1 -1
- data/lib/opskeleton/deploy.rb +3 -2
- data/lib/opskeleton/version.rb +1 -1
- data/templates/gitignore +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b52de7c4675f155af2b31a093aa253fe7179469
|
4
|
+
data.tar.gz: 1ed1a417000ba6050068fb1051e3f17b51088644
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62dabb7d933a806f5ca713f6f32482708ade4f012a3416e955c30987cfe7c952a56f753c05e8a306a259ff4901265ffd2bb72bf6cda0f108f0168846b3498a3e
|
7
|
+
data.tar.gz: ef9158f66fff15787c46d188bb442e0a8ea8495cab9560e962e23ad1400fd2fa18615c087d01c140477dd342c3bc06763aa321552706233b7074d67da1cba268
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -8,27 +8,27 @@ PATH
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
bintray_deploy (0.0.
|
11
|
+
bintray_deploy (0.0.3)
|
12
12
|
configuration
|
13
13
|
rest-client
|
14
14
|
thor
|
15
15
|
coderay (1.1.0)
|
16
16
|
configuration (1.3.2)
|
17
17
|
diff-lcs (1.2.5)
|
18
|
-
facter (1.7.
|
19
|
-
hiera (1.3.
|
18
|
+
facter (1.7.4)
|
19
|
+
hiera (1.3.1)
|
20
20
|
json_pure
|
21
21
|
json_pure (1.8.1)
|
22
|
-
metaclass (0.0.
|
22
|
+
metaclass (0.0.2)
|
23
23
|
method_source (0.8.2)
|
24
|
-
mime-types (2.
|
25
|
-
mocha (0.
|
24
|
+
mime-types (2.1)
|
25
|
+
mocha (1.0.0)
|
26
26
|
metaclass (~> 0.0.1)
|
27
27
|
pry (0.9.12.4)
|
28
28
|
coderay (~> 1.0)
|
29
29
|
method_source (~> 0.8)
|
30
30
|
slop (~> 3.4)
|
31
|
-
puppet (3.
|
31
|
+
puppet (3.4.2)
|
32
32
|
facter (~> 1.6)
|
33
33
|
hiera (~> 1.0)
|
34
34
|
rgen (~> 0.6.5)
|
@@ -37,7 +37,7 @@ GEM
|
|
37
37
|
rake
|
38
38
|
rspec (>= 2.9.0)
|
39
39
|
rspec-puppet (>= 0.1.1)
|
40
|
-
rake (10.1.
|
40
|
+
rake (10.1.1)
|
41
41
|
rest-client (1.6.7)
|
42
42
|
mime-types (>= 1.16)
|
43
43
|
rgen (0.6.6)
|
@@ -49,7 +49,7 @@ GEM
|
|
49
49
|
rspec-expectations (2.14.4)
|
50
50
|
diff-lcs (>= 1.1.3, < 2.0)
|
51
51
|
rspec-mocks (2.14.4)
|
52
|
-
rspec-puppet (0.1
|
52
|
+
rspec-puppet (1.0.1)
|
53
53
|
rspec
|
54
54
|
slop (3.4.7)
|
55
55
|
thor (0.18.1)
|
data/README.md
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
<img src="https://raw.github.com/narkisr/vagrant-sketching-board/master/images/opskeleton.png" width='100%' hight='100%' alt="" />
|
3
2
|
|
4
3
|
# Intro
|
@@ -20,18 +19,13 @@ See it in action [here](https://www.youtube.com/watch?v=LNlHC54Ej8c).
|
|
20
19
|
Usage
|
21
20
|
=========
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
```bash
|
26
|
-
$ sudo aptitude install ruby1.9.1 ruby1.9.1-dev
|
27
|
-
# see https://rvm.io/rvm/install/
|
28
|
-
$ curl -L https://get.rvm.io | bash -s stable --ruby
|
22
|
+
Perquisites (on Ubuntu):
|
29
23
|
|
30
|
-
|
31
|
-
|
32
|
-
|
24
|
+
* Vagrant 1.4.x
|
25
|
+
* RVM
|
26
|
+
* Ruby 1.9.x
|
33
27
|
|
34
|
-
|
28
|
+
```bash
|
35
29
|
$ rvm use system
|
36
30
|
$ sudo gem install opskeleton
|
37
31
|
```
|
@@ -41,9 +35,9 @@ Creating out first sandbox
|
|
41
35
|
```bash
|
42
36
|
$ rvm use system
|
43
37
|
# parameters include name vagrant-box
|
44
|
-
$ opsk generate redis ubuntu-
|
38
|
+
$ opsk generate redis ubuntu-13.10
|
45
39
|
$ cd redis-sandbox
|
46
|
-
|
40
|
+
$ bundle install
|
47
41
|
$ librarian-puppet install
|
48
42
|
$ vagrant up
|
49
43
|
```
|
@@ -57,7 +51,7 @@ Folder layout:
|
|
57
51
|
<img src="https://raw.github.com/narkisr/vagrant-sketching-board/master/images/opsk-folders.png" width='30%' hight='50%' alt="" />
|
58
52
|
|
59
53
|
|
60
|
-
##
|
54
|
+
## Module lifecycle
|
61
55
|
|
62
56
|
Opskelaton defines a simple module life cycle:
|
63
57
|
|
@@ -69,6 +63,52 @@ Life cycle scheme:
|
|
69
63
|
|
70
64
|
<img src="https://raw.github.com/narkisr/vagrant-sketching-board/master/images/module-lifecycle-black.png" width='30%' hight='50%' alt="" />
|
71
65
|
|
66
|
+
## Packaging
|
67
|
+
|
68
|
+
Opskelaton fully supports deployment and portable execution of sandboxes on non Vagrant environments:
|
69
|
+
|
70
|
+
```bash
|
71
|
+
$ opsk generate foo ubuntu-13.10
|
72
|
+
$ cd foo-sandbox
|
73
|
+
# The package version file
|
74
|
+
$ cat opsk.yaml
|
75
|
+
---
|
76
|
+
version: '0.0.1'
|
77
|
+
name: foo
|
78
|
+
# post bundle and gem install ..
|
79
|
+
$ opsk package
|
80
|
+
create pkg/foo-sandbox-0.0.1
|
81
|
+
create pkg/foo-sandbox-0.0.1/scripts
|
82
|
+
create pkg/foo-sandbox-0.0.1/scripts/lookup.rb
|
83
|
+
chmod pkg/foo-sandbox-0.0.1/scripts/lookup.rb
|
84
|
+
create pkg/foo-sandbox-0.0.1/scripts/run.sh
|
85
|
+
chmod pkg/foo-sandbox-0.0.1/scripts/run.sh
|
86
|
+
create pkg/foo-sandbox-0.0.1/manifests/site.pp
|
87
|
+
exist pkg
|
88
|
+
$ ls pkg
|
89
|
+
foo-sandbox-0.0.1 foo-sandbox-0.0.1.tar.gz
|
90
|
+
```
|
91
|
+
The packaging process creates a portable tar file that can be run on any machine with puppet installed via the bundled run.sh:
|
92
|
+
|
93
|
+
```bash
|
94
|
+
$ tar -xvzf foo-sandbox-0.0.1.tar.gz
|
95
|
+
$ cd foo-sandbox-0.0.1
|
96
|
+
$ sudo ./run.sh
|
97
|
+
```
|
98
|
+
|
99
|
+
An external node classifier based runner is also available under scripts/run.sh, this runner expects to get a <hostname>.yaml input file with the required node classes.
|
100
|
+
|
101
|
+
|
102
|
+
## Deployment
|
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
|
+
```
|
110
|
+
|
111
|
+
Make sure to [configure](https://github.com/narkisr/bintray-deploy#usage) configure the bintray API key.
|
72
112
|
# Copyright and license
|
73
113
|
|
74
114
|
Copyright [2013] [Ronen Narkis]
|
data/bin/opsk
CHANGED
@@ -15,7 +15,7 @@ module Opsk
|
|
15
15
|
register Opsk::Package, 'package', 'package', 'packages current module for celestial'
|
16
16
|
register Opsk::Clean, 'clean', 'clean', 'cleans up packaging products'
|
17
17
|
register Opsk::Bump, 'bump', 'bump', 'bumps up version (clearing old version also)'
|
18
|
-
register Opsk::Deploy, 'deploy', 'deploy [repo]', 'deploy packge into bintray.com'
|
18
|
+
register Opsk::Deploy, 'deploy', 'deploy [bintray repo]', 'deploy packge into bintray.com'
|
19
19
|
|
20
20
|
desc 'version', 'print opsk version'
|
21
21
|
def version
|
data/lib/opskeleton/deploy.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'bintray_deploy'
|
2
1
|
|
3
2
|
module Opsk
|
4
3
|
class Deploy < Thor::Group
|
@@ -9,12 +8,14 @@ module Opsk
|
|
9
8
|
desc 'Deploy sandbox into bintray.com'
|
10
9
|
|
11
10
|
def upload
|
11
|
+
require 'bintray_deploy'
|
12
12
|
pkg = Opsk::Package.new
|
13
13
|
tar = "#{pkg.artifact_path}.tar.gz"
|
14
|
+
base = File.basename(tar)
|
14
15
|
if(File.exists?(tar))
|
15
16
|
begin
|
16
17
|
BintrayDeploy::Actions.new.deploy(repo, "#{pkg.meta.name}-sandbox", pkg.meta.version, tar)
|
17
|
-
say("deployed #{
|
18
|
+
say("deployed #{base} to http://dl.bintray.com/#{C.user}/#{repo}/#{base}")
|
18
19
|
rescue Exception => e
|
19
20
|
say("failed to deploy due to #{e}")
|
20
21
|
end
|
data/lib/opskeleton/version.rb
CHANGED
data/templates/gitignore
CHANGED
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.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- narkisr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
171
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.
|
172
|
+
rubygems_version: 2.0.14
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: A generator for ops projects that include vagrant puppet and fpm
|