corl 0.5.6 → 0.5.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 +4 -4
- data/.gitignore +10 -1
- data/Gemfile +1 -0
- data/Gemfile.lock +4 -0
- data/README.rdoc +125 -517
- data/Rakefile +57 -0
- data/VERSION +1 -1
- data/bootstrap/os/ubuntu/00_base.sh +10 -7
- data/bootstrap/os/ubuntu/05_ruby.sh +4 -4
- data/corl.gemspec +32 -5
- data/info/AUTOMATION.rdoc +5 -0
- data/info/INSTALLATION.rdoc +163 -0
- data/info/PACKAGING.rdoc +171 -0
- data/info/PLUGINS.rdoc +57 -0
- data/info/TODO.rdoc +27 -0
- data/lib/CORL/configuration/file.rb +2 -2
- data/lib/CORL/machine/docker.rb +327 -0
- data/lib/CORL/machine/vagrant.rb +142 -107
- data/lib/CORL/node/docker.rb +269 -0
- data/lib/CORL/node/vagrant.rb +23 -0
- data/lib/CORL/provisioner/puppetnode.rb +52 -27
- data/lib/core/facade.rb +36 -34
- data/lib/core/mixin/builder.rb +44 -44
- data/lib/core/mixin/machine/ssh.rb +34 -34
- data/lib/core/mod/vagrant.rb +32 -0
- data/lib/core/plugin/cloud_action.rb +1 -1
- data/lib/core/plugin/machine.rb +85 -85
- data/lib/core/plugin/network.rb +23 -9
- data/lib/core/plugin/node.rb +10 -7
- data/lib/core/plugin/provisioner.rb +3 -3
- data/lib/core/vagrant/action.rb +15 -13
- data/lib/core/vagrant/actions/include_overrides.rb +17 -0
- data/lib/core/vagrant/actions/init_keys.rb +9 -5
- data/lib/core/vagrant/commands/launcher.rb +1 -1
- data/lib/core/vagrant/config.rb +343 -143
- data/lib/core/vagrant/plugins.rb +14 -14
- data/lib/corl.rb +3 -7
- data/lib/nucleon/action/node/provision.rb +15 -4
- data/lib/nucleon/action/node/seed.rb +2 -2
- data/lib/nucleon/extension/vagrant.rb +30 -0
- data/locales/en.yml +5 -0
- data/rdoc/site/0.5.7/README.rdoc +595 -0
- data/rdoc/site/0.5.7/info/AUTOMATION.rdoc +382 -0
- data/rdoc/site/0.5.7/info/INSTALLATION.rdoc +543 -0
- data/rdoc/site/0.5.7/info/PACKAGES.rdoc +556 -0
- data/rdoc/site/0.5.7/info/PACKAGING.rdoc +563 -0
- data/rdoc/site/0.5.7/info/PLUGINS.rdoc +534 -0
- data/rdoc/site/0.5.7/info/TODO.rdoc +412 -0
- data/tmp/README.rdoc +217 -0
- data/tmp/info/AUTOMATION.rdoc +6 -0
- data/tmp/info/INSTALLATION.rdoc +158 -0
- data/tmp/info/PACKAGES.rdoc +177 -0
- data/tmp/info/PACKAGING.rdoc +184 -0
- data/tmp/info/PLUGINS.rdoc +129 -0
- data/tmp/info/README.rdoc +217 -0
- data/tmp/info/TODO.rdoc +36 -0
- metadata +41 -3
- data/TODO.rdoc +0 -12
@@ -0,0 +1,158 @@
|
|
1
|
+
<!DOCTYPE html><html lang='en' class=''><head><title>Test Github markup</title><link href="https://assets-cdn.github.com/assets/github-07ee5f9b28252daadba7750d43951602b35cdaa9dc19b5aff2eececebd6b6627.css" media="all" rel="stylesheet" type="text/css" /><link href="https://assets-cdn.github.com/assets/github2-13950c15da59f6c02f99ce11c07b93342a063458ce7ab72e243013dd9729008e.css" media="all" rel="stylesheet" type="text/css" /></head><body style='padding: 30px'><div class='site' itemscope itemtype='http://schema.org/WebPage'><article class='markdown-body entry-content' itemprop='mainContentOfPage'>
|
2
|
+
<h1 id="label-CORL+installation">CORL installation</h1>
|
3
|
+
|
4
|
+
<h2 id="label-Requirements">Requirements</h2>
|
5
|
+
|
6
|
+
<p>CORL and Nucleon are available as Ruby Gems, which can easily be included
|
7
|
+
in other projects. They are ultimately destined for compatibility with any
|
8
|
+
Linux, Mac, and Windows machines, but due to early development resource
|
9
|
+
limitations we started with what we use internally.</p>
|
10
|
+
|
11
|
+
<p>This means they have currently been tested on:</p>
|
12
|
+
|
13
|
+
<pre>Ubuntu (12.04 / 14.04)
|
14
|
+
Ruby versions from 1.8 to 2.1 (>= 1.9 highly recommended due to ordered hash capabilities)</pre>
|
15
|
+
|
16
|
+
<p>For information on the various ways to install Ruby, see the <a
|
17
|
+
href="https://www.ruby-lang.org/en/documentation/installation">Ruby
|
18
|
+
installation instructions</a>. We highly recommend <a
|
19
|
+
href="https://rvm.io">RVM</a>.</p>
|
20
|
+
|
21
|
+
<p>If using the Git or Github project plugin providers, Git will need to be
|
22
|
+
installed on the system and accessible in the execution search path. See
|
23
|
+
the <a href="http://git-scm.com/downloads">Git home</a> for more
|
24
|
+
information.</p>
|
25
|
+
|
26
|
+
<h2 id="label-Vagrant+development+environment">Vagrant development environment</h2>
|
27
|
+
|
28
|
+
<p>The easiest way to get up and running with CORL from a number of operating
|
29
|
+
systems is to use <a href="http://vagrantup.com">Vagrant</a>. Included in
|
30
|
+
this repository is a Vagrantfile that can launch a Virtualbox VM or Docker
|
31
|
+
container that installs CORL on an Ubuntu base image. Make sure that
|
32
|
+
Vagrant (> 1.6.5) is installed on your system and fetch the CORL
|
33
|
+
project into a local directory.</p>
|
34
|
+
|
35
|
+
<pre>git clone -b 0.5 https://github.com/coralnexus/corl.git {corl/dev/path}
|
36
|
+
cd {corl/dev/path}
|
37
|
+
git submodule update --init --recursive</pre>
|
38
|
+
|
39
|
+
<p>To launch CORL in a local Virtualbox machine:</p>
|
40
|
+
|
41
|
+
<pre>vagrant up corl</pre>
|
42
|
+
|
43
|
+
<p>To launch CORL in a local Docker container you must be running a Docker
|
44
|
+
supported Linux version and have the Docker server running on the local
|
45
|
+
host.</p>
|
46
|
+
|
47
|
+
<pre>vagrant up corl_linux</pre>
|
48
|
+
|
49
|
+
<p>The CORL bootstrap process will initialize the operating environment and
|
50
|
+
install CORL onto the VM or container.</p>
|
51
|
+
|
52
|
+
<pre>vagrant ssh corl | corl_linux
|
53
|
+
# Play around...</pre>
|
54
|
+
|
55
|
+
<p>When your done:</p>
|
56
|
+
|
57
|
+
<pre>vagrant destroy --force</pre>
|
58
|
+
|
59
|
+
<p>Three directories are shared with the VM/container to make development and
|
60
|
+
testing easier.</p>
|
61
|
+
|
62
|
+
<pre>{corl repo}/share/network -> /var/corl # Two way share of root level network project
|
63
|
+
{corl repo}/share/home -> /home/vagrant # One way RSync push to home (no delete)
|
64
|
+
{corl repo} -> {remote gem path} # One way RSync push to the remote CORL gem code</pre>
|
65
|
+
|
66
|
+
<h2 id="label-Automated+bootstrap+%28for+images%29">Automated bootstrap (for images)</h2>
|
67
|
+
|
68
|
+
<p>If you are installing CORL outside of Vagrant, we provide an internal CORL
|
69
|
+
bootstrap script package that automates the installation (currently on
|
70
|
+
Ubuntu only).</p>
|
71
|
+
|
72
|
+
<p>See the <a href="https://github.com/coralnexus/corl-bootstrap">CORL
|
73
|
+
bootstrap project on GitHub</a> to review the installation process and
|
74
|
+
dependencies in our automated Ubuntu installation scripts.</p>
|
75
|
+
|
76
|
+
<p>Here is an example CORL install script (<strong>for Ubuntu</strong>)</p>
|
77
|
+
|
78
|
+
<pre>#!/bin/bash
|
79
|
+
#-----------------------------------------------------------------------------
|
80
|
+
echo "1. Initializing Git"
|
81
|
+
apt-get -y install git || exit 1
|
82
|
+
|
83
|
+
echo "2. Fetching CORL bootstrap source repository"
|
84
|
+
rm -Rf /tmp/corl-bootstrap
|
85
|
+
git clone https://github.com/coralnexus/corl-bootstrap.git /tmp/corl-bootstrap >/tmp/corl.bootstrap.log 2>&1 || exit 2
|
86
|
+
cd /tmp/corl-bootstrap
|
87
|
+
git submodule update --init --recursive >>/tmp/corl.bootstrap.log 2>&1 || exit 3
|
88
|
+
|
89
|
+
echo "3. Executing CORL bootstrap process..."
|
90
|
+
chmod 755 /tmp/corl-bootstrap/bootstrap.sh
|
91
|
+
sudo /tmp/corl-bootstrap/bootstrap.sh || exit $?</pre>
|
92
|
+
|
93
|
+
<h2 id="label-Manual+installation">Manual installation</h2>
|
94
|
+
|
95
|
+
<p><strong>As a standalone system</strong></p>
|
96
|
+
|
97
|
+
<pre>$> gem install corl # add sudo if not running RVM
|
98
|
+
$> corl -h</pre>
|
99
|
+
|
100
|
+
<p><strong>As a Vagrant plugin</strong></p>
|
101
|
+
|
102
|
+
<pre>$> vagrant plugin install corl
|
103
|
+
$> vagrant corl -h</pre>
|
104
|
+
|
105
|
+
<p><strong>For Ruby applications</strong>, include in your <a
|
106
|
+
href="http://bundler.io/gemfile.html">Gemfile</a>:</p>
|
107
|
+
|
108
|
+
<pre>gem "corl", "~> 0.5"</pre>
|
109
|
+
|
110
|
+
<h2 id="label-Checking+loaded+plugins+and+providers">Checking loaded plugins and providers</h2>
|
111
|
+
|
112
|
+
<pre>$> corl plugins</pre>
|
113
|
+
|
114
|
+
<h2 id="label-API+keys">API keys</h2>
|
115
|
+
|
116
|
+
<p>CORL encapsulates everything needed to manage networks as pluggable version
|
117
|
+
controlled projects, except API keys and remote service authorizations.</p>
|
118
|
+
|
119
|
+
<p><strong>IMPORTANT</strong>: For security reasons cloud service provider API
|
120
|
+
keys are not, and should not be, versioned!</p>
|
121
|
+
|
122
|
+
<p>Valid API keys are required to connect to network servers through the CORL
|
123
|
+
system. We recommend storing your various API keys in an encrypted archive
|
124
|
+
and locking down SSH access, as API keys are transferred to the root of new
|
125
|
+
network nodes to allow for service oriented operations from that node.</p>
|
126
|
+
|
127
|
+
<p>In CORL core, as of January 2015, there are two kinds of API keys used:</p>
|
128
|
+
|
129
|
+
<p><strong>Cloud service providers</strong>:</p>
|
130
|
+
|
131
|
+
<pre>Rackspace
|
132
|
+
Amazon
|
133
|
+
Google (in the works)</pre>
|
134
|
+
|
135
|
+
<p><strong>Project hosting providers</strong>:</p>
|
136
|
+
|
137
|
+
<pre>GitHub</pre>
|
138
|
+
|
139
|
+
<p>Create a <strong>~/.fog</strong> file with cloud service keys**</p>
|
140
|
+
|
141
|
+
<pre>default:
|
142
|
+
rackspace_username: {username}
|
143
|
+
rackspace_api_key: {api_key}
|
144
|
+
aws_access_key_id: {key_id}
|
145
|
+
aws_secret_access_key: {secret_access_key}</pre>
|
146
|
+
|
147
|
+
<p>Create a <strong>~/.netrc</strong> file**</p>
|
148
|
+
|
149
|
+
<pre>machine api.github.com
|
150
|
+
login {github_username}
|
151
|
+
password {api_key}</pre>
|
152
|
+
|
153
|
+
<p>** An upcoming stable release will merge these two into a single
|
154
|
+
authorisation file.</p>
|
155
|
+
<hr style="height: 1px">
|
156
|
+
|
157
|
+
<p><a href="README.rdoc">Click here to return to the README</a></p>
|
158
|
+
</article></div></body></html>
|
@@ -0,0 +1,177 @@
|
|
1
|
+
<!DOCTYPE html><html lang='en' class=''><head><title>Test Github markup</title><link href="https://assets-cdn.github.com/assets/github-07ee5f9b28252daadba7750d43951602b35cdaa9dc19b5aff2eececebd6b6627.css" media="all" rel="stylesheet" type="text/css" /><link href="https://assets-cdn.github.com/assets/github2-13950c15da59f6c02f99ce11c07b93342a063458ce7ab72e243013dd9729008e.css" media="all" rel="stylesheet" type="text/css" /></head><body style='padding: 30px'><div class='site' itemscope itemtype='http://schema.org/WebPage'><article class='markdown-body entry-content' itemprop='mainContentOfPage'>
|
2
|
+
<h1 id="label-CORL+packaging+system">CORL packaging system</h1>
|
3
|
+
|
4
|
+
<p>CORL provides a middle layer between configuration management tools like
|
5
|
+
Puppet and automation systems and processes. CORL can be extended in
|
6
|
+
individual projects and easily merge libraries of bundled plugin
|
7
|
+
interfaces and providers.</p>
|
8
|
+
|
9
|
+
<h4 id="label-Networks">Networks</h4>
|
10
|
+
|
11
|
+
<p>At the very top level in CORL there is a network project. Think of it as a
|
12
|
+
parent container for everything necessary to grow a network of machines.
|
13
|
+
By default the network is a shared Git repository but the project
|
14
|
+
interface is pluggable for individual needs.</p>
|
15
|
+
|
16
|
+
<p>Networks bundle:</p>
|
17
|
+
<ul><li>
|
18
|
+
<p>Network and node group settings</p>
|
19
|
+
</li><li>
|
20
|
+
<p>Contexual configurations</p>
|
21
|
+
</li><li>
|
22
|
+
<p>Build definitions (packages, identities, projects, etc…)</p>
|
23
|
+
</li><li>
|
24
|
+
<p>Node data objects</p>
|
25
|
+
</li><li>
|
26
|
+
<p>Shared authentication information</p>
|
27
|
+
</li><li>
|
28
|
+
<p>CORL plugin interface implementations</p>
|
29
|
+
</li><li>
|
30
|
+
<p>Any other shared files</p>
|
31
|
+
</li></ul>
|
32
|
+
|
33
|
+
<p>To see an example of a network project, <a
|
34
|
+
href="https://github.com/coralnexus/network-template">checkout our starter
|
35
|
+
template</a>.</p>
|
36
|
+
|
37
|
+
<h4 id="label-Packages">Packages</h4>
|
38
|
+
|
39
|
+
<p>Packages are revision controlled projects (Git) that contain reusable
|
40
|
+
infrastructure components. Packages are like lego blocks and can be
|
41
|
+
derived from combinations of other packages.</p>
|
42
|
+
|
43
|
+
<p><img
|
44
|
+
src="https://raw.githubusercontent.com/coralnexus/corl/0.5/images/package.png"
|
45
|
+
/></p>
|
46
|
+
|
47
|
+
<p>Packages define a corl.{json|yaml} file in the root directory that contains
|
48
|
+
build directives targeted at various environments, like development,
|
49
|
+
staging, qa, and production. We internally lock qa and production build
|
50
|
+
revisions so we get standardized environments.</p>
|
51
|
+
|
52
|
+
<p>Packages bundle:</p>
|
53
|
+
<ul><li>
|
54
|
+
<p>Build definitions (packages, provisioner modules, projects, identities,
|
55
|
+
etc…)</p>
|
56
|
+
</li><li>
|
57
|
+
<p>Default configurations (Puppet by default)</p>
|
58
|
+
</li><li>
|
59
|
+
<p>Provisioner gateways (Puppet by default)</p>
|
60
|
+
</li><li>
|
61
|
+
<p>Provisioner profiles (Puppet by default)</p>
|
62
|
+
</li></ul>
|
63
|
+
|
64
|
+
<p>Example build directive: (tracks <strong>master</strong> by default)</p>
|
65
|
+
|
66
|
+
<p>> {package directory}/<strong>corl.json</strong></p>
|
67
|
+
|
68
|
+
<pre>{
|
69
|
+
"builders": {
|
70
|
+
"package": {
|
71
|
+
"environment": {
|
72
|
+
"production": {
|
73
|
+
"coralnexus__core": "github:::coralnexus/corl-package-core[04eaa0f855c7824c58d43f0dd7b1370fa16157d6]"
|
74
|
+
},
|
75
|
+
"qa": {
|
76
|
+
"use": "production"
|
77
|
+
},
|
78
|
+
"default": {
|
79
|
+
"coralnexus__core": "github:::coralnexus/corl-package-core"
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}</pre>
|
85
|
+
|
86
|
+
<p>This directive basically defines a dependency on the coralnexus core
|
87
|
+
package so that when this package is built on a system and profiles are
|
88
|
+
loaded the dependency and it's profiles are loaded first. Different
|
89
|
+
environments can track different branches of the same projects or include
|
90
|
+
different projects based on the state of the environment. Above we just
|
91
|
+
lock in a constant revision when in a production or QA environment.</p>
|
92
|
+
|
93
|
+
<p>Example Puppet node profile: (Varnish proxy server)</p>
|
94
|
+
|
95
|
+
<p>> {package directory}/<strong>profiles/varnish_server.pp</strong></p>
|
96
|
+
|
97
|
+
<pre class="ruby"><span class="ruby-keyword">class</span> <span class="ruby-identifier">vendor_name</span><span class="ruby-operator">::</span><span class="ruby-identifier">package_namespace</span><span class="ruby-operator">::</span><span class="ruby-identifier">profile</span><span class="ruby-operator">::</span><span class="ruby-identifier">varnish_server</span> {
|
98
|
+
<span class="ruby-identifier">$base_name</span> = <span class="ruby-string">'coralnexus_varnish_server'</span>
|
99
|
+
<span class="ruby-identifier">anchor</span> { <span class="ruby-identifier">$base_name</span><span class="ruby-operator">:</span> }
|
100
|
+
<span class="ruby-comment">#---------------------------------------------------------------------------</span>
|
101
|
+
<span class="ruby-comment"># Required systems</span>
|
102
|
+
<span class="ruby-identifier">class</span> { <span class="ruby-string">'varnish'</span><span class="ruby-operator">:</span> <span class="ruby-identifier">require</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Anchor</span>[<span class="ruby-identifier">$base_name</span>] }
|
103
|
+
<span class="ruby-identifier">class</span> { <span class="ruby-string">'varnish::vcl'</span><span class="ruby-operator">:</span> <span class="ruby-identifier">require</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Class</span>[<span class="ruby-string">'varnish'</span>] }
|
104
|
+
<span class="ruby-comment">#---------------------------------------------------------------------------</span>
|
105
|
+
<span class="ruby-comment"># Optional systems</span>
|
106
|
+
<span class="ruby-identifier">corl</span><span class="ruby-operator">::</span><span class="ruby-identifier">include</span> { <span class="ruby-string">'varnish_server_classes'</span><span class="ruby-operator">:</span> <span class="ruby-identifier">require</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Class</span>[<span class="ruby-string">'varnish::vcl'</span>] }
|
107
|
+
<span class="ruby-comment">#---------------------------------------------------------------------------</span>
|
108
|
+
<span class="ruby-comment"># Resources</span>
|
109
|
+
<span class="ruby-identifier">corl_resources</span>(<span class="ruby-string">'varnish::acl'</span>, <span class="ruby-string">'varnish_server::acl'</span>, <span class="ruby-string">'varnish_server::acl_defaults'</span>)
|
110
|
+
<span class="ruby-identifier">corl_resources</span>(<span class="ruby-string">'varnish::probe'</span>, <span class="ruby-string">'varnish_server::probe'</span>, <span class="ruby-string">'varnish_server::probe_defaults'</span>)
|
111
|
+
<span class="ruby-identifier">corl_resources</span>(<span class="ruby-string">'varnish::backend'</span>, <span class="ruby-string">'varnish_server::backend'</span>, <span class="ruby-string">'varnish_server::backend_defaults'</span>)
|
112
|
+
<span class="ruby-identifier">corl_resources</span>(<span class="ruby-string">'varnish::director'</span>, <span class="ruby-string">'varnish_server::director'</span>, <span class="ruby-string">'varnish_server::director_defaults'</span>)
|
113
|
+
<span class="ruby-identifier">corl_resources</span>(<span class="ruby-string">'varnish::selector'</span>, <span class="ruby-string">'varnish_server::selector'</span>, <span class="ruby-string">'varnish_server::selector_defaults'</span>)
|
114
|
+
}
|
115
|
+
</pre>
|
116
|
+
|
117
|
+
<p>Example provisioner directive: (tracks <strong>master</strong> by default)</p>
|
118
|
+
|
119
|
+
<p>> {package directory}/<strong>corl.json</strong></p>
|
120
|
+
|
121
|
+
<pre>{
|
122
|
+
"provisioners": {
|
123
|
+
"puppetnode": {
|
124
|
+
"vendor_name::package_namespace": {
|
125
|
+
"varnish_server": {
|
126
|
+
"environment": {
|
127
|
+
"production": {
|
128
|
+
"modules": {
|
129
|
+
"varnish": "github:::maxchk/puppet-varnish[b9846d1b35e87a45c98213fddfe71fa0a6f3b31c]",
|
130
|
+
"varnish_drupal": "github:::coralnexus/puppet-varnish_drupal[b1f8ecd9be5144d642d7717429a3652234b5f0d9]"
|
131
|
+
}
|
132
|
+
},
|
133
|
+
"qa": {
|
134
|
+
"use": "production"
|
135
|
+
},
|
136
|
+
"default": {
|
137
|
+
"modules": {
|
138
|
+
"varnish": "github:::maxchk/puppet-varnish[develop]",
|
139
|
+
"varnish_drupal": "github:::coralnexus/puppet-varnish_drupal"
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
}</pre>
|
148
|
+
|
149
|
+
<p>The above provisioner directive tells CORL to</p>
|
150
|
+
|
151
|
+
<p>To see an example of a package, <a
|
152
|
+
href="https://github.com/coralnexus/network-template">checkout our core
|
153
|
+
package</a>.</p>
|
154
|
+
|
155
|
+
<h4 id="label-Profiles">Profiles</h4>
|
156
|
+
|
157
|
+
<p>Node profiles are packaged systems and default configurations meant to run
|
158
|
+
as standalone server images or combined to create meta server images. The
|
159
|
+
CORL provisioner plugin defines an interface for creating, linking, and
|
160
|
+
provisioning profiles. Currently only Puppet is supported, but more
|
161
|
+
provisioners are on the way in the future.</p>
|
162
|
+
|
163
|
+
<p><img
|
164
|
+
src="https://raw.githubusercontent.com/coralnexus/corl/0.5/images/profile.png"
|
165
|
+
/></p>
|
166
|
+
|
167
|
+
<p>Profiles are created in the native file format of the configuration
|
168
|
+
management system being used. For instance in our default Puppetnode
|
169
|
+
provisioner</p>
|
170
|
+
|
171
|
+
<p><img
|
172
|
+
src="https://raw.githubusercontent.com/coralnexus/corl/0.5/images/example-network-architecture.png"
|
173
|
+
/></p>
|
174
|
+
<hr style="height: 1px">
|
175
|
+
|
176
|
+
<p><a href="README.rdoc">Click here to return to the README</a></p>
|
177
|
+
</article></div></body></html>
|
@@ -0,0 +1,184 @@
|
|
1
|
+
<!DOCTYPE html><html lang='en' class=''><head><title>Test Github markup</title><link href="https://assets-cdn.github.com/assets/github-07ee5f9b28252daadba7750d43951602b35cdaa9dc19b5aff2eececebd6b6627.css" media="all" rel="stylesheet" type="text/css" /><link href="https://assets-cdn.github.com/assets/github2-13950c15da59f6c02f99ce11c07b93342a063458ce7ab72e243013dd9729008e.css" media="all" rel="stylesheet" type="text/css" /></head><body style='padding: 30px'><div class='site' itemscope itemtype='http://schema.org/WebPage'><article class='markdown-body entry-content' itemprop='mainContentOfPage'>
|
2
|
+
<h1 id="label-CORL+packaging+system">CORL packaging system</h1>
|
3
|
+
|
4
|
+
<p>CORL provides a middle layer between configuration management tools like
|
5
|
+
Puppet and automation systems and processes. CORL can be extended in
|
6
|
+
individual projects and easily merge libraries of bundled plugin
|
7
|
+
interfaces and providers.</p>
|
8
|
+
|
9
|
+
<h4 id="label-Networks">Networks</h4>
|
10
|
+
|
11
|
+
<p>At the very top level in CORL there is a network project. Think of it as a
|
12
|
+
parent container for everything necessary to grow a network of machines.
|
13
|
+
By default the network is a shared Git repository but the project
|
14
|
+
interface is pluggable for individual needs.</p>
|
15
|
+
|
16
|
+
<p>The default plugin implementation of the CORL network maintains the
|
17
|
+
following project directory structure.</p>
|
18
|
+
|
19
|
+
<pre>{network project directory}
|
20
|
+
|-> config # Contextually searched provisioner configurations
|
21
|
+
|-></pre>
|
22
|
+
|
23
|
+
<p>Networks bundle:</p>
|
24
|
+
<ul><li>
|
25
|
+
<p>Network and node group settings</p>
|
26
|
+
</li><li>
|
27
|
+
<p>Contexual configurations</p>
|
28
|
+
</li><li>
|
29
|
+
<p>Build definitions (packages, identities, projects, etc…)</p>
|
30
|
+
</li><li>
|
31
|
+
<p>Node data objects</p>
|
32
|
+
</li><li>
|
33
|
+
<p>Shared authentication information</p>
|
34
|
+
</li><li>
|
35
|
+
<p>CORL plugin interface implementations</p>
|
36
|
+
</li><li>
|
37
|
+
<p>Any other shared files</p>
|
38
|
+
</li></ul>
|
39
|
+
|
40
|
+
<p>To see an example of a network project, <a
|
41
|
+
href="https://github.com/coralnexus/network-template">checkout our starter
|
42
|
+
template</a>.</p>
|
43
|
+
|
44
|
+
<h4 id="label-Packages">Packages</h4>
|
45
|
+
|
46
|
+
<p>Packages are revision controlled projects (Git) that contain reusable
|
47
|
+
infrastructure components. Packages are like lego blocks and can be
|
48
|
+
derived from combinations of other packages.</p>
|
49
|
+
|
50
|
+
<p><img
|
51
|
+
src="https://raw.githubusercontent.com/coralnexus/corl/0.5/images/package.png"
|
52
|
+
/></p>
|
53
|
+
|
54
|
+
<p>Packages define a corl.{json|yaml} file in the root directory that contains
|
55
|
+
build directives targeted at various environments, like development,
|
56
|
+
staging, qa, and production. We internally lock qa and production build
|
57
|
+
revisions so we get standardized environments.</p>
|
58
|
+
|
59
|
+
<p>Packages bundle:</p>
|
60
|
+
<ul><li>
|
61
|
+
<p>Build definitions (packages, provisioner modules, projects, identities,
|
62
|
+
etc…)</p>
|
63
|
+
</li><li>
|
64
|
+
<p>Default configurations (Puppet by default)</p>
|
65
|
+
</li><li>
|
66
|
+
<p>Provisioner gateways (Puppet by default)</p>
|
67
|
+
</li><li>
|
68
|
+
<p>Provisioner profiles (Puppet by default)</p>
|
69
|
+
</li></ul>
|
70
|
+
|
71
|
+
<p>Example build directive: (tracks <strong>master</strong> by default)</p>
|
72
|
+
|
73
|
+
<p>> {package directory}/<strong>corl.json</strong></p>
|
74
|
+
|
75
|
+
<pre>{
|
76
|
+
"builders": {
|
77
|
+
"package": {
|
78
|
+
"environment": {
|
79
|
+
"production": {
|
80
|
+
"coralnexus__core": "github:::coralnexus/corl-package-core[04eaa0f855c7824c58d43f0dd7b1370fa16157d6]"
|
81
|
+
},
|
82
|
+
"qa": {
|
83
|
+
"use": "production"
|
84
|
+
},
|
85
|
+
"default": {
|
86
|
+
"coralnexus__core": "github:::coralnexus/corl-package-core"
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}</pre>
|
92
|
+
|
93
|
+
<p>This directive basically defines a dependency on the coralnexus core
|
94
|
+
package so that when this package is built on a system and profiles are
|
95
|
+
loaded the dependency and it's profiles are loaded first. Different
|
96
|
+
environments can track different branches of the same projects or include
|
97
|
+
different projects based on the state of the environment. Above we just
|
98
|
+
lock in a constant revision when in a production or QA environment.</p>
|
99
|
+
|
100
|
+
<p>Example Puppet node profile: (Varnish proxy server)</p>
|
101
|
+
|
102
|
+
<p>> {package directory}/<strong>profiles/varnish_server.pp</strong></p>
|
103
|
+
|
104
|
+
<pre class="ruby"><span class="ruby-keyword">class</span> <span class="ruby-identifier">vendor_name</span><span class="ruby-operator">::</span><span class="ruby-identifier">package_namespace</span><span class="ruby-operator">::</span><span class="ruby-identifier">profile</span><span class="ruby-operator">::</span><span class="ruby-identifier">varnish_server</span> {
|
105
|
+
<span class="ruby-identifier">$base_name</span> = <span class="ruby-string">'coralnexus_varnish_server'</span>
|
106
|
+
<span class="ruby-identifier">anchor</span> { <span class="ruby-identifier">$base_name</span><span class="ruby-operator">:</span> }
|
107
|
+
<span class="ruby-comment">#---------------------------------------------------------------------------</span>
|
108
|
+
<span class="ruby-comment"># Required systems</span>
|
109
|
+
<span class="ruby-identifier">class</span> { <span class="ruby-string">'varnish'</span><span class="ruby-operator">:</span> <span class="ruby-identifier">require</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Anchor</span>[<span class="ruby-identifier">$base_name</span>] }
|
110
|
+
<span class="ruby-identifier">class</span> { <span class="ruby-string">'varnish::vcl'</span><span class="ruby-operator">:</span> <span class="ruby-identifier">require</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Class</span>[<span class="ruby-string">'varnish'</span>] }
|
111
|
+
<span class="ruby-comment">#---------------------------------------------------------------------------</span>
|
112
|
+
<span class="ruby-comment"># Optional systems</span>
|
113
|
+
<span class="ruby-identifier">corl</span><span class="ruby-operator">::</span><span class="ruby-identifier">include</span> { <span class="ruby-string">'varnish_server_classes'</span><span class="ruby-operator">:</span> <span class="ruby-identifier">require</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Class</span>[<span class="ruby-string">'varnish::vcl'</span>] }
|
114
|
+
<span class="ruby-comment">#---------------------------------------------------------------------------</span>
|
115
|
+
<span class="ruby-comment"># Resources</span>
|
116
|
+
<span class="ruby-identifier">corl_resources</span>(<span class="ruby-string">'varnish::acl'</span>, <span class="ruby-string">'varnish_server::acl'</span>, <span class="ruby-string">'varnish_server::acl_defaults'</span>)
|
117
|
+
<span class="ruby-identifier">corl_resources</span>(<span class="ruby-string">'varnish::probe'</span>, <span class="ruby-string">'varnish_server::probe'</span>, <span class="ruby-string">'varnish_server::probe_defaults'</span>)
|
118
|
+
<span class="ruby-identifier">corl_resources</span>(<span class="ruby-string">'varnish::backend'</span>, <span class="ruby-string">'varnish_server::backend'</span>, <span class="ruby-string">'varnish_server::backend_defaults'</span>)
|
119
|
+
<span class="ruby-identifier">corl_resources</span>(<span class="ruby-string">'varnish::director'</span>, <span class="ruby-string">'varnish_server::director'</span>, <span class="ruby-string">'varnish_server::director_defaults'</span>)
|
120
|
+
<span class="ruby-identifier">corl_resources</span>(<span class="ruby-string">'varnish::selector'</span>, <span class="ruby-string">'varnish_server::selector'</span>, <span class="ruby-string">'varnish_server::selector_defaults'</span>)
|
121
|
+
}
|
122
|
+
</pre>
|
123
|
+
|
124
|
+
<p>Example provisioner directive: (tracks <strong>master</strong> by default)</p>
|
125
|
+
|
126
|
+
<p>> {package directory}/<strong>corl.json</strong></p>
|
127
|
+
|
128
|
+
<pre>{
|
129
|
+
"provisioners": {
|
130
|
+
"puppetnode": {
|
131
|
+
"vendor_name::package_namespace": {
|
132
|
+
"varnish_server": {
|
133
|
+
"environment": {
|
134
|
+
"production": {
|
135
|
+
"modules": {
|
136
|
+
"varnish": "github:::maxchk/puppet-varnish[b9846d1b35e87a45c98213fddfe71fa0a6f3b31c]",
|
137
|
+
"varnish_drupal": "github:::coralnexus/puppet-varnish_drupal[b1f8ecd9be5144d642d7717429a3652234b5f0d9]"
|
138
|
+
}
|
139
|
+
},
|
140
|
+
"qa": {
|
141
|
+
"use": "production"
|
142
|
+
},
|
143
|
+
"default": {
|
144
|
+
"modules": {
|
145
|
+
"varnish": "github:::maxchk/puppet-varnish[develop]",
|
146
|
+
"varnish_drupal": "github:::coralnexus/puppet-varnish_drupal"
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
}</pre>
|
155
|
+
|
156
|
+
<p>The above provisioner directive tells CORL to</p>
|
157
|
+
|
158
|
+
<p>To see an example of a package, <a
|
159
|
+
href="https://github.com/coralnexus/network-template">checkout our core
|
160
|
+
package</a>.</p>
|
161
|
+
|
162
|
+
<h4 id="label-Profiles">Profiles</h4>
|
163
|
+
|
164
|
+
<p>Node profiles are packaged systems and default configurations meant to run
|
165
|
+
as standalone server images or combined to create meta server images. The
|
166
|
+
CORL provisioner plugin defines an interface for creating, linking, and
|
167
|
+
provisioning profiles. Currently only Puppet is supported, but more
|
168
|
+
provisioners are on the way in the future.</p>
|
169
|
+
|
170
|
+
<p><img
|
171
|
+
src="https://raw.githubusercontent.com/coralnexus/corl/0.5/images/profile.png"
|
172
|
+
/></p>
|
173
|
+
|
174
|
+
<p>Profiles are created in the native file format of the configuration
|
175
|
+
management system being used. For instance in our default Puppetnode
|
176
|
+
provisioner</p>
|
177
|
+
|
178
|
+
<p><img
|
179
|
+
src="https://raw.githubusercontent.com/coralnexus/corl/0.5/images/example-network-architecture.png"
|
180
|
+
/></p>
|
181
|
+
<hr style="height: 1px">
|
182
|
+
|
183
|
+
<p><a href="README.rdoc">Click here to return to the README</a></p>
|
184
|
+
</article></div></body></html>
|
@@ -0,0 +1,129 @@
|
|
1
|
+
<!DOCTYPE html><html lang='en' class=''><head><title>Test Github markup</title><link href="https://assets-cdn.github.com/assets/github-07ee5f9b28252daadba7750d43951602b35cdaa9dc19b5aff2eececebd6b6627.css" media="all" rel="stylesheet" type="text/css" /><link href="https://assets-cdn.github.com/assets/github2-13950c15da59f6c02f99ce11c07b93342a063458ce7ab72e243013dd9729008e.css" media="all" rel="stylesheet" type="text/css" /></head><body style='padding: 30px'><div class='site' itemscope itemtype='http://schema.org/WebPage'><article class='markdown-body entry-content' itemprop='mainContentOfPage'>
|
2
|
+
<h1 id="label-CORL+supported+plugin+types+and+providers">CORL supported plugin types and providers</h1>
|
3
|
+
|
4
|
+
<p>The CORL framework implements pluggable interfaces, designed to grow in the
|
5
|
+
future, but we have only implemented providers for technologies and
|
6
|
+
services we use currently.</p>
|
7
|
+
|
8
|
+
<p>Below is a list of current plugin types and supported providers:</p>
|
9
|
+
<ul><li>
|
10
|
+
<p><strong>CORL::Plugin::Configuration</strong> - Project based configuration
|
11
|
+
pool and synchronization</p>
|
12
|
+
<ul><li>
|
13
|
+
<p><strong>CORL::Configuration::File</strong> - File based data objects (JSON
|
14
|
+
/ YAML / … files)</p>
|
15
|
+
</li></ul>
|
16
|
+
</li><li>
|
17
|
+
<p><strong>CORL::Plugin::Network</strong> - Network configuration, management,
|
18
|
+
and action implementation</p>
|
19
|
+
<ul><li>
|
20
|
+
<p><strong>CORL::Network::CORL</strong> - Default</p>
|
21
|
+
</li></ul>
|
22
|
+
</li><li>
|
23
|
+
<p><strong>CORL::Plugin::Node</strong> - Network and machine interface
|
24
|
+
configuration bridge</p>
|
25
|
+
<ul><li>
|
26
|
+
<p><strong>CORL::Node::Local</strong> - Local physical machine (registers
|
27
|
+
development machines)</p>
|
28
|
+
</li><li>
|
29
|
+
<p><strong>CORL::Node::Vagrant</strong> - Manage Vagrant development machines</p>
|
30
|
+
</li><li>
|
31
|
+
<p><strong>CORL::Node::Rackspace</strong> - Manage Rackspace compute instances</p>
|
32
|
+
</li><li>
|
33
|
+
<p><strong>CORL::Node::AWS</strong> - Manage Amazon Web Services compute
|
34
|
+
instances</p>
|
35
|
+
</li></ul>
|
36
|
+
</li><li>
|
37
|
+
<p><strong>CORL::Plugin::Machine</strong> - Machine interfaces</p>
|
38
|
+
<ul><li>
|
39
|
+
<p><strong>CORL::Machine::Physical</strong> - Physical machine interface
|
40
|
+
(limited functionality)</p>
|
41
|
+
</li><li>
|
42
|
+
<p><strong>CORL::Machine::Vagrant</strong> - Vagrant machine interface (only
|
43
|
+
<strong>virtualbox</strong> and <strong>docker</strong> providers tested)</p>
|
44
|
+
</li><li>
|
45
|
+
<p><strong>CORL::Machine::Rackspace</strong> - Rackspace compute interface</p>
|
46
|
+
</li><li>
|
47
|
+
<p><strong>CORL::Machine::AWS</strong> - Amazon Web Service compute interface</p>
|
48
|
+
</li></ul>
|
49
|
+
</li><li>
|
50
|
+
<p><strong>CORL::Plugin::Builder</strong> - Build processors</p>
|
51
|
+
<ul><li>
|
52
|
+
<p><strong>CORL::Builder::Identity</strong> - Isolated or private identity
|
53
|
+
related node configurations</p>
|
54
|
+
</li><li>
|
55
|
+
<p><strong>CORL::Builder::Package</strong> - Fetch packages connected to
|
56
|
+
network and other packages</p>
|
57
|
+
</li><li>
|
58
|
+
<p><strong>CORL::Builder::Project</strong> - Fetch version controlled projects
|
59
|
+
into system locations</p>
|
60
|
+
</li></ul>
|
61
|
+
</li><li>
|
62
|
+
<p><strong>CORL::Plugin::Provisioner</strong> - Provisioning processes that
|
63
|
+
utilize configuration management tools</p>
|
64
|
+
<ul><li>
|
65
|
+
<p><strong>CORL::Provisioner::Puppetnode</strong> - Simple (non agent) Puppet
|
66
|
+
provisioner that configures system based on group profiles</p>
|
67
|
+
</li></ul>
|
68
|
+
</li></ul>
|
69
|
+
|
70
|
+
<p>Plugin types inherited from Nucleon:</p>
|
71
|
+
<ul><li>
|
72
|
+
<p><strong>Nucleon::Plugin::Command</strong> - Shell command translators /
|
73
|
+
executors</p>
|
74
|
+
<ul><li>
|
75
|
+
<p><strong>Nucleon::Command::Bash</strong></p>
|
76
|
+
</li></ul>
|
77
|
+
</li><li>
|
78
|
+
<p><strong>Nucleon::Plugin::Event</strong> - Reusable conditional checks</p>
|
79
|
+
<ul><li>
|
80
|
+
<p><strong>Nucleon::Event::Regex</strong></p>
|
81
|
+
</li></ul>
|
82
|
+
</li><li>
|
83
|
+
<p><strong>Nucleon::Plugin::Project</strong> - Version controlled projects</p>
|
84
|
+
<ul><li>
|
85
|
+
<p><strong>Nucleon::Project::Git</strong></p>
|
86
|
+
</li><li>
|
87
|
+
<p><strong>Nucleon::Project::Github</strong> - Extends Git but adds GitHub API
|
88
|
+
support</p>
|
89
|
+
</li></ul>
|
90
|
+
</li><li>
|
91
|
+
<p><strong>Nucleon::Plugin::Template</strong> - One way data object to text
|
92
|
+
rendering</p>
|
93
|
+
<ul><li>
|
94
|
+
<p><strong>Nucleon::Template::JSON</strong></p>
|
95
|
+
</li><li>
|
96
|
+
<p><strong>Nucleon::Template::YAML</strong></p>
|
97
|
+
</li><li>
|
98
|
+
<p><strong>Nucleon::Template::Wrapper</strong> - Wraps stringified data in
|
99
|
+
prefix and suffix</p>
|
100
|
+
</li><li>
|
101
|
+
<p><strong>Nucleon::Template::Environment</strong> - Renders data object as
|
102
|
+
environment variables</p>
|
103
|
+
</li></ul>
|
104
|
+
</li><li>
|
105
|
+
<p><strong>Nucleon::Plugin::Translator</strong> - Two way data object to text
|
106
|
+
translation</p>
|
107
|
+
<ul><li>
|
108
|
+
<p><strong>Nucleon::Template::JSON</strong></p>
|
109
|
+
</li><li>
|
110
|
+
<p><strong>Nucleon::Template::YAML</strong></p>
|
111
|
+
</li></ul>
|
112
|
+
</li></ul>
|
113
|
+
|
114
|
+
<p>Action interface: (Around 42 core actions currently implemented that build
|
115
|
+
on the above plugins)</p>
|
116
|
+
<ul><li>
|
117
|
+
<p><strong>Nucleon::Plugin::Action</strong> - Portable action framework and
|
118
|
+
execution environment</p>
|
119
|
+
</li><li>
|
120
|
+
<p><strong>Nucleon::Plugin::CloudAction</strong> - Distributed actions across
|
121
|
+
a network (extends <strong>Nucleon::Plugin::Action</strong>)</p>
|
122
|
+
</li><li>
|
123
|
+
<p><strong>Nucleon::Plugin::Agent</strong> - Continuously running managed
|
124
|
+
agents (extends <strong>Nucleon::Plugin::CloudAction</strong>)</p>
|
125
|
+
</li></ul>
|
126
|
+
<hr style="height: 1px">
|
127
|
+
|
128
|
+
<p><a href="README.rdoc">Click here to return to the README</a></p>
|
129
|
+
</article></div></body></html>
|