oscar 0.2.0alpha1 → 0.2.0alpha2

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -1,97 +1,10 @@
1
- Instapants
2
- ==========
1
+ Oscar
2
+ =====
3
3
 
4
- Create a full Puppet Enterprise environment from vagrant base boxes.
5
-
6
- Versions
7
- --------
8
-
9
- Right now, the master branch of soupkitchen is going through a major rewrite.
10
- The codebase is in flux and thus the documentation is really going to be based
11
- on inline comments.
12
-
13
- All of the supported behavior before the write has been tagged as version 0.0.1
14
- and is the reference point for the following documentation.
15
-
16
- Prerequisites
17
- -------------
18
-
19
- * Vagrant 1.0
20
- * Virtualbox 4.x (4.0 strongly recommended for OSX 10.7)
4
+ Oscar helps you build a full Puppet Enterprise environment from vagrant base boxes.
21
5
 
22
6
  Installation
23
7
  ------------
24
8
 
25
- git clone git://github.com/adrienthebo/soupkitchen
26
- git checkout 0.0.1
27
- cd soupkitchen
28
-
29
- # You'll need a config.yaml to specify how to build the environment. Contact your
30
- # friendly neighborhood Puppet support monkey on where this is located. Place
31
- # this file in the insta-pe directory.
32
- wget http://your.web.server/insta-pe/config.yaml
33
-
34
- # You'll also need the extracted universal installers for Puppet Enterprise.
35
- # Place the extracted installers in insta-pe/files.
36
- cd soupkitchen/files
37
- tar xvf puppet-enterprise-X.Y.Z.tar.gz
38
-
39
- # soupkitchen assumes the you either have all your vagrant boxes already added or
40
- # are hosted on a webserver.
41
- vagrant up
42
-
43
- Configuration
44
- -------------
45
-
46
- Configuration is provided through a yaml file. (Yes, the vagrant config file
47
- has a config file. Deal with it.) The top level values are all keys. You'll
48
- have something like this:
49
-
50
- ---
51
- # Configuration settings for Puppet Enterprise.
52
- pe:
53
- # The version of PE to install. Using a version of 0.0.0 disables the installation
54
- version: 2.5.1
55
- installer_path: /vagrant/files/puppet-enterprise-%s-all/puppet-enterprise-installer
56
- installer:
57
- # The program to execute to run the PE install. You can insert 'bash -x' to do a trace
58
- # of the installation. Any string containing :version will be replaced with the current version.
59
- executable: /vagrant/files/puppet-enterprise-:version-all/puppet-enterprise-installer
60
- args:
61
- # Additional arguments to pass to the installer
62
- - "-l /root/puppet-enterprise-installer.log"
63
- - "-D"
64
- - "| tee /root/installer-all.log"
65
-
66
- # Profiles are generic configurations for a basebox
67
- profiles:
68
- # One or more key/value pairs, where the name is the profile name and the values are hashes.
69
- debian:
70
- # The vagrant base box to use.
71
- boxname: debian-6.0.4-i386
72
- # The URL that the box can be downloaded from. This is optional
73
- boxurl: http://your.web.server/insta-pe/debian-6.0.4-i386.box
74
- # add more profiles as necessary
75
-
76
- # Your actual node definitions. This is an array of hashes
77
- nodes:
78
- -
79
- # name: the name of the node to address with vagrant commands
80
- name: master
81
- # role: one of (master, agent). Self explanatory.
82
- role: master
83
- # The name of the profile to use in the previous section.
84
- profile: debian
85
- # The IP address to assign for the host
86
- address: 10.16.1.2
87
- # A hash where the keys are VM port names and the values are hypervisor port names. Optional.
88
- # You'll want to forward 443 on the master to your hypervisor for access to the PEC.
89
- forwards:
90
- 443: 20443
91
-
92
- You can also view the config.yaml.example in this directory.
93
-
94
- Caveats
95
- -------
96
-
97
- Do not look at the Vagrantfile in this directory. You'll go blind.
9
+ gem install --pre oscar
10
+ # magic!
data/Vagrantfile CHANGED
@@ -1,6 +1,5 @@
1
1
  # lol shim
2
2
  $LOAD_PATH << "#{File.dirname(__FILE__)}/lib"
3
- require 'pe_build'
4
3
  require 'oscar'
5
4
 
6
- Oscar.facehug! File.dirname(__FILE__)
5
+ Oscar.load! File.dirname(__FILE__)
data/lib/oscar/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Oscar
2
- VERSION = '0.2.0alpha1'
2
+ VERSION = '0.2.0alpha2'
3
3
  end
data/lib/oscar.rb CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  module Oscar
3
3
 
4
- def self.facehug!(directory)
4
+ def self.load!(directory)
5
5
  env = Oscar::Environment.new
6
6
  env.config.load! directory
7
7
  env.run!
@@ -12,7 +12,7 @@ class PEBuild::Config < Vagrant::Config::Base
12
12
  end
13
13
 
14
14
  def version
15
- @version || '2.5.3'
15
+ @version || '2.5.2'
16
16
  end
17
17
 
18
18
  def filename
@@ -81,12 +81,11 @@ class PEBuild::Provisioners::PuppetEnterpriseBootstrap < Vagrant::Provisioners::
81
81
  @archive_path = File.join(PEBuild.archive_directory, @filename)
82
82
  end
83
83
 
84
- # @todo use absolute path for locating answers file template
85
84
  def prepare_answers_file
86
85
  FileUtils.mkdir_p @answers_dir unless File.directory? @answers_dir
87
86
  @env[:ui].info "Creating answers file, node:#{@env[:vm].name}, role: #{config.role}"
88
87
 
89
- template = File.read("#{@env[:root_path]}/templates/answers/#{config.role}.txt.erb")
88
+ template = File.read("#{PEBuild.source_root}/templates/answers/#{config.role}.txt.erb")
90
89
  dest = "#{@answers_dir}/#{@env[:vm].name}.txt"
91
90
 
92
91
  contents = ERB.new(template).result(binding)
data/lib/pe_build.rb CHANGED
@@ -4,6 +4,10 @@ module PEBuild
4
4
  def self.archive_directory
5
5
  File.expand_path(File.join(ENV['HOME'], '.vagrant.d', 'pe_builds'))
6
6
  end
7
+
8
+ def self.source_root
9
+ @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), '..'))
10
+ end
7
11
  end
8
12
 
9
13
  require 'pe_build/version'
@@ -0,0 +1,2 @@
1
+ require 'oscar'
2
+ require 'pe_build'
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oscar
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3134727173
4
+ hash: 2754431913
5
5
  prerelease: 5
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
9
  - 0
10
10
  - alpha
11
- - 1
12
- version: 0.2.0alpha1
11
+ - 2
12
+ version: 0.2.0alpha2
13
13
  platform: ruby
14
14
  authors:
15
15
  - Adrien Thebo
@@ -43,7 +43,7 @@ dependencies:
43
43
  requirements:
44
44
  - - "="
45
45
  - !ruby/object:Gem::Version
46
- hash: 1796845819
46
+ hash: -459699854
47
47
  segments:
48
48
  - 0
49
49
  - 0
@@ -130,6 +130,7 @@ files:
130
130
  - lib/pe_build/provisioners/puppet_enterprise.rb
131
131
  - lib/pe_build/provisioners/puppet_enterprise_bootstrap.rb
132
132
  - lib/pe_build/version.rb
133
+ - lib/vagrant_init.rb
133
134
  - manifests/.gitignore
134
135
  - modules/.gitignore
135
136
  - oscar.gemspec