|
| 1 | +--- |
| 2 | +title: Getting Started |
| 3 | +weight: 20 |
| 4 | +aliases: /trilio-cr/getting-started/ |
| 5 | +--- |
| 6 | + |
| 7 | +## Deployment |
| 8 | + |
| 9 | +### 1. Clone the repository |
| 10 | + |
| 11 | +```bash |
| 12 | +git clone https://github.com/trilio-demo/trilio-continuous-restore |
| 13 | +cd trilio-continuous-restore |
| 14 | +``` |
| 15 | + |
| 16 | +### 2. Configure S3 bucket details |
| 17 | + |
| 18 | +Edit `values-hub.yaml` and `values-secondary.yaml` to set your S3 bucket name and region: |
| 19 | + |
| 20 | +```yaml |
| 21 | +# In both values-hub.yaml and values-secondary.yaml, under the trilio-operand app overrides: |
| 22 | +overrides: |
| 23 | + - name: backupTarget.bucketName |
| 24 | + value: <your-bucket-name> |
| 25 | + - name: backupTarget.region |
| 26 | + value: <your-bucket-region> # e.g. us-east-1 |
| 27 | +``` |
| 28 | +
|
| 29 | +### 3. Populate secrets |
| 30 | +
|
| 31 | +Create `values-secret.yaml` from the template: |
| 32 | + |
| 33 | +```bash |
| 34 | +cp values-secret.yaml.template ~/values-secret-trilio-continuous-restore.yaml |
| 35 | +``` |
| 36 | + |
| 37 | +Edit `~/values-secret-trilio-continuous-restore.yaml` and fill in your credentials: |
| 38 | + |
| 39 | +```yaml |
| 40 | +secrets: |
| 41 | + - name: trilio-license |
| 42 | + vaultPrefixes: |
| 43 | + - global |
| 44 | + fields: |
| 45 | + - name: key |
| 46 | + value: <your-trilio-license-key> # single unbroken line, no escape characters |
| 47 | +
|
| 48 | + - name: trilio-s3 |
| 49 | + vaultPrefixes: |
| 50 | + - global |
| 51 | + fields: |
| 52 | + - name: accessKey |
| 53 | + value: <your-s3-access-key> |
| 54 | + - name: secretKey |
| 55 | + value: <your-s3-secret-key> |
| 56 | +``` |
| 57 | + |
| 58 | +> Always update secrets in your home directory, never in the repo's `values-secret.yaml.template` so that secrets are never commited to git. |
| 59 | + |
| 60 | +### 4. Install the pattern |
| 61 | + |
| 62 | +```bash |
| 63 | +./pattern.sh make install |
| 64 | +``` |
| 65 | + |
| 66 | +This command: |
| 67 | +1. Bootstraps HashiCorp Vault and loads secrets from `~/values-secret-trilio-continuous-restore.yaml` |
| 68 | +2. Installs the Validated Patterns operator on the hub |
| 69 | +3. Creates the `ValidatedPattern` CR which triggers ArgoCD to deploy all hub components |
| 70 | + |
| 71 | +Monitor progress in the ArgoCD UI or via: |
| 72 | + |
| 73 | +```bash |
| 74 | +oc get application -n openshift-gitops |
| 75 | +``` |
| 76 | + |
| 77 | +All applications should reach `Synced / Healthy` within 10–15 minutes. |
| 78 | + |
| 79 | +**Alternative: manual secret population via `oc`** |
| 80 | + |
| 81 | +To write or rotate secrets directly in HashiCorp Vault without re-running `./pattern.sh make install`: |
| 82 | + |
| 83 | +```bash |
| 84 | +# Extract Vault root token |
| 85 | +VAULT_TOKEN=$(oc get secret vaultkeys -n imperative \ |
| 86 | + -o jsonpath='{.data.vault_data_json}' | \ |
| 87 | + base64 -d | python3 -c "import sys,json; print(json.load(sys.stdin)['root_token'])") |
| 88 | +
|
| 89 | +# Write Trilio license |
| 90 | +oc exec -n vault vault-0 -- env VAULT_TOKEN=$VAULT_TOKEN \ |
| 91 | + vault kv put secret/global/trilio-license key="<your-license-key>" |
| 92 | +
|
| 93 | +# Write S3 credentials |
| 94 | +oc exec -n vault vault-0 -- env VAULT_TOKEN=$VAULT_TOKEN \ |
| 95 | + vault kv put secret/global/trilio-s3 accessKey="<key>" secretKey="<secret>" |
| 96 | +``` |
| 97 | + |
| 98 | +You can also reload secrets from `~/values-secret-trilio-continuous-restore.yaml` by running: |
| 99 | + |
| 100 | +```bash |
| 101 | +./pattern.sh make load-secrets |
| 102 | +``` |
| 103 | + |
| 104 | +### 5. Verify hub deployment |
| 105 | + |
| 106 | +Check that Trilio is healthy: |
| 107 | + |
| 108 | +```bash |
| 109 | +oc get triliovaultmanager -n trilio-system |
| 110 | +# STATUS should be Deployed or Updated |
| 111 | +
|
| 112 | +oc get target -n trilio-system |
| 113 | +# STATUS should be Available |
| 114 | +``` |
| 115 | + |
| 116 | +Check the end-to-end DR status (updated automatically by the imperative framework): |
| 117 | + |
| 118 | +```bash |
| 119 | +make dr-status |
| 120 | +``` |
| 121 | + |
| 122 | +Initial run: `trilio-enable-cr` and `trilio-backup` will complete within the first two CronJob cycles (~20 minutes). Standard restore follows. All phases `PASS` indicates the hub is fully operational. |
| 123 | + |
| 124 | +--- |
| 125 | + |
| 126 | +## Spoke (DR Cluster) Onboarding |
| 127 | + |
| 128 | +### 1. Import the DR cluster into ACM |
| 129 | + |
| 130 | +Import the DR cluster via the ACM console or `oc` CLI. Note the cluster name assigned during import. |
| 131 | + |
| 132 | +### 2. Label and onboard |
| 133 | + |
| 134 | +```bash |
| 135 | +make onboard-spoke CLUSTER=<acm-cluster-name> |
| 136 | +``` |
| 137 | + |
| 138 | +This labels the cluster with `clusterGroup=secondary`, which triggers ACM to deploy the spoke configuration via ArgoCD. |
| 139 | + |
| 140 | +After running `make onboard-spoke`, kick the spoke-side ArgoCD application to sync immediately (run on the spoke cluster context): |
| 141 | + |
| 142 | +```bash |
| 143 | +oc patch application.argoproj.io main-trilio-continuous-restore-secondary \ |
| 144 | + -n openshift-gitops --type merge \ |
| 145 | + -p '{"operation":{"sync":{}}}' |
| 146 | +``` |
| 147 | + |
| 148 | +### 3. Monitor spoke onboarding |
| 149 | + |
| 150 | +```bash |
| 151 | +make spoke-status CLUSTER=<acm-cluster-name> |
| 152 | +``` |
| 153 | + |
| 154 | +Expected progression: |
| 155 | +1. Trilio operator installs (OLM subscription) |
| 156 | +2. TrilioVaultManager deploys (ESO delivers S3 + license secrets) |
| 157 | +3. BackupTarget becomes Available (EventTarget pod starts) |
| 158 | +4. ConsistentSets begin appearing as hub backups are detected (~10–20 minutes after the hub's CR backup completes) |
| 159 | +5. Spoke imperative restore runs automatically once the first ConsistentSet is Available |
| 160 | + |
| 161 | +The full spoke onboarding sequence typically takes 15–25 minutes from label application to a running TrilioVaultManager. The imperative restore adds another 30–45 minutes on top of that for the first ConsistentSet to appear and the restore to complete. |
| 162 | + |
| 163 | +### Known: trilio-operand OutOfSync on spoke after onboarding |
| 164 | + |
| 165 | +ArgoCD may show `trilio-operand` as `OutOfSync / Missing` immediately after spoke onboarding. This is a CRD timing issue — ArgoCD attempts to sync the TrilioVaultManager CR before the Trilio operator has finished registering its Custom Resource Definitions (CRDs). |
| 166 | + |
| 167 | +The `SkipDryRunOnMissingResource=true` sync option is set in `values-secondary.yaml` to handle this automatically. If the issue persists after 5–10 minutes, manually refresh the ArgoCD application: |
| 168 | + |
| 169 | +```bash |
| 170 | +oc patch application trilio-operand -n main-trilio-continuous-restore-secondary \ |
| 171 | + --type merge -p '{"operation":{"sync":{}}}' |
| 172 | +``` |
0 commit comments