140 lines
9.1 KiB
Plaintext
140 lines
9.1 KiB
Plaintext
Congratulations. You have just deployed JFrog Artifactory HA!
|
|
|
|
{{- if .Values.artifactory.masterKey }}
|
|
{{- if and (not .Values.artifactory.masterKeySecretName) (eq .Values.artifactory.masterKey "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF") }}
|
|
|
|
|
|
***************************************** WARNING ******************************************
|
|
* Your Artifactory master key is still set to the provided example: *
|
|
* artifactory.masterKey=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF *
|
|
* *
|
|
* You should change this to your own generated key: *
|
|
* $ export MASTER_KEY=$(openssl rand -hex 32) *
|
|
* $ echo ${MASTER_KEY} *
|
|
* *
|
|
* Pass the created master key to helm with '--set artifactory.masterKey=${MASTER_KEY}' *
|
|
* *
|
|
* Alternatively, you can use a pre-existing secret with a key called master-key with *
|
|
* '--set artifactory.masterKeySecretName=${SECRET_NAME}' *
|
|
********************************************************************************************
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{- if .Values.artifactory.joinKey }}
|
|
{{- if eq .Values.artifactory.joinKey "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE" }}
|
|
|
|
|
|
***************************************** WARNING ******************************************
|
|
* Your Artifactory join key is still set to the provided example: *
|
|
* artifactory.joinKey=EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE *
|
|
* *
|
|
* You should change this to your own generated key: *
|
|
* $ export JOIN_KEY=$(openssl rand -hex 32) *
|
|
* $ echo ${JOIN_KEY} *
|
|
* *
|
|
* Pass the created master key to helm with '--set artifactory.joinKey=${JOIN_KEY}' *
|
|
* *
|
|
********************************************************************************************
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
|
|
{{- if and (or (or (or (or (or ( or ( or ( or (or (or ( or (or .Values.artifactory.masterKeySecretName .Values.global.masterKeySecretName) .Values.systemYamlOverride.existingSecret) (or .Values.artifactory.customCertificates.enabled .Values.global.customCertificates.enabled)) .Values.aws.licenseConfigSecretName) .Values.artifactory.persistence.customBinarystoreXmlSecret) .Values.access.customCertificatesSecretName) .Values.systemYamlOverride.existingSecret) .Values.artifactory.license.secret) .Values.artifactory.userPluginSecrets) (and .Values.artifactory.admin.secret .Values.artifactory.admin.dataKey)) (and .Values.artifactory.persistence.googleStorage.gcpServiceAccount.enabled .Values.artifactory.persistence.googleStorage.gcpServiceAccount.customSecretName)) (or .Values.artifactory.joinKeySecretName .Values.global.joinKeySecretName)) .Values.artifactory.unifiedSecretInstallation }}
|
|
****************************************** WARNING **************************************************************************************************
|
|
* The unifiedSecretInstallation flag is currently enabled, which creates the unified secret. The existing secrets will continue as separate secrets.*
|
|
* Update the values.yaml with the existing secrets to add them to the unified secret. *
|
|
*****************************************************************************************************************************************************
|
|
{{- end }}
|
|
|
|
{{- if .Values.postgresql.enabled }}
|
|
|
|
DATABASE:
|
|
To extract the database password, run the following
|
|
export DB_PASSWORD=$(kubectl get --namespace {{ .Release.Namespace }} $(kubectl get secret --namespace {{ .Release.Namespace }} -o name | grep postgresql) -o jsonpath="{.data.postgresql-password}" | base64 --decode)
|
|
echo ${DB_PASSWORD}
|
|
{{- end }}
|
|
|
|
SETUP:
|
|
1. Get the Artifactory IP and URL
|
|
{{printf "\n" }}
|
|
{{- if .Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints" -}}
|
|
|
|
NOTE: You are installing Artifactory in Openshift Environment.
|
|
Nginx service is not available with this installation. If required, you can set the value for ingress in values.yaml.
|
|
|
|
{{- else if contains "NodePort" .Values.nginx.service.type }}
|
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "artifactory-ha.nginx.fullname" . }})
|
|
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.nginx.service.type }}
|
|
NOTE: It may take a few minutes for the LoadBalancer public IP to be available!
|
|
|
|
You can watch the status of the service by running 'kubectl get svc -w {{ template "artifactory-ha.nginx.fullname" . }}'
|
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "artifactory-ha.nginx.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
|
echo http://$SERVICE_IP/
|
|
|
|
{{- else if contains "ClusterIP" .Values.nginx.service.type }}
|
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "component={{ .Values.nginx.name }}" -o jsonpath="{.items[0].metadata.name}")
|
|
kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 8080:80
|
|
echo http://127.0.0.1:8080
|
|
|
|
{{- end }}
|
|
|
|
2. Open Artifactory in your browser
|
|
Default credential for Artifactory:
|
|
user: admin
|
|
password: password
|
|
|
|
{{- if .Values.artifactory.license.secret }}
|
|
|
|
3. Artifactory license(s) is deployed as a Kubernetes secret. This method is relevant for initial deployment only!
|
|
Updating the license should be done via Artifactory UI or REST API. If you want to keep managing the artifactory license using the same method, you can use artifactory.copyOnEveryStartup in values.yaml.
|
|
|
|
{{- else }}
|
|
|
|
3. Add HA licenses to activate Artifactory HA through the Artifactory UI
|
|
NOTE: Each Artifactory node requires a valid license. See https://www.jfrog.com/confluence/display/RTF/HA+Installation+and+Setup for more details.
|
|
|
|
{{- end }}
|
|
|
|
{{ if or .Values.artifactory.primary.javaOpts.jmx.enabled .Values.artifactory.node.javaOpts.jmx.enabled }}
|
|
JMX configuration:
|
|
{{- if not (contains "LoadBalancer" .Values.artifactory.service.type) }}
|
|
If you want to access JMX from you computer with jconsole, you should set ".Values.artifactory.service.type=LoadBalancer" !!!
|
|
{{ end }}
|
|
|
|
1. Get the Artifactory service IP:
|
|
{{- if .Values.artifactory.primary.javaOpts.jmx.enabled }}
|
|
export PRIMARY_SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "artifactory-ha.primary.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
|
{{- end }}
|
|
{{- if .Values.artifactory.node.javaOpts.jmx.enabled }}
|
|
export MEMBER_SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "artifactory-ha.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
|
{{- end }}
|
|
|
|
2. Map the service name to the service IP in /etc/hosts:
|
|
{{- if .Values.artifactory.primary.javaOpts.jmx.enabled }}
|
|
sudo sh -c "echo \"${PRIMARY_SERVICE_IP} {{ template "artifactory-ha.primary.name" . }}\" >> /etc/hosts"
|
|
{{- end }}
|
|
{{- if .Values.artifactory.node.javaOpts.jmx.enabled }}
|
|
sudo sh -c "echo \"${MEMBER_SERVICE_IP} {{ template "artifactory-ha.fullname" . }}\" >> /etc/hosts"
|
|
{{- end }}
|
|
|
|
3. Launch jconsole:
|
|
{{- if .Values.artifactory.primary.javaOpts.jmx.enabled }}
|
|
jconsole {{ template "artifactory-ha.primary.name" . }}:{{ .Values.artifactory.primary.javaOpts.jmx.port }}
|
|
{{- end }}
|
|
{{- if .Values.artifactory.node.javaOpts.jmx.enabled }}
|
|
jconsole {{ template "artifactory-ha.fullname" . }}:{{ .Values.artifactory.node.javaOpts.jmx.port }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
|
|
{{- if ge (.Values.artifactory.node.replicaCount | int) 1 }}
|
|
***************************************** WARNING *****************************************************************************
|
|
* Currently member node(s) are enabled, will be depreciated in upcoming releases *
|
|
* It is recommended to upgrade from primary-members to primary-only. *
|
|
* It can be done by deploying the chart ( >=107.59.x) with the new values. Also, please refer to changelog of 107.59.x chart *
|
|
* More Info: https://jfrog.com/help/r/jfrog-installation-setup-documentation/cloud-native-high-availability *
|
|
*******************************************************************************************************************************
|
|
{{- end }} |