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.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +10 -1
  3. data/Gemfile +1 -0
  4. data/Gemfile.lock +4 -0
  5. data/README.rdoc +125 -517
  6. data/Rakefile +57 -0
  7. data/VERSION +1 -1
  8. data/bootstrap/os/ubuntu/00_base.sh +10 -7
  9. data/bootstrap/os/ubuntu/05_ruby.sh +4 -4
  10. data/corl.gemspec +32 -5
  11. data/info/AUTOMATION.rdoc +5 -0
  12. data/info/INSTALLATION.rdoc +163 -0
  13. data/info/PACKAGING.rdoc +171 -0
  14. data/info/PLUGINS.rdoc +57 -0
  15. data/info/TODO.rdoc +27 -0
  16. data/lib/CORL/configuration/file.rb +2 -2
  17. data/lib/CORL/machine/docker.rb +327 -0
  18. data/lib/CORL/machine/vagrant.rb +142 -107
  19. data/lib/CORL/node/docker.rb +269 -0
  20. data/lib/CORL/node/vagrant.rb +23 -0
  21. data/lib/CORL/provisioner/puppetnode.rb +52 -27
  22. data/lib/core/facade.rb +36 -34
  23. data/lib/core/mixin/builder.rb +44 -44
  24. data/lib/core/mixin/machine/ssh.rb +34 -34
  25. data/lib/core/mod/vagrant.rb +32 -0
  26. data/lib/core/plugin/cloud_action.rb +1 -1
  27. data/lib/core/plugin/machine.rb +85 -85
  28. data/lib/core/plugin/network.rb +23 -9
  29. data/lib/core/plugin/node.rb +10 -7
  30. data/lib/core/plugin/provisioner.rb +3 -3
  31. data/lib/core/vagrant/action.rb +15 -13
  32. data/lib/core/vagrant/actions/include_overrides.rb +17 -0
  33. data/lib/core/vagrant/actions/init_keys.rb +9 -5
  34. data/lib/core/vagrant/commands/launcher.rb +1 -1
  35. data/lib/core/vagrant/config.rb +343 -143
  36. data/lib/core/vagrant/plugins.rb +14 -14
  37. data/lib/corl.rb +3 -7
  38. data/lib/nucleon/action/node/provision.rb +15 -4
  39. data/lib/nucleon/action/node/seed.rb +2 -2
  40. data/lib/nucleon/extension/vagrant.rb +30 -0
  41. data/locales/en.yml +5 -0
  42. data/rdoc/site/0.5.7/README.rdoc +595 -0
  43. data/rdoc/site/0.5.7/info/AUTOMATION.rdoc +382 -0
  44. data/rdoc/site/0.5.7/info/INSTALLATION.rdoc +543 -0
  45. data/rdoc/site/0.5.7/info/PACKAGES.rdoc +556 -0
  46. data/rdoc/site/0.5.7/info/PACKAGING.rdoc +563 -0
  47. data/rdoc/site/0.5.7/info/PLUGINS.rdoc +534 -0
  48. data/rdoc/site/0.5.7/info/TODO.rdoc +412 -0
  49. data/tmp/README.rdoc +217 -0
  50. data/tmp/info/AUTOMATION.rdoc +6 -0
  51. data/tmp/info/INSTALLATION.rdoc +158 -0
  52. data/tmp/info/PACKAGES.rdoc +177 -0
  53. data/tmp/info/PACKAGING.rdoc +184 -0
  54. data/tmp/info/PLUGINS.rdoc +129 -0
  55. data/tmp/info/README.rdoc +217 -0
  56. data/tmp/info/TODO.rdoc +36 -0
  57. metadata +41 -3
  58. data/TODO.rdoc +0 -12
data/Rakefile CHANGED
@@ -6,6 +6,7 @@ require 'bundler'
6
6
  require 'jeweler'
7
7
  require 'rspec/core/rake_task'
8
8
  require 'rdoc/task'
9
+ require 'github/markup'
9
10
 
10
11
  #-------------------------------------------------------------------------------
11
12
  # Dependencies
@@ -88,5 +89,61 @@ Rake::RDocTask.new do |rdoc|
88
89
  rdoc.options << '-w' << '2'
89
90
 
90
91
  rdoc.rdoc_files.include('*.rdoc')
92
+ rdoc.rdoc_files.include('info/*.rdoc')
91
93
  rdoc.rdoc_files.include('lib/**/*.rb')
