Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'4.9.10' is not a valid version of Puppet #56

Closed
jeff1evesque opened this issue Aug 11, 2017 · 2 comments
Closed

'4.9.10' is not a valid version of Puppet #56

jeff1evesque opened this issue Aug 11, 2017 · 2 comments

Comments

@jeff1evesque
Copy link

jeff1evesque commented Aug 11, 2017

My current Vagrantfile, defines the following puppet version:

## -*- mode: ruby -*-
## vi: set ft=ruby :

## build vagrant instances
Vagrant.configure(2) do |config|
    ## globally configure plugins
    required_plugins = %w(vagrant-r10k vagrant-triggers vagrant-puppet-install)
    plugin_installed = false

    ## Install Vagrant Plugins
    required_plugins.each do |plugin|
        unless Vagrant.has_plugin? plugin
            system "vagrant plugin install #{plugin}"
            plugin_installed = true
        end
    end

    ## Restart Vagrant: if new plugin installed
    if plugin_installed == true
        exec "vagrant #{ARGV.join(' ')}"
    end

    ## general application
    config.vm.define 'main' do |main|
        ## local variables
        atlas_repo          = 'jeff1evesque'
        atlas_box           = 'trusty64'
        box_version         = '1.2.0'
        box_checksum        = '0bf7b36547e38adf0424735c9c638e17'
        box_checksum_type   = 'md5'
        puppet_environment  = 'vagrant'

        ## increase RAM to ensure scrypt doesn't exhaust memory
        main.vm.provider 'virtualbox' do |v|
            v.customize ['modifyvm', :id, '--memory', '1024']
        end

        ## ensure puppet modules directory on the host before 'vagrant up'
        main.trigger.before :up do
            run "mkdir -p puppet/environment/#{puppet_environment}/modules_contrib"
        end

        main.vm.box                        = "#{atlas_repo}/#{atlas_box}"
        main.vm.box_version                = box_version
        main.vm.box_download_checksum      = box_checksum
        main.vm.box_download_checksum_type = box_checksum_type

        ## Ensure puppet installed within guest
        main.puppet_install.puppet_version = '4.9.10'

        ## Create a forwarded port mapping which allows access to a specific port
        ## within the machine from a port on the host machine. In the example below,
        ## accessing "localhost:8080" will access port 80 on the guest machine.
        main.vm.network 'forwarded_port', guest: 5000, host: 8080

        ## Run r10k
        main.r10k.puppet_dir      = "puppet/environment/#{puppet_environment}"
        main.r10k.puppetfile_path = "puppet/environment/#{puppet_environment}/Puppetfile"

        ## Custom Manifest: install needed packages
        main.vm.provision 'puppet' do |puppet|
            puppet.environment_path  = 'puppet/environment'
            puppet.environment       = puppet_environment
            puppet.manifests_path    = "puppet/environment/#{puppet_environment}/manifests"
            puppet.module_path       = [
                "puppet/environment/#{puppet_environment}/modules_contrib",
                "puppet/environment/#{puppet_environment}/modules",
            ]
            puppet.manifest_file     = 'site.pp'
            puppet.hiera_config_path = 'hiera.yaml'
        end

        ## clean up files on the host after 'vagrant destroy'
        main.trigger.after :destroy do
            run 'rm -Rf log/database'
            run 'rm -Rf log/application'
            run 'rm -Rf log/webcompiler'
            run 'rm -Rf log/webserver'
            run 'rm -Rf build'
            run 'rm -Rf interface/static/css'
            run 'rm -Rf interface/static/img'
            run 'rm -Rf interface/static/js'
            run "rm -Rf puppet/environment/#{puppet_environment}/modules_contrib"
            run 'rm -Rf src/node_modules'
            run 'rm -f src/js/.gitignore'
            run 'rm -f src/js/content.js'
            run 'find . -name "*.pyc" -type f -exec rm -r {} +'
            run 'find . -name __pycache__ -type d -exec rm -r {} +'
            run 'find . -name .cache -type d -exec rm -r {} +'
        end
    end
end

Yet, the corresponding vagrant up, yields the following traceback:

$vagrant up
An error occurred during installation of VirtualBox Guest Additions 5.1.22. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
vboxadd.sh: Starting the VirtualBox Guest Additions.

Could not find the X.Org or XFree86 Window System, skipping.
vboxadd-service.sh: Starting VirtualBox Guest Addition service.
VBoxService: error: VbglR3Init failed with rc=VERR_FILE_NOT_FOUND
==> main: Checking for guest additions in VM...
==> main: Mounting shared folders...
    main: /vagrant => /Users/jeffrey/web-projects/machine-learning
    main: /tmp/vagrant-puppet/environments => /Users/jeffrey/web-projects/machine-learning/puppet/environment
    main: /tmp/vagrant-puppet/modules-302a9377efe7254a1851d0cd3c905a3d => /Users/jeffrey/web-projects/machine-learning/puppet/environment/vagrant/modules_contrib
    main: /tmp/vagrant-puppet/modules-38a5dda991a5b6cbc3d41065b4ce26c3 => /Users/jeffrey/web-projects/machine-learning/puppet/environment/vagrant/modules
    main: /tmp/vagrant-puppet/manifests-3def0df79d1c452de6a52de4d163c7cc => /Users/jeffrey/web-projects/machine-learning/puppet/environment/vagrant/manifests
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vagrant-puppet-install:
*             '4.9.10' is not a valid version of Puppet.

            A list of valid versions can be found at: http://docs.puppetlabs.com/release_notes/
@jeff1evesque jeff1evesque changed the title Vagrant version not accepted '4.9.10' is not a valid version of Puppet Aug 11, 2017
@petems
Copy link
Owner

petems commented Aug 11, 2017

This is working as intended, 4.9.10 is not a valid version of Puppet 👍

https://rubygems.org/gems/puppet/versions/
4.10.0 - April 05, 2017 universal-darwin (2.8 MB)
4.9.4 - March 09, 2017 (2.82 MB)
4.9.4 - March 09, 2017 x64-mingw32 (2.82 MB)
4.9.4 - March 09, 2017 x86-mingw32 (2.82 MB)
4.9.4 - March 09, 2017 universal-darwin (2.82 MB)
4.9.3 - February 24, 2017 (2.82 MB)

Last version was 4.9.4
https://docs.puppet.com/puppet/4.9/release_notes.html#puppet-494

So you can fix by changing to:

main.puppet_install.puppet_version = '4.9.4'

@petems petems closed this as completed Aug 11, 2017
@jeff1evesque
Copy link
Author

jeff1evesque commented Aug 11, 2017

Ah, yes. I originally had 4.9.3, which produced the same error output as above, last night. Then, I had incorrectly tried 4.9.10, instead of 4.10.0. I was a little surprised to get that error message, with the current Vagrantfile. But, wasn't able to reproduce the error again, this morning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants