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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fc7f3c7be28794db4f4439d770863d598989ba5
4
- data.tar.gz: a39ccc598356b656e7429dbcad46f9c11f0fc604
3
+ metadata.gz: 6a3103abb2babcf700c3c58e85a2834424e256c2
4
+ data.tar.gz: 0db0b9f223358e7a658d14a333ea6ece8a557b74
5
5
  SHA512:
6
- metadata.gz: a036c652786fc5bf457b6fd01e1076ea0d25923d4fe0cf2d3660685349fe3a60e1c55e0da74e4cf396e6fa6689c02ebc97ec592a2d4d26e5bde94f1383cb6793
7
- data.tar.gz: f06e8eb48afc25c213fd49ef7f753b569568ce729627e5bb654f909be84af4fc7e56e5872d5695b19af0a4f482c59a114b75fe743ce0b0e0eec8b6976866aba0
6
+ metadata.gz: ab2241dbf15147a3c7a64d7ed98c14e8ea63be23ecfc74b2caaddda89541cdb7c199185390c0bbf41cc15e16636bf5bc539ea1d3be1dd73490993e9da2362eec
7
+ data.tar.gz: bfabda81c608ba5c1bca8c634a182f51dc01aafbf9afdccd143467031794aa6834f3ff89c81afb2bd980d56ba512a8bbe3adc9e4e264054b4e8ad3552d7d6c3a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- opskeleton (0.4.4)
4
+ opskeleton (0.4.6)
5
5
  bintray_deploy
6
6
  thor
7
7
 
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/narkisr/opskeleton.png)](https://travis-ci.org/narkisr/opskeleton)
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 reside under module folder.
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
- ## Packaging
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]
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Opskeleton
2
- VERSION = '0.4.6'
2
+ VERSION = '0.4.7'
3
3
  end
data/templates/README.erb CHANGED
@@ -3,9 +3,8 @@ This project manages a sandbox for [<%=name%>](url)
3
3
 
4
4
  # Usage
5
5
  ```bash
6
- $ bundle install
7
- $ librarian-puppet install
8
- $ vagrant up
6
+ # install require gems, puppet modules and fire up vagrant
7
+ $ ./boot.sh
9
8
  ```
10
9
 
11
10
  # Copyright and license
data/templates/Rakefile CHANGED
@@ -20,5 +20,5 @@ task :modspec do
20
20
  end
21
21
 
22
22
  require 'puppet-lint/tasks/puppet-lint'
23
- PuppetLint.configuration.ignore_paths =['modules/**/*']
23
+ PuppetLint.configuration.ignore_paths =['modules/**/*', 'vendor/**/*']
24
24
  PuppetLint.configuration.send("disable_80chars")
data/templates/boot.sh ADDED
@@ -0,0 +1,4 @@
1
+ gem install bundle
2
+ bundle install
3
+ librarian-puppet install
4
+ vagrant up
@@ -2,7 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  script:
5
- - "librarian-puppet install"
6
- - "rake lint"
7
- - "rake modspec"
5
+ - "bundle exec librarian-puppet install"
6
+ - "bundle exec rake lint"
7
+ - "bundle exec rake modspec"
8
8
 
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.6
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-03-27 00:00:00.000000000 Z
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