94
+
95
+ #
96
+ # [link:info/*.rdoc]
97
+ #
98
+ # Doc viewers
99
+ #
100
+ # Github.com (no control) & Generated RDoc site (limited control)
101
+ # README.rdoc
102
+ # info/*.rdoc
103
+ # Local Github render (full control)
104
+ # tmp/README.rdoc
105
+ # tmp/info/*.rdoc
106
+ #
107
+
108
+ FileUtils.mkdir_p('tmp')
109
+
110
+ html_prefix = "<!DOCTYPE html><html lang='en' class=''><head><title>Test Github markup</title>"
111
+ html_prefix << '<link href="https://assets-cdn.github.com/assets/github-07ee5f9b28252daadba7750d43951602b35cdaa9dc19b5aff2eececebd6b6627.css" media="all" rel="stylesheet" type="text/css" />'
112
+ html_prefix << '<link href="https://assets-cdn.github.com/assets/github2-13950c15da59f6c02f99ce11c07b93342a063458ce7ab72e243013dd9729008e.css" media="all" rel="stylesheet" type="text/css" />'
113
+ html_prefix << "</head><body style='padding: 30px'><div class='site' itemscope itemtype='http://schema.org/WebPage'><article class='markdown-body entry-content' itemprop='mainContentOfPage'>"
114
+ html_suffix = "</article></div></body></html>"
115
+
116
+ embedded_html = lambda do |html_body|
117
+ "#{html_prefix}#{html_body}#{html_suffix}"
118
+ end
119
+
120
+ create_rdoc_link = lambda do |source|
121
+ rdoc_readme = File.join(Dir.pwd, rdoc.rdoc_dir, "#{source.gsub('.', '_')}.html")
122
+ rdoc_link = File.join(Dir.pwd, rdoc.rdoc_dir, source)
123
+
124
+ FileUtils.rm_f(rdoc_link)
125
+ FileUtils.ln_s(rdoc_readme, rdoc_link)
126
+ end
127
+
128
+ tmp_readme = File.join(Dir.pwd, 'tmp', rdoc.main)
129
+ readme_github_html = embedded_html.call(GitHub::Markup.render(rdoc.main, File.read(rdoc.main)))
130
+ File.write(tmp_readme, readme_github_html)
131
+
132
+ create_rdoc_link.call(rdoc.main)
133
+
134
+ Dir.glob('info/*.rdoc') do |rdoc_file|
135
+ tmp_dir = File.join(Dir.pwd, 'tmp', File.dirname(rdoc_file))
136
+ tmp_file = File.join(Dir.pwd, 'tmp', rdoc_file)
137
+ readme_file = File.join(tmp_dir, rdoc.main)
138
+
139
+ FileUtils.mkdir_p(tmp_dir)
140
+
141
+ FileUtils.rm_f(readme_file)
142
+ FileUtils.ln_s(tmp_readme, readme_file)
143
+
144
+ github_html = embedded_html.call(GitHub::Markup.render(rdoc_file, File.read(rdoc_file)))
145
+ File.write(tmp_file, github_html)
146
+
147
+ create_rdoc_link.call(rdoc_file)
148
+ end
92
149
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.6
1
+ 0.5.7
@@ -1,13 +1,16 @@
1
1
  #!/bin/bash
2
2
  #-------------------------------------------------------------------------------
3
3
 
4
- # Set hostname
5
- echo "1. Setting hostname"
6
- echo "$HOSTNAME" > "/etc/hostname" || exit 1
4
+ if [ ! -f /.dockerinit ]
5
+ then
6
+ # Set hostname
7
+ echo "1. Setting hostname"
8
+ echo "$HOSTNAME" > "/etc/hostname" || exit 1
7
9
 
8
- echo "2. Initializing hosts file"
9
- sed -ri 's/127\.0\.1\.1.*//' /etc/hosts
10
- echo "127.0.1.1 $HOSTNAME" >> /etc/hosts || exit 2
10
+ echo "2. Initializing hosts file"
11
+ sed -ri 's/127\.0\.1\.1.*//' /etc/hosts
12
+ echo "127.0.1.1 $HOSTNAME" >> /etc/hosts || exit 2
13
+ fi
11
14
 
12
15
  # Set OpenDNS as our DNS lookup source
13
16
  echo "3. Setting command DNS gateways"
@@ -23,4 +26,4 @@ apt-get -y install build-essential cmake rake bindfs libnl-dev libpopt-dev \
23
26
  libssl-dev libcurl4-openssl-dev libxslt-dev libxml2-dev \
