forked from vito/vault-boshrelease
-
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.
add concourse-specific configuration options
- Loading branch information
Jamie Klassen
committed
Aug 8, 2017
1 parent
8fe9895
commit 48fef60
Showing
6 changed files
with
90 additions
and
4 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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
<%= p("tls.ca", "") %> |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
<%= p("concourse.certificate", "") %> |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
<%= p("concourse.private_key", "") %> |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
echo 'export VAULT_CACERT=/var/vcap/jobs/vault/config/ca.crt' >> /home/vcap/.bashrc | ||
echo 'export PATH=/var/vcap/packages/vault:$PATH' >> /home/vcap/.bashrc | ||
export VAULT_CACERT=/var/vcap/jobs/vault/config/ca.crt | ||
export PATH=/var/vcap/packages/vault:$PATH | ||
|
||
function unseal_keys { | ||
cat /home/vcap/init_results | sed -n 's/.*Unseal Key [0-9]*: \(.*\)$/\1/p' | head -n3 | ||
} | ||
|
||
function root_token { | ||
cat /home/vcap/init_results | sed -n 's/^Initial Root Token: \(.*\)$/\1/p' | ||
} | ||
|
||
# TODO: write this to lastpass, not VM filesystem | ||
vault init > /home/vcap/init_results | ||
for key in $(unseal_keys); do vault unseal $key; done | ||
vault auth $(root_token) | ||
vault mount -path=concourse generic | ||
vault auth-enable cert | ||
echo 'path "concourse/main/*" { policy = "read" }' | vault policy-write concourse - | ||
pushd /var/vcap/jobs/vault/config/ && vault write auth/cert/certs/concourse policies=concourse [email protected] && popd |
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
name: vault | ||
|
||
variables: | ||
- name: ca | ||
type: certificate | ||
options: | ||
is_ca: true | ||
alternative_names: | ||
- 127.0.0.1 | ||
- name: tls | ||
type: certificate | ||
options: | ||
ca: ca | ||
alternative_names: | ||
- 127.0.0.1 | ||
- name: concourse | ||
type: certificate | ||
options: | ||
ca: ca | ||
alternative_names: | ||
- 127.0.0.1 | ||
extended_key_usage: | ||
- client_auth | ||
|
||
|
||
stemcells: | ||
- alias: trusty | ||
os: ubuntu-trusty | ||
version: latest | ||
|
||
releases: | ||
- name: vault | ||
version: latest | ||
|
||
instance_groups: | ||
- name: vault | ||
instances: 1 | ||
vm_type: default | ||
azs: [z1] | ||
stemcell: trusty | ||
networks: [{name: default, static_ips: [10.244.0.2]}] | ||
jobs: | ||
- name: vault | ||
release: vault | ||
properties: | ||
tls: ((tls)) | ||
concourse: ((concourse)) | ||
|
||
update: | ||
canaries: 0 | ||
max_in_flight: 5 | ||
serial: false | ||
canary_watch_time: 1000-60000 | ||
update_watch_time: 1000-60000 |