README for artifactory-ha-operator formatting updates

This commit is contained in:
John Peterson
2020-02-13 14:05:23 -08:00
parent 91a785a188
commit 43118a099c
2 changed files with 53 additions and 13 deletions

7
Openshift4/README.md Normal file
View File

@@ -0,0 +1,7 @@
# Openshift 4 Operators
## Artifactory HA
To install Artifactory HA as an Openshift 4 operator please use the console's OperatorHub to install the official operator.
To install the operator locally please refer to the instructions that can be found in the README under artifactory-ha-operator.

View File

@@ -1,4 +1,4 @@
# Openshift 4 Artifactory Operator # Artifactory HA Operator
## Cluster Setup ## Cluster Setup
###### Security Context Constraints - Anyuid ###### Security Context Constraints - Anyuid
@@ -6,7 +6,9 @@ Openshift only allows statefulsets / pods to run in specific user and group id r
Artifactory currently uses users outside of this allowed range. Artifactory currently uses users outside of this allowed range.
For this reason the service account for the operator in the jfrog-artifactory namespace must be granted anyuid privileges. For this reason the service account for the operator in the jfrog-artifactory namespace must be granted anyuid privileges.
Ex: oc adm policy add-scc-to-user anyuid system:serviceaccount:jfrog-artifactory:artifactory-ha-operator ```
oc adm policy add-scc-to-user anyuid system:serviceaccount:jfrog-artifactory:artifactory-ha-operator
```
Where anyuid is the Security context constraint being applied to the service account artifactory-ha-operator in namespace jfrog-artifactory. Where anyuid is the Security context constraint being applied to the service account artifactory-ha-operator in namespace jfrog-artifactory.
@@ -20,9 +22,11 @@ A security context constraint has been created for hostpath in deploy/hostpathsc
You can apply the security context constraint and hostpath plugin patch via these commands: You can apply the security context constraint and hostpath plugin patch via these commands:
```
oc apply -f deploy/hostpathscc.yaml oc apply -f deploy/hostpathscc.yaml
oc patch securitycontextconstraints.security.openshift.io/hostpath --type=merge --patch='{"allowHostDirVolumePlugin": true}' oc patch securitycontextconstraints.security.openshift.io/hostpath --type=merge --patch='{"allowHostDirVolumePlugin": true}'
oc adm policy add-scc-to-user hostpath system:serviceaccount:jfrog-artifactory:artifactory-ha-operator oc adm policy add-scc-to-user hostpath system:serviceaccount:jfrog-artifactory:artifactory-ha-operator
```
Or if you run setup.sh these will already be done. Or if you run setup.sh these will already be done.
@@ -34,26 +38,35 @@ If your cluster does not already have existing persistent volumes that are 200Gi
Example persistent volumes can be found at: Example persistent volumes can be found at:
```
helm-charts/openshift-artifactory-ha/pv-examples helm-charts/openshift-artifactory-ha/pv-examples
```
If you create the five folders on each node: If you create the five folders on each node:
/mnt/pv-data/pv0001-large ```
/mnt/pv-data/pv0002-large mkdir -p /mnt/pv-data/pv0001-large
/mnt/pv-data/pv0003-large mkdir -p /mnt/pv-data/pv0002-large
/mnt/pv-data/pv0004-large mkdir -p /mnt/pv-data/pv0003-large
/mnt/pv-data/pv0005-large mkdir -p /mnt/pv-data/pv0004-large
mkdir -p /mnt/pv-data/pv0005-large
```
You can then apply the example persistent volumes to your cluster with: You can then apply the example persistent volumes to your cluster with:
```
oc apply -f helm-charts/openshift-artifactory-ha/pv-examples oc apply -f helm-charts/openshift-artifactory-ha/pv-examples
```
## Installation types ## Installation types
###### OLM Catalog ###### OLM Catalog
To install via the OLM catalog download the operator from the Operator hub and install it via the Openshift console GUI To install via the OLM catalog download the operator from the Operator hub and install it via the Openshift console GUI
To test OLM catalog installs you will need to deploy the lastest ClusterServiceVersion found at: To test OLM catalog installs you will need to deploy the lastest ClusterServiceVersion found at:
```
deploy/olm-catalog/artifactory-ha-operator/X.X.X/artifactory-ha-operator.vX.X.X.clusterserviceversion.yaml deploy/olm-catalog/artifactory-ha-operator/X.X.X/artifactory-ha-operator.vX.X.X.clusterserviceversion.yaml
```
This will install the operator into whatever cluster your kubectl or oc program is currently logged into. This will install the operator into whatever cluster your kubectl or oc program is currently logged into.
@@ -64,7 +77,9 @@ To install the operator via the Operator YAML follow the Local Testing tests.
Instead of running operator-sdk up local for the last step run: Instead of running operator-sdk up local for the last step run:
```
oc apply -f deploy/operator.yaml oc apply -f deploy/operator.yaml
```
This will deploy the operator into the cluster. This will deploy the operator into the cluster.
@@ -78,18 +93,36 @@ Install code ready containers if you do not already have it installed.
Run your cluster with 2 cpus and 8192 MBs of memory at a minimum to support HA: Run your cluster with 2 cpus and 8192 MBs of memory at a minimum to support HA:
```
crc start -c 2 -m 8192 crc start -c 2 -m 8192
```
Recommended settings: Recommended settings:
```
crc start -c 4 -m 16384 crc start -c 4 -m 16384
```
Create file:
```
JFrog-Cloud-Installers/Openshift4/artifactory.cluster.license
```
Create file: JFrog-Cloud-Installers/Openshift4/artifactory.cluster.license
Paste your license keys into this file for HA configuration of multiple nodes. Paste your license keys into this file for HA configuration of multiple nodes.
Note: License keys must be separated by two new lines.
Run: setup.sh * License keys must be separated by two new lines. *
Run:
```
JFrog-Cloud-Installers/Openshift4/artifactory-ha-operator/setup.sh
```
###### Operator-sdk local ###### Operator-sdk local
Run: operator-sdk up local Run:
```
operator-sdk up local
```