<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Octopus Deploy</title>
    <description>The latest articles on DEV Community by Octopus Deploy (@octopus).</description>
    <link>https://dev.to/octopus</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F1628%2Ffab25d82-c34a-43b2-ad75-f69af64bc4c6.png</url>
      <title>DEV Community: Octopus Deploy</title>
      <link>https://dev.to/octopus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/octopus"/>
    <language>en</language>
    <item>
      <title>A tip for debugging Octopus Deploy variables</title>
      <dc:creator>Ryan Rousseau</dc:creator>
      <pubDate>Tue, 29 Mar 2022 21:49:21 +0000</pubDate>
      <link>https://dev.to/octopus/a-tip-for-debugging-octopus-deploy-variables-5e81</link>
      <guid>https://dev.to/octopus/a-tip-for-debugging-octopus-deploy-variables-5e81</guid>
      <description>&lt;p&gt;I sometimes need to debug issues related to incorrect variable substitutions or filters in my deployments.&lt;/p&gt;

&lt;p&gt;The Octopus docs have some tips on &lt;a href="https://octopus.com/docs/support/debug-problems-with-octopus-variables" rel="noopener noreferrer"&gt;debugging problems with variables&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The third option, writing variables to the deployment log, is the one I use the most.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing variables to the deployment log
&lt;/h2&gt;

&lt;p&gt;Octopus provides two system variables, &lt;code&gt;OctopusPrintVariables&lt;/code&gt; and &lt;code&gt;OctopusPrintEvaluatedVariables.&lt;/code&gt; Setting these variables to &lt;code&gt;True&lt;/code&gt; will write all variable values to the deployment log.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;OctopusPrintVariables&lt;/code&gt; will write the unevaluated variable values to the log. &lt;code&gt;OctopusPrintEvaluatedVariables&lt;/code&gt; will write the fully evaluated variable values to the log.&lt;/p&gt;

&lt;p&gt;I find these useful enough to keep them in the project. Before, I have left the values set to &lt;code&gt;False&lt;/code&gt; when not using them. I change them to &lt;code&gt;True&lt;/code&gt; when I need to debug other variables. The doc page mentions that you can update the variable snapshot on a release instead of creating a new release when adding or updating these variables.&lt;/p&gt;

&lt;p&gt;I added a little extra to my configuration to avoid switching the values back and forth - prompted variables.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conditionally writing debug logs with Prompted Variables
&lt;/h2&gt;

&lt;p&gt;I configure &lt;code&gt;OctopusPrintEvaluatedVariables&lt;/code&gt; to also prompt with the label &lt;code&gt;Print Evaluated Variables?&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffirebasestorage.googleapis.com%2Fv0%2Fb%2Fblog.rousseau.dev%2Fo%2Fimages%252Fa-tip-for-debugging-octopus-deploy-variables%252Fvariable-definition.png%3Falt%3Dmedia" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffirebasestorage.googleapis.com%2Fv0%2Fb%2Fblog.rousseau.dev%2Fo%2Fimages%252Fa-tip-for-debugging-octopus-deploy-variables%252Fvariable-definition.png%3Falt%3Dmedia" alt="Image of prompted variable definition" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The values will default to &lt;code&gt;False&lt;/code&gt;. I can check the boxes during a deployment to turn on the debug logging only for that deployment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffirebasestorage.googleapis.com%2Fv0%2Fb%2Fblog.rousseau.dev%2Fo%2Fimages%252Fa-tip-for-debugging-octopus-deploy-variables%252Fdeploy-screen.png%3Falt%3Dmedia" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffirebasestorage.googleapis.com%2Fv0%2Fb%2Fblog.rousseau.dev%2Fo%2Fimages%252Fa-tip-for-debugging-octopus-deploy-variables%252Fdeploy-screen.png%3Falt%3Dmedia" alt="Image of the create deployment screen showing prompted variables" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap-up
&lt;/h2&gt;

&lt;p&gt;Combining prompted variables with &lt;code&gt;OctopusPrintVariables&lt;/code&gt; and &lt;code&gt;OctopusPrintEvaluatedVariables&lt;/code&gt; provides an easy way to debug your deployments' variable values.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was originally published at &lt;a href="https://blog.rousseau.dev/posts/debugging-octopus-variables" rel="noopener noreferrer"&gt;blog.rousseau.dev&lt;/a&gt;. Cover photo by &lt;a href="https://unsplash.com/@timothycdykes" rel="noopener noreferrer"&gt;Timothy Dykes&lt;/a&gt; on &lt;a href="https://unsplash.com/" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>octopus</category>
      <category>debugging</category>
      <category>variables</category>
    </item>
    <item>
      <title>Better multi-tenancy with Octopus Deploy</title>
      <dc:creator>Mark Harrison</dc:creator>
      <pubDate>Mon, 26 Jul 2021 10:15:10 +0000</pubDate>
      <link>https://dev.to/octopus/better-multi-tenancy-with-octopus-deploy-2c4h</link>
      <guid>https://dev.to/octopus/better-multi-tenancy-with-octopus-deploy-2c4h</guid>
      <description>&lt;p&gt;Most people using Octopus will deploy projects to one or more environment. For customers providing Software as a Service (SaaS) applications, they typically need to deploy multiple instances of the application for each of their customers.&lt;/p&gt;

&lt;p&gt;Fortunately, there's a feature that's been around since &lt;a href="https://octopus.com/blog/whats-new-multi-tenant-deployments" rel="noopener noreferrer"&gt;Octopus 3.4&lt;/a&gt; designed exactly for these types of deployment, &lt;a href="https://octopus.com/docs/tenants" rel="noopener noreferrer"&gt;multi-tenancy&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this post, I look at two approaches to deploying applications without tenants, and discuss the benefits of using the multi-tenancy feature. &lt;/p&gt;

&lt;h2&gt;
  
  
  In this post
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;
Deploying without tenants

&lt;ul&gt;
&lt;li&gt;
Using multiple projects

&lt;ul&gt;
&lt;li&gt;Multiple projects pros&lt;/li&gt;
&lt;li&gt;Multiple projects cons&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Using multiple environments

&lt;ul&gt;
&lt;li&gt;Multiple environment pros&lt;/li&gt;
&lt;li&gt;Multiple environment cons&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

Deploying with tenants

&lt;ul&gt;
&lt;li&gt;Tenants&lt;/li&gt;
&lt;li&gt;Tenant tags&lt;/li&gt;
&lt;li&gt;
Tenant variables

&lt;ul&gt;
&lt;li&gt;Project variable templates&lt;/li&gt;
&lt;li&gt;Common variables&lt;/li&gt;
&lt;li&gt;Variable snapshot&lt;/li&gt;
&lt;li&gt;Missing variables&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Tenanted deployment targets&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;Conclusion&lt;/li&gt;

&lt;li&gt;Learn more&lt;/li&gt;

&lt;li&gt;Register for the webinar: Better multi-tenancy deployments using Octopus Deploy&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This post assumes knowledge of some key Octopus concepts, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Projects&lt;/li&gt;
&lt;li&gt;Environments&lt;/li&gt;
&lt;li&gt;Variables&lt;/li&gt;
&lt;li&gt;Lifecycles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're new to Octopus, I recommend reading our &lt;a href="https://octopus.com/docs/getting-started" rel="noopener noreferrer"&gt;Getting started with Octopus guide&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;To demonstrate how you can model deployments of multiple instances of an application with Octopus, I use a fictitious company called &lt;strong&gt;Vet Clinic&lt;/strong&gt;, deploying the Java application, &lt;a href="https://github.com/spring-projects/spring-petclinic" rel="noopener noreferrer"&gt;Pet Clinic&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Deploying without tenants &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;There are two main implementations we see when deploying multiple instances of the same application for each customer:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Using multiple projects
&lt;/li&gt;
&lt;li&gt;Using multiple environments
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While easy to set up, they don't scale well and can result in duplication.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using multiple projects &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;In this scenario, you configure Octopus with multiple projects, each one representing one of your customers. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp5nddsr992zbzvlf1slh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp5nddsr992zbzvlf1slh.png" alt="Multi-tenancy using multiple projects" width="800" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Onboarding a new customer typically requires creating all of the resources in Octopus needed for a successful deployment for the customer, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A new set of &lt;a href="https://octopus.com/docs/infrastructure/deployment-targets" rel="noopener noreferrer"&gt;deployment targets&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Common &lt;a href="https://octopus.com/docs/projects/variables" rel="noopener noreferrer"&gt;project variables&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Any customer specific "paid-for" &lt;a href="https://octopus.com/docs/infrastructure/environments" rel="noopener noreferrer"&gt;environments&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition, any common steps across the application's deployment process need to be duplicated in the new project. These are usually manual intervention and notification steps.&lt;/p&gt;

&lt;h4&gt;
  
  
  Multiple projects pros &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;So why choose multiple Octopus projects to deploy instances of an application to each customer?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Clear customer release dashboard overview&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This approach allows you to see which release has been deployed to which environment, for each customer on the dashboard overview.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Variable and Deployment process isolation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Multiple projects allow for complete isolation of variables, and deployment process for a customer. For example, making a change to one project's process only affects that one customer. You can also tailor the deployment process for the customer depending on the features they've signed up for. &lt;/p&gt;

&lt;p&gt;In the below example, only &lt;strong&gt;Capital Animal Hospital&lt;/strong&gt; has a step for applying custom branding:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xtviyj17sxf39d0waac.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xtviyj17sxf39d0waac.png" alt="Multi-tenancy multiple projects customised deployment process" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Simpler environment and variable scoping&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Environments don't need to be duplicated per customer, resulting in simpler lifecycle configuration. Variables can also be scoped to each environment without risk of choosing the wrong "customer" scoping.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hf203oitmjxok72esa4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hf203oitmjxok72esa4.png" alt="Multi-tenancy multiple projects variable scoping" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Multiple projects cons &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;While multiple projects can be used to deploy customer instances separately, there are a number of problems with this approach.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Duplicated project configuration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With every customer project, you end up duplicating project configuration. These include variables, deployment process steps, runbooks, channels and lifecycles. With duplication comes inconsistency and the overhead of managing that. For example, if you want to amend the deployment process for all of your customers, you need to change multiple projects.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Different deployment target roles per customer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If your customers have isolated infrastructure, you need a unique way for Octopus to know which deployment targets belong to the customer you're deploying to. This results in each customers' deployment targets needing target roles that include a differentiator per customer. This is typically a customer name, code or ID.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydy5nsa5jri4k1q777l5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydy5nsa5jri4k1q777l5.png" alt="Multi-tenancy multiple projects customer target roles" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Multiple projects per customer doesn't scale&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The per-project approach doesn't scale well when you have more than a handful of customers. This can be problematic if you deploy many more applications per customer. Each application needs to be modeled &lt;code&gt;n times&lt;/code&gt;, where &lt;code&gt;n&lt;/code&gt; is the number of customers you have.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;No guard rails to ensure variables provided&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using multiple projects, there are no guard rails to ensure all project configuration is set correctly. For example, if a variable is not added (or has an incorrect value), you might not find out about the issue until the deployment of the customer's instance.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Using multiple environments &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;An alternative to deploying without tenants is using a single Octopus project per application, and modeling each customer with a set of environments they deploy to. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsz3pr3odzui8wgrw59rr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsz3pr3odzui8wgrw59rr.png" alt="Multi-tenancy using multiple environments" width="800" height="169"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Onboarding a new customer typically involves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating a new set of &lt;a href="https://octopus.com/docs/infrastructure/environments" rel="noopener noreferrer"&gt;environments&lt;/a&gt;, named after the customer.&lt;/li&gt;
&lt;li&gt;Creating a new set of &lt;a href="https://octopus.com/docs/infrastructure/deployment-targets" rel="noopener noreferrer"&gt;deployment targets&lt;/a&gt;, or re-using existing ones and tagging them with the associated customer environments.&lt;/li&gt;
&lt;li&gt;Adding new &lt;a href="https://octopus.com/docs/projects/variables/#scoping-variables" rel="noopener noreferrer"&gt;environment-scoped variables&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Updating the project lifecycle to include the new customer environments.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Multiple environment pros &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;So why choose one or more environments to represent your customers in Octopus?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Single set of project resources to manage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In contrast to multiple projects, with this approach there's just one project, one deployment process, one set of variables, and one lifecycle to manage. When a change is required, it can be made once instead of per project. &lt;/p&gt;

