Skip to content

Commit

Permalink
Merge branch 'master' into dis-240
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulsadanandan authored Jul 8, 2020
2 parents 6fd7abf + b262a56 commit 9867f38
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 73 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ Get the latest [Helm release](https://github.com/kubernetes/helm#install).

## Install Charts

You need to add this Chart repo to Helm:
### Add ChartCenter Helm repository

```console
helm repo add jfrog https://charts.jfrog.io/
Before installing JFrog helm charts, you need to add the [ChartCenter helm repository](https://chartcenter.io) to your helm client.

```bash
helm repo add center https://repo.chartcenter.io
helm repo update
```

Expand Down
5 changes: 5 additions & 0 deletions stable/artifactory-ha/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# JFrog Artifactory-ha Chart Changelog
All changes to this chart will be documented in this file.

## [3.0.2] - Jul 6, 2020
* Updated Artifactory version to 7.6.2
* **IMPORTANT**
* Added ChartCenter Helm repository in README

## [3.0.1] - Jul 01, 2020
* Add dedicated ingress object for Replicator service when enabled

Expand Down
4 changes: 2 additions & 2 deletions stable/artifactory-ha/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
name: artifactory-ha
home: https://www.jfrog.com/artifactory/
version: 3.0.1
appVersion: 7.6.1
version: 3.0.2
appVersion: 7.6.2
description: Universal Repository Manager supporting all major packaging formats,
build tools and CI servers.
keywords:
Expand Down
64 changes: 33 additions & 31 deletions stable/artifactory-ha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ This leaves the primary node free to handle jobs and tasks and not be interrupte
## Installing the Chart

### Add JFrog Helm repository
Before installing JFrog helm charts, you need to add the [JFrog helm repository](https://charts.jfrog.io/) to your helm client
### Add ChartCenter Helm repository

Before installing JFrog helm charts, you need to add the [ChartCenter helm repository](https://chartcenter.io) to your helm client

```bash
helm repo add jfrog https://charts.jfrog.io
helm repo add center https://repo.chartcenter.io
helm repo update
```


**NOTE:** Passing masterKey is mandatory for fresh install of chart (7.x Appversion)

### Create a unique Master Key
Expand All @@ -48,7 +50,7 @@ echo ${MASTER_KEY}
To install the chart with the release name `artifactory-ha`:

```bash
helm upgrade --install artifactory-ha --set artifactory.masterKey=${MASTER_KEY} --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha --set artifactory.masterKey=${MASTER_KEY} --namespace artifactory-ha center/jfrog/artifactory-ha
```

### System Configuration
Expand All @@ -70,7 +72,7 @@ Follow the instructions outputted by the install command to get the Artifactory
### Updating Artifactory
Once you have a new chart version, you can update your deployment with
```bash
helm upgrade artifactory-ha --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade artifactory-ha --namespace artifactory-ha center/jfrog/artifactory-ha
```

If artifactory was installed without providing a value to postgresql.postgresqlPassword (a password was autogenerated), follow these instructions:
Expand All @@ -80,7 +82,7 @@ POSTGRES_PASSWORD=$(kubectl get secret -n <namespace> <myrelease>-postgresql -o
```
2. Upgrade the release by passing the previously auto-generated secret:
```bash
helm upgrade <myrelease> --namespace artifactory-ha jfrog/artifactory-ha --set postgresql.postgresqlPassword=${POSTGRES_PASSWORD}
helm upgrade <myrelease> --namespace artifactory-ha center/jfrog/artifactory-ha --set postgresql.postgresqlPassword=${POSTGRES_PASSWORD}
```

This will apply any configuration changes on your existing deployment.
Expand Down Expand Up @@ -129,7 +131,7 @@ helm upgrade --install artifactory-ha \
--set nginx.resources.limits.cpu="250m" \
--set nginx.resources.requests.memory="250Mi" \
--set nginx.resources.limits.memory="500Mi" \
--namespace artifactory-ha jfrog/artifactory-ha
--namespace artifactory-ha center/jfrog/artifactory-ha
```
> Artifactory java memory parameters can (and should) also be set to match the allocated resources with `artifactory.[primary|node].javaOpts.xms` and `artifactory.[primary|node].javaOpts.xmx`.
Expand Down Expand Up @@ -383,7 +385,7 @@ stringData:
kubectl apply -n artifactory -f ./custom-binarystore.yaml
# Pass it to your helm install command:
helm upgrade --install artifactory-ha --set artifactory.persistence.customBinarystoreXmlSecret=custom-binarystore --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha --set artifactory.persistence.customBinarystoreXmlSecret=custom-binarystore --namespace artifactory-ha center/jfrog/artifactory-ha
```

### Create a unique Master Key
Expand All @@ -398,7 +400,7 @@ echo ${MASTER_KEY}
kubectl create secret generic my-secret --from-literal=master-key=${MASTER_KEY}
# Pass the created secret to helm
helm upgrade --install artifactory-ha --set artifactory.masterKeySecretName=my-secret --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha --set artifactory.masterKeySecretName=my-secret --namespace artifactory-ha center/jfrog/artifactory-ha
```
**NOTE:** In either case, make sure to pass the same master key on all future calls to `helm install` and `helm upgrade`! In the first case, this means always passing `--set artifactory.masterKey=${MASTER_KEY}`. In the second, this means always passing `--set artifactory.masterKeySecretName=my-secret` and ensuring the contents of the secret remain unchanged.

Expand All @@ -419,7 +421,7 @@ export JOIN_KEY=$(openssl rand -hex 32)
echo ${JOIN_KEY}
# Pass the created join key to helm
helm upgrade --install artifactory-ha --set artifactory.joinKey=${JOIN_KEY} --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha --set artifactory.joinKey=${JOIN_KEY} --namespace artifactory-ha center/jfrog/artifactory-ha
```

Alternatively, you can create a secret containing the join key manually and pass it to the template at install/upgrade time.
Expand All @@ -432,7 +434,7 @@ echo ${JOIN_KEY}
kubectl create secret generic my-secret --from-literal=join-key=${JOIN_KEY}
# Pass the created secret to helm
helm upgrade --install artifactory-ha --set artifactory.joinKeySecretName=my-secret --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha --set artifactory.joinKeySecretName=my-secret --namespace artifactory-ha center/jfrog/artifactory-ha
```
**NOTE:** In either case, make sure to pass the same join key on all future calls to `helm install` and `helm upgrade`! This means always passing `--set artifactory.joinKey=${JOIN_KEY}`. In the second, this means always passing `--set artifactory.joinKeySecretName=my-secret` and ensuring the contents of the secret remain unchanged..

Expand All @@ -457,7 +459,7 @@ Prepare a text file with the license(s) written in it. If writing multiple licen
kubectl create secret generic artifactory-cluster-license --from-file=./art.lic
# Pass the license to helm
helm upgrade --install artifactory-ha --set artifactory.license.secret=artifactory-cluster-license,artifactory.license.dataKey=art.lic --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha --set artifactory.license.secret=artifactory-cluster-license,artifactory.license.dataKey=art.lic --namespace artifactory-ha center/jfrog/artifactory-ha
```
**NOTE:** This method is relevant for initial deployment only! Once Artifactory is deployed, you should not keep passing these parameters as the license is already persisted into Artifactory's storage (they will be ignored).
Updating the license should be done via Artifactory UI or REST API.
Expand All @@ -478,7 +480,7 @@ artifactory:
```

```bash
helm upgrade --install artifactory-ha -f values.yaml --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha -f values.yaml --namespace artifactory-ha center/jfrog/artifactory-ha
```
**NOTE:** This method is relevant for initial deployment only! Once Artifactory is deployed, you should not keep passing these parameters as the license is already persisted into Artifactory's storage (they will be ignored).
Updating the license should be done via Artifactory UI or REST API.
Expand All @@ -502,7 +504,7 @@ artifactory:

Install the helm chart with the values file you created:
```bash
helm upgrade --install artifactory-ha --namespace artifactory-ha jfrog/artifactory-ha -f values.yaml
helm upgrade --install artifactory-ha --namespace artifactory-ha center/jfrog/artifactory-ha -f values.yaml
```

2. Any custom configuration file you have to configure artifactory, such as `logback.xml`:
Expand All @@ -526,7 +528,7 @@ artifactory:

Install the helm chart with the values file you created:
```bash
helm upgrade --install artifactory-ha --namespace artifactory-ha jfrog/artifactory-ha -f values.yaml
helm upgrade --install artifactory-ha --namespace artifactory-ha center/jfrog/artifactory-ha -f values.yaml
```

### Configure NetworkPolicy
Expand Down Expand Up @@ -569,7 +571,7 @@ Enable JMX in your deployment:
helm upgrade --install artifactory \
--set artifactory.primary.javaOpts.jmx.enabled=true \
--set artifactory.node.javaOpts.jmx.enabled=true \
--namespace artifactory-ha jfrog/artifactory-ha
--namespace artifactory-ha center/jfrog/artifactory-ha
```
This will enable access to Artifactory with JMX on the default port (9010).
** You have the option to change the port by setting ```artifactory.primary.javaOpts.jmx.port``` and ```artifactory.node.javaOpts.jmx.port```
Expand All @@ -582,7 +584,7 @@ helm upgrade --install artifactory \
--set artifactory.primary.javaOpts.jmx.enabled=true \
--set artifactory.node.javaOpts.jmx.enabled=true \
--set artifactory.service.type=LoadBalancer \
--namespace artifactory-ha jfrog/artifactory-ha
--namespace artifactory-ha center/jfrog/artifactory-ha
```
2. The default setting for java.rmi.server.hostname is the service name (this is also configurable with
```artifactory.primary.javaOpts.jmx.host``` and ```artifactory.node.javaOpts.jmx.host```), So in order to connect to Artifactory
Expand Down Expand Up @@ -611,7 +613,7 @@ artifactory:

2. Apply the `admin-creds-values.yaml` file:
```bash
helm upgrade --install artifactory --namespace artifactory-ha jfrog/artifactory-ha -f admin-creds-values.yaml
helm upgrade --install artifactory --namespace artifactory-ha center/jfrog/artifactory-ha -f admin-creds-values.yaml
```

### Bootstrapping Artifactory configuration
Expand Down Expand Up @@ -639,7 +641,7 @@ kubectl apply -f bootstrap-config.yaml
```
3. Pass the configMap to helm
```bash
helm upgrade --install artifactory-ha --set artifactory.license.secret=artifactory-cluster-license,artifactory.license.dataKey=art.lic,artifactory.configMapName=my-release-bootstrap-config --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha --set artifactory.license.secret=artifactory-cluster-license,artifactory.license.dataKey=art.lic,artifactory.configMapName=my-release-bootstrap-config --namespace artifactory-ha center/jfrog/artifactory-ha
```

### Use custom nginx.conf with Nginx
Expand All @@ -651,7 +653,7 @@ kubectl create configmap nginx-config --from-file=nginx.conf
```
* Pass configMap to helm install
```bash
helm upgrade --install artifactory-ha --set nginx.customConfigMap=nginx-config --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha --set nginx.customConfigMap=nginx-config --namespace artifactory-ha center/jfrog/artifactory-ha
```

### Scaling your Artifactory cluster
Expand All @@ -670,15 +672,15 @@ Use `--set postgresql.postgresqlPassword=${DB_PASSWORD}` with every scale action
Let's assume you have a cluster with **2** member nodes, and you want to scale up to **3** member nodes (a total of 4 nodes).
```bash
# Scale to 4 nodes (1 primary and 3 member nodes)
helm upgrade --install artifactory-ha --set artifactory.node.replicaCount=3 --set postgresql.postgresqlPassword=${DB_PASSWORD} --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha --set artifactory.node.replicaCount=3 --set postgresql.postgresqlPassword=${DB_PASSWORD} --namespace artifactory-ha center/jfrog/artifactory-ha
```

##### Scale down
Let's assume you have a cluster with **3** member nodes, and you want to scale down to **2** member node.

```bash
# Scale down to 2 member nodes
helm upgrade --install artifactory-ha --set artifactory.node.replicaCount=2 --set postgresql.postgresqlPassword=${DB_PASSWORD} --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha --set artifactory.node.replicaCount=2 --set postgresql.postgresqlPassword=${DB_PASSWORD} --namespace artifactory-ha center/jfrog/artifactory-ha
```
- **NOTE:** Since Artifactory is running as a Kubernetes Stateful Set, the removal of the node will **not** remove the persistent volume. You need to explicitly remove it
```bash
Expand Down Expand Up @@ -750,7 +752,7 @@ artifactory:
```
2. Install Artifactory with the values file you created:
```bash
helm upgrade --install artifactory jfrog/artifactory-ha --namespace artifactory -f values-oracle.yaml
helm upgrade --install artifactory center/jfrog/artifactory-ha --namespace artifactory -f values-oracle.yaml
```
**NOTE:** If its an upgrade from 6.x to 7.x, add same `preStartCommand` under `artifactory.migration.preStartCommand`

Expand Down Expand Up @@ -797,7 +799,7 @@ kubectl create secret docker-registry regsecret --docker-server=${DOCKER_REGISTR
```
Once created, you pass it to `helm`
```bash
helm upgrade --install artifactory-ha --set imagePullSecrets=regsecret --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha --set imagePullSecrets=regsecret --namespace artifactory-ha center/jfrog/artifactory-ha
```

### Logger sidecars
Expand Down Expand Up @@ -916,7 +918,7 @@ artifactory:

You can now pass the created `plugins.yaml` file to helm install command to deploy Artifactory with user plugins as follows:
```bash
helm upgrade --install artifactory-ha -f plugins.yaml --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha -f plugins.yaml --namespace artifactory-ha center/jfrog/artifactory-ha
```

Alternatively, you may be in a situation in which you would like to create a secret in a Helm chart that depends on this chart. In this scenario, the name of the secret is likely dynamically generated via template functions, so passing a statically named secret isn't possible. In this case, the chart supports evaluating strings as templates via the [`tpl`](https://helm.sh/docs/charts_tips_and_tricks/#using-the-tpl-function) function - simply pass the raw string containing the templating language used to name your secret as a value instead by adding the following to your chart's `values.yaml` file:
Expand Down Expand Up @@ -974,7 +976,7 @@ artifactory:

and use it with you helm install/upgrade:
```bash
helm upgrade --install artifactory-ha -f configmaps.yaml --namespace artifactory-ha jfrog/artifactory-ha
helm upgrade --install artifactory-ha -f configmaps.yaml --namespace artifactory-ha center/jfrog/artifactory-ha
```

This will, in turn:
Expand Down Expand Up @@ -1012,7 +1014,7 @@ filebeat:

and use it with you helm install/upgrade:
```bash
helm upgrade --install artifactory-ha -f filebeat.yaml --namespace artifactory-ha jfrog/artifactory
helm upgrade --install artifactory-ha -f filebeat.yaml --namespace artifactory-ha center/jfrog/artifactory
```

This will start sending your Artifactory logs to the log aggregator of your choice, based on your configuration in the `filebeatYml`
Expand Down Expand Up @@ -1365,7 +1367,7 @@ helm upgrade --install artifactory-ha \
--set nginx.service.annotations."service\.beta\.kubernetes\.io/aws-load-balancer-ssl-cert"="arn:aws:acm:xx-xxxx:xxxxxxxx:certificate/xxxxxxxxxxxxx" \
--set nginx.service.annotations."service\.beta\.kubernetes\.io"/aws-load-balancer-backend-protocol=http \
--set nginx.service.annotations."service\.beta\.kubernetes\.io"/aws-load-balancer-ssl-ports=https \
--namespace artifactory-ha jfrog/artifactory-ha
--namespace artifactory-ha center/jfrog/artifactory-ha
```

### Ingress and TLS
Expand All @@ -1376,7 +1378,7 @@ helm upgrade --install artifactory-ha \
--set ingress.hosts[0]="artifactory.company.com" \
--set artifactory.service.type=NodePort \
--set nginx.enabled=false \
--namespace artifactory-ha jfrog/artifactory-ha
--namespace artifactory-ha center/jfrog/artifactory-ha
```

If your cluster allows automatic creation/retrieval of TLS certificates (e.g. [cert-manager](https://github.com/jetstack/cert-manager)), please refer to the documentation for that mechanism.
Expand Down Expand Up @@ -1473,7 +1475,7 @@ ingress:

and running:
```bash
helm upgrade --install artifactory-ha --namespace artifactory-ha jfrog/artifactory-ha -f artifactory-ha-values.yaml
helm upgrade --install artifactory-ha --namespace artifactory-ha center/jfrog/artifactory-ha -f artifactory-ha-values.yaml
```

### Dedicated Ingress object for replicator service
Expand Down
5 changes: 5 additions & 0 deletions stable/artifactory/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# JFrog Artifactory Chart Changelog
All changes to this chart will be documented in this file.

## [10.0.2] - Jul 6, 2020
* Updated Artifactory version to 7.6.2
* **IMPORTANT**
* Added ChartCenter Helm repository in README

## [10.0.1] - Jul 01, 2020
* Add dedicated ingress object for Replicator service when enabled

Expand Down
4 changes: 2 additions & 2 deletions stable/artifactory/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
name: artifactory
home: https://www.jfrog.com/artifactory/
version: 10.0.1
appVersion: 7.6.1
version: 10.0.2
appVersion: 7.6.2
description: Universal Repository Manager supporting all major packaging formats,
build tools and CI servers.
keywords:
Expand Down
Loading

0 comments on commit 9867f38

Please sign in to comment.