Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jfrog artifactory helm upgrade to newer version best practice ? #1923

Open
hamedsa-78 opened this issue Sep 16, 2024 · 5 comments
Open

jfrog artifactory helm upgrade to newer version best practice ? #1923

hamedsa-78 opened this issue Sep 16, 2024 · 5 comments

Comments

@hamedsa-78
Copy link

hamedsa-78 commented Sep 16, 2024

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.

@Alexhha
Copy link

Alexhha commented Sep 16, 2024

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

@hamedsa-78
Copy link
Author

hamedsa-78 commented Sep 16, 2024

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?

@RobinDuhan
Copy link

@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.

@hamedsa-78
Copy link
Author

hamedsa-78 commented Sep 17, 2024

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

@RobinDuhan
Copy link

RobinDuhan commented Sep 19, 2024

Please find the reference for the flag here -

databaseUpgradeReady: false
- for platform charts.

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


global:
  ***

databaseUpgradeReady: true

artifactory:
  ***

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants