gitlab does not deploy in limited network environments

Bug #1360454 reported by Matt Bruzek
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gitlab (Juju Charms Collection)
New
Low
Unassigned

Bug 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 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

Tags: audit ppc64el
Matt Bruzek (mbruzek)
tags: added: audit
tags: added: ppc64le
Matt Bruzek (mbruzek)
Changed in gitlab (Juju Charms Collection):
importance: Undecided → Medium
description: updated
Matt Bruzek (mbruzek)
tags: added: ppc64el
removed: ppc64le
tags: added: ppc64le
tags: removed: ppc64le
Revision history for this message
Johnny Shieh (jshieh) wrote :

Can you confirm if this is a ppc64 issue or a gitlab - networking - ubuntu issue? If non-ppc64el, can we remove ppc64el tag?

Revision history for this message
Johnny Shieh (jshieh) wrote :

When this charm was tested on x86 and Power (both on trusty), since there is no trusty charm, it deferred to precise and attempted to install precise.

On x86, it installed and is up. On Power, it fails out of the gate:

machine-0: 2015-04-13 18:44:23 ERROR juju.provisioner provisioner_task.go:531 cannot start instance for machine "5": failed to retrieve the template to clone: cannot determine cached image URL: cannot determine LXC image URL: cannot determine LXC image URL: failed find entry in https://cloud-images.ubuntu.com/query/precise/server/released-dl.current.txt
machine-0: : exit status 1: cannot determine LXC image URL: failed find entry in https://cloud-images.ubuntu.com/query/precise/server/released-dl.current.txt
machine-0: : exit status 1

So, two problems:
a) no trusty version for both platforms
b) fails on precise, as precise isn't a supported version for Power anyway.

Still a valid ppc64el bug someone needs to port to Power.

Revision history for this message
Antonio Rosales (arosales) wrote :

Collaborating with IBM this is an interesting workload, but not a high priority atm.

If there are any folks interested in enabling Power8 LE support for gitlab please comment here. If there are no comments we'll close out this bug for Power8 LE support enablment.

-thanks,
Antonio

Changed in gitlab (Juju Charms Collection):
importance: Medium → Low
Revision history for this message
Mahesh Waidande (mahesh-waidande1248) wrote :
Download full text (4.1 KiB)

I am working on porting gitlab charm for Ubuntu trusty on ppc64le architecture I have few observations regarding existence/presence of gitlab charm on various Ubuntu distributions.
a. No trusty version of charm is present.
b. Gitlab charm failed on precise for ppc64le, as there were no base image is available for precise on https://cloud-images.ubuntu.com site. ( https://cloud-images.ubuntu.com/query/precise/server/released-dl.current.txt page contain list of base images available for precise )

I am able to port gitlab charm, originally made for precise to an Ubuntu trusty without doing changes in hook scripts.

I have followed below instructions to deploy gitlab charm on Ubuntu trusty environment. I am using Ubuntu 15.04 as host and on top of that I have deployed various charms.
1. Setup juju environment using instructions given in below page.
     https://jujucharms.com/docs/stable/getting-started
2. Create directory called ‘trusty’ under home directory
     $ mkdir ~/trusty
3. Inside ‘trusty’ directory fetch gitlab charm source using juju get command
     $ cd ~/trusty
     $ juju charm get cs:precise/gitlab-5
4. Deploy giltab charm using juju deploy command
     $ juju deploy --repository=/home/test local:trusty/gitlab

I followed same instructions to deploy mysql charm for trusty. After deploying both the charms I have decided to test them, so I tried to add relation between mysql and gitlab charm but at the time of creating relation I encountered an error ‘Failed to build gem native extension’.

When we add relation using (juju add-relation) command internally hook/db-relation-changed script gets executed and performs various tasks like installations of all necessary packages, configure it, expose some ports etc. AT the time of adding relation between mysql and gitlab charm hook/db-relation-changed script tried to install ‘charlock_holmes’ gem of version 0.6.9 on Ubuntu trusty container. This (0.6.9) particular version is not compatible with Ubuntu trusty and throws ‘Failed to build gem native extension’ error when script try to install it on trusty.

I have done some experiments with ‘charlock_holmes’ gem and found that version 0.7.0 and all above versions are compatible with Ubuntu trusty so they can be easily installed on trusty.

hook/db-relation-changed script refers ‘charlock_holmes’ gem two times. First time script directly installs ‘charlock_holmes’ gem version 0.6.9 using ‘gem install’ command and second time while executing command ‘sudo -u gitlab -H bundle install --deployment --without development test postgres’, this command triggers installation of ‘charlock_holmes’ gem version 0.6.9 on Ubuntu trusty.

‘sudo -u gitlab -H bundle install --deployment --without development test postgres’ command triggers installations of various gem including ‘grit_ext’ gem which has dependency on ‘charlock_holmes’ gem. ‘grit_ext’ gem spec file (grit_ext.gemspec) https://github.com/gitlabhq/grit_ext/blob/master/grit_ext.gemspec contain an entry for ‘charlock_holmes’ gem with version 0.6.9 so at a time installation of ‘grit_ext’ gem it fetches ‘charlock_holmes’ gem and tries to install it on Ubuntu trusty as version ...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.