Skip to content

Commit 591d42d

Browse files
authored
fix(install): make cmds easy to read (#13)
Signed-off-by: Nicholas Morey <nicholas@morey.tech>
1 parent 37d55e7 commit 591d42d

File tree

1 file changed

+32
-14
lines changed

1 file changed

+32
-14
lines changed

docs/install.md

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,31 @@ Credentials:
1313
How to generate Azure AKS `kubeconfig` file:
1414

1515
```sh
16-
$ az aks get-credentials --name MyManagedCluster --resource-group MyResourceGroup --file kubeconfig-azure
16+
az aks get-credentials --name MyManagedCluster \
17+
--resource-group MyResourceGroup \
18+
--file kubeconfig-azure
1719
```
1820

1921
How to generate AWS EKS `kubeconfig` file:
2022

2123
```sh
22-
$ aws eks update-kubeconfig --region us-west-1 --name backstack-hub --kubeconfig kubeconfig-aws
24+
aws eks update-kubeconfig --name backstack-hub \
25+
--region us-west-1 \
26+
--kubeconfig kubeconfig-aws
2327
```
2428

2529
How to generate Azure Credentials:
2630

2731
```sh
28-
$ az ad sp create-for-rbac --sdk-auth --role Owner --scopes /subscriptions/$YOURSUBSCRIPTIONID > azure.json
32+
az ad sp create-for-rbac --sdk-auth --role Owner \
33+
--scopes /subscriptions/$YOURSUBSCRIPTIONID > azure.json
2934
```
3035

3136
How to pass AWS Credentials:
3237
**NOTE** Ensure you have stored your Key ID and Access Key in a file under the `default` heading (e.g.)
3338

3439
```sh
35-
$ cat ~/.aws/credentials
40+
cat ~/.aws/credentials
3641
[default]
3742
aws_access_key_id = YOURKEYHERE
3843
aws_secret_access_key = YOURSECRETKEYHERE
@@ -67,11 +72,14 @@ This bundle uses the following tools: docker, exec, helm3, Kubernetes.
6772
To install this bundle, run the following commands, passing `--param KEY=VALUE` for any parameters you want to customize:
6873

6974
```sh
70-
$ porter credentials generate back-stack-cloud-creds --reference ghcr.io/back-stack/showcase-bundle:latest
75+
porter credentials generate back-stack-cloud-creds \
76+
--reference ghcr.io/back-stack/showcase-bundle:latest
7177
```
7278

7379
```sh
74-
$ porter install --reference ghcr.io/back-stack/showcase-bundle:latest --credential-set back-stack-cloud-creds --param repository=https://github.com/USER/REPO
80+
porter install --reference ghcr.io/back-stack/showcase-bundle:latest \
81+
--credential-set back-stack-cloud-creds \
82+
--param repository=https://github.com/USER/REPO
7583
```
7684

7785
### Installing Locally into KinD
@@ -82,19 +90,25 @@ The Porter bundle already includes KinD, so the only prerequisite is Docker/Dock
8290
2. Generate the credentials config, leaving the `kubeconfig` empty (it will be ignored)
8391

8492
```sh
85-
$ porter credentials generate back-stack-cloud-creds --reference ghcr.io/back-stack/showcase-bundle:latest
93+
porter credentials generate back-stack-cloud-creds \
94+
--reference ghcr.io/back-stack/showcase-bundle:latest
8695
```
8796

8897
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.
8998

9099
```sh
91-
$ porter install back-stack --reference ghcr.io/back-stack/showcase-bundle:latest --credential-set back-stack-cloud-creds --param repository=https://github.com/USER/REPO --allow-docker-host-access
100+
porter install back-stack \
101+
--reference ghcr.io/back-stack/showcase-bundle:latest \
102+
--credential-set back-stack-cloud-creds \
103+
--param repository=https://github.com/USER/REPO \
104+
--allow-docker-host-access
92105
```
93106

94107
To connect to the KinD cluster running the BACK stack, update your kubeconfig:
95108

96109
```sh
97-
$ porter installations output show kubeconfig-external -i back-stack > ~/.kube/config
110+
porter installations output show kubeconfig-external \
111+
-i back-stack > ~/.kube/config
98112
```
99113

100114
### Installing into EKS
@@ -106,26 +120,30 @@ $ porter installations output show kubeconfig-external -i back-stack > ~/.kube/c
106120
2. Generate the credentials config, specifying the path to the `kubeconfig-aws` file
107121

108122
```sh
109-
$ porter credentials generate back-stack-cloud-creds --reference ghcr.io/back-stack/showcase-bundle:latest
123+
porter credentials generate back-stack-cloud-creds \
124+
--reference ghcr.io/back-stack/showcase-bundle:latest
110125
```
111126

112127
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
113128

114129
```sh
115130
# using parameter set
116-
$ porter parameters generate back-stack-params --reference ghcr.io/back-stack/showcase-bundle:latest
131+
porter parameters generate back-stack-params \
132+
--reference ghcr.io/back-stack/showcase-bundle:latest
117133
118-
$ porter install back-stack --reference ghcr.io/back-stack/showcase-bundle:latest --credential-set back-stack-cloud-creds --parameter-set back-stack-params
134+
porter install back-stack \
135+
--reference ghcr.io/back-stack/showcase-bundle:latest \
136+
--credential-set back-stack-cloud-creds \
137+
--parameter-set back-stack-params
119138
```
120139

121140
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
122141

123142
```sh
124-
$ porter installations output show ingress -i back-stack
143+
porter installations output show ingress -i back-stack
125144
```
126145

127146
For this showcase, you can update `/etc/hosts`.
128147

129148
[getporter]: https://porter.sh/
130149
[alb-controller]: https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html
131-

0 commit comments

Comments
 (0)