24
27
  libyaml-dev libreadline-dev libncurses5-dev zlib1g-dev texinfo \
25
28
  llvm llvm-dev python-software-properties unzip curl bison >/tmp/base.install.log 2>&1 || exit 6
26
-
29
+
@@ -54,19 +54,19 @@ initialize_rvm_user 'root'
54
54
  for USER_HOME in /home/*/
55
55
  do
56
56
  [[ "$USER_HOME" =~ ([^/]+)/?$ ]]
57
- if [ "${BASH_REMATCH[1]}" != "lost+found" -a "${BASH_REMATCH[1]}" != "*" ]
57
+ if [ ! -L "${BASH_REMATCH[1]}" -a "${BASH_REMATCH[1]}" != "lost+found" -a "${BASH_REMATCH[1]}" != "*" ]
58
58
  then
59
59
  initialize_rvm_user "${BASH_REMATCH[1]}" '/home'
60
60
  fi
61
61
  done
62
62
 
63
- echo "5. Installing Ruby version $RUBY_RVM_VERSION -- this might take some time"
64
-
65
63
  if [ -z "$RUBY_RVM_VERSION" ]
66
64
  then
67
65
  RUBY_RVM_VERSION='ruby-2.1'
68
66
  fi
69
67
 
68
+ echo "5. Installing Ruby version $RUBY_RVM_VERSION -- this might take some time"
69
+
70
70
  su - -c "rvm install $RUBY_RVM_VERSION" root >>/tmp/ruby.config.log 2>&1 || exit 54
71
71
  su - -c "rvm use $RUBY_RVM_VERSION --default" root >>/tmp/ruby.config.log 2>&1 || exit 55
72
72
 
@@ -80,4 +80,4 @@ echo "6. Adding an initial .gemrc configuration"
80
80
  gem: --no-rdoc --no-ri
81
81
  EOP
82
82
  ) > "/root/.gemrc" || exit 56
83
- fi
83
+ fi
data/corl.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: corl 0.5.6 ruby lib
5
+ # stub: corl 0.5.7 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "corl"
9
- s.version = "0.5.6"
9
+ s.version = "0.5.7"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Adrian Webb"]
14
- s.date = "2014-12-29"
14
+ s.date = "2015-01-16"
15
15
  s.description = "Framework that provides a simple foundation for growing organically in the cloud"
16
16
  s.email = "adrian.webb@coralnexus.com"
17
17
  s.executables = ["corl"]
@@ -27,7 +27,6 @@ Gem::Specification.new do |s|
27
27
  "LICENSE.txt",
28
28
  "README.rdoc",
29
29
  "Rakefile",
30
- "TODO.rdoc",
31
30
  "VERSION",
32
31
  "bin/corl",
33
32
  "bootstrap/bootstrap.sh",
@@ -47,16 +46,23 @@ Gem::Specification.new do |s|
47
46
  "bootstrap/os/ubuntu/09_nucleon.sh",
48
47
  "bootstrap/os/ubuntu/10_corl.sh",
49
48
  "corl.gemspec",
49
+ "info/AUTOMATION.rdoc",
50
+ "info/INSTALLATION.rdoc",
51
+ "info/PACKAGING.rdoc",
52
+ "info/PLUGINS.rdoc",
53
+ "info/TODO.rdoc",
50
54
  "lib/CORL/builder/identity.rb",
51
55
  "lib/CORL/builder/package.rb",
52
56
  "lib/CORL/builder/project.rb",
53
57
  "lib/CORL/configuration/file.rb",
54
58
  "lib/CORL/machine/AWS.rb",
59
+ "lib/CORL/machine/docker.rb",
55
60
  "lib/CORL/machine/physical.rb",
56
61
  "lib/CORL/machine/rackspace.rb",
57
62
  "lib/CORL/machine/vagrant.rb",
58
63
  "lib/CORL/network/CORL.rb",
59
64
  "lib/CORL/node/AWS.rb",
65
+ "lib/CORL/node/docker.rb",
60
66
  "lib/CORL/node/local.rb",
61
67
  "lib/CORL/node/rackspace.rb",
62
68
  "lib/CORL/node/vagrant.rb",
@@ -73,6 +79,7 @@ Gem::Specification.new do |s|
73
79
  "lib/core/mod/fog_aws_server.rb",
74
80
  "lib/core/mod/fog_rackspace_server.rb",
75
81
  "lib/core/mod/hiera_backend.rb",
82
+ "lib/core/mod/vagrant.rb",
76
83
  "lib/core/plugin/agent.rb",
77
84
  "lib/core/plugin/builder.rb",
78
85
  "lib/core/plugin/cloud_action.rb",
@@ -88,6 +95,7 @@ Gem::Specification.new do |s|
88
95
  "lib/core/util/puppet/resource_group.rb",
89
96
  "lib/core/vagrant/action.rb",
90
97
  "lib/core/vagrant/actions/delete_cache.rb",
98
+ "lib/core/vagrant/actions/include_overrides.rb",
91
99
  "lib/core/vagrant/actions/init_keys.rb",
92
100
  "lib/core/vagrant/actions/link_network.rb",
93
101
  "lib/core/vagrant/commands/launcher.rb",
@@ -140,6 +148,7 @@ Gem::Specification.new do |s|
140
148
  "lib/nucleon/action/plugins.rb",
141
149
  "lib/nucleon/event/puppet.rb",
142
150
  "lib/nucleon/extension/corl_config.rb",
151
+ "lib/nucleon/extension/vagrant.rb",
143
152
  "lib/nucleon/template/environment.rb",
144
153
  "lib/puppet/indirector/corl.rb",
145
154
  "lib/puppet/indirector/data_binding/corl.rb",
@@ -164,7 +173,22 @@ Gem::Specification.new do |s|
164
173
  "lib/puppet/parser/functions/render.rb",
165
174
  "lib/puppet/parser/functions/value.rb",
166
175
  "locales/en.yml",
167
- "spec/spec_helper.rb"
176
+ "rdoc/site/0.5.7/README.rdoc",
177
+ "rdoc/site/0.5.7/info/AUTOMATION.rdoc",
178
+ "rdoc/site/0.5.7/info/INSTALLATION.rdoc",
179
+ "rdoc/site/0.5.7/info/PACKAGES.rdoc",
180
+ "rdoc/site/0.5.7/info/PACKAGING.rdoc",
181
+ "rdoc/site/0.5.7/info/PLUGINS.rdoc",
182
+ "rdoc/site/0.5.7/info/TODO.rdoc",
183
+ "spec/spec_helper.rb",
184
+ "tmp/README.rdoc",
185
+ "tmp/info/AUTOMATION.rdoc",
186
+ "tmp/info/INSTALLATION.rdoc",
187
+ "tmp/info/PACKAGES.rdoc",
188
+ "tmp/info/PACKAGING.rdoc",
189
+ "tmp/info/PLUGINS.rdoc",
190
+ "tmp/info/README.rdoc",
191
+ "tmp/info/TODO.rdoc"
168
192
  ]
169
193
  s.homepage = "http://github.com/coralnexus/corl"
170
194
  s.licenses = ["Apache License, Version 2.0"]
@@ -188,6 +212,7 @@ Gem::Specification.new do |s|
188
212
  s.add_development_dependency(%q<jeweler>, ["~> 2.0"])
189
213
  s.add_development_dependency(%q<rspec>, ["~> 3.1"])
190
214
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
215
+ s.add_development_dependency(%q<github-markup>, ["~> 1.3"])
191
216
  else
192
217
  s.add_dependency(%q<nucleon>, [">= 0.2.2", "~> 0.2"])
193
218
  s.add_dependency(%q<fog>, ["~> 1.23"])
@@ -199,6 +224,7 @@ Gem::Specification.new do |s|
199
224
  s.add_dependency(%q<jeweler>, ["~> 2.0"])
200
225
  s.add_dependency(%q<rspec>, ["~> 3.1"])
201
226
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
227
+ s.add_dependency(%q<github-markup>, ["~> 1.3"])
202
228
  end
203
229
  else
204
230
  s.add_dependency(%q<nucleon>, [">= 0.2.2", "~> 0.2"])
@@ -211,6 +237,7 @@ Gem::Specification.new do |s|
211
237
  s.add_dependency(%q<jeweler>, ["~> 2.0"])
212
238
  s.add_dependency(%q<rspec>, ["~> 3.1"])
213
239
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
240
+ s.add_dependency(%q<github-markup>, ["~> 1.3"])
214
241
  end
215
242
  end
216
243
 
@@ -0,0 +1,5 @@
1
+ = CORL automation system
2
+
3
+
4
+ ---
5
+ {Click here to return to the README}[link:README.rdoc]
@@ -0,0 +1,163 @@
1
+ = CORL installation
2
+
3
+
4
+ == Requirements
5
+
6
+
7
+ CORL and Nucleon are available as Ruby Gems, which can easily be included in
8
+ other projects. They are ultimately destined for compatibility with any Linux,
9
+ Mac, and Windows machines, but due to early development resource limitations
10
+ we started with what we use internally.
11
+
12
+ This means they have currently been tested on:
13
+
14
+ Ubuntu (12.04 / 14.04)
15
+ Ruby versions from 1.8 to 2.1 (>= 1.9 highly recommended due to ordered hash capabilities)
16
+
17
+ For information on the various ways to install Ruby, see the {Ruby installation
18
+ instructions}[https://www.ruby-lang.org/en/documentation/installation]. We highly recommend {RVM}[https://rvm.io].
19
+
20
+ If using the Git or Github project plugin providers, Git will need to be
21
+ installed on the system and accessible in the execution search path. See the
22
+ {Git home}[http://git-scm.com/downloads] for more information.
23
+
24
+
25
+ == Vagrant development environment
26
+
27
+
28
+ The easiest way to get up and running with CORL from a number of operating
29
+ systems is to use {Vagrant}[http://vagrantup.com]. Included in this repository
30
+ is a Vagrantfile that can launch a Virtualbox VM or Docker container that
31
+ installs CORL on an Ubuntu base image. Make sure that Vagrant (> 1.6.5) is
32
+ installed on your system and fetch the CORL project into a local directory.
33
+
34
+ git clone -b 0.5 https://github.com/coralnexus/corl.git {corl/dev/path}
35
+ cd {corl/dev/path}
36
+ git submodule update --init --recursive
37
+
38
+ To launch CORL in a local Virtualbox machine:
39
+
40
+ vagrant up corl
41
+
42
+ To launch CORL in a local Docker container you must be running a Docker supported
43
+ Linux version and have the Docker server running on the local host.
44
+
45
+ vagrant up corl_linux
46
+
47
+ The CORL bootstrap process will initialize the operating environment and install
48
+ CORL onto the VM or container.
49
+
50
+ vagrant ssh corl | corl_linux
51
+ # Play around...
52
+
53
+ When your done:
54
+
55
+ vagrant destroy --force
56
+
57
+ Three directories are shared with the VM/container to make development and
58
+ testing easier.
59
+
60
+ {corl repo}/share/network -> /var/corl # Two way share of root level network project
61
+ {corl repo}/share/home -> /home/vagrant # One way RSync push to home (no delete)
62
+ {corl repo} -> {remote gem path} # One way RSync push to the remote CORL gem code
63
+
64
+
65
+ == Automated bootstrap (for images)
66
+
67
+
68
+ If you are installing CORL outside of Vagrant, we provide an internal CORL
69
+ bootstrap script package that automates the installation (currently on Ubuntu
70
+ only).
71
+
72
+ See the {CORL bootstrap project on GitHub}[https://github.com/coralnexus/corl-bootstrap] to review
73
+ the installation process and dependencies in our automated Ubuntu installation scripts.
74
+
75
+ Here is an example CORL install script (<b>for Ubuntu</b>)
76
+
77
+ #!/bin/bash
78
+ #-----------------------------------------------------------------------------
79
+ echo "1. Initializing Git"
80
+ apt-get -y install git || exit 1
81
+
82
+ echo "2. Fetching CORL bootstrap source repository"
83
+ rm -Rf /tmp/corl-bootstrap
84
+ git clone https://github.com/coralnexus/corl-bootstrap.git /tmp/corl-bootstrap >/tmp/corl.bootstrap.log 2>&1 || exit 2
85
+ cd /tmp/corl-bootstrap
86
+ git submodule update --init --recursive >>/tmp/corl.bootstrap.log 2>&1 || exit 3
87
+
88
+ echo "3. Executing CORL bootstrap process..."
89
+ chmod 755 /tmp/corl-bootstrap/bootstrap.sh
90
+ sudo /tmp/corl-bootstrap/bootstrap.sh || exit $?
91
+
92
+
93
+ == Manual installation
94
+
95
+
96
+ <b>As a standalone system</b>
97
+
98
+ $> gem install corl # add sudo if not running RVM
99
+ $> corl -h
100
+
101
+ <b>As a Vagrant plugin</b>
102
+
103
+ $> vagrant plugin install corl
104
+ $> vagrant corl -h
105
+
106
+ <b>For Ruby applications</b>, include in your {Gemfile}[http://bundler.io/gemfile.html]:
107
+
108
+ gem "corl", "~> 0.5"
109
+
110
+
111
+ == Checking loaded plugins and providers
112
+
113
+
114
+ $> corl plugins
115
+
116
+
117
+ == API keys
118
+
119
+
120
+ CORL encapsulates everything needed to manage networks as pluggable version
121
+ controlled projects, except API keys and remote service authorizations.
122
+
123
+ <b>IMPORTANT</b>: For security reasons cloud service provider API keys are not,
124
+ and should not be, versioned!
125
+
126
+ Valid API keys are required to connect to network servers through the CORL
127
+ system. We recommend storing your various API keys in an encrypted archive
128
+ and locking down SSH access, as API keys are transferred to the root of new
129
+ network nodes to allow for service oriented operations from that node.
130
+
131
+ In CORL core, as of January 2015, there are two kinds of API keys used:
132
+
133
+ <b>Cloud service providers</b>:
134
+
135
+ Rackspace
136
+ Amazon
137
+ Google (in the works)
138
+
139
+ <b>Project hosting providers</b>:
140
+
141
+ GitHub
142
+
143
+
144
+ Create a <b>~/.fog</b> file with cloud service keys**
145
+
146
+ default:
147
+ rackspace_username: {username}
148
+ rackspace_api_key: {api_key}
149
+ aws_access_key_id: {key_id}
150
+ aws_secret_access_key: {secret_access_key}
151
+
152
+ Create a <b>~/.netrc</b> file**
153
+
154
+ machine api.github.com
155
+ login {github_username}
156
+ password {api_key}
157
+
158
+
159
+ ** An upcoming stable release will merge these two into a single authorisation file.
160
+
161
+
162
+ ---
163
+ {Click here to return to the README}[link:README.rdoc]
@@ -0,0 +1,171 @@
1
+ = CORL packaging system
2
+
3
+
4
+ CORL provides a middle layer between configuration management tools like Puppet
5
+ and automation systems and processes. CORL can be extended in individual
6
+ projects and easily merge libraries of bundled plugin interfaces and providers.
7
+
8
+
9
+ ==== Networks
10
+
11
+
12
+ At the very top level in CORL there is a network project. Think of it as a
13
+ parent container for everything necessary to grow a network of machines. By
14
+ default the network is a shared Git repository but the project interface is
15
+ pluggable for individual needs.
16
+
17
+ The default plugin implementation of the CORL network maintains the following
18
+ project directory structure.
19
+
20
+ {network project directory}
21
+ |-> config # Contextually searched provisioner configurations
22
+ |->
23
+
24
+ Networks bundle:
25
+
26
+ * Network and node group settings
27
+ * Contexual configurations
28
+ * Build definitions (packages, identities, projects, etc...)
29
+ * Node data objects
30
+ * Shared authentication information
31
+ * CORL plugin interface implementations
32
+ * Any other shared files
33
+
34
+
35
+
36
+ To see an example of a network project, {checkout our starter template}[https://github.com/coralnexus/network-template].
37
+
38
+
39
+ ==== Packages
40
+
41
+
42
+ Packages are revision controlled projects (Git) that contain reusable
43
+ infrastructure components. Packages are like lego blocks and can be derived from
44
+ combinations of other packages.
45
+
46
+ https://raw.githubusercontent.com/coralnexus/corl/0.5/images/package.png
47
+
48
+ Packages define a corl.{json|yaml} file in the root directory that contains
49
+ build directives targeted at various environments, like development, staging,
50
+ qa, and production. We internally lock qa and production build revisions so we
51
+ get standardized environments.
52
+
53
+
54
+ Packages bundle:
55
+
56
+ * Build definitions (packages, provisioner modules, projects, identities, etc...)
57
+ * Default configurations (Puppet by default)
58
+ * Provisioner gateways (Puppet by default)
59
+ * Provisioner profiles (Puppet by default)
60
+
61
+
62
+ Example build directive: (tracks *master* by default)
63
+
64
+ > {package directory}/<b>corl.json</b>
65
+
66
+ {
67
+ "builders": {
68
+ "package": {
69
+ "environment": {
70
+ "production": {
71
+ "coralnexus__core": "github:::coralnexus/corl-package-core[04eaa0f855c7824c58d43f0dd7b1370fa16157d6]"
72
+ },
73
+ "qa": {
74
+ "use": "production"
75
+ },
76
+ "default": {
77
+ "coralnexus__core": "github:::coralnexus/corl-package-core"
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
83
+
84
+ This directive basically defines a dependency on the coralnexus core package so
85
+ that when this package is built on a system and profiles are loaded the
86
+ dependency and it's profiles are loaded first. Different environments can
87
+ track different branches of the same projects or include different projects
88
+ based on the state of the environment. Above we just lock in a constant
89
+ revision when in a production or QA environment.
90
+
91
+
92
+ Example Puppet node profile: (Varnish proxy server)
93
+
94
+ > {package directory}/<b>profiles/varnish_server.pp</b>
95
+
96
+ class vendor_name::package_namespace::profile::varnish_server {
97
+ $base_name = 'coralnexus_varnish_server'
98
+ anchor { $base_name: }
99
+ #---------------------------------------------------------------------------
100
+ # Required systems
101
+ class { 'varnish': require => Anchor[$base_name] }
102
+ class { 'varnish::vcl': require => Class['varnish'] }
103
+ #---------------------------------------------------------------------------
104
+ # Optional systems
105
+ corl::include { 'varnish_server_classes': require => Class['varnish::vcl'] }
106
+ #---------------------------------------------------------------------------
107
+ # Resources
108
+ corl_resources('varnish::acl', 'varnish_server::acl', 'varnish_server::acl_defaults')
109
+ corl_resources('varnish::probe', 'varnish_server::probe', 'varnish_server::probe_defaults')
110
+ corl_resources('varnish::backend', 'varnish_server::backend', 'varnish_server::backend_defaults')
111
+ corl_resources('varnish::director', 'varnish_server::director', 'varnish_server::director_defaults')
112
+ corl_resources('varnish::selector', 'varnish_server::selector', 'varnish_server::selector_defaults')
113
+ }
114
+
115
+ Example provisioner directive: (tracks *master* by default)
116
+
117
+ > {package directory}/<b>corl.json</b>
118
+
119
+ {
120
+ "provisioners": {
121
+ "puppetnode": {
122
+ "vendor_name::package_namespace": {
123
+ "varnish_server": {
124
+ "environment": {
125
+ "production": {
126
+ "modules": {
127
+ "varnish": "github:::maxchk/puppet-varnish[b9846d1b35e87a45c98213fddfe71fa0a6f3b31c]",
128
+ "varnish_drupal": "github:::coralnexus/puppet-varnish_drupal[b1f8ecd9be5144d642d7717429a3652234b5f0d9]"
129
+ }
130
+ },
131
+ "qa": {
132
+ "use": "production"
133
+ },
134
+ "default": {
135
+ "modules": {
136
+ "varnish": "github:::maxchk/puppet-varnish[develop]",
137
+ "varnish_drupal": "github:::coralnexus/puppet-varnish_drupal"
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+ }
146
+
147
+ The above provisioner directive tells CORL to
148
+
149
+
150
+ To see an example of a package, {checkout our core package}[https://github.com/coralnexus/network-template].
151
+
152
+
153
+ ==== Profiles
154
+
155
+
156
+ Node profiles are packaged systems and default configurations meant to run as
157
+ standalone server images or combined to create meta server images. The CORL
158
+ provisioner plugin defines an interface for creating, linking, and provisioning
159
+ profiles. Currently only Puppet is supported, but more provisioners are on the
160
+ way in the future.
161
+
162
+ https://raw.githubusercontent.com/coralnexus/corl/0.5/images/profile.png
163
+
164
+ Profiles are created in the native file format of the configuration management
165
+ system being used. For instance in our default Puppetnode provisioner
166
+
167
+ https://raw.githubusercontent.com/coralnexus/corl/0.5/images/example-network-architecture.png
168
+
169
+
170
+ ---
171
+ {Click here to return to the README}[link:README.rdoc]
data/info/PLUGINS.rdoc ADDED
@@ -0,0 +1,57 @@
1
+ = CORL supported plugin types and providers
2
+
3
+
4
+ The CORL framework implements pluggable interfaces, designed to grow in the future,
5
+ but we have only implemented providers for technologies and services we use
6
+ currently.
7
+
8
+ Below is a list of current plugin types and supported providers:
9
+
10
+ * <b>CORL::Plugin::Configuration</b> - Project based configuration pool and synchronization
11
+ * <b>CORL::Configuration::File</b> - File based data objects (JSON / YAML / ... files)
12
+ * <b>CORL::Plugin::Network</b> - Network configuration, management, and action implementation
13
+ * <b>CORL::Network::CORL</b> - Default
14
+ * <b>CORL::Plugin::Node</b> - Network and machine interface configuration bridge
15
+ * <b>CORL::Node::Local</b> - Local physical machine (registers development machines)
16
+ * <b>CORL::Node::Vagrant</b> - Manage Vagrant development machines
17
+ * <b>CORL::Node::Rackspace</b> - Manage Rackspace compute instances
18
+ * <b>CORL::Node::AWS</b> - Manage Amazon Web Services compute instances
19
+ * <b>CORL::Plugin::Machine</b> - Machine interfaces
20
+ * <b>CORL::Machine::Physical</b> - Physical machine interface (limited functionality)
21
+ * <b>CORL::Machine::Vagrant</b> - Vagrant machine interface (only *virtualbox* and *docker* providers tested)
22
+ * <b>CORL::Machine::Rackspace</b> - Rackspace compute interface
23
+ * <b>CORL::Machine::AWS</b> - Amazon Web Service compute interface
24
+ * <b>CORL::Plugin::Builder</b> - Build processors
25
+ * <b>CORL::Builder::Identity</b> - Isolated or private identity related node configurations
26
+ * <b>CORL::Builder::Package</b> - Fetch packages connected to network and other packages
27
+ * <b>CORL::Builder::Project</b> - Fetch version controlled projects into system locations
28
+ * <b>CORL::Plugin::Provisioner</b> - Provisioning processes that utilize configuration management tools
29
+ * <b>CORL::Provisioner::Puppetnode</b> - Simple (non agent) Puppet provisioner that configures system based on group profiles
30
+
31
+ Plugin types inherited from Nucleon:
32
+
33
+ * <b>Nucleon::Plugin::Command</b> - Shell command translators / executors
34
+ * <b>Nucleon::Command::Bash</b>
35
+ * <b>Nucleon::Plugin::Event</b> - Reusable conditional checks
36
+ * <b>Nucleon::Event::Regex</b>
37
+ * <b>Nucleon::Plugin::Project</b> - Version controlled projects
38
+ * <b>Nucleon::Project::Git</b>
39
+ * <b>Nucleon::Project::Github</b> - Extends Git but adds GitHub API support
40
+ * <b>Nucleon::Plugin::Template</b> - One way data object to text rendering
41
+ * <b>Nucleon::Template::JSON</b>
42
+ * <b>Nucleon::Template::YAML</b>
43
+ * <b>Nucleon::Template::Wrapper</b> - Wraps stringified data in prefix and suffix
44
+ * <b>Nucleon::Template::Environment</b> - Renders data object as environment variables
45
+ * <b>Nucleon::Plugin::Translator</b> - Two way data object to text translation
46
+ * <b>Nucleon::Template::JSON</b>
47
+ * <b>Nucleon::Template::YAML</b>
48
+
49
+ Action interface: (Around 42 core actions currently implemented that build on the above plugins)
50
+
51
+ * <b>Nucleon::Plugin::Action</b> - Portable action framework and execution environment
52
+ * <b>Nucleon::Plugin::CloudAction</b> - Distributed actions across a network (extends <b>Nucleon::Plugin::Action</b>)
53
+ * <b>Nucleon::Plugin::Agent</b> - Continuously running managed agents (extends <b>Nucleon::Plugin::CloudAction</b>)
54
+
55
+
56
+ ---
57
+ {Click here to return to the README}[link:README.rdoc]
data/info/TODO.rdoc ADDED
@@ -0,0 +1,27 @@
1
+ = CORL tasks to be completed before 1.0.0 release
2
+
3
+
4
+ This framework should be considered unstable and likely to break as remaining
5
+ bugs and unit testing are completed going forward. When we reach version 1.0.0
6
+ full {semantic versioning}[http://semver.org] will be ahered to. Until then
7
+ the minor version specifies a major architectural change, and patch versions
8
+ could fix bugs and revise features that could break backward compatibility.
9
+
10
+
11
+ == TODO:
12
+
13
+
14
+ * Default action arguments and options for networks
15
+ * Error handling improvements
16
+ * Full code documentation
17
+ * Full coverage unit tests
18
+ * Test on Windows, Mac, Linux (Debian, Ubuntu, CentOS, Redhat, Suse)
19
+ * Performance improvements
20
+ * Google node and machine providers
21
+ * Localization improvements
22
+ * Logging consolidation (eliminate redundant log information)
23
+ * Fix bugs :-(
24
+
25
+
26
+ ---
27
+ {Click here to return to the README}[link:README.rdoc]