forked from docker/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial import of https://github.com/docker/cloud-docs
- Loading branch information
Misty Stanley-Jones
committed
Sep 29, 2016
1 parent
9d5e59d
commit 15efc2d
Showing
248 changed files
with
37,723 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
wrappedNode(label: 'docker') { | ||
deleteDir() | ||
stage "checkout" | ||
checkout scm | ||
|
||
documentationChecker("docs") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Documentation for Docker Cloud | ||
|
||
To build the documentation locally. | ||
|
||
1. Fork this repo. | ||
|
||
2. Change to the `docs` directory. | ||
|
||
3. Type `make docs`. | ||
|
||
|
||
## API Documentation Pull Requests | ||
|
||
The API documentation for the Docker Cloud project is here | ||
|
||
https://github.com/docker/cloud-docs | ||
|
||
An extra step is needed when making PR's that modify the API - namely to add the generated HTML output to the PR by doing the following: | ||
|
||
1. Make changes to the API's Markdown source. | ||
|
||
2. Build the HTML for the API in your local branch. | ||
|
||
a. Change to the `cloud-api-docs` directory | ||
|
||
cd cloud-api-docs | ||
b. Generate the HTML | ||
|
||
make release | ||
3. Add the Markdown together with the HTML to your pull request: | ||
|
||
$ git add apidocs/* | ||
|
||
$ git add docs | ||
|
||
4. Push your changes to orgin. | ||
|
||
5. Create a Pull request as you normally wouled. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
+++ | ||
type = "cloud-api-docs" | ||
title = "API reference" | ||
description = "API reference" | ||
keywords = ["Docker, cloud, API"] | ||
weight = 100 | ||
[menu.main] | ||
parent="docker-cloud" | ||
identifier = "docker-cloudapi" | ||
+++ | ||
|
||
# Docker Cloud APIs | ||
|
||
Please see the Overview page. |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | ||
<title>API Documentation</title> | ||
|
||
<link href="../stylesheets/screen.css" rel="stylesheet" type="text/css" media="screen" /> | ||
<link href="../stylesheets/print.css" rel="stylesheet" type="text/css" media="print" /> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | ||
<script src="../javascripts/all_nosearch.js" type="text/javascript"></script> | ||
|
||
</head> | ||
|
||
<body class="includes includes_availabilityzone"> | ||
<a href="#" id="nav-button"> | ||
<span> | ||
NAV | ||
<img src="../images/navbar.png" /> | ||
</span> | ||
</a> | ||
<div class="tocify-wrapper"> | ||
<img src="../images/logo.png" /> | ||
<div id="toc"> | ||
</div> | ||
</div> | ||
<div class="page-wrapper"> | ||
<div class="dark-box"></div> | ||
<div class="content"> | ||
<h1 id="availability-zones">Availability Zones</h1> | ||
|
||
<h2 id="availability-zone">Availability Zone</h2> | ||
|
||
<blockquote> | ||
<p>Example</p> | ||
</blockquote> | ||
<pre class="highlight json"><code><span class="p">{</span><span class="w"> | ||
</span><span class="nt">"available"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w"> | ||
</span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ap-northeast-1a"</span><span class="p">,</span><span class="w"> | ||
</span><span class="nt">"region"</span><span class="p">:</span><span class="w"> </span><span class="s2">"/api/infra/v1/region/az/ap-northeast-1/"</span><span class="p">,</span><span class="w"> | ||
</span><span class="nt">"resource_uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"/api/infra/v1/az/aws/ap-northeast-1/ap-northeast-1a/"</span><span class="w"> | ||
</span><span class="p">}</span><span class="w"> | ||
</span></code></pre> | ||
|
||
<p>An Availability Zone is an isolated location inside a region. Providers that support availability zones: AWS</p> | ||
|
||
<h3 id="attributes">Attributes</h3> | ||
|
||
<table><thead> | ||
<tr> | ||
<th>Attribute</th> | ||
<th>Description</th> | ||
</tr> | ||
</thead><tbody> | ||
<tr> | ||
<td>available</td> | ||
<td>Whether the availability zone is currently available for new node deployments</td> | ||
</tr> | ||
<tr> | ||
<td>name</td> | ||
<td>An identifier for the availability zone</td> | ||
</tr> | ||
<tr> | ||
<td>region</td> | ||
<td>The resource URI of the region where the availability zone is allocated</td> | ||
</tr> | ||
<tr> | ||
<td>resource_uri</td> | ||
<td>A unique API endpoint that represents the zone</td> | ||
</tr> | ||
</tbody></table> | ||
|
||
<h2 id="list-all-availability-zones">List all availability zones</h2> | ||
<pre class="highlight python"><code><span class="kn">import</span> <span class="nn">dockercloud</span> | ||
|
||
<span class="n">az</span> <span class="o">=</span> <span class="n">dockercloud</span><span class="o">.</span><span class="n">AZ</span><span class="o">.</span><span class="nb">list</span><span class="p">()</span> | ||
</code></pre> | ||
<pre class="highlight http"><code><span class="nf">GET</span> <span class="nn">/api/infra/v1/az/</span> <span class="k">HTTP</span><span class="o">/</span><span class="m">1.1</span> | ||
<span class="na">Host</span><span class="p">:</span> <span class="s">cloud.docker.com</span> | ||
<span class="na">Authorization</span><span class="p">:</span> <span class="s">Basic dXNlcm5hbWU6YXBpa2V5</span> | ||
<span class="na">Accept</span><span class="p">:</span> <span class="s">application/json</span> | ||
</code></pre> | ||
<pre class="highlight go"><code><span class="k">import</span><span class="x"> </span><span class="s">"github.com/docker/go-dockercloud/dockercloud"</span><span class="x"> | ||
|
||
</span><span class="n">az</span><span class="p">,</span><span class="x"> </span><span class="n">err</span><span class="x"> </span><span class="o">:=</span><span class="x"> </span><span class="n">dockercloud</span><span class="o">.</span><span class="n">ListAZ</span><span class="p">()</span><span class="x"> | ||
</span><span class="k">if</span><span class="x"> </span><span class="n">err</span><span class="x"> </span><span class="o">!=</span><span class="x"> </span><span class="no">nil</span><span class="x"> </span><span class="p">{</span><span class="x"> | ||
</span><span class="n">log</span><span class="o">.</span><span class="n">Println</span><span class="p">(</span><span class="n">err</span><span class="p">)</span><span class="x"> | ||
</span><span class="p">}</span><span class="x"> | ||
|
||
</span><span class="n">log</span><span class="o">.</span><span class="n">Println</span><span class="p">(</span><span class="n">az</span><span class="p">)</span><span class="x"> | ||
</span></code></pre> | ||
<pre class="highlight shell"><code>docker-cloud nodecluster az | ||
</code></pre> | ||
|
||
<p>Lists all availability zones from all regions of all supported cloud providers. Returns a list of <code class="prettyprint">Availability Zone</code> objects.</p> | ||
|
||
<h3 id="endpoint-type">Endpoint Type</h3> | ||
|
||
<p>Available in Docker Cloud’s <strong>REST API</strong></p> | ||
|
||
<h3 id="http-request">HTTP Request</h3> | ||
|
||
<p><code class="prettyprint">GET /api/infra/v1/az/</code></p> | ||
|
||
<h3 id="query-parameters">Query Parameters</h3> | ||
|
||
<table><thead> | ||
<tr> | ||
<th>Parameter</th> | ||
<th>Description</th> | ||
</tr> | ||
</thead><tbody> | ||
<tr> | ||
<td>name</td> | ||
<td>Filter by availability zone name</td> | ||
</tr> | ||
<tr> | ||
<td>region</td> | ||
<td>Filter by resource URI of the target region</td> | ||
</tr> | ||
</tbody></table> | ||
|
||
<h2 id="get-an-individual-availability-zone">Get an individual availability zone</h2> | ||
<pre class="highlight python"><code><span class="kn">import</span> <span class="nn">dockercloud</span> | ||
|
||
<span class="n">az</span> <span class="o">=</span> <span class="n">dockercloud</span><span class="o">.</span><span class="n">AZ</span><span class="o">.</span><span class="n">fetch</span><span class="p">(</span><span class="s">"aws/sa-east-1/sa-east-1a"</span><span class="p">)</span> | ||
</code></pre> | ||
<pre class="highlight go"><code><span class="k">import</span><span class="x"> </span><span class="s">"github.com/docker/go-dockercloud/dockercloud"</span><span class="x"> | ||
|
||
</span><span class="n">az</span><span class="p">,</span><span class="x"> </span><span class="n">err</span><span class="x"> </span><span class="o">:=</span><span class="x"> </span><span class="n">dockercloud</span><span class="o">.</span><span class="n">GetAZ</span><span class="p">(</span><span class="s">"aws/sa-east-1/sa-east-1a"</span><span class="p">)</span><span class="x"> | ||
</span><span class="k">if</span><span class="x"> </span><span class="n">err</span><span class="x"> </span><span class="o">!=</span><span class="x"> </span><span class="no">nil</span><span class="x"> </span><span class="p">{</span><span class="x"> | ||
</span><span class="n">log</span><span class="o">.</span><span class="n">Println</span><span class="p">(</span><span class="n">err</span><span class="p">)</span><span class="x"> | ||
</span><span class="p">}</span><span class="x"> | ||
|
||
</span><span class="n">log</span><span class="o">.</span><span class="n">Println</span><span class="p">(</span><span class="n">az</span><span class="p">)</span><span class="x"> | ||
</span></code></pre> | ||
<pre class="highlight http"><code><span class="nf">GET</span> <span class="nn">/api/infra/v1/az/aws/sa-east-1/sa-east-1a/</span> <span class="k">HTTP</span><span class="o">/</span><span class="m">1.1</span> | ||
<span class="na">Host</span><span class="p">:</span> <span class="s">cloud.docker.com</span> | ||
<span class="na">Authorization</span><span class="p">:</span> <span class="s">Basic dXNlcm5hbWU6YXBpa2V5</span> | ||
<span class="na">Accept</span><span class="p">:</span> <span class="s">application/json</span> | ||
</code></pre> | ||
|
||
<p>Get all the details of a specific availability zone</p> | ||
|
||
<h3 id="endpoint-type">Endpoint Type</h3> | ||
|
||
<p>Available in Docker Cloud’s <strong>REST API</strong></p> | ||
|
||
<h3 id="http-request">HTTP Request</h3> | ||
|
||
<p><code class="prettyprint">GET /api/infra/v1/az/(provider.name)/(region.name)/(name)/</code></p> | ||
|
||
<h3 id="path-parameters">Path Parameters</h3> | ||
|
||
<table><thead> | ||
<tr> | ||
<th>Parameter</th> | ||
<th>Description</th> | ||
</tr> | ||
</thead><tbody> | ||
<tr> | ||
<td>name</td> | ||
<td>The name of the availability zone to retrieve</td> | ||
</tr> | ||
<tr> | ||
<td>provider</td> | ||
<td>The name of the provider</td> | ||
</tr> | ||
<tr> | ||
<td>region</td> | ||
<td>The name of the region</td> | ||
</tr> | ||
</tbody></table> | ||
|
||
</div> | ||
<div class="dark-box"> | ||
</div> | ||
</div> | ||
<div class="google-analytics"> | ||
<!-- Google Tag Manager --> | ||
<noscript> | ||
<iframe src="//www.googletagmanager.com/ns.html?id=GTM-WLGFZV" | ||
height="0" width="0" style="display:none;visibility:hidden"></iframe> | ||
</noscript> | ||
<script> | ||
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | ||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | ||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | ||
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | ||
})(window,document,'script','dataLayer','GTM-WLGFZV'); | ||
</script> | ||
<!-- End Google Tag Manager --> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.