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

Help with artifactory-oss installation on k3s #1885

Closed
sultanshaikh-devops opened this issue May 22, 2024 · 14 comments
Closed

Help with artifactory-oss installation on k3s #1885

sultanshaikh-devops opened this issue May 22, 2024 · 14 comments

Comments

@sultanshaikh-devops
Copy link

Hi All,

I am seeking direction and help to get artifactory-oss installation on k3s working. Any support would be greatly appreciated.

K3s VERSION:
v1.30.0+k3s1 (14549535)

export KUBECONFIG=/etc/rancher/k3s/k3s.yaml && helm install artifactory-oss
--set artifactory.postgresql.postgresqlPassword=password123
--set artifactory.nginx.enabled=false
--set artifactory.postgresql.enabled=true
--set postgresql.enabled=true
--set artifactory.artifactory.service.type=traefik
--set artifactory.artifactory.resources.requests.cpu="500m"
--set artifactory.artifactory.resources.limits.cpu="4"
--set artifactory.artifactory.resources.requests.memory="2Gi"
--set artifactory.artifactory.resources.limits.memory="8Gi"
--set artifactory.artifactory.javaOpts.xms="1g"
--set artifactory.artifactory.javaOpts.xmx="3g"
jfrog/artifactory-oss -n artifactory-oss --create-namespace

tail -f /var/lib/rancher/k3s/agent/containerd/containerd.log

time="2024-05-22T08:21:00.445568641Z" level=error msg="PullImage "releases-docker.jfrog.io/jfrog/artifactory-oss:7.84.11" failed" error="failed to pull and unpack image "releases-docker.jfrog.io/jfrog/artifactory-oss:7.84.11": failed to copy: httpReadSeeker: failed open: unexpected status code https://releases-docker.jfrog.io/v2/jfrog/artifactory-oss/blobs/sha256:7b3df940b1a034dee2310dcddba543ff75295ebc63dc66f53e65f2b5f848d5f4: 403 Forbidden"

In addition, I am also noticing that traefik is not supported.

W0522 07:59:24.063955 230251 warnings.go:70] spec.template.spec.containers[5].ports[0]: duplicate port definition with spec.template.spec.containers[0].ports[0]
Error: INSTALLATION FAILED: 1 error occurred:
* Service "artifactory-oss" is invalid: spec.type: Unsupported value: "traefik": supported values: "ClusterIP", "ExternalName", "LoadBalancer", "NodePort"

@amithins
Copy link
Collaborator

The following error is a valid one, traefik is not a supported value in service.

Error: INSTALLATION FAILED: 1 error occurred:
* Service "artifactory-oss" is invalid: spec.type: Unsupported value: "traefik": supported values: "ClusterIP", "ExternalName", "LoadBalancer", "NodePort"

Regarding the image pull issue on releases-docker.jfrog.io/jfrog/artifactory-oss:7.84.11, i'm able to pull it from my machine. Please check your network settings, there might be some firewall rules blocking this pull.

@sultanshaikh-devops
Copy link
Author

The following error is a valid one, traefik is not a supported value in service.

Error: INSTALLATION FAILED: 1 error occurred:
* Service "artifactory-oss" is invalid: spec.type: Unsupported value: "traefik": supported values: "ClusterIP", "ExternalName", "LoadBalancer", "NodePort"

Regarding the image pull issue on releases-docker.jfrog.io/jfrog/artifactory-oss:7.84.11, i'm able to pull it from my machine. Please check your network settings, there might be some firewall rules blocking this pull.

Thank you @amithins. Let me work with our internet proxy (zscaler) team. I did validate with no proxy setting it worked fine. I will update here once I've update from our team.

In addition, I am trying to reduce number of replica by setting --set artifactory.replicaCount=1 from default 6. I am having hard time understanding why it is not applying that setting.

@amithins
Copy link
Collaborator

What is the version of artifactory chart ? It should be 1 by default. To explicitly set it, the following can be used,

--set artifactory.artifactory.replicaCount=1

@sultanshaikh-devops
Copy link
Author

sultanshaikh-devops commented May 23, 2024

What is the version of artifactory chart ? It should be 1 by default. To explicitly set it, the following can be used,

--set artifactory.artifactory.replicaCount=1

I am sorry not an expert in helm. I am assuming it is using the latest chart version. JFROG_CHART_VERSION:-"107.84.11"

helm repo add jfrog https://charts.jfrog.io
helm repo update
helm install artifactory-oss jfrog/artifactory-oss -n artifactory-oss --create-namespace

Is there a way to specify specific chart version within install commands?

Thank you

@chukka
Copy link
Collaborator

chukka commented May 24, 2024

@sultanshaikh-devops , here you go

