Skip to content

Commit 7de15cb

Browse files
committed
update intro to bucc from docker-compose
1 parent c2a0c2a commit 7de15cb

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

docs/basics/secret-parameters.md

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,32 @@ Concourse supports Cloud Foundry Credhub and Hashicorp Vault. They have a common
88

99
## Redeploy Concourse with Credhub
1010

11-
First, delete initial `tutorial` concourse:
11+
We will now switch from our `docker-compose up` deployment of Concourse to [bucc](https://github.com/starkandwayne/bucc) to deploy a local single VM version of Concourse that has the Credhub credentials manager. As a bonus, `bucc` will allow you to deploy a production-version of Concourse to any public or private cloud. In this tutorial we will deploy `bucc` to your local machine.
1212

13-
```
14-
cd ../../..
15-
bosh delete-env manifests/concourse-lite.yml --state tmp/state.json
16-
```
17-
18-
Now, switch to [bucc](https://github.com/starkandwayne/bucc) to deploy a local single VM version of Concourse that has the Credhub credentials manager.
13+
First, you need to install [VirtualBox](https://www.virtualbox.org/wiki/Downloads) (for the local deployment of `bucc`).
1914

20-
In another terminal:
15+
Next:
2116

22-
```
17+
```plain
2318
git clone https://github.com/starkandwayne/bucc ~/workspace/bucc
2419
cd ~/workspace/bucc
2520
```
2621

27-
Now run:
22+
Now run the following to deploy `bucc` to your local machine using VirtualBox:
2823

29-
```
24+
```plain
3025
bucc up --lite
3126
```
3227

3328
If this fails with `command not found: bucc`, then perhaps you do not have [`direnv`](https://direnv.net/) installed. Never fear. Run to update your `$PATH` to add the `bin/bucc` command.
3429

35-
```
30+
```plain
3631
source .envrc
3732
```
3833

3934
Now run:
4035

41-
```
36+
```plain
4237
bucc up --lite
4338
```
4439

@@ -48,7 +43,7 @@ The `bucc up --lite` command is similar to `bosh create-env` but adds Credhub to
4843

4944
To target and login to your new Concourse:
5045

51-
```
46+
```plain
5247
bucc fly
5348
```
5449

@@ -58,15 +53,15 @@ The Concourse dashboard UI is now at https://192.168.50.6/
5853

5954
To target and login to Credhub, the credentials manager included in `bucc`:
6055

61-
```
56+
```plain
6257
bucc credhub
6358
```
6459

6560
## Reauthentication
6661

6762
Credhub will enthusiastically and frequently drop your login session:
6863

69-
```
64+
```plain
7065
You are not currently authenticated. Please log in to continue.
7166
```
7267

@@ -78,22 +73,22 @@ Similarly, `fly -t bucc` sessions will timeout. To re-authenticate, return to `~
7873

7974
Back in your main `concourse-tutorial` terminal window, return to the `tutorials/basic/parameters` folder, and install the pipeline from the preceding section to our new `bucc` concourse environment. Do not provide any explicit values for the parameters as these will come from the Credhub credentials manager:
8075

81-
```
76+
```plain
8277
cd ../parameters
8378
fly -t bucc sp -p parameters -c pipeline.yml
8479
fly -t bucc up -p parameters
8580
```
8681

8782
## Insert values into Credentials Manager
8883

89-
```
84+
```plain
9085
credhub set -n /concourse/main/parameters/cat-name --type value --value garfield
9186
credhub set -n /concourse/main/parameters/dog-name --type value --value oddie
9287
```
9388

9489
Run the pipeline job to confirm that it dynamically fetched the secrets from Credhub:
9590

96-
```
91+
```plain
9792
fly -t bucc trigger-job -j parameters/show-animal-names -w
9893
```
9994

@@ -106,7 +101,7 @@ When resolving a parameter such as `((cat-name))`, it will look in the following
106101

107102
So, if the `((cat-name))` credential is to be shared across all pipelines in the `main` team, then the `credhub set` commands would become:
108103

109-
```
104+
```plain
110105
credhub delete -n /concourse/main/parameters/cat-name
111106
credhub delete -n /concourse/main/parameters/dog-name
112107
credhub set -n /concourse/main/cat-name --type value --value garfield
@@ -115,15 +110,15 @@ credhub set -n /concourse/main/dog-name --type value --value oddie
115110

116111
Again, run the pipeline job to confirm that it dynamically fetched the team's shared secrets from Credhub:
117112

118-
```
113+
```plain
119114
fly -t bucc trigger-job -j parameters/show-animal-names -w
120115
```
121116

122117
## Rotating Secrets
123118

124119
A great feature of Concourse Credentials Manager - regardless if backed by Cloud Foundry Credhub or Hashicorp Vault - is that you can now update secrets/parameters and the new values will automatically be used the next time a job is run.
125120

126-
```
121+
```plain
127122
credhub set -n /concourse/main/cat-name --type value --value milo
128123
credhub set -n /concourse/main/dog-name --type value --value otis
129124
@@ -132,7 +127,7 @@ fly -t bucc trigger-job -j parameters/show-animal-names -w
132127

133128
The output will include the two new parameter values:
134129

135-
```
130+
```plain
136131
CAT_NAME=milo
137132
DOG_NAME=otis
138133
```

0 commit comments

Comments
 (0)