diff options
Diffstat (limited to 'distro/common/html/knife_environment.html')
-rw-r--r-- | distro/common/html/knife_environment.html | 486 |
1 files changed, 486 insertions, 0 deletions
diff --git a/distro/common/html/knife_environment.html b/distro/common/html/knife_environment.html new file mode 100644 index 0000000000..6e548a4ddb --- /dev/null +++ b/distro/common/html/knife_environment.html @@ -0,0 +1,486 @@ + + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>knife environment — Knife Man Pages</title> + + <link rel="stylesheet" href="_static/chef.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <link rel="shortcut icon" href="_static/chef.ico"/> + <link rel="top" title="Knife Man Pages" href="index.html" /> + </head> + <body> +<div style="background-color: #212c35; text-align: left; padding: 0px 0px 0px 0px"> +<a href="http://docs.opscode.com/"><img src="_static/chef_html_logo.png" border="0" alt="Chef"/></a> +</div> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li><a href="http://docs.opscode.com/chef/knife.html" target="_products">Knife</a>•</li> + <li><a href="http://docs.opscode.com/chef/resources.html" target="_products">Resources</a>•</li> + <li><a href="http://docs.opscode.com/chef/dsl_recipe.html" target="_products">Recipe DSL</a>•</li> + <li><a href="http://docs.opscode.com/chef/lwrps_custom.html" target="_products">LWRPs</a>•</li> + <li><a href="http://docs.opscode.com/search.html">Search the Docs</a>•</li> + <li><a href="http://docs.opscode.com/">Home</a> »</li> + + </ul> + </div> + + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <p class="logo"><a href="knife.html"> + <img class="logo" src="_static/chef_logo.png" alt="Logo"/> + </a></p> + <h3><a href="knife.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">knife environment</a><ul> +<li><a class="reference internal" href="#compare">compare</a></li> +<li><a class="reference internal" href="#create">create</a><ul> +<li><a class="reference internal" href="#syntax">Syntax</a></li> +<li><a class="reference internal" href="#options">Options</a><ul> +<li><a class="reference internal" href="#knife-rb-settings">knife.rb Settings</a></li> +</ul> +</li> +<li><a class="reference internal" href="#examples">Examples</a></li> +</ul> +</li> +<li><a class="reference internal" href="#delete">delete</a><ul> +<li><a class="reference internal" href="#id1">Syntax</a></li> +<li><a class="reference internal" href="#id2">Options</a></li> +<li><a class="reference internal" href="#id3">Examples</a></li> +</ul> +</li> +<li><a class="reference internal" href="#edit">edit</a><ul> +<li><a class="reference internal" href="#id4">Syntax</a></li> +<li><a class="reference internal" href="#id5">Options</a></li> +<li><a class="reference internal" href="#id6">Examples</a></li> +</ul> +</li> +<li><a class="reference internal" href="#from-file">from file</a><ul> +<li><a class="reference internal" href="#id7">Syntax</a></li> +<li><a class="reference internal" href="#id8">Options</a><ul> +<li><a class="reference internal" href="#id9">knife.rb Settings</a></li> +</ul> +</li> +<li><a class="reference internal" href="#id10">Examples</a></li> +</ul> +</li> +<li><a class="reference internal" href="#list">list</a><ul> +<li><a class="reference internal" href="#id11">Syntax</a></li> +<li><a class="reference internal" href="#id12">Options</a></li> +<li><a class="reference internal" href="#id13">Examples</a></li> +</ul> +</li> +<li><a class="reference internal" href="#show">show</a><ul> +<li><a class="reference internal" href="#id14">Syntax</a></li> +<li><a class="reference internal" href="#id15">Options</a></li> +<li><a class="reference internal" href="#id16">Examples</a></li> +</ul> +</li> +</ul> +</li> +</ul> + + </div> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="knife-environment"> +<h1>knife environment<a class="headerlink" href="#knife-environment" title="Permalink to this headline">¶</a></h1> +<p>An environment is a way to map an organization’s real-life workflow to what can be configured and managed when using server. Every organization begins with a single environment called the <tt class="docutils literal"><span class="pre">_default</span></tt> environment, which cannot be modified (or deleted). Additional environments can be created to reflect each organization’s patterns and workflow. For example, creating <tt class="docutils literal"><span class="pre">production</span></tt>, <tt class="docutils literal"><span class="pre">staging</span></tt>, <tt class="docutils literal"><span class="pre">testing</span></tt>, and <tt class="docutils literal"><span class="pre">development</span></tt> environments. Generally, an environment is also associated with one (or more) cookbook versions.</p> +<p>The <strong>knife environment</strong> subcommand is used to manage environments within a single organization on the server.</p> +<div class="admonition note"> +<p class="first admonition-title">Note</p> +<p class="last">Review the list of <a class="reference internal" href="knife_common_options.html"><em>common options</em></a> available to this (and all) Knife subcommands and plugins.</p> +</div> +<div class="section" id="compare"> +<h2>compare<a class="headerlink" href="#compare" title="Permalink to this headline">¶</a></h2> +<p>The <tt class="docutils literal"><span class="pre">compare</span></tt> argument is used to compare the cookbook version constraints that are set on one (or more) environments.</p> +<p><strong>Syntax</strong></p> +<p>This argument has the following syntax:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment compare <span class="o">[</span>ENVIRONMENT_NAME...<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span> +</pre></div> +</div> +<p><strong>Options</strong></p> +<p>This argument has the following options:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">-a</span></tt>, <tt class="docutils literal"><span class="pre">--all</span></tt></dt> +<dd>Indicates that all environments found at the specified path will be uploaded.</dd> +<dt><tt class="docutils literal"><span class="pre">-m</span></tt>, <tt class="docutils literal"><span class="pre">--mismatch</span></tt></dt> +<dd>Use to show only matching versions.</dd> +</dl> +<p><strong>Example</strong></p> +<p>To compare cookbook versions for a single environment:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment compare development +</pre></div> +</div> +<p>to return something similar to:</p> +<div class="highlight-bash"><div class="highlight"><pre> development +apache 2.3.1 +windows 4.1.2 +</pre></div> +</div> +<p>To compare cookbook versions for multiple environments:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment compare development staging +</pre></div> +</div> +<p>to return something similar to:</p> +<div class="highlight-bash"><div class="highlight"><pre> development staging +apache 2.3.1 1.2.2 +windows 4.1.2 1.0.0 +postgresql 1.0.0 1.0.0 +</pre></div> +</div> +<p>To compare all cookbook versions for all environments:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment compare --all +</pre></div> +</div> +<p>to return something similar to:</p> +<div class="highlight-bash"><div class="highlight"><pre> staging development +<span class="nb">ulimit </span>latest latest +redisio latest latest +journly latest latest +aws latest latest +<span class="nb">test </span>latest latest +unicorn latest latest +sensu latest latest +runit latest latest +templater latest latest +powershell latest latest +openssl latest latest +rbenv latest latest +rabbitmq latest latest +postgresql latest latest +mysql latest latest +ohai latest latest +git latest latest +erlang latest latest +ssh_known_hosts latest latest +nginx latest latest +database latest latest +yum latest latest +xfs latest latest +apt latest latest +dmg latest latest +chef_handler latest latest +windows 1.0.0 4.1.2 +</pre></div> +</div> +</div> +<div class="section" id="create"> +<h2>create<a class="headerlink" href="#create" title="Permalink to this headline">¶</a></h2> +<p>The <tt class="docutils literal"><span class="pre">create</span></tt> argument is used to add an environment object to the server. When this argument is run, Knife will open $EDITOR to enable editing of the <tt class="docutils literal"><span class="pre">ENVIRONMENT</span></tt> description field (unless a description is specified as part of the command). When finished, Knife will add the environment to the server.</p> +<div class="section" id="syntax"> +<h3>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h3> +<p>This argument has the following syntax:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment create ENVIRONMENT_NAME -d DESCRIPTION +</pre></div> +</div> +</div> +<div class="section" id="options"> +<h3>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h3> +<p>This argument has the following options:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">-d</span> <span class="pre">DESCRIPTION</span></tt>, <tt class="docutils literal"><span class="pre">--description</span> <span class="pre">DESCRIPTION</span></tt></dt> +<dd>The description of the environment. This value will populate the description field for the environment on the server.</dd> +</dl> +<div class="section" id="knife-rb-settings"> +<h4>knife.rb Settings<a class="headerlink" href="#knife-rb-settings" title="Permalink to this headline">¶</a></h4> +<div class="admonition note"> +<p class="first admonition-title">Note</p> +<p class="last">See <tt class="xref doc docutils literal"><span class="pre">knife.rb</span></tt> for more information about how to add optional settings to the knife.rb file.</p> +</div> +<p>The following <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">environment</span> <span class="pre">create</span></tt> settings can be added to the knife.rb file:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">knife[:description]</span></tt></dt> +<dd>Use to add the <tt class="docutils literal"><span class="pre">--description</span></tt> option.</dd> +</dl> +</div> +</div> +<div class="section" id="examples"> +<h3>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h3> +<p>The following examples show how to use this Knife subcommand:</p> +<p><strong>Create an environment</strong></p> +<p>To create an environment named “dev” with a description of “The development environment.”:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment create dev -d <span class="s2">"The development environment."</span> +</pre></div> +</div> +</div> +</div> +<div class="section" id="delete"> +<h2>delete<a class="headerlink" href="#delete" title="Permalink to this headline">¶</a></h2> +<p>The <tt class="docutils literal"><span class="pre">delete</span></tt> argument is used to delete an environment from a server.</p> +<div class="section" id="id1"> +<h3>Syntax<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3> +<p>This argument has the following syntax:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment delete ENVIRONMENT_NAME +</pre></div> +</div> +</div> +<div class="section" id="id2"> +<h3>Options<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3> +<p>This command does not have any specific options.</p> +</div> +<div class="section" id="id3"> +<h3>Examples<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3> +<p>The following examples show how to use this Knife subcommand:</p> +<p><strong>Delete an environment</strong></p> +<p>To delete an environment named “dev”, enter:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment delete dev +</pre></div> +</div> +<p>Type <tt class="docutils literal"><span class="pre">Y</span></tt> to confirm a deletion.</p> +</div> +</div> +<div class="section" id="edit"> +<h2>edit<a class="headerlink" href="#edit" title="Permalink to this headline">¶</a></h2> +<p>The <tt class="docutils literal"><span class="pre">edit</span></tt> argument is used to edit the attributes of an environment. When this argument is run, Knife will open $EDITOR to enable editing of <tt class="docutils literal"><span class="pre">ENVIRONMENT</span></tt> attributes. When finished, Knife will update the server with those changes.</p> +<div class="section" id="id4"> +<h3>Syntax<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3> +<p>This argument has the following syntax:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment edit ENVIRONMENT_NAME +</pre></div> +</div> +</div> +<div class="section" id="id5"> +<h3>Options<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3> +<p>This command does not have any specific options.</p> +</div> +<div class="section" id="id6"> +<h3>Examples<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3> +<p>The following examples show how to use this Knife subcommand:</p> +<p><strong>Edit an environment</strong></p> +<p>To edit an environment named “devops”, enter:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment edit devops +</pre></div> +</div> +</div> +</div> +<div class="section" id="from-file"> +<h2>from file<a class="headerlink" href="#from-file" title="Permalink to this headline">¶</a></h2> +<p>The <tt class="docutils literal"><span class="pre">from</span> <span class="pre">file</span></tt> argument is used to add or update an environment using a JSON or Ruby DSL description. It must be run with the <tt class="docutils literal"><span class="pre">create</span></tt> or <tt class="docutils literal"><span class="pre">edit</span></tt> arguments.</p> +<div class="section" id="id7"> +<h3>Syntax<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3> +<p>This argument has the following syntax:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment <span class="o">[</span>create | edit<span class="o">]</span> from file FILE <span class="o">(</span>options<span class="o">)</span> +</pre></div> +</div> +</div> +<div class="section" id="id8"> +<h3>Options<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3> +<p>This argument has the following options:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">-a</span></tt>, <tt class="docutils literal"><span class="pre">--all</span></tt></dt> +<dd>Indicates that all environments found at the specified path will be uploaded.</dd> +</dl> +<div class="section" id="id9"> +<h4>knife.rb Settings<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h4> +<div class="admonition note"> +<p class="first admonition-title">Note</p> +<p class="last">See <tt class="xref doc docutils literal"><span class="pre">knife.rb</span></tt> for more information about how to add optional settings to the knife.rb file.</p> +</div> +<p>The following <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">environment</span> <span class="pre">from</span> <span class="pre">file</span></tt> settings can be added to the knife.rb file:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">knife[:all]</span></tt></dt> +<dd>Use to add the <tt class="docutils literal"><span class="pre">--all</span></tt> option.</dd> +<dt><tt class="docutils literal"><span class="pre">knife[:print_after]</span></tt></dt> +<dd>Use to add the <tt class="docutils literal"><span class="pre">--print-after</span></tt> option.</dd> +</dl> +</div> +</div> +<div class="section" id="id10"> +<h3>Examples<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3> +<p>The following examples show how to use this Knife subcommand:</p> +<p><strong>Create an environment from a JSON file</strong></p> +<p>To add an environment using data contained in a JSON file:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment create devops from file <span class="s2">"path to JSON file"</span> +</pre></div> +</div> +<p>or:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment edit devops from file <span class="s2">"path to JSON file"</span> +</pre></div> +</div> +</div> +</div> +<div class="section" id="list"> +<h2>list<a class="headerlink" href="#list" title="Permalink to this headline">¶</a></h2> +<p>The <tt class="docutils literal"><span class="pre">list</span></tt> argument is used to list all of the environments that are currently available on the server.</p> +<div class="section" id="id11"> +<h3>Syntax<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3> +<p>This argument has the following syntax:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment list -w +</pre></div> +</div> +</div> +<div class="section" id="id12"> +<h3>Options<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3> +<p>This argument has the following options:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">-w</span></tt>, <tt class="docutils literal"><span class="pre">--with-uri</span></tt></dt> +<dd>Indicates that the corresponding URIs will be shown.</dd> +</dl> +</div> +<div class="section" id="id13"> +<h3>Examples<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3> +<p>The following examples show how to use this Knife subcommand:</p> +<p><strong>View a list of environments</strong></p> +<p>To view a list of environments:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment list -w +</pre></div> +</div> +</div> +</div> +<div class="section" id="show"> +<h2>show<a class="headerlink" href="#show" title="Permalink to this headline">¶</a></h2> +<p>The <tt class="docutils literal"><span class="pre">show</span></tt> argument is used to display information about the specified environment.</p> +<div class="section" id="id14"> +<h3>Syntax<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3> +<p>This argument has the following syntax:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment show ENVIRONMENT_NAME +</pre></div> +</div> +</div> +<div class="section" id="id15"> +<h3>Options<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3> +<p>This argument has the following options:</p> +<dl class="docutils"> +<dt><tt class="docutils literal"><span class="pre">-a</span> <span class="pre">ATTR</span></tt>, <tt class="docutils literal"><span class="pre">--attribute</span> <span class="pre">ATTR</span></tt></dt> +<dd>The attribute (or attributes) to show.</dd> +</dl> +</div> +<div class="section" id="id16"> +<h3>Examples<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h3> +<p>The following examples show how to use this Knife subcommand:</p> +<p><strong>Show environments</strong></p> +<p>To view information about the “dev” environment enter:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife environment show dev +</pre></div> +</div> +<p>to return:</p> +<div class="highlight-bash"><div class="highlight"><pre>% knife environment show dev +chef_type: environment +cookbook_versions: +default_attributes: +description: +json_class: Chef::Environment +name: dev +override_attributes: + +<span class="se">\\</span> +<span class="se">\\</span> +<span class="se">\\</span> +<span class="se">\\</span> +</pre></div> +</div> +<p><strong>Show environments as JSON</strong></p> +<p>To view information in JSON format, use the <tt class="docutils literal"><span class="pre">-F</span></tt> common option as part of the command like this:</p> +<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife role show devops -F json +</pre></div> +</div> +<p>Other formats available include <tt class="docutils literal"><span class="pre">text</span></tt>, <tt class="docutils literal"><span class="pre">yaml</span></tt>, and <tt class="docutils literal"><span class="pre">pp</span></tt>.</p> +</div> +</div> +</div> + + + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li><a href="http://docs.opscode.com/chef/knife.html" target="_products">Knife</a>•</li> + <li><a href="http://docs.opscode.com/chef/resources.html" target="_products">Resources</a>•</li> + <li><a href="http://docs.opscode.com/chef/dsl_recipe.html" target="_products">Recipe DSL</a>•</li> + <li><a href="http://docs.opscode.com/chef/lwrps_custom.html" target="_products">LWRPs</a>•</li> + <li><a href="http://docs.opscode.com/search.html">Search the Docs</a>•</li> + <li><a href="http://docs.opscode.com/">Home</a> »</li> + + </ul> + </div> + + + <div class="footer"> + Documentation for current man pages for Knife. + + Send feedback to <a href="mailto:docs@getchef.com">docs@getchef.com</a>. + This work is licensed under a Creative Commons Attribution 3.0 Unported License. + + </div> + +<!-- Start of Async Google Analytics Code --> +<script type="text/javascript"> +var _gaq = _gaq || []; +var pluginUrl = (('https:' == document.location.protocol) ? 'https://ssl.' : 'http://www.') + 'google-analytics.com/plugins/ga/inpage_linkid.js'; +_gaq.push(['_setAccount', 'UA-6369228-7']); +_gaq.push(['_setDomainName', '.opscode.com']); +_gaq.push(['_setAllowHash', false]); +_gaq.push(['_setAllowLinker', true]); +_gaq.push(['_addIgnoredRef','opscode.com']); +_gaq.push(['_trackPageview']); + +(function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; + ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; + s.parentNode.insertBefore(ga, s); })(); +</script> +<!-- End of Async Google Analytics Code --> + + + +<!-- Start of Contact Analytics Code --> +<script type="text/javascript"> +(function() { + var didInit = false; + function initMunchkin() { + if(didInit === false) { + didInit = true; + Munchkin.init('255-VFB-268'); + } + } + var s = document.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = document.location.protocol + '//munchkin.marketo.net/munchkin.js'; + s.onreadystatechange = function() { + if (this.readyState == 'complete' || this.readyState == 'loaded') { + initMunchkin(); + } + }; + s.onload = initMunchkin; + document.getElementsByTagName('head')[0].appendChild(s); +})(); +</script> +<!-- End of Contact Analytics Code --> + + + </body> +</html>
\ No newline at end of file |