opskeleton 0.6.6 → 0.6.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 +7 -7
- data/chef.md +5 -7
- data/img/chef-cycle.png +0 -0
- data/img/chef-layout.png +0 -0
- data/img/puppet-cycle.png +0 -0
- data/img/puppet-layout.png +0 -0
- data/lib/opskeleton/dockerize.rb +6 -5
- data/lib/opskeleton/version.rb +1 -1
- data/puppet.md +12 -2
- data/templates/docker_build.erb +1 -0
- data/templates/puppet/docker/ubuntu_docker.erb +11 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6eca6be1a2c2a6584aa8a085aa9f80e78f98fc0
|
4
|
+
data.tar.gz: 0aaf45e8e17c7ddc71d02f577ac3478ff7a127d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8a8953067ee4e0c6f4a839ea9cd6330a61a00c2ff12745564d5e9fbd9a32f867cd8aa1577f0ecdc20f9b4db751114e49facbefe0a1d89840af0a10bf6f1bfef
|
7
|
+
data.tar.gz: b643610aa6c5c733d7ee125ed553b1d686795b8a32b6c2a7006e39f3b94eb70053d428601eed9821234b42c650e2bd5aa3d0c42f42f0b04677be2e0cb7085aae
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -5,15 +5,15 @@
|
|
5
5
|
Opskelaton is an opinionated bootstrap tool for local Sandbox projects.
|
6
6
|
|
7
7
|
Opskeleton aims to solve the following common issues:
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
8
|
+
* Developing Puppet/Chef modules/cookbooks on master machines which results with 'It works on my master/server' approach.
|
9
|
+
* Large monolithic Puppet/Chef code bases, code isn't modular or reusable.
|
10
|
+
* Implicit/Missing dependencies, like ruby version used, operating system, gems, third party modules/cookbooks.
|
11
|
+
* Manual steps in setting up modules/cookbooks and local sandboxes (like installing third party code).
|
11
12
|
* Non standard layout, projects missing README and LICENSE files, no clear separation between developed and dependant code.
|
12
|
-
* No clear development guidelines, for example extracting general modules and exporting them.
|
13
|
+
* No clear development guidelines, for example extracting general modules and exporting them, no deployment packaging or general testing guide.
|
14
|
+
* No continues build, linting and testing, provisioning code is second class citizen.
|
13
15
|
|
14
|
-
Opskeleton comes to solve these issues by introducing a decentralized development
|
15
|
-
|
16
|
-
See it in action [here](https://www.youtube.com/watch?v=LNlHC54Ej8c).
|
16
|
+
Opskeleton comes to solve these issues by introducing a decentralized development work flow with pre-defined layout, packaging and dependency management.
|
17
17
|
|
18
18
|
[![Build Status](https://travis-ci.org/opskeleton/opskeleton.png)](https://travis-ci.org/opskeleton/opskeleton)
|
19
19
|
|
data/chef.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Intro
|
2
2
|
|
3
|
-
Opskelaton fully supports
|
4
|
-
|
5
|
-
it offers similar features to the Puppet based sandboxes with additional support for roles, environments and cookbooks.
|
3
|
+
Opskelaton fully supports Chef based sandboxes it offers similar features to the Puppet based sandboxes with additional support for roles, environments and cookbooks.
|
6
4
|
|
7
5
|
# Usage
|
8
6
|
|
@@ -19,7 +17,7 @@ Opskelaton creates the complete folder structure fine tuned to match best practi
|
|
19
17
|
|
20
18
|
Folder layout:
|
21
19
|
|
22
|
-
|
20
|
+
<img src="https://github.com/opskeleton/opskeleton/blob/master/img/chef-layout.png" width='30%' hight='50%' alt="" />
|
23
21
|
|
24
22
|
|
25
23
|
## Cookbook lifecycle
|
@@ -28,13 +26,13 @@ Opskelaton defines a simple cookbook life cycle:
|
|
28
26
|
|
29
27
|
1. Internal non reusable cookbooks (usually specific to a client site) go under static-cookbooks
|
30
28
|
2. If we create a general reusable cookbook which is ready for prime time we pull out to a new git repository.
|
31
|
-
3. The extracted cookbook is added back as a third party (using [librarian-chef](https://github.com/applicationsonline/librarian-chef)
|
29
|
+
3. The extracted cookbook is added back as a third party (using [librarian-chef](https://github.com/applicationsonline/librarian-chef) thatd will place them under cookbooks folder).
|
32
30
|
|
33
31
|
Life cycle scheme:
|
34
32
|
|
35
|
-
<img src="https://
|
33
|
+
<img src="https://github.com/opskeleton/opskeleton/blob/master/img/chef-cycle.png" width='30%' hight='50%' alt="" />
|
36
34
|
|
37
|
-
Creating new
|
35
|
+
Creating new cookbooks is easy as:
|
38
36
|
|
39
37
|
```bash
|
40
38
|
$ opsk cookbook foo
|
data/img/chef-cycle.png
ADDED
Binary file
|
data/img/chef-layout.png
ADDED
Binary file
|
Binary file
|
Binary file
|
data/lib/opskeleton/dockerize.rb
CHANGED
@@ -2,18 +2,19 @@ module Opsk
|
|
2
2
|
class Dockerize < Thor::Group
|
3
3
|
include Thorable, Thor::Actions
|
4
4
|
|
5
|
-
argument :from, :type => :string, :desc => '
|
6
|
-
argument :os_type, :type=> :string, :desc => 'Ubuntu/Centos'
|
5
|
+
argument :from, :type => :string, :desc => 'Which source image to use'
|
6
|
+
argument :os_type, :type=> :string, :desc => 'Flavor of container Ubuntu/Centos'
|
7
7
|
|
8
8
|
|
9
9
|
desc 'Creates a docker image using the current opsk sandbox'
|
10
10
|
|
11
11
|
def create_dockerfile
|
12
|
-
template("templates/#{type_of}/#{os_type}_docker.erb", 'Dockerfile')
|
12
|
+
template("templates/#{type_of}/docker/#{os_type}_docker.erb", 'Dockerfile')
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
16
|
-
|
15
|
+
def docker_build
|
16
|
+
template("templates/docker_build.erb", 'docker_build.sh')
|
17
|
+
chmod('docker_build.sh', 0755)
|
17
18
|
end
|
18
19
|
|
19
20
|
end
|
data/lib/opskeleton/version.rb
CHANGED
data/puppet.md
CHANGED
@@ -17,7 +17,7 @@ Opskelaton creates the complete folder structure fine tuned to match best practi
|
|
17
17
|
|
18
18
|
Folder layout:
|
19
19
|
|
20
|
-
<img src="https://
|
20
|
+
<img src="https://github.com/opskeleton/opskeleton/blob/master/img/puppet-layout.png" width='30%' hight='50%' alt="" />
|
21
21
|
|
22
22
|
|
23
23
|
## Module lifecycle
|
@@ -30,7 +30,7 @@ Opskelaton defines a simple module life cycle:
|
|
30
30
|
|
31
31
|
Life cycle scheme:
|
32
32
|
|
33
|
-
<img src="https://
|
33
|
+
<img src="https://github.com/opskeleton/opskeleton/blob/master/img/puppet-cycle.png" width='30%' hight='50%' alt="" />
|
34
34
|
|
35
35
|
Creating new (static) modules is easy as:
|
36
36
|
|
@@ -123,3 +123,13 @@ Opskeleton generates a Vagrant file with couple of enhancements:
|
|
123
123
|
* PUPPET_ENV (default dev) for setting puppet environment.
|
124
124
|
* Puppet options preset to match modules and hiera folders.
|
125
125
|
|
126
|
+
## Docker
|
127
|
+
The only assumption that Opskelaton makes is that the target host will have Pupppet installed, this enables us to create docker images from our sandboxes quite easily:
|
128
|
+
|
129
|
+
```bash
|
130
|
+
$ opsk package
|
131
|
+
# creates the Dockerfile
|
132
|
+
$ opsk dockerize
|
133
|
+
# builds <sandbox>/<version> image
|
134
|
+
$ sudo ./build_docker.sh
|
135
|
+
```
|
@@ -0,0 +1 @@
|
|
1
|
+
docker build -t <%= name.gsub('-','_') %>/<%= meta.version %> .
|
@@ -0,0 +1,11 @@
|
|
1
|
+
FROM <%=from%>
|
2
|
+
|
3
|
+
RUN apt-get update
|
4
|
+
RUN apt-get install wget -y
|
5
|
+
RUN /usr/bin/wget 'https://gist.githubusercontent.com/narkisr/6097786/raw' --no-check-certificate && /bin/bash raw
|
6
|
+
ADD pkg/<%=artifact%>.tar.gz /
|
7
|
+
RUN cd <%=artifact%> && /bin/bash run.sh
|
8
|
+
RUN rm -rf <%=artifact%>
|
9
|
+
|
10
|
+
# CMD ["YOUR PROCESSES"]
|
11
|
+
# EXPOSE 80 514 12201 9200
|
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.6.
|
4
|
+
version: 0.6.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-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -131,6 +131,10 @@ files:
|
|
131
131
|
- autocomplete/opsk_bash_completion
|
132
132
|
- bin/opsk
|
133
133
|
- chef.md
|
134
|
+
- img/chef-cycle.png
|
135
|
+
- img/chef-layout.png
|
136
|
+
- img/puppet-cycle.png
|
137
|
+
- img/puppet-layout.png
|
134
138
|
- lib/opskeleton.rb
|
135
139
|
- lib/opskeleton/bump.rb
|
136
140
|
- lib/opskeleton/clean.rb
|
@@ -160,6 +164,7 @@ files:
|
|
160
164
|
- templates/chef/ubuntu_docker.erb
|
161
165
|
- templates/chef/vagrant.erb
|
162
166
|
- templates/clean.yaml
|
167
|
+
- templates/docker_build.erb
|
163
168
|
- templates/gitignore
|
164
169
|
- templates/hiera.yaml
|
165
170
|
- templates/hiera_vagrant.yaml
|
@@ -171,6 +176,7 @@ files:
|
|
171
176
|
- templates/puppet/Rakefile
|
172
177
|
- templates/puppet/boot.sh
|
173
178
|
- templates/puppet/default.erb
|
179
|
+
- templates/puppet/docker/ubuntu_docker.erb
|
174
180
|
- templates/puppet/gemfile
|
175
181
|
- templates/puppet/opsk.yaml
|
176
182
|
- templates/puppet/run.sh
|