【问题标题】:Updating Bitnami Gitlab - Documentation lacking clarity更新 Bitnami Gitlab - 文档不清晰
【发布时间】:2016-10-26 05:57:00
【问题描述】:

我正在尝试在 this guide 之后将 GitLab CE 的本地安装从 v8.9.6 更新到 v8.13.1

我已经完成了第二步的第一步:

cd /opt/bitnami/apps/gitlab/htdocs
git fetch --all
git checkout -- db/schema.rb Gemfile.lock

然后在下一部分我尝试结帐到 v8.13.1 并收到以下错误:

所以文档似乎缺少一个步骤。

此安装中有大约 100 个存储库,因此尽管有备份,但我还是非常小心,但显然我需要存储和应用。

任何人都知道可能缺少的步骤是什么,或者我是否以某种方式误读了此文档

git diff

reece@stead-lane-gitlab-vm:/opt/bitnami/apps/gitlab/htdocs$ git diff
diff --git a/Gemfile b/Gemfile
index 7786982..55cd68c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -29,7 +29,7 @@ gem 'omniauth-facebook',      '~> 3.0.0'
 gem 'omniauth-github',        '~> 1.1.1'
 gem 'omniauth-gitlab',        '~> 1.0.0'
 gem 'omniauth-google-oauth2', '~> 0.2.0'
-gem 'omniauth-kerberos',      '~> 0.3.0', group: :kerberos
+#gem 'omniauth-kerberos',      '~> 0.3.0', group: :kerberos
 gem 'omniauth-saml',          '~> 1.6.0'
 gem 'omniauth-shibboleth',    '~> 1.2.0'
 gem 'omniauth-twitter',       '~> 1.2.0'
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 474041e..653ba3c 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -1,4 +1,5 @@
 # encoding: utf-8
+# encoding: utf-8
 module CommitsHelper
   # Returns a link to the commit author. If the author has a matching user and
   # is a member of the current @project it will link to the team member page.
diff --git a/bin/mail_room b/bin/mail_room
index 74a84f5..618c949 100755
--- a/bin/mail_room
+++ b/bin/mail_room
@@ -1,50 +1,16 @@
-#!/bin/sh
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'mail_room' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#

-cd $(dirname $0)/..
-app_root=$(pwd)
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+  Pathname.new(__FILE__).realpath)
:...skipping...
diff --git a/Gemfile b/Gemfile
index 7786982..55cd68c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -29,7 +29,7 @@ gem 'omniauth-facebook',      '~> 3.0.0'
 gem 'omniauth-github',        '~> 1.1.1'
 gem 'omniauth-gitlab',        '~> 1.0.0'
 gem 'omniauth-google-oauth2', '~> 0.2.0'
-gem 'omniauth-kerberos',      '~> 0.3.0', group: :kerberos
+#gem 'omniauth-kerberos',      '~> 0.3.0', group: :kerberos
 gem 'omniauth-saml',          '~> 1.6.0'
 gem 'omniauth-shibboleth',    '~> 1.2.0'
 gem 'omniauth-twitter',       '~> 1.2.0'
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 474041e..653ba3c 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -1,4 +1,5 @@
 # encoding: utf-8
+# encoding: utf-8
 module CommitsHelper
   # Returns a link to the commit author. If the author has a matching user and
   # is a member of the current @project it will link to the team member page.
diff --git a/bin/mail_room b/bin/mail_room
index 74a84f5..618c949 100755
--- a/bin/mail_room
+++ b/bin/mail_room
@@ -1,50 +1,16 @@
-#!/bin/sh
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'mail_room' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#

-cd $(dirname $0)/..
-app_root=$(pwd)
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+  Pathname.new(__FILE__).realpath)

-mail_room_pidfile="$app_root/tmp/pids/mail_room.pid"
-mail_room_logfile="$app_root/log/mail_room.log"
:...skipping...
diff --git a/Gemfile b/Gemfile
index 7786982..55cd68c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -29,7 +29,7 @@ gem 'omniauth-facebook',      '~> 3.0.0'
 gem 'omniauth-github',        '~> 1.1.1'
 gem 'omniauth-gitlab',        '~> 1.0.0'
 gem 'omniauth-google-oauth2', '~> 0.2.0'
