Skip to content

Commit

Permalink
Merge pull request #204 from stakater/refactor-docs
Browse files Browse the repository at this point in the history
Refactor Docs
  • Loading branch information
rasheedamir authored Jan 5, 2024
2 parents a69ac98 + d36e6c4 commit 0d99e61
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ You can check secrets documentation to read more on these secrets.
## Prerequisites

* Infra GitOps Repository is configured.
* Delivery Engineer added as the owner of root-tenant. The root tenant makes sure that the delivery engineer is able to login to Vault with OIDC and is able to view the ArgoCD application created for bootstrapping Infra repository.
* Delivery Engineer added as the owner of root-tenant.
* Delivery Engineer added as a member of customer admin group. The customer admin group provides permission to deploy ArgoCD application in ArgoCD namespace.

## Tutorial

Expand Down Expand Up @@ -57,15 +58,16 @@ You can check secrets documentation to read more on these secrets.

<div style="text-align:center"><img src="images/repository-permissions.png" /></div>

!!! note
Save the token cautiously, you'll need to save it in `Vault`.
!!! note
Save the token cautiously, you'll need to save it in `Vault`.

### Adding Token to Vault

Now that we have created the GitHub Token, we will store it in Vault.

!!! note
The delivery engineer should be part of the root-tenant. Please contact SAAP team if you are unable to access Vault using OIDC method
!!! note
The delivery engineer should be part of the root-tenant. The root tenant makes sure that the delivery engineer is able to login to Vault with OIDC and is able to view the ArgoCD application created for bootstrapping Infra repository.
Please contact SAAP team if you are unable to access Vault using OIDC method

Login to Vault to view <your-tenant> path.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,54 @@ The webhook setup acts as a bridge between your code repository and the CI/CD pi

<div style="text-align:center"><img src="images/webhook-secret.png" /></div>

Congratulations! You have successfully configured GitHub access. Let's move to next tutorial.
### Add External Secret

1. Head over to the `apps-gitops-config` repository.

1. If you have followed the tutorial on configuring `apps-gitops-config` repository correctly, you should already have your tenant folder at the root of this repository. Open the tenant folder.

1. Navigate to the application folder. In our case it will be `stakater-nordmart-review-api`

1. Now open up the `build` folder.

1. Create a file named `github-webhook-config.yaml` and add in the below content. Replace the Url with your application repository's Url.
```yaml
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: github-webhook-config
spec:
secretStoreRef:
name: tenant-vault-secret-store
kind: SecretStore
refreshInterval: "1m0s"
target:
name: github-webhook-config
creationPolicy: 'Owner'
template:
data:
provider.token: "{{ .password | toString }}"
webhook.secret: "{{ .secret | toString }}"
data:
- secretKey: password
remoteRef:
key: github-webhook-config
property: provider.token
- secretKey: secret
remoteRef:
key: github-webhook-config
property: webhook.secret
```
<div style="text-align:center"><img src="images/github-webhook-config-es.png" /></div>
1. Now open up ArgoCD and look for this External Secret. If everything was added correctly, you will see a secret created from this External Secret.
<div style="text-align:center"><img src="images/github-webhook-config-argo.png" /></div>
1. You can also check this secret by navigation to `<tenant>-build` namespace and searching for the secret.
<div style="text-align:center"><img src="images/github-webhook-config-secret.png" /></div>
Great! Now that you added a Webhook to your repository, let's move on to create secret for it in the next tutorial.
Great! We have everything set up for creating the Repository CR.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ In this tutorial, you'll create secrets containing your GitHub access credential
1. Create a file named `repository.yaml` and add the following content:

```yaml
apiVersion: "pipelinesascode..dev/v1alpha1"
apiVersion: "pipelinesascode.tekton.dev/v1alpha1"
kind: Repository
metadata:
name: <name-of-repo>
Expand Down
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ nav:
- Configure Pipeline for your application:
- for-developers/tutorials/outer-loop/add-ci-pipeline/01-overview.md
- for-developers/tutorials/outer-loop/add-ci-pipeline/03-create-webhook.md
- for-developers/tutorials/outer-loop/add-ci-pipeline/04-add-repository-secret.md
- for-developers/tutorials/outer-loop/add-ci-pipeline/05-create-repository.md
- Add PipelineRun:
- for-developers/tutorials/outer-loop/add-ci-pipeline/06-adding-pipeline.md
Expand Down

0 comments on commit 0d99e61

Please sign in to comment.