Giter VIP home page Giter VIP logo

concourse-vault's Introduction

Deploy Concourse with Vault as Credential Manager

  • Deploy Vault release using the vault.yml
  • Create a mount in value for use by concourse pipelinesvault mount -path=$CONCOURSE_VAULT_MOUNT -description="Secrets for use by concourse pipelines" generic

CONCOURSE_VAULT_MOUNT default value is /concourse, and you can specify your own mount here

  • Create a policy file with the following contents > policy.hcl
path "concourse/*" {
  policy = "read"
  capabilities =  ["read", "list"]
}
  • Register the policy with vault vault policy-write policy-name vault-policy.hcl

If - Using Periodic Token for Authentication

  • Initialize vault vault init

  • Create a periodic token vault token-create --policy=policy-name -period="600h" -format=json

  • copy the token value from above and set it in the concourse deployment manifest

instance_groups:
- name: web ...
  jobs:
  - name: atc
    release: concourse
    properties: ...
      vault:
        path_prefix: ((CONCOURSE_VAULT_MOUNT))
        url: ((VAULT_ADDR))
        auth:
          client_token: ((CLIENT_TOKEN))

If - Using appRole for Authentication

  • Enable approle vault auth-enable approle

  • Export the name of the role that you would like to useexport ROLE_NAME=concourse-role

  • Create a role and fetch the role-id,vault read -format=json auth/approle/role/$ROLE_NAME/role-id

  • Fetch the secret-id for the role created abovevault write -format=json -f auth/approle/role/$ROLE_NAME/secret-id

  • copy the role-id and the secret-id values from above and set it in the concourse deployment manifest

BACKEND_ROLE will be approle in this case

instance_groups:
- name: web ...
  jobs:
  - name: atc
    release: concourse
    properties: ...
      vault:
        path_prefix: ((CONCOURSE_VAULT_MOUNT))
        url: ((VAULT_ADDR))
        auth:
          backend: ((BACKEND_ROLE))
          params:
            role_id: ((ROLE_ID))
            secret_id: ((SECRET_ID))
  • deploy concourse
  • populate all the variables in vault under concourse/<team-name>/
  • all common params used across all pipelines can be in concourse/<team-name>/ and pipeline specific params can be in concourse/<team-name>/<pipeline-name>
  • to write to vault the syntax isvault write concourse/<team-name>/<pipeline-name>/<variable-name> value=<variable-value>
  • ensure in the pipelines you use ((VAR_NAME)) instead of {{VAR_NAME}}

concourse-vault's People

Contributors

rahulkj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.