-
Notifications
You must be signed in to change notification settings - Fork 16.7k
Moved Artifactory to stable and updated version to 5.3.2 #1314
Changes from 10 commits
266a42b
dc1f0cd
f22f5cd
73d4a02
54834d8
5b9e47b
c7fd27c
7312c59
acdffb2
ddbd6a8
34ce7ff
c02d548
9e2c8a1
fb226db
7e68a82
3e89133
dc99e38
d6aeb9d
577b918
bac7bcb
a0571f1
7f3f936
f5e02b2
4a788bd
e55e040
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# JFrog Artifactory Helm Chart | ||
|
||
## Prerequisites Details | ||
|
||
* Artifactory Pro trial license [get one from here](https://www.jfrog.com/artifactory/free-trial/) | ||
|
||
## Chart Details | ||
This chart will do the following: | ||
|
||
* Deploy Artifactory-oss | ||
* Deploy Artifactory-Pro | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `artifactory`: | ||
|
||
```bash | ||
$ helm install --name artifactory stable/artifactory | ||
``` | ||
|
||
### Deploying Artifactory OSS | ||
You can deploy Artifactory OSS by using the same instructions as provided for the Pro. | ||
**NOTE:** The Artifactory OSS does not use Nginx, so your Artifactory's Kubernetes service exposes Tomcat's port 8081 as port 80. | ||
|
||
By default it will run Artifactory-pro to run Artifactory-oss comment nginx configuration in value.yaml and use following command: | ||
Remove `nginx-deployment.yaml`, `nginx-pvc.yaml` and `nginx-service.yaml` and change art_service.externalPort to 80 in [values.yaml](values.yaml) before running command to install Artifactory-oss. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
```bash | ||
$ helm install --name artifactory --set art_image.repository=docker.bintray.io/jfrog/artifactory-oss stable/artifactory | ||
``` | ||
|
||
### Accessing Artifactory | ||
**NOTE:** It might take a few minutes for Artifactory's public IP to become available. | ||
Follow the instructions outputted by the install command to get the Artifactory IP to access it. | ||
|
||
### Updating Artifactory | ||
Once you have a new chart version, you can update your deployment with | ||
```bash | ||
$ helm upgrade artifactory --namespace artifactory stable/artifactory | ||
``` | ||
|
||
This will apply any configuration changes on your existing deployment. | ||
|
||
### Customizing Database password | ||
You can override the specified database password (set in [values.yaml](values.yaml)), by passing it as a parameter in the install command line | ||
```bash | ||
$ helm install --name artifactory --namespace artifactory --set db_env.db_pass=12_hX34qwerQ2 stable/artifactory | ||
``` | ||
|
||
You can customise other parameters in the same way, by passing them on `helm install` command line. | ||
|
||
### Deleting Artifactory | ||
```bash | ||
$ helm delete --purge artifactory | ||
``` | ||
|
||
This will completely delete your Artifactory Pro deployment. | ||
**IMPORTANT:** This will also delete your data volumes. You will loose all data! | ||
|
||
## Configuration | ||
|
||
The following tables lists the configurable parameters of the artifactory chart and their default values. | ||
|
||
| Parameter | Description | Default | | ||
|---------------------------|-----------------------------------|----------------------------------------------------------| | ||
| `art_image.version` | Container image tag | `5.3.2` | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Documentation incomplete. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added |
||
| `ImagePullPolicy` | Container pull policy | `IfNotPresent` | | ||
|
||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. | ||
|
||
|
||
## Useful links | ||
https://www.jfrog.com | ||
https://www.jfrog.com/confluence/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Congratulations. You have just deployed JFrog Artifactory Pro! | ||
|
||
1. Get the Artifactory URL by running these commands: | ||
|
||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status of the service by running 'kubectl get svc -w {{ .Values.nx_name }}' | ||
|
||
{{- if contains "NodePort" .Values.art_service.type }} | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ .Values.art_service.name }}) | ||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
echo http://$NODE_IP:$NODE_PORT/ | ||
|
||
{{- else if contains "LoadBalancer" .Values.art_service.type }} | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ .Values.nx_name }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | ||
echo http://$SERVICE_IP/ | ||
|
||
{{- else if contains "ClusterIP" .Values.art_service.type }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ .Values.art_service.name }}" -o jsonpath="{.items[0].metadata.name}") | ||
echo http://127.0.0.1:{{ .Values.art_service.externalPort }} | ||
kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME {{ .Values.art_service.externalPort }}:{{ .Values.art_service.internalPort }} | ||
|
||
{{- end }} | ||
|
||
2. Open Artifactory in your browser | ||
Default credential for Artifactory: | ||
user: admin | ||
password: password |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
*/}} | ||
{{- define "fullname" -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Values.art_name }} | ||
labels: | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add standard labels. Apply everywhere. Here's a good example: https://github.com/kubernetes/charts/tree/master/stable/nginx-ingress/
Adapt as in nginx-ingress example using components. You will also have to update selectors in services. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
spec: | ||
replicas: {{ .Values.art_replicaCount }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't use underscores. Use nesting instead. Again, a good example would be https://github.com/kubernetes/charts/tree/master/stable/nginx-ingress/. |
||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Values.art_name }} | ||
annotations: | ||
pod.beta.kubernetes.io/init-containers: '[{ | ||
"name": "remove-lost-found", | ||
"image": {{ .Values.initContainerImage | quote }}, | ||
"command": ["rm", "-rf", "{{ .Values.art_persistence.mountPath }}/lost+found"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why would you want to do this? Sounds like a hack to me. If There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do have 6 subdirectories and few files. |
||
"volumeMounts": [{ | ||
"name": "artifactory-volume", | ||
"mountPath": {{ .Values.art_persistence.mountPath | quote }} | ||
}], | ||
"imagePullPolicy": {{ .Values.imagePullPolicy | quote }} | ||
}]' | ||
spec: | ||
containers: | ||
- name: {{ .Values.art_name }} | ||
image: "{{ .Values.art_image.repository }}:{{ .Values.art_image.version }}" | ||
imagePullPolicy: {{ .Values.imagePullPolicy }} | ||
env: | ||
- name: DB_TYPE | ||
value: {{ .Values.db_env.db_type }} | ||
- name: DB_USER | ||
value: {{ .Values.db_env.db_name }} | ||
- name: DB_PASSWORD | ||
value: {{ .Values.db_env.db_pass }} | ||
- name: DB_HOST | ||
value: {{ .Values.db_service.name }} | ||
ports: | ||
- containerPort: {{ .Values.art_service.internalPort }} | ||
volumeMounts: | ||
- mountPath: {{ .Values.art_persistence.mountPath | quote }} | ||
name: artifactory-volume | ||
volumes: | ||
- name: artifactory-volume | ||
{{- if .Values.art_persistence.enabled }} | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.art_name }} | ||
{{- else }} | ||
emptyDir: {} | ||
{{- end -}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{{- if .Values.art_persistence.enabled }} | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ .Values.art_name }} | ||
labels: | ||
app: {{ .Values.art_name }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
annotations: | ||
{{- if .Values.art_persistence.storageClass }} | ||
volume.beta.kubernetes.io/storage-class: {{ .Values.art_persistence.storageClass | quote }} | ||
{{- else }} | ||
volume.alpha.kubernetes.io/storage-class: default | ||
{{- end }} | ||
spec: | ||
accessModes: | ||
- {{ .Values.art_persistence.accessMode | quote }} | ||
resources: | ||
requests: | ||
storage: {{ .Values.art_persistence.size | quote }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not ideal. You cannot just remove something when you install the chart from the repo. The user would have to download and adapt it. Please add some conditional logic to not include what's not needed for OSS. BTW, why wouldn't you run the OSS version behind Nginx?