opskeleton 0.4.6 → 0.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +47 -3
- data/lib/opskeleton/generate.rb +6 -3
- data/lib/opskeleton/version.rb +1 -1
- data/templates/README.erb +2 -3
- data/templates/Rakefile +1 -1
- data/templates/boot.sh +4 -0
- data/templates/parent/travis.erb +3 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a3103abb2babcf700c3c58e85a2834424e256c2
|
4
|
+
data.tar.gz: 0db0b9f223358e7a658d14a333ea6ece8a557b74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab2241dbf15147a3c7a64d7ed98c14e8ea63be23ecfc74b2caaddda89541cdb7c199185390c0bbf41cc15e16636bf5bc539ea1d3be1dd73490993e9da2362eec
|
7
|
+
data.tar.gz: bfabda81c608ba5c1bca8c634a182f51dc01aafbf9afdccd143467031794aa6834f3ff89c81afb2bd980d56ba512a8bbe3adc9e4e264054b4e8ad3552d7d6c3a
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -14,7 +14,7 @@ Opsk aims to solve the following common issues:
|
|
14
14
|
|
15
15
|
See it in action [here](https://www.youtube.com/watch?v=LNlHC54Ej8c).
|
16
16
|
|
17
|
-
[![Build Status](https://travis-ci.org/
|
17
|
+
[![Build Status](https://travis-ci.org/opskeleton/opskeleton.png)](https://travis-ci.org/opskeleton/opskeleton)
|
18
18
|
|
19
19
|
Usage
|
20
20
|
=========
|
@@ -57,14 +57,37 @@ Opskelaton defines a simple module life cycle:
|
|
57
57
|
|
58
58
|
1. Internal non reusable modules (usually specific to a client site) go under static-modules
|
59
59
|
2. If we create a general reusable module which is ready for prime time we pull out to a new git repository.
|
60
|
-
3. The extracted module is added back as a third party (using [librarian-puppet](https://github.com/rodjek/librarian-puppet) module which
|
60
|
+
3. The extracted module is added back as a third party (using [librarian-puppet](https://github.com/rodjek/librarian-puppet) module which resides under modules folder.
|
61
61
|
|
62
62
|
Life cycle scheme:
|
63
63
|
|
64
64
|
<img src="https://raw.github.com/narkisr/vagrant-sketching-board/master/images/module-lifecycle-black.png" width='30%' hight='50%' alt="" />
|
65
65
|
|
66
|
-
|
66
|
+
Creating new (static) modules is easy as:
|
67
|
+
|
68
|
+
```bash
|
69
|
+
$ opsk module foo
|
70
|
+
```
|
71
|
+
|
72
|
+
Each generated module will contain puppet-rspec with matching Rakefile (see [testing](https://github.com/opskeleton/opskeleton#testing)).
|
67
73
|
|
74
|
+
## Testing
|
75
|
+
|
76
|
+
Opskelaton supports two levels of testing:
|
77
|
+
|
78
|
+
* Static module testing that includes rspec and linting.
|
79
|
+
* Integration testing using [serverspec](http://serverspec.org/) and Vagrant.
|
80
|
+
|
81
|
+
```bash
|
82
|
+
# linting all static modules
|
83
|
+
$ rake lint
|
84
|
+
# rspecing
|
85
|
+
$ rake modspec
|
86
|
+
# running serverspec
|
87
|
+
$ rake spec
|
88
|
+
```
|
89
|
+
|
90
|
+
## Packaging
|
68
91
|
Opskelaton fully supports deployment and portable execution of sandboxes on non Vagrant environments:
|
69
92
|
|
70
93
|
```bash
|
@@ -75,6 +98,7 @@ $ cat opsk.yaml
|
|
75
98
|
---
|
76
99
|
version: '0.0.1'
|
77
100
|
name: foo
|
101
|
+
|
78
102
|
# post bundle and gem install ..
|
79
103
|
$ opsk package
|
80
104
|
create pkg/foo-sandbox-0.0.1
|
@@ -110,6 +134,26 @@ deployed foo-sandbox-0.0.1.tar.gz to http://dl.bintray.com/narkisr/<bintray-repo
|
|
110
134
|
```
|
111
135
|
|
112
136
|
Make sure to [configure](https://github.com/narkisr/bintray-deploy#usage) configure the bintray API key.
|
137
|
+
|
138
|
+
## Updating
|
139
|
+
Keeping you box up to date with latest opsk version is easy, just re-generate it again and resolve conflicts by answering y/n:
|
140
|
+
```bash
|
141
|
+
# Moving to latest opsk
|
142
|
+
$ gem update opskeleton
|
143
|
+
# foo box already exists
|
144
|
+
$ opsk generate foo <vagrant-box>
|
145
|
+
exist foo-sandbox
|
146
|
+
conflict foo-sandbox/Vagrantfile
|
147
|
+
Overwrite /home/ronen/code/foo-sandbox/Vagrantfile? (enter "h" for help) [Ynaqdh]
|
148
|
+
```
|
149
|
+
|
150
|
+
## Vagrant
|
151
|
+
Opskeleton generates a Vagrant file with couple of enhancements:
|
152
|
+
|
153
|
+
* VAGRANT_BRIDGE (default eth0) for setting up public bridge on the go.
|
154
|
+
* PUPPET_ENV (default dev) for setting puppet environment.
|
155
|
+
* Puppet options preset to match modules and hiera folders.
|
156
|
+
|
113
157
|
# Copyright and license
|
114
158
|
|
115
159
|
Copyright [2013] [Ronen Narkis]
|
data/lib/opskeleton/generate.rb
CHANGED
@@ -41,7 +41,9 @@ module Opsk
|
|
41
41
|
template('templates/puppetfile.erb', "#{path}/Puppetfile")
|
42
42
|
template('templates/puppet/default.erb', "#{path}/manifests/default.pp")
|
43
43
|
copy_file('templates/run.sh', "#{path}/run.sh")
|
44
|
+
copy_file('templates/boot.sh', "#{path}/boot.sh")
|
44
45
|
chmod("#{path}/run.sh", 0755)
|
46
|
+
chmod("#{path}/boot.sh", 0755)
|
45
47
|
end
|
46
48
|
|
47
49
|
def create_heira
|
@@ -64,6 +66,10 @@ module Opsk
|
|
64
66
|
template('templates/parent/travis.erb', "#{path}/.travis.yml")
|
65
67
|
end
|
66
68
|
|
69
|
+
def server_spec
|
70
|
+
directory('templates/parent/spec', "#{path}/spec")
|
71
|
+
end
|
72
|
+
|
67
73
|
def git
|
68
74
|
if(!File.exists?("#{path}/.git"))
|
69
75
|
copy_file('templates/gitignore', "#{path}/.gitignore")
|
@@ -75,8 +81,5 @@ module Opsk
|
|
75
81
|
end
|
76
82
|
end
|
77
83
|
|
78
|
-
def server_spec
|
79
|
-
directory('templates/parent/spec', "#{path}/spec")
|
80
|
-
end
|
81
84
|
end
|
82
85
|
end
|
data/lib/opskeleton/version.rb
CHANGED
data/templates/README.erb
CHANGED
data/templates/Rakefile
CHANGED
data/templates/boot.sh
ADDED
data/templates/parent/travis.erb
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.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- narkisr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -128,6 +128,7 @@ files:
|
|
128
128
|
- templates/LICENSE-2.0.txt
|
129
129
|
- templates/README.erb
|
130
130
|
- templates/Rakefile
|
131
|
+
- templates/boot.sh
|
131
132
|
- templates/clean.yaml
|
132
133
|
- templates/gemfile
|
133
134
|
- templates/gitignore
|