|
| 1 | +<!doctype html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + |
| 5 | + <meta charset="utf-8"> |
| 6 | + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| 7 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 8 | + <meta name="description" content="SoftLayer API Examples, implementations, and release notes."> |
| 9 | + <meta name="author" content="SoftLayer"> |
| 10 | + |
| 11 | + <title>SoftLayer Knife - https://softlayer.github.io/</title> |
| 12 | + <link rel="canonical" href="https://softlayer.github.io/tools/knife-softlayer/"> |
| 13 | + <link href="https://softlayer.github.io/css/main.css" rel="stylesheet"> |
| 14 | + <link href="https://softlayer.github.io/css/bootstrap.css" rel="stylesheet"> |
| 15 | + <link href="https://softlayer.github.io/css/fa-svg-with-js.css" rel="stylesheet"> |
| 16 | + <link href="https://softlayer.github.io/css/custom.css" rel="stylesheet"> |
| 17 | + <link href="https://softlayer.github.io/css/highlight/solarized_dark.css" rel="stylesheet"> |
| 18 | + |
| 19 | + <script src="https://softlayer.github.io/js/highlight.pack.js"></script> |
| 20 | + |
| 21 | + <script>hljs.initHighlightingOnLoad();</script> |
| 22 | + <link rel="shortcut icon" href="https://softlayer.github.io/img/favicon.ico" type="image/x-icon" /> |
| 23 | + <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Lato" /> |
| 24 | + |
| 25 | + |
| 26 | + <script src="https://softlayer.github.io/js/jquery-3.3.1.min.js"></script> |
| 27 | + <script src="https://softlayer.github.io/js/sldn.js"></script> |
| 28 | + <script src="https://softlayer.github.io/js/fontawesome-all.js"></script> |
| 29 | + |
| 30 | + |
| 31 | + <script> |
| 32 | + $(document).ready(function() { |
| 33 | + $('table').addClass("table table-hover table-striped") |
| 34 | + }) |
| 35 | + </script> |
| 36 | + |
| 37 | +<script> |
| 38 | +(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| 39 | +(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| 40 | +m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| 41 | +})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
| 42 | + |
| 43 | +ga('create', 'UA-88235803-1', 'auto'); |
| 44 | +ga('send', 'pageview'); |
| 45 | +</script> |
| 46 | + |
| 47 | +</head> |
| 48 | + |
| 49 | +<body> |
| 50 | + <nav class="navbar navbar-default navbar-fixed-top" role="navigation"> |
| 51 | + <div class="container"> |
| 52 | + <div class="navbar-header"> |
| 53 | + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> |
| 54 | + <span class="sr-only">Toggle Navigation</span> |
| 55 | + <span class="icon-bar"></span> |
| 56 | + <span class="icon-bar"></span> |
| 57 | + <span class="icon-bar"></span> |
| 58 | + </button> |
| 59 | + <a class="navbar-brand" href="https://softlayer.github.io/">SoftLayer API</a> |
| 60 | + </div> |
| 61 | + <div class="collapse navbar-collapse navbar-ex1-collapse"> |
| 62 | + <ul class="nav navbar-nav"> |
| 63 | + |
| 64 | + <li><a href="https://softlayer.github.io/article/">Articles</a></li> |
| 65 | + |
| 66 | + <li><a href="https://softlayer.github.io/reference/softlayerapi">Documentation</a></li> |
| 67 | + |
| 68 | + <li><a href="https://softlayer.github.io/go/">Go</a></li> |
| 69 | + |
| 70 | + <li><a href="https://softlayer.github.io/php/">PHP</a></li> |
| 71 | + |
| 72 | + <li><a href="https://softlayer.github.io/perl/">Perl</a></li> |
| 73 | + |
| 74 | + <li><a href="https://softlayer.github.io/python/">Python</a></li> |
| 75 | + |
| 76 | + <li><a href="https://softlayer.github.io/rest/">Rest</a></li> |
| 77 | + |
| 78 | + <li><a href="https://softlayer.github.io/ruby/">Ruby</a></li> |
| 79 | + |
| 80 | + <li><a href="https://softlayer.github.io/tools/">Tools</a></li> |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + </ul> |
| 85 | + <div id="custom-search-input" class="pull-right"> |
| 86 | + <form class="navbar-form" role="search" method="get" action="https://www.bing.com/"> |
| 87 | + <div class="input-group col-md-12"> |
| 88 | + <input type="text" class="form-control input-md" placeholder="Search" name="q" id="srch-term"> |
| 89 | + <input type="hidden" name="q1" value="site:softlayer.github.io" /> |
| 90 | + <div class="input-group-btn"> |
| 91 | + <button class="btn btn-info" type="submit"> |
| 92 | + <i class="glyphicon glyphicon-search"></i> |
| 93 | + </button> |
| 94 | + </div> |
| 95 | + </div> |
| 96 | + </form> |
| 97 | + </div> |
| 98 | + </div> |
| 99 | + </div> |
| 100 | + </nav> |
| 101 | + |
| 102 | +<div class="container"> |
| 103 | + <div class="row"> |
| 104 | + <div class="col-md-12 "> |
| 105 | + <div class="well well-lg"> |
| 106 | + <h3>SoftLayer Knife<br> <small>A Chef Knife plugin for launching, bootstrapping, and managing compute instances in the IBM SoftLayer cloud.</small></h3> |
| 107 | + <hr> |
| 108 | + |
| 109 | + |
| 110 | +<h1 id="knife-softlayer-https-github-com-softlayer-knife-softlayer"><a href="https://github.com/softlayer/knife-softlayer">knife-softlayer</a></h1> |
| 111 | + |
| 112 | +<h2 id="configuration">Configuration</h2> |
| 113 | + |
| 114 | +<p>Add your SoftLayer username and API key to your <code>knife.rb</code> file.</p> |
| 115 | +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ruby" data-lang="ruby">log_level <span style="color:#e6db74">:info</span> |
| 116 | +log_location <span style="color:#66d9ef">STDOUT</span> |
| 117 | +node_name <span style="color:#e6db74">'node'</span> |
| 118 | +client_key <span style="color:#e6db74">'/path/to/key.pem'</span> |
| 119 | +validation_client_name <span style="color:#e6db74">'some-validator'</span> |
| 120 | +validation_key <span style="color:#e6db74">'/path/to/validator.pem'</span> |
| 121 | +chef_server_url <span style="color:#e6db74">'https://example.com/organizations/org'</span> |
| 122 | +syntax_check_cache_path <span style="color:#e6db74">'/path/to/syntax_check_cache'</span> |
| 123 | +knife<span style="color:#f92672">[</span><span style="color:#e6db74">:softlayer_username</span><span style="color:#f92672">]</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">"<SOFTLAYER USERNAME>"</span> |
| 124 | +knife<span style="color:#f92672">[</span><span style="color:#e6db74">:softlayer_api_key</span><span style="color:#f92672">]</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">"<SOFTLAYER API KEY>"</span></code></pre></div> |
| 125 | +<h2 id="usage">Usage</h2> |
| 126 | + |
| 127 | +<p>See <code>knife softlayer --help</code> for more information.</p> |
| 128 | + |
| 129 | +<p>EXAMPLES:</p> |
| 130 | +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#75715e"># look at some options |
| 131 | +</span><span style="color:#75715e"></span>user@local> knife softlayer flavor list <span style="color:#f92672">[</span>--all<span style="color:#f92672">]</span></code></pre></div><div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#75715e"># the minimum number of pieces of flare |
| 132 | +</span><span style="color:#75715e"></span>user@local> knife softlayer server create --hostname test --domain example.com --flavor tiny</code></pre></div> |
| 133 | +<p>```bash</p> |
| 134 | + |
| 135 | +<h1 id="being-sort-of-specific-about-things">being sort of specific about things</h1> |
| 136 | + |
| 137 | +<p>user@local> knife softlayer server create -H test -D example.com <br /> |
| 138 | +–block-storage 0:25,2:100,5:1000 \ # device:GB, device:GB, … |
| 139 | +–network-interface-speed 1000 <br /> |
| 140 | +–cores 8 <br /> |
| 141 | +–ram 49152 <br /> |
| 142 | +–os-code REDHAT_6_64 <br /> |
| 143 | +–datacenter ams01 <br /> |
| 144 | +–node-name random-node-name <br /> |
| 145 | +–assign-global-ip <existingGlobalIpv4Address> <br /> |
| 146 | +–run-list ‘recipe[apt],recipe[git],recipe[rbenv],recipe[memcached],recipe[redis]’</p> |
| 147 | + |
| 148 | + </div> |
| 149 | + </div> |
| 150 | + </div> |
| 151 | + <footer> |
| 152 | + <div class="row"> |
| 153 | + <hr> |
| 154 | + <div class="col-sm-12"> |
| 155 | + <p>© SoftLayer 2015<br> |
| 156 | + Built with <a href="https://github.com/spf13/hugo">Hugo</a></p> |
| 157 | + </div> |
| 158 | + </div> |
| 159 | + </footer> |
| 160 | +</div> |
| 161 | + |
| 162 | + <script src="https://softlayer.github.io/js/jquery.js"></script> |
| 163 | + <script src="https://softlayer.github.io/js/bootstrap.js"></script> |
| 164 | +</body> |
| 165 | +</html> |
0 commit comments