-gem 'omniauth-kerberos',      '~> 0.3.0', group: :kerberos
+#gem 'omniauth-kerberos',      '~> 0.3.0', group: :kerberos
 gem 'omniauth-saml',          '~> 1.6.0'
 gem 'omniauth-shibboleth',    '~> 1.2.0'
 gem 'omniauth-twitter',       '~> 1.2.0'
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 474041e..653ba3c 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -1,4 +1,5 @@
 # encoding: utf-8
+# encoding: utf-8
 module CommitsHelper
   # Returns a link to the commit author. If the author has a matching user and
   # is a member of the current @project it will link to the team member page.
diff --git a/bin/mail_room b/bin/mail_room
index 74a84f5..618c949 100755
--- a/bin/mail_room
+++ b/bin/mail_room
@@ -1,50 +1,16 @@
-#!/bin/sh
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'mail_room' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#

-cd $(dirname $0)/..
-app_root=$(pwd)
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+  Pathname.new(__FILE__).realpath)

-mail_room_pidfile="$app_root/tmp/pids/mail_room.pid"
-mail_room_logfile="$app_root/log/mail_room.log"
-mail_room_config="$app_root/config/mail_room.yml"
+require 'rubygems'
+require 'bundler/setup'

-get_mail_room_pid()
-{
:...skipping...
diff --git a/Gemfile b/Gemfile
index 7786982..55cd68c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -29,7 +29,7 @@ gem 'omniauth-facebook',      '~> 3.0.0'
 gem 'omniauth-github',        '~> 1.1.1'
 gem 'omniauth-gitlab',        '~> 1.0.0'
 gem 'omniauth-google-oauth2', '~> 0.2.0'
-gem 'omniauth-kerberos',      '~> 0.3.0', group: :kerberos
+#gem 'omniauth-kerberos',      '~> 0.3.0', group: :kerberos
 gem 'omniauth-saml',          '~> 1.6.0'
 gem 'omniauth-shibboleth',    '~> 1.2.0'
 gem 'omniauth-twitter',       '~> 1.2.0'
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 474041e..653ba3c 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -1,4 +1,5 @@
 # encoding: utf-8
+# encoding: utf-8
 module CommitsHelper
   # Returns a link to the commit author. If the author has a matching user and
   # is a member of the current @project it will link to the team member page.
diff --git a/bin/mail_room b/bin/mail_room
index 74a84f5..618c949 100755
--- a/bin/mail_room
+++ b/bin/mail_room
@@ -1,50 +1,16 @@
-#!/bin/sh
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'mail_room' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#

-cd $(dirname $0)/..
-app_root=$(pwd)
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+  Pathname.new(__FILE__).realpath)

-mail_room_pidfile="$app_root/tmp/pids/mail_room.pid"
-mail_room_logfile="$app_root/log/mail_room.log"
-mail_room_config="$app_root/config/mail_room.yml"
+require 'rubygems'
+require 'bundler/setup'

-get_mail_room_pid()
-{
-  local pid=$(cat $mail_room_pidfile)
-  if [ -z "$pid" ] ; then
-    echo "Could not find a PID in $mail_room_pidfile"
-    exit 1
-  fi
-  mail_room_pid=$pid
-}
:...skipping...
diff --git a/Gemfile b/Gemfile
index 7786982..55cd68c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -29,7 +29,7 @@ gem 'omniauth-facebook',      '~> 3.0.0'
 gem 'omniauth-github',        '~> 1.1.1'
 gem 'omniauth-gitlab',        '~> 1.0.0'
 gem 'omniauth-google-oauth2', '~> 0.2.0'
-gem 'omniauth-kerberos',      '~> 0.3.0', group: :kerberos
+#gem 'omniauth-kerberos',      '~> 0.3.0', group: :kerberos
 gem 'omniauth-saml',          '~> 1.6.0'
 gem 'omniauth-shibboleth',    '~> 1.2.0'
 gem 'omniauth-twitter',       '~> 1.2.0'
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 474041e..653ba3c 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -1,4 +1,5 @@
 # encoding: utf-8
