-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update the installation to use the new Porter install
Signed-off-by: Boris Kurktchiev <[email protected]>
- Loading branch information
1 parent
0f77479
commit eb620e5
Showing
1 changed file
with
87 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,37 +2,103 @@ | |
|
||
In order to try out the BACK Stack locally you can follow these steps | ||
|
||
## Prerequisites | ||
You will use [Porter][getporter] to perform the installation. Currently, the generated Bundle supports installing the BACK stack on EKS or locally using KinD | ||
|
||
For a local install, you need Docker and Kind pre-installed. | ||
### Porter Bundle Info & Settings | ||
|
||
## Getting started | ||
Credentials: | ||
|
||
Fork and clone the `showcase` repository | ||
**NOTE**: Although cloud provider credentials are not required, without them you cannot provision new clusters. | ||
|
||
```sh | ||
git clone [email protected]:back-stack/showcase.git | ||
``` | ||
--- | ||
|
||
| Name | Description | Required | Comments | | ||
| ----------------- | ------------------------------------------------------ | -------- | -------------------------------------------------- | | ||
| aws-credentials | Credentials to be used for Crossplane `provider-aws` | false | This is required if `cluster-type` is set to `eks` | | ||
| azure-credentials | Credentials to be used for Crossplane `provider-azure` | false | | | ||
| github-token | Github API token | true | | | ||
| kubeconfig | kubeconfig to connect to non-local cluster | false | | | ||
| vault-token | This should always be `root` | true | | | ||
|
||
Parameters: | ||
|
||
--- | ||
|
||
| Name | Description | Type | Default | Required | Comments | | ||
| -------------- | ----------------------------------------------------------------- | ------ | ---------------------------------------- | -------- | -------- | | ||
| argocd-host | DNS name for ArgoCD | string | `argocd-7f000001.nip.io` | false | | | ||
| backstage-host | DNS name for Backstage | string | `backstage-7f000001.nip.io` | false | | | ||
| cluster-type | Target kubernetes cluster type. Accepted values are `kind`, `eks` | string | `kind` | true | | | ||
| repository | Gitops repository for cluster requests and catalog-info | string | `https://github.com/back-stack/showcase` | true | | | ||
| vault-host | DNS name for Vault | string | `vault-7f000001.nip.io` | false | | | ||
|
||
This bundle uses the following tools: docker, exec, helm3, Kubernetes. | ||
|
||
### Setup Variables | ||
To install this bundle, run the following commands, passing `--param KEY=VALUE` for any parameters you want to customize: | ||
|
||
- [Create a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) | ||
- Configure `./.env` with your personal access token, the repository url, the vault token, your [provider-azure credentials](https://marketplace.upbound.io/providers/upbound/provider-family-azure/v0.38.2/docs/configuration), and your [provider-aws credentials](https://marketplace.upbound.io/providers/upbound/provider-family-aws/v0.43.1/docs/configuration) | ||
```sh | ||
porter credentials generate mycreds --reference ghcr.io/back-stack/showcase-bundle:latest | ||
``` | ||
|
||
```sh | ||
$ cat << EOF > .env | ||
GITHUB_TOKEN=<personal access token> | ||
REPOSITORY=https://github.com/<path to forked repo> | ||
VAULT_TOKEN=root # this is the default for 'dev' mode | ||
AZURE_CREDENTIALS='{"clientId": "xxx","clientSecret": "xxx","subscriptionId": "xxx","tenantId": "xxx","activeDirectoryEndpointUrl": "https://login.microsoftonline.com","resourceManagerEndpointUrl": "https://management.azure.com/","activeDirectoryGraphResourceId": "https://graph.windows.net/","sqlManagementEndpointUrl": "https://management.core.windows.net:8443/","galleryEndpointUrl": "https://gallery.azure.com/","managementEndpointUrl": "https://management.core.windows.net/"}' | ||
AWS_ACCESS_KEY_ID="xxx" | ||
AWS_SECRET_ACCESS_KEY="xxx" | ||
AWS_SESSION_TOKEN="xxx" | ||
EOF | ||
porter install --reference ghcr.io/back-stack/showcase-bundle:latest --credential-set mycreds --param repository=https://github.com/USER/REPO | ||
``` | ||
|
||
### Run Installer | ||
### Installing Locally into KinD | ||
|
||
The Porter bundle already includes KinD, so the only prerequisite is Docker/Docker Desktop to be running. | ||
|
||
1. Install porter | ||
2. Generate the credentials config, leaving the `kubeconfig` empty (it will be ignored) | ||
|
||
```sh | ||
porter credentials generate back-stack-cloud-creds --reference ghcr.io/back-stack/showcase-bundle:latest | ||
``` | ||
|
||
3. Install the bundle; the default `cluster-type` and `*-host` parameters are configured for local deployment, and you need to allow Porter to access your local docker daemon. | ||
|
||
```sh | ||
porter install back-stack --reference ghcr.io/back-stack/showcase-bundle:latest --credential-set back-stack-cloud-creds --param repository=repository=https://github.com/USER/REPO --allow-docker-host-access | ||
``` | ||
|
||
To connect to the KinD cluster running the BACK stack, update your kubeconfig: | ||
|
||
```sh | ||
./local-install.sh | ||
porter installations output show kubeconfig -i back-stack > ~/.kube/config | ||
``` | ||
|
||
### Installing into EKS | ||
|
||
- Existing EKS cluster with [AWS Load Balancer Controller][alb-controller] add-on installed | ||
- local `kubeconfig` file to connect to the cluster | ||
|
||
1. Install porter (see above) | ||
2. Generate the credentials config, specifying the path to the `kubeconfig` file | ||
|
||
```sh | ||
porter credentials generate back-stack-cloud-creds --reference ghcr.io/back-stack/showcase-bundle:latest | ||
``` | ||
|
||
3. Install the bundle; set `cluster-type` to `eks` and specify DNS names that you want to use to access the BACK stack services. This can either be done using `--param` flags or by generating a parameter set | ||
|
||
```sh | ||
# using --param | ||
porter install back-stack --reference ghcr.io/back-stack/showcase-bundle:latest --credential-set back-stack-cloud-creds --param repository=repository=https://github.com/USER/REPO --param cluster-type=eks --param argocd-host=ARGOCD_DNS_NAME --param backstage-host=BACKSTAGE_DNS_NAME --param vault-host=VAULT_DNS_NAME | ||
# using parameter set | ||
porter parameters generate myparams --reference ghcr.io/back-stack/showcase-bundle:latest | ||
porter install back-stack --reference ghcr.io/back-stack/showcase-bundle:latest --credential-set back-stack-cloud-creds --parameter-set myparams | ||
``` | ||
|
||
4. After installation, you need to ensure the DNS names specified for `argocd-host`, `backstage-host`, and `vault-host` all resolve to the ingress service created during installation. The endpoint for this can be found by checking the bundle outputs | ||
|
||
```sh | ||
porter installations output show ingress -i back-stack | ||
``` | ||
|
||
For this showcase, you can update `/etc/hosts`. | ||
|
||
[getporter]: https://getporter.org | ||
[alb-controller]: https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html | ||
|