&lt;p&gt;For example, if you want to add a step that's required for all customers, such as a &lt;strong&gt;Manual intervention step&lt;/strong&gt; before deployments to production, it can be added quickly and easily. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Customer environments are modeled explicitly&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With this approach customer environments have to be modeled explicitly. When a new customer is added, the environment they deploy to has to be created to allow deployment for that customer. It's also possible to see in a single row on the dashboard overview which environment a customer can deploy to.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Multiple environment cons &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Although you can use multiple customer environments, there are usually many problems associated with this approach:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Multiple environments created per customer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For each customer, you need to create a new environment record for each customer environment, which doesn't scale. For example, if you have 10 customers, and 4 environments (Development, Test, Staging and Production), you need to create 40 customer environments.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Complicated variable scoping&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As there's a single project per application, handling multiple variable values per customer needs to be achieved using different environment scopes. This can quickly become overwhelming. Adding new values, or editing existing ones has to be done carefully to ensure correct scopes are applied to each value. There's a high risk of cross tenant communication in this model.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmd6cw0nmevrrat2wcmsd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmd6cw0nmevrrat2wcmsd.png" alt="Multi-tenancy multiple environments variable scoping" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Rigid deployment process&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Customizing the deployment process in a project using multiple customers requires you to add &lt;a href="https://octopus.com/docs/projects/steps/conditions#environments" rel="noopener noreferrer"&gt;environment run conditions&lt;/a&gt; for each step that needs to be run for specific customers. This isn't flexible and doesn't scale as you need to modify these conditions per step, when you add a new customer or change your environments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4wy4lrc7fs8kes0lq1sf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4wy4lrc7fs8kes0lq1sf.png" alt="Multi-tenancy multiple environments run conditions" width="797" height="745"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Unclear customer release dashboard overview&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In contrast to the per-project customer model, it's difficult to see at a glance which release has been deployed to which customer on the dashboard and project overview screens, without endless scrolling.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Complicated, unwieldy Lifecycle&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As you onboard new customers, you typically add new customer environments to the project's lifecycle. You then have to define awkward lifecycle phases that fit the environments that are required for each customer (both existing and new). Typically this is handled with a phase that allows &lt;em&gt;any 1&lt;/em&gt; customer environment to be deployed to before progressing to the next phase. As the number of customers grows, so does the complexity of the lifecycle and its phases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkdko91cpdkaqx55zysvv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkdko91cpdkaqx55zysvv.png" alt="Multi-tenancy multiple environments lifecycles" width="299" height="454"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Deploying with tenants &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Using tenants in Octopus allows you to easily create customer specific deployment pipelines without duplicating project configuration. You can manage separate instances of your application in multiple environments in a single Octopus project.&lt;/p&gt;

&lt;p&gt;Using our &lt;strong&gt;Vet Clinic&lt;/strong&gt; company, here's what the dashboard overview might look like using tenants to model each customer:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhp8r61jar2oladsk4c2k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhp8r61jar2oladsk4c2k.png" alt="Tenanted dashboard overview" width="800" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This gives us a concise overview showing which release is in which environment. Instead of multiple rows per customer project, this is replaced with a discrete count of tenants who have been deployed to each environment.&lt;/p&gt;

&lt;p&gt;If we navigate to the project, we see a more granular overview, this time showing which tenant has what release in each environment:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9yfcdm1hf88ivadjmpjq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9yfcdm1hf88ivadjmpjq.png" alt="Tenanted project overview" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Sample Octopus project&lt;/strong&gt;&lt;br&gt;
You can see an example of the Vet Clinic tenanted project in our &lt;a href="https://g.octopushq.com/PatternTenantsSampleVetClinic" rel="noopener noreferrer"&gt;samples instance&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are a number of multi-tenancy features working together to make this happen:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tenants&lt;/li&gt;
&lt;li&gt;Tenant tags&lt;/li&gt;
&lt;li&gt;Tenant variables&lt;/li&gt;
&lt;li&gt;Tenanted deployment targets&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tenants &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Tenants in Octopus are the backbone of the multi-tenancy feature. They usually represent the customers of your application, especially when it comes to SaaS products.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzxpd8h0fm7yy433grupq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzxpd8h0fm7yy433grupq.png" alt="Tenants screen" width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although we discuss the use of tenants to model customers in this post, we designed tenants to be generic so that they can satisfy multiple use cases. Tenants can also represent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Geographical regions or data centers&lt;/li&gt;
&lt;li&gt;Developers, testers, or teams&lt;/li&gt;
&lt;li&gt;Feature branches&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn more about types of tenancy in our &lt;a href="https://octopus.com/docs/tenants/tenant-types" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The tenant overview provides a central place to manage which projects are connected to a tenant, and also which environment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft6w6kn22mblxwaaubtjg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft6w6kn22mblxwaaubtjg.png" alt="Tenant overview" width="800" height="271"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that each project can control its interaction with tenants. By default the multi-tenant deployment features are disabled. You can allow deployments with/without a tenant, which is a hybrid mode that's useful when you're transitioning to a fully multi-tenant project. &lt;/p&gt;

&lt;p&gt;There's also a mode where you can require a tenant for all deployments, which disables untenanted deployments for that project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh7937zv7wk24ylvx8hid.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh7937zv7wk24ylvx8hid.png" alt="Tenant project settings" width="728" height="196"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Onboarding a new customer as a tenant in Octopus can be as simple as creating your tenant, connecting your project to each applicable environment and entering your variable values, then deploying.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tenant tags &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;In Octopus, &lt;a href="https://octopus.com/docs/tenants/tenant-tags" rel="noopener noreferrer"&gt;tenant tags&lt;/a&gt; help you classify your tenants using custom tags, and tailor tenanted deployments for your projects and environments. &lt;/p&gt;

&lt;p&gt;Tenant tags also make it easier to work with tenants as groups instead of individuals. As tenant tags are fully customizable, you can apply meaningful metadata to tenants. This allows you to describe them using your own terminology, and tailor the deployment process to their needs.&lt;/p&gt;

&lt;p&gt;In the tenant overview below, &lt;strong&gt;Capital Animal Hospital&lt;/strong&gt; has the &lt;code&gt;Branding&lt;/code&gt; tag included:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl217bgv0o77bqqnao3qh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl217bgv0o77bqqnao3qh.png" alt="Tenant tag for branding" width="800" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This indicates that they've opted-in for customized branding of their instance of the &lt;strong&gt;Vet Clinic&lt;/strong&gt; application.&lt;/p&gt;

&lt;p&gt;When you build out the deployment process, you can include a tenant tag as a run condition to customize the process for your customers. By applying tags to steps, you are able to specify steps that should only run for customers that match selected tenant tags.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd9sowhde2dp0il66cd9d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd9sowhde2dp0il66cd9d.png" alt="Tenant tag applied to step" width="800" height="675"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can associate multiple tenants with the same tag. This automatically groups these tenants together and enables any tenant with the &lt;code&gt;Branding&lt;/code&gt; tag to have the custom branding step included as part of any deployment for that tenant.&lt;/p&gt;

&lt;p&gt;Tenant tags can also be used to associate multiple tenants with deployment targets and channels, and even choosing which tenants to deploy to. They're a powerful way to help you simplify and scale your deployments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tenant variables &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;You often want to define variable values that are different for each customer. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A database server name or connection string&lt;/li&gt;
&lt;li&gt;A tenant-specific URL&lt;/li&gt;
&lt;li&gt;Contact details for a tenant&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using an untenanted project, you would define these values in the project itself. With a tenanted project, you can set these values directly on the tenant for any connected projects.&lt;/p&gt;

&lt;p&gt;With tenants, there are two types of variable you can specify: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Project variable templates&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Common variables&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These both use the &lt;a href="https://octopus.com/docs/projects/variables/variable-templates" rel="noopener noreferrer"&gt;variable templates&lt;/a&gt; feature.&lt;/p&gt;

&lt;h4&gt;
  
  
  Project variable templates &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Project variables allow you to specify a variable which a tenant can change. A perfect example is a connection string or a database server. With project variables you define them at the project level using &lt;a href="https://octopus.com/docs/projects/variables/variable-templates#project-templates" rel="noopener noreferrer"&gt;project templates&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6zdmlyeawdomoy6jbl8z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6zdmlyeawdomoy6jbl8z.png" alt="Project template screen" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can specify the variable type for the project template, just like regular variables. You can also provide a default value which the tenant can overwrite.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttbwgjawslcv8043yy2l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttbwgjawslcv8043yy2l.png" alt="Tenant project variable edit" width="610" height="696"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, on the tenant variable screen, you can set those variables.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcngprctbiz0jmico05jk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcngprctbiz0jmico05jk.png" alt="Tenant variables" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Common variables &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Common variables are similar to project variables. The main difference is that common variables can be used across multiple projects, and they aren't scoped to environments. Common variables are defined using &lt;a href="https://octopus.com/docs/projects/variables/variable-templates#adding-a-variable-template" rel="noopener noreferrer"&gt;Library variable set templates&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, to define an abbreviation for the tenant to use in a deployment or runbook, you can configure a variable template for the library set.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqnwk1k4brt4h3orlnkyn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqnwk1k4brt4h3orlnkyn.png" alt="Common variable template" width="800" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To include common variables for a tenant, you must add the library variable set in the tenant connected project.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Just like project variables, common variable values are supplied at the tenant level.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftzmf6rh38k6je8n5dtia.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftzmf6rh38k6je8n5dtia.png" alt="Common variable tenant value" width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Variable snapshot &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;When you &lt;a href="https://octopus.com/docs/octopus-rest-api/octopus-cli/create-release" rel="noopener noreferrer"&gt;create a release&lt;/a&gt; Octopus takes a snapshot of the deployment process and the current state of the &lt;a href="https://octopus.com/docs/projects/variables" rel="noopener noreferrer"&gt;project variables&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;However, tenant variables &lt;em&gt;aren't&lt;/em&gt; included in any snapshot. This is helpful as you can add new tenants at any time and deploy to them without creating a new release. &lt;/p&gt;

&lt;p&gt;This also means any changes you make to tenant variables will take immediate effect.&lt;/p&gt;

&lt;h4&gt;
  
  
  Missing variables &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;One of the great things about tenant variables is the guard rails they put in place for your deployments. Defining either a project template or common variable without a default value means any tenant must provide a value for that variable. Octopus won't allow a deployment to occur without one:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpjfibjn41clu51wvuzdt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpjfibjn41clu51wvuzdt.png" alt="Missing tenant variable" width="800" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But those guard rails don't start just at deployment. Octopus will also warn you about any missing values in the tenant's variable overview too:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy1ehx08jchj44x8jg8w1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy1ehx08jchj44x8jg8w1.png" alt="Warning of missing tenant variable" width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This level of safety reduces the chance of a failed deployment for a tenant due to a missing or incorrect variable value.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tenanted deployment targets &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The way you host your infrastructure for multiple instances of the same project usually varies depending on your application and customers. Two common implementations we see are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dedicated hosting&lt;/strong&gt;: You have dedicated deployment targets for each customer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shared hosting&lt;/strong&gt;: You create farms or pools of servers to host all of your customers, achieving higher density.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;In this post, we focus on dedicated hosting, but you can design and implement both dedicated and shared multi-tenant hosting models in Octopus using &lt;a href="https://octopus.com/docs/infrastructure/environments" rel="noopener noreferrer"&gt;environments&lt;/a&gt;, &lt;a href="https://octopus.com/docs/infrastructure" rel="noopener noreferrer"&gt;deployment targets&lt;/a&gt;, and &lt;a href="https://octopus.com/docs/tenants/tenant-tags" rel="noopener noreferrer"&gt;tenant tags&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If your customers have isolated infrastructure, in an untenanted configuration, you need to define unique target roles in Octopus to ensure there's no cross-customer communication in the form of deploying one customer's application to another customer's infrastructure.&lt;/p&gt;

