Skip to content

Commit

Permalink
docs: make the install paths easier to use
Browse files Browse the repository at this point in the history
Attempt to make the install paths easier to use by sticking to the
deploy repo checkout.
  • Loading branch information
cardoe committed Sep 17, 2024
1 parent 0bdb9b0 commit ecc2d91
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
21 changes: 9 additions & 12 deletions docs/deploy-guide/gitops-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,10 @@ has been chosen; other tools like Vault, SOPS, etc should be considered
for production deployments.

```bash
# from your understack checkout
./scripts/gitops-secrets-gen.sh ${UC_DEPLOY}/my-k3s.env
pushd "${UC_DEPLOY}"
cd /path/to/uc-deploy
/path/to/understack/scripts/gitops-secrets-gen.sh ./my-k3s.env
git add secrets/my-k3s
git commit -m "my-k3s: secrets generation"
popd
```

### Defining the app deployment
Expand All @@ -139,13 +137,11 @@ In this section we will use the [App of Apps][app-of-apps] pattern to define
the deployment of all the components of UnderStack.

```bash
# from your understack checkout
./scripts/gitops-deploy.sh ${UC_DEPLOY}/my-k3s.env
pushd "${UC_DEPLOY}"
cd /path/to/uc-deploy
/path/to/understack/scripts/gitops-deploy.sh ${UC_DEPLOY}/my-k3s.env
git add clusters/my-k3s
git add helm-configs/my-k3s
git commit -m "my-k3s: initial cluster config"
popd
```

## Final modifications of your deployment
Expand All @@ -171,20 +167,21 @@ to your git server so that ArgoCD can access it.
Configure your ArgoCD to be aware of your cluster:

```bash
kubectl -n argocd apply -f "${UC_DEPLOY}/secrets/${DEPLOY_NAME}/argocd/secret-*-cluster.yaml"
cd /path/to/uc-deploy
kubectl -n argocd apply -f "secrets/${DEPLOY_NAME}/argocd/secret-*-cluster.yaml"
```

Now configure your ArgoCD to have the credential access to your deploy repo:

```bash
kubectl -n argocd apply -f "${UC_DEPLOY}/secrets/${DEPLOY_NAME}/argocd/secret-deploy-repo.yaml"
cd /path/to/uc-deploy
kubectl -n argocd apply -f "secrets/${DEPLOY_NAME}/argocd/secret-deploy-repo.yaml"
```

Finally run the following to have ArgoCD deploy the system:

```bash
# from your understack checkout
kubectl apply -f apps/aio-app-of-apps.yaml
kubectl -n argocd apply -f https://raw.githubusercontent.com/rackerlabs/understack/main/apps/aio-app-of-apps.yaml
```

At this point ArgoCD will work to deploy Understack.
Expand Down
2 changes: 1 addition & 1 deletion scripts/gitops-secrets-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export HORIZON_DB_PASSWORD
# this is a helm values.yaml but it contains secrets because of the lack
# of secrets references in OpenStack Helm
yq '(.. | select(tag == "!!str")) |= envsubst' \
"./components/openstack-secrets.tpl.yaml" \
"${SCRIPTS_DIR}/../components/openstack-secrets.tpl.yaml" \
> "${DEST_DIR}/secret-openstack.yaml"

echo "Checking undersync"
Expand Down

0 comments on commit ecc2d91

Please sign in to comment.