2014-08-25 22:24:03 |
Matt Bruzek |
description |
I am doing some testing on charms and I discovered that the gitlab does not deploy on environments with limited network access.
Here is the error from the
2014-08-22 20:21:31 INFO juju-log Installing bundler gem
2014-08-22 20:21:31 INFO install + sudo gem install bundler
2014-08-22 20:23:39 INFO install ERROR: Could not find a valid gem 'bundler' (>= 0) in any repository
From what I can tell gem was not able to find bundler on the network. Since the system has a limited network I am running Juju with proxies. The ubuntu-local-machine-4 has HTTP_PROXY and HTTPS_PROXY environment variables set but they were not used.
I found the command:
sudo gem install --http-proxy $HTTP_PROXY bundler
works and installs the bundler. Therefore I would recommend changing the install hook to use the HTTP_PROXY when available:
GEM_OPTIONS=""
if [ -n "${HTTP_PROXY}" ]; then
GEM_OPTIONS="--http-proxy ${HTTP_PROXY}"
fi
juju-log "Installing bundler gem"
sudo gem install ${GEM_OPTIONS} bundler
I tried the above code and the bundler gem installs, but a curl command fails later in the install hook.
2014-08-22 21:02:37 INFO install + sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/init.d/gitlab
2014-08-22 21:02:37 INFO install % Total % Received % Xferd Average Speed Time Time Time Current
2014-08-22 21:02:37 INFO install Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
2014-08-22 21:02:37 INFO install + sudo chmod +x /etc/init.d/gitlab
2014-08-22 21:02:37 INFO install chmod: cannot access '/etc/init.d/gitlab': No such file or directory
2014-08-22 21:02:37 ERROR juju.worker.uniter uniter.go:486 hook failed: exit status 1
I researched curl and found the -x or --proxy option for curl. I tried using -x and --proxy but was not successful in downloading the file using curl. I was successful downloading the file with wget (that program automatically used the proxy settings). |
I am doing some testing on charms and I discovered that the gitlab does not deploy on environments with limited network access.
Here is the error from the
2014-08-22 20:21:31 INFO juju-log Installing bundler gem
2014-08-22 20:21:31 INFO install + sudo gem install bundler
2014-08-22 20:23:39 INFO install ERROR: Could not find a valid gem 'bundler' (>= 0) in any repository
From what I can tell gem was not able to find bundler on the network. Since the system has a limited network I am running Juju with proxies. The ubuntu-local-machine-4 has HTTP_PROXY and HTTPS_PROXY environment variables set but they were not used.
I found the command:
sudo gem install --http-proxy $HTTP_PROXY bundler
works and installs the bundler. Therefore I would recommend changing the install hook to use the HTTP_PROXY when available:
GEM_OPTIONS=""
if [ -n "${HTTP_PROXY}" ]; then
GEM_OPTIONS="--http-proxy ${HTTP_PROXY}"
fi
juju-log "Installing bundler gem"
sudo gem install ${GEM_OPTIONS} bundler
I tried the code fix listed above and the bundler gem installs! The charm hits another bug and fails in the install hook.
https://bugs.launchpad.net/charms/+source/gitlab/+bug/1360594 |
|