charts icon indicating copy to clipboard operation
charts copied to clipboard

jfrog artifactory helm upgrade to newer version best practice ?

Open hamedsa-78 opened this issue 1 year ago • 19 comments

Is this a request for help?: Yes

Is this a BUG REPORT or FEATURE REQUEST? (choose one): This is a request for help.

Version of Helm:

Helm: v7.90.9

What happened: I have JFrog Artifactory version 7.16.2 installed via Helm in my Kubernetes cluster, and I want to upgrade it to version 7.90.9 While following the official documentation, (https://jfrog.com/help/r/jfrog-installation-setup-documentation/artifactory-version-7.x-to-7.x-helm-upgrade.) I encountered an issue during the upgrade process. I scaled down the StatefulSet resources to 0 and attempted to install the new version using the existing persistent volume claims (PVC) for both PostgreSQL and Artifactory. However, I got an error stating that the existing PostgreSQL volume was initialized with PostgreSQL 14, which is not compatible with the PostgreSQL 15 version used by the newer JFrog Helm chart.

What you expected to happen: I expected the new version of JFrog Artifactory to be deployed while using the existing persistent volumes and PostgreSQL database, allowing a seamless upgrade process without database compatibility issues.

How to reproduce it (as minimally and precisely as possible):

Install JFrog Artifactory version 7.16.2 using the Helm chart in a Kubernetes cluster.
Configure the chart to use PostgreSQL 14.
Attempt to upgrade to version 7.90 of the JFrog Helm chart.
Use the same PVCs for PostgreSQL and Artifactory.
Observe the PostgreSQL compatibility error related to PostgreSQL 15.

Anything else we need to know:

I considered modifying the Helm chart to continue using PostgreSQL 14, but I'm unsure if the existing data in PV would be compatible with the newer version of JFrog Artifactory.

I would appreciate guidance on whether it’s better to modify the Helm chart to use PostgreSQL 14 or to follow a process to upgrade the database to PostgreSQL 15 without data loss.

hamedsa-78 avatar Sep 16 '24 07:09 hamedsa-78

Do you use builtin database or external one ? What helm chart did you use for 7.16.2 installation ?

Alexhha avatar Sep 16 '24 07:09 Alexhha

Do you use builtin database or external one ? What helm chart did you use for 7.16.2 installation ?

Actually, the version is 7.16.3, available here. I am using the built-in database, and version 7.90.9 works with PostgreSQL 14 as well. However, when I define existingClaim in the Helm chart for artifactory section pointing to the PVC from version 7.16.3, my pod gets stuck in an error state with the message "wait for db."

I am not sure if using the existing PVC (provided by openebs-hostpath) for the newer version is valid. Does the data storage format change between versions, and should I expect this method to work at all ? If not, would the best upgrade approach be to download all repositories from the previous version and upload them into the newer version after installation?

hamedsa-78 avatar Sep 16 '24 08:09 hamedsa-78

@hamedsa-78 Postgres 14 should work, and you don't have to upgrade it. Set the postgres tags same as 14 in the chart, and set databaseUpgradeReady as true. Please try this once in a non-production environment.

RobinDuhan avatar Sep 17 '24 06:09 RobinDuhan

@RobinDuhan I cannot find databaseUpgradeReady. Could you please specify exactly which sections and subsections I should define it in?

hamedsa-78 avatar Sep 17 '24 13:09 hamedsa-78

Please find the reference for the flag here - https://github.com/jfrog/charts/blob/db9d5736e7885282a89a36f324119e813a43b1f5/stable/jfrog-platform/values.yaml#L11 - for platform charts.

If you are using individual charts, the configuration for this flag stays same, something like -


global:
  ***

databaseUpgradeReady: true

artifactory:
  ***

RobinDuhan avatar Sep 19 '24 05:09 RobinDuhan

Hi @RobinDuhan I do have same question. We have Artifactory version 7.77.11 with bundled PSQL 13 deployed with helm chart. We want to upgrade Artifactory to 7.90.x which now supports PSQL 15. Along with upgrading Artifactory we want to upgrade PSQL from 13 to 15. Would you mind sharing detailed steps, along with estimated DT (if any) where we have around 7TB of data?

From what I found, I need to follow below steps-

  1. Current helm chart version of JFrog Platform is 10.17.4 which is less than 10.18 which introduced support for PSQL 15.
  2. Upgrade only Artifactory to say 10.19.4 chart version with adding below parameters gaUpgradeReady: true databaseUpgradeReady=true postgresql.image.tag=13.x (same as current)
  3. Confirmation needed is here. Say suppose I upgrade from 10.19.4 to 10.19.6 with same procedure as above, but here I also want to upgrade PSQL to 15, how should I do? gaUpgradeReady: true databaseUpgradeReady=false postgresql.image.tag=15.x

Please do share the detailed steps or approach to upgrade Artifactory and PSQL.

45parth avatar Oct 17 '24 20:10 45parth

Hi @Alexhha @oumkale If you can help for above query that would be great as well.

45parth avatar Oct 18 '24 11:10 45parth

Hi @45parth, Postgres major upgrades cannot be done directly. The instructions to keep the tag same (postgresql.image.tag=13.x (same as current)) is to avoid any failures, and we recommend that customers update their databases manually. Instructions for the manual upgrade process would be available with postgres.

RobinDuhan avatar Oct 22 '24 07:10 RobinDuhan

@RobinDuhan As I mentioned above, it is the bundled PSQL and not the external database. If you can provide a document stating the PSQL upgrade of the container or the image used by the JFrog that will be great, I was not able to find any. I doubt, this can be done inside the running container.

45parth avatar Oct 22 '24 12:10 45parth

@45parth We use bitnami's postgres image. Meanwhile, could you please tell me what your license type is? Pro/E+ etc.

RobinDuhan avatar Oct 24 '24 10:10 RobinDuhan

@RobinDuhan But is there any procedure to upgrade, if helm chart does not have the provision? We have Enterprise license.

45parth avatar Oct 24 '24 13:10 45parth

@45parth In that case, please open a support ticket and our support engineers will work with you up to resolution.

RobinDuhan avatar Oct 24 '24 15:10 RobinDuhan

@RobinDuhan I had already opened the support ticket for this, but the response was not that appropriate and clear. So, I am asking here. Please do share if there is some other way.

45parth avatar Oct 24 '24 16:10 45parth

@45parth Will you please share the support reference number?

RobinDuhan avatar Oct 25 '24 04:10 RobinDuhan

@RobinDuhan Sure. The Case/Ticket number is 316219, which is currently closed.

45parth avatar Oct 25 '24 07:10 45parth

@45parth Thanks, - I am late to respond but we are working internally and should have an update for you soon.

RobinDuhan avatar Oct 28 '24 16:10 RobinDuhan

@RobinDuhan Any update here, please?

45parth avatar Nov 04 '24 08:11 45parth

Hi @45parth

The upgrade of PostgreSQL application version is not part of JFrog documentation. We recommend to follow the official instructions of PostgreSQL.

Additional method is to migrate Artifactory content from old to new database instance by using Artifactory System Export / Import.

gitta-jfrog avatar Nov 07 '24 08:11 gitta-jfrog

@gitta-jfrog Thanks for the update! As I mentioned, the PostgreSQL is internal which comes built in with helm chart and not external. We cannot follow the PostgreSQL official documentation to upgrade the containerized or inbuilt PSQL as it is totally different process.

Using Artifactory Export/Import, we already followed while upgrading Artifactory from version 6.x to 7.x. But this is not the feasible way to do it every time where you have more than 7 TB of data. If there is no other way, unfortunately we will have to follow same and before proceeding need to make architectural changes.

45parth avatar Nov 07 '24 17:11 45parth