Skip to content

Commit cc91e4f

Browse files
authored
[examples] Platform chart with 3-Node Artifactory with Distribution and direct-S3 Persistence (#1949)
* added examples to deploy 3-Node Artifactory Cluster with Distribution and direct-S3 Persistence - Added code block for all commands - Updated S3 example to use IAM role - Modified OpenShift notes - Explained the use of sizing files
1 parent dacbcf1 commit cc91e4f

File tree

6 files changed

+314
-0
lines changed

6 files changed

+314
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<config version="2">
2+
<chain>
3+
<provider id="cache-fs" type="cache-fs">
4+
<provider id="s3-storage-v3" type="s3-storage-v3"/>
5+
</provider>
6+
</chain>
7+
<provider id="s3-storage-v3" type="s3-storage-v3">
8+
<endpoint>s3.amazonaws.com</endpoint>
9+
<bucketName>bucketName</bucketName>
10+
<path>pathPrefix</path>
11+
<credential>yourCredentials</credential>
12+
<usePresigning>true</usePresigning>
13+
<signatureExpirySeconds>600</signatureExpirySeconds>
14+
<maxConnections>50</maxConnections>
15+
<connectionTimeout>10000</connectionTimeout>
16+
<useInstanceCredentials>true</useInstanceCredentials>
17+
</provider>
18+
<provider type="cache-fs" id="cache-fs">
19+
<maxCacheSize>5000000000</maxCacheSize>
20+
</provider>
21+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
## 3-Node Artifactory Cluster with Distribution and direct-S3 Provider
2+
3+
### Overall
4+
| Product | Enabled |
5+
|-------------|-------------|
6+
| Artifactory ||
7+
| xray ||
8+
| distribution ||
9+
| insight ||
10+
| pipelines ||
11+
| worker ||
12+
13+
14+
### Artifactory
15+
| Detail | Value |
16+
|-------------|-------------|
17+
| Replica | 3 |
18+
| Database | External Postgres |
19+
| Persistence | Default Storage Class + S3 |
20+
| SSL ||
21+
| Ingress ||
22+
| Nginx Deployment ||
23+
| UnifiedSecret ||
24+
| Non-Default Admin Credential ||
25+
| Default Master Key ||
26+
| Sizing Parameters | artifactory-xlarge |
27+
| Private Registry ||
28+
29+
30+
### Distribution
31+
32+
| Detail | Value |
33+
|-------------|-------------|
34+
| Replica | 2 |
35+
| Database | External Postgres |
36+
| Persistence | Default Storage Class |
37+
| External Redis ||
38+
| SSL ||
39+
| UnifiedSecret ||
40+
| Sizing Parameters | distribution-xlarge |
41+
| Private Registry ||
42+
43+
## Install
44+
45+
1. In `values-main.yaml`, add your Artifactory hostname as `jfrogUrl`.
46+
47+
2. To pull images from a private registry, create your own `imagePullSecrets` and fill in `imagePullSecrets` and `imageRegistry` in `values-main.yaml`:
48+
49+
```
50+
$ kubectl create secret docker-registry regsecret --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>
51+
```
52+
53+
3. Passing secret:
54+
55+
If you want to change the secret name, remember to update the reference in `values-main.yaml` or `values-artifactory.yaml`
56+
57+
a. Master Key
58+
59+
```
60+
$ kubectl create secret generic my-master-key --from-literal=master-key="$(openssl rand -hex 32)" -n <namespace>
61+
```
62+
63+
b. Join Key
64+
65+
```
66+
$ kubectl create secret generic my-join-key --from-literal=join-key="$(openssl rand -hex 32)" -n <namespace>
67+
```
68+
69+
c. CA Certificate for SSL
70+
71+
Passing your own `ca.crt` for artifactory if needed for ssl configuration. See prerequisite for `ca.crt`. [here](https://jfrog.com/help/r/jfrog-installation-setup-documentation/prerequisites-for-custom-tls-certificate)
72+
73+
```
74+
$ kubectl create secret tls my-cacert --cert=ca.crt --key=ca.private.key -n <namespace>
75+
```
76+
77+
d. Default Admin Credentials
78+
79+
```
80+
$ kubectl create secret generic my-admin --from-literal=bootstrap.creds="$(printf "%s@%s=%s" admin 127.0.0.1 password| base64 )" -n <namespace>
81+
```
82+
83+
4. Fill in database details ( `values-artifactory.yaml` ). [See here for more details related to database.](https://jfrog.com/help/r/jfrog-installation-setup-documentation/database-configuration)
84+
85+
```
86+
$ kubectl create secret generic my-database --from-literal=db-url='database_url' --from-literal=db-user='admin_user' --from-literal=db-password='password' -n <namespace>
87+
$ kubectl create secret generic my-distribution-database --from-literal=db-url='database_url' --from-literal=db-user='admin_user' --from-literal=db-password='password' -n <namespace>
88+
```
89+
90+
5. Create the `binarystore.xml` secret or pull the values from environment variables.
91+
92+
```
93+
$ kubectl create secret generic my-binarystore --from-file=binarystore.xml
94+
```
95+
96+
[Create an IAM role with `AmazonS3FullAccess` permission](https://jfrog.com/help/r/active/artifactory-connect-artifactory-to-s3-bucket-with-iam-role)
97+
98+
Associate an IAM role to the service account in `values-artifactory.yaml` by specifying the ARN:
99+
100+
```
101+
serviceAccount:
102+
create: true
103+
annotations:
104+
eks.amazonaws.com/role-arn: arn:aws:iam::<ACCOUNT_ID>:role/<IAM_ROLE_NAME>
105+
```
106+
107+
6. Pull charts ( if you need to reference the suggested sizing paramerters ) and install
108+
109+
In this example, we are going to reference the baseline xlarge sizing parameters for our Artifactory and Distribution release. To do so, first pull and untar the chart. You may skip these steps and add/create your own sizing parameter YAML.
110+
111+
See more details regarding the baseline sizing parameters [here](https://jfrog.com/help/r/jfrog-platform-reference-architecture/jfrog-platform-reference-architecture)
112+
113+
```
114+
$ helm repo update
115+
$ helm pull jfrog/jfrog-platform --untar
116+
```
117+
118+
```
119+
$ helm install <name> jfrog/jfrog-platform -n <namespace> -f values-main.yaml -f values-artifactory.yaml -f values-distribution.yaml -f jfrog-platform/charts/artifactory/sizing/artifactory-xlarge.yaml -f jfrog-platform/charts/distribution/sizing/distribution-xlarge.yaml
120+
```
121+
122+
7. If installing on OpenShift, add values-openshift.yaml:
123+
124+
```
125+
$ helm install <name> jfrog/jfrog-platform -n <namespace> -f values-main.yaml -f values-artifactory.yaml -f values-distribution.yaml -f values-openshift.yaml -f jfrog-platform/charts/artifactory/sizing/artifactory-xlarge.yaml -f jfrog-platform/charts/distribution/sizing/distribution-xlarge.yaml
126+
```
127+
128+
Note: To install on OpenShift out-of-the-box, you need Distribution chart 102.23.0+, so the minimum platform chart version is 10.17.4+.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
artifactory:
2+
ingress:
3+
enabled: false
4+
router:
5+
tlsEnabled: true
6+
7+
artifactory:
8+
name: artifactory
9+
admin:
10+
secret: my-admin
11+
dataKey: bootstrap.creds
12+
13+
service:
14+
name: artifactory
15+
16+
replicator:
17+
enabled: false
18+
ingress:
19+
enabled: false
20+
21+
serviceAccount:
22+
create: true
23+
annotations:
24+
eks.amazonaws.com/role-arn: arn:aws:iam::<ACCOUNT_ID>:role/<IAM_ROLE_NAME>
25+
26+
persistence:
27+
enabled: true
28+
accessMode: ReadWriteOnce
29+
size: 100Gi
30+
customBinarystoreXmlSecret: my-binarystore
31+
32+
access:
33+
enabled: true
34+
accessConfig:
35+
security:
36+
tls: true
37+
38+
mc:
39+
enabled: true
40+
41+
# Nginx
42+
nginx:
43+
enabled: true
44+
labels: {}
45+
service:
46+
## For minikube, set this to NodePort, elsewhere use LoadBalancer
47+
type: LoadBalancer
48+
ssloffload: false
49+
## For supporting whitelist on the Nginx LoadBalancer service
50+
## Set this to a list of IP CIDR ranges
51+
## Example: loadBalancerSourceRanges: ['10.10.10.5/32', '10.11.10.5/32']
52+
## or pass from helm command line
53+
## Example: helm install ... --set nginx.service.loadBalancerSourceRanges='{10.10.10.5/32,10.11.10.5/32}'
54+
loadBalancerSourceRanges: []
55+
## Assuming ssl terminiation at load balancer
56+
## For example, on Eks , add annoation like
57+
## service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:...
58+
## service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
59+
annotations: {}
60+
## Provide static ip address
61+
loadBalancerIP:
62+
63+
# chose your selector/affinities/toleration strategy based on actual need
64+
nodeSelector: {}
65+
tolerations: []
66+
affinity: {}
67+
68+
69+
postgresql:
70+
enabled: false
71+
72+
database:
73+
type: "postgresql"
74+
driver: org.postgresql.Driver
75+
secrets:
76+
user:
77+
name: "my-database"
78+
key: "db-user"
79+
password:
80+
name: "my-database"
81+
key: "db-password"
82+
url:
83+
name: "my-database"
84+
key: "db-url"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
distribution:
2+
postgresql:
3+
enabled: false
4+
database:
5+
type: "postgresql"
6+
driver: org.postgresql.Driver
7+
secrets:
8+
user:
9+
name: "my-distribution-database"
10+
key: "db-user"
11+
password:
12+
name: "my-distribution-database"
13+
key: "db-password"
14+
url:
15+
name: "my-distribution-database"
16+
key: "db-url"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
global:
2+
imagePullSecrets:
3+
- regsecret ## credential for your local registry
4+
imageRegistry: releases-docker.jfrog.io ## local private registry
5+
jfrogUrl: 'https://myjfrog.io' ## The artifactory host url
6+
joinKeySecretName: my-join-key
7+
masterKeySecretName: my-master-key
8+
database:
9+
initDBCreation: false
10+
11+
## This Postgresql is used by all products , set postgresql.enabled: false, when you want to use external postgresql for all products
12+
postgresql:
13+
enabled: false
14+
15+
## This Rabbitmq is used by Xray and Pipelines only, set rabbitmq.enabled: false, when Xray or Pipelines is not enabled
16+
rabbitmq:
17+
enabled: false
18+
19+
## This Redis is used by pipelines only, set redis.enabled: false, when pipelines is not enabled
20+
redis:
21+
enabled: false
22+
23+
artifactory:
24+
enabled: true
25+
artifactory:
26+
replicaCount: 3
27+
28+
xray:
29+
enabled: false
30+
31+
distribution:
32+
enabled: true
33+
unifiedUpgradeAllowed: true
34+
distribution:
35+
unifiedSecretInstallation: false
36+
37+
insight:
38+
enabled: false
39+
40+
pipelines:
41+
enabled: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
artifactory:
2+
containerSecurityContext:
3+
enabled: false
4+
artifactory:
5+
podSecurityContext:
6+
enabled: false
7+
nginx:
8+
podSecurityContext:
9+
enabled: false
10+
containerSecurityContext:
11+
enabled: false
12+
distribution:
13+
containerSecurityContext:
14+
enabled: false
15+
podSecurityContext:
16+
enabled: false
17+
redis:
18+
containerSecurityContext:
19+
enabled: false
20+
postgresql:
21+
securityContext:
22+
enabled: false
23+
containerSecurityContext:
24+
enabled: false

0 commit comments

Comments
 (0)