c3ntik's picture

Good day! Tell me how to update the old version? to the current one.
Where did I find an article with a patch for updating, but now I can not find it.

Gitlab, TurnKey GNU/Linux 14.2 / Debian 8.8 Jessie

Forum: 
Jeremy Davis's picture

Hi there.

i have some mixed news for you. The bad is that it's a PITA to upgrade. The good is that you're not the first to attempt this and one previous user documented it really carefully. So you should be able to follow that.

For starters, have a look at this post. It's a response to a somewhat similar question. Hopefully that gives enough to get you started?!

If you have questions or hit issues, please do not hesitate to ask. It's probably best if you continue to post in this thread (rather than in one of the others), but feel free to link to posts elsewhere if you think they'll help me to help you!

c3ntik's picture

Thanks a lot. So far enough information to read)

c3ntik's picture

Hi! =)

catalog is missing =(  "cd /home/git/gitaly".

but this file is there, although it gives an error:

sudo -u git -H git checkout v$(</home/git/gitlab/GITALY_SERVER_VERSION)
error: pathspec 'v0.11.2' did not match any file(s) known to git.

 

 

"9. Update Gitaly"

 

 

Jeremy Davis's picture

I'm guessing that you are not particularly familiar with git, but a 'checkout' is essentially trying to find the code at a point in time. My guess is that it is a tag and you probably won't have it until you fetch from the remote repo.

Usually the remote repo will be called 'origin', but you can check like this:

cd /home/git/gitaly
sudo -u git -H git remote -v

Assuming that it's called 'origin', it should give output like this:

origin	https://gitlab.com/gitlab-org/gitaly.git (fetch)
origin	https://gitlab.com/gitlab-org/gitaly.git (push)

Assuming that's right (if not, use the remote name that you see instead of 'origin' from teh command above), then fetch all the tags like this:

sudo -u git -H git fetch origin --tags

Then try the checkout again (you can rerun the same command as you did previously, but now you know the name of the tag, you can just explicitly use that):

sudo -u git -H git checkout v0.11.2

Hopefully that gets you going again. :)

c3ntik's picture

There were other repositories, so of course I couldn't find it =)
And so the first step turned out =))
oooh thanks a lot, but there is still a lot of work ahead))

 

"GitLab Community Edition 9.3.11 8e65e4bd595"

Jeremy Davis's picture

Hopefully my suggestion got you past where you were stuck!

Good luck with it all and please post back if you hit any more issues.

c3ntik's picture

Hello =)
I do everything according to PDF.

Paragraph
7. Migrate DB - prepare to migrate data [New
Server]
# create the pgloader commands.load file
MYSQL_USER = root
MYSQL_PASS =
OLD_SERVER_IP = 172.22.0.99
cat> /tmp/commands.load << EOF
LOAD DATABASE
 FROM mysql: // $ MYSQL_USER @ $ OLD_SERVER_IP / gitlab_production
 INTO postgresql: // gitlabpsql @ unix: // var / opt / gitlab / postgresql: / gitlabhq_production
WITH include no drop, truncate, disable triggers, create no tables,
 create no indexes, preserve index names, no foreign keys,
 data only
ALTER SCHEMA 'gitlab_production' RENAME TO 'public'
;
EOF

Error
sudo -u gitlab-psql pgloader /tmp/commands.load
2021-11-23T04: 57: 17.023000Z LOG Main logs in '/tmp/pgloader/pgloader.log'
2021-11-23T04: 57: 17.025000Z LOG Data errors in '/ tmp / pgloader /'
2021-11-23T04: 57: 17.025000Z LOG Parsing commands from file #P "/tmp/commands.load"
2021-11-23T04: 57: 17.025000Z FATAL An unhandled error condition has been signaled: At

  
  MYSQL_USER = root
  
  ^ (Line 2, Column 0, Position 1)

In context KW-LOAD:

While parsing KW-LOAD. Expected:

     the character tab
  or the character Newline
  or the character Return
  or the character Space
  or the string "-"
  or the string "/ *"
  or the string "load"

Jeremy Davis's picture

Did you use exactly what is in your post? Including all the spaces and no updates specific to your server and scenario? If so, that's almost certainly the issue.

You will need to update some of the values. Let me write it out but with some comments so that hopefully it is a bit clearer. Note that comments start with '#'. The '#' and everything after it (on the same line) is ignored. E.g.:

# this is a comment and will be ignored...

Try pasting that in the commandline and hit enter and you will see that nothing happens... (No error, nothing at all...). So I'll provide the code again, but this time with some inline comments.:

# This sets the variable '$MYSQL_USER' to have the value 'root'
MYSQL_USER=root

# The next line sets the variable '$MYSQL_PASS' - so you need to include your MySQL root password.
# If your password includes spaces and/or special characters, enclose in single quotes.
# E.g.:
# MYSQL_PASS='My_MySQL_root_password'
MYSQL_PASS=   # include your password after the "=" with no spaces...

# This needs to be the IP address to the server that is running MySQL with your existing GitLab DB
# E.g.:
# OLD_SERVER_IP=192.168.1.108
# Or if it's on the same server (not recommended but should probably work):
# OLD_SERVER_IP=127.0.0.1
OLD_SERVER_IP=    # include the desired IP address after the "="; again no spaces

# this next part will generate a file called "/tmp/commands.load" and uses the values of the variables that you set above.
cat > /tmp/commands.load 

That should complete with no errors. To double check that it worked, try running this:

cat /tmp/commands.load

If I run the above commands, with my examples, this is the full output (Note that the 'root@tkldev ~# ' is the prompt from my local server):

root@tkldev ~# MYSQL_USER=root
root@tkldev ~# MYSQL_PASS='My_MySQL_root_password'
root@tkldev ~# OLD_SERVER_IP=192.168.1.108
root@tkldev ~# cat > /tmp/commands.load 

Then to double check the file created:

root@tkldev ~# cat /tmp/commands.load
LOAD DATABASE
 FROM mysql://root@192.168.1.108/gitlab_production
 INTO postgresql://gitlabpsql@unix://var/opt/gitlab/postgresql:/gitlabhq_production
WITH include no drop, truncate, disable triggers, create no tables,
 create no indexes, preserve index names, no foreign keys,
 data only
ALTER SCHEMA 'gitlab_production' RENAME TO 'public'
;

Hopefully that makes things a little clearer?!

c3ntik's picture

Thanks!

It looks like the installation of the new version in this pdf(https://www.turnkeylinux.org/files/gitlab_source_to_omnibus/GitLab_5.0_t...) is very different from the original.
It seems to me that the installation went wrong. currently writing the working directory is / var / opt / gitlab, which is wrong, I think.
Please tell me a link to make a clean install of TurnKey gitlab v9.3.11? And then migrate into it.

 

 

Jeremy Davis's picture

Sorry I'm not quite clear what you mean?

Could you please point me towards the page and/or step that you are referring to? Even if you can just quote some specific text so I can find what you mean in that pdf (like you did in your previous post).

Regardless, you can find older TurnKey appliance ISOs on our mirror. According to the changelog it looks like the first build to use the Omnibus package was v15.2 (which is no longer available). So the only release still available that used the old "source code install" method is v14.2 (which included GitLab v8.8).

You should be able to install that into a VM, although it needs a fair few resources. I suggest minimum of 2GB RAM and 2 CPU cores (recommend minimum 4GB RAM and 4 CPU cores).

Add new comment