+# encoding: utf-8
 module CommitsHelper
   # Returns a link to the commit author. If the author has a matching user and
   # is a member of the current @project it will link to the team member page.
diff --git a/bin/mail_room b/bin/mail_room
index 74a84f5..618c949 100755
--- a/bin/mail_room
+++ b/bin/mail_room
@@ -1,50 +1,16 @@
-#!/bin/sh
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'mail_room' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#

-cd $(dirname $0)/..
-app_root=$(pwd)
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+  Pathname.new(__FILE__).realpath)

-mail_room_pidfile="$app_root/tmp/pids/mail_room.pid"
-mail_room_logfile="$app_root/log/mail_room.log"
-mail_room_config="$app_root/config/mail_room.yml"
+require 'rubygems'
+require 'bundler/setup'

-get_mail_room_pid()
-{
-  local pid=$(cat $mail_room_pidfile)
-  if [ -z "$pid" ] ; then
-    echo "Could not find a PID in $mail_room_pidfile"
-    exit 1
-  fi
-  mail_room_pid=$pid
-}
-
-start()
-{
-  bin/daemon_with_pidfile $mail_room_pidfile bundle exec mail_room -q -c $mail_room_config >> $mail_room_logfile 2>&1
-}
:...skipping...
diff --git a/Gemfile b/Gemfile
index 7786982..55cd68c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -29,7 +29,7 @@ gem 'omniauth-facebook',      '~> 3.0.0'
 gem 'omniauth-github',        '~> 1.1.1'
 gem 'omniauth-gitlab',        '~> 1.0.0'
 gem 'omniauth-google-oauth2', '~> 0.2.0'
-gem 'omniauth-kerberos',      '~> 0.3.0', group: :kerberos
+#gem 'omniauth-kerberos',      '~> 0.3.0', group: :kerberos
 gem 'omniauth-saml',          '~> 1.6.0'
 gem 'omniauth-shibboleth',    '~> 1.2.0'
 gem 'omniauth-twitter',       '~> 1.2.0'
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 474041e..653ba3c 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -1,4 +1,5 @@
 # encoding: utf-8
+# encoding: utf-8
 module CommitsHelper
   # Returns a link to the commit author. If the author has a matching user and
   # is a member of the current @project it will link to the team member page.
diff --git a/bin/mail_room b/bin/mail_room
index 74a84f5..618c949 100755
--- a/bin/mail_room
+++ b/bin/mail_room
@@ -1,50 +1,16 @@
-#!/bin/sh
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'mail_room' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#

-cd $(dirname $0)/..
-app_root=$(pwd)
+require 'pathname'
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+  Pathname.new(__FILE__).realpath)

-mail_room_pidfile="$app_root/tmp/pids/mail_room.pid"
-mail_room_logfile="$app_root/log/mail_room.log"
-mail_room_config="$app_root/config/mail_room.yml"
+require 'rubygems'
+require 'bundler/setup'