&lt;p&gt;Using tenants, customer-specific target roles aren't required. You can choose deployments that a target can be involved in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Exclude from tenanted deployments (default) - The deployment target will never be included in tenanted deployments.&lt;/li&gt;
&lt;li&gt;Include only in tenanted deployments - the deployment target will only be included in deployments to the associated tenants. It will be excluded from untenanted deployments.&lt;/li&gt;
&lt;li&gt;Include in both tenanted and untenanted deployments - The deployment target will be included in untenanted deployments, and deployments to the associated tenants.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8umg99i6w15uzduxrkv0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8umg99i6w15uzduxrkv0.png" alt="Tenant target restrictions" width="800" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To choose which tenants to associate with a deployment target:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;Restrictions ➜ Associated Tenants&lt;/strong&gt; section of the deployment target. &lt;/li&gt;
&lt;li&gt;Select one or more tenants to allow to deploy to individually, or choose from any of the configured tenant tags.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7hj9sjdoti85orjwd2rv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7hj9sjdoti85orjwd2rv.png" alt="Tenant target restrictions" width="800" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We recommend keeping tenanted and untenanted deployment targets separate, particularly in Production. You could use the same deployment targets for other environments but it's generally better to avoid this situation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This post covers common approaches when customers deploy multiple instances of the same application for each of their customers without tenants. It also details how you can use the multi-tenancy feature to model this too.&lt;/p&gt;

&lt;p&gt;I hope you can see how the Octopus multi-tenancy feature solves some of the problems presented when deploying without tenants, and how it can be leveraged for scalable, reusable, simplified deployments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn more &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://octopus.com/docs/tenants" rel="noopener noreferrer"&gt;Multi-tenancy documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://octopus.com/docs/tenants/guides" rel="noopener noreferrer"&gt;Multi-tenancy guides&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Register for the webinar: Better multi-tenancy deployments using Octopus Deploy &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Join Senior Solutions Architect Mark Harrison and Solutions Architect Adam Close from Octopus Deploy to learn how the multi-tenancy feature in Octopus can be leveraged for scalable, reusable, simplified deployments.&lt;/p&gt;

&lt;p&gt;We're running three sessions of the webinar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wed 28 Jul, 2021&lt;/li&gt;
&lt;li&gt;Thurs 29 Jul, 2021 &lt;/li&gt;
&lt;li&gt;Mon 2 Aug, 2021&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://octopus.com/events/better-multi-tenancy-deployments-using-octopus-deploy" rel="noopener noreferrer"&gt;Register now&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy deployments!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was originally published at &lt;a href="https://octopus.com/blog/better-multi-tenancy-with-octopus" rel="noopener noreferrer"&gt;octopus.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>octopus</category>
      <category>deployment</category>
      <category>tenants</category>
      <category>multitenancy</category>
    </item>
    <item>
      <title>Using Azure Key Vault with Octopus</title>
      <dc:creator>Mark Harrison</dc:creator>
      <pubDate>Wed, 23 Jun 2021 11:31:12 +0000</pubDate>
      <link>https://dev.to/octopus/using-azure-key-vault-with-octopus-4e1n</link>
      <guid>https://dev.to/octopus/using-azure-key-vault-with-octopus-4e1n</guid>
      <description>&lt;p&gt;I recently wrote about &lt;a href="https://octopus.com/blog/using-hashicorp-vault-with-octopus-deploy" rel="noopener noreferrer"&gt;extending the functionality of Octopus to integrate with HashiCorp Vault&lt;/a&gt; using step templates. Afterwards, several people asked if I plan to create step templates to integrate with other secret managers.&lt;/p&gt;

&lt;p&gt;In this post, I walk through a new step template, &lt;a href="https://library.octopus.com/step-templates/6f59f8aa-b2db-4f7a-b02d-a72c13d386f0/actiontemplate-azure-key-vault-retrieve-secrets" rel="noopener noreferrer"&gt;Azure Key Vault - Retrieve Secrets&lt;/a&gt;, which is designed to retrieve secrets from an Azure Key Vault for use in your deployments or runbooks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This post assumes some familiarity with &lt;a href="https://octopus.com/docs/projects/custom-step-templates" rel="noopener noreferrer"&gt;custom step templates&lt;/a&gt; and the Octopus &lt;a href="https://octopus.com/docs/projects/community-step-templates" rel="noopener noreferrer"&gt;Community Library&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;In addition, this post doesn't go into great detail about Azure Key Vault concepts or how to set it up. You can learn more by reading the &lt;a href="https://docs.microsoft.com/en-us/azure/key-vault/general/basic-concepts" rel="noopener noreferrer"&gt;Azure Key Vault basic concepts guide&lt;/a&gt; from Microsoft.&lt;/p&gt;

&lt;p&gt;The step template in this post retrieves secrets from an &lt;a href="https://azure.microsoft.com/en-gb/services/key-vault/" rel="noopener noreferrer"&gt;Azure Key Vault&lt;/a&gt; using the &lt;a href="https://docs.microsoft.com/en-us/powershell/module/az.keyvault/" rel="noopener noreferrer"&gt;Az.KeyVault&lt;/a&gt; PowerShell module. The module must be downloaded and installed on the deployment target or worker before the step can retrieve secrets successfully. The step template has been tested on both Windows and Linux (with &lt;code&gt;PowerShell Core&lt;/code&gt; installed).&lt;/p&gt;

&lt;h2&gt;
  
  
  Authentication &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Before you can retrieve secrets from Azure Key Vault, you must authenticate with Azure. In their &lt;a href="https://docs.microsoft.com/en-us/azure/key-vault/general/authentication" rel="noopener noreferrer"&gt;authentication concepts documentation&lt;/a&gt;, Microsoft note:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Authentication with Key Vault works in conjunction with Azure Active Directory (Azure AD), which is responsible for authenticating the identity of any given security principal.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In Octopus, authentication with Azure Key Vault can be achieved with an &lt;a href="https://octopus.com/docs/infrastructure/deployment-targets/azure" rel="noopener noreferrer"&gt;Azure Account&lt;/a&gt;, using a service principal.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In addition to accessing resources in Azure, your service principal may need further permissions configured to access and retrieve secrets stored in Azure Key Vault. To learn more, read the &lt;a href="https://docs.microsoft.com/en-us/azure/key-vault/general/rbac-guide" rel="noopener noreferrer"&gt;Azure Key Vault RBAC guide&lt;/a&gt; on how to provide access to keys, certificates, and secrets with an Azure role-based access control.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Retrieving secrets &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://library.octopus.com/step-templates/6f59f8aa-b2db-4f7a-b02d-a72c13d386f0/actiontemplate-azure-key-vault-retrieve-secrets" rel="noopener noreferrer"&gt;Azure Key Vault - Retrieve Secrets&lt;/a&gt; step template retrieves one or more secrets from an Azure Key Vault and creates sensitive output variables for each one retrieved. &lt;/p&gt;

&lt;p&gt;For each secret, you can optionally choose to retrieve a specific version, and provide a custom output variable name.&lt;/p&gt;

&lt;p&gt;Retrieving a single secret requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An Azure account with permission to access the secret.&lt;/li&gt;
&lt;li&gt;The name of the Azure Key Vault to retrieve the secret from.&lt;/li&gt;
&lt;li&gt;The name of the secret to retrieve.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An advanced feature of the step template offers support for retrieving multiple secrets at once. This requires entering each secret on a new line.&lt;/p&gt;

&lt;p&gt;For each secret retrieved, a &lt;a href="https://octopus.com/docs/projects/variables/output-variables#sensitive-output-variables" rel="noopener noreferrer"&gt;sensitive output variable&lt;/a&gt; is created for use in subsequent steps. By default, only a count of the number of variables created will be shown in the task log. To see the names of the variables in the task log, change the &lt;strong&gt;Print output variable names&lt;/strong&gt; parameter to &lt;code&gt;True&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step template parameters &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The step template uses the following parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Azure Account&lt;/code&gt;: An Azure account with permissions to retrieve secrets from the Azure Key Vault.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Vault Name&lt;/code&gt;: The name of the Azure Key Vault to retrieve secrets from.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Vault Secrets to retrieve&lt;/code&gt;: Specify the names of the Secrets to be returned from Azure Key Vault, in the format: &lt;code&gt;SecretName SecretVersion | OutputVariableName&lt;/code&gt; where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;SecretName&lt;/code&gt; is the name of the Secret to retrieve.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SecretVersion&lt;/code&gt; is the &lt;em&gt;optional&lt;/em&gt; version of the Secret to retrieve. &lt;em&gt;If this value isn't specified, the latest version will be retrieved&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;OutputVariableName&lt;/code&gt; is the &lt;em&gt;optional&lt;/em&gt; Octopus &lt;a href="https://octopus.com/docs/projects/variables/output-variables" rel="noopener noreferrer"&gt;output variable&lt;/a&gt; name to store the secret's value in. &lt;em&gt;If this value isn't specified, an output name will be generated dynamically&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Multiple fields can be retrieved by entering each one on a new line.&lt;/p&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;code&gt;Print output variable names&lt;/code&gt;: Write out the Octopus &lt;a href="https://octopus.com/docs/projects/variables/output-variables" rel="noopener noreferrer"&gt;output variable&lt;/a&gt; names to the task log. Default: &lt;code&gt;False&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;code&gt;Az PowerShell Module version (optional)&lt;/code&gt;: If you wish to use a specific version of the &lt;code&gt;Az&lt;/code&gt; PowerShell module (rather than the default), enter the version number here. e.g. &lt;code&gt;5.9.0&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The version specified must exist on the machine.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Az PowerShell Install Location (optional)&lt;/code&gt;: If you wish to provide a custom path to the &lt;code&gt;Az&lt;/code&gt; PowerShell module (rather than the default), enter the value here.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The Module must exist at the specified location on the machine. This step template will not download the Module.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fetpxr7a42vpzjzf52psw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fetpxr7a42vpzjzf52psw.png" alt="Parameters for the step" width="800" height="687"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Using the step &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Azure Key Vault - Retrieve Secrets&lt;/strong&gt; step is added to deployment and runbook processes in the &lt;a href="https://octopus.com/docs/projects/steps#adding-steps-to-your-deployment-processes" rel="noopener noreferrer"&gt;same way as other steps&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After you've added the step to your process, fill out the parameters in the step:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsr3vawzsrkhp229lv7h6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsr3vawzsrkhp229lv7h6.png" alt="Azure Key Vault retrieve secrets step used in a process" width="800" height="703"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you've filled in the parameters, you can execute the step in a runbook or deployment process. On successful execution, any matching secrets will be stored as sensitive output variables. If you've configured your step to print the variable names, they'll appear in the task log:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7b5kgmp7jzxenzvkuli4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7b5kgmp7jzxenzvkuli4.png" alt="Azure Key Vault retrieve secrets step task log" width="800" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In subsequent steps, output variables created from matching secrets can be used in your deployment or runbook.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Remember to replace &lt;code&gt;Azure Key Vault - Retrieve Secrets&lt;/code&gt; with the name of your step for any output variable names.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Conclusion &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;The step template covered in this post demonstrates that it's easy to integrate with Azure Key Vault, and make use of secrets stored there with your Octopus deployments or runbooks.&lt;/p&gt;

&lt;p&gt;Happy deployments!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was originally published at &lt;a href="https://octopus.com/blog/using-azure-key-vault-with-octopus" rel="noopener noreferrer"&gt;octopus.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>octopus</category>
      <category>deployment</category>
      <category>security</category>
      <category>vault</category>
    </item>
    <item>
      <title>Using HashiCorp Vault with Octopus Deploy</title>
      <dc:creator>Mark Harrison</dc:creator>
      <pubDate>Mon, 24 May 2021 10:19:57 +0000</pubDate>
      <link>https://dev.to/octopus/using-hashicorp-vault-with-octopus-deploy-e88</link>
      <guid>https://dev.to/octopus/using-hashicorp-vault-with-octopus-deploy-e88</guid>
      <description>&lt;p&gt;Storing sensitive values in Octopus Deploy solves many problems. If your organization has standardized on a secrets manager though, that might mean storing sensitive values twice, making secrets management more complicated.&lt;/p&gt;

&lt;p&gt;Octopus has supported the concept of &lt;a href="https://octopus.com/docs/projects/variables/sensitive-variables" rel="noopener noreferrer"&gt;sensitive variables&lt;/a&gt; since &lt;a href="https://octopus.com/blog/new-in-2.0/sensitive-variables" rel="noopener noreferrer"&gt;Octopus 2.0&lt;/a&gt;, but customers often ask about support for secret managers. One in particular is &lt;a href="https://www.vaultproject.io/" rel="noopener noreferrer"&gt;HashiCorp Vault&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this post, I walk through a number of new &lt;a href="https://library.octopus.com/listing/hashicorp%20vault" rel="noopener noreferrer"&gt;HashiCorp Vault step templates&lt;/a&gt; designed to retrieve secrets from Vault for use in your deployments or runbooks.&lt;/p&gt;

