Update homepage to use KV CLI instead of curl

This commit is contained in:
Seth Vargo 2016-12-07 11:32:35 -08:00
parent 3a24debd79
commit 2beb18c0ab
No known key found for this signature in database
GPG Key ID: 905A90C2949E8787
2 changed files with 200 additions and 197 deletions

View File

@ -41,6 +41,8 @@ helpers do
#
# @return [String]
def description_for(page)
return escape_html(page.data.description || "")
description = page.data.description || ""
description = description.gsub(/\n+/, " ")
return escape_html(description)
end
end

View File

@ -1,5 +1,8 @@
---
description: Service discovery and configuration made easy. Distributed, highly available, and datacenter-aware.
description: |-
Consul is a highly available and distributed service discovery and key-value
store designed with support for the modern data center to make distributed
systems and configuration easy.
---
<!-- Main jumbotron for a primary marketing message or call to action -->
@ -40,7 +43,6 @@ description: Service discovery and configuration made easy. Distributed, highly
<div class="jumbotron-dots"></div>
</div>
</div>
<div id="features">
<div class="container">
<div class="row double-row">
@ -54,7 +56,8 @@ description: Service discovery and configuration made easy. Distributed, highly
<p>
Consul makes it simple for services to register themselves
and to discover other services via a DNS or HTTP interface.
Register external services such as SaaS providers as well.</p>
Register external services such as SaaS providers as well.
</p>
</div>
</div>
</div>
@ -70,7 +73,6 @@ description: Service discovery and configuration made easy. Distributed, highly
</div>
</div>
</div>
<div class="row double-row">
<div class="col-lg-6 col-md-6">
<div class="row">
@ -95,14 +97,13 @@ description: Service discovery and configuration made easy. Distributed, highly
</div>
</div>
</div>
</div> <!-- /container -->
</div> <!-- /features -->
</div>
<!-- /container -->
</div>
<!-- /features -->
<div id="demos">
<div class="container">
<div class="terminals row">
<div class="col-xs-12 col-lg-12 explantion">
<h2>DNS Query Interface</h2>
<p>
@ -110,7 +111,6 @@ description: Service discovery and configuration made easy. Distributed, highly
existing infrastructure without any code change.
</p>
</div>
<div class="terminal-item col-xs-12 col-lg-12">
<div class="terminal">
<header>
@ -143,8 +143,8 @@ description: Service discovery and configuration made easy. Distributed, highly
</div>
</div>
</div>
</div> <!-- /.terminal-item -->
</div>
<!-- /.terminal-item -->
<div class="col-xs-12 col-lg-12 explantion">
<h2>Key Value Storage</h2>
<p>
@ -152,7 +152,6 @@ description: Service discovery and configuration made easy. Distributed, highly
Managing configuration has never been simpler.
</p>
</div>
<div class="terminal-item col-xs-12 col-lg-12">
<div class="terminal">
<header>
@ -166,37 +165,39 @@ description: Service discovery and configuration made easy. Distributed, highly
<div class="terminal-window">
<div class="terminal">
<div class="display">
<p class="command"><span class="txt-r">admin@hashicorp</span>: curl -X PUT -d 'bar' http://localhost:8500/v1/kv/foo</p>
<p>true</p>
<p class="command"><span class="txt-r">admin@hashicorp</span>: curl http://localhost:8500/v1/kv/foo</p>
<p>[</p>
<p> {</p>
<p> "CreateIndex": 100,</p>
<p> "ModifyIndex": 200,</p>
<p> "Key": "foo",</p>
<p> "Flags": 0,</p>
<p> "Value": <span class="txt-p">"YmFy"</span></p>
<p> }</p>
<p>]</p>
<p class="command"><span class="txt-r">admin@hashicorp</span>: echo "YmFy" | base64 --decode</p>
<p class="command"><span class="txt-r">admin@hashicorp</span>: consul kv put foo bar</p>
<p>Success! Data written to: foo</p>
<p class="command"><span class="txt-r">admin@hashicorp</span>: consul kv get foo</p>
<p>bar</p>
<p class="command"><span class="txt-r">admin@hashicorp</span>: consul kv get -detailed foo</p>
<p>CreateIndex 5</p>
<p>Flags 0</p>
<p>Key foo</p>
<p>LockIndex 0</p>
<p>ModifyIndex 5</p>
<p>Session -</p>
<p>Value bar</p>
<p class="command"><span class="txt-r">admin@hashicorp</span>: consul kv delete foo</p>
<p>Success! Deleted key: foo</p>
<p class="command"><span class="txt-r">admin@hashicorp</span>: <span class="cursor">&nbsp;</span></p>
</div>
</div>
</div>
</div>
</div> <!-- /.terminal-item -->
</div>
<!-- /.terminal-item -->
</div>
</div>
</div><!-- /#demos -->
</div>
<!-- /#demos -->
<div id="cta">
<div class="container">
<div class="row">
<div class="intro">
<div class="left col-xs-12 col-sm-offset-2 col-sm-4">
<p>The intro and getting started guide contain
a simple and approachable walkthrough for running Consul locally.</p>
a simple and approachable walkthrough for running Consul locally.
</p>
</div>
<div class="col-xs-12 col-sm-6 col-sm-offset-0 right">
<a class="outline-btn purple" href="/intro/index.html">Read the intro &#187;</a>