On 26 April 2015 at 17:59, Kurt Andrews <[email protected]> wrote: > I'm trying to provision a virtual machine running Ubuntu with java using > Vagrant and Puppet. The VM is starting up fine, but when vagrant starts to > run Puppet, everything looks fine but no work gets done. I tried running > some tests as described in the PuppetLabs book Learning Puppet, but the > --noop option caused vagrant to fail. I've included the --debug output in > the code below, but it's not telling me much of anything. I'm too new to > puppet to understand much of the debug output. > > If anyone can tell me the best way to test Puppet manifests using Vagrant, > or clue me in as to what's wrong with my code, I'd really appreciate it. I > realize that this isn't strictly a Vagrant issue, and Vagrant is working > fine, but since I'm not using a stand alone installation of Puppet, I'm > hopefully posting here as well as the PuppetLabs community. >
A quick look, I think you're init.pp file is wrong. Try use: include hadoop::javaProvisioner (so remove the class hadoop part). >From the output Puppet is running, but you haven't provided any classes to run. You've just described a class (hadoop) which is never applied to the node. Here's an example repo which might provide some inspiration: https://github.com/garethr/puppet-docker-example Hope that works. Gareth > Thanks in advance for your help. > > Kurt > > #----------------------------------------------------------------------- > # Puppet --verbose --debug output: > # > #Kurts-Mac-mini:vagrant kandrews$ vagrant up --provider vmware_fusion > #/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.2/lib/vagrant/pre-rubygems.rb:31: > warning: Insecure world writable dir /usr/local in PATH, mode 040777 > #/opt/vagrant/embedded/gems/gems/bundler-1.7.11/lib/bundler/runtime.rb:222: > warning: Insecure world writable dir /usr/local in PATH, mode 040777 > #Bringing machine 'default' up with 'vmware_fusion' provider... > #==> default: Cloning VMware VM: 'hashicorp/precise64'. This can take some > time... > #==> default: Checking if box 'hashicorp/precise64' is up to date... > #==> default: Verifying vmnet devices are healthy... > #==> default: Preparing network adapters... > #==> default: Starting the VMware VM... > #==> default: Waiting for machine to boot. This may take a few minutes... > # default: SSH address: 172.16.71.139:22 > # default: SSH username: vagrant > # default: SSH auth method: private key > # default: > # default: Vagrant insecure key detected. Vagrant will automatically > replace > # default: this with a newly generated keypair for better security. > # default: > # default: Inserting generated public key within guest... > # default: Removing insecure key from the guest if its present... > # default: Key inserted! Disconnecting and reconnecting using new SSH > key... > #==> default: Machine booted and ready! > #==> default: Forwarding ports... > # default: -- 22 => 2222 > #==> default: Configuring network adapters within the VM... > #==> default: Waiting for HGFS kernel module to load... > #==> default: Enabling and configuring shared folders... > # default: -- /Users/kandrews/GitHub/HadoopCourse/vagrant: /vagrant > # default: -- > /Users/kandrews/GitHub/HadoopCourse/vagrant/hadoop/manifests: > /tmp/vagrant-puppet/manifests-13a99a3b458bd3e0d50a9b4bd10cb727 > #==> default: Running provisioner: puppet... > #==> default: Running Puppet with init.pp... > #==> default: stdin: is not a tty > #==> default: Debug: Creating default schedules > #==> default: Debug: Failed to load library 'selinux' for feature 'selinux' > #==> default: Debug: Using settings: adding file resource 'confdir': > 'File[/etc/puppet]{:path=>"/etc/puppet", :ensure=>:directory, > :loglevel=>:debug, :links=>:follow, :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'vardir': > 'File[/var/lib/puppet]{:path=>"/var/lib/puppet", :ensure=>:directory, > :loglevel=>:debug, :links=>:follow, :backup=>false}' > #==> default: Debug: Failed to load library 'shadow' for feature 'libshadow' > #==> default: Debug: Puppet::Type::User::ProviderDirectoryservice: file > /usr/bin/uuidgen does not exist > #==> default: Debug: Puppet::Type::User::ProviderUser_role_add: file roleadd > does not exist > #==> default: Debug: Puppet::Type::User::ProviderPw: file pw does not exist > #==> default: Debug: Failed to load library 'ldap' for feature 'ldap' > #==> default: Debug: Puppet::Type::User::ProviderLdap: feature ldap is > missing > #==> default: Debug: Using settings: adding file resource 'logdir': > 'File[/var/lib/puppet/log]{:path=>"/var/lib/puppet/log", :mode=>"750", > :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, > :links=>:follow, :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'statedir': > 'File[/var/lib/puppet/state]{:path=>"/var/lib/puppet/state", :mode=>"1755", > :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'rundir': > 'File[/var/lib/puppet/run]{:path=>"/var/lib/puppet/run", :mode=>"1777", > :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'libdir': > 'File[/var/lib/puppet/lib]{:path=>"/var/lib/puppet/lib", > :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'certdir': > 'File[/etc/puppet/ssl/certs]{:path=>"/etc/puppet/ssl/certs", > :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, > :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'ssldir': > 'File[/etc/puppet/ssl]{:path=>"/etc/puppet/ssl", :mode=>"771", > :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, > :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'publickeydir': > 'File[/etc/puppet/ssl/public_keys]{:path=>"/etc/puppet/ssl/public_keys", > :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, > :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'requestdir': > 'File[/etc/puppet/ssl/certificate_requests]{:path=>"/etc/puppet/ssl/certificate_requests", > :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, > :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'privatekeydir': > 'File[/etc/puppet/ssl/private_keys]{:path=>"/etc/puppet/ssl/private_keys", > :mode=>"750", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, > :links=>:follow, :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'privatedir': > 'File[/etc/puppet/ssl/private]{:path=>"/etc/puppet/ssl/private", > :mode=>"750", :owner=>"puppet", :ensure=>:directory, :loglevel=>:debug, > :links=>:follow, :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'clientyamldir': > 'File[/var/lib/puppet/client_yaml]{:path=>"/var/lib/puppet/client_yaml", > :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, > :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'client_datadir': > 'File[/var/lib/puppet/client_data]{:path=>"/var/lib/puppet/client_data", > :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, > :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'clientbucketdir': > 'File[/var/lib/puppet/clientbucket]{:path=>"/var/lib/puppet/clientbucket", > :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, > :backup=>false}' > #==> default: Debug: Using settings: adding file resource 'graphdir': > 'File[/var/lib/puppet/state/graphs]{:path=>"/var/lib/puppet/state/graphs", > :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}' > #==> default: Debug: /File[/var/lib/puppet/log]: Autorequiring > File[/var/lib/puppet] > #==> default: Debug: /File[/var/lib/puppet/state]: Autorequiring > File[/var/lib/puppet] > #==> default: Debug: /File[/var/lib/puppet/run]: Autorequiring > File[/var/lib/puppet] > #==> default: Debug: /File[/var/lib/puppet/lib]: Autorequiring > File[/var/lib/puppet] > #==> default: Debug: /File[/etc/puppet/ssl/certs]: Autorequiring > File[/etc/puppet/ssl] > #==> default: Debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet] > #==> default: Debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring > File[/etc/puppet/ssl] > #==> default: Debug: /File[/etc/puppet/ssl/certificate_requests]: > Autorequiring File[/etc/puppet/ssl] > #==> default: Debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring > File[/etc/puppet/ssl] > #==> default: Debug: /File[/etc/puppet/ssl/private]: Autorequiring > File[/etc/puppet/ssl] > #==> default: Debug: /File[/var/lib/puppet/client_yaml]: Autorequiring > File[/var/lib/puppet] > #==> default: Debug: /File[/var/lib/puppet/client_data]: Autorequiring > File[/var/lib/puppet] > #==> default: Debug: /File[/var/lib/puppet/clientbucket]: Autorequiring > File[/var/lib/puppet] > #==> default: Debug: /File[/var/lib/puppet/state/graphs]: Autorequiring > File[/var/lib/puppet/state] > #==> default: Debug: /File[/etc/puppet]/ensure: created > #==> default: Debug: /File[/etc/puppet/ssl]/ensure: created > #==> default: Debug: /File[/etc/puppet/ssl/private_keys]/ensure: created > #==> default: Debug: /File[/var/lib/puppet/client_data]/ensure: created > #==> default: Debug: /File[/var/lib/puppet/run]/ensure: created > #==> default: Debug: /File[/var/lib/puppet/state]/ensure: created > #==> default: Debug: /File[/var/lib/puppet/state/graphs]/ensure: created > #==> default: Debug: /File[/var/lib/puppet/client_yaml]/ensure: created > #==> default: Debug: /File[/var/lib/puppet/lib]/ensure: created > #==> default: Debug: /File[/var/lib/puppet/clientbucket]/ensure: created > #==> default: Debug: /File[/etc/puppet/ssl/public_keys]/ensure: created > #==> default: Debug: /File[/etc/puppet/ssl/certs]/ensure: created > #==> default: Debug: /File[/var/lib/puppet/log]/ensure: created > #==> default: Debug: /File[/etc/puppet/ssl/private]/ensure: created > #==> default: Debug: /File[/etc/puppet/ssl/certificate_requests]/ensure: > created > #==> default: Debug: Finishing transaction 26591480 > #==> default: Info: Applying configuration version '1430062935' > #==> default: Debug: /Schedule[daily]: Skipping device resources because > running on a host > #==> default: Debug: /Schedule[monthly]: Skipping device resources because > running on a host > #==> default: Debug: /Schedule[hourly]: Skipping device resources because > running on a host > #==> default: Debug: /Schedule[never]: Skipping device resources because > running on a host > #==> default: Debug: /Schedule[weekly]: Skipping device resources because > running on a host > #==> default: Debug: /Schedule[puppet]: Skipping device resources because > running on a host > #==> default: Debug: Finishing transaction 23789760 > #==> default: Debug: Storing state > #==> default: Info: Creating state file /var/lib/puppet/state/state.yaml > #==> default: Debug: Stored state in 0.00 seconds > #==> default: Notice: Finished catalog run in 0.09 seconds > #==> default: Debug: Using settings: adding file resource 'rrddir': > 'File[/var/lib/puppet/rrd]{:path=>"/var/lib/puppet/rrd", :mode=>"750", > :owner=>"puppet", :group=>"puppet", :ensure=>:directory, :loglevel=>:debug, > :links=>:follow, :backup=>false}' > #==> default: Debug: /File[/var/lib/puppet/rrd]/ensure: created > #==> default: Debug: Finishing transaction 25667720 > #==> default: Debug: Received report to process from precise64.localdomain > #==> default: Debug: Processing report from precise64.localdomain with > processor Puppet::Reports::Store > # > # Module directory structure: > # > # hadoop > # |_manifests > # |__javaProvisioner.pp > # |__init.pp > # |_tests > # |__init.pp > #----------------------------------------------------------------------- > > # vagrantfile > > # -*- mode: ruby -*- > # vi: set ft=ruby : > > VAGRANT_API_VERSION=2 > Vagrant.configure(VAGRANT_API_VERSION) do |config| > config.vm.box = "hashicorp/precise64" > config.vm.provision :puppet do |puppet| > puppet.manifests_path = "./hadoop/manifests" > puppet.options = ['--verbose --debug'] > puppet.manifest_file = "init.pp" > end > end > > # javaProvisioner.pp > > class hadoop::javaProvisioner { > group { "puppet": > ensure => "present", > } > > $hadoop_home = "/home/vagrant" > > Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ] } > exec { 'apt-get update': > command => 'apt-get update', > } > > package { "openjdk-6-jdk" : > ensure => present, > require => Exec['apt-get update'], > } > } > > # init.pp > > class hadoop { > include hadoop::javaProvisioner > } > > > -- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- Gareth Rushgrove Web Geek morethanseven.net garethrushgrove.com -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
