Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Misty Stanley-Jones committed Sep 29, 2016
1 parent 9d5e59d commit 15efc2d
Show file tree
Hide file tree
Showing 248 changed files with 37,723 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
wrappedNode(label: 'docker') {
deleteDir()
stage "checkout"
checkout scm

documentationChecker("docs")
}
40 changes: 40 additions & 0 deletions README.md
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.
14 changes: 14 additions & 0 deletions apidocs/docker-cloud.md
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 added apidocs/docker-cloud/fonts/slate.eot
Binary file not shown.
14 changes: 14 additions & 0 deletions apidocs/docker-cloud/fonts/slate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apidocs/docker-cloud/fonts/slate.ttf
Binary file not shown.
Binary file added apidocs/docker-cloud/fonts/slate.woff
Binary file not shown.
Binary file added apidocs/docker-cloud/fonts/slate.woff2
Binary file not shown.
Binary file added apidocs/docker-cloud/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apidocs/docker-cloud/images/navbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
517 changes: 517 additions & 0 deletions apidocs/docker-cloud/includes/action.html

Large diffs are not rendered by default.

196 changes: 196 additions & 0 deletions apidocs/docker-cloud/includes/availabilityzone.html
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&rsquo;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&rsquo;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>
Loading

0 comments on commit 15efc2d

Please sign in to comment.