helm install artifactory-oss jfrog/artifactory-oss -n artifactory-oss --create-namespace --version 107.84.11

@sultanshaikh-devops
Copy link
Author

@chukka thank you sir, is there a official Documation link where I can find what parameters are support with helm chart that I can use to lookup myself? I found several links on internet but I cannot tell which one is valid.

@sultanshaikh-devops
Copy link
Author

I am just around in circle. Following inputs are not set, what am I missing? I've manually created pv, replicaCount does not seem to work for me as it always creates 6

--set artifactory.artifactory.replicaCount=3
--set artifactory.postgresql.persistence.storageClassName="art-postgres-volume"

helm upgrade --install artifactory ${CUSTOM_VALUES_FILE}
--namespace artifactory jfrog/artifactory-oss
--set artifactory.artifactory.service.type=LoadBalancer
--set artifactory.postgresql.postgresqlPassword=password
--set artifactory.nginx.enabled=false
--set artifactory.postgresql.enabled=true
--set artifactory.ingress.enabled=true
--set artifactory.artifactory.replicaCount=3
--set artifactory.artifactory.resources.requests.cpu="1"
--set artifactory.artifactory.resources.limits.cpu="4"
--set artifactory.artifactory.resources.requests.memory="2Gi"
--set artifactory.artifactory.resources.limits.memory="12Gi"
--set artifactory.artifactory.javaOpts.xms="1g"
--set artifactory.artifactory.javaOpts.xmx="4g"
--set artifactory.postgresql.persistence.storageClassName="art-postgres-volume"
--set artifactory.artifactory.persistence.storageClassName="art-data-volume"
--version "107.84.11" --create-namespace \

@amithins
Copy link
Collaborator

Regarding the number 6, are you referring to the number of containers in the pod or the number of pods, can we get the output of,

kubectl get pods -n artifactory

@sultanshaikh-devops
Copy link
Author

sultanshaikh-devops commented May 30, 2024

Regarding the number 6, are you referring to the number of containers in the pod or the number of pods, can we get the output of,

kubectl get pods -n artifactory

Hi @amithins, below are the outputs:

  1. I thought highlighted is controlled by this parm --set artifactory.artifactory.replicaCount=3

image

  1. Second issue, I am trying to give artifactory persistence storage. using this command --set artifactory.artifactory.persistence.storageClassName="art-data-volume". I've precreated art-data-volume as pv.

image

I can see artifactory pod has claimed the storage and it is bound. Therefore not sure why I am getting error as shown above.

image

@sultanshaikh-devops
Copy link
Author

sultanshaikh-devops commented May 30, 2024

Regarding the number 6, are you referring to the number of containers in the pod or the number of pods, can we get the output of,

kubectl get pods -n artifactory

Hi @amithins, below are the outputs:

  1. I thought highlighted is controlled by this parm --set artifactory.artifactory.replicaCount=3

image

  1. Second issue, I am trying to give artifactory persistence storage. using this command --set artifactory.artifactory.persistence.storageClassName="art-data-volume". I've precreated art-data-volume as pv.

image

I can see artifactory pod has claimed the storage and it is bound. Therefore not sure why I am getting error as shown above.

image

Sorry I miss understood output of kubectl. I thought ready meant replicaCount. Reading further it is number of containers within a pod.

image

@sultanshaikh-devops
Copy link
Author

I've managed to fix the disk issue by manually creating in following way

apiVersion: v1
kind: PersistentVolume
metadata:
name: art-data-volume
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
persistentVolumeReclaimPolicy: Retain
capacity:
storage: 10Gi
storageClassName: art-data-volume
local:
path: /data/art-artifactory-data
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- srv01

Now I get different issue

image

image

@RobinDuhan
Copy link

Hi @sultanshaikh-devops , would you please check which container is restarting? This will be part of the kubectl describe output. If that doesn't provide any benefits, please share logs of the failing containers.

@sultanshaikh-devops
Copy link
Author

sultanshaikh-devops commented Jun 5, 2024

Hi @sultanshaikh-devops , would you please check which container is restarting? This will be part of the kubectl describe output. If that doesn't provide any benefits, please share logs of the failing containers.

Thank you, managed go past few issues. What I've noticed when I use persistent storage for postgress and antifactory. I am seeing Master key missing, further investigation after reviewing postgress log, antifactory having issue with auth, just say's bad password. I've confirmed manually that password is correct by accessing postgress database via CLI within postgress container. Therefore, I am not sure where artifactory looks for postgress password ?

I am passing following input during the install.

--set artifactory.postgresql.postgresqlPassword=password

@RobinDuhan
Copy link

@sultanshaikh-devops Please share logs for us to understand this further.

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

5 participants