Comments (12)
unfortunately on centos 6 puppet will only work on ruby 187 while many of the tools like serverspec etc need ruby 1.9 or above.
using centos 7 puppet using ruby 2.1 i think which is much better.
ubuntu has long stopped using ruby 187 so that is ok.
The easiest way to add a new version of ruby to centos 6 that will co-exist with a version already installed via yum is to Install ruby via SCL
this allows you to install ruby 193 even if ruby 187 is installed
my kitchen_ansible code does this:
see https://github.com/neillturner/kitchen-ansible/blob/master/lib/kitchen/provisioner/ansible_playbook.rb
and more info
http://wiki.centos.org/AdditionalResources/Repositories/SCL
I've also install gitlab (a ruby on rail app) via https://github.com/sbadia/puppet-gitlab
this install rbenv to install a different ruby version for the application so this is a way to do it
if you need it for an application.
from kitchen-puppet.
If you install puppet as a ruby gem, it will use the version of ruby inside that ruby environment that the gem is installed as. One way around this, is to install puppet during test-kitchen provisioning, such that the kitchen-puppet
provisioner doesn't install puppet. You can do this with vagrant, by passing in a custom Vagrantfile template that contains an extra inline shell provisioner to install the version of puppet+ruby that you want. Or you can use Docker and add extra RUN
statements during the docker image creation with the kitchen-docker
driver.
I've used both to install set versions of puppet without relying on the kitchen-puppet
provisioner to install puppet.
from kitchen-puppet.
@metmajer were you able to solve this issue with a custom vagrantfile template, and/or a different solution?
from kitchen-puppet.
I am currently trying to work out a solution that works for me. I'll promise to close the issue when I have come up with something and document it here. Thanks!
from kitchen-puppet.
@grubernaut I have tried to follow your approach on providing a Docker image that has ruby
(v2.2.0) and puppet
(v4.2.1) installed as a gem. However, kitchen-puppet
does not detect the puppet installation:
- The Docker container I prepared contains a symlink to
puppet
in/usr/bin/puppet
:
# ls -la /usr/bin/puppet
/usr/bin/puppet -> /root/.rbenv/versions/2.2.0/bin/puppet
and also a lookup using which
returns a proper result:
# which puppet
/root/.rbenv/shims/puppet
- When I run
kitchen converge
, I do see the following lines in the output:
Installing puppet from yum on centos
which: no puppet in (/usr/local/bin:/bin:/usr/bin)
...
---> Package puppet.noarch 0:3.8.2-1.el6 will be installed
...
--> Processing Dependency: ruby >= 1.8.7 for package: puppet-3.8.2-1.el6.noarch
I am using the latest kitchen-puppet
(v1.0.32). The Docker image I have come up with can be inspected here: https://github.com/dynaTrace/Dynatrace-Docker-Testing/tree/master/CentOS-6-Puppet.
Any ideas what I could change? Thanks!
from kitchen-puppet.
In my current org's setup, we install puppet via gem, and the binary is located at /usr/local/bin
.
Maybe this would allow kitchen-puppet
to see the binary?
from kitchen-puppet.
Here are some findings:
- symbolic links don't work, use a
ln
instead ofln -s
- link puppet into
/usr/bin
not/usr/local/bin
, as puppet will execute undersudo
and sudo won't find any binaries in/usr/local/bin
as it is not configured as a sudo `secure_path``
This will allow puppet apply
to execute under sudo
. Right now, I am getting the following error:
**Error: Could not parse application options: invalid option: --manifestdir=/tmp/kitchen/manifests**
...
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [ sudo -E puppet apply /tmp/kitchen/manifests/server/init.pp --modulepath=/tmp/kitchen/modules --manifestdir=/tmp/kitchen/manifests --fileserverconfig=/tmp/kitchen/fileserver.conf
Seems like --manifestdir
is gone for good. This probably requires a change in kitchen-puppet
. Any clue which version can safely be used?
from kitchen-puppet.
Ah looks like manifestdir
was deprecated in puppet4. We'll have to change the way this is called in kitchen-puppet
.
Opening a new issue for this bug
from kitchen-puppet.
Yup. Please observe that --manifestdir
is set even if provisioner.manifests_path
is not set in .kitchen.yml
. Maybe this could be a quick fix if you only set it if it's explicitly defined.
from kitchen-puppet.
Yup, looks like that is the case
https://github.com/neillturner/kitchen-puppet/blob/master/lib/kitchen/provisioner/puppet_apply.rb#L674
Although I'm unsure why the check is for puppet_environment
instead of manifest_dir
from kitchen-puppet.
Note: if you just omit the provisioner.manifests_path
, the test manifests (e.g. in test/integration/
do not get copied into the VM. I have commented out https://github.com/neillturner/kitchen-puppet/blob/master/lib/kitchen/provisioner/puppet_apply.rb#L674 and provisioning runs with puppet 4.2.1.
from kitchen-puppet.
Good to know, thanks!
I'm sure someone will work on this issue shortly. If not, I should be able to get to it next week, but am fairly swamped this week
from kitchen-puppet.
Related Issues (20)
- Passing custom facts to provisioner that has a hash results in garbage values HOT 1
- No example of facter_file HOT 3
- dependency problems HOT 2
- sync environments dir HOT 3
- exported resources/storeconfigs HOT 1
- Don't copy unneeded files when testing a Puppet module HOT 2
- weird interaction with hiera? HOT 1
- Make puppet_coll_remote_path useable with require_puppet_collections == false HOT 4
- Running specific modules by overriding in command line HOT 1
- fixtures for rspec-puppet cause recursive copy during transferring files stage HOT 1
- puppet release package has been removed from repo HOT 2
- faraday gem conflict - how can I resolve this? HOT 2
- Allow test-kitchen 2.0.0 HOT 2
- puppet collections repo is incorrect HOT 1
- Puppet command not found error HOT 2
- Support for hiera_writer_files on different levels
- apt-transport-https missing HOT 1
- nil `basedir` when instantiating R10K::Puppetfile HOT 1
- How could I upgrade ruby version 2.3 inside puppet agent HOT 1
- debug? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kitchen-puppet.