vagrant-pe_build 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/CHANGELOG +59 -0
  2. data/README.markdown +148 -5
  3. data/lib/pe_build.rb +5 -3
  4. data/lib/pe_build/action.rb +5 -0
  5. data/lib/pe_build/action/pe_build_dir.rb +18 -0
  6. data/lib/pe_build/archive.rb +39 -46
  7. data/lib/pe_build/cap.rb +17 -0
  8. data/lib/pe_build/cap/detect_installer/base.rb +15 -0
  9. data/lib/pe_build/cap/detect_installer/debian.rb +23 -0
  10. data/lib/pe_build/cap/detect_installer/posix.rb +73 -0
  11. data/lib/pe_build/cap/detect_installer/redhat.rb +18 -0
  12. data/lib/pe_build/cap/detect_installer/ubuntu.rb +23 -0
  13. data/lib/pe_build/cap/run_install/posix.rb +26 -0
  14. data/lib/pe_build/command.rb +6 -63
  15. data/lib/pe_build/command/base.rb +55 -0
  16. data/lib/pe_build/command/copy.rb +22 -23
  17. data/lib/pe_build/command/download.rb +4 -8
  18. data/lib/pe_build/command/list.rb +1 -6
  19. data/lib/pe_build/config/global.rb +13 -4
  20. data/lib/pe_build/config/pe_bootstrap.rb +4 -0
  21. data/lib/pe_build/idempotent.rb +1 -1
  22. data/lib/pe_build/on_machine.rb +10 -0
  23. data/lib/pe_build/plugin.rb +58 -22
  24. data/lib/pe_build/provisioner/pe_bootstrap.rb +123 -156
  25. data/lib/pe_build/provisioner/pe_bootstrap/answers_file.rb +49 -0
  26. data/lib/pe_build/release.rb +23 -0
  27. data/lib/pe_build/release/2_0.rb +25 -0
  28. data/lib/pe_build/release/2_5.rb +28 -0
  29. data/lib/pe_build/release/2_6.rb +27 -0
  30. data/lib/pe_build/release/2_7.rb +28 -0
  31. data/lib/pe_build/release/2_8.rb +35 -0
  32. data/lib/pe_build/release/3_0.rb +36 -0
  33. data/lib/pe_build/release/instance.rb +63 -0
  34. data/lib/pe_build/transfer.rb +25 -0
  35. data/lib/pe_build/transfer/file.rb +11 -9
  36. data/lib/pe_build/transfer/open_uri.rb +62 -0
  37. data/lib/pe_build/version.rb +1 -1
  38. data/templates/answers/{agent.txt.erb → agent-2.x.txt.erb} +1 -1
  39. data/templates/answers/agent-3.x.txt.erb +16 -0
  40. data/templates/answers/{master.txt.erb → master-2.x.txt.erb} +0 -0
  41. data/templates/answers/master-3.x.txt.erb +44 -0
  42. data/templates/locales/en.yml +16 -3
  43. metadata +28 -6
  44. data/lib/pe_build/transfer/uri.rb +0 -53
  45. data/templates/answers/master-existing-db.txt.erb +0 -52
@@ -2,6 +2,19 @@ en:
2
2
  pebuild:
3
3
  archive:
4
4
  no_installer_source: |-
5
- No installer source is available. Please provide a download_root
6
- to retrieve the installer from or use 'vagrant pe-build' to provide
7
- the installer...
5
+ The Puppet Enterprise installer %{filename}
6
+ is not available. Please set the `download_root` config option to a valid
7
+ mirror, or add the installer yourself by using the `vagrant pe-build copy`
8
+ command. Downloads for Puppet Enterprise are available for download at
9
+ https://puppetlabs.com/puppet/puppet-enterprise/
10
+ provisioner:
11
+ pe_bootstrap:
12
+ already_installed: |-
13
+ Puppet Enterprise is already installed, skipping installation.
14
+ scheduling_run: |-
15
+ Scheduling Puppet run to kickstart node classification.
16
+ transfer:
17
+ open_uri:
18
+ download_failed: |-
19
+ An error occurred while trying to download the given resource (%{uri}),
20
+ and the transfer could not complete. The error message generated was "%{msg}".
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-pe_build
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-01 00:00:00.000000000 Z
12
+ date: 2013-08-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: progressbar
@@ -60,9 +60,19 @@ files:
60
60
  - doc/answers/master-2.5.0.txt
61
61
  - doc/answers/master-db.txt
62
62
  - lib/pe_build.rb
63
+ - lib/pe_build/action.rb
64
+ - lib/pe_build/action/pe_build_dir.rb
63
65
  - lib/pe_build/archive.rb
64
66
  - lib/pe_build/archive_collection.rb
67
+ - lib/pe_build/cap.rb
68
+ - lib/pe_build/cap/detect_installer/base.rb
69
+ - lib/pe_build/cap/detect_installer/debian.rb
70
+ - lib/pe_build/cap/detect_installer/posix.rb
71
+ - lib/pe_build/cap/detect_installer/redhat.rb
72
+ - lib/pe_build/cap/detect_installer/ubuntu.rb
73
+ - lib/pe_build/cap/run_install/posix.rb
65
74
  - lib/pe_build/command.rb
75
+ - lib/pe_build/command/base.rb
66
76
  - lib/pe_build/command/copy.rb
67
77
  - lib/pe_build/command/download.rb
68
78
  - lib/pe_build/command/list.rb
@@ -70,17 +80,29 @@ files:
70
80
  - lib/pe_build/config/pe_bootstrap.rb
71
81
  - lib/pe_build/config_default.rb
72
82
  - lib/pe_build/idempotent.rb
83
+ - lib/pe_build/on_machine.rb
73
84
  - lib/pe_build/plugin.rb
74
85
  - lib/pe_build/provisioner/pe_bootstrap.rb
86
+ - lib/pe_build/provisioner/pe_bootstrap/answers_file.rb
87
+ - lib/pe_build/release.rb
88
+ - lib/pe_build/release/2_0.rb
89
+ - lib/pe_build/release/2_5.rb
90
+ - lib/pe_build/release/2_6.rb
91
+ - lib/pe_build/release/2_7.rb
92
+ - lib/pe_build/release/2_8.rb
93
+ - lib/pe_build/release/3_0.rb
94
+ - lib/pe_build/release/instance.rb
95
+ - lib/pe_build/transfer.rb
75
96
  - lib/pe_build/transfer/file.rb
76
- - lib/pe_build/transfer/uri.rb
97
+ - lib/pe_build/transfer/open_uri.rb
77
98
  - lib/pe_build/unpack/tar.rb
78
99
  - lib/pe_build/util/config.rb
79
100
  - lib/pe_build/version.rb
80
101
  - lib/vagrant-pe_build.rb
81
- - templates/answers/agent.txt.erb
82
- - templates/answers/master-existing-db.txt.erb
83
- - templates/answers/master.txt.erb
102
+ - templates/answers/agent-2.x.txt.erb
103
+ - templates/answers/agent-3.x.txt.erb
104
+ - templates/answers/master-2.x.txt.erb
105
+ - templates/answers/master-3.x.txt.erb
84
106
  - templates/locales/en.yml
85
107
  - templates/scripts/relocate_installation.sh
86
108
  - vagrant-pe_build.gemspec
@@ -1,53 +0,0 @@
1
- require 'pe_build/version'
2
-
3
- require 'open-uri'
4
- require 'progressbar'
5
-
6
-
7
- module PEBuild
8
- module Transfer
9
- class URI
10
-
11
- # @param src [String] The URL to the file to copy
12
- # @param dst [String] The path to destination of the copied file
13
- def initialize(src, dst)
14
- @src, @dst = src, dst
15
- end
16
-
17
- def copy
18
- tmpfile = open_uri(@src)
19
- FileUtils.mv(tmpfile, @dst)
20
- end
21
-
22
- HEADERS = {'User-Agent' => "Vagrant/PEBuild (v#{PEBuild::VERSION})"}
23
-
24
- private
25
-
26
- # Open a open-uri file handle for the given URL
27
- #
28
- # @return [IO]
29
- def open_uri(path)
30
- uri = ::URI.parse(path)
31
- progress = nil
32
-
33
- content_length_proc = lambda do |length|
34
- if length and length > 0
35
- progress = ProgressBar.new('Fetching', length)
36
- progress.file_transfer_mode
37
- end
38
- end
39
-
40
- progress_proc = lambda do |size|
41
- progress.set(size) if progress
42
- end
43
-
44
- options = HEADERS.merge({
45
- :content_length_proc => content_length_proc,
46
- :progress_proc => progress_proc,
47
- })
48
-
49
- uri.open(options)
50
- end
51
- end
52
- end
53
- end
@@ -1,52 +0,0 @@
1
- q_install=y
2
- q_puppet_cloud_install=n
3
-
4
- q_puppet_enterpriseconsole_auth_database_name=console_auth
5
- q_puppet_enterpriseconsole_auth_database_password=console_auth
6
- q_puppet_enterpriseconsole_auth_database_user=console_auth
7
- q_puppet_enterpriseconsole_auth_password=console
8
- q_puppet_enterpriseconsole_auth_user_email=console@example.com
9
-
10
- # Use existing database
11
- q_puppet_enterpriseconsole_database_install=n
12
- q_puppet_enterpriseconsole_setup_db=y
13
-
14
- q_puppet_enterpriseconsole_database_name=console
15
- q_puppet_enterpriseconsole_database_user=console
16
- q_puppet_enterpriseconsole_database_password=console
17
- q_puppet_enterpriseconsole_database_remote=n
18
- q_puppet_enterpriseconsole_database_root_password=console
19
-
20
- q_puppet_enterpriseconsole_httpd_port=443
21
- q_puppet_enterpriseconsole_install=y
22
-
23
- q_puppet_enterpriseconsole_inventory_hostname=master
24
- q_puppet_enterpriseconsole_inventory_port=8140
25
-
26
- q_puppet_enterpriseconsole_master_hostname=master
27
-
28
- q_puppet_enterpriseconsole_smtp_host=smtp.google.com
29
- q_puppet_enterpriseconsole_smtp_password=
30
- q_puppet_enterpriseconsole_smtp_port=25
31
- q_puppet_enterpriseconsole_smtp_use_tls=n
32
- q_puppet_enterpriseconsole_smtp_user_auth=n
33
- q_puppet_enterpriseconsole_smtp_username=
34
-
35
- q_puppet_symlinks_install=y
36
- q_puppetagent_certname=<%= @machine.name %>
37
- q_puppetagent_install=y
38
- q_puppetagent_server=<%= @machine.name %>
39
- q_puppetca_install=y
40
- q_puppetmaster_certname=master
41
- q_puppetmaster_dnsaltnames=master,puppet
42
- q_puppetmaster_enterpriseconsole_hostname=localhost
43
- q_puppetmaster_enterpriseconsole_port=443
44
- q_puppetmaster_forward_facts=n
45
- q_puppetmaster_install=y
46
- q_vendor_packages_install=y
47
-
48
- # pe 2.0 option
49
- q_puppet_enterpriseconsole_auth_user=console
50
-
51
- # pe 2.0 - 2.5 upgrade options
52
- q_puppet_enterpriseconsole_setup_auth_db=y