Comments (17)
I see that there is an open feature for using HTTP_PROXY(#33). Is that going to take the place of this feature?
I am wondering because at my company we do not always have proxy access to the internet so this would not fix the problem. We use an internal gem repository so being able to change the source is necessary.
also is there any update on the progress of this?
from busser.
As a current workaround, I bake this gemrc after my omnibus chef installs.
cat > /opt/chef/embedded/etc/gemrc <<EOF
---
:sources:
- http://my-internal-rubygems.hostname/
EOF
This also points "gem install busser" done by test-kitchen to use this internal gem repository.
from busser.
Did a bit more poking around and "busser plugin install " doesn't respect the gemrc. So plugin installation won't use the proxy repositories.
from busser.
@aespinosa I seem to be up against the same issue. Have you found a way to work around that?
--Peter
from busser.
How about writing that out to /root/.gemrc
instead?
from busser.
I was just discussing this with a customer and they're hitting the same issue because they can't access rubygems.org so Busser can't install plugins.
@irvingpop in answer to your question, it looks like here that gemrc is being specifically unset and those any attempt to use a gemrc file is ignored. https://github.com/test-kitchen/busser/blob/master/lib/busser/command/setup.rb#L125
from busser.
but even with $GEMRC
being unset, gem should still look at ~/.gemrc
right?
from busser.
@irvingpop I think this is because of my artisinal RubyGems installation code--seems like the .gemrc
loading is other code.
In short though, we need to make this work at a minimum. Ideally, I'd also like the busser
command to honor http_proxy
and https_proxy
where appropriate.
from busser.
Note that I'm only tagging it "New Feature" as I expect it'll be a bit more work than a line or two, but necessary nonetheless.
from busser.
+1, darn proxies!
from busser.
is there any update on when this feature might be available?
from busser.
Also we need the ability to test busser plugins (and mods to existing plugins) without having to publish to rubygems. For the provisioner plugins that get installed on your workstation this is easy as you just install manually from a file. I suppose after running the verify you can then go onto the server and install a new from a gem file you copy, but all a bit manual....
from busser.
We need this as well at my workplace because our Test Kitchen instances on EC2 cannot access RubyGems.org. Any update on workarounds or when this might be implemented?
from busser.
This is an issue at my workplace also. The idea of busser honoring http_proxy and https_proxy would be fabulous. I too would appreciate any potential workarounds or status of when this change would be implemented.
from busser.
@CraigAdams I fixed it for us by writing out /tmp/verifier/bin/busser
and having it not use the busser
script for installing gems. After some spelunking, it turns out that the busser gem explicitly unsets GEMRC
and RUBYOPTS
from the environment, purportedly to ensure that it's running in a clean gem environment. This was problematic for us because we needed it to use a custom gemrc
for various reasons, as well as getting it all to work with a proxy.
Since we're using kitchen-ec2
exclusively, I took advantage of the driver.user_data
setting in the .kitchen.yml
file to do this. Here's the relevant parts:
driver:
user_data: |
mkdir -p /tmp/verifier
cat <<EOF > /tmp/verifier/gemrc
<CUSTOM GEMRC FOR BUSSER>
EOF
mkdir -p /tmp/verifier/bin
cat <<EOF > /tmp/verifier/bin/busser
#!/usr/bin/env sh
export BUSSER_ROOT="/tmp/verifier"
export GEMRC="/tmp/verifier/gemrc"
export GEM_HOME="/tmp/verifier/gems"
export GEM_PATH="/tmp/verifier/gems"
export GEM_CACHE="/tmp/verifier/gems/cache"
export HTTP_PROXY="<HTTP PROXY URL>"
export HTTPS_PROXY="<HTTPS PROXY URL>"
export NO_PROXY="<NO PROXY STRING>"
export http_proxy=$HTTP_PROXY
export https_proxy=$HTTPS_PROXY
export no_proxy=$NO_PROXY
<ANY OTHER SPECIAL ENVIRONMENT VARIABLES YOU NEED>
# Use raw RubyGems to install busser plugins
if [[ $1 == 'plugin' ]] && [[ $2 == 'install' ]]; then
shift 2
exec "/opt/chef/embedded/bin/gem" "install" "$@"
else
exec "/opt/chef/embedded/bin/ruby" "/tmp/verifier/gems/bin/busser" "$@"
fi
EOF
chmod 0755 /tmp/verifier/bin/busser
chown -R ec2-user:ec2-user /tmp/verifier
YMMV, but this has been working like a charm for us.
from busser.
@fnichol Any idea on when this will be released?
I have been working around this by pre-installing the busser (v0.7.1) and busser-serverspec gems in the /tmp/verifier directory on my box files.
But, the "busser plugin install busser-serverspec" command still attempts to go to rubygems.org (due to the latest_gem_version
method in lib/busser/rubygems.rb
), regardless of what is in the gemrc file.
Using v0.7.2-dev version of busser gets around the problem with detecting the busser-serverspec is already pre-installed on the box file.
from busser.
Closing due to inactivity.
If this is still an issue please reopen or open another issue.
Thanks,
Test-Kitchen Maintainers
from busser.
Related Issues (20)
- readlink command missing '-f' in binstub? HOT 2
- plugin_usage broken link at README.md.erb HOT 2
- Investigate support for running suites as specific non-root users HOT 2
- Testing LWRPs, not recipes HOT 4
- kitchen test with serverspec fails: `run_ruby_script!': undefined method `success?' for nil:NilClass (NoMethodError) HOT 1
- Unable to resolve dependencies: busser requires thor (<= 0.19.0) HOT 4
- "busser plugin install" doesn't respect system gemrc HOT 1
- suite_cleanup does not work on windows HOT 1
- Binstubs in 'verifier' do not point at a valid ruby interpreter on Windows HOT 6
- Support for sharing code between test suites HOT 1
- Busser only uses /tmp/verfier/gems as it's local source HOT 2
- Add a busser for testinfra HOT 4
- How to configure busser plugins HOT 2
- New Serverspec Gem Breaks Older Chef Versions HOT 8
- Busser needs to be Proxy aware HOT 6
- test group(plugin) priority HOT 4
- Busser issues when /tmp is mounted with noexec HOT 3
- Permission denied - stub_specification HOT 2
- Kitchen and Busser are ignoring the http_proxy parameter (and it doesn't have a gem source option) HOT 5
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 busser.