-get_mail_room_pid()
-{
-  local pid=$(cat $mail_room_pidfile)
-  if [ -z "$pid" ] ; then
-    echo "Could not find a PID in $mail_room_pidfile"
-    exit 1
-  fi
-  mail_room_pid=$pid
-}
-
-start()
-{
-  bin/daemon_with_pidfile $mail_room_pidfile bundle exec mail_room -q -c $mail_room_config >> $mail_room_logfile 2>&1
-}
-
-stop()
-{

【问题讨论】:

  • 你是不是碰巧手动修改了这三个文件?如果是这样,那么最常见的当然是stash和pop吧。
  • 不,我绝对没有触摸/修改任何东西,按照指示前往发球台,没有偏离路线,不幸的是,我导致了上述问题。
  • 查看指南,对于Gemfile,可能与 HEAD 不同,因为 bitnami 将使用它进行离线安装。关于另外两个文件,可以试试看是不是和HEAD有区别还是只是空格有区别?
  • 感谢调查@kucing_terbang 我跑了git diff 并用回复更新了我的问题

标签: git gitlab bitnami


【解决方案1】:

如您所说,您的错误是由于我们的文件不够清晰。对此我们深表歉意,我们会尽快将其澄清。

还有一些我们应该更正的地方。在第 6 步中,您必须执行 bundle 命令,并且它很可能会崩溃。那是因为我们告诉您退出git 用户,但这是稍后需要的。因此,在执行之前执行sudo su git。

感谢您使用我们的产品!希望我的解决方案对您有所帮助。

编辑:为了迁移到 8.13.1 必须执行的更正是:

必须在 Gemfile.lock 和 Gemfile 中更改雨滴、独角兽和 unicorn-worker-killer gem 的版本,因为最新版本的构建与我们的 ruby​​ 版本会崩溃。 Raindrops 必须使用0.15.0,Unicorn 应该使用0.4.9 和 Unicorn-worker-killer 0.4.2。

在步骤 2 中执行结帐步骤之前,您必须使用 git stash 存储您的更改,执行结帐并弹出隐藏的内容,解决出现的任何合并问题。 (我只需要执行git rm /opt/bitnami/apps/gitlab/htdocs/config/gitlab.yml.example 就可以了)。

【讨论】:

  • 不确定这里发生了什么,我完全按照说明(与您的合并)完成了所有步骤,但是当我想要 8.13.1 时,我的 Gitlab 版本仍然是 8.9.6
  • 唯一提到target version (8.13.1) 的地方是第 7 步。整个步骤是否应该在第 7 步和第 8 步之间?它让我比较了当前 目标版本的配置文件,但我没有看到任何从 8.13-stable 获得任何东西的步骤
  • 您好,抱歉回复晚了。我正在使用升级过程的正确答案更新原始回复。你能检查一下吗?如果您在此过程中发现任何问题,请告诉我们。我可以毫无问题地更新到 8.13.1。
  • 谢谢dave,现在升级好了!感谢您的时间
  • 一个shell脚本会不会太问了?有什么理由不能将这一切整合到一个脚本中,用户可以在任何给定时间升级到最新的稳定版本?这是一种“再见 bitnami,你太难了”的交易。
【解决方案2】:

我试着总结一下完整的流程修改。

在第 2 步中,将 git checkout v8.x.y 替换为:

git stash
git checkout v8.x.y
git stash apply

第 4 步有一些不清楚的地方:bitnami 包已经升级到 1.5.3。 我真的需要去 1.6 吗?

另外,下载的go必须在/usr/local,它有硬编码的东西,依赖于/usr/local/go。您无法将其安装在其他任何地方。

export PATH=$PATH:/usr/local/go/bin 应该是 export PATH=/usr/local/go/bin:$PATH 以便新安装的 go 优先于系统中的 go。

在第 6 步,您应该从用户“git”开始:

sudo su git
bundle install --without development test mysql --deployment

然后:

bitnami@git:/opt/bitnami/apps/gitlab/htdocs$ sudo su git
git@git:/opt/bitnami/apps/gitlab/htdocs$ bundle install --without development test mysql --deployment
Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.

You have deleted from the Gemfile:
* omniauth-kerberos (~> 0.3.0)

还有什么遗漏?

【讨论】:

  • 我在 Gemfile 中取消了 gem 'omniauth-kerberos', '~> 0.3.0', group: :kerberos 行的注释,并且 gems 已经正确安装......
【解决方案3】:

ofaurax 说你必须取消注释宝石

'omniauth-kerberos', '~> 0.3.0', group: :kerberos

OR 让 kerberos 安装库具有类似(取决于您的发行版):

sudo apt-get install -y libpam-krb5 libkrb5-dev`.

从 8.13 升级到 8.14 怎么样?

我们必须在 Gemfile.lock 中使用相同的技巧:

raindrops (0.15.0)
unicorn (0.4.9)
unicorn-worker-killer (0.4.2)

但是

看板返回 404(这是错误之一...)

与 Zanderwar 相同的问题。 bitnami 团队何时应该提供从 8.11 到更高版本的修复和打包升级计划?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-03-28
    • 2013-05-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-22
    • 2013-02-09
    相关资源
    最近更新 更多