&lt;h2&gt;
  
  
  In this post
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;
Authentication

&lt;ul&gt;
&lt;li&gt;
LDAP login step

&lt;ul&gt;
&lt;li&gt;LDAP login parameters&lt;/li&gt;
&lt;li&gt;Using the LDAP login step&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

AppRole login step

&lt;ul&gt;
&lt;li&gt;AppRole login parameters&lt;/li&gt;
&lt;li&gt;Using the AppRole login step&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;AppRole best practises&lt;/li&gt;

&lt;li&gt;

AppRole Get Wrapped SecretID step

&lt;ul&gt;
&lt;li&gt;AppRole Get Wrapped SecretID parameters&lt;/li&gt;
&lt;li&gt;Using the AppRole Get Wrapped SecretID step&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

AppRole Unwrap SecretID step

&lt;ul&gt;
&lt;li&gt;AppRole Unwrap SecretID parameters&lt;/li&gt;
&lt;li&gt;Using the Unwrap SecretID step&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

AppRole Unwrap SecretID and Login step

&lt;ul&gt;
&lt;li&gt;AppRole Unwrap SecretID parameters&lt;/li&gt;
&lt;li&gt;Using the Unwrap SecretID step&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

Retrieving secrets

&lt;ul&gt;
&lt;li&gt;
Retrieve KV (v1) secrets step

&lt;ul&gt;
&lt;li&gt;Retrieve KV (v1) secrets parameters&lt;/li&gt;
&lt;li&gt;Using Retrieve KV (v1) secrets step&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Retrieve KV (v2) secrets step

&lt;ul&gt;
&lt;li&gt;Retrieve KV (v2) secrets parameters&lt;/li&gt;
&lt;li&gt;Using Retrieve KV (v2) secrets step&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;Conclusion&lt;/li&gt;

&lt;li&gt;Learn more&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This post assumes some familiarity with &lt;a href="https://octopus.com/docs/projects/custom-step-templates" rel="noopener noreferrer"&gt;custom step templates&lt;/a&gt; and the Octopus &lt;a href="https://octopus.com/docs/projects/community-step-templates" rel="noopener noreferrer"&gt;Community Library&lt;/a&gt;. To learn more about these, you can read Ryan Rousseau's &lt;a href="https://octopus.com/blog/creating-an-octopus-deploy-step-template" rel="noopener noreferrer"&gt;two-part series&lt;/a&gt; on creating your own step template and publishing it to the library.&lt;/p&gt;

&lt;p&gt;In addition, this post doesn't go into great detail about Vault server concepts or how to configure a Vault server.&lt;/p&gt;

&lt;p&gt;The step templates covered in this post perform both &lt;a href="https://www.vaultproject.io/docs/concepts/auth" rel="noopener noreferrer"&gt;Vault authentication&lt;/a&gt; and secret retrieval for both versions 1 and 2 of the &lt;a href="https://www.vaultproject.io/docs/secrets/kv" rel="noopener noreferrer"&gt;Key-Value (kv)&lt;/a&gt; Secrets Engine.&lt;/p&gt;

&lt;p&gt;All of the step templates make use of the Vault &lt;a href="https://www.vaultproject.io/api-docs" rel="noopener noreferrer"&gt;HTTP API&lt;/a&gt; so there are no additional dependencies required to use them, except being able to connect to your Vault server. They've all been tested using Vault version &lt;strong&gt;1.7.1&lt;/strong&gt; and can run on both Windows and Linux (with &lt;code&gt;Powershell Core&lt;/code&gt; installed).&lt;/p&gt;

&lt;h2&gt;
  
  
  Authentication &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Before interacting with Vault, you must authenticate against an auth method. Vault offers a number of different authentication options. The following step templates have been created to support Vault authentication:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LDAP login&lt;/li&gt;
&lt;li&gt;AppRole login&lt;/li&gt;
&lt;li&gt;AppRole Get wrapped SecretID&lt;/li&gt;
&lt;li&gt;AppRole Unwrap SecretID&lt;/li&gt;
&lt;li&gt;AppRole Unwrap SecretID and Login&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;The AppRole method is the recommended way to authenticate with Vault for servers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Upon authentication with Vault, a &lt;a href="https://www.vaultproject.io/docs/concepts/tokens" rel="noopener noreferrer"&gt;token&lt;/a&gt; is generated that can be used in further interactions with Vault.&lt;/p&gt;

&lt;h3&gt;
  
  
  LDAP login step &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://library.octopus.com/step-templates/de807003-3b05-4649-9af3-11a2c7722b3f/actiontemplate-hashicorp-vault-ldap-login" rel="noopener noreferrer"&gt;HashiCorp Vault - Login with LDAP&lt;/a&gt; step template authenticates with a Vault Server using the &lt;a href="https://www.vaultproject.io/docs/auth/ldap" rel="noopener noreferrer"&gt;LDAP&lt;/a&gt; authentication method. This allows Vault integration without having to duplicate username or password configuration.&lt;/p&gt;

&lt;p&gt;You might choose to authenticate using LDAP if you already have an LDAP server available and use service accounts to control access to sensitive information.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Microsoft's Active Directory supports LDAP using &lt;a href="https://docs.microsoft.com/en-us/previous-versions/windows/desktop/adam/what-is-active-directory-lightweight-directory-services" rel="noopener noreferrer"&gt;Active Directory Lightweight Directory Services&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After authentication, the &lt;code&gt;client_token&lt;/code&gt; from the Vault response will be made available as a &lt;a href="https://octopus.com/docs/projects/variables/output-variables#sensitive-output-variables" rel="noopener noreferrer"&gt;sensitive output variable&lt;/a&gt; named &lt;code&gt;LDAPAuthToken&lt;/code&gt; for use in other steps.&lt;/p&gt;

