{"id":906,"date":"2016-06-21T19:43:46","date_gmt":"2016-06-21T19:43:46","guid":{"rendered":"https:\/\/www.starkandwayne.com\/\/standing-up-vault-using-genesis\/"},"modified":"2021-09-30T11:49:14","modified_gmt":"2021-09-30T15:49:14","slug":"standing-up-vault-using-genesis","status":"publish","type":"post","link":"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/","title":{"rendered":"Standing up Vault using Genesis"},"content":{"rendered":"

A few of our recent posts related to standing up BOSH deployments using Genesis<\/a> have all revolved around needing Vault<\/a> to store your credentials safely. The vault-boshrelease<\/a> makes this fairly straightforward, but there’s now a Genesis Vault template<\/a> to make running Vault even easier!<\/p>\n

The procedure is similar to the other Genesis deployments:<\/p>\n

$ genesis new deployment --template vault\n$ cd vault-deployments\n$ genesis new site --template bosh-lite macbook\n$ git add macbook; git commit -m "Added macbook site"\n$ bosh target bosh-lite\n$ genesis new env macbook sandbox\n$ cd macbook\/sandbox\n$ make deploy\n$ git add .; git commit -m "Added initial sandbox environment"\n# lather, rinse, repeat as needed for all of your sites\/environments\n<\/code><\/pre>\n

Out of the box, you get an HA Vault using Consul as its encrypted backend datastore. However, to start using it, you will need to initialize your Vault. I recommend using the safe<\/a> CLI for interacting with Vault:<\/p>\n

$ safe target "https:\/\/<vault ip:8200>" macbook-vault\n$ safe vault init\n<\/code><\/pre>\n

This will output keys to use when unsealing the Vault, as well as the initial root user’s password. Save these somewhere secure, as they will<\/strong> be needed any time the Vault process gets restarted.<\/p>\n

Next, we need to unseal the new Vault, using 3 distinct Unseal Keys from the list obtained during safe vault init<\/code>:<\/p>\n

$ safe vault unseal\n$ safe vault unseal\n$ safe vault unseal\n<\/code><\/pre>\n

Now that Vault is initialized and unsealed, you can log in and pre-populate the handshake value used by many Genesis templates to detect if Vault is available:<\/p>\n

$ safe auth\nAuthenticating against macbook-vault at https:\/\/10.244.9.3:8200\nToken:\n$ safe set secret\/handshake initialized=true\ninitialized: true\n$ safe tree\n.\n\u2514\u2500\u2500 secret\n    \u2514\u2500\u2500 handshake\n$ safe get secret\/handshake\n--- # secret\/handshake\ninitialized: "true"\n<\/code><\/pre>\n

Voila!<\/p>\n","protected":false},"excerpt":{"rendered":"

A few of our recent posts related to standing up BOSH deployments using Genesis have all revolved around needing Vault to store your credentials safely. The vault-boshrelease makes this fairly straightforward, but there’s now a Genesis Vault template to make running Vault even easier! The procedure is similar to the other Genesis deployments: $ genesis<\/p>\n","protected":false},"author":15,"featured_media":2445,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":""},"categories":[1],"tags":[91,31,116,117,104,118],"yoast_head":"\nStanding up Vault using Genesis - Stark & Wayne<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Standing up Vault using Genesis - Stark & Wayne\" \/>\n<meta property=\"og:description\" content=\"A few of our recent posts related to standing up BOSH deployments using Genesis have all revolved around needing Vault to store your credentials safely. The vault-boshrelease makes this fairly straightforward, but there’s now a Genesis Vault template to make running Vault even easier! The procedure is similar to the other Genesis deployments: $ genesis\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/\" \/>\n<meta property=\"og:site_name\" content=\"Stark & Wayne\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/starkandwayne\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-21T19:43:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-30T15:49:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.starkandwayne.com\/wp-content\/uploads\/standing-up-vault-using-genesis.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"656\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"GeoffFranks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@starkandwayne\" \/>\n<meta name=\"twitter:site\" content=\"@starkandwayne\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GeoffFranks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/\",\"url\":\"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/\",\"name\":\"Standing up Vault using Genesis - Stark & Wayne\",\"isPartOf\":{\"@id\":\"https:\/\/www.starkandwayne.com\/#website\"},\"datePublished\":\"2016-06-21T19:43:46+00:00\",\"dateModified\":\"2021-09-30T15:49:14+00:00\",\"author\":{\"@id\":\"https:\/\/www.starkandwayne.com\/#\/schema\/person\/33944126389fdb6bfd3cb52559526644\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.starkandwayne.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Standing up Vault using Genesis\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.starkandwayne.com\/#website\",\"url\":\"https:\/\/www.starkandwayne.com\/\",\"name\":\"Stark & Wayne\",\"description\":\"Cloud-Native Consultants\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.starkandwayne.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.starkandwayne.com\/#\/schema\/person\/33944126389fdb6bfd3cb52559526644\",\"name\":\"GeoffFranks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.starkandwayne.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9251bada06bb65a8fcfff6891eadd79a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9251bada06bb65a8fcfff6891eadd79a?s=96&d=mm&r=g\",\"caption\":\"GeoffFranks\"},\"description\":\"Senior Cloud Engineer\",\"url\":\"https:\/\/www.starkandwayne.com\/blog\/author\/geofffranks\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Standing up Vault using Genesis - Stark & Wayne","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/","og_locale":"en_US","og_type":"article","og_title":"Standing up Vault using Genesis - Stark & Wayne","og_description":"A few of our recent posts related to standing up BOSH deployments using Genesis have all revolved around needing Vault to store your credentials safely. The vault-boshrelease makes this fairly straightforward, but there’s now a Genesis Vault template to make running Vault even easier! The procedure is similar to the other Genesis deployments: $ genesis","og_url":"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/","og_site_name":"Stark & Wayne","article_publisher":"https:\/\/www.facebook.com\/starkandwayne","article_published_time":"2016-06-21T19:43:46+00:00","article_modified_time":"2021-09-30T15:49:14+00:00","og_image":[{"width":1600,"height":656,"url":"https:\/\/www.starkandwayne.com\/wp-content\/uploads\/standing-up-vault-using-genesis.jpg","type":"image\/jpeg"}],"author":"GeoffFranks","twitter_card":"summary_large_image","twitter_creator":"@starkandwayne","twitter_site":"@starkandwayne","twitter_misc":{"Written by":"GeoffFranks","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/","url":"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/","name":"Standing up Vault using Genesis - Stark & Wayne","isPartOf":{"@id":"https:\/\/www.starkandwayne.com\/#website"},"datePublished":"2016-06-21T19:43:46+00:00","dateModified":"2021-09-30T15:49:14+00:00","author":{"@id":"https:\/\/www.starkandwayne.com\/#\/schema\/person\/33944126389fdb6bfd3cb52559526644"},"breadcrumb":{"@id":"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.starkandwayne.com\/blog\/standing-up-vault-using-genesis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.starkandwayne.com\/"},{"@type":"ListItem","position":2,"name":"Standing up Vault using Genesis"}]},{"@type":"WebSite","@id":"https:\/\/www.starkandwayne.com\/#website","url":"https:\/\/www.starkandwayne.com\/","name":"Stark & Wayne","description":"Cloud-Native Consultants","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.starkandwayne.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.starkandwayne.com\/#\/schema\/person\/33944126389fdb6bfd3cb52559526644","name":"GeoffFranks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.starkandwayne.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9251bada06bb65a8fcfff6891eadd79a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9251bada06bb65a8fcfff6891eadd79a?s=96&d=mm&r=g","caption":"GeoffFranks"},"description":"Senior Cloud Engineer","url":"https:\/\/www.starkandwayne.com\/blog\/author\/geofffranks\/"}]}},"_links":{"self":[{"href":"https:\/\/www.starkandwayne.com\/wp-json\/wp\/v2\/posts\/906"}],"collection":[{"href":"https:\/\/www.starkandwayne.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.starkandwayne.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.starkandwayne.com\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.starkandwayne.com\/wp-json\/wp\/v2\/comments?post=906"}],"version-history":[{"count":1,"href":"https:\/\/www.starkandwayne.com\/wp-json\/wp\/v2\/posts\/906\/revisions"}],"predecessor-version":[{"id":1888,"href":"https:\/\/www.starkandwayne.com\/wp-json\/wp\/v2\/posts\/906\/revisions\/1888"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.starkandwayne.com\/wp-json\/wp\/v2\/media\/2445"}],"wp:attachment":[{"href":"https:\/\/www.starkandwayne.com\/wp-json\/wp\/v2\/media?parent=906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.starkandwayne.com\/wp-json\/wp\/v2\/categories?post=906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.starkandwayne.com\/wp-json\/wp\/v2\/tags?post=906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}