From 19e8cc417229329fe814b3f669bbb08b436c597c Mon Sep 17 00:00:00 2001 From: Paul Pan Date: Thu, 9 Jan 2025 15:19:21 -0800 Subject: [PATCH] - Added code block for all commands - Updated S3 example to use IAM role - Modified OpenShift notes - Explained the use of sizing files --- .../HA-with-distribution-S3/binarystore.xml | 3 +- .../HA-with-distribution-S3/readme.md | 73 ++++++++++++------- .../values-artifactory.yaml | 5 ++ 3 files changed, 54 insertions(+), 27 deletions(-) diff --git a/examples/jfrog-platform/HA-with-distribution-S3/binarystore.xml b/examples/jfrog-platform/HA-with-distribution-S3/binarystore.xml index 1d1a1d8d8..e880457ce 100644 --- a/examples/jfrog-platform/HA-with-distribution-S3/binarystore.xml +++ b/examples/jfrog-platform/HA-with-distribution-S3/binarystore.xml @@ -8,13 +8,12 @@ s3.amazonaws.com bucketName pathPrefix - s3Region - yourIdentity yourCredentials true 600 50 10000 + true 5000000000 diff --git a/examples/jfrog-platform/HA-with-distribution-S3/readme.md b/examples/jfrog-platform/HA-with-distribution-S3/readme.md index b1c606d82..419a75e50 100644 --- a/examples/jfrog-platform/HA-with-distribution-S3/readme.md +++ b/examples/jfrog-platform/HA-with-distribution-S3/readme.md @@ -34,72 +34,95 @@ | Replica | 2 | | Database | External Postgres | | Persistence | Default Storage Class | -| External redis | ❌ | +| External Redis | ❌ | | SSL | ✅ | | UnifiedSecret | ❌ | | Sizing Parameters | distribution-xlarge | | Private Registry | ✅ | - -Note: This requires distribution chart 102.23.0+ to work, which comes default with platform chart 10.17.4+. - - ## Install -1. In values-main.yaml, add your Artifactory hostname as jfrogUrl. +1. In `values-main.yaml`, add your Artifactory hostname as `jfrogUrl`. -2. To pull images from a private registry, create your own imagePullSecrets and fill in imagePullSecrets and imageRegistry in values-main.yaml: - +2. To pull images from a private registry, create your own `imagePullSecrets` and fill in `imagePullSecrets` and `imageRegistry` in `values-main.yaml`: + + ``` $ kubectl create secret docker-registry regsecret --docker-server= --docker-username= --docker-password= --docker-email= + ``` 3. Passing secret: - If you want to change the secret name, remember to update the reference in values-main or values-artifactory + If you want to change the secret name, remember to update the reference in `values-main.yaml` or `values-artifactory.yaml` a. Master Key + ``` $ kubectl create secret generic my-master-key --from-literal=master-key="$(openssl rand -hex 32)" -n + ``` b. Join Key + ``` $ kubectl create secret generic my-join-key --from-literal=join-key="$(openssl rand -hex 32)" -n + ``` c. CA Certificate for SSL - 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) + 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) + ``` $ kubectl create secret tls my-cacert --cert=ca.crt --key=ca.private.key -n + ``` d. Default Admin Credentials + ``` $ kubectl create secret generic my-admin --from-literal=bootstrap.creds="$(printf "%s@%s=%s" admin 127.0.0.1 password| base64 )" -n + ``` -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) +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) + ``` $ kubectl create secret generic my-database --from-literal=db-url='database_url' --from-literal=db-user='admin_user' --from-literal=db-password='password' -n $ 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 + ``` -5. Create the binarystore.xml secret or pull the values from environment variables. +5. Create the `binarystore.xml` secret or pull the values from environment variables. + ``` $ kubectl create secret generic my-binarystore --from-file=binarystore.xml + ``` - To use IAM roles, check [here](https://jfrog.com/help/r/artifactory-how-to-configure-an-aws-s3-object-store-using-an-iam-role-instead-of-an-iam-user/artifactory-how-to-configure-an-aws-s3-object-store-using-an-iam-role-instead-of-an-iam-user) + [Create an IAM role with `AmazonS3FullAccess` permission](https://jfrog.com/help/r/active/artifactory-connect-artifactory-to-s3-bucket-with-iam-role) + + Associate an IAM role to the service account in `values-artifactory.yaml` by specifying the ARN: -6. Pull charts ( if you need to reference the suggested sizing paramerters ) and install + ``` + serviceAccount: + create: true + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam:::role/ + ``` +6. Pull charts ( if you need to reference the suggested sizing paramerters ) and install -``` -$ helm repo update -$ helm pull jfrog/jfrog-platform --untar -``` + 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. + + See more details regarding the baseline sizing parameters [here](https://jfrog.com/help/r/jfrog-platform-reference-architecture/jfrog-platform-reference-architecture) + ``` + $ helm repo update + $ helm pull jfrog/jfrog-platform --untar + ``` -``` -$ helm install jfrog/jfrog-platform -n -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 -``` + ``` + $ helm install jfrog/jfrog-platform -n -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 + ``` -7. If you are installing on openshift, add values-openshift.yaml +7. If installing on OpenShift, add values-openshift.yaml: -``` -$ helm install jfrog/jfrog-platform -n -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 -``` + ``` + $ helm install jfrog/jfrog-platform -n -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 + ``` + +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+. \ No newline at end of file diff --git a/examples/jfrog-platform/HA-with-distribution-S3/values-artifactory.yaml b/examples/jfrog-platform/HA-with-distribution-S3/values-artifactory.yaml index 1e99dc2c3..2141faa35 100644 --- a/examples/jfrog-platform/HA-with-distribution-S3/values-artifactory.yaml +++ b/examples/jfrog-platform/HA-with-distribution-S3/values-artifactory.yaml @@ -17,6 +17,11 @@ artifactory: enabled: false ingress: enabled: false + + serviceAccount: + create: true + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam:::role/ persistence: enabled: true