&lt;h4&gt;
  
  
  LDAP login parameters &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The step template has the following parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Vault Server URL&lt;/code&gt;: The URL of the Vault instance you are connecting to, including the port (The default is &lt;code&gt;8200&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;API version&lt;/code&gt;: Choose the API version to use from a drop-down list. Currently, there is only one option: &lt;code&gt;v1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LDAP Auth Login path&lt;/code&gt;: The path that the &lt;a href="https://www.vaultproject.io/api-docs/auth/ldap" rel="noopener noreferrer"&gt;LDAP method is mounted at&lt;/a&gt;. The default is &lt;code&gt;/auth/ldap&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Username&lt;/code&gt;: The LDAP username.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Password&lt;/code&gt;: The LDAP password.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F84njkgdhaha5p3y2c8ey.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F84njkgdhaha5p3y2c8ey.png" alt="Parameters for the Vault LDAP login step" width="800" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Using the LDAP login step &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;LDAP login&lt;/strong&gt; step is added to deployment and runbook processes in the &lt;a href="https://octopus.com/docs/projects/steps#adding-steps-to-your-deployment-processes" rel="noopener noreferrer"&gt;same way as other steps&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After you've added the step to your process, fill out the parameters in the step:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftd7zmzi2trmgdppnccrv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftd7zmzi2trmgdppnccrv.png" alt="Vault LDAP login step used in a process" width="744" height="768"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can then execute the step in a runbook or deployment process. On successful execution, the sensitive output variable name containing the token is displayed in the task log:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F734ykgkb4lhy05nisnmr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F734ykgkb4lhy05nisnmr.png" alt="Vault LDAP login step task log" width="800" height="249"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In subsequent steps, the output variable &lt;code&gt;#{Octopus.Action[HashiCorp Vault - Login with LDAP].Output.LDAPAuthToken}&lt;/code&gt; can be used to authenticate and retrieve secrets.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Remember to replace &lt;code&gt;HashiCorp Vault - Login with LDAP&lt;/code&gt; with the name of your step for any output variable names.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  AppRole login step &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://library.octopus.com/step-templates/e04a9cec-f04a-4da2-849b-1aed0fd408f0/actiontemplate-hashicorp-vault-approle-login" rel="noopener noreferrer"&gt;HashiCorp Vault - Login with AppRole&lt;/a&gt; step template authenticates with a Vault Server using the &lt;a href="https://www.vaultproject.io/docs/auth/approle" rel="noopener noreferrer"&gt;AppRole&lt;/a&gt; authentication method. This is perfect for use with Octopus. HashiCorp themselves recommend it for machines or apps:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This auth method is oriented to automated workflows (machines and services), and is less useful for human operators.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With an AppRole, a machine can log in with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;RoleID&lt;/code&gt;, think of this as the username in an authentication pair.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SecretID&lt;/code&gt;, think of this as the password in an authentication pair.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Don't store the SecretID:&lt;/strong&gt;&lt;br&gt;
Storing the RoleID in Octopus as a sensitive variable is a good way to ensure it remains encrypted until required.&lt;/p&gt;

&lt;p&gt;However, the same is &lt;strong&gt;not recommended&lt;/strong&gt; for the SecretID.&lt;/p&gt;

&lt;p&gt;A SecretID, just like a password is &lt;em&gt;designed to expire&lt;/em&gt;. Storing the SecretID could also provide the capability to retrieve all secrets as both the RoleID and SecretID would be available.&lt;/p&gt;

&lt;p&gt;We recommend you use the more secure Get wrapped SecretID and Unwrap SecretID and Login step templates, as they use one of the best practices &lt;strong&gt;response wrapping&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you use the AppRole login step template, we recommend you provide the SecretID at execution time using a sensitive &lt;a href="https://octopus.com/docs/projects/variables/prompted-variables" rel="noopener noreferrer"&gt;prompted variable&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once authenticated, the &lt;code&gt;client_token&lt;/code&gt; from the Vault response will be made available as a &lt;a href="https://octopus.com/docs/projects/variables/output-variables#sensitive-output-variables" rel="noopener noreferrer"&gt;sensitive output variable&lt;/a&gt; named &lt;code&gt;AppRoleAuthToken&lt;/code&gt; for use in other steps.&lt;/p&gt;

&lt;h4&gt;
  
  
  AppRole login parameters &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The step template has the following parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Vault Server URL&lt;/code&gt;: The URL of the Vault instance you are connecting to, including the port (The default is &lt;code&gt;8200&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;API version&lt;/code&gt;: Choose the API version to use from a drop-down list. Currently, there is only one option: &lt;code&gt;v1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;App Role Path&lt;/code&gt;: The path where the &lt;a href="https://www.vaultproject.io/api-docs/auth/approle" rel="noopener noreferrer"&gt;approle auth method is mounted&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Role ID&lt;/code&gt;: The &lt;a href="https://www.vaultproject.io/docs/auth/approle#roleid" rel="noopener noreferrer"&gt;RoleID&lt;/a&gt; of the AppRole.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Secret ID&lt;/code&gt;: The &lt;a href="https://www.vaultproject.io/docs/auth/approle#secretid" rel="noopener noreferrer"&gt;SecretID&lt;/a&gt; of the AppRole.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnqd4aer6539lnu8kosi7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnqd4aer6539lnu8kosi7.png" alt="Parameters for the Vault AppRole login step" width="800" height="562"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Using the AppRole login step &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;AppRole login&lt;/strong&gt; step is added to deployment and runbook processes in the &lt;a href="https://octopus.com/docs/projects/steps#adding-steps-to-your-deployment-processes" rel="noopener noreferrer"&gt;same way as other steps&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After you've added the step to your process, fill out the parameters in the step:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fggwiimy542tfp70uyguz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fggwiimy542tfp70uyguz.png" alt="Vault AppRole login step used in a process" width="770" height="767"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can then execute the step in a runbook or deployment process. On successful execution, the sensitive output variable name containing the token is displayed in the task log:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fapfu0ygbo6ypyblc31ex.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fapfu0ygbo6ypyblc31ex.png" alt="Vault AppRole login step task log" width="800" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In subsequent steps, the output variable &lt;code&gt;#{Octopus.Action[HashiCorp Vault - Login with AppRole].Output.AppRoleAuthToken}&lt;/code&gt; can be used to authenticate and retrieve secrets.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Remember to replace &lt;code&gt;HashiCorp Vault - Login with AppRole&lt;/code&gt; with the name of your step for any output variable names.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  AppRole best practices &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://www.vaultproject.io/docs/auth/approle" rel="noopener noreferrer"&gt;AppRole&lt;/a&gt; authentication method is considered a &lt;em&gt;trusted-broker&lt;/em&gt; method. This means that the onus of trust rests in the system acting as the authentication intermediary (the &lt;em&gt;broker&lt;/em&gt;) between the client (typically an Octopus deployment target) and Vault.&lt;/p&gt;

&lt;p&gt;An important best practice is to avoid storing an AppRole SecretID. Instead, use &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping" rel="noopener noreferrer"&gt;response wrapping&lt;/a&gt; to provide a &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping#response-wrapping-tokens" rel="noopener noreferrer"&gt;wrapping token&lt;/a&gt; that will provide an access mechanism to retrieve a SecretID when required. This method of obtaining a SecretID is also known as a &lt;a href="https://www.vaultproject.io/docs/auth/approle#pull-and-push-secretid-modes" rel="noopener noreferrer"&gt;Pull mode&lt;/a&gt; as it requires the SecretID to be fetched or &lt;em&gt;pulled&lt;/em&gt; from the AppRole.&lt;/p&gt;

&lt;p&gt;The Vault documentation contains &lt;a href="https://learn.hashicorp.com/tutorials/vault/pattern-approle?in=vault/recommended-patterns" rel="noopener noreferrer"&gt;recommended patterns&lt;/a&gt; when using AppRole authentication.&lt;/p&gt;

&lt;p&gt;Here's a summary of the recommendations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use a secured system to act as the broker for retrieving a wrapped SecretID.&lt;/li&gt;
&lt;li&gt;Use &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping" rel="noopener noreferrer"&gt;response wrapping&lt;/a&gt; to obtain a SecretID.&lt;/li&gt;
&lt;li&gt;Limit the number of uses and Time-to-live (TTL) value for a SecretID to prevent overuse.&lt;/li&gt;
&lt;li&gt;Avoid &lt;a href="https://learn.hashicorp.com/tutorials/vault/pattern-approle?in=vault/recommended-patterns#anti-patterns" rel="noopener noreferrer"&gt;anti-patterns&lt;/a&gt; such as having the broker retrieve secrets.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Secure the broker:&lt;/strong&gt;&lt;br&gt;
Since the trust rests on the broker, we strongly recommend using the Octopus Server's &lt;a href="https://octopus.com/docs/infrastructure/workers#built-in-worker" rel="noopener noreferrer"&gt;built-in worker&lt;/a&gt;, or a highly-secured &lt;a href="https://octopus.com/docs/infrastructure/workers#external-workers" rel="noopener noreferrer"&gt;external worker&lt;/a&gt; to act as the broker. It would be responsible for retrieving a wrapped SecretID and passing that value to the machine (the client) that authenticates with Vault.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To support these recommended practices, three additional &lt;code&gt;AppRole&lt;/code&gt; step templates have been created:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AppRole Get Wrapped SecretID&lt;/li&gt;
&lt;li&gt;AppRole Unwrap SecretID&lt;/li&gt;
&lt;li&gt;AppRole Unwrap SecretID and Login&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  AppRole Get Wrapped SecretID step &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://library.octopus.com/step-templates/76827264-af27-46d0-913a-e093a4f0db48/actiontemplate-hashicorp-vault-approle-get-wrapped-secret-id" rel="noopener noreferrer"&gt;HashiCorp Vault - AppRole Get Wrapped Secret ID&lt;/a&gt; step template generates a &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping" rel="noopener noreferrer"&gt;response-wrapped&lt;/a&gt; SecretID for the &lt;a href="https://www.vaultproject.io/docs/auth/approle" rel="noopener noreferrer"&gt;AppRole&lt;/a&gt; authentication method.&lt;/p&gt;

&lt;p&gt;The step template authenticates with a Vault Server using a token to retrieve a wrapped SecretID. The response contains a &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping#response-wrapping-tokens" rel="noopener noreferrer"&gt;wrapping token&lt;/a&gt; and other metadata such as the creation path for the token.&lt;/p&gt;

&lt;p&gt;This value can be used to validate &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping#response-wrapping-token-validation" rel="noopener noreferrer"&gt;no malfeasance&lt;/a&gt; has occurred. The wrapping token can then be used to retrieve the actual SecretID value.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The token used to authenticate to retrieve a wrapped SecretID should be of limited scope and should only be allowed to retrieve wrapped SecretIDs. Consider creating a long-lived Vault token as this presents only a minor risk.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After the response has been received from the Vault server, two &lt;a href="https://octopus.com/docs/projects/variables/output-variables#sensitive-output-variables" rel="noopener noreferrer"&gt;sensitive output variables&lt;/a&gt; are created for use in other steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;WrappedToken&lt;/code&gt; This is the wrapped &lt;code&gt;token&lt;/code&gt; from the response, used to retrieve the actual SecretID value.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;WrappedTokenCreationPath&lt;/code&gt; This is the creation path for the token. It allows you to validate &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping#response-wrapping-token-validation" rel="noopener noreferrer"&gt;no malfeasance&lt;/a&gt; has occurred.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  AppRole Get Wrapped SecretID parameters ### AppRole Get Wrapped SecretID step &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The step template uses the following parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Vault Server URL&lt;/code&gt;: The URL of the Vault instance you are connecting to, including the port (The default is &lt;code&gt;8200&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;API version&lt;/code&gt;: Choose the API version from a drop-down list. Currently, there is only one option: &lt;code&gt;v1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;App Role Path&lt;/code&gt;: The path where the &lt;a href="https://www.vaultproject.io/api-docs/auth/approle" rel="noopener noreferrer"&gt;AppRole auth method is mounted&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Role Name&lt;/code&gt;: The role name of the &lt;a href="https://www.vaultproject.io/api/auth/approle" rel="noopener noreferrer"&gt;AppRole&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Time-to-live (TTL)&lt;/code&gt;: The TTL in seconds of the &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping#response-wrapping-tokens" rel="noopener noreferrer"&gt;response-wrapping token&lt;/a&gt; itself. The default is: &lt;code&gt;120s&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Auth Token&lt;/code&gt;: The &lt;a href="https://www.vaultproject.io/docs/auth/token" rel="noopener noreferrer"&gt;token&lt;/a&gt; used to authenticate with Vault to generate a &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping" rel="noopener noreferrer"&gt;response-wrapped&lt;/a&gt; SecretID.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvbsp4m64gqvonfs5bkw1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvbsp4m64gqvonfs5bkw1.png" alt="Parameters for the Vault Get Wrapped SecretID step" width="800" height="634"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Using the AppRole Get Wrapped SecretID step &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;Get Wrapped SecretID&lt;/strong&gt; step is added to deployment and runbook processes in the &lt;a href="https://octopus.com/docs/projects/steps#adding-steps-to-your-deployment-processes" rel="noopener noreferrer"&gt;same way as other steps&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After you've added the step to your process, fill out the parameters in the step:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3793y1mb5smw9u00i0lb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3793y1mb5smw9u00i0lb.png" alt="Vault Get Wrapped SecretID step used in a process" width="800" height="769"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can then execute the step in a runbook or deployment process. On successful execution, the sensitive output variable names are displayed in the task log:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpnsq71yh798jc0j37wqr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpnsq71yh798jc0j37wqr.png" alt="Vault Get Wrapped SecretID step task log" width="800" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In subsequent steps, the output variables can be used to validate and retrieve the actual SecretID value:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;#{Octopus.Action[HashiCorp Vault - AppRole Get Wrapped Secret ID].Output.WrappedToken}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;#{Octopus.Action[HashiCorp Vault - AppRole Get Wrapped Secret ID].Output.WrappedTokenCreationPath}&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Remember to replace &lt;code&gt;HashiCorp Vault - AppRole Get Wrapped Secret ID&lt;/code&gt; with the name of your step for any output variable names.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  AppRole Unwrap SecretID step &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://library.octopus.com/step-templates/c1f56030-0bcd-458d-bc70-b4f43ec0d30f/actiontemplate-hashicorp-vault-approle-unwrap-secret-id" rel="noopener noreferrer"&gt;HashiCorp Vault - AppRole Unwrap Secret ID&lt;/a&gt; step template retrieves and unwraps a SecretID for an &lt;a href="https://www.vaultproject.io/docs/auth/approle" rel="noopener noreferrer"&gt;AppRole&lt;/a&gt; using a &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping#response-wrapping-tokens" rel="noopener noreferrer"&gt;wrapping token&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;secret_id&lt;/code&gt; from the Vault response will be made available as a &lt;a href="https://octopus.com/docs/projects/variables/output-variables#sensitive-output-variables" rel="noopener noreferrer"&gt;sensitive output variable&lt;/a&gt; named &lt;code&gt;UnwrappedSecretID&lt;/code&gt; for use in other steps.&lt;/p&gt;

&lt;h4&gt;
  
  
  AppRole Unwrap SecretID parameters &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The step template uses the following parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Vault Server URL&lt;/code&gt;: The URL of the Vault instance you are connecting to, including the port (The default is &lt;code&gt;8200&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;API version&lt;/code&gt;: Choose the API version to use from a drop-down list. Currently, there is only one option: &lt;code&gt;v1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Wrapped Token&lt;/code&gt;: The &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping#response-wrapping-tokens" rel="noopener noreferrer"&gt;wrapping token&lt;/a&gt; used to retrieve the actual Secret ID from Vault.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Token Creation Path&lt;/code&gt;: &lt;em&gt;Optional&lt;/em&gt; The creation path for the wrapped token. If this value is provided, the step template will perform a &lt;a href="https://www.vaultproject.io/api-docs/system/wrapping-lookup" rel="noopener noreferrer"&gt;wrapping lookup&lt;/a&gt; to &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping#response-wrapping-token-validation" rel="noopener noreferrer"&gt;validate no malfeasance&lt;/a&gt; has occurred.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq15uje8lc4yferyf9ca6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq15uje8lc4yferyf9ca6.png" alt="Parameters for the Vault Unwrap SecretID step" width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Using the Unwrap SecretID step &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;Unwrap SecretID&lt;/strong&gt; step is added to deployment and runbook processes in the &lt;a href="https://octopus.com/docs/projects/steps#adding-steps-to-your-deployment-processes" rel="noopener noreferrer"&gt;same way as other steps&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After you've added the step to your process, fill out the parameters in the step:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg9u2a1uwkl3kcsr2kwg7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg9u2a1uwkl3kcsr2kwg7.png" alt="Vault Unwrap SecretID step used in a process" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note the use of &lt;a href="https://octopus.com/docs/projects/variables/output-variables#sensitive-output-variables" rel="noopener noreferrer"&gt;sensitive output variables&lt;/a&gt; in the step parameters. In this example, the values are created using the Get Wrapped SecretID step template named &lt;code&gt;HashiCorp Vault - AppRole Get Wrapped Secret ID&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can then execute the step in a runbook or deployment process. On successful execution, the sensitive output variable names are displayed in the task log:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc6yn7pf4fhfe4x06ejn0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc6yn7pf4fhfe4x06ejn0.png" alt="Vault Unwrap SecretID step task log" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In subsequent steps, the output variable &lt;code&gt;#{Octopus.Action[HashiCorp Vault - AppRole Unwrap Secret ID].Output.UnwrappedSecretID}&lt;/code&gt; can be used to authenticate with Vault and receive a token that can then be used to retrieve secrets.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Remember to replace &lt;code&gt;HashiCorp Vault - AppRole Unwrap Secret ID&lt;/code&gt; with the name of your step for any output variable names.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  AppRole Unwrap SecretID and Login step &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://library.octopus.com/step-templates/aa113393-e615-40ed-9c5a-f95f471d728f/actiontemplate-hashicorp-vault-approle-unwrap-secret-id-and-login" rel="noopener noreferrer"&gt;HashiCorp Vault - AppRole Unwrap Secret ID and Login&lt;/a&gt; step template is provided as a convenient way to combine two step templates used with Vault into one:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
AppRole Unwrap SecretID: It retrieves and unwraps a SecretID for an &lt;a href="https://www.vaultproject.io/docs/auth/approle" rel="noopener noreferrer"&gt;AppRole&lt;/a&gt; using a &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping#response-wrapping-tokens" rel="noopener noreferrer"&gt;wrapping token&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
AppRole login: It authenticates with Vault using a supplied RoleID and the unwrapped SecretID.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's designed as the second part of a two-step workflow with Vault:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Get a wrapped SecretID using the AppRole Get wrapped SecretID step template.&lt;/li&gt;
&lt;li&gt;Provide the wrapped SecretID stored in a sensitive output variable from the first step to this step template to unwrap and authenticate.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once authenticated, the &lt;code&gt;client_token&lt;/code&gt; from the Vault response will be made available as a &lt;a href="https://octopus.com/docs/projects/variables/output-variables#sensitive-output-variables" rel="noopener noreferrer"&gt;sensitive output variable&lt;/a&gt; named &lt;code&gt;AppRoleAuthToken&lt;/code&gt; for use in other steps.&lt;/p&gt;

&lt;h4&gt;
  
  
  AppRole Unwrap SecretID and Login parameters &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The step template uses the following parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Vault Server URL&lt;/code&gt;: The URL of the Vault instance you are connecting to, including the port (The default is &lt;code&gt;8200&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;API version&lt;/code&gt;: Choose the API version to use from a drop-down list. Currently, there is only one option: &lt;code&gt;v1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;App Role Path&lt;/code&gt;: The path where the &lt;a href="https://www.vaultproject.io/api-docs/auth/approle" rel="noopener noreferrer"&gt;AppRole auth method is mounted&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Role ID&lt;/code&gt;: The &lt;a href="https://www.vaultproject.io/docs/auth/approle#roleid" rel="noopener noreferrer"&gt;RoleID&lt;/a&gt; of the AppRole.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Wrapped Token&lt;/code&gt;: The &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping#response-wrapping-tokens" rel="noopener noreferrer"&gt;wrapping token&lt;/a&gt; used to retrieve the actual Secret ID from Vault.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Token Creation Path&lt;/code&gt;: &lt;em&gt;Optional&lt;/em&gt; The creation path for the wrapped token. If this value is provided, the step template will perform a &lt;a href="https://www.vaultproject.io/api-docs/system/wrapping-lookup" rel="noopener noreferrer"&gt;wrapping lookup&lt;/a&gt; to &lt;a href="https://www.vaultproject.io/docs/concepts/response-wrapping#response-wrapping-token-validation" rel="noopener noreferrer"&gt;validate no malfeasance&lt;/a&gt; has occurred.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv5es40zycq7gomgdecev.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv5es40zycq7gomgdecev.png" alt="Parameters for the Vault Unwrap SecretID and Login step" width="800" height="632"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Using the Unwrap SecretID and Login step &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;Unwrap SecretID and Login&lt;/strong&gt; step is added to deployment and runbook processes in the &lt;a href="https://octopus.com/docs/projects/steps#adding-steps-to-your-deployment-processes" rel="noopener noreferrer"&gt;same way as other steps&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After you've added the step to your process, fill out the parameters in the step:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxeuc0im6zljk15i4fq2v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxeuc0im6zljk15i4fq2v.png" alt="Vault Unwrap SecretID and Login step used in a process" width="800" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note the use of &lt;a href="https://octopus.com/docs/projects/variables/output-variables#sensitive-output-variables" rel="noopener noreferrer"&gt;sensitive output variables&lt;/a&gt; in the step parameters. In this example, the values were created using the Get Wrapped SecretID step template named &lt;code&gt;HashiCorp Vault - AppRole Get Wrapped Secret ID&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can then execute the step in a runbook or deployment process. On successful execution, the sensitive output variable names are displayed in the task log:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7o4rgbyun2lm7sgat32f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7o4rgbyun2lm7sgat32f.png" alt="Vault Unwrap SecretID and Login step task log" width="800" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In subsequent steps, the output variable &lt;code&gt;#{Octopus.Action[HashiCorp Vault - AppRole Unwrap Secret ID and Login].Output.AppRoleAuthToken}&lt;/code&gt; can be used to authenticate, and retrieve secrets.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Remember to replace &lt;code&gt;HashiCorp Vault - AppRole Unwrap Secret ID and Login&lt;/code&gt; with the name of your step for any output variable names.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Retrieving secrets &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;After you've authenticated with Vault, you receive an authentication token that can be used to retrieve secrets. Secrets in Vault are stored in a &lt;a href="https://www.vaultproject.io/docs/secrets" rel="noopener noreferrer"&gt;secrets engine&lt;/a&gt;, of which there are many different types.&lt;/p&gt;

&lt;p&gt;The step templates created to support retrieving secrets focus on the &lt;a href="https://www.vaultproject.io/docs/secrets/kv" rel="noopener noreferrer"&gt;Key-Value (kv)&lt;/a&gt; Secrets Engine as it's a generic Key-Value store used to store arbitrary secrets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Retrieve KV (v1) secrets step&lt;/li&gt;
&lt;li&gt;Retrieve KV (v2) secrets step&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Retrieve KV (v1) secrets step &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://library.octopus.com/step-templates/9aab9522-25e0-4539-841c-8b726e6b1520/actiontemplate-hashicorp-vault-key-value-(v1)-retrieve-secrets" rel="noopener noreferrer"&gt;HashiCorp Vault - Key Value (v1) retrieve secrets&lt;/a&gt; step template retrieves one or more secrets stored in a &lt;code&gt;v1&lt;/code&gt; Key-Value secrets engine.&lt;/p&gt;

&lt;p&gt;Retrieving a single secret requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The path to the secret.&lt;/li&gt;
&lt;li&gt;An authentication token with permission to access the secret.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Optionally&lt;/em&gt;, a list of field names to retrieve.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An advanced feature of the step template offers support for retrieving multiple secrets at once. This requires changing the &lt;strong&gt;Secrets retrieval method&lt;/strong&gt; parameter to &lt;code&gt;Multiple vault keys&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It's also possible to recursively retrieve secrets. This is useful when you want to retrieve all secrets for a given path.&lt;/p&gt;

&lt;p&gt;For each secret retrieved, a &lt;a href="https://octopus.com/docs/projects/variables/output-variables#sensitive-output-variables" rel="noopener noreferrer"&gt;sensitive output variable&lt;/a&gt; is created for use in subsequent steps. By default, only a count of the number of variables created will be shown in the task log. To see the names of the variables in the task log, change the &lt;strong&gt;Print output variable names&lt;/strong&gt; parameter to &lt;code&gt;True&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Retrieve KV (v1) secrets parameters &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The step template uses the following parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Vault Server URL&lt;/code&gt;: The URL of the Vault instance you are connecting to, including the port (The default is &lt;code&gt;8200&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;API version&lt;/code&gt;: Choose the API version to use from a drop-down list. Currently, there is only one option: &lt;code&gt;v1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Auth Token&lt;/code&gt;: The &lt;a href="https://www.vaultproject.io/docs/auth/token" rel="noopener noreferrer"&gt;token&lt;/a&gt; used to authenticate to retrieve secrets.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Secrets Path&lt;/code&gt;: The full path to the secret(s) you want to retrieve. The value should include both the path
where the secrets engine is mounted, as well as the path to the secret itself.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Secrets retrieval method&lt;/code&gt;: Choose between retrieving a single secret or multiple secrets. Retrieving a single secret is the equivalent of a &lt;code&gt;vault kv get&lt;/code&gt; command using the &lt;a href="https://www.vaultproject.io/api-docs/secret/kv/kv-v1#read-secret" rel="noopener noreferrer"&gt;Get&lt;/a&gt; method. Retrieving multiple secrets is the equivalent of the combination of both a &lt;code&gt;vault kv list&lt;/code&gt; command using the &lt;a href="https://www.vaultproject.io/api-docs/secret/kv/kv-v2#list-secrets" rel="noopener noreferrer"&gt;List&lt;/a&gt; method and then subsequent &lt;code&gt;vault kv get&lt;/code&gt; commands for each secret.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Recursive retrieval&lt;/code&gt;: If multiple secrets are being retrieved, should any sub-folders also be enumerated and retrieved? The default is: &lt;code&gt;False&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Field names&lt;/code&gt;: Choose specific fields to be retrieved from identified secrets. This is useful when you only want to retrieve specific fields from one or more secrets. You can optionally include a name for the output variable.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Print output variable names&lt;/code&gt;: Write out the Octopus output variable names to the task log. The default is: &lt;code&gt;False&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw1lpoenhe9w29nphwb8l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw1lpoenhe9w29nphwb8l.png" alt="Parameters for the retrieve KV v1 secrets step" width="800" height="919"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Using Retrieve KV (v1) secrets step &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;Key Value (v1) retrieve secrets&lt;/strong&gt; step is added to deployment and runbook processes in the &lt;a href="https://octopus.com/docs/projects/steps#adding-steps-to-your-deployment-processes" rel="noopener noreferrer"&gt;same way as other steps&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After you've added the step to your process, fill out the parameters in the step:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwcznwnzi3iemadzynnpc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwcznwnzi3iemadzynnpc.png" alt="Vault retrieve KV v1 secrets step used in a process" width="800" height="673"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note the use of the &lt;a href="https://octopus.com/docs/projects/variables/output-variables#sensitive-output-variables" rel="noopener noreferrer"&gt;sensitive output variable&lt;/a&gt; in the &lt;code&gt;Auth Token&lt;/code&gt; parameter. In this example, the value was created using the Unwrap SecretID and Login step template named &lt;code&gt;HashiCorp Vault - AppRole Unwrap Secret ID and Login&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After you've filled in the parameters, you can execute the step in a runbook or deployment process. On successful execution, any matching secrets will be stored as sensitive output variables. If you've configured your step to print the variable names, they'll appear in the task log:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frnlkhm9mnsnjmhgb52wi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frnlkhm9mnsnjmhgb52wi.png" alt="Vault retrieve KV v1 secrets step task log" width="800" height="301"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In subsequent steps, output variables created from matching secrets can be used in your deployment or runbook.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Remember to replace &lt;code&gt;HashiCorp Vault - Key Value (v1) retrieve secrets&lt;/code&gt; with the name of your step for any output variable names.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Retrieve KV (v2) secrets step &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://library.octopus.com/step-templates/337f1b67-cdb0-4f33-9e08-6bf804f672d2/actiontemplate-hashicorp-vault-key-value-(v2)-retrieve-secrets" rel="noopener noreferrer"&gt;HashiCorp Vault - Key Value (v2) retrieve secrets&lt;/a&gt; step template retrieves one or more secrets stored in a &lt;code&gt;v2&lt;/code&gt; Key-Value secrets engine.&lt;/p&gt;

&lt;p&gt;One of the key advantages of the &lt;code&gt;v2&lt;/code&gt; Key-Value secrets engine is its support for &lt;a href="https://learn.hashicorp.com/tutorials/vault/versioned-kv" rel="noopener noreferrer"&gt;versioned secrets&lt;/a&gt;. This is useful if you need to roll back secrets in the event of unintentional data loss.&lt;/p&gt;

&lt;p&gt;Retrieving a single secret requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The path to the secret,&lt;/li&gt;
&lt;li&gt;An authentication token with permission to access the secret.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Optionally&lt;/em&gt;, a list of field names to retrieve.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This step template offers advanced features:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Support for retrieving multiple secrets at once. This requires changing the &lt;strong&gt;Secrets retrieval method&lt;/strong&gt; parameter to &lt;code&gt;Multiple vault keys&lt;/code&gt;. It's also possible to recursively retrieve secrets. This is useful to retrieve all secrets for a given path.&lt;/li&gt;
&lt;li&gt;Support for retrieving a specific version of a secret. This is only supported when retrieving a single secret.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For each secret retrieved, a &lt;a href="https://octopus.com/docs/projects/variables/output-variables#sensitive-output-variables" rel="noopener noreferrer"&gt;sensitive output variable&lt;/a&gt; is created for use in subsequent steps. By default, only a count of the number of variables created will be shown in the task log. To see the names of the variables in the Task log, change the &lt;strong&gt;Print output variable names&lt;/strong&gt; parameter to &lt;code&gt;True&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Retrieve KV (v2) secrets parameters &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The step template uses the following parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Vault Server URL&lt;/code&gt;: The URL of the Vault instance you are connecting to, including the port (The default is &lt;code&gt;8200&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;API version&lt;/code&gt;: Choose the API version to use from a drop-down list. Currently, there is only one option: &lt;code&gt;v1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Auth Token&lt;/code&gt;: The &lt;a href="https://www.vaultproject.io/docs/auth/token" rel="noopener noreferrer"&gt;token&lt;/a&gt; used to authenticate to retrieve secrets.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Secrets Path&lt;/code&gt;: The full path to the secret(s) you want to retrieve. The value should include both the path
where the secrets engine is mounted, as well as the path to the secret itself.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Secrets retrieval method&lt;/code&gt;: Choose between retrieving a single secret or multiple secrets. Retrieving a single secret is the equivalent of a &lt;code&gt;vault kv get&lt;/code&gt; command using the &lt;a href="https://www.vaultproject.io/api-docs/secret/kv/kv-v1#read-secret" rel="noopener noreferrer"&gt;Get&lt;/a&gt; method. Retrieving multiple secrets is the equivalent of the combination of both a &lt;code&gt;vault kv list&lt;/code&gt; command using the &lt;a href="https://www.vaultproject.io/api-docs/secret/kv/kv-v2#list-secrets" rel="noopener noreferrer"&gt;List&lt;/a&gt; method and then subsequent &lt;code&gt;vault kv get&lt;/code&gt; commands for each secret.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Recursive retrieval&lt;/code&gt;: If multiple secrets are being retrieved, should any sub-folders also be enumerated and retrieved? The default is: &lt;code&gt;False&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Secret Version&lt;/code&gt;: &lt;em&gt;Optional&lt;/em&gt; When retrieving a single secret, choose the version of the secret to retrieve. For example, if you want version 2 of all field values in a secret, enter the value &lt;code&gt;2&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Field names&lt;/code&gt;: Choose specific fields to be retrieved from identified secrets. This is useful when you only want to retrieve specific fields from one or more secret(s). You can optionally include a name for the output variable.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Print output variable names&lt;/code&gt;: Write out the Octopus output variable names to the task log. The default is: &lt;code&gt;False&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fty3ju5sktzoxxa916u2o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fty3ju5sktzoxxa916u2o.png" alt="Parameters for the retrieve KV v2 secrets step" width="800" height="1066"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Using Retrieve KV (v2) secrets step &lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;Key Value (v2) retrieve secrets&lt;/strong&gt; step is added to deployment and runbook processes in the &lt;a href="https://octopus.com/docs/projects/steps#adding-steps-to-your-deployment-processes" rel="noopener noreferrer"&gt;same way as other steps&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After you've added the step to your process, fill out the parameters in the step:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvc8lnh0qcwc4ymk5nhru.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvc8lnh0qcwc4ymk5nhru.png" alt="Vault retrieve KV v2 secrets step used in a process" width="800" height="734"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note the use of the &lt;a href="https://octopus.com/docs/projects/variables/output-variables#sensitive-output-variables" rel="noopener noreferrer"&gt;sensitive output variable&lt;/a&gt; in the &lt;code&gt;Auth Token&lt;/code&gt; parameter. In this example, the value was created using the Unwrap SecretID and Login step template named &lt;code&gt;HashiCorp Vault - AppRole Unwrap Secret ID and Login&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After you've filled in the parameters, you can execute the step in a runbook or deployment process. On successful execution, any matching secrets will be stored as sensitive output variables. If you've configured your step to print the variable names, they'll appear in the task log:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7aly029aaj0anfp5cxql.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7aly029aaj0anfp5cxql.png" alt="Vault retrieve KV v2 secrets step task log" width="800" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In subsequent steps, the output variables created from matching secrets can be used in your deployment or runbook.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Remember to replace &lt;code&gt;HashiCorp Vault - Key Value (v2) retrieve secrets&lt;/code&gt; with the name of your step for any output variable names.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Conclusion &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;The templates covered in this post show how it's possible to extend the functionality of Octopus and retrieve secrets from Vault, or any other secrets manager, and use them in your deployments or runbooks.&lt;/p&gt;

&lt;p&gt;Happy deployments!&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn more &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;For further information, you can read:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;a href="https://learn.hashicorp.com/tutorials/vault/approle" rel="noopener noreferrer"&gt;AppRole Pull Authentication&lt;/a&gt; tutorial showing how to retrieve SecretIDs securely.&lt;/li&gt;
&lt;li&gt;HashiCorp Vault documentation for the &lt;a href="https://www.vaultproject.io/docs/secrets/kv/kv-v1" rel="noopener noreferrer"&gt;K/V v1 Secrets Engine&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;HashiCorp Vault documentation for the &lt;a href="https://www.vaultproject.io/docs/secrets/kv/kv-v2" rel="noopener noreferrer"&gt;K/V v2 Secrets Engine&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;This post was originally published at &lt;a href="https://octopus.com/blog/using-hashicorp-vault-with-octopus-deploy" rel="noopener noreferrer"&gt;octopus.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>octopus</category>
      <category>deployment</category>
      <category>security</category>
      <category>vault</category>
    </item>
    <item>
      <title>Ask Octopus - How do I set the master key for my Octopus container?</title>
      <dc:creator>Ryan Rousseau</dc:creator>
      <pubDate>Fri, 22 Jan 2021 17:27:05 +0000</pubDate>
      <link>https://dev.to/octopus/ask-octopus-how-do-i-set-the-master-key-for-my-octopus-container-11ip</link>
      <guid>https://dev.to/octopus/ask-octopus-how-do-i-set-the-master-key-for-my-octopus-container-11ip</guid>
      <description>&lt;p&gt;You have Octopus running in a container. Now you need to upgrade or recreate the container. How do you reconnect to the existing database? Find out in this Ask Octopus!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/CXRvPtRf92s"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Other resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://help.octopus.com/t/how-do-i-set-the-master-key-in-for-octopus-running-in-a-container/26134" rel="noopener noreferrer"&gt;https://help.octopus.com/t/how-do-i-set-the-master-key-in-for-octopus-running-in-a-container/26134&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do you have a question about how to use Octopus? Email &lt;a href="mailto:advice@octopus.com"&gt;advice@octopus.com&lt;/a&gt; and someone from our team will get you an answer. You might even see it in a future episode.&lt;/p&gt;

&lt;p&gt;Join our community slack at &lt;a href="https://octopus.com/slack" rel="noopener noreferrer"&gt;https://octopus.com/slack&lt;/a&gt;&lt;/p&gt;

</description>
      <category>octopus</category>
      <category>devops</category>
      <category>docker</category>
    </item>
    <item>
      <title>Ask Octopus - Can I host the Octopus Server in Docker?</title>
      <dc:creator>Ryan Rousseau</dc:creator>
      <pubDate>Mon, 07 Dec 2020 19:12:05 +0000</pubDate>
      <link>https://dev.to/octopus/ask-octopus-can-i-host-the-octopus-server-in-docker-42ne</link>
      <guid>https://dev.to/octopus/ask-octopus-can-i-host-the-octopus-server-in-docker-42ne</guid>
      <description>&lt;p&gt;One of our recent frequently asked questions has been about hosting an Octopus Server in Docker? Can you do it? What do you need to know? Find out in this Ask Octopus!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/3KplO0-VSEA"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Other resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://octopus.com/docs/installation/octopus-in-container" rel="noopener noreferrer"&gt;https://octopus.com/docs/installation/octopus-in-container&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do you have a question about how to use Octopus? Email &lt;a href="mailto:advice@octopus.com"&gt;advice@octopus.com&lt;/a&gt; and someone from our team will get you an answer. You might even see it in a future episode.&lt;/p&gt;

&lt;p&gt;Join our community slack at &lt;a href="https://octopus.com/slack" rel="noopener noreferrer"&gt;https://octopus.com/slack&lt;/a&gt;&lt;/p&gt;

</description>
      <category>octopus</category>
      <category>devops</category>
      <category>docker</category>
    </item>
    <item>
      <title>Ask Octopus - How can I set up Disaster Recovery?</title>
      <dc:creator>Ryan Rousseau</dc:creator>
      <pubDate>Tue, 01 Dec 2020 14:38:03 +0000</pubDate>
      <link>https://dev.to/octopus/ask-octopus-how-can-i-set-up-disaster-recovery-2dc0</link>
      <guid>https://dev.to/octopus/ask-octopus-how-can-i-set-up-disaster-recovery-2dc0</guid>
      <description>&lt;p&gt;Wondering what your Disaster Recovery options are for your Octopus Server? Find out in this Ask Octopus!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/xB9pHH_SPBo"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Other resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://help.octopus.com/t/how-do-i-set-up-octopus-deploy-for-disaster-recovery/24081/2" rel="noopener noreferrer"&gt;https://help.octopus.com/t/how-do-i-set-up-octopus-deploy-for-disaster-recovery/24081/2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do you have a question about how to use Octopus? Email &lt;a href="mailto:advice@octopus.com"&gt;advice@octopus.com&lt;/a&gt; and someone from our team will get you an answer. You might even see it in a future episode.&lt;/p&gt;

&lt;p&gt;Join our community slack at &lt;a href="https://octopus.com/slack" rel="noopener noreferrer"&gt;https://octopus.com/slack&lt;/a&gt;&lt;/p&gt;

</description>
      <category>octopus</category>
      <category>devops</category>
    </item>
    <item>
      <title>Ask Octopus - Can I turn off health checks?</title>
      <dc:creator>Ryan Rousseau</dc:creator>
      <pubDate>Mon, 23 Nov 2020 19:20:15 +0000</pubDate>
      <link>https://dev.to/octopus/ask-octopus-can-i-turn-off-health-checks-1ik9</link>
      <guid>https://dev.to/octopus/ask-octopus-can-i-turn-off-health-checks-1ik9</guid>
      <description>&lt;p&gt;You don't need health checks to run very often or at all. Can you disable them completely? Find out in this Ask Octopus!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/OT2vfS-1qC4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Other resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://help.octopus.com/t/can-i-turn-off-health-checks/25996"&gt;https://help.octopus.com/t/can-i-turn-off-health-checks/25996&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://octopus.com/docs/infrastructure/deployment-targets/machine-policies"&gt;https://octopus.com/docs/infrastructure/deployment-targets/machine-policies&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do you have a question about how to use Octopus? Email &lt;a href="mailto:advice@octopus.com"&gt;advice@octopus.com&lt;/a&gt; and someone from our team will get you an answer. You might even see it in a future episode.&lt;/p&gt;

&lt;p&gt;Join our community slack at &lt;a href="https://octopus.com/slack"&gt;https://octopus.com/slack&lt;/a&gt;&lt;/p&gt;

</description>
      <category>octopus</category>
      <category>devops</category>
    </item>
    <item>
      <title>Ask Octopus - Can I have a test Octopus Server?</title>
      <dc:creator>Ryan Rousseau</dc:creator>
      <pubDate>Fri, 13 Nov 2020 18:44:21 +0000</pubDate>
      <link>https://dev.to/octopus/ask-octopus-can-i-deploy-database-changes-4k96</link>
      <guid>https://dev.to/octopus/ask-octopus-can-i-deploy-database-changes-4k96</guid>
      <description>&lt;p&gt;You need another Octopus Server instance to test upgrades. Do you need another license? Find out in this Ask Octopus!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/95AfIABANZM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Other resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://help.octopus.com/t/can-i-have-multiple-octopus-servers-on-one-license/25961" rel="noopener noreferrer"&gt;https://help.octopus.com/t/can-i-have-multiple-octopus-servers-on-one-license/25961&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://octopus.com/pricing/faq#server-instances" rel="noopener noreferrer"&gt;https://octopus.com/pricing/faq#server-instances&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do you have a question about how to use Octopus? Email &lt;a href="mailto:advice@octopus.com"&gt;advice@octopus.com&lt;/a&gt; and someone from our team will get you an answer. You might even see it in a future episode.&lt;/p&gt;

&lt;p&gt;Join our community slack at &lt;a href="https://octopus.com/slack" rel="noopener noreferrer"&gt;https://octopus.com/slack&lt;/a&gt;&lt;/p&gt;

</description>
      <category>octopus</category>
      <category>devops</category>
    </item>
    <item>
      <title>Ask Octopus - Can I deploy database changes?</title>
      <dc:creator>Ryan Rousseau</dc:creator>
      <pubDate>Fri, 06 Nov 2020 17:35:43 +0000</pubDate>
      <link>https://dev.to/octopus/ask-octopus-can-i-deploy-database-changes-4pg8</link>
      <guid>https://dev.to/octopus/ask-octopus-can-i-deploy-database-changes-4pg8</guid>
      <description>&lt;p&gt;You're interested in automating your database deployments but not sure where to start? Check out the resources available in this Ask Octopus!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/chBGBfNd8X0"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Other resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://help.octopus.com/t/what-database-deployment-methods-technologies-does-octopus-support/25898"&gt;https://help.octopus.com/t/what-database-deployment-methods-technologies-does-octopus-support/25898&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://octopus.com/blog/search?q=database"&gt;https://octopus.com/blog/search?q=database&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do you have a question about how to use Octopus? Email &lt;a href="mailto:advice@octopus.com"&gt;advice@octopus.com&lt;/a&gt; and someone from our team will get you an answer. You might even see it in a future episode.&lt;/p&gt;

&lt;p&gt;Join our community slack at &lt;a href="https://octopus.com/slack"&gt;https://octopus.com/slack&lt;/a&gt;&lt;/p&gt;

</description>
      <category>octopus</category>
      <category>tutorial</category>
      <category>devops</category>
    </item>
    <item>
      <title>From Sysadmin to SRE</title>
      <dc:creator>Josh Duffney</dc:creator>
      <pubDate>Fri, 06 Nov 2020 14:07:32 +0000</pubDate>
      <link>https://dev.to/octopus/from-sysadmin-to-sre-132i</link>
      <guid>https://dev.to/octopus/from-sysadmin-to-sre-132i</guid>
      <description>&lt;p&gt;DevOps is everywhere! It’s used as hashtags, the name of products, and job titles. Digital Trends lists DevOps Engineer as the third-best tech job title for 2020. Indeed.com has over 4,000 job postings for the title DevOps engineer, and LinkedIn has over 3 times that number with more than 13,000 job postings. &lt;/p&gt;

&lt;p&gt;Needless to say, DevOps is hot!&lt;/p&gt;

&lt;p&gt;The job title Site Reliability Engineer(SRE) has emerged in recent years from Google. SRE isn’t yet as popular as its predecessor, but it is often used synonymously by recruiters. &lt;/p&gt;

&lt;p&gt;In this post, I share my thoughts on how somebody new to the industry can aspire to these roles.&lt;/p&gt;

&lt;p&gt;Looking at job postings will likely just confuse you. Everything from 10 years of C# experience to intimate knowledge of Active Directory domain trusts are listed in the job descriptions. With such a broad set of requirements, where do you even begin?&lt;/p&gt;

&lt;p&gt;Start by understanding that DevOps and SRE are advanced job roles. You can start a career in web development by applying for entry-level positions and system administration at the help desk. DevOps and SRE don’t yet have that entry position. Typically a DevOps practitioner has already spent a few years working in technology. This is because DevOps and SRE roles require an understanding of development and infrastructure. It’s difficult to learn both disciplines at once, which is why most practitioners have an existing background in one or the other.&lt;/p&gt;

&lt;p&gt;I started my career on the help desk. Moved up to a system administrator and eventually landed a gig as a senior systems engineer. When I first started hearing about DevOps through Twitter, blog posts, and conference talks, I thought it was reserved for startups. So I ignored it until my passion for automation brought me to the DevOps practice of Infrastructure as Code. It was episode 275 of the PowerScripting podcast with guest Steve Murawski where I first heard about DSC (Desired State Configuration). Infrastructure as Code was the single idea that pulled me into the world of DevOps. It’s the portal sysadmins of all operating system variants can use to transition into DevOps.&lt;/p&gt;

&lt;h2&gt;
  
  
  It isn’t about tools, but...
&lt;/h2&gt;

&lt;p&gt;DevOps isn’t about tools! This is practically shouted at conferences by people seemingly wearing Braveheart face paint and drumming battle drums. They’re arguably correct in their assertion. But the tools you use shape the language you use and determine how you interact with other people to do your job. You literally live in the tools you use. Whether that’s email, slack, or like most developers, Git. &lt;/p&gt;

&lt;p&gt;In a traditional company, you’ll find developers using one set of tooling and sysadmins using another. This only reinforces the silos. &lt;/p&gt;

&lt;p&gt;If you ever hope to break down those silos you need to do more than change titles, form joint distribution groups, and tell people to work together. You need to give each team opportunities to interact. This happens naturally and organically if the tools they use to do their jobs overlap. &lt;/p&gt;

&lt;p&gt;Sharing tools creates a shared language. This isn’t senior leadership advice, this applies to individual contributors. If you’re a sysadmin looking to move into a DevOps role this applies to you. DevOps isn’t about tools, but tools are a good place to start.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn to code from the command-line
&lt;/h2&gt;

&lt;p&gt;Automation is the starting point. It is the starting point because it gets you writing code. If you look over the technologies listed in DevOps Engineer job postings, you’ll notice a trend. All of them mention some form of coding. This does not mean you need to attend a coding Bootcamp, learn Java or C#. Any scripting or programming language will suffice. What’s important is that you pick a language that’s practical for you to apply to your job. If you work on Linux, Bash and Python are a natural fit. If you work on Windows, PowerShell is the way to go.&lt;/p&gt;

&lt;p&gt;Starting to learn a coding language is easy. There’s an endless number of blog posts, YouTube videos, books, and Pluralsight courses for you to consume. &lt;/p&gt;

&lt;p&gt;What’s difficult is figuring out how to apply it at work. I suggest you start by automating things that suck. Find routine and mundane tasks and work to automate those. The scripting or programming language you choose to learn will become the hammer in your toolbox. As with any tool collection, a hammer is just the beginning. You’ll need to add other tools. Within the context of infrastructure automation, those tools go by the names of Ansible, Chef, Puppet, Terraform, Azure Resource Manager Templates, and Cloudformation. These tools are valuable because they abstract. Leaving you with less code to write and a better framework for managing your infrastructure. If Infrastructure as Code is the portal, automation is how you open it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start at the source
&lt;/h2&gt;

&lt;p&gt;Long gone are the days of relying on shell history and file shares to store your code. You need something better. You need source control. Source control is a broad topic that has entire books dedicated to it. The good news is that you don’t need to understand it in depth. You just need enough information to become competent. Learning just a few commands is all you need to hit the ground running.&lt;/p&gt;

&lt;p&gt;Git is by far the most popular source control system. And GitHub is by far the most popular hosted Git provider. Creating an account on GitHub and uploading your code there is a great place to start. GitHub allows you to create public and private repositories. If you choose to upload to a public repository, make sure your code is sanitized and can be open sourced. &lt;/p&gt;

&lt;p&gt;Creating public repositories also serves as public artifacts of your work. You can use them to demonstrate your skills and knowledge, and you can also use them as a reference. Not everything you learn will stay in your head, but by using Git it will be logged in your commit history.&lt;/p&gt;

&lt;p&gt;Learning Git will take some effort, but once you learn how to use it, you won’t go back. In fact, if you start using Git outside of work, you won’t want to work without it. Chances are someone within your organization is using Git or another source control system. Ask around and find out how you can gain access to the source control system, then create a repository for your team and help onboard them. Onboarding your team will be more difficult than getting your boss on board. There will be a learning curve for your team, but your manager will agree after you say the word &lt;em&gt;audit&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;All the advantages of Git are not immediately apparent. Focus on the value it adds upfront vs. in the future. That immediate value is auditable code through a commit history, increased collaboration, and easier management than a file share. Most importantly though, source control unlocks everything else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pull requests mean deployments
&lt;/h2&gt;

&lt;p&gt;Tooling that was traditionally administered by release engineers has become table stakes for anyone writing code. &lt;/p&gt;

&lt;p&gt;Yes, scripts are code too. &lt;/p&gt;

&lt;p&gt;Release engineering is a sub-discipline of software engineering which focuses on the compilation, assembly, and delivery of source code. There is a lot you don’t need to know about release engineering, but two types of tools exist that you won’t want to live without; continuous integration and continuous delivery collectively known as CI/CD.&lt;/p&gt;

&lt;p&gt;TeamCity, Octopus Deploy, Jenkins, Azure DevOps, and GitHub Actions are all tools that live in this space. Focusing on tools is going to confuse you because each of these tools contain features that allow you to build CI/CD systems. But, continuous integration and continuous delivery are actually software engineering practices. &lt;/p&gt;

&lt;p&gt;To simplify, think of continuous integration as automating the build phase of software, and continuous delivery as automating the release and deployment of that software. Continuous integration, continuous delivery, and source control combine to make a release pipeline. A release pipeline is a conceptual process that takes your code from source to production for you. It is through source control and CI/CD that you can get out of the business of clicking buttons.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: You’ve automated the deployment, provisioning, and configuration of new infrastructure, and all the infrastructure code is stored in source control. You are at the point where you can scale the infrastructure up and down using this automation. However, it has become difficult to identify which version of the code was last deployed, deployments are done manually at the command-line, and typos frequently make it into the codebase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Build a release pipeline for infrastructure code. Automate all the steps you take to deploy the infrastructure code by making it programmatic and non-interactive. Then you can start to build out the release pipeline. Starting with source control, the release pipeline will be triggered by commits and or pull requests. Next, in the build stage lint your code to reduce typos and control code quality. After your code passes the lint and other testing you deploy it in the release stage, which deploys the infrastructure code. Implementing a release pipeline frees you from the manual deployment of automation. It’s automating the automation in a sense. The goal is always to click fewer buttons.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Everything points back to automation, it’s what makes all of this possible. Without automation the portal would not open. Entering the portal, source control is your stronghold. With a stronghold in place, release pipelines carry you through the fog into the uncharted territory of the developer. Learning the technology and practices listed in this article will open many possible paths on your DevOps skill tree. Where you go next, will be up to you. &lt;/p&gt;

&lt;p&gt;Resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://download.microsoft.com/download/C/4/A/C4A14099-FEA4-4CB3-8A8F-A0C2BE5A1219/The%20Release%20Pipeline%20Model.pdf" rel="noopener noreferrer"&gt;Microsoft release pipeline model operations manual&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://channel9.msdn.com/Events/WinOps/WinOps-Conf-2016/The-Release-Pipeline-Model" rel="noopener noreferrer"&gt;The release pipeline model presentation from WinOps Conf 2016&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=ccEO5buASv8" rel="noopener noreferrer"&gt;The build release pipeline Model for mere mortals presentation from PowerShell + DevOps Global Summit 2018&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://crate.io/a/infrastructure-as-code-part-one/" rel="noopener noreferrer"&gt;Crate.io - Infrastructure as Code, Part One&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://crate.io/a/infrastructure-as-code-part-two-a-closer-look-at-terraform/" rel="noopener noreferrer"&gt;Crate.io - Infrastructure as Code, Part Two: A Closer Look at Terraform&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Josh Duffney is a Site Reliability Engineer. He &lt;a href="https://duffney.io/posts/" rel="noopener noreferrer"&gt;writes&lt;/a&gt;, presents, &lt;a href="https://app.pluralsight.com/profile/author/josh-duffney" rel="noopener noreferrer"&gt;teaches&lt;/a&gt;, and &lt;a href="https://twitter.com/joshduffney" rel="noopener noreferrer"&gt;tweets&lt;/a&gt; about Automation, DevOps, Cloud, and optimizing output while minimizing input.&lt;/p&gt;

</description>
      <category>career</category>
      <category>devops</category>
      <category>sre</category>
    </item>
    <item>
      <title>Ask Octopus - How do I ignore messages written to stderr?</title>
      <dc:creator>Ryan Rousseau</dc:creator>
      <pubDate>Fri, 30 Oct 2020 17:16:51 +0000</pubDate>
      <link>https://dev.to/octopus/ask-octopus-how-do-i-ignore-messages-written-to-stderr-47pj</link>
      <guid>https://dev.to/octopus/ask-octopus-how-do-i-ignore-messages-written-to-stderr-47pj</guid>
      <description>&lt;p&gt;A tool that you're using in your deployments is writing informational logs to stderr, but you don't want the messages to show up as errors. What do you do? Find out in this Ask Octopus!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/chBGBfNd8X0"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Do you have a question about how to use Octopus? Email &lt;a href="mailto:advice@octopus.com"&gt;advice@octopus.com&lt;/a&gt; and someone from our team will get you an answer. You might even see it in a future episode.&lt;/p&gt;

&lt;p&gt;Join our community slack at &lt;a href="https://octopus.com/slack"&gt;https://octopus.com/slack&lt;/a&gt;&lt;/p&gt;

</description>
      <category>octopus</category>
      <category>tutorial</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
