diff --git a/README.md b/README.md index 62e0dc5fc6..25bc3f211a 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ You have two options: To read the docs offline, you can use either a standalone container or a swarm service. To see all available tags, go to -[Docker Cloud](https://cloud.docker.com/app/docs/repository/docker/docs/docker.github.io/tags). +[Docker Hub](https://hub.docker.com/r/docs/docker.github.io/tags/). The following examples use the `latest` tag: - Run a single container: @@ -311,7 +311,7 @@ still optimizes the bandwith during browsing). ## Building archives and the live published docs -All the images described below are automatically built using Docker Cloud. To +All the images described below are automatically built using Docker Hub. To build the site manually, from scratch, including all utility and archive images, see the [README in the publish-tools branch](https://github.com/docker/docker.github.io/blob/publish-tools/README.md). diff --git a/_data/advisories.yaml b/_data/advisories.yaml index 66a1e0a50a..f69a8b7ca1 100644 --- a/_data/advisories.yaml +++ b/_data/advisories.yaml @@ -17,7 +17,6 @@ texts: swarm: "See [Swarm mode overview](/engine/swarm/) for the orchestration features introduced in Docker Engine 1.12. Only refer to the Docker Swarm documents below for information on the standalone Swarm product." swarm-standalone: "**You are viewing docs for legacy standalone Swarm.** These topics describe standalone Docker Swarm. In Docker 1.12 and higher, [Swarm mode](/engine/swarm/) is integrated with Docker Engine. Most users should use integrated Swarm mode — a good place to start is [Getting started with swarm mode](/engine/swarm/swarm-tutorial/), [Swarm mode CLI commands](/engine/swarm/index.md#swarm-mode-cli-commands), and the [Get started with Docker walkthrough](/get-started/)). Standalone Docker Swarm is not integrated into the Docker Engine API and CLI commands." engine: "This site contains documentation for the v1.12 release candidate version of Docker Engine. For the Docker Engine v1.11 docs, see [https://docs.docker.com/v1.11/](https://docs.docker.com/v1.11/). Docker for Mac and Docker for Windows are currently in Beta." - cloud-swarm: "**Beta Feature.** Swarm Mode for Docker Cloud is currently a public Beta." # URL based advisories diff --git a/_data/not_edited_here.yaml b/_data/not_edited_here.yaml index 745c834845..a793c0005e 100644 --- a/_data/not_edited_here.yaml +++ b/_data/not_edited_here.yaml @@ -12,7 +12,7 @@ overrides: - path: /apidocs/ - description: "Auto-generated API docs for Docker Cloud, DTR, UCP. File an issue." + description: "Auto-generated API docs for DTR and UCP. File an issue." - path: /engine/api/ description: "ReDoc/Swagger API specs" diff --git a/_data/previewdocs.yaml b/_data/previewdocs.yaml deleted file mode 100644 index 37c933ccea..0000000000 --- a/_data/previewdocs.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Define Advisory texts -# can be used in page frontmatter, e.g.: -# previewflag: cloud-swarm -# modeled on advisories - -texts: - - cloud-swarm: "**Beta Feature.** Swarm Mode for Docker Cloud is currently a public Beta." - - -# URL based previewdocs -# any URL that begins with "/engine/" will get the "engine" preview -# will be over-ridden by the `previewdocs` frontmatter in the topic diff --git a/_data/redirects.csv b/_data/redirects.csv index e7120f63cd..5a5b98443c 100644 --- a/_data/redirects.csv +++ b/_data/redirects.csv @@ -48,7 +48,7 @@ source,destination /v1.9/docker-hub/,/docker-hub/ /v1.10/docker-hub/,/docker-hub/ /v1.11/docker-hub/,/docker-hub/ -/login,https://cloud.docker.com/app/login +/login,https://hub.docker.com/ /bitbucket/use-docker-images-as-build-environments-in-bitbucket-pipelines-792298897.html,https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-in-bitbucket-pipelines-792298897.html /blog/docker-data-science/,https://www.dataquest.io/blog/docker-data-science/ /questions/19335444/how-to-assign-a-port-mapping-to-an-existing-docker-container,http://stackoverflow.com/questions/19335444/how-to-assign-a-port-mapping-to-an-existing-docker-container diff --git a/_data/toc.yaml b/_data/toc.yaml index 83621b755b..4b6074cfb6 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -171,8 +171,6 @@ guides: path: /get-started/part4/ - title: "Part 5: Stacks" path: /get-started/part5/ - - title: "Part 6: Deploy your app" - path: /get-started/part6/ - path: /engine/docker-overview/ title: Docker overview - sectiontitle: Develop with Docker @@ -1409,9 +1407,6 @@ reference: - title: Registry API path: /registry/spec/api/ nosync: true - - title: Cloud API - path: /apidocs/docker-cloud/ - nosync: true - sectiontitle: Drivers and specifications section: @@ -3032,179 +3027,6 @@ manuals: title: Get support - title: Get support path: /ee/get-support/ -- sectiontitle: Docker Cloud - section: - - sectiontitle: Migration - section: - - path: /docker-cloud/migration/ - title: Migration overview - - path: /docker-cloud/migration/cloud-to-swarm/ - title: Migrate to Docker CE - - path: /docker-cloud/migration/cloud-to-kube-aks/ - title: Migration to AKS - - path: /docker-cloud/migration/cloud-to-kube-gke/ - title: Migrate to GKE - - path: /docker-cloud/migration/cloud-to-aws-ecs/ - title: Migrate to Amazon ECS - - path: /docker-cloud/migration/deregister-swarms/ - title: Deregister swarms - - path: /docker-cloud/migration/kube-primer/ - title: Kubernetes primer - - path: /docker-cloud/ - title: About Docker Cloud - - path: /docker-cloud/dockerid/ - title: Docker Cloud settings and Docker ID - - path: /docker-cloud/orgs/ - title: Organizations and teams - - sectiontitle: Manage builds and images - section: - - path: /docker-cloud/builds/ - title: Builds and images overview - - path: /docker-cloud/builds/repos/ - title: Docker Cloud repositories - - path: /docker-cloud/builds/link-source/ - title: Link to a source code repository - - path: /docker-cloud/builds/push-images/ - title: Push images to Docker Cloud - - path: /docker-cloud/builds/automated-build/ - title: Automated builds - - path: /docker-cloud/builds/automated-testing/ - title: Automated repository tests - - path: /docker-cloud/builds/advanced/ - title: Advanced options for autobuild and autotest - - sectiontitle: Manage swarms (beta swarm mode) - section: - - path: /docker-cloud/cloud-swarm/ - title: Overview - - path: /docker-cloud/cloud-swarm/using-swarm-mode/ - title: Using Swarm mode - - path: /docker-cloud/cloud-swarm/register-swarms/ - title: Register existing swarms - - path: /docker-cloud/cloud-swarm/create-cloud-swarm-aws/ - title: Create a new swarm on Amazon Web Services in Docker Cloud - - path: /docker-cloud/cloud-swarm/create-cloud-swarm-azure/ - title: Create a new swarm on Microsoft Azure in Docker Cloud - - path: /docker-cloud/cloud-swarm/connect-to-swarm/ - title: Connect to a swarm through Docker Cloud - - path: /docker-cloud/cloud-swarm/link-aws-swarm/ - title: Link Amazon Web Services to Docker Cloud - - path: /docker-cloud/cloud-swarm/link-azure-swarm/ - title: Link Microsoft Azure Cloud Services to Docker Cloud - - path: /docker-cloud/cloud-swarm/ssh-key-setup/ - title: Set up SSH keys - - sectiontitle: Manage Infrastructure (standard mode) - section: - - path: /docker-cloud/infrastructure/ - title: Infrastructure overview - - path: /docker-cloud/infrastructure/deployment-strategies/ - title: Container distribution strategies - - path: /docker-cloud/infrastructure/link-aws/ - title: Link to Amazon Web Services hosts - - path: /docker-cloud/infrastructure/link-do/ - title: Link to DigitalOcean hosts - - path: /docker-cloud/infrastructure/link-azure/ - title: Link to Microsoft Azure hosts - - path: /docker-cloud/infrastructure/link-packet/ - title: Link to Packet hosts - - path: /docker-cloud/infrastructure/link-softlayer/ - title: Link to SoftLayer hosts - - path: /docker-cloud/infrastructure/ssh-into-a-node/ - title: SSH into a Docker Cloud-managed node - - path: /docker-cloud/infrastructure/docker-upgrade/ - title: Upgrade Docker on a node - - path: /docker-cloud/infrastructure/byoh/ - title: Use the Docker Cloud agent - - path: /docker-cloud/infrastructure/cloud-on-packet.net-faq/ - title: Use Docker Cloud and Packet.net - - path: /docker-cloud/infrastructure/cloud-on-aws-faq/ - title: Use Docker Cloud on AWS - - sectiontitle: Manage nodes and apps (standard mode) - section: - - path: /docker-cloud/standard/ - title: Overview - - sectiontitle: Getting started - section: - - path: /docker-cloud/getting-started/ - title: Getting started with Docker Cloud - - path: /docker-cloud/getting-started/intro_cloud/ - title: Introducing Docker Cloud - - path: /docker-cloud/getting-started/connect-infra/ - title: Link to your infrastructure - - path: /docker-cloud/getting-started/your_first_node/ - title: Deploy your first node - - path: /docker-cloud/getting-started/your_first_service/ - title: Deploy your first service - - sectiontitle: Deploy an application - section: - - path: /docker-cloud/getting-started/deploy-app/1_introduction/ - title: Introduction to deploying an app in Docker Cloud - - path: /docker-cloud/getting-started/deploy-app/2_set_up/ - title: Set up your environment - - path: /docker-cloud/getting-started/deploy-app/3_prepare_the_app/ - title: Prepare the application - - path: /docker-cloud/getting-started/deploy-app/4_push_to_cloud_registry/ - title: Push the image to Docker Cloud's Registry - - path: /docker-cloud/getting-started/deploy-app/5_deploy_the_app_as_a_service/ - title: Deploy the app as a Docker Cloud service - - path: /docker-cloud/getting-started/deploy-app/6_define_environment_variables/ - title: Define environment variables - - path: /docker-cloud/getting-started/deploy-app/7_scale_the_service/ - title: Scale the service - - path: /docker-cloud/getting-started/deploy-app/8_view_logs/ - title: View service logs - - path: /docker-cloud/getting-started/deploy-app/9_load-balance_the_service/ - title: Load-balance the service - - path: /docker-cloud/getting-started/deploy-app/10_provision_a_data_backend_for_your_service/ - title: Provision a data backend for the service - - path: /docker-cloud/getting-started/deploy-app/11_service_stacks/ - title: Stackfiles for your service - - path: /docker-cloud/getting-started/deploy-app/12_data_management_with_volumes/ - title: Data management with volumes - - sectiontitle: Manage applications - section: - - path: /docker-cloud/apps/ - title: Applications in Docker Cloud - - path: /docker-cloud/apps/deploy-to-cloud-btn/ - title: Add a deploy to Docker Cloud button - - path: /docker-cloud/apps/auto-destroy/ - title: Automatic container destroy - - path: /docker-cloud/apps/autorestart/ - title: Automatic container restart - - path: /docker-cloud/apps/auto-redeploy/ - title: Automatic service redeploy - - path: /docker-cloud/apps/load-balance-hello-world/ - title: Create a proxy or load balancer - - path: /docker-cloud/apps/deploy-tags/ - title: Deployment tags - - path: /docker-cloud/apps/stacks/ - title: Manage service stacks - - path: /docker-cloud/apps/ports/ - title: Publish and expose service or container ports - - path: /docker-cloud/apps/service-redeploy/ - title: Redeploy running services - - path: /docker-cloud/apps/service-scaling/ - title: Scale your service - - path: /docker-cloud/apps/api-roles/ - title: Service API roles - - path: /docker-cloud/apps/service-links/ - title: Service discovery and links - - path: /docker-cloud/apps/triggers/ - title: Use triggers - - path: /docker-cloud/apps/volumes/ - title: Work with data volumes - - path: /docker-cloud/apps/stack-yaml-reference/ - title: Cloud stack file YAML reference - - path: /docker-cloud/slack-integration/ - title: Docker Cloud notifications in Slack - - path: /apidocs/docker-cloud/ - title: Docker Cloud API - nosync: true - - path: /docker-cloud/installing-cli/ - title: The Docker Cloud CLI - - path: /docker-cloud/docker-errors-faq/ - title: Known issues in Docker Cloud - - path: /docker-cloud/release-notes/ - title: Release notes - sectiontitle: Docker Compose section: - path: /compose/overview/ @@ -3459,48 +3281,48 @@ manuals: title: Migrate from Boot2Docker to Machine - path: /release-notes/docker-machine/ title: Docker Machine release notes -- sectiontitle: Docker Store - section: - - path: /docker-store/ - title: About Docker Store - - sectiontitle: Docker Store FAQs - section: - - path: /docker-store/customer_faq/ - title: Customer FAQs - - path: /docker-store/publisher_faq/ - title: Publisher FAQs - - sectiontitle: For Publishers - section: - - path: /docker-store/publish/ - title: Publish content on Docker Store - - path: /docker-store/certify-images/ - title: Certify Docker images - - path: /docker-store/certify-plugins-logging/ - title: Certify Docker logging plugins - - path: /docker-store/trustchain/ - title: Docker Store trust chain - - path: /docker-store/byol/ - title: Bring Your Own License (BYOL) - sectiontitle: Docker Hub section: - path: /docker-hub/ - title: Overview of Docker Hub + title: Get Started - path: /docker-hub/accounts/ - title: Use Docker Hub with Docker ID - - path: /docker-hub/orgs/ - title: Teams & organizations + title: Docker ID - path: /docker-hub/repos/ - title: Repositories on Docker Hub - - path: /docker-hub/builds/ - title: Automated builds - - path: /docker-hub/webhooks/ - title: Webhooks for automated builds - - path: /docker-hub/bitbucket/ - title: Automated builds with Bitbucket - - path: /docker-hub/github/ - title: Automated builds from GitHub + title: Repositories - path: /docker-hub/official_repos/ - title: Official repositories on Docker Hub + title: Official Repositories + - path: /docker-hub/orgs/ + title: Teams & Organizations + - sectiontitle: Builds + section: + - path: /docker-hub/builds/ + title: Get Started with Builds + - path: /docker-hub/builds/automated-testing/ + title: Testing in Builds + - path: /docker-hub/builds/advanced/ + title: Advanced Builds + - path: /docker-hub/builds/webhooks/ + title: Build Webhooks + - path: /docker-hub/builds/github/ + title: Connecting GitHub + - path: /docker-hub/builds/bitbucket/ + title: Connecting BitBucket + - sectiontitle: Publisher Images & Plugins + section: + - path: /docker-hub/customer_faq/ + title: Subscriptions + - path: /docker-store/publish/publisher_faq/ + title: Publishers + - path: /docker-hub/publish/ + title: Publish Images & Plugins + - path: /docker-hub/publish/certify-images/ + title: Certify Images & Plugins + - path: /docker-hub/publish/certify-plugins-logging/ + title: Certify Logging Plugins + - path: /docker-hub/publish/trustchain/ + title: Trust Chain + - path: /docker-hub/publish/byol/ + title: Bring Your Own License (BYOL) - sectiontitle: Open-source projects section: - sectiontitle: Docker Notary @@ -3622,9 +3444,6 @@ manuals: - path: /release-notes/docker-compose/ title: Docker Compose nosync: true - - path: /docker-cloud/release-notes/ - title: Docker Cloud - nosync: true - path: /docker-for-aws/release-notes/ title: Docker for AWS nosync: true diff --git a/_includes/content/cloud-swarm-overview.md b/_includes/content/cloud-swarm-overview.md deleted file mode 100644 index 2017970350..0000000000 --- a/_includes/content/cloud-swarm-overview.md +++ /dev/null @@ -1,9 +0,0 @@ -You can now create _new_ Docker Swarms from within Docker Cloud as well as -register existing swarms. - -When you create a swarm, Docker Cloud connects to the Cloud provider on your -behalf, and uses the provider's APIs and a provider-specific template to launch -Docker instances. The instances are then joined to a swarm and the swarm is -configured using your input. When you access the swarm from Docker Cloud, the -system forwards your commands directly to the Docker instances running in the -swarm. diff --git a/_includes/content/ssh/ssh-overview.md b/_includes/content/ssh/ssh-overview.md index 00f0c4f086..4a595008b8 100644 --- a/_includes/content/ssh/ssh-overview.md +++ b/_includes/content/ssh/ssh-overview.md @@ -2,7 +2,7 @@ provides authentication and encrypts data communication over insecure networks. These topics describe how to find existing SSH keys or generate new ones, and -add the public key to your Docker Cloud account. GitHub has a good set of +add the public key to your Docker Hub account. GitHub has a good set of topics on [Connecting to GitHub with SSH](https://help.github.com/articles/connecting-to-github-with-ssh/), which you can tailor to SSH scenarios beyond GitHub, including Docker. The quick-look diff --git a/_includes/ee-linux-install-reuse.md b/_includes/ee-linux-install-reuse.md index 920cbd16d4..a663792ade 100644 --- a/_includes/ee-linux-install-reuse.md +++ b/_includes/ee-linux-install-reuse.md @@ -30,7 +30,7 @@ For Docker Community Edition on {{ linux-dist-cap }}, see [Get Docker CE for Cen To install Docker EE, you will need the URL of the Docker EE repository associated with your trial or subscription: -1. Go to [https://store.docker.com/my-content](https://store.docker.com/my-content){: target="_blank" class="_" }. All of your subscriptions and trials are listed. +1. Go to [https://hub.docker.com/my-content](https://hub.docker.com/my-content){: target="_blank" class="_" }. All of your subscriptions and trials are listed. 2. Click the **Setup** button for **Docker Enterprise Edition for {{ linux-dist-long }}**. 3. Copy the URL from **Copy and paste this URL to download your Edition** and save it for later use. diff --git a/_includes/footer.html b/_includes/footer.html index 3f929ffe8a..9afab2104f 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -39,8 +39,7 @@
  • Community Edition
  • Enterprise Edition
  • Docker Datacenter
  • -
  • Docker Cloud
  • -
  • Docker Store
  • +
  • Docker Hub
  • diff --git a/_includes/global-header.html b/_includes/global-header.html index cf4dcbd764..60256cec40 100644 --- a/_includes/global-header.html +++ b/_includes/global-header.html @@ -33,8 +33,8 @@
  • Docs
  • Community
  • -
  • Create Docker ID
  • -
  • Sign In
  • +
  • Create Docker ID
  • +
  • Sign In
  • diff --git a/_samples/boilerplate.txt b/_samples/boilerplate.txt index 9366faf6f4..cab6bdcba4 100644 --- a/_samples/boilerplate.txt +++ b/_samples/boilerplate.txt @@ -2,7 +2,7 @@ > > This content is imported from > [the official Docker Library docs](https://github.com/docker-library/docs/tree/master/{{ page.repo}}/), -> and is provided by the original uploader. You can view the Docker Store page for this image at -> [https://store.docker.com/images/{{ page.repo }}](https://store.docker.com/images/{{ page.repo }}) +> and is provided by the original uploader. You can view the Docker Hub page for this image at +> [https://hub.docker.com/images/{{ page.repo }}](https://hub.docker.com/images/{{ page.repo }}) diff --git a/apidocs/cloud-api-source/.dockerignore b/apidocs/cloud-api-source/.dockerignore deleted file mode 100644 index 567609b123..0000000000 --- a/apidocs/cloud-api-source/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -build/ diff --git a/apidocs/cloud-api-source/.gitignore b/apidocs/cloud-api-source/.gitignore deleted file mode 100644 index 090a1f02df..0000000000 --- a/apidocs/cloud-api-source/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.idea -.DS_Store diff --git a/apidocs/cloud-api-source/Dockerfile b/apidocs/cloud-api-source/Dockerfile deleted file mode 100644 index 9bd11f3778..0000000000 --- a/apidocs/cloud-api-source/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM ubuntu:trusty - -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -yq ruby ruby-dev build-essential git awscli && \ - gem install --no-ri --no-rdoc bundler -WORKDIR /app -ADD Gemfile /app/Gemfile -ADD Gemfile.lock /app/Gemfile.lock -RUN bundle install -ADD . /app - -ENV PATH=$PATH:/app AWS_ACCESS_KEY_ID=**setme** AWS_SECRET_ACCESS_KEY=**setme** BUCKET=**setme** - -EXPOSE 4567 -CMD ["bundle", "exec", "middleman", "server"] diff --git a/apidocs/cloud-api-source/Gemfile b/apidocs/cloud-api-source/Gemfile deleted file mode 100644 index 0933b9d683..0000000000 --- a/apidocs/cloud-api-source/Gemfile +++ /dev/null @@ -1,12 +0,0 @@ -source 'https://rubygems.org' - -# Middleman -gem 'middleman', '~>3.3.10' -gem 'middleman-gh-pages', '~> 0.0.3' -gem 'middleman-syntax', '~> 2.0.0' -gem 'middleman-autoprefixer', '~> 2.4.4' -gem 'rouge', '~> 1.9.0' -gem 'redcarpet', '~> 3.3.2' - -gem 'rake', '~> 10.4.2' -gem 'therubyracer', '~> 0.12.1', platforms: :ruby diff --git a/apidocs/cloud-api-source/Gemfile.lock b/apidocs/cloud-api-source/Gemfile.lock deleted file mode 100644 index fff5ee10cb..0000000000 --- a/apidocs/cloud-api-source/Gemfile.lock +++ /dev/null @@ -1,140 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - activesupport (4.1.11) - i18n (~> 0.6, >= 0.6.9) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.1) - tzinfo (~> 1.1) - autoprefixer-rails (5.2.0.1) - execjs - json - celluloid (0.16.0) - timers (~> 4.0.0) - chunky_png (1.3.4) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.9.1.1) - compass (1.0.3) - chunky_png (~> 1.2) - compass-core (~> 1.0.2) - compass-import-once (~> 1.0.5) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) - sass (>= 3.3.13, < 3.5) - compass-core (1.0.3) - multi_json (~> 1.0) - sass (>= 3.3.0, < 3.5) - compass-import-once (1.0.5) - sass (>= 3.2, < 3.5) - erubis (2.7.0) - execjs (2.5.2) - ffi (1.9.8) - haml (4.0.6) - tilt - hike (1.2.3) - hitimes (1.2.2) - hooks (0.4.0) - uber (~> 0.0.4) - i18n (0.7.0) - json (1.8.3) - kramdown (1.7.0) - libv8 (3.16.14.7) - listen (2.10.1) - celluloid (~> 0.16.0) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) - middleman (3.3.12) - coffee-script (~> 2.2) - compass (>= 1.0.0, < 2.0.0) - compass-import-once (= 1.0.5) - execjs (~> 2.0) - haml (>= 4.0.5) - kramdown (~> 1.2) - middleman-core (= 3.3.12) - middleman-sprockets (>= 3.1.2) - sass (>= 3.4.0, < 4.0) - uglifier (~> 2.5) - middleman-autoprefixer (2.4.4) - autoprefixer-rails (~> 5.2.0) - middleman-core (>= 3.3.3) - middleman-core (3.3.12) - activesupport (~> 4.1.0) - bundler (~> 1.1) - erubis - hooks (~> 0.3) - i18n (~> 0.7.0) - listen (>= 2.7.9, < 3.0) - padrino-helpers (~> 0.12.3) - rack (>= 1.4.5, < 2.0) - rack-test (~> 0.6.2) - thor (>= 0.15.2, < 2.0) - tilt (~> 1.4.1, < 2.0) - middleman-gh-pages (0.0.3) - rake (> 0.9.3) - middleman-sprockets (3.4.2) - middleman-core (>= 3.3) - sprockets (~> 2.12.1) - sprockets-helpers (~> 1.1.0) - sprockets-sass (~> 1.3.0) - middleman-syntax (2.0.0) - middleman-core (~> 3.2) - rouge (~> 1.0) - minitest (5.7.0) - multi_json (1.11.1) - padrino-helpers (0.12.5) - i18n (~> 0.6, >= 0.6.7) - padrino-support (= 0.12.5) - tilt (~> 1.4.1) - padrino-support (0.12.5) - activesupport (>= 3.1) - rack (1.6.4) - rack-test (0.6.3) - rack (>= 1.0) - rake (10.4.2) - rb-fsevent (0.9.5) - rb-inotify (0.9.5) - ffi (>= 0.5.0) - redcarpet (3.3.2) - ref (1.0.5) - rouge (1.9.0) - sass (3.4.14) - sprockets (2.12.3) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-helpers (1.1.0) - sprockets (~> 2.0) - sprockets-sass (1.3.1) - sprockets (~> 2.0) - tilt (~> 1.1) - therubyracer (0.12.2) - libv8 (~> 3.16.14.0) - ref - thor (0.19.1) - thread_safe (0.3.5) - tilt (1.4.1) - timers (4.0.1) - hitimes - tzinfo (1.2.2) - thread_safe (~> 0.1) - uber (0.0.13) - uglifier (2.7.1) - execjs (>= 0.3.0) - json (>= 1.8.0) - -PLATFORMS - ruby - -DEPENDENCIES - middleman (~> 3.3.10) - middleman-autoprefixer (~> 2.4.4) - middleman-gh-pages (~> 0.0.3) - middleman-syntax (~> 2.0.0) - rake (~> 10.4.2) - redcarpet (~> 3.3.2) - rouge (~> 1.9.0) - therubyracer (~> 0.12.1) diff --git a/apidocs/cloud-api-source/LICENSE b/apidocs/cloud-api-source/LICENSE deleted file mode 100644 index 5ceddf59f6..0000000000 --- a/apidocs/cloud-api-source/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2008-2013 Concur Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may -not use this file except in compliance with the License. You may obtain -a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations -under the License. \ No newline at end of file diff --git a/apidocs/cloud-api-source/Makefile b/apidocs/cloud-api-source/Makefile deleted file mode 100644 index b3119bb486..0000000000 --- a/apidocs/cloud-api-source/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -.PHONY: docs build release - -CONTAINER_NAME=api-build -export CONTAINER_NAME - -docs: build - docker run --rm -it -p 4567:4567 dockercloud/api-docs - -build: - git submodule init && git submodule update - docker build -t dockercloud/api-docs . - -release: build - docker rm -f $(CONTAINER_NAME) || true - docker run --name $(CONTAINER_NAME) -it \ - dockercloud/api-docs middleman build - docker cp $(CONTAINER_NAME):/app/build ../ - rm -r ../docker-cloud - mv ../build ../docker-cloud - cp ../docker-cloud/index.html ../layouts/single.html - # defuse text that looks like a go template - # commenting out until we know that we're not using Hugo anywhere & can remove -# grep -rl '{ {' ../docker-cloud/* | xargs sed -i~ "s/{ {/{ {/g" - #rm source/includes/node.md~ - #rm source/includes/stack.md~ - #rm ../source/index.html~ - #rm ../source/layouts/single.html~ - docker rm $(CONTAINER_NAME) diff --git a/apidocs/cloud-api-source/README.md b/apidocs/cloud-api-source/README.md deleted file mode 100644 index c636ecdb97..0000000000 --- a/apidocs/cloud-api-source/README.md +++ /dev/null @@ -1,29 +0,0 @@ -dockercloud/api-docs -==================== - -[![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/) - -If you find a typo or mismatch between the API and this documentation, send us a pull request! - - -## Usage - -To run it locally: - -```none -$ git clone --recursive https://github.com/docker/docker.github.io.git -$ make release -``` - -The documentation will be available in http://localhost:8000/ - -## Updating the release HTML - -As with the HTML generated by the DTR apidocs, the Docker Cloud documentation -needs to be generated and the resulting HTML committed to this repository. - -After merging all PR's, run `make release`. This will place the updated HTML -into the `apidocs/docker-cloud` directory. - -Create a new Pull Request and get it merged. - now this repository is ready for -the release process using `docker/docs.docker.com`. diff --git a/apidocs/cloud-api-source/Rakefile b/apidocs/cloud-api-source/Rakefile deleted file mode 100644 index 6a952e1e91..0000000000 --- a/apidocs/cloud-api-source/Rakefile +++ /dev/null @@ -1,6 +0,0 @@ -require 'middleman-gh-pages' -require 'rake/clean' - -CLOBBER.include('build') - -task :default => [:build] diff --git a/apidocs/cloud-api-source/config.rb b/apidocs/cloud-api-source/config.rb deleted file mode 100644 index 43bceaa5a4..0000000000 --- a/apidocs/cloud-api-source/config.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Markdown -set :markdown_engine, :redcarpet -set :markdown, - fenced_code_blocks: true, - smartypants: true, - disable_indented_code_blocks: true, - prettify: true, - tables: true, - with_toc_data: true, - no_intra_emphasis: true - -# Assets -set :css_dir, 'stylesheets' -set :js_dir, 'javascripts' -set :images_dir, 'images' -set :fonts_dir, 'fonts' - -# Activate the syntax highlighter -activate :syntax - -activate :autoprefixer do |config| - config.browsers = ['last 2 version', 'Firefox ESR'] - config.cascade = false - config.inline = true -end - -# Github pages require relative links -activate :relative_assets -set :relative_links, true - -# Build Configuration -configure :build do - activate :minify_css - activate :minify_javascript - # activate :relative_assets - # activate :asset_hash - # activate :gzip -end diff --git a/apidocs/cloud-api-source/docker-compose.yml b/apidocs/cloud-api-source/docker-compose.yml deleted file mode 100644 index dc405f6e7f..0000000000 --- a/apidocs/cloud-api-source/docker-compose.yml +++ /dev/null @@ -1,4 +0,0 @@ -apidocs: - image: tutum/api-docs:latest - ports: - - "4567:4567" diff --git a/apidocs/cloud-api-source/font-selection.json b/apidocs/cloud-api-source/font-selection.json deleted file mode 100644 index 5e78f5d862..0000000000 --- a/apidocs/cloud-api-source/font-selection.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "IcoMoonType": "selection", - "icons": [ - { - "icon": { - "paths": [ - "M438.857 73.143q119.429 0 220.286 58.857t159.714 159.714 58.857 220.286-58.857 220.286-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857zM512 785.714v-108.571q0-8-5.143-13.429t-12.571-5.429h-109.714q-7.429 0-13.143 5.714t-5.714 13.143v108.571q0 7.429 5.714 13.143t13.143 5.714h109.714q7.429 0 12.571-5.429t5.143-13.429zM510.857 589.143l10.286-354.857q0-6.857-5.714-10.286-5.714-4.571-13.714-4.571h-125.714q-8 0-13.714 4.571-5.714 3.429-5.714 10.286l9.714 354.857q0 5.714 5.714 10t13.714 4.286h105.714q8 0 13.429-4.286t6-10z" - ], - "attrs": [], - "isMulticolor": false, - "tags": [ - "exclamation-circle" - ], - "defaultCode": 61546, - "grid": 14 - }, - "attrs": [], - "properties": { - "id": 100, - "order": 4, - "prevSize": 28, - "code": 58880, - "name": "exclamation-sign", - "ligatures": "" - }, - "setIdx": 0, - "iconIdx": 0 - }, - { - "icon": { - "paths": [ - "M585.143 786.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-54.857v-292.571q0-8-5.143-13.143t-13.143-5.143h-182.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h54.857v182.857h-54.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h256q8 0 13.143-5.143t5.143-13.143zM512 274.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-109.714q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h109.714q8 0 13.143-5.143t5.143-13.143zM877.714 512q0 119.429-58.857 220.286t-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857 220.286 58.857 159.714 159.714 58.857 220.286z" - ], - "attrs": [], - "isMulticolor": false, - "tags": [ - "info-circle" - ], - "defaultCode": 61530, - "grid": 14 - }, - "attrs": [], - "properties": { - "id": 85, - "order": 3, - "name": "info-sign", - "prevSize": 28, - "code": 58882 - }, - "setIdx": 0, - "iconIdx": 2 - }, - { - "icon": { - "paths": [ - "M733.714 419.429q0-16-10.286-26.286l-52-51.429q-10.857-10.857-25.714-10.857t-25.714 10.857l-233.143 232.571-129.143-129.143q-10.857-10.857-25.714-10.857t-25.714 10.857l-52 51.429q-10.286 10.286-10.286 26.286 0 15.429 10.286 25.714l206.857 206.857q10.857 10.857 25.714 10.857 15.429 0 26.286-10.857l310.286-310.286q10.286-10.286 10.286-25.714zM877.714 512q0 119.429-58.857 220.286t-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857 220.286 58.857 159.714 159.714 58.857 220.286z" - ], - "attrs": [], - "isMulticolor": false, - "tags": [ - "check-circle" - ], - "defaultCode": 61528, - "grid": 14 - }, - "attrs": [], - "properties": { - "id": 83, - "order": 9, - "prevSize": 28, - "code": 58886, - "name": "ok-sign" - }, - "setIdx": 0, - "iconIdx": 6 - }, - { - "icon": { - "paths": [ - "M658.286 475.429q0-105.714-75.143-180.857t-180.857-75.143-180.857 75.143-75.143 180.857 75.143 180.857 180.857 75.143 180.857-75.143 75.143-180.857zM950.857 950.857q0 29.714-21.714 51.429t-51.429 21.714q-30.857 0-51.429-21.714l-196-195.429q-102.286 70.857-228 70.857-81.714 0-156.286-31.714t-128.571-85.714-85.714-128.571-31.714-156.286 31.714-156.286 85.714-128.571 128.571-85.714 156.286-31.714 156.286 31.714 128.571 85.714 85.714 128.571 31.714 156.286q0 125.714-70.857 228l196 196q21.143 21.143 21.143 51.429z" - ], - "width": 951, - "attrs": [], - "isMulticolor": false, - "tags": [ - "search" - ], - "defaultCode": 61442, - "grid": 14 - }, - "attrs": [], - "properties": { - "id": 2, - "order": 1, - "prevSize": 28, - "code": 58887, - "name": "icon-search" - }, - "setIdx": 0, - "iconIdx": 7 - } - ], - "height": 1024, - "metadata": { - "name": "slate", - "license": "SIL OFL 1.1" - }, - "preferences": { - "showGlyphs": true, - "showQuickUse": true, - "showQuickUse2": true, - "showSVGs": true, - "fontPref": { - "prefix": "icon-", - "metadata": { - "fontFamily": "slate", - "majorVersion": 1, - "minorVersion": 0, - "description": "Based on FontAwesome", - "license": "SIL OFL 1.1" - }, - "metrics": { - "emSize": 1024, - "baseline": 6.25, - "whitespace": 50 - }, - "resetPoint": 58880, - "showSelector": false, - "selector": "class", - "classSelector": ".icon", - "showMetrics": false, - "showMetadata": true, - "showVersion": true, - "ie7": false - }, - "imagePref": { - "prefix": "icon-", - "png": true, - "useClassSelector": true, - "color": 4473924, - "bgColor": 16777215 - }, - "historySize": 100, - "showCodes": true, - "gridSize": 16, - "showLiga": false - } -} diff --git a/apidocs/cloud-api-source/publish.sh b/apidocs/cloud-api-source/publish.sh deleted file mode 100644 index 006e2da06b..0000000000 --- a/apidocs/cloud-api-source/publish.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -middleman build -aws s3 sync /app/build s3://${AWS_S3_BUCKET}/apidocs/docker-cloud/ --delete --acl public-read --region us-east-1 diff --git a/apidocs/cloud-api-source/source/fonts/slate.eot b/apidocs/cloud-api-source/source/fonts/slate.eot deleted file mode 100644 index 13c4839a19..0000000000 Binary files a/apidocs/cloud-api-source/source/fonts/slate.eot and /dev/null differ diff --git a/apidocs/cloud-api-source/source/fonts/slate.svg b/apidocs/cloud-api-source/source/fonts/slate.svg deleted file mode 100644 index 5f34982306..0000000000 --- a/apidocs/cloud-api-source/source/fonts/slate.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - diff --git a/apidocs/cloud-api-source/source/fonts/slate.ttf b/apidocs/cloud-api-source/source/fonts/slate.ttf deleted file mode 100644 index ace9a46a7e..0000000000 Binary files a/apidocs/cloud-api-source/source/fonts/slate.ttf and /dev/null differ diff --git a/apidocs/cloud-api-source/source/fonts/slate.woff b/apidocs/cloud-api-source/source/fonts/slate.woff deleted file mode 100644 index 1e72e0ee00..0000000000 Binary files a/apidocs/cloud-api-source/source/fonts/slate.woff and /dev/null differ diff --git a/apidocs/cloud-api-source/source/fonts/slate.woff2 b/apidocs/cloud-api-source/source/fonts/slate.woff2 deleted file mode 100644 index 7c585a7273..0000000000 Binary files a/apidocs/cloud-api-source/source/fonts/slate.woff2 and /dev/null differ diff --git a/apidocs/cloud-api-source/source/images/logo.png b/apidocs/cloud-api-source/source/images/logo.png deleted file mode 100644 index 407d4cc3bf..0000000000 Binary files a/apidocs/cloud-api-source/source/images/logo.png and /dev/null differ diff --git a/apidocs/cloud-api-source/source/images/navbar.png b/apidocs/cloud-api-source/source/images/navbar.png deleted file mode 100644 index df38e90d87..0000000000 Binary files a/apidocs/cloud-api-source/source/images/navbar.png and /dev/null differ diff --git a/apidocs/cloud-api-source/source/includes/_errors.md b/apidocs/cloud-api-source/source/includes/_errors.md deleted file mode 100644 index 52615c126d..0000000000 --- a/apidocs/cloud-api-source/source/includes/_errors.md +++ /dev/null @@ -1,28 +0,0 @@ -# Errors - - -> API response structure - -```json -{ - "error": "Descriptive error message" -} -``` - -The Docker Cloud API uses the following error codes: - - -Error Code | Meaning ----------- | ------- -400 | Bad Request -- There's a problem in the content of your request. Retrying the same request will fail. -401 | Unauthorized -- Your API key is wrong or your account has been deactivated. -402 | Payment Required -- You need to provide billing information to perform this request. -403 | Forbidden -- Quota limit exceeded. Contact support to request a quota increase. -404 | Not Found -- The requested object cannot be found. -405 | Method Not Allowed -- The endpoint requested does not implement the method sent. -409 | Conflict -- The object cannot be created or updated because another object exists with the same unique fields -415 | Unsupported Media Type -- Make sure you are using `Accept` and `Content-Type` headers as `application/json` and that the data your are `POST`-ing or `PATCH`-ing is in valid JSON format. -429 | Too Many Requests -- You are being throttled because of too many requests in a short period of time. -500 | Internal Server Error -- There was a server error while processing your request. Try again later, or contact support. -503 | Service Unavailable -- We're temporarily offline for maintenance. Try again later. -504 | Gateway Timeout -- Our API servers are at full capacity. Try again later. \ No newline at end of file diff --git a/apidocs/cloud-api-source/source/includes/action.md b/apidocs/cloud-api-source/source/includes/action.md deleted file mode 100644 index fcbae2f329..0000000000 --- a/apidocs/cloud-api-source/source/includes/action.md +++ /dev/null @@ -1,353 +0,0 @@ -# Actions - -## Action - -> Example - -```json -{ - "action": "Cluster Create", - "end_date": "Wed, 17 Sep 2014 08:26:22 +0000", - "ip": "56.78.90.12", - "is_user_action": true, - "can_be_canceled": false, - "location": "New York, USA", - "method": "POST", - "object": "/api/infra/v1/user_namespace/cluster/eea638f4-b77a-4183-b241-22dbd7866f22/", - "path": "/api/infra/v1/user_namespace/cluster/", - "resource_uri": "/api/audit/v1/action/6246c558-976c-4df6-ba60-eb1a344a17af/", - "start_date": "Wed, 17 Sep 2014 08:26:22 +0000", - "state": "Success", - "user": "user_namespace", - "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.78.2 (KHTML, like Gecko) Version/7.0.6 Safari/537.78.2", - "uuid": "6246c558-976c-4df6-ba60-eb1a344a17af" -} -``` - -An action represents an API call by a user. Details of the API call such as timestamp, origin IP address, and user agent are logged in the action object. - -Simple API calls that do not require asynchronous execution will return immediately with the appropriate HTTP error code and an action object will be created either in `Success` or `Failed` states. API calls that do require asynchronous execution will return HTTP code `202 Accepted` immediately and create an action object in `In progress` state, which will change to `Success` or `Failed` state depending on the outcome of the operation being performed. In both cases the response will include a `X-DockerCloud-Action-URI` header with the resource URI of the created action. - - -### Attributes - -| Attribute | Description | -|:----------------|:-----------------------------------------------------------------------------------| -| resource_uri | A unique API endpoint that represents the action | -| uuid | A unique identifier for the action generated automatically on creation | -| object | The API object (resource URI) to which the action applies to | -| action | Name of the operation performed/being performed | -| method | HTTP method used to access the API | -| path | HTTP path of the API accessed | -| user | The user authenticated in the request that created the action | -| user_agent | The user agent provided by the client when accessing the API endpoint | -| start_date | Date and time when the API call was performed and the operation started processing | -| end_date | Date and time when the API call finished processing | -| state | State of the operation (see table below) | -| ip | IP address of the user that performed the API call | -| location | Geographic location of the IP address of the user that performed the API call | -| is_user_action | If the action has been triggered by the user | -| can_be_canceled | If the action can be canceled by the user in the middle of its execution | -| can_be_retried | If the action can be retried by the user | - - -### Action states - -| State | Description | -|:------------|:---------------------------------------------------------------------------------------------| -| Pending | The action needed asynchronous execution and it is waiting for an in progress action | -| In progress | The action needed asynchronous execution and is being performed | -| Canceling | The action is being canceled by user request | -| Canceled | The action has been canceled | -| Success | The action was executed successfully | -| Failed | There was an issue when the action was being performed. Check the logs for more information. | - - -## List all actions - -```python -import dockercloud - -actions = dockercloud.Action.list() -``` -```go -import "github.com/docker/go-dockercloud/dockercloud" - -actionList, err := dockercloud.ListActions() - -if err != nil { - log.Println(err) -} - -log.Println(actionList) -``` - -```http -GET /api/audit/v1/action/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud action ls -``` - -Lists all actions in chronological order. Returns a list of `Action` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/audit/v1/action/` - -### Query Parameters - -| Parameter | Description | -|:----------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| uuid | Filter by UUID. | -| state | Filter by state. Possible values: `In progress`, `Success`, `Failed` | -| start_date | Filter by start date. Valid filtering values are `start_date__gte` (after or on the date supplied) and `start_date__lte` (before or on the date supplied) | -| end_date | Filter by end date. Valid filtering values are `end_date__gte` (after or on the date supplied) and `end_date__lte` (before or on the date supplied) | -| object | Filter by resource URI of the related object. This filter can only be combined with 'include_related' filter | -| include_related | There is a parent-child relationship between Docker Cloud objects, described in table `Relationships between Docker Cloud objects`. If set to 'true', will include the actions of the related objects to the object specified in "object" filter parameter. Possible values: 'true' or 'false' | - - -## Relationships between Docker Cloud objects - -| Object | Relationships | -|:-------------|:-------------------------------------------------------------------------------| -| Container | Container, service, stack (if any) | -| Service | All containers in the service, service, stack (if any) | -| Stack | All services in the stack, all containers in every service in the stack, stack | -| Node | Node, node cluster (if any) | -| Node cluster | All nodes in the cluster, node cluster | - - -## Get an action by UUID - -```python -import dockercloud - -action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -log.Println(action) -``` - -```http -GET /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud action inspect 7eaf7fff -``` - - -Get all the details of an specific action - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/audit/v1/action/(uuid)/` - -### Path Parameters - -| Parameter | Description | -|:----------|:-----------------------------------| -| uuid | The UUID of the action to retrieve | - - -## Get the logs of an action - -> Example log line - -```json -{ - "type": "log", - "log": "Log line from the action", - "timestamp": 1433779324 -} -``` - -```python -import dockercloud - -def log_handler(message): - print message - -action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -action.logs(tail=300, follow=True, log_handler=log_handler) -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -c := make(chan dockercloud.Logs) -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -go action.GetLogs(c) - -for { - log.Println(<-c) -} -``` - -```http -GET /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1 -Host: ws.cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Connection: Upgrade -Upgrade: websocket -``` - -```shell -docker-cloud action logs 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce -``` - - -Get the logs of the specified action. - - -### Endpoint Type - -Available in Docker Cloud's **STREAM API** - -### HTTP Request - -`GET /api/audit/v1/action/(uuid)/logs/` - -### Path Parameters - -| Parameter | Description | -|:----------|:----------------------------------------| -| uuid | The UUID of the action to retrieve logs | - -### Query Parameters - -| Parameter | Description | -|:----------|:---------------------------------------------------------------------------| -| tail | Number of lines to show from the end of the logs (default: `300`) | -| follow | Whether to stream logs or close the connection immediately (default: true) | - -## Cancel an action - -```http -POST /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/cancel/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -action, err = action.Cancel() - -if err != nil { - log.Println(err) -} - -log.Println(action) -``` - -Cancels an action in Pending or In progress state. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/audit/v1/action/(uuid)/cancel/` - -### Path Parameters - -| Parameter | Description | -|:----------|:---------------------------------| -| uuid | The UUID of the action to cancel | - - -## Retry an action - -```python -import dockercloud - -def log_handler(message): - print message - -action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -action.logs(tail=300, follow=True, log_handler=log_handler) -``` - -```http -POST /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/retry/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -action, err = action.Retry() - -if err != nil { - log.Println(err) -} - -log.Println(action) -``` - -```shell -docker-cloud action logs 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce -``` - -Retries an action in Success, Failed or Canceled state. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/audit/v1/action/(uuid)/retry/` - -### Path Parameters - -| Parameter | Description | -|:----------|:--------------------------------| -| uuid | The UUID of the action to retry | diff --git a/apidocs/cloud-api-source/source/includes/availabilityzone.md b/apidocs/cloud-api-source/source/includes/availabilityzone.md deleted file mode 100644 index 26e96960a9..0000000000 --- a/apidocs/cloud-api-source/source/includes/availabilityzone.md +++ /dev/null @@ -1,120 +0,0 @@ -# Availability Zones - -## Availability Zone - -> Example - -```json -{ - "available": true, - "name": "ap-northeast-1a", - "region": "/api/infra/v1/region/az/ap-northeast-1/", - "resource_uri": "/api/infra/v1/az/aws/ap-northeast-1/ap-northeast-1a/" -} -``` - -An Availability Zone is an isolated location inside a region. Providers that support availability zones: AWS - - -### Attributes - -Attribute | Description ---------- | ----------- -available | Whether the availability zone is currently available for new node deployments -name | An identifier for the availability zone -region | The resource URI of the region where the availability zone is allocated -resource_uri | A unique API endpoint that represents the zone - - -## List all availability zones - -```python -import dockercloud - -az = dockercloud.AZ.list() -``` - -```http -GET /api/infra/v1/az/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -az, err := dockercloud.ListAZ() -if err != nil { - log.Println(err) -} - -log.Println(az) -``` - -```shell -docker-cloud nodecluster az -``` - -Lists all availability zones from all regions of all supported cloud providers. Returns a list of `Availability Zone` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/infra/v1/az/` - -### Query Parameters - -Parameter | Description ---------- | ----------- -name | Filter by availability zone name -region | Filter by resource URI of the target region - - - -## Get an individual availability zone - -```python -import dockercloud - -az = dockercloud.AZ.fetch("aws/sa-east-1/sa-east-1a") -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -az, err := dockercloud.GetAZ("aws/sa-east-1/sa-east-1a") -if err != nil { - log.Println(err) -} - -log.Println(az) -``` - -```http -GET /api/infra/v1/az/aws/sa-east-1/sa-east-1a/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -Get all the details of a specific availability zone - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/infra/v1/az/(provider.name)/(region.name)/(name)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -name | The name of the availability zone to retrieve -provider | The name of the provider -region | The name of the region diff --git a/apidocs/cloud-api-source/source/includes/container.md b/apidocs/cloud-api-source/source/includes/container.md deleted file mode 100644 index 29fa9ca6b6..0000000000 --- a/apidocs/cloud-api-source/source/includes/container.md +++ /dev/null @@ -1,827 +0,0 @@ -# Containers - -## Container - -> Example - -```json -{ - "autodestroy": "OFF", - "autorestart": "OFF", - "bindings": [ - { - "volume": "/api/infra/v1/user_namespace/volume/1863e34d-6a7d-4945-aefc-8f27a4ab1a9e/", - "host_path": null, - "container_path": "/data", - "rewritable": true - }, - { - "volume": null, - "host_path": "/etc", - "container_path": "/etc", - "rewritable": true - } - ], - "cap_add": [ - "ALL" - ], - "cap_drop": [ - "NET_ADMIN", - "SYS_ADMIN" - ], - "container_envvars": [ - { - "key": "DB_1_ENV_DEBIAN_FRONTEND", - "value": "noninteractive" - }, - { - "key": "DB_1_ENV_MYSQL_PASS", - "value": "**Random**" - }, - { - "key": "DB_1_ENV_MYSQL_USER", - "value": "admin" - }, - { - "key": "DB_1_ENV_PATH", - "value": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - }, - { - "key": "DB_1_ENV_REPLICATION_MASTER", - "value": "**False**" - }, - { - "key": "DB_1_ENV_REPLICATION_PASS", - "value": "replica" - }, - { - "key": "DB_1_ENV_REPLICATION_SLAVE", - "value": "**False**" - }, - { - "key": "DB_1_ENV_REPLICATION_USER", - "value": "replica" - }, - { - "key": "DB_1_PORT", - "value": "tcp://172.16.0.3:3306" - }, - { - "key": "DB_1_PORT_3306_TCP", - "value": "tcp://172.16.0.3:3306" - }, - { - "key": "DB_1_PORT_3306_TCP_ADDR", - "value": "172.16.0.3" - }, - { - "key": "DB_1_PORT_3306_TCP_PORT", - "value": "3306" - }, - { - "key": "DB_1_PORT_3306_TCP_PROTO", - "value": "tcp" - }, - { - "key": "DB_ENV_DEBIAN_FRONTEND", - "value": "noninteractive" - }, - { - "key": "DB_ENV_MYSQL_PASS", - "value": "**Random**" - }, - { - "key": "DB_ENV_MYSQL_USER", - "value": "admin" - }, - { - "key": "DB_ENV_PATH", - "value": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - }, - { - "key": "DB_ENV_REPLICATION_MASTER", - "value": "**False**" - }, - { - "key": "DB_ENV_REPLICATION_PASS", - "value": "replica" - }, - { - "key": "DB_ENV_REPLICATION_SLAVE", - "value": "**False**" - }, - { - "key": "DB_ENV_REPLICATION_USER", - "value": "replica" - }, - { - "key": "DB_PASS", - "value": "szVaPz925B7I" - }, - { - "key": "DB_PORT", - "value": "tcp://172.16.0.3:3306" - }, - { - "key": "DB_PORT_3306_TCP", - "value": "tcp://172.16.0.3:3306" - }, - { - "key": "DB_PORT_3306_TCP_ADDR", - "value": "172.16.0.3" - }, - { - "key": "DB_PORT_3306_TCP_PORT", - "value": "3306" - }, - { - "key": "DB_PORT_3306_TCP_PROTO", - "value": "tcp" - }, - { - "key": "DB_DOCKERCLOUD_API_URL", - "value": "https://cloud.docker.com/api/app/v1/user_namespace/service/c0fed1dc-c528-40c9-aa4c-dc00672ebcbf/" - } - ], - "container_ports": [ - { - "endpoint_uri": "http://wordpress-stackable-1.admin.cont.dockerapp.io:49153/", - "inner_port": 80, - "outer_port": 49153, - "port_name": "http", - "protocol": "tcp", - "published": true, - "uri_protocol": "http" - } - ], - "cpu_shares": 100, - "cpuset": "0,1", - "cgroup_parent": "m-executor-abcd", - "deployed_datetime": "Thu, 16 Oct 2014 12:04:08 +0000", - "destroyed_datetime": null, - "devices": [ - "/dev/ttyUSB0:/dev/ttyUSB0" - ], - "dns": [ - "8.8.8.8" - ], - "dns_search": [ - "example.com", - "c1dd4e1e-1356-411c-8613-e15146633640.local.dockerapp.io" - ], - "domainname": "domainname", - "entrypoint": "", - "exit_code": null, - "exit_code_msg": null, - "extra_hosts": [ - "onehost:50.31.209.229" - ], - "hostname": "hostname", - "image_name": "tutum/wordpress-stackable:latest", - "labels": { - "com.example.description": "Accounting webapp", - "com.example.department": "Finance", - "com.example.label-with-empty-value": "" - }, - "linked_to_container": [ - { - "endpoints": { - "3306/tcp": "tcp://172.16.0.3:3306" - }, - "from_container": "/api/app/v1/user_namespace/container/c1dd4e1e-1356-411c-8613-e15146633640/", - "name": "DB_1", - "to_container": "/api/app/v1/user_namespace/container/ba434e1e-1234-411c-8613-e15146633640/" - } - ], - "link_variables": { - "WORDPRESS_STACKABLE_1_ENV_DB_HOST": "**LinkMe**", - "WORDPRESS_STACKABLE_1_ENV_DB_NAME": "wordpress", - "WORDPRESS_STACKABLE_1_ENV_DB_PASS": "szVaPz925B7I", - "WORDPRESS_STACKABLE_1_ENV_DB_PORT": "**LinkMe**", - "WORDPRESS_STACKABLE_1_ENV_DB_USER": "admin", - "WORDPRESS_STACKABLE_1_ENV_DEBIAN_FRONTEND": "noninteractive", - "WORDPRESS_STACKABLE_1_ENV_HOME": "/", - "WORDPRESS_STACKABLE_1_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", - "WORDPRESS_STACKABLE_1_PORT": "tcp://172.16.0.2:80", - "WORDPRESS_STACKABLE_1_PORT_80_TCP": "tcp://172.16.0.2:80", - "WORDPRESS_STACKABLE_1_PORT_80_TCP_ADDR": "172.16.0.2", - "WORDPRESS_STACKABLE_1_PORT_80_TCP_PORT": "80", - "WORDPRESS_STACKABLE_1_PORT_80_TCP_PROTO": "tcp", - "WORDPRESS_STACKABLE_ENV_DB_HOST": "**LinkMe**", - "WORDPRESS_STACKABLE_ENV_DB_NAME": "wordpress", - "WORDPRESS_STACKABLE_ENV_DB_PASS": "szVaPz925B7I", - "WORDPRESS_STACKABLE_ENV_DB_PORT": "**LinkMe**", - "WORDPRESS_STACKABLE_ENV_DB_USER": "admin", - "WORDPRESS_STACKABLE_ENV_DEBIAN_FRONTEND": "noninteractive", - "WORDPRESS_STACKABLE_ENV_HOME": "/", - "WORDPRESS_STACKABLE_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", - "WORDPRESS_STACKABLE_PORT": "tcp://172.16.0.2:80", - "WORDPRESS_STACKABLE_PORT_80_TCP": "tcp://172.16.0.2:80", - "WORDPRESS_STACKABLE_PORT_80_TCP_ADDR": "172.16.0.2", - "WORDPRESS_STACKABLE_PORT_80_TCP_PORT": "80", - "WORDPRESS_STACKABLE_PORT_80_TCP_PROTO": "tcp" - }, - "mac_address": "02:42:ac:11:65:43", - "memory": 1024, - "memory_swap": 4096, - "name": "wordpress-stackable", - "net": "bridge", - "node": "/api/infra/v1/user_namespace/node/9691c44e-3155-4ca2-958d-c9571aac0a14/", - "pid": "none", - "private_ip": "10.7.0.1", - "privileged": false, - "public_dns": "wordpress-stackable-1.admin.cont.dockerapp.io", - "read_only": true, - "resource_uri": "/api/app/v1/user_namespace/container/c1dd4e1e-1356-411c-8613-e15146633640/", - "roles": ["global"], - "run_command": "/run-wordpress.sh", - "security_opt": [ - "label:user:USER", - "label:role:ROLE" - ], - "service": "/api/app/v1/user_namespace/service/adeebc1b-1b81-4af0-b8f2-cefffc69d7fb/", - "started_datetime": "Thu, 16 Oct 2014 12:04:08 +0000", - "state": "Running", - "stdin_open": false, - "stopped_datetime": null, - "synchronized": true, - "tty": false, - "user": "root", - "uuid": "c1dd4e1e-1356-411c-8613-e15146633640", - "working_dir": "/app" -} -``` - - -A container is a representation of a Docker container in a node. - -This is a [namespaced endpoint](#namespaced-endpoints). - -### Attributes - -Attribute | Description ---------- | ----------- -uuid | A unique identifier for the container generated automatically on creation -resource_uri | A unique API endpoint that represents the container -image_name | The Docker image name and tag of the container -bindings | A list of volume bindings that the container has mounted (see table `Container Binding attributes` below) -name | A user provided name for the container (inherited from the service) -node | The resource URI of the node where this container is running -service | The resource URI of the service which this container is part of -public_dns | The external FQDN of the container -state | The state of the container (see table `Container states` below) -synchronized | Flag indicating if the container is synchronized with the current service definition. -exit_code | The numeric exit code of the container (if applicable, `null` otherwise) -exit_code_msg | A string representation of the exit code of the container (if applicable, `null` otherwise) -deployed_datetime | The date and time of the last deployment of the container (if applicable, `null` otherwise) -started_datetime | The date and time of the last `start` operation on the container (if applicable, `null` otherwise) -stopped_datetime | The date and time of the last `stop` operation on the container (if applicable, `null` otherwise) -destroyed_datetime | The date and time of the `terminate` operation on the container (if applicable, `null` otherwise) -container_ports | List of published ports of this container (see table `Container Port attributes` below) -container_envvars | List of user-defined environment variables set on the containers of the service, which will override the container environment variables (see table `Container Environment Variable attributes` below) -labels | Container metadata in form of dictionary -working_dir | Working directory for running binaries within a container -user | User used on the container on launch -hostname | Hostname used on the container on launch -domainname | Domainname used on the container on launch -mac_address | Ethernet device's MAC address used on the container on launch -cgroup_name | Optional parent cgroup for the container. -tty | If the container has the tty enable -stdin_open | If the container has stdin opened -dns | Container custom DNS servers -dns_search | Container custom DNS search domain -cap_add | Container added capabilities -cap_drop | Container dropped capabilities -devices | List of container device mappings -extra_hosts | List of container hostname mappings -secuirty_opt | Labeling scheme of this container -entrypoint | Entrypoint used on the container on launch -run_command | Run command used on the container on launch -cpu_shares | The relative CPU priority of the container (see [Runtime Constraints on CPU and Memory](/engine/reference/run/#runtime-constraints-on-cpu-and-memory) for more information) -cpuset | CPUs in which execution is allowed -memory | The memory limit of the container in MB (see [Runtime Constraints on CPU and Memory](/engine/reference/run/#runtime-constraints-on-cpu-and-memory) for more information) -memory_swap | Total memory limit (memory + swap) of the container in MB -autorestart | Whether to restart the container automatically if it stops (see [Crash recovery](/docker-cloud/apps/autorestart/) for more information) -autodestroy | Whether to terminate the container automatically if it stops (see [Autodestroy](/docker-cloud/apps/auto-destroy/) for more information) -roles | List of Docker Cloud roles asigned to this container (see [API roles](/docker-cloud/apps/api-roles/) for more information)) -linked_to_container | List of IP addresses of the linked containers (see table `Container Link attributes` below and [Service links](/docker-cloud/apps/service-links/) for more information) -link_variables | List of environment variables that would be exposed in any container that is linked to this one -privileged | Whether the container has Docker's `privileged` flag set or not (see [Runtime privilege](/engine/reference/run/#runtime-privilege-linux-capabilities-and-lxc-configuration) for more information) -read_only | Whether the container filesystem is read-only or not -private_ip | IP address of the container on the overlay network. This IP will be reachable from any other container. -net | Network mode set on the container (see table `Network Modes` below, [more information](/engine/reference/run/#network-settings)) -pid | PID (Process) Namespace mode for the container ([more information](/engine/reference/run/#pid-settings-pid)) - - -### Container Binding attributes - -Attribute | Description ---------- | ----------- -host_path | The host path of the volume -container_path | The container path where the volume is mounted -rewritable | `true` is the volume has writable permissions -volume | The resource URI of the volume - - -### Container Port attributes - -Attribute | Description ---------- | ----------- -protocol | The protocol of the port, either `tcp` or `udp` -inner_port | The published port number inside the container -outer_port | The published port number in the node public network interface -port_name | Name of the service associated to this port -uri_protocol | The protocol to be used in the endpoint for this port, such as `http` -endpoint_uri | The URI of the endpoint for this port -published | Whether the port has been published in the host public network interface or not. Non-published ports can only be accessed via links. - - -### Container Environment Variable attributes - -Attribute | Description ---------- | ----------- -key | The name of the environment variable -value | The value of the environment variable - - -### Container States - -State | Description ------ | ----------- -Starting | The container is being deployed or started (from Stopped). No actions allowed in this state. -Running | The container is deployed and running. Possible actions in this state: `stop`, `terminate`. -Stopping | The container is being stopped. No actions allowed in this state. -Stopped | The container is stopped. Possible actions in this state: `start`, `terminate`. -Terminating | The container is being deleted. No actions allowed in this state. -Terminated | The container has been deleted. No actions allowed in this state. - - -### Network Modes - -Strategy | Description --------- | ----------- -bridge | Creates a new network stack for the container on the docker bridge. -host | Uses the host network stack inside the container. - - -### Container Link attributes - -Attribute | Description ---------- | ----------- -name | The name given to the link -from_container | The resource URI of the "client" container -to_container | The resource URI of the "server" container being linked -endpoints | A dictionary with the endpoints (protocol, IP and port) to be used to reach each of the "server" container exposed ports - - -## List all containers - -```python -import dockercloud - -containers = dockercloud.Container.list() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -containerList, err := dockercloud.ListContainers() - -if err != nil { - log.Println(err) -} - -log.Println(containerList) -``` - -```http -GET /api/app/v1/container/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud container ps -``` - -Lists all current and recently terminated containers. Returns a list of `Container` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/app/v1/[optional_namespace/]container/` - -### Query Parameters - -Parameter | Description ---------- | ----------- -uuid | Filter by UUID -state | Filter by state. Possible values: `Starting`, `Running`, `Stopping`, `Stopped`, `Terminating`, `Terminated` -name | Filter by container name -service | Filter by resource URI of the target service. -node | Filter by resource URI of the target node. - -## Get an existing container - -```python -import dockercloud - -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -container, err := dockerckoud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -log.Println(container) -``` - - -```http -GET /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud container inspect 7eaf7fff -``` - -Get all the details of an specific container - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/app/v1/[optional_namespace/]container/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the container to retrieve - - -## Get the logs of a container - -> Example log line - -```json -{ - "type": "log", - "log": "Log line from the container", - "streamType": "stdout", - "timestamp": 1433779324 -} -``` - -```python -import dockercloud - -def log_handler(message): - print message - -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -container.logs(tail=300, follow=True, log_handler=log_handler) -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -container, err := dockercloud.GetContainer("447ecddc-2890-4ea2-849b-99392e0dd7a6") - -if err != nil { - log.Fatal(err) -} -c := make(chan dockercloud.Logs) - -go container.Logs(c) - for { - s := <-c - log.Println(s) - } -``` - -```http -GET /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1 -Host: ws.cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Connection: Upgrade -Upgrade: websocket -``` - -```shell -docker-cloud container logs 7eaf7fff -``` - -Get the logs of the specified container. - -### Endpoint Type - -Available in Docker Cloud's **STREAM API** - -### HTTP Request - -`GET /api/app/v1/[optional_namespace/]container/(uuid)/logs/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the container to retrieve logs - -### Query Parameters - -Parameter | Description ---------- | ----------- -tail | Number of lines to show from the end of the logs (default: `300`) -follow | Whether to stream logs or close the connection immediately (default: true) -service | Filter by service (resource URI) - - -## Start a container - -```python -import dockercloud - -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -container.start() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -if err = container.Start(); err != nil { - log.Println(err) -} -``` - -```http -POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud container start 7eaf7fff -``` - -Starts a stopped container. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]container/(uuid)/start/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the container to start - - -## Stop a container - -```python -import dockercloud - -container = dockerlcoud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -container.stop() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -if err = container.Stop(); err != nil { - log.Println(err) - } -``` - -```http -POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/stop/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud container stop 7eaf7fff -``` - -Stops a running container. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]container/(uuid)/stop/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the container to stop - - - -## Redeploy a container - -```python -import dockercloud - -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -container.redeploy() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: true) to reuse the existing volumes -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}) to not reuse the existing volumes -if err = container.Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}); err != nil { - log.Println(err) -} -``` - -```http -POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud container redeploy 7eaf7fff -``` - -Redeploys a container. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]container/(uuid)/redeploy/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the container to redeploy - -### Query Parameters - -Parameter | Description ---------- | ----------- -reuse_volumes | Whether to reuse container volumes for this redeploy operation or not (default: `true`). - - -## Terminate a container - -```python -import dockercloud - -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -container.delete() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -if err = container.Terminate(); err != nil { - log.Println(err) - } -``` - - -```http -DELETE /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud container terminate 7eaf7fff -``` - -Terminates the specified container. This is not reversible. All data stored in the container will be permanently deleted. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`DELETE /api/app/v1/[optional_namespace/]container/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the container to terminate - - -## Execute command inside a container - -``` -import dockercloud - -def msg_handler(message): - print message - -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -container.execute("ls", handler=msg_handler) -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -c := make(chan dockercloud.Exec) - -container.Exec("ls", c) - -``` - -```http -GET /api/app/v1/container/(uuid)/exec/ HTTP/1.1 -Host: ws.cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Connection: Upgrade -Upgrade: websocket -``` - - -``` -docker-cloud exec 7eaf7fff ls -``` - -Executes a command inside the specified running container, creating a bi-directional stream for the process' standard input and output. This endpoint can be connected to using a bi-directional Secure Web Socket `wss://ws.cloud.docker.com/api/app/v1/container/(uuid)/exec/` - -### Endpoint Type - -Available in Docker Cloud's **STREAM API** - -### HTTP Request - -`GET /api/app/v1/[optional_namespace/]container/(uuid)/exec/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the container where the command will be executed - -### Query Parameters - -Parameter | Description ---------- | ----------- -command | Command to be executed (default: `sh`) diff --git a/apidocs/cloud-api-source/source/includes/dockercloud-events.md b/apidocs/cloud-api-source/source/includes/dockercloud-events.md deleted file mode 100644 index b611f9e77c..0000000000 --- a/apidocs/cloud-api-source/source/includes/dockercloud-events.md +++ /dev/null @@ -1,135 +0,0 @@ -# Docker Cloud Events - -## Docker Cloud Event - -> Example - -```json -{ - "type": "action", - "action": "update", - "parents": [ - "/api/app/v1/user_namespace/container/0b0e3538-88df-4f07-9aed-3a3cc4175076/" - ], - "resource_uri": "/api/app/v1/user_namespace/action/49f0efe8-a704-4a10-b02f-f96344fabadd/", - "state": "Success", - "uuid": "093ba3bb-08dd-48f0-8f12-4d3b85ef85b3", - "datetime": "2016-02-01T16:47:28Z" -} -``` - -Docker Cloud events are generated every time any of the following objects is created or changes state: - -* Stack -* Service -* Container -* Node Cluster -* Node -* Action - -This is a [namespaced endpoint](#namespaced-endpoints). - -### Attributes - -| Attribute | Description | -|:-------------|:---------------------------------------------------------------------------------------------------------------------------------| -| type | Type of object that was created or updated. For possible values, check the [events types](#event-types) table below. | -| action | Type of action that was executed on the object. Possible values: `create`, `update` or `delete` | -| parents | List of resource URIs (REST API) of the parents of the object, according to the "Parent-child hierarchy" table below | -| resource_uri | Resource URI (REST API) of the object that was created or updated. You can do a `GET` operation on this URL to fetch its details | -| state | The current state of the object | -| uuid | Unique identifier for the event | -| datetime | Date and time of the event in ISO 8601 format | - - -### Event types - -| Type | Description | -|:------------|:-----------------------------------------------------------------------------------------------| -| stack | Whenever a `Stack` is created or updated | -| service | Whenever a `Service` is created or updated | -| container | Whenever a `Container` is created or updated | -| nodecluster | Whenever a `Node Cluster` is created or updated | -| node | Whenever a `Node` is created or updated | -| action | Whenever a `Action` is created or updated | -| error | Sent when an error occurs on the websocket connection or as part of the authentication process | - - -### Parent-child hierarchy - -| Object type | Parent types | -|:-------------|:----------------------------------------| -| Stack | (None) | -| Service | Stack | -| Container | Service, Stack, Node, Node Cluster | -| Node Cluster | (None) | -| Node | Node Cluster | -| Action | (object to which the action applies to) | - - -## Listen to new Docker Cloud Events - -```python -import dockercloud - -def process_event(event): - print event - -events = dockercloud.Events() -events.on_message(process_event) -events.run_forever() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -// Listens for container events only -myFilter := dockercloud.NewStreamFilter(&dockercloud.EventFilter{Type: "container"}) - -stream := dockercloud.NewStream(myFilter) - -if err := stream.Connect(); err == nil { - go stream.RunForever() -} else { - log.Print("Connect err: " + err.Error()) -} - -for { - select { - case event := <-stream.MessageChan: - log.Println(event) - case err := <-stream.ErrorChan: - log.Println(err) - } -} -``` - -```http -GET /api/audit/v1/events/ HTTP/1.1 -Host: ws.cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Connection: Upgrade -Upgrade: websocket -``` - -```shell -docker-cloud event -``` - -Listens for new Docker Cloud Events - -### Endpoint Type - -Available in Docker Cloud's **STREAM API** - -### HTTP Request - -`GET /api/audit/v1/[optional_namespace/]events/` - -### Query Parameters - -Parameter | Description ---------- | ----------- -type | Filter by type -object | Filter by object resource URI -parent | Filter by object parents diff --git a/apidocs/cloud-api-source/source/includes/node.md b/apidocs/cloud-api-source/source/includes/node.md deleted file mode 100644 index 71293c0e62..0000000000 --- a/apidocs/cloud-api-source/source/includes/node.md +++ /dev/null @@ -1,370 +0,0 @@ -# Nodes - -## Node - -> Example - -```json -{ - "availability_zone": "/api/infra/v1/az/testing-provider/testing-region/testing-az/", - "cpu": 1, - "current_num_containers": 4, - "deployed_datetime": "Tue, 16 Sep 2014 17:01:15 +0000", - "destroyed_datetime": null, - "disk": 60, - "docker_execdriver": "native-0.2", - "docker_graphdriver": "aufs", - "docker_version": "1.5.0", - "external_fqdn": "fc1a5bb9-user.node.dockerapp.io", - "last_seen": "Thu, 25 Sep 2014 13:14:44 +0000", - "memory": 1792, - "nickname": "fc1a5bb9-user.node.dockerapp.io", - "node_cluster": "/api/infra/v1/user_namespace/nodecluster/d787a4b7-d525-4061-97a0-f423e8f1d229/", - "node_type": "/api/infra/v1/user_namespace/nodetype/testing-provider/testing-type/", - "public_ip": "10.45.2.11", - "region": "/api/infra/v1/region/testing-provider/testing-region/", - "resource_uri": "/api/infra/v1/user_namespace/node/fc1a5bb9-17f5-4819-b667-8c7cd819e949/", - "state": "Deployed", - "tags": [ - {"name": "tag_one"}, - {"name": "tag-two"} - ], - "tunnel": "https://tunnel01.cloud.docker.com:12345", - "uuid": "fc1a5bb9-17f5-4819-b667-8c7cd819e949" -} -``` - -A node is a virtual machine provided by a cloud provider where containers can be deployed. - -This is a [namespaced endpoint](#namespaced-endpoints). - -### Attributes - -Attribute | Description ---------- | ----------- -availability_zone | The resource URI of the availability zone where the node is deployed, if any -uuid | A unique identifier for the node generated automatically on creation -resource_uri | A unique API endpoint that represents the node -external_fqdn | An automatically generated FQDN for the node. Containers deployed on this node will inherit this FQDN. -state | The state of the node. See the below table for a list of possible states. -node_cluster | The resource URI of the node cluster to which this node belongs to (if applicable) -node_type | The resource URI of the node type used for the node -region | The resource URI of the region where the node is deployed -docker_execdriver | Docker's execution driver used in the node -docker_graphdriver | Docker's storage driver used in the node -docker_version | Docker's version used in the node -cpu | Node number of CPUs -disk | Node storage size in GB -memory | Node memory in MB -current_num_containers | The actual number of containers deployed in this node -last_seen | Date and time of the last time the node was contacted by Docker Cloud -public_ip | The public IP allocated to the node -tunnel | If the node does not accept incoming connections to port 2375, the address of the reverse tunnel to access the docker daemon, or `null` otherwise -deployed_datetime | The date and time when this node cluster was deployed -destroyed_datetime | The date and time when this node cluster was terminated (if applicable) -tags | List of tags to identify the node when deploying services (see [Tags](/docker-cloud/apps/deploy-tags/) for more information) -nickname | A user-friendly name for the node (`external_fqdn` by default) - - -### Node states - -State | Description ------ | ----------- -Deploying | The node is being deployed in the cloud provider. No actions allowed in this state. -Deployed | The node is deployed and provisioned and is ready to deploy containers. Possible actions in this state: `terminate`, `docker-upgrade`. -Unreachable | The node is deployed but Docker Cloud cannot connect to the docker daemon. Possible actions in this state: `health-check` and `terminate`. -Upgrading | The node docker daemon is being upgraded. No actions allowed in this state. -Terminating | The node is being terminated in the cloud provider. No actions allowed in this state. -Terminated | The node has been terminated and is no longer present in the cloud provider. No actions allowed in this state. - - -## List all nodes - -```python -import dockercloud - -nodes = dockercloud.Node.list() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -nodeList, err := dockercloud.ListNodes() - -if err != nil { - log.Println(err) -} - -log.Println(nodeList) -``` - -```http -GET /api/infra/v1/node/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud node ls -``` - -Lists all current and recently terminated nodes. Returns a list of `Node` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/infra/v1/[optional_namespace/]node/` - -### Query Parameters - -Parameter | Description ---------- | ----------- -uuid | Filter by UUID -state | Filter by state. Possible values: `Deploying`, `Deployed`, `Unreachable`, `Upgrading`, `Terminating`, `Terminated` -node_cluster | Filter by resource URI of the target node cluster -node_type | Filter by resource URI of the target node type -region | Filter by resource URI of the target region -docker_version | Filter by Docker engine version running in the nodes - - - -## Get an existing node - -```python -import dockercloud - -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -log.Println(node) -``` - -```http -GET /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud node inspect 7eaf7fff -``` - -Get all the details of an specific node - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/infra/v1/[optional_namespace/]node/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the node to retrieve - - -## Update a node - -```python -import dockercloud - -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -node.tags.add(["tag-1"]) -node.save() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -if err = node.Update(dockercloud.Node{Tags: []string{{Name: "tag-1"}}}); err != nil { - log.Println(err) -} -``` - -```http -PATCH /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json - -{"tags": [{"name": "tag-1"}], "nickname": "dev node"} -``` - -```shell -docker-cloud tag add -t tag-1 7eaf7fff -docker-cloud tag set -t tag-2 7eaf7fff -``` - -Names the node with a user-friendly name and/or replaces the old tags for the new list provided. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`PATCH /api/infra/v1/[optional_namespace/]node/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the node to retrieve - -### JSON Parameters - -Parameter | Description ---------- | ----------- -nickname | (optional) A user-friendly name for the node (`external_fqdn` by default) -tags | (optional) List of tags the node will have. This operation replaces the user tag list. - - -## Upgrade Docker Daemon - -```python -import dockercloud - -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -node.upgrade_docker() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -if err = node.Upgrade(); err != nil { - log.Println(err) - } -``` - -```http -POST /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/docker-upgrade/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud node upgrade 7eaf7fff -``` - -Upgrades the docker daemon of the node. This will restart your containers on that node. See [Docker upgrade](/docker-cloud/infrastructure/docker-upgrade/) for more information. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/infra/v1/[optional_namespace/]node/(uuid)/docker-upgrade/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the node to upgrade - - -## Perform a health check of a node - -```http -POST /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/health-check/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -Tests connectivity between Docker Cloud and the node. Updates the node status to `Deployed` if the check was successful, or to `Unreachable` otherwise. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/infra/v1/[optional_namespace/]node/(uuid)/health-check/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the node to perform the health check to - - -## Terminate a node - -```python -import dockercloud - -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -node.delete() -``` - -```http -DELETE /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -if err = node.Terminate(); err != nil { - log.Println(err) -} -``` - -```shell -docker-cloud node rm 7eaf7fff -``` - -Terminates the specified node. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`DELETE /api/infra/v1/[optional_namespace/]node/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the node to terminate diff --git a/apidocs/cloud-api-source/source/includes/nodecluster.md b/apidocs/cloud-api-source/source/includes/nodecluster.md deleted file mode 100644 index e3ed9c2308..0000000000 --- a/apidocs/cloud-api-source/source/includes/nodecluster.md +++ /dev/null @@ -1,412 +0,0 @@ -# Node Clusters - -## Node Cluster - -> Example - -```json -{ - "current_num_nodes": 1, - "deployed_datetime": "Tue, 16 Sep 2014 17:01:15 +0000", - "destroyed_datetime": null, - "disk": 60, - "nickname": "my test cluster", - "name": "TestCluster", - "node_type": "/api/infra/v1/nodetype/aws/t2.micro/", - "nodes": [ - "/api/infra/v1/user_namespace/node/75d20367-0948-4f10-8ba4-ffb4d16ed3c6/" - ], - "region": "/api/infra/v1/region/aws/us-east-1/", - "resource_uri": "/api/infra/v1/user_namespace/nodecluster/5516df0b-721e-4470-b350-741ff22e63a0/", - "state": "Deployed", - "tags": [ - {"name": "tag_one"}, - {"name": "tag-two"}, - {"name": "tagthree3"} - ], - "target_num_nodes": 2, - "uuid": "5516df0b-721e-4470-b350-741ff22e63a0", - "provider_options": { - "vpc": { - "id": "vpc-aa1c70d4", - "subnets": ["subnet-aaa7d94f", "subnet-aa15fa64"], - "security_groups": ["sg-aa1c70d4"] - }, - "iam": { - "instance_profile_name": "my_instance_profile" - } - } -} -``` - -A node cluster is a group of nodes that share the same provider, region and/or availability zone, and node type. They are on the same private network. - -This is a [namespaced endpoint](#namespaced-endpoints). - - -### Attributes - -Attribute | Description ---------- | ----------- -uuid | A unique identifier for the node cluster generated automatically on creation -resource_uri | A unique API endpoint that represents the node cluster -name | A user provided name for the node cluster -state | The state of the node cluster. See the below table for a list of possible states. -node_type | The resource URI of the node type used for the node cluster -disk | The size of the disk where images and containers are stored (in GB) -nodes | A list of resource URIs of the `Node` objects on the node cluster -region | The resource URI of the `Region` object where the node cluster is deployed -target_num_nodes | The desired number of nodes for the node cluster -current_num_nodes | The actual number of nodes in the node cluster. This may differ from `target_num_nodes` if the node cluster is being deployed or scaled -deployed_datetime | The date and time when this node cluster was deployed -destroyed_datetime | The date and time when this node cluster was terminated (if applicable) -tags | List of tags to identify the node cluster nodes when deploying services (see [Tags](/docker-cloud/apps/deploy-tags/) for more information) -provider_options | Provider-specific extra options for the deployment of the node (see `Provider options` table below for more information) -nickname | A user-friendly name for the node cluster (`name` by default) - - -### Node Cluster states - -State | Description ------ | ----------- -Init | The node cluster has been created and has no deployed containers yet. Possible actions in this state: `deploy`, `terminate`. -Deploying | All nodes in the cluster are either deployed or being deployed. No actions allowed in this state. -Deployed | All nodes in the cluster are deployed and provisioned. Possible actions in this state: `terminate`. -Partly deployed | One or more nodes of the cluster are deployed and running. Possible actions in this state: `terminate`. -Scaling | The cluster is either deploying new nodes or terminating existing ones responding to a scaling request. No actions allowed in this state. -Terminating | All nodes in the cluster are either being terminated or already terminated. No actions allowed in this state. -Terminated | The node cluster and all its nodes have been terminated. No actions allowed in this state. -Empty cluster | There are no nodes deployed in this cluster. Possible actions in this state: `terminate`. - - -### Provider options - -You can specify the following options when using the Amazon Web Services provider: - -* `vpc`: VPC-related options (optional) - * `id`: AWS VPC identifier of the target VPC where the nodes of the cluster will be deployed (required) - * `subnets`: a list of target subnet identifiers inside selected VPC. If you specify more than one subnet, Docker Cloud will balance among all of them following a high-availability schema (optional) - * `security_groups`: the security group that will be applied to every node of the cluster (optional) -* `iam`: IAM-related options (optional) - * `instance_profile_name`: name of the instance profile (container for instance an IAM role) to attach to every node of the cluster (required) - - -## List all node clusters - -```python -import dockercloud - -nodeclusters = dockercloud.NodeCluster.list() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -nodeclusters, err := dockercloud.ListNodeClusters() - -if err != nil { - log.Println(err) -} - -log.Println(nodeclusters) -``` - -```http -GET /api/infra/v1/nodecluster/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud nodecluster ls -``` - -Lists all current and recently terminated node clusters. Returns a list of `NodeCluster` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/infra/v1/[optional_namespace/]nodecluster/` - -### Query Parameters - -Parameter | Description ---------- | ----------- -uuid | Filter by UUID -state | Filter by state. Possible values: `Init`, `Deploying`, `Deployed`, `Partly deployed`, `Scaling`, `Terminating`, `Terminated`, `Empty cluster` -name | Filter by node cluster name -region | Filter by resource URI of the target region -node_type | Filter by resource URI of the target node type - - -## Create a new node cluster - -```python -import dockercloud - -region = dockercloud.Region.fetch("digitalocean/lon1") -node_type = dockercloud.NodeType.fetch("digitalocean/1gb") -nodecluster = dockercloud.NodeCluster.create(name="my_cluster", node_type=node_type, region=region, disk=60) -nodecluster.save() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -nodecluster, err := dockercloud.CreateNodeCluster(dockercloud.NodeCreateRequest{Name: "my_cluster", Region: "/api/infra/v1/region/digitalocean/lon1/", NodeType: "/api/infra/v1/nodetype/digitalocean/1gb/", Target_num_nodes: 2}) - -if err != nil { - log.Println(err) -} - -log.Println(nodecluster) -``` - -```http -POST /api/infra/v1/nodecluster/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -Content-Type: application/json - -{"name": "my_cluster", "region": "/api/infra/v1/region/digitalocean/lon1/", "node_type": "/api/infra/v1/nodetype/digitalocean/1gb/", "disk": 60} -``` - -```shell -docker-cloud nodecluster create my_cluster digitalocean lon1 1gb -``` - -Creates a new node cluster without deploying it. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/infra/v1/[optional_namespace/]nodecluster/` - -### JSON Parameters - -Parameter | Description ---------- | ----------- -name | (required) A user provided name for the node cluster -node_type | (required) The resource URI of the node type to be used for the node cluster -region | (required) The resource URI of the region where the node cluster is to be deployed -disk | (optional) The size of the volume to create where images and containers will be stored, in GB (default: `60`). Not available for Digital Ocean. To create Softlayer nodes you must select one of the following sizes (in GBs): 10, 20, 25, 30, 40, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400, 500, 750, 1000, 1500 or 2000 -nickname | (optional) A user-friendly name for the node cluster (`name` by default) -target_num_nodes | (optional) The desired number of nodes for the node cluster (default: `1`) -tags | (optional) List of tags of the node cluster to be used when deploying services see [Tags](/docker-cloud/apps/deploy-tags/) for more information) (default: `[]`) -provider_options | Provider-specific extra options for the deployment of the node (see table `Provider options` above for more information) - - -## Get an existing node cluster - -```python -import dockercloud - -service = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -log.Println(nodecluster) -``` - -```http -GET /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud nodecluster inspect 7eaf7fff -``` - -Get all the details of an specific node cluster - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the node cluster to retrieve - -## Deploy a node cluster - -```python -import dockercloud - -nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -nodecluster.deploy() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -if err = nodecluster.Deploy(); err != nil { - log.Println(err) -} -``` - -```http -POST /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/deploy/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -Deploys and provisions a recently created node cluster in the specified region and cloud provider. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/deploy/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the node cluster to deploy - -## Update an existing node cluster - -```python -import dockercloud - -nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -nodecluster.target_num_nodes = 3 -nodecluster.tags.add("tag-1") -nodecluster.save() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -if err = nodecluster.Update(dockercloud.NodeCreateRequest{Target_num_nodes: 4}); err != nil { - log.Println(err) -} -``` - -```http -PATCH /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -Content-Type: application/json - -{"target_num_nodes": 3, "tags": [{"name": "tag-1"}]} -``` - -```shell -docker-cloud nodecluster scale 7eaf7fff 3 -docker-cloud tag add -t tag-1 7eaf7fff -docker-cloud tag set -t tag-2 7eaf7fff -``` - -Updates the node cluster details and applies the changes automatically. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`PATCH /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the node cluster to update - - -### JSON Parameters - -Parameter | Description ---------- | ----------- -target_num_nodes | (optional) The number of nodes to scale this node cluster to -tags | (optional) List of tags the node cluster (and nodes within the node cluster) will have. This operation replaces the user tag list. -## Terminate a node cluster - -```python -import dockercloud - -nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -nodecluster.delete() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -if err = nodecluster.Terminate(); err != nil { - log.Println(err) -} -``` - -```http -DELETE /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -dockercloud nodecluster rm 7eaf7fff -``` - -Terminates all the nodes in a node cluster and the node cluster itself. This is not reversible. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`DELETE /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the node cluster to terminate diff --git a/apidocs/cloud-api-source/source/includes/nodetype.md b/apidocs/cloud-api-source/source/includes/nodetype.md deleted file mode 100644 index fec5c7683a..0000000000 --- a/apidocs/cloud-api-source/source/includes/nodetype.md +++ /dev/null @@ -1,137 +0,0 @@ -# Node Types - -## Node Type - -> Example - -```json -{ - "availability_zones": [], - "available": true, - "label": "1GB", - "name": "1gb", - "provider": "/api/infra/v1/provider/digitalocean/", - "regions": [ - "/api/infra/v1/region/digitalocean/ams1/", - "/api/infra/v1/region/digitalocean/sfo1/", - "/api/infra/v1/region/digitalocean/nyc2/", - "/api/infra/v1/region/digitalocean/ams2/", - "/api/infra/v1/region/digitalocean/sgp1/", - "/api/infra/v1/region/digitalocean/lon1/", - "/api/infra/v1/region/digitalocean/nyc3/", - "/api/infra/v1/region/digitalocean/nyc1/" - ], - "resource_uri": "/api/infra/v1/nodetype/digitalocean/1gb/" -} -``` - -A node type is a representation of an instance size supported by a certain cloud provider in a certain region and/or availability zone. - - -### Attributes - -Attribute | Description ---------- | ----------- -resource_uri | A unique API endpoint that represents the node type -name | An identifier for the node type -label | A user-friendly name for the node type -regions | A list of resource URIs of the regions to which this node type can be deployed to -availability_zones | A list of resource URIs of the availability zones to which this node type can be deployed to -provider | The resource URI of the provider of the node type -available | Whether the node type is currently available for new node deployments - - -## List all node types - -```python -import dockercloud - -nodetypes = dockercloud.NodeType.list() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -nodetypeList, err := dockercloud.ListNodeTypes() - -if err != nil { - log.Println(err) -} - -log.Println(nodetypeList) -``` - -```http -GET /api/infra/v1/nodetype/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud nodecluster nodetype -``` - -Lists all node types of all supported cloud providers. Returns a list of `NodeType` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/infra/v1/nodetype/` - -### Query Parameters - -Parameter | Description ---------- | ----------- -name | Filter by node type name -regions | Filter by resource URI of the target regions -availability_zones | Filter by resource URI of the target availability zones - - -## Get an individual node type - -```python -import dockercloud - -nodetype = dockercloud.NodeType.fetch("digitalocean/1gb") -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -nodetype, err := dockercloud.GetNodeType("digitalocean","1gb") - -if err != nil { - log.Println(err) -} - -log.Println(nodetype) -``` - -```http -GET /api/infra/v1/nodetype/digitalocean/1gb/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - - -Get all the details of a specific node type - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/infra/v1/nodetype/(provider.name)/(name)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -name | The name of the node type to retrieve -provider.name | The name of the provider of the node type diff --git a/apidocs/cloud-api-source/source/includes/provider.md b/apidocs/cloud-api-source/source/includes/provider.md deleted file mode 100644 index 44e63ab337..0000000000 --- a/apidocs/cloud-api-source/source/includes/provider.md +++ /dev/null @@ -1,132 +0,0 @@ -# Providers - -## Provider - -> Example - -```json -{ - "available": true, - "label": "Digital Ocean", - "name": "digitalocean", - "regions": [ - "/api/infra/v1/region/digitalocean/ams1/", - "/api/infra/v1/region/digitalocean/ams2/", - "/api/infra/v1/region/digitalocean/ams3/", - "/api/infra/v1/region/digitalocean/lon1/", - "/api/infra/v1/region/digitalocean/nyc1/", - "/api/infra/v1/region/digitalocean/nyc2/", - "/api/infra/v1/region/digitalocean/nyc3/", - "/api/infra/v1/region/digitalocean/sfo1/", - "/api/infra/v1/region/digitalocean/sgp1/" - ], - "resource_uri": "/api/infra/v1/provider/digitalocean/" -} -``` - -A provider is a representation of a cloud provider supported by Docker Cloud. Providers have one or more regions where nodes are deployed. - - -### Attributes - -Attribute | Description ---------- | ----------- -resource_uri | A unique API endpoint that represents the provider -name | A unique identifier for the provider -label | A user-friendly name for the provider -regions | A list of resource URIs of the regions available in this provider -available | Whether the provider is currently available for new node deployments - - -## List all providers - -```python -import dockercloud - -providers = dockercloud.Provider.list() -``` - -```http -GET /api/infra/v1/provider/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -providerList, err := dockercloud.ListProviders() - -if err != nil { - log.Println(err) -} - -log.Println(providerList) -``` - -```shell -docker-cloud nodecluster provider -``` - -Lists all supported cloud providers. Returns a list of `Provider` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/infra/v1/provider/` - -### Query Parameters - -Parameter | Description ---------- | ----------- -name | Filter by provider name - - - -## Get an individual provider - -```python -import dockercloud - -provider = dockercloud.Provider.fetch("digitalocean") -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -provider, err := dockercloud.GetProvider("digitalocean") - -if err != nil { - log.Println(err) -} - -log.Println(provider) -``` - -```http -GET /api/infra/v1/provider/digitalocean/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - - -Get all the details of a specific provider - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/infra/v1/provider/(name)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -name | The name of the provider to retrieve diff --git a/apidocs/cloud-api-source/source/includes/region.md b/apidocs/cloud-api-source/source/includes/region.md deleted file mode 100644 index 4bfd58b309..0000000000 --- a/apidocs/cloud-api-source/source/includes/region.md +++ /dev/null @@ -1,137 +0,0 @@ -# Regions - -## Region - -> Example - -```json -{ - "availability_zones": [], - "available": true, - "label": "Amsterdam 2", - "name": "ams2", - "node_types": [ - "/api/infra/v1/nodetype/digitalocean/1gb/", - "/api/infra/v1/nodetype/digitalocean/2gb/", - "/api/infra/v1/nodetype/digitalocean/4gb/", - "/api/infra/v1/nodetype/digitalocean/8gb/", - "/api/infra/v1/nodetype/digitalocean/16gb/", - "/api/infra/v1/nodetype/digitalocean/32gb/", - "/api/infra/v1/nodetype/digitalocean/48gb/", - "/api/infra/v1/nodetype/digitalocean/64gb/" - ], - "provider": "/api/infra/v1/provider/digitalocean/", - "resource_uri": "/api/infra/v1/region/digitalocean/ams2/" -} -``` - -A region is a representation of an entire or a subset of a data center of a cloud provider. It can contain availability zones (depending on the provider) and one or more node types. - - -### Attributes - -Attribute | Description ---------- | ----------- -resource_uri | A unique API endpoint that represents the region -name | An identifier for the region -label | A user-friendly name for the region -node_types | A list of resource URIs of the node types available in the region -availability_zones | A list of resource URIs of the availability zones available in the region -provider | The resource URI of the provider of the region -available | Whether the region is currently available for new node deployments - - -## List all regions - -```python -import dockercloud - -regions = dockercloud.Region.list() -``` - -```http -GET /api/infra/v1/region/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -regionList, err := dockercloud.ListRegions() - -if err != nil { - log.Println(err) -} - -log.Println(regionList) -``` - -```shell -docker-cloud nodecluster region -``` - -Lists all regions of all supported cloud providers. Returns a list of `Region` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/infra/v1/region/` - -### Query Parameters - -Parameter | Description ---------- | ----------- -name | Filter by region name -provider | Filter by resource URI of the target provider - - - -## Get an individual region - -```python -import dockercloud - -region = dockercloud.Region.fetch("digitalocean/lon1") -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -region, err := dockercloud.GetRegion("digitalocean","lon1") - -if err != nil { - log.Println(err) -} - -log.Println(region) -``` - -```http -GET /api/infra/v1/region/digitalocean/lon1/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - - -Get all the details of a specific region - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/infra/v1/region/(provider.name)/(name)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -name | The name of the region to retrieve -provider.name | The name of the provider of the region diff --git a/apidocs/cloud-api-source/source/includes/registry.md b/apidocs/cloud-api-source/source/includes/registry.md deleted file mode 100644 index b84c304ff0..0000000000 --- a/apidocs/cloud-api-source/source/includes/registry.md +++ /dev/null @@ -1,87 +0,0 @@ -# Registries - -## Registry - -> Example - -```json -{ - "host": "registry-1.docker.io", - "is_docker_registry": true, - "is_ssl": true, - "name": "Docker Hub", - "port": 443, - "resource_uri": "/api/repo/v1/user_namespace/registry/registry-1.docker.io/" -} -``` - -Represents a registry where repositories are hosted. - -This is a [namespaced endpoint](#namespaced-endpoints). - - -### Attributes - -Attribute | Description ---------- | ----------- -resource_uri | A unique API endpoint that represents the registry -name | Human-readable name of the registry -host | FQDN of the registry, such as `registry-1.docker.io` -is_docker_registry | Whether this registry is run by Docker -is_ssl | Whether this registry has SSL activated or not -port | The port number where the registry is listening to - - -## List all registries - -```http -GET /api/repo/v1/registry/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -Lists all current registries. Returns a list of `Registry` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/repo/v1/[optional_namespace/]registry/` - -### Query Parameters - -Parameter | Description ---------- | ----------- -uuid | Filter by UUID -name | Filter by registry name -host | Filter by registry host -is_docker_registry | Filter by whether the registry is run by Docker or not. Possible values: 'true' or 'false' - - -## Get an existing registry - -```http -GET /api/repo/v1/registry/registry-1.docker.io/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -Gets all the details of an specific registry - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/v1/[optional_namespace/]registry/(host)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -host | The host of the registry to retrieve diff --git a/apidocs/cloud-api-source/source/includes/repository.md b/apidocs/cloud-api-source/source/includes/repository.md deleted file mode 100644 index cf96964ffe..0000000000 --- a/apidocs/cloud-api-source/source/includes/repository.md +++ /dev/null @@ -1,275 +0,0 @@ -# External Repositories - -## External Repository - -> Example - -```json -{ - "in_use": false, - "name": "my.registry.com/myrepo", - "registry": "/api/repo/v1/user_namespace/registry/my.registry.com/", - "resource_uri": "/api/repo/v1/user_namespace/repository/my.registry.com/myrepo/", -} -``` - -The `repository` endpoint is used to add and remove existing repositories on third party registries to be used in deployments and builds. - -This is a [namespaced endpoint](#namespaced-endpoints). - -### Attributes - -Attribute | Description ---------- | ----------- -resource_uri | A unique API endpoint that represents the repository -name | Name of the repository, such as `my.registry.com/myrepo` -in_use | If the image is being used by any of your services -registry | Resource URI of the registry where this image is hosted - - -## List all external repositories - -```python -import dockercloud - -repositories = dockercloud.Repository.list() -``` - -```http -GET /api/repo/v1/repository/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -repositoriesList, err := dockercloud.ListRepositories() - -if err != nil { - log.Println(err) -} - -log.Pringln(repositoriesList) -``` - -```shell -docker-cloud repository ls -``` - -Lists all added repositories from third party registries. Returns a list of `Repository` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/repo/v1/[optional_namespace/]repository/` - -### Query Parameters - -Parameter | Description ---------- | ----------- -name | Filter by image name -registry | Filter by resource URI of the target repository registry - - -## Add a new external repository - -```python -import dockercloud - -repository = dockercloud.Repository.create(name="registry.local/user1/image1", username=username, password=password) -repository.save() -``` - -```http -POST /api/repo/v1/repository/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -Content-Type: application/json - -{"name": "registry.local/user1/image1", "username": "username", "password": "password"} -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -image, err := dockercloud.CreateImage(dockercloud.ImageCreateRequest{ - Name: "registry.local/user1/image1", - Username: "username", - Password: "password" -}) -``` - -```shell -docker-cloud repository register -u username -p password registry.local/user1/image1 -``` - -Adds an existing repository on a third party registry. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/repo/v1/[optional_namespace/]repository/` - -### JSON Parameters - -Parameter | Description ---------- | ----------- -name | Name of the repository, such as 'my.registry.com/myrepo' -username | Username to authenticate with the third party registry -password | Password to authenticate with the third party registry - - -## Get an external repository details - -```python -import dockercloud - -repository = dockercloud.Repository.fetch("registry.local/user1/image1") -``` - -```http -GET /api/repo/v1/repository/registry.local/user1/image1/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -repository, err = dockercloud.GetRepository("registry.local/user1/image1") - -if err != nil { - log.Println(err) -} - -log.Println(repository) -``` - -```shell -docker-cloud repository inspect registry.local/user1/image1 -``` - -Gets all the details of an specific repository - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/repo/v1/[optional_namespace/]repository/(name)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -name | The name of the repository to retrieve - - -## Update credentials of an external repository - -```python -import dockercloud - -repository = dockercloud.Repository.fetch("registry.local/user1/image1") -repository.username = "new username" -repository.password = "new password" -repository.save() -``` - -```http -PATCH /api/repo/v1/repository/registry.local/user1/image1/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -Content-Type: application/json - -{"username": "username", "password": "password"} -``` - -```shell -docker-cloud repository update -n "new username" -p "new password" registry.local/user1/image1 -``` - -Updates the external repository credentials. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`PATCH /api/repo/v1/[optional_namespace/]repository/(name)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -name | The name of the repository to update - - -### JSON Parameters - -Parameter | Description ---------- | ----------- -username | Username to authenticate with the private registry -password | Password to authenticate with the private registry - - -## Remove an external repository - -```python -import dockercloud - -repository = dockercloud.Repository.fetch("registry.local/user1/image1") -repository.delete() -``` - -```http -DELETE /api/repo/v1/repository/registry.local/user1/image1/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -repository, err = dockercloud.GetRepository("registry.local/user1/image1") - -if err != nil { - log.Println(err) -} - -repository.Remove() -``` - -```shell -docker-cloud repository rm registry.local/user1/image1 -``` - -Removes the external repository from Docker Cloud. It doesn't remove the repository from the third party registry where it's stored. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`DELETE /api/repo/v1/[optional_namespace/]repository/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -name | The name of the external repository to remove diff --git a/apidocs/cloud-api-source/source/includes/service.md b/apidocs/cloud-api-source/source/includes/service.md deleted file mode 100644 index 28f9e6761a..0000000000 --- a/apidocs/cloud-api-source/source/includes/service.md +++ /dev/null @@ -1,935 +0,0 @@ -# Services - -## Service - -> Example - -```json -{ - "autodestroy": "OFF", - "autoredeploy": false, - "autorestart": "ON_FAILURE", - "bindings": [ - { - "host_path": null, - "container_path": "/tmp", - "rewritable": true, - "volumes_from": null - }, - { - "host_path": "/etc", - "container_path": "/etc", - "rewritable": true, - "volumes_from": null - }, - { - "host_path": null, - "container_path": null, - "rewritable": true, - "volumes_from": "/api/app/v1/user_namespace/service/2f4f54e5-9d3b-4ac1-85ad-a2d4ff25a179/" - } - ], - "cap_add": [ - "ALL" - ], - "cap_drop": [ - "NET_ADMIN", - "SYS_ADMIN" - ], - "container_envvars": [ - { - "key": "DB_PASS", - "value": "test" - } - ], - "container_ports": [ - { - "endpoint_uri": "http://wordpress-stackable.admin.srv.dockerapp.io:80/", - "inner_port": 80, - "outer_port": 80, - "port_name": "http", - "protocol": "tcp", - "published": true - } - ], - "containers": [ - "/api/app/v1/user_namespace/container/6f8ee454-9dc3-4387-80c3-57aac1be3cc6/", - "/api/app/v1/user_namespace/container/fdf9c116-7c08-4a60-b0ce-c54ca72c2f25/" - ], - "cpu_shares": 100, - "cpuset": "0,1", - "cgroup_parent": "m-executor-abcd", - "current_num_containers": 2, - "deployed_datetime": "Mon, 13 Oct 2014 11:01:43 +0000", - "deployment_strategy": "EMPTIEST_NODE", - "destroyed_datetime": null, - "devices": [ - "/dev/ttyUSB0:/dev/ttyUSB0" - ], - "dns": [ - "8.8.8.8" - ], - "dns_search": [ - "example.com" - ], - "domainname": "domainname", - "entrypoint": "", - "extra_hosts": [ - "onehost:50.31.209.229" - ], - "hostname": "hostname", - "image_name": "tutum/wordpress-stackable:latest", - "nickname": "wordpress-stackable", - "labels": { - "com.example.description": "Accounting webapp", - "com.example.department": "Finance", - "com.example.label-with-empty-value": "" - }, - "link_variables": { - "WORDPRESS_STACKABLE_1_ENV_DB_HOST": "**LinkMe**", - "WORDPRESS_STACKABLE_1_ENV_DB_NAME": "wordpress", - "WORDPRESS_STACKABLE_1_ENV_DB_PASS": "szVaPz925B7I", - "WORDPRESS_STACKABLE_1_ENV_DB_PORT": "**LinkMe**", - "WORDPRESS_STACKABLE_1_ENV_DB_USER": "admin", - "WORDPRESS_STACKABLE_1_ENV_DEBIAN_FRONTEND": "noninteractive", - "WORDPRESS_STACKABLE_1_ENV_HOME": "/", - "WORDPRESS_STACKABLE_1_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", - "WORDPRESS_STACKABLE_1_PORT": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153", - "WORDPRESS_STACKABLE_1_PORT_80_TCP": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153", - "WORDPRESS_STACKABLE_1_PORT_80_TCP_ADDR": "wordpress-stackable-1.admin.cont.dockerapp.io", - "WORDPRESS_STACKABLE_1_PORT_80_TCP_PORT": "49153", - "WORDPRESS_STACKABLE_1_PORT_80_TCP_PROTO": "tcp", - "WORDPRESS_STACKABLE_2_ENV_DB_HOST": "**LinkMe**", - "WORDPRESS_STACKABLE_2_ENV_DB_NAME": "wordpress", - "WORDPRESS_STACKABLE_2_ENV_DB_PASS": "szVaPz925B7I", - "WORDPRESS_STACKABLE_2_ENV_DB_PORT": "**LinkMe**", - "WORDPRESS_STACKABLE_2_ENV_DB_USER": "admin", - "WORDPRESS_STACKABLE_2_ENV_DEBIAN_FRONTEND": "noninteractive", - "WORDPRESS_STACKABLE_2_ENV_HOME": "/", - "WORDPRESS_STACKABLE_2_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", - "WORDPRESS_STACKABLE_2_PORT": "tcp://wordpress-stackable-2.admin.cont.dockerapp.io:49154", - "WORDPRESS_STACKABLE_2_PORT_80_TCP": "tcp://wordpress-stackable-2.admin.cont.dockerapp.io:49154", - "WORDPRESS_STACKABLE_2_PORT_80_TCP_ADDR": "wordpress-stackable-2.admin.cont.dockerapp.io", - "WORDPRESS_STACKABLE_2_PORT_80_TCP_PORT": "49154", - "WORDPRESS_STACKABLE_2_PORT_80_TCP_PROTO": "tcp", - "WORDPRESS_STACKABLE_ENV_DB_HOST": "**LinkMe**", - "WORDPRESS_STACKABLE_ENV_DB_NAME": "wordpress", - "WORDPRESS_STACKABLE_ENV_DB_PASS": "szVaPz925B7I", - "WORDPRESS_STACKABLE_ENV_DB_PORT": "**LinkMe**", - "WORDPRESS_STACKABLE_ENV_DB_USER": "admin", - "WORDPRESS_STACKABLE_ENV_DEBIAN_FRONTEND": "noninteractive", - "WORDPRESS_STACKABLE_ENV_HOME": "/", - "WORDPRESS_STACKABLE_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", - "WORDPRESS_STACKABLE_PORT": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153", - "WORDPRESS_STACKABLE_PORT_80_TCP": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153", - "WORDPRESS_STACKABLE_PORT_80_TCP_ADDR": "wordpress-stackable-1.admin.cont.dockerapp.io", - "WORDPRESS_STACKABLE_PORT_80_TCP_PORT": "49153", - "WORDPRESS_STACKABLE_PORT_80_TCP_PROTO": "tcp", - "WORDPRESS_STACKABLE_DOCKERCLOUD_API_URL": "https://cloud.docker.com/api/app/v1/user_namespace/service/adeebc1b-1b81-4af0-b8f2-cefffc69d7fb/" - }, - "linked_from_service": [], - "linked_to_service": [ - { - "from_service": "/api/app/v1/user_namespace/service/09cbcf8d-a727-40d9-b420-c8e18b7fa55b/", - "name": "DB", - "to_service": "/api/app/v1/user_namespace/service/72f175bd-390b-46e3-9463-830aca32ce3e/" - } - ], - "mac_address": "02:42:ac:11:65:43", - "memory": 2048, - "memory_swap": 8192, - "name": "wordpress-stackable", - "net": "bridge", - "privileged": false, - "public_dns": "wordpress-stackable.admin.svc.dockerapp.io", - "read_only": true, - "resource_uri": "/api/app/v1/user_namespace/service/09cbcf8d-a727-40d9-b420-c8e18b7fa55b/", - "roles": ["global"], - "run_command": "/run-wordpress.sh", - "running_num_containers": 1, - "security_opt": [ - ], - "sequential_deployment": false, - "started_datetime": "Mon, 13 Oct 2014 11:01:43 +0000", - "state": "Partly running", - "stack": "/api/app/v1/user_namespace/stack/46aca402-2109-4a70-a378-760cfed43816/", - "stdin_open": false, - "stopped_datetime": null, - "stopped_num_containers": 0, - "synchronized": true, - "tags": [ - {"name": "tag_one"}, - {"name": "tag-two"}, - {"name": "tagthree3"} - ], - "target_num_containers": 2, - "tty": false, - "user": "root", - "uuid": "09cbcf8d-a727-40d9-b420-c8e18b7fa55b", - "working_dir": "/app" -} -``` - - -A service is a template used to deploy one or more containers. - -This is a [namespaced endpoint](#namespaced-endpoints). - -### Attributes - -Attribute | Description ---------- | ----------- -uuid | A unique identifier for the service generated automatically on creation -resource_uri | A unique API endpoint that represents the service -image_name | The Docker image name and tag used for the service containers -name | A user provided name for the service. This name will be inherited by the service containers and will be used in endpoint URLs, environment variable names, etc. -public_dns | An external FQDN that resolves to all IPs of the nodes where the service containers are running on (as an `A` record with multiple IP entries which will be used by clients in a [round-robin fashion](http://en.wikipedia.org/wiki/Round-robin_DNS)). If the service is not publishing any ports, this FQDN will fail to resolve. -state | The state of the service (see table `Service states` below) -net | Network mode to set on the containers (see table `Network Modes` below, more information /docker-cloud/apps/service-links/) -pid | Set the PID (Process) Namespace mode for the containers ([more information](/engine/reference/run/#pid-settings-pid)) -synchronized | Flag indicating if the current service definition is synchronized with the current containers. -deployed_datetime | The date and time of the last deployment of the service (if applicable, `null` otherwise) -started_datetime | The date and time of the last `start` operation on the service (if applicable, `null` otherwise) -stopped_datetime | The date and time of the last `stop` operation on the service (if applicable, `null` otherwise) -destroyed_datetime | The date and time of the `terminate` operation on the service (if applicable, `null` otherwise) -target_num_containers | The requested number of containers to deploy for the service -current_num_containers | The actual number of containers deployed for the service -running_num_containers | The actual number of containers deployed for the service in `Running` state -stopped_num_containers | The actual number of containers deployed for the service in `Stopped` state -stack | Resource URIs of the stack that the service belongs to -containers | List of resource URIs of the containers launched as part of the service -container_ports | List of ports to be published on the containers of this service (see table `Service Port attributes` below) -container_envvars | List of user-defined environment variables to set on the containers of the service, which will override the image environment variables (see table `Service Environment Variable attributes` below) -labels | Metadata in form of dictionary used for every container of this service -working_dir | Working directory for running binaries within a container of this service -user | Set the user used on containers of this service (`root` by default) -hostname | Set the hostname used on containers of this service -domainname | Set the domainname used on containers of this service -mac_address | Ethernet device's MAC address used on containers of this service -cgroup_name | Optional parent cgroup used on containers of this service. -tty | If the containers of this service have the tty enable (`false` by default) -stdin_open | If the containers of this service have stdin opened (`false` by default) -dns | Custom DNS servers for containers of this service -dns_search | Custom DNS search domain for containers of this service -cap_add | Added capabilities for containers of this service -cap_drop | Dropped capabilities for containers of this service -devices | List of device mappings for containers of this service -extra_hosts | List of hostname mappings for containers of this service -secuirty_opt | Labeling scheme for containers of this service -entrypoint | Entrypoint to be set on the containers launched as part of the service, which will override the image entrypoint -run_command | Run command to be set on the containers launched as part of the service, which will override the image run command -sequential_deployment | Whether the containers for this service should be deployed in sequence, linking each of them to the previous containers (see [Service scaling](/docker-cloud/apps/service-scaling/) for more information) -cpu_shares | The relative CPU priority of the containers of the service (see [Runtime Constraints on CPU and Memory](/engine/reference/run/#runtime-constraints-on-cpu-and-memory) for more information) -cpuset | CPUs in which to allow execution -memory | The memory limit of the containers of the service in MB (see [Runtime Constraints on CPU and Memory](/engine/reference/run/#runtime-constraints-on-cpu-and-memory) for more information) -memory_swap | Total memory limit (memory + swap) of the containers of the service in MB -linked_from_service | A list of services that are linked to this one (see table `Related services attributes` below) -linked_to_service | A list of services that the service is linked to (see table `Related services attributes` below) -bindings | A list of volume bindings that the service has mounted (see table `Service binding attributes` below) -autorestart | Whether to restart the containers of the service automatically if they stop (see [Crash recovery](/docker-cloud/apps/autorestart/) for more information) -autodestroy | Whether to terminate the containers of the service automatically if they stop (see [Autodestroy](/docker-cloud/apps/auto-destroy/) for more information) -roles | List of Docker Cloud roles assigned to this service (see [Service links](/docker-cloud/apps/service-links/) for more information) -link_variables | List of environment variables that would be exposed in the containers if they are linked to this service -privileged | Whether to start the containers with Docker's `privileged` flag set or not, which allows containers to access all devices on the host among other things (see [Runtime privilege](/engine/reference/run/#runtime-privilege-linux-capabilities-and-lxc-configuration) for more information) -read_only | Whether the filesystem of every service container is read-only or not (`false` by default) -deployment_strategy | Container distribution among nodes (see table `Deployment strategies` below and [Deployment strategies](/docker-cloud/infrastructure/deployment-strategies/) for more information) -tags | List of tags to be used to deploy the service (see [Tags](/docker-cloud/apps/deploy-tags/) for more information) -autoredeploy | Whether to redeploy the containers of the service when its image is updated in Docker Cloud registry (see [Docker Cloud's private registry](/docker-cloud/apps/auto-redeploy/) for more information) -nickname | A user-friendly name for the service (`name` by default) - - -### Service binding attributes - -Attribute | Description ---------- | ----------- -host_path | The host path of the volume -container_path | The container path where the volume is mounted -rewritable | `true` is the volume has writable permissions -volumes_from | The resource URI of the service - - -### Service Port attributes - -Attribute | Description ---------- | ----------- -protocol | The protocol of the port, either `tcp` or `udp` -inner_port | The published port number inside the container -outer_port | The published port number in the node public network interface -port_name | Name of the service associated to this port -endpoint_uri | The URI of the service endpoint for this port -published | Whether the port has been published in the host public network interface or not. Non-published ports can only be accessed via links. - - -### Service Environment Variable attributes - -Attribute | Description ---------- | ----------- -key | The name of the environment variable -value | The value of the environment variable - - -### Related services attributes - -Attribute | Description ---------- | ----------- -name | The link name -from_service | The resource URI of the origin of the link -to_service | The resource URI of the target of the link - - -### Service states - -State | Description ------ | ----------- -Not running | The service has been created and has no deployed containers yet. Possible actions in this state: `start`, `terminate`. -Starting | All containers for the service are either starting or already running. No actions allowed in this state. -Running | All containers for the service are deployed and running. Possible actions in this state: `stop`, `redeploy`, `terminate`. -Partly running | One or more containers of the service are deployed and running. Possible actions in this state: `stop`, `redeploy`, `terminate`. -Scaling | The service is either deploying new containers or destroying existing ones responding to a scaling request. No actions allowed in this state. -Redeploying | The service is redeploying all its containers with the updated configuration. No actions allowed in this state. -Stopping | All containers for the service are either stopping or already stopped. No actions allowed in this state. -Stopped | All containers for the service are stopped. Possible actions in this state: `start`, `redeploy`, `terminate`. -Terminating | All containers for the service are either being terminated or already terminated. No actions allowed in this state. -Terminated | The service and all its containers have been terminated. No actions allowed in this state. - - -### Deployment strategies - -Strategy | Description --------- | ----------- -EMPTIEST_NODE | It will deploy containers to the node with the lower total amount of running containers (default). -HIGH_AVAILABILITY | It will deploy containers to the node with the lower amount of running containers of the same service. -EVERY_NODE | It will deploy one container on every node. The service can't scale manually. New containers will be deployed to new nodes automatically. - - -### Network Modes - -Strategy | Description --------- | ----------- -bridge | Creates a new network stack for the container on the docker bridge. -host | Uses the host network stack inside the container. - -## List all services - -```python -import dockercloud - -services = dockercloud.Service.list() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -serviceList, err := dockercloud.ListServices() - -if err != nil { - log.Println(err) -} - -log.Println(serviceList) -``` - -```http -GET /api/app/v1/service/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud service ps -``` - -Lists all current and recently terminated services. Returns a list of `Service` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/app/v1/[optional_namespace/]service/` - -### Query Parameters - -Parameter | Description ---------- | ----------- -uuid | Filter by UUID -state | Filter by state. Possible values: `Not running`, `Starting`, `Running`, `Partly running`, `Scaling`, `Redeploying`, `Stopping`, `Stopped`, `Terminating`, `Terminated` -name | Filter by service name -stack | Filter by resource URI of the target stack. - -## Create a new service - -```python -import dockercloud - -service = dockercloud.Service.create(image="tutum/hello-world", name="my-new-app", target_num_containers=2) -service.save() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -service, err := dockercloud.CreateService(dockercloud.ServiceCreateRequest{Image: "tutum/hello-world", Name: "my-new-app", Target_num_containers: 2}) - -if err != nil { - log.Println(err) -} - -log.Println(service) -``` - -```http -POST /api/app/v1/service/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -Content-Type: application/json - -{"image": "tutum/hello-world", "name": "my-new-app", "target_num_containers": 2} -``` - -```shell -docker-cloud service create -t 2 --name my-new-app tutum/hello-world -``` - -Creates a new service without starting it. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]service/` - -### JSON Parameters - -Parameter | Description ---------- | ----------- -image | (required) The image used to deploy this service in docker format, such as `tutum/hello-world` -name | (optional) A human-readable name for the service, such as `my-hello-world-app` (default: `image` without namespace) -target_num_containers | (optional) The number of containers to run for this service initially (default: 1) -run_command | (optional) The command used to start the containers of this service, overriding the value specified in the image, i.e. `/run.sh` (default: `null`) -entrypoint | (optional) The command prefix used to start the containers of this service, overriding the value specified in the image, i.e. `/usr/sbin/sshd` (default: `null`) -container_ports | (optional) An array of objects with port information to be published in the containers for this service, which will be added to the image port information, i.e. `[{"protocol": "tcp", "inner_port": 80, "outer_port": 80}]` (default: `[]`) (See table `Service Port attributes` below) -container_envvars | (optional) An array of objects with environment variables to be added in the service containers on launch (overriding any image-defined environment variables), i.e. `[{"key": "DB_PASSWORD", "value": "mypass"}]` (default: `[]`) (See table `Service Environment Variable attributes` below) -linked_to_service | (optional) An array of service resource URIs to link this service to, including the link name, i.e. `[{"to_service": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "name": "db"}]` (default: `[]`) (See table `Related services attributes` below) -bindings | (optional) An array of bindings this service mounts, i.e. `[{"volumes_from": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "rewritable": true}]` (default: `[]`) (See table `Related bindings attributes` below) -autorestart | (optional) Whether the containers for this service should be restarted if they stop, i.e. `ALWAYS` (default: `OFF`, possible values: `OFF`, `ON_FAILURE`, `ALWAYS`) (see [Crash recovery](/docker-cloud/apps/autorestart/) for more information) -autodestroy | (optional) Whether the containers should be terminated if they stop, i.e. `OFF` (default: `OFF`, possible values: `OFF`, `ON_SUCCESS`, `ALWAYS`) (see [Autodestroy](/docker-cloud/apps/auto-destroy/) for more information) -sequential_deployment | (optional) Whether the containers should be launched and scaled in sequence, i.e. `true` (default: `false`) (see [Service scaling](/docker-cloud/apps/service-scaling/) for more information) -roles | (optional) A list of Docker Cloud API roles to grant the service, i.e. `["global"]` (default: `[]`, possible values: `global`) (see [Service links](/docker-cloud/apps/service-links/) for more information) -privileged | (optional) Whether to start the containers with Docker's `privileged` flag set or not, i.e. `false` (default: `false`) (see [Runtime privilege](/engine/reference/run/#runtime-privilege-linux-capabilities-and-lxc-configuration) for more information) -deployment_strategy | (optional) Container distribution among nodes (default: `EMPTIEST_NODE`, see table `Deployment strategies` above and [Deployment strategies](/docker-cloud/infrastructure/deployment-strategies/) for more information) -tags | (optional) A list of tags to be used to deploy the service (see [Tags](/docker-cloud/apps/deploy-tags/) for more information) (default: `[]`) -autoredeploy | (optional) Whether to redeploy the containers of the service when its image is updated in Docker Cloud registry (default: `false`) (see [Docker Cloud's private registry](/docker-cloud/apps/auto-redeploy/) for more information) -net | (optional) Set the network mode to the containers (default: `bridge`, possible values: `bridge`, `host`) -pid | (optional) Set the PID (Process) Namespace mode for the containers (default: `none` value, possible values: `none`, `host`) -working_dir | (optional) Working directory for running binaries within a container of this service (default: `/`) -nickname | (optional) A user-friendly name for the service (`name` by default) - - -### Related bindings attributes - -Attribute | Description ---------- | ----------- -host_path | (optional) The host path of the volume -container_path | (required if `volumes_from` is omitted) The container path where the volume is mounted -rewritable | (optional) `true` is the volume has writable permissions (default: `true`) -volumes_from | (required if `container_path` is omitted) The resource URI of the service - - -### Service Port attributes - -Attribute | Description ---------- | ----------- -protocol | (required) The protocol of the port, either `tcp` or `udp` -inner_port | (required) The port number inside the container to be published -outer_port | (optional) The port number in the node public network interface to be published (default: dynamic allocation if `published` is `true`) -published | (optional) Whether to publish the port in the host public network interface or not. Non-published ports can only be accessed via links. (default: `false`) - - -### Service Environment Variable attributes - -Attribute | Description ---------- | ----------- -key | (required) The name of the environment variable -value | (required) The value of the environment variable - - -### Related services attributes - -Attribute | Description ---------- | ----------- -to_service | (required) The resource URI of the target of the link -name | (optional) The link name - - -## Get an existing service - -```python -import dockercloud - -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -log.Println(service) -``` - -```http -GET /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud service inspect 7eaf7fff -``` - -Get all the details of an specific service - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/app/v1/[optional_namespace/]service/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the service to retrieve - - -## Get the logs of a service - -> Example log line - -```json -{ - "type": "log", - "source": "wordpress-stackable-1", - "log": "Log line from the container indicated by 'source'", - "streamType": "stdout", - "timestamp": 1433779324 -} -``` - -```python -import dockercloud - -def log_handler(message): - print message - -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -service.logs(tail=300, follow=True, log_handler=log_handler) -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -c := make(chan Logs) - -go service.Logs(c) - for { - s := <-c - log.Println(s) - } -``` - -```http -GET /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1 -Host: ws.cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Connection: Upgrade -Upgrade: websocket -``` - -```shell -docker-cloud service logs 7eaf7fff -``` - -Get the aggregated logs of all the containers of the service. - -### Endpoint Type - -Available in Docker Cloud's **STREAM API** - -### HTTP Request - -`GET /api/app/v1/[optional_namespace/]service/(uuid)/logs/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the service to retrieve logs - -### Query Parameters - -Parameter | Description ---------- | ----------- -tail | Number of lines to show from the end of the logs (default: `300`) -follow | Whether to stream logs or close the connection immediately (default: true) - - -## Update an existing service - -```python -import dockercloud - -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -service.target_num_containers = 3 -service.tags.append({"name":"tag-1"}) -service.save() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -if err = service.Update(dockercloud.ServiceCreateRequest{Target_num_containers: 3}); err != nil { - log.Println(err) -} -``` - -```http -PATCH /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -Content-Type: application/json - -{"autorestart": "ON_FAILURE", "autodestroy": "OFF", "container_envvars": [{"key": "DB_PASSWORD", "value": "mypass"}], -"container_ports": [{"protocol": "tcp", "inner_port": 80, "outer_port": 80}], "cpu_shares": 512, -"entrypoint": "/usr/sbin/sshd", "image": "tutum/hello-world", -"linked_to_service": [{"to_service": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "name": "db"}], -"memory": 2048, "privileged": True, "roles": ["global"], "run_command": "/run.sh", "sequential_deployment": False, -"tags": [{"name": "tag-1"}], "target_num_containers": 3, "autoredeploy": False} - -``` - -```shell -docker-cloud service scale 7eaf7fff 3 -docker-cloud tag add -t tag-1 7eaf7fff -docker-cloud tag set -t tag-2 7eaf7fff -``` - -Updates the service details. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`PATCH /api/app/v1/[optional_namespace/]service/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the service to update - - -### JSON Parameters - -Parameter | Description ---------- | ----------- -autorestart | (optional) Whether the containers for this service should be restarted if they stop, i.e. `ALWAYS` (possible values: `OFF`, `ON_FAILURE`, `ALWAYS`) (see [Crash recovery](/docker-cloud/apps/autorestart/) for more information) -autodestroy | (optional) Whether the containers should be terminated if they stop, i.e. `OFF` (possible values: `OFF`, `ON_SUCCESS`, `ALWAYS`) (see [Autodestroy](/docker-cloud/apps/auto-destroy/) for more information) -container_envvars | (optional) An array of objects with environment variables to be added in the service containers on launch (overriding any image-defined environment variables), i.e. `[{"key": "DB_PASSWORD", "value": "mypass"}]` (See table `Service Environment Variable attributes`) -container_ports | (optional) An array of objects with port information to be published in the containers for this service, which will be added to the image port information, i.e. `[{"protocol": "tcp", "inner_port": 80, "outer_port": 80}]` (See table `Service Port attributes`) -cpu_shares | (optional) The relative CPU priority of the containers the service describes (see [Runtime Constraints on CPU and Memory](/engine/reference/run/#runtime-constraints-on-cpu-and-memory) for more information) -entrypoint | (optional) The command prefix used to start the containers of this service, overriding the value specified in the image, i.e. `/usr/sbin/sshd` -image | (optional) The image used to deploy this service in docker format, i.e. `tutum/hello-world`, `tutum/ubuntu:5.6`. If no tag is indicated, it will be set to `latest` by default -linked_to_service | (optional) An array of service resource URIs to link this service to, including the link name, i.e. `[{"to_service": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "name": "db"}]` (See table `Related services attributes` below) -memory | (optional) The memory limit of the containers of the service in MB (see [Runtime Constraints on CPU and Memory](/engine/reference/run/#runtime-constraints-on-cpu-and-memory) for more information) -privileged | (optional) Whether to start the containers with Docker's `privileged` flag set or not, i.e. `false` (see [Runtime privilege](/engine/reference/run/#runtime-privilege-linux-capabilities-and-lxc-configuration) for more information) -roles | (optional) A list of Docker Cloud API roles to grant the service, i.e. `["global"]` (possible values: `global`) (see [Service links](/docker-cloud/apps/service-links/) for more information) -run_command | (optional) The command used to start the containers of this service, overriding the value specified in the image, i.e. `/run.sh` -sequential_deployment | (optional) Whether the containers should be launched and scaled in sequence, i.e. `true` (see [Service scaling](/docker-cloud/apps/service-scaling/) for more information) -tags | (optional) List of new tags the service will have. This operation replaces the tag list -target_num_containers | (optional) The number of containers to scale this service to -deployment_strategy | (optional) Container distribution among nodes. A service cannot be updated to or from a deployment strategy of `EVERY_NODE`. (See table `Deployment strategies` above and [Deployment strategies](/docker-cloud/infrastructure/deployment-strategies/) for more information) -autoredeploy | Whether to redeploy the containers of the service when its image is updated in Docker Cloud registry (see [Docker Cloud's private registry](/docker-cloud/apps/auto-redeploy/) for more information) -net | (optional) Set the network mode to the containers (default: `bridge`, possible values: `bridge`, `host`) -pid | (optional) Set the PID (Process) Namespace mode for the containers (default: `none` value, possible values: `none`, `host`) -working_dir | (optional) Working directory for running binaries within a container of this service (default: `/`) -nickname | (optional) A user-friendly name for the service (`name` by default) - - -## Start a service - -```python -import dockercloud - -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -service.start() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -if err = service.Start(); err != nil { - log.Println(err) -} -``` - -```http -POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud service start 7eaf7fff -``` - -Starts all containers in a stopped or partly running service. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]service/(uuid)/start/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the service to start - - -## Stop a service - -```python -import dockercloud - -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -service.stop() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -if err = service.Stop(); err != nil { - log.Println(err) -} -``` - -```http -POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/stop/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud service stop 7eaf7fff -``` - -Stops all containers in a running or partly running service. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]service/(uuid)/stop/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the service to stop - - -## Scale a service - -```python -import dockercloud - -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -service.target_num_containers = 3 -service.save() -service.scale() -``` - -```http -POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/scale/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud service scale 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce 3 -``` - -Scales the service to its current `target_num_containers` field. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]service/(uuid)/scale/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the service to scale - - -## Redeploy a service - -```python -import dockercloud - -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -service.redeploy() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: true}) to reuse the existing volumes -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}) to not reuse the existing volumes -if err = service.Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}); err != nil { - log.Println(err) -} -``` - -```http -POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/redeploy/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud service redeploy 7eaf7fff -``` - -Redeploys all containers in the service with the current service configuration. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]service/(uuid)/redeploy/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the service to redeploy - -### Query Parameters - -Parameter | Description ---------- | ----------- -reuse_volumes | Whether to reuse container volumes for this redeploy operation or not (default: `true`). - - -## Terminate a service - -```python -import dockercloud - -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -service.delete() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -if err = service.Terminate(); err != nil { - log.Println(err) -} -``` - -```http -DELETE /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud service terminate 7eaf7fff -``` - -Terminate all the containers in a service and the service itself. This is not reversible. All the data stored in all containers of the service will be permanently deleted. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`DELETE /api/app/v1/[optional_namespace/]service/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the service to terminate diff --git a/apidocs/cloud-api-source/source/includes/stack.md b/apidocs/cloud-api-source/source/includes/stack.md deleted file mode 100644 index b25708a782..0000000000 --- a/apidocs/cloud-api-source/source/includes/stack.md +++ /dev/null @@ -1,572 +0,0 @@ -# Stacks - -## Stack - -> Example - -```json -{ - "deployed_datetime": "Mon, 13 Oct 2014 11:01:43 +0000", - "destroyed_datetime": null, - "nickname": "deployment stack", - "name": "dockercloud-app", - "resource_uri": "/api/app/v1/user_namespace/stack/7fe7ec85-58be-4904-81da-de2219098d7c/", - "services": [ - "/api/app/v1/user_namespace/service/09cbcf8d-a727-40d9-b420-c8e18b7fa55b/" - ], - "state": "Running", - "synchronized": true, - "uuid": "09cbcf8d-a727-40d9-b420-c8e18b7fa55b" -} -``` - -A stack is a logical grouping of closely related services, that may be linked with one another. - -This is a [namespaced endpoint](#namespaced-endpoints). - -### Attributes - -Attribute | Description ---------- | ----------- -uuid | A unique identifier for the stack generated automatically on creation -resource_uri | A unique API endpoint that represents the stack -name | A user provided name for the stack. -state | The state of the stack (see table `Stack states` below) -synchronized | Flag indicating if the current stack definition is synchronized with their services. -services | List of service resource URIs belonging to the stack -deployed_datetime | The date and time of the last deployment of the stack (if applicable, `null` otherwise) -destroyed_datetime | The date and time of the `terminate` operation on the stack (if applicable, `null` otherwise) -nickname | A user-friendly name for the stack (`name` by default) - - -### Stack states - -State | Description ------ | ----------- -Not Running | The stack has been created and has no deployed services yet. Possible actions in this state: `start`, `terminate`. -Starting | All services for the stack are either starting or already running. No actions allowed in this state. -Running | All services for the service are deployed and running. Possible actions in this state: `redeploy`, `terminate`. -Partly running | One or more services of the stack are deployed and running. Possible actions in this state: `redeploy`, `terminate`. -Stopping | All services for the stack are either stopping or already stopped. No actions allowed in this state. -Stopped | All services for the service are stopped. Possible actions in this state: `start`, `redeploy`, `terminate`. -Redeploying | The stack is redeploying all its services with the updated configuration. No actions allowed in this state. -Terminating | All services for the stack are either being terminated or already terminated. No actions allowed in this state. -Terminated | The stack and all its services have been terminated. No actions allowed in this state. - - -## List all stacks - -```python -import dockercloud - -stacks = dockercloud.Stack.list() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -stackList, err := dockercloud.ListStacks() - -if err != nil { - log.Println(err) -} - -log.Println(stackList) -``` - -```http -GET /api/app/v1/stack/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud stack ls -``` - -Lists all current and recently terminated stacks. Returns a list of `Stack` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/app/v1/[optional_namespace/]stack/` - -### Query Parameters - -Parameter | Description ---------- | ----------- -uuid | Filter by UUID -name | Filter by stack name - - -## Create a new stack - -```python -import dockercloud - -stack = dockercloud.Stack.create(name="my-new-stack", services=[{"name": "hello-word", "image": "tutum/hello-world", "target_num_containers": 2}]) -stack.save() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -stack, err := dockercloud.CreateStack(dockercloud.StackCreateRequest{Name: "my-new-stack", Services: []dockercloud.ServiceCreateRequest{{Image: "tutum/hello-world", Name: "test", Target_num_containers: 2}}}) - -if err != nil { - log.Println(err) -} - -log.Println(stack) -``` - -```http -POST /api/app/v1/stack/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -Content-Type: application/json - -{ - "name": "my-new-stack", - "services": [ - { - "name": "hello-word", - "image": "tutum/hello-world", - "target_num_containers": 2, - "linked_to_service": [ - { - "to_service": "database", - "name": "DB" - } - ] - }, - { - "name": "database", - "image": "tutum/mysql" - } - ] -} -``` - -```shell -docker-cloud stack create --name hello-world -f docker-compose.yml -``` - -Creates a new stack without starting it. The JSON syntax is abstracted to use -[Stack YAML files](/docker-cloud/apps/stack-yaml-reference/) in both -the Docker Cloud CLI and our UI, - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]stack/` - -### JSON Parameters - -Parameter | Description ---------- | ----------- -name | (required) A human-readable name for the stack, such as `my-hello-world-stack` -nickname | (optional) A user-friendly name for the stack (`name` by default) -services | (optional) List of services belonging to the stack. Each service accepts the same parameters as a [Create new service](#create-a-new-service) operation (default: `[]`) plus the ability to refer "links" and "volumes-from" by the name of another service in the stack (see example). - - -## Export an existing stack - -```python -import dockercloud - -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816") -stack.export() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816") - -if err != nil { - log.Println(err) -} - -if err = stack.Export(); err != nil { - log.Println(err) -} -``` - -```http -GET /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/export/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud stack export 46aca402 -``` - -Get a JSON representation of the stack following the [Stack YAML representation](/docker-cloud/apps/stacks/). - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/app/v1/[optional_namespace/]stack/(uuid)/export/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the stack to retrieve - - - -## Get an existing stack - -```python -import dockercloud - -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816") -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816") - -if err != nil { - log.Println(err) -} - -log.Println(stack) -``` - -```http -GET /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud stack inspect 46aca402-2109-4a70-a378-760cfed43816 -``` - -Get all the details of an specific stack - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/app/v1/[optional_namespace/]stack/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the stack to retrieve - - - -## Update an existing stack - -```python -import dockercloud - -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816") -stack.services = {"services": [{"name": "hello-word", "image": "tutum/hello-world", "target_num_containers": 2}]} -stack.save() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816") - -if err != nil { - log.Println(err) -} - -if err = stack.Update(dockercloud.StackCreateRequest{Services: []dockercloud.ServiceCreateRequest{{Name: "hello-world", Image: "tutum/hello-world", Target_num_containers: 2}}}); err != nil { - log.Println(err) -} -``` - -```http -PATCH /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -Content-Type: application/json - -{ - "services": [ - { - "name": "hello-word", - "image": "tutum/hello-world", - "target_num_containers": 3, - "linked_to_service": [ - { - "to_service": "database", - "name": "DB" - } - ] - }, - { - "name": "database", - "image": "tutum/mysql" - } - ] -} -``` - -```shell -docker-cloud stack update -f docker-compose.yml 46aca402 -``` - -Updates the details of every service in the stack. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`PATCH /api/app/v1/[optional_namespace/]stack/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the stack to update - - -### JSON Parameters - -Parameter | Description ---------- | ----------- -services | (optional) List of services belonging to the stack. Each service accepts the same parameters as a [Update an existing service](#update-an-existing-service) operation (default: `[]`) plus the ability to refer "links" and "volumes-from" by the name of another service in the stack (see example). - - - -## Stop a stack - -```python -import dockercloud - -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816") -stack.stop() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816") - -if err != nil { - log.Println(err) -} - -if err = stack.Stop(); err != nil { - log.Println(err) -} -``` - -```http -POST /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/stop/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud stack stop 46aca402-2109-4a70-a378-760cfed43816 -``` - -Stops the services in the stack. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]stack/(uuid)/stop/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the stack to stop - - -## Start a stack - -```python -import dockercloud - -stack = dockercloud.Stack.fetch() -stack.start() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816") - -if err != nil { - log.Println(err) -} - -if err = stack.Start(); err != nil { - log.Println(err) -} -``` - -```http -POST /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/start/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud stack start 46aca402 -``` - -Starts the services in the stack. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]stack/(uuid)/start/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the stack to start - - -## Redeploy a stack - -```python -import dockercloud - -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816") -stack.redeploy() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816") - -if err != nil { - log.Println(err) -} - -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: true}) to reuse the existing volumes -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}) to not reuse the existing volumes -if err = stack.Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}); err != nil { - log.Println(err) -} -``` - -```http -POST /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/redeploy/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud stack redeploy 46aca402 -``` - -Redeploys all the services in the stack. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]stack/(uuid)/redeploy/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the stack to redeploy - -### Query Parameters - -Parameter | Description ---------- | ----------- -reuse_volumes | Whether to reuse container volumes for this redeploy operation or not (default: `true`). - - -## Terminate a stack - -```python -import dockercloud - -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816") -stack.delete() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816") - -if err != nil { - log.Println(err) -} - -if err = stack.Terminate(); err != nil { - log.Println(err) -} -``` - -```http -DELETE /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud stack terminate 46aca402 -``` - -Terminate all the services in a the stack and the stack itself. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`DELETE /api/app/v1/[optional_namespace/]stack/(uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the stack to terminate diff --git a/apidocs/cloud-api-source/source/includes/tag.md b/apidocs/cloud-api-source/source/includes/tag.md deleted file mode 100644 index ccd334ede5..0000000000 --- a/apidocs/cloud-api-source/source/includes/tag.md +++ /dev/null @@ -1,52 +0,0 @@ -# Tags - -## Tag - -> Example - -```json -{ - "name": "byon=false", - "origin": "tutum" -} -``` - -Tags are used to target the deployment of services to a specific set of nodes. [Learn more](/docker-cloud/apps/deploy-tags/) - -### Attributes - -Attribute | Description ---------- | ----------- -name | Name of the tag -origin | Possible values: `user`, `tutum` - - -## List all node tags - -```http -GET /api/infra/v1/tag/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -``` -docker-cloud tag ls 7eaf7fff-882c -``` - -Lists all tags used by all nodes. Returns a list of `Tag` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/infra/v1/tag/` - -### Query Parameters - -Parameter | Description ---------- | ----------- -name | Filter by name -origin | Filter by origin. Possible values: `user`, `tutum` diff --git a/apidocs/cloud-api-source/source/includes/triggers.md b/apidocs/cloud-api-source/source/includes/triggers.md deleted file mode 100644 index 768eb9ec87..0000000000 --- a/apidocs/cloud-api-source/source/includes/triggers.md +++ /dev/null @@ -1,301 +0,0 @@ -# Triggers - -## Service triggers - -> Example - -```json -{ - "url": "/api/app/v1/user_namespace/service/82d4a246-52d8-468d-903d-9da9ef05ff28/trigger/0224815a-c156-44e4-92d7-997c69354438/call/", - "operation": "REDEPLOY", - "name": "docker_trigger", - "resource_uri": "/api/app/v1/user_namespace/service/82d4a246-52d8-468d-903d-9da9ef05ff28/trigger/0224815a-c156-44e4-92d7-997c69354438/" -} -``` - -Triggers are URLs that will start a redeploy of the service whenever a `POST` request is sent to them. They require no authorization headers, so they should be treated as access tokens. Triggers can be revoked if they are leaked or no longer used for security purposes. See [Triggers](/docker-cloud/apps/triggers/) for more information. - -This is a [namespaced endpoint](#namespaced-endpoints). - - -### Attributes - -Attribute | Description ---------- | ----------- -url | Address to be used to call the trigger with a `POST` request -name | A user provided name for the trigger -operation | The operation that the trigger call performs (see table `Operations` below) -resource_uri | A unique API endpoint that represents the trigger - - -### Operations - -Operation | Description ---------- | ----------- -REDEPLOY | Performs a `redeploy` service operation. -SCALEUP | Performs a `scale up` service operation. - - - -## List all triggers - -```python -import dockercloud - -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826') -trigger = dockercloud.Trigger.fetch(service) -trigger.list() -``` - -```http -GET /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826") - - if err != nil { - log.Println(err) - } - -trigger, err := service.ListTriggers() - - if err != nil { - log.Println(err) - } - - log.Println(trigger) -``` - -```shell -docker-cloud trigger list 61a29874-9134-48f9-b460-f37d4bec4826 -``` - -Lists all current triggers the service has associated to. Returns a list of `Service Trigger` objects. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/app/v1/[optional_namespace/]service/(uuid)/trigger/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the service the triggers are associated to - - -## Create a new trigger - -```python -import dockercloud - -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826') -trigger = dockercloud.Trigger.fetch(service) -trigger.add(name="mytrigger_name", operation="REDEPLOY") -trigger.save() -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826") - -if err != nil { - log.Println(err) -} - -trigger, err := service.CreateTrigger(dockercloud.TriggerCreateRequest{Name: "test-trigger", Operation: "REDEPLOY"}) - -if err != nil { - log.Println(err) -} - -log.Println(trigger) -``` - -```http -POST /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -Content-Type: application/json - -{"name": "mytrigger_name", "operation": "REDEPLOY"} -``` - -```shell -docker-cloud trigger create --name mytrigger_name --operation REDEPLOY 61a29874-9134-48f9-b460-f37d4bec4826 -``` - -Creates a new service trigger. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]service/(uuid)/trigger/` - -### JSON Parameters - -Parameter | Description ---------- | ----------- -name | (optional) A user provided name for the trigger -operation | (optional) The operation to be performed by the trigger (default: "REDEPLOY") - -## Get an existing trigger -```python -import dockercloud - -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826') -trigger = dockercloud.Trigger.fetch(service) -``` - - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826") - -if err != nil { - log.Println(err) -} - -trigger, err := service.GetTrigger("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") - -if err != nil { - log.Println(err) -} - -log.Println(trigger) -``` - -```http -GET /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -Get all the details of an specific trigger - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`GET /api/app/v1/[optional_namespace/]service/(uuid)/trigger/(trigger_uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the service the triggers are associated to -trigger_uuid | The UUID of the trigger to retrieve - -## Delete a trigger - -```python -import dockercloud - -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826') -trigger = dockercloud.Trigger.fetch(service) -trigger.delete("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826") - -if err != nil { - log.Println(err) -} - -service.DeleteTrigger("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -``` - -```http -DELETE /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -docker-cloud trigger rm 61a29874-9134-48f9-b460-f37d4bec4826 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce -``` - -Deletes specific trigger. It will be no longer available to be called. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`DELETE /api/app/v1/[optional_namespace/]service/(uuid)/trigger/(trigger_uuid)/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the associated service -trigger_uuid | The UUID of the trigger to delete - - -## Call a trigger - -```python -import dockercloud - -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826') -trigger = dockercloud.Trigger.fetch(service) -trigger.call("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826") - -if err != nil { - log.Println(err) -} - -service.CallTrigger("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce") -``` - -```http -POST /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/call/ HTTP/1.1 -Host: cloud.docker.com -Accept: application/json -``` - -Executes the trigger. For `SCALEUP` triggers, the number of containers to scale up can be passed at the end of the trigger call url, for example `/api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/call/3/`. - -### Endpoint Type - -Available in Docker Cloud's **REST API** - -### HTTP Request - -`POST /api/app/v1/[optional_namespace/]service/(uuid)/trigger/(trigger_uuid)/call/` - -### Path Parameters - -Parameter | Description ---------- | ----------- -uuid | The UUID of the associated service -trigger_uuid | The UUID of the trigger to call diff --git a/apidocs/cloud-api-source/source/index.md b/apidocs/cloud-api-source/source/index.md deleted file mode 100644 index 857c6a0dca..0000000000 --- a/apidocs/cloud-api-source/source/index.md +++ /dev/null @@ -1,170 +0,0 @@ ---- -title: Docker Cloud API reference - -language_tabs: - - http - - go - - python - - shell: CLI - -toc_footers: - -includes: - - action - - provider - - region - - availabilityzone - - nodetype - - nodecluster - - node - - registry - - repository - - stack - - service - - container - - triggers - - dockercloud-events - - errors - -search: true ---- - -# Introduction - -Docker Cloud currently offers a **HTTP REST API** and a **Websocket Stream API** which are used by both the [Web UI](https://cloud.docker.com/) and the [CLI](https://github.com/moby/mobycloud-cli). This API documentation contains all API operations currently supported in the platform and provides examples of how to execute them using our Command Line Interface (CLI), [Python SDK](https://github.com/docker/python-dockercloud) and [Go SDK](https://github.com/docker/go-dockercloud). - -# Authentication - -To make requests to the Docker Cloud API, you need an ApiKey for your account. -To get one: - -1. Log into Docker Cloud. -2. Click on the menu on the upper right corner of the screen. -3. Select **Account info**. -4. Select **API keys**. - -## REST API - -```python -import dockercloud -dockercloud.user = "username" -dockercloud.apikey = "apikey" -``` - -```go -import "github.com/docker/go-dockercloud/dockercloud" - -dockercloud.User = "username" -dockercloud.ApiKey = "apikey" -``` - -```http -GET /api/app/v1/service/ HTTP/1.1 -Host: cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Accept: application/json -``` - -```shell -export DOCKERCLOUD_USER=username -export DOCKERCLOUD_APIKEY=apikey -``` - -> Make sure to replace `username` with your username and `apikey` with your API key. - -The Docker Cloud REST API is reachable through the following hostname: - -`https://cloud.docker.com/` - -All requests should be sent to this endpoint using `Basic` authentication using your API key as password: - -`Authorization: Basic dXNlcm5hbWU6YXBpa2V5` - -HTTP responses are given in JSON format, so the following `Accept` header is required for every API call: - -`Accept: application/json` - -### Namespaced endpoints - -Endpoints that are labeled as "namespaced" allow the users to operate over -different namespaces, for example over an individual user namespace, or the -namespace of an organization the user is a member of. A namespace identifies the -owner of the resource. - -The namespace is optional. If left blank, it defaults to the authenticated user -in the request. The namespace is set before the resource in the URL schema: -`https://cloud.docker.com/api///(optional_namespace/)/` - -Examples: - -- The user `exampleuser` wants to operate on the node cluster list endpoint in their own namespace. They can use either of the following urls: - - https://cloud.docker.com/api/infra/v1/nodecluster/ (namespace omitted, so will use the user authenticated in the request) - - https://cloud.docker.com/api/infra/v1/exampleuser/nodecluster/ -- The user wants to operate on the node cluster list endpoint in an organization called `exampleorg` (which they have permission to see): - - https://cloud.docker.com/api/infra/v1/exampleorg/nodecluster/ - -### Namespaced endpoints in the docker-cloud CLI - -If you are using namespaces with the `docker-cloud` CLI, set them by changing -the value of the `DOCKERCLOUD_NAMESPACE` environment variable. You can either -set this globally, or specify it before each CLI command. To learn more, see the -[Docker Cloud CLI README](https://github.com/moby/mobycloud-cli#namespace). - -## Stream API - -```python -import websocket -import base64 - -header = "Authorization: Basic %s" % base64.b64encode("%s:%s" % (username, password)) -ws = websocket.WebSocketApp('wss://ws.cloud.docker.com/v1/events', header=[header]) -``` - -```go -import "github.com/gorilla/websocket" -import "encoding/base64" - -var StreamUrl = "wss://ws.cloud.docker.com:443/v1/events" - -sEnc := base64.StdEncoding.EncodeToString([]byte(User + ":" + ApiKey)) -header := http.Header{} -header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc)) - -var Dialer websocket.Dialer -ws, _, err := Dialer.Dial(url, header) -if err != nil { - log.Println(err) -} -``` - -```http -GET /api/audit/v1/events HTTP/1.1 -Host: ws.cloud.docker.com -Authorization: Basic dXNlcm5hbWU6YXBpa2V5 -Connection: Upgrade -Upgrade: websocket -``` - -```shell -export DOCKERCLOUD_USER=username -export DOCKERCLOUD_APIKEY=apikey -``` - -> Make sure to replace `username` with your username and `apikey` with your API key. - -The Docker Cloud Stream API is reachable through the following hostname: - -`wss://ws.cloud.docker.com/` - -The Stream API requires the same authentication mechanism as the REST API: - -`Authorization: Basic dXNlcm5hbWU6YXBpa2V5` - - -## API roles - -> The CLI and the SDKs will detect this environment variable and automatically use it - -If you give an [API role](/docker-cloud/apps/api-roles/) to a container, the environment variable `DOCKERCLOUD_AUTH` inside the container will have the contents of the `Authorization` header that you can use to authenticate against the REST or Stream APIs: - -`curl -H "Authorization: $DOCKERCLOUD_AUTH" https://cloud.docker.com/api/app/v1/service/` diff --git a/apidocs/cloud-api-source/source/javascripts/all.js b/apidocs/cloud-api-source/source/javascripts/all.js deleted file mode 100644 index ffaa9b0130..0000000000 --- a/apidocs/cloud-api-source/source/javascripts/all.js +++ /dev/null @@ -1,4 +0,0 @@ -//= require ./lib/_energize -//= require ./app/_lang -//= require ./app/_search -//= require ./app/_toc diff --git a/apidocs/cloud-api-source/source/javascripts/all_nosearch.js b/apidocs/cloud-api-source/source/javascripts/all_nosearch.js deleted file mode 100644 index 818bc4e509..0000000000 --- a/apidocs/cloud-api-source/source/javascripts/all_nosearch.js +++ /dev/null @@ -1,3 +0,0 @@ -//= require ./lib/_energize -//= require ./app/_lang -//= require ./app/_toc diff --git a/apidocs/cloud-api-source/source/javascripts/app/_lang.js b/apidocs/cloud-api-source/source/javascripts/app/_lang.js deleted file mode 100644 index 1a124bb68a..0000000000 --- a/apidocs/cloud-api-source/source/javascripts/app/_lang.js +++ /dev/null @@ -1,162 +0,0 @@ -/* -Copyright 2008-2013 Concur Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may -not use this file except in compliance with the License. You may obtain -a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations -under the License. -*/ -(function (global) { - 'use strict'; - - var languages = []; - - global.setupLanguages = setupLanguages; - global.activateLanguage = activateLanguage; - - function activateLanguage(language) { - if (!language) return; - if (language === "") return; - - $(".lang-selector a").removeClass('active'); - $(".lang-selector a[data-language-name='" + language + "']").addClass('active'); - for (var i=0; i < languages.length; i++) { - $(".highlight." + languages[i]).hide(); - } - $(".highlight." + language).show(); - - global.toc.calculateHeights(); - - // scroll to the new location of the position - if ($(window.location.hash).get(0)) { - $(window.location.hash).get(0).scrollIntoView(true); - } - } - - // parseURL and stringifyURL are from https://github.com/sindresorhus/query-string - // MIT licensed - // https://github.com/sindresorhus/query-string/blob/7bee64c16f2da1a326579e96977b9227bf6da9e6/license - function parseURL(str) { - if (typeof str !== 'string') { - return {}; - } - - str = str.trim().replace(/^(\?|#|&)/, ''); - - if (!str) { - return {}; - } - - return str.split('&').reduce(function (ret, param) { - var parts = param.replace(/\+/g, ' ').split('='); - var key = parts[0]; - var val = parts[1]; - - key = decodeURIComponent(key); - // missing `=` should be `null`: - // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters - val = val === undefined ? null : decodeURIComponent(val); - - if (!ret.hasOwnProperty(key)) { - ret[key] = val; - } else if (Array.isArray(ret[key])) { - ret[key].push(val); - } else { - ret[key] = [ret[key], val]; - } - - return ret; - }, {}); - }; - - function stringifyURL(obj) { - return obj ? Object.keys(obj).sort().map(function (key) { - var val = obj[key]; - - if (Array.isArray(val)) { - return val.sort().map(function (val2) { - return encodeURIComponent(key) + '=' + encodeURIComponent(val2); - }).join('&'); - } - - return encodeURIComponent(key) + '=' + encodeURIComponent(val); - }).join('&') : ''; - }; - - // gets the language set in the query string - function getLanguageFromQueryString() { - if (location.search.length >= 1) { - var language = parseURL(location.search).language - if (language) { - return language; - } else if (jQuery.inArray(location.search.substr(1), languages) != -1) { - return location.search.substr(1); - } - } - - return false; - } - - // returns a new query string with the new language in it - function generateNewQueryString(language) { - var url = parseURL(location.search); - if (url.language) { - url.language = language; - return stringifyURL(url); - } - return language; - } - - // if a button is clicked, add the state to the history - function pushURL(language) { - if (!history) { return; } - var hash = window.location.hash; - if (hash) { - hash = hash.replace(/^#+/, ''); - } - history.pushState({}, '', '?' + generateNewQueryString(language) + '#' + hash); - - // save language as next default - localStorage.setItem("language", language); - } - - function setupLanguages(l) { - var defaultLanguage = localStorage.getItem("language"); - - languages = l; - - var presetLanguage = getLanguageFromQueryString(); - if (presetLanguage) { - // the language is in the URL, so use that language! - activateLanguage(presetLanguage); - - localStorage.setItem("language", presetLanguage); - } else if ((defaultLanguage !== null) && (jQuery.inArray(defaultLanguage, languages) != -1)) { - // the language was the last selected one saved in localstorage, so use that language! - activateLanguage(defaultLanguage); - } else { - // no language selected, so use the default - activateLanguage(languages[0]); - } - } - - // if we click on a language tab, activate that language - $(function() { - $(".lang-selector a").on("click", function() { - var language = $(this).data("language-name"); - pushURL(language); - activateLanguage(language); - return false; - }); - window.onpopstate = function() { - activateLanguage(getLanguageFromQueryString()); - }; - }); -})(window); diff --git a/apidocs/cloud-api-source/source/javascripts/app/_search.js b/apidocs/cloud-api-source/source/javascripts/app/_search.js deleted file mode 100644 index 91f38a04ed..0000000000 --- a/apidocs/cloud-api-source/source/javascripts/app/_search.js +++ /dev/null @@ -1,74 +0,0 @@ -//= require ../lib/_lunr -//= require ../lib/_jquery.highlight -(function () { - 'use strict'; - - var content, searchResults; - var highlightOpts = { element: 'span', className: 'search-highlight' }; - - var index = new lunr.Index(); - - index.ref('id'); - index.field('title', { boost: 10 }); - index.field('body'); - index.pipeline.add(lunr.trimmer, lunr.stopWordFilter); - - $(populate); - $(bind); - - function populate() { - $('h1, h2').each(function() { - var title = $(this); - var body = title.nextUntil('h1, h2'); - index.add({ - id: title.prop('id'), - title: title.text(), - body: body.text() - }); - }); - } - - function bind() { - content = $('.content'); - searchResults = $('.search-results'); - - $('#input-search').on('keyup', search); - } - - function search(event) { - unhighlight(); - searchResults.addClass('visible'); - - // ESC clears the field - if (event.keyCode === 27) this.value = ''; - - if (this.value) { - var results = index.search(this.value).filter(function(r) { - return r.score > 0.0001; - }); - - if (results.length) { - searchResults.empty(); - $.each(results, function (index, result) { - var elem = document.getElementById(result.ref); - searchResults.append("
  • " + $(elem).text() + "
  • "); - }); - highlight.call(this); - } else { - searchResults.html('
  • '); - $('.search-results li').text('No Results Found for "' + this.value + '"'); - } - } else { - unhighlight(); - searchResults.removeClass('visible'); - } - } - - function highlight() { - if (this.value) content.highlight(this.value, highlightOpts); - } - - function unhighlight() { - content.unhighlight(highlightOpts); - } -})(); diff --git a/apidocs/cloud-api-source/source/javascripts/app/_toc.js b/apidocs/cloud-api-source/source/javascripts/app/_toc.js deleted file mode 100644 index bc2aa3e1f1..0000000000 --- a/apidocs/cloud-api-source/source/javascripts/app/_toc.js +++ /dev/null @@ -1,55 +0,0 @@ -//= require ../lib/_jquery_ui -//= require ../lib/_jquery.tocify -//= require ../lib/_imagesloaded.min -(function (global) { - 'use strict'; - - var closeToc = function() { - $(".tocify-wrapper").removeClass('open'); - $("#nav-button").removeClass('open'); - }; - - var makeToc = function() { - global.toc = $("#toc").tocify({ - selectors: 'h1, h2', - extendPage: false, - theme: 'none', - smoothScroll: false, - showEffectSpeed: 0, - hideEffectSpeed: 180, - ignoreSelector: '.toc-ignore', - highlightOffset: 60, - scrollTo: -1, - scrollHistory: true, - hashGenerator: function (text, element) { - return element.prop('id'); - } - }).data('toc-tocify'); - - $("#nav-button").click(function() { - $(".tocify-wrapper").toggleClass('open'); - $("#nav-button").toggleClass('open'); - return false; - }); - - $(".page-wrapper").click(closeToc); - $(".tocify-item").click(closeToc); - }; - - // Hack to make already open sections to start opened, - // instead of displaying an ugly animation - function animate() { - setTimeout(function() { - toc.setOption('showEffectSpeed', 180); - }, 50); - } - - $(function() { - makeToc(); - animate(); - $('.content').imagesLoaded( function() { - global.toc.calculateHeights(); - }); - }); -})(window); - diff --git a/apidocs/cloud-api-source/source/javascripts/lib/_energize.js b/apidocs/cloud-api-source/source/javascripts/lib/_energize.js deleted file mode 100644 index 6798f3c03f..0000000000 --- a/apidocs/cloud-api-source/source/javascripts/lib/_energize.js +++ /dev/null @@ -1,169 +0,0 @@ -/** - * energize.js v0.1.0 - * - * Speeds up click events on mobile devices. - * https://github.com/davidcalhoun/energize.js - */ - -(function() { // Sandbox - /** - * Don't add to non-touch devices, which don't need to be sped up - */ - if(!('ontouchstart' in window)) return; - - var lastClick = {}, - isThresholdReached, touchstart, touchmove, touchend, - click, closest; - - /** - * isThresholdReached - * - * Compare touchstart with touchend xy coordinates, - * and only fire simulated click event if the coordinates - * are nearby. (don't want clicking to be confused with a swipe) - */ - isThresholdReached = function(startXY, xy) { - return Math.abs(startXY[0] - xy[0]) > 5 || Math.abs(startXY[1] - xy[1]) > 5; - }; - - /** - * touchstart - * - * Save xy coordinates when the user starts touching the screen - */ - touchstart = function(e) { - this.startXY = [e.touches[0].clientX, e.touches[0].clientY]; - this.threshold = false; - }; - - /** - * touchmove - * - * Check if the user is scrolling past the threshold. - * Have to check here because touchend will not always fire - * on some tested devices (Kindle Fire?) - */ - touchmove = function(e) { - // NOOP if the threshold has already been reached - if(this.threshold) return false; - - this.threshold = isThresholdReached(this.startXY, [e.touches[0].clientX, e.touches[0].clientY]); - }; - - /** - * touchend - * - * If the user didn't scroll past the threshold between - * touchstart and touchend, fire a simulated click. - * - * (This will fire before a native click) - */ - touchend = function(e) { - // Don't fire a click if the user scrolled past the threshold - if(this.threshold || isThresholdReached(this.startXY, [e.changedTouches[0].clientX, e.changedTouches[0].clientY])) { - return; - } - - /** - * Create and fire a click event on the target element - * https://developer.mozilla.org/en/DOM/event.initMouseEvent - */ - var touch = e.changedTouches[0], - evt = document.createEvent('MouseEvents'); - evt.initMouseEvent('click', true, true, window, 0, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); - evt.simulated = true; // distinguish from a normal (nonsimulated) click - e.target.dispatchEvent(evt); - }; - - /** - * click - * - * Because we've already fired a click event in touchend, - * we need to listed for all native click events here - * and suppress them as necessary. - */ - click = function(e) { - /** - * Prevent ghost clicks by only allowing clicks we created - * in the click event we fired (look for e.simulated) - */ - var time = Date.now(), - timeDiff = time - lastClick.time, - x = e.clientX, - y = e.clientY, - xyDiff = [Math.abs(lastClick.x - x), Math.abs(lastClick.y - y)], - target = closest(e.target, 'A') || e.target, // needed for standalone apps - nodeName = target.nodeName, - isLink = nodeName === 'A', - standAlone = window.navigator.standalone && isLink && e.target.getAttribute("href"); - - lastClick.time = time; - lastClick.x = x; - lastClick.y = y; - - /** - * Unfortunately Android sometimes fires click events without touch events (seen on Kindle Fire), - * so we have to add more logic to determine the time of the last click. Not perfect... - * - * Older, simpler check: if((!e.simulated) || standAlone) - */ - if((!e.simulated && (timeDiff < 500 || (timeDiff < 1500 && xyDiff[0] < 50 && xyDiff[1] < 50))) || standAlone) { - e.preventDefault(); - e.stopPropagation(); - if(!standAlone) return false; - } - - /** - * Special logic for standalone web apps - * See http://stackoverflow.com/questions/2898740/iphone-safari-web-app-opens-links-in-new-window - */ - if(standAlone) { - window.location = target.getAttribute("href"); - } - - /** - * Add an energize-focus class to the targeted link (mimics :focus behavior) - * TODO: test and/or remove? Does this work? - */ - if(!target || !target.classList) return; - target.classList.add("energize-focus"); - window.setTimeout(function(){ - target.classList.remove("energize-focus"); - }, 150); - }; - - /** - * closest - * @param {HTMLElement} node current node to start searching from. - * @param {string} tagName the (uppercase) name of the tag you're looking for. - * - * Find the closest ancestor tag of a given node. - * - * Starts at node and goes up the DOM tree looking for a - * matching nodeName, continuing until hitting document.body - */ - closest = function(node, tagName){ - var curNode = node; - - while(curNode !== document.body) { // go up the dom until we find the tag we're after - if(!curNode || curNode.nodeName === tagName) { return curNode; } // found - curNode = curNode.parentNode; // not found, so keep going up - } - - return null; // not found - }; - - /** - * Add all delegated event listeners - * - * All the events we care about bubble up to document, - * so we can take advantage of event delegation. - * - * Note: no need to wait for DOMContentLoaded here - */ - document.addEventListener('touchstart', touchstart, false); - document.addEventListener('touchmove', touchmove, false); - document.addEventListener('touchend', touchend, false); - document.addEventListener('click', click, true); // TODO: why does this use capture? - -})(); \ No newline at end of file diff --git a/apidocs/cloud-api-source/source/javascripts/lib/_imagesloaded.min.js b/apidocs/cloud-api-source/source/javascripts/lib/_imagesloaded.min.js deleted file mode 100644 index d66f658937..0000000000 --- a/apidocs/cloud-api-source/source/javascripts/lib/_imagesloaded.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * imagesLoaded PACKAGED v3.1.8 - * JavaScript is all like "You images are done yet or what?" - * MIT License - */ - -(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s}); \ No newline at end of file diff --git a/apidocs/cloud-api-source/source/javascripts/lib/_jquery.highlight.js b/apidocs/cloud-api-source/source/javascripts/lib/_jquery.highlight.js deleted file mode 100644 index 9dcf3c7af3..0000000000 --- a/apidocs/cloud-api-source/source/javascripts/lib/_jquery.highlight.js +++ /dev/null @@ -1,108 +0,0 @@ -/* - * jQuery Highlight plugin - * - * Based on highlight v3 by Johann Burkard - * http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html - * - * Code a little bit refactored and cleaned (in my humble opinion). - * Most important changes: - * - has an option to highlight only entire words (wordsOnly - false by default), - * - has an option to be case sensitive (caseSensitive - false by default) - * - highlight element tag and class names can be specified in options - * - * Usage: - * // wrap every occurrance of text 'lorem' in content - * // with (default options) - * $('#content').highlight('lorem'); - * - * // search for and highlight more terms at once - * // so you can save some time on traversing DOM - * $('#content').highlight(['lorem', 'ipsum']); - * $('#content').highlight('lorem ipsum'); - * - * // search only for entire word 'lorem' - * $('#content').highlight('lorem', { wordsOnly: true }); - * - * // don't ignore case during search of term 'lorem' - * $('#content').highlight('lorem', { caseSensitive: true }); - * - * // wrap every occurrance of term 'ipsum' in content - * // with - * $('#content').highlight('ipsum', { element: 'em', className: 'important' }); - * - * // remove default highlight - * $('#content').unhighlight(); - * - * // remove custom highlight - * $('#content').unhighlight({ element: 'em', className: 'important' }); - * - * - * Copyright (c) 2009 Bartek Szopka - * - * Licensed under MIT license. - * - */ - -jQuery.extend({ - highlight: function (node, re, nodeName, className) { - if (node.nodeType === 3) { - var match = node.data.match(re); - if (match) { - var highlight = document.createElement(nodeName || 'span'); - highlight.className = className || 'highlight'; - var wordNode = node.splitText(match.index); - wordNode.splitText(match[0].length); - var wordClone = wordNode.cloneNode(true); - highlight.appendChild(wordClone); - wordNode.parentNode.replaceChild(highlight, wordNode); - return 1; //skip added node in parent - } - } else if ((node.nodeType === 1 && node.childNodes) && // only element nodes that have children - !/(script|style)/i.test(node.tagName) && // ignore script and style nodes - !(node.tagName === nodeName.toUpperCase() && node.className === className)) { // skip if already highlighted - for (var i = 0; i < node.childNodes.length; i++) { - i += jQuery.highlight(node.childNodes[i], re, nodeName, className); - } - } - return 0; - } -}); - -jQuery.fn.unhighlight = function (options) { - var settings = { className: 'highlight', element: 'span' }; - jQuery.extend(settings, options); - - return this.find(settings.element + "." + settings.className).each(function () { - var parent = this.parentNode; - parent.replaceChild(this.firstChild, this); - parent.normalize(); - }).end(); -}; - -jQuery.fn.highlight = function (words, options) { - var settings = { className: 'highlight', element: 'span', caseSensitive: false, wordsOnly: false }; - jQuery.extend(settings, options); - - if (words.constructor === String) { - words = [words]; - } - words = jQuery.grep(words, function(word, i){ - return word != ''; - }); - words = jQuery.map(words, function(word, i) { - return word.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - }); - if (words.length == 0) { return this; }; - - var flag = settings.caseSensitive ? "" : "i"; - var pattern = "(" + words.join("|") + ")"; - if (settings.wordsOnly) { - pattern = "\\b" + pattern + "\\b"; - } - var re = new RegExp(pattern, flag); - - return this.each(function () { - jQuery.highlight(this, re, settings.element, settings.className); - }); -}; - diff --git a/apidocs/cloud-api-source/source/javascripts/lib/_jquery.tocify.js b/apidocs/cloud-api-source/source/javascripts/lib/_jquery.tocify.js deleted file mode 100644 index 91cf637913..0000000000 --- a/apidocs/cloud-api-source/source/javascripts/lib/_jquery.tocify.js +++ /dev/null @@ -1,1042 +0,0 @@ -/* jquery Tocify - v1.8.0 - 2013-09-16 -* http://www.gregfranko.com/jquery.tocify.js/ -* Copyright (c) 2013 Greg Franko; Licensed MIT -* Modified lightly by Robert Lord to fix a bug I found, -* and also so it adds ids to headers -* also because I want height caching, since the -* height lookup for h1s and h2s was causing serious -* lag spikes below 30 fps */ - -// Immediately-Invoked Function Expression (IIFE) [Ben Alman Blog Post](http://benalman.com/news/2010/11/immediately-invoked-function-expression/) that calls another IIFE that contains all of the plugin logic. I used this pattern so that anyone viewing this code would not have to scroll to the bottom of the page to view the local parameters that were passed to the main IIFE. -(function(tocify) { - - // ECMAScript 5 Strict Mode: [John Resig Blog Post](http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/) - "use strict"; - - // Calls the second IIFE and locally passes in the global jQuery, window, and document objects - tocify(window.jQuery, window, document); - -} - -// Locally passes in `jQuery`, the `window` object, the `document` object, and an `undefined` variable. The `jQuery`, `window` and `document` objects are passed in locally, to improve performance, since javascript first searches for a variable match within the local variables set before searching the global variables set. All of the global variables are also passed in locally to be minifier friendly. `undefined` can be passed in locally, because it is not a reserved word in JavaScript. -(function($, window, document, undefined) { - - // ECMAScript 5 Strict Mode: [John Resig Blog Post](http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/) - "use strict"; - - var tocClassName = "tocify", - tocClass = "." + tocClassName, - tocFocusClassName = "tocify-focus", - tocHoverClassName = "tocify-hover", - hideTocClassName = "tocify-hide", - hideTocClass = "." + hideTocClassName, - headerClassName = "tocify-header", - headerClass = "." + headerClassName, - subheaderClassName = "tocify-subheader", - subheaderClass = "." + subheaderClassName, - itemClassName = "tocify-item", - itemClass = "." + itemClassName, - extendPageClassName = "tocify-extend-page", - extendPageClass = "." + extendPageClassName; - - // Calling the jQueryUI Widget Factory Method - $.widget("toc.tocify", { - - //Plugin version - version: "1.8.0", - - // These options will be used as defaults - options: { - - // **context**: Accepts String: Any jQuery selector - // The container element that holds all of the elements used to generate the table of contents - context: "body", - - // **ignoreSelector**: Accepts String: Any jQuery selector - // A selector to any element that would be matched by selectors that you wish to be ignored - ignoreSelector: null, - - // **selectors**: Accepts an Array of Strings: Any jQuery selectors - // The element's used to generate the table of contents. The order is very important since it will determine the table of content's nesting structure - selectors: "h1, h2, h3", - - // **showAndHide**: Accepts a boolean: true or false - // Used to determine if elements should be shown and hidden - showAndHide: true, - - // **showEffect**: Accepts String: "none", "fadeIn", "show", or "slideDown" - // Used to display any of the table of contents nested items - showEffect: "slideDown", - - // **showEffectSpeed**: Accepts Number (milliseconds) or String: "slow", "medium", or "fast" - // The time duration of the show animation - showEffectSpeed: "medium", - - // **hideEffect**: Accepts String: "none", "fadeOut", "hide", or "slideUp" - // Used to hide any of the table of contents nested items - hideEffect: "slideUp", - - // **hideEffectSpeed**: Accepts Number (milliseconds) or String: "slow", "medium", or "fast" - // The time duration of the hide animation - hideEffectSpeed: "medium", - - // **smoothScroll**: Accepts a boolean: true or false - // Determines if a jQuery animation should be used to scroll to specific table of contents items on the page - smoothScroll: true, - - // **smoothScrollSpeed**: Accepts Number (milliseconds) or String: "slow", "medium", or "fast" - // The time duration of the smoothScroll animation - smoothScrollSpeed: "medium", - - // **scrollTo**: Accepts Number (pixels) - // The amount of space between the top of page and the selected table of contents item after the page has been scrolled - scrollTo: 0, - - // **showAndHideOnScroll**: Accepts a boolean: true or false - // Determines if table of contents nested items should be shown and hidden while scrolling - showAndHideOnScroll: true, - - // **highlightOnScroll**: Accepts a boolean: true or false - // Determines if table of contents nested items should be highlighted (set to a different color) while scrolling - highlightOnScroll: true, - - // **highlightOffset**: Accepts a number - // The offset distance in pixels to trigger the next active table of contents item - highlightOffset: 40, - - // **theme**: Accepts a string: "bootstrap", "jqueryui", or "none" - // Determines if Twitter Bootstrap, jQueryUI, or Tocify classes should be added to the table of contents - theme: "bootstrap", - - // **extendPage**: Accepts a boolean: true or false - // If a user scrolls to the bottom of the page and the page is not tall enough to scroll to the last table of contents item, then the page height is increased - extendPage: true, - - // **extendPageOffset**: Accepts a number: pixels - // How close to the bottom of the page a user must scroll before the page is extended - extendPageOffset: 100, - - // **history**: Accepts a boolean: true or false - // Adds a hash to the page url to maintain history - history: true, - - // **scrollHistory**: Accepts a boolean: true or false - // Adds a hash to the page url, to maintain history, when scrolling to a TOC item - scrollHistory: false, - - // **hashGenerator**: How the hash value (the anchor segment of the URL, following the - // # character) will be generated. - // - // "compact" (default) - #CompressesEverythingTogether - // "pretty" - #looks-like-a-nice-url-and-is-easily-readable - // function(text, element){} - Your own hash generation function that accepts the text as an - // argument, and returns the hash value. - hashGenerator: "compact", - - // **highlightDefault**: Accepts a boolean: true or false - // Set's the first TOC item as active if no other TOC item is active. - highlightDefault: true - - }, - - // _Create - // ------- - // Constructs the plugin. Only called once. - _create: function() { - - var self = this; - - self.tocifyWrapper = $('.tocify-wrapper'); - self.extendPageScroll = true; - - // Internal array that keeps track of all TOC items (Helps to recognize if there are duplicate TOC item strings) - self.items = []; - - // Generates the HTML for the dynamic table of contents - self._generateToc(); - - // Caches heights and anchors - self.cachedHeights = [], - self.cachedAnchors = []; - - // Adds CSS classes to the newly generated table of contents HTML - self._addCSSClasses(); - - self.webkit = (function() { - - for(var prop in window) { - - if(prop) { - - if(prop.toLowerCase().indexOf("webkit") !== -1) { - - return true; - - } - - } - - } - - return false; - - }()); - - // Adds jQuery event handlers to the newly generated table of contents - self._setEventHandlers(); - - // Binding to the Window load event to make sure the correct scrollTop is calculated - $(window).load(function() { - - // Sets the active TOC item - self._setActiveElement(true); - - // Once all animations on the page are complete, this callback function will be called - $("html, body").promise().done(function() { - - setTimeout(function() { - - self.extendPageScroll = false; - - },0); - - }); - - }); - - }, - - // _generateToc - // ------------ - // Generates the HTML for the dynamic table of contents - _generateToc: function() { - - // _Local variables_ - - // Stores the plugin context in the self variable - var self = this, - - // All of the HTML tags found within the context provided (i.e. body) that match the top level jQuery selector above - firstElem, - - // Instantiated variable that will store the top level newly created unordered list DOM element - ul, - ignoreSelector = self.options.ignoreSelector; - - // If the selectors option has a comma within the string - if(this.options.selectors.indexOf(",") !== -1) { - - // Grabs the first selector from the string - firstElem = $(this.options.context).find(this.options.selectors.replace(/ /g,"").substr(0, this.options.selectors.indexOf(","))); - - } - - // If the selectors option does not have a comman within the string - else { - - // Grabs the first selector from the string and makes sure there are no spaces - firstElem = $(this.options.context).find(this.options.selectors.replace(/ /g,"")); - - } - - if(!firstElem.length) { - - self.element.addClass(hideTocClassName); - - return; - - } - - self.element.addClass(tocClassName); - - // Loops through each top level selector - firstElem.each(function(index) { - - //If the element matches the ignoreSelector then we skip it - if($(this).is(ignoreSelector)) { - return; - } - - // Creates an unordered list HTML element and adds a dynamic ID and standard class name - ul = $("
      ", { - "id": headerClassName + index, - "class": headerClassName - }). - - // Appends a top level list item HTML element to the previously created HTML header - append(self._nestElements($(this), index)); - - // Add the created unordered list element to the HTML element calling the plugin - self.element.append(ul); - - // Finds all of the HTML tags between the header and subheader elements - $(this).nextUntil(this.nodeName.toLowerCase()).each(function() { - - // If there are no nested subheader elemements - if($(this).find(self.options.selectors).length === 0) { - - // Loops through all of the subheader elements - $(this).filter(self.options.selectors).each(function() { - - //If the element matches the ignoreSelector then we skip it - if($(this).is(ignoreSelector)) { - return; - } - - self._appendSubheaders.call(this, self, ul); - - }); - - } - - // If there are nested subheader elements - else { - - // Loops through all of the subheader elements - $(this).find(self.options.selectors).each(function() { - - //If the element matches the ignoreSelector then we skip it - if($(this).is(ignoreSelector)) { - return; - } - - self._appendSubheaders.call(this, self, ul); - - }); - - } - - }); - - }); - - }, - - _setActiveElement: function(pageload) { - - var self = this, - - hash = window.location.hash.substring(1), - - elem = self.element.find("li[data-unique='" + hash + "']"); - - if(hash.length) { - - // Removes highlighting from all of the list item's - self.element.find("." + self.focusClass).removeClass(self.focusClass); - - // Highlights the current list item that was clicked - elem.addClass(self.focusClass); - - // If the showAndHide option is true - if(self.options.showAndHide) { - - // Triggers the click event on the currently focused TOC item - elem.click(); - - } - - } - - else { - - // Removes highlighting from all of the list item's - self.element.find("." + self.focusClass).removeClass(self.focusClass); - - if(!hash.length && pageload && self.options.highlightDefault) { - - // Highlights the first TOC item if no other items are highlighted - self.element.find(itemClass).first().addClass(self.focusClass); - - } - - } - - return self; - - }, - - // _nestElements - // ------------- - // Helps create the table of contents list by appending nested list items - _nestElements: function(self, index) { - - var arr, item, hashValue; - - arr = $.grep(this.items, function (item) { - - return item === self.text(); - - }); - - // If there is already a duplicate TOC item - if(arr.length) { - - // Adds the current TOC item text and index (for slight randomization) to the internal array - this.items.push(self.text() + index); - - } - - // If there not a duplicate TOC item - else { - - // Adds the current TOC item text to the internal array - this.items.push(self.text()); - - } - - hashValue = this._generateHashValue(arr, self, index); - - // ADDED BY ROBERT - // actually add the hash value to the element's id - // self.attr("id", "link-" + hashValue); - - // Appends a list item HTML element to the last unordered list HTML element found within the HTML element calling the plugin - item = $("
    • ", { - - // Sets a common class name to the list item - "class": itemClassName, - - "data-unique": hashValue - - }).append($("", { - - "text": self.text() - - })); - - // Adds an HTML anchor tag before the currently traversed HTML element - self.before($("
      ", { - - // Sets a name attribute on the anchor tag to the text of the currently traversed HTML element (also making sure that all whitespace is replaced with an underscore) - "name": hashValue, - - "data-unique": hashValue - - })); - - return item; - - }, - - // _generateHashValue - // ------------------ - // Generates the hash value that will be used to refer to each item. - _generateHashValue: function(arr, self, index) { - - var hashValue = "", - hashGeneratorOption = this.options.hashGenerator; - - if (hashGeneratorOption === "pretty") { - // remove weird characters - - - // prettify the text - hashValue = self.text().toLowerCase().replace(/\s/g, "-"); - - // ADDED BY ROBERT - // remove weird characters - hashValue = hashValue.replace(/[^\x00-\x7F]/g, ""); - - // fix double hyphens - while (hashValue.indexOf("--") > -1) { - hashValue = hashValue.replace(/--/g, "-"); - } - - // fix colon-space instances - while (hashValue.indexOf(":-") > -1) { - hashValue = hashValue.replace(/:-/g, "-"); - } - - } else if (typeof hashGeneratorOption === "function") { - - // call the function - hashValue = hashGeneratorOption(self.text(), self); - - } else { - - // compact - the default - hashValue = self.text().replace(/\s/g, ""); - - } - - // add the index if we need to - if (arr.length) { hashValue += ""+index; } - - // return the value - return hashValue; - - }, - - // _appendElements - // --------------- - // Helps create the table of contents list by appending subheader elements - - _appendSubheaders: function(self, ul) { - - // The current element index - var index = $(this).index(self.options.selectors), - - // Finds the previous header DOM element - previousHeader = $(self.options.selectors).eq(index - 1), - - currentTagName = +$(this).prop("tagName").charAt(1), - - previousTagName = +previousHeader.prop("tagName").charAt(1), - - lastSubheader; - - // If the current header DOM element is smaller than the previous header DOM element or the first subheader - if(currentTagName < previousTagName) { - - // Selects the last unordered list HTML found within the HTML element calling the plugin - self.element.find(subheaderClass + "[data-tag=" + currentTagName + "]").last().append(self._nestElements($(this), index)); - - } - - // If the current header DOM element is the same type of header(eg. h4) as the previous header DOM element - else if(currentTagName === previousTagName) { - - ul.find(itemClass).last().after(self._nestElements($(this), index)); - - } - - else { - - // Selects the last unordered list HTML found within the HTML element calling the plugin - ul.find(itemClass).last(). - - // Appends an unorderedList HTML element to the dynamic `unorderedList` variable and sets a common class name - after($("
        ", { - - "class": subheaderClassName, - - "data-tag": currentTagName - - })).next(subheaderClass). - - // Appends a list item HTML element to the last unordered list HTML element found within the HTML element calling the plugin - append(self._nestElements($(this), index)); - } - - }, - - // _setEventHandlers - // ---------------- - // Adds jQuery event handlers to the newly generated table of contents - _setEventHandlers: function() { - - // _Local variables_ - - // Stores the plugin context in the self variable - var self = this, - - // Instantiates a new variable that will be used to hold a specific element's context - $self, - - // Instantiates a new variable that will be used to determine the smoothScroll animation time duration - duration; - - // Event delegation that looks for any clicks on list item elements inside of the HTML element calling the plugin - this.element.on("click.tocify", "li", function(event) { - - if(self.options.history) { - - window.location.hash = $(this).attr("data-unique"); - - } - - // Removes highlighting from all of the list item's - self.element.find("." + self.focusClass).removeClass(self.focusClass); - - // Highlights the current list item that was clicked - $(this).addClass(self.focusClass); - - // If the showAndHide option is true - if(self.options.showAndHide) { - - var elem = $('li[data-unique="' + $(this).attr("data-unique") + '"]'); - - self._triggerShow(elem); - - } - - self._scrollTo($(this)); - - }); - - // Mouseenter and Mouseleave event handlers for the list item's within the HTML element calling the plugin - this.element.find("li").on({ - - // Mouseenter event handler - "mouseenter.tocify": function() { - - // Adds a hover CSS class to the current list item - $(this).addClass(self.hoverClass); - - // Makes sure the cursor is set to the pointer icon - $(this).css("cursor", "pointer"); - - }, - - // Mouseleave event handler - "mouseleave.tocify": function() { - - if(self.options.theme !== "bootstrap") { - - // Removes the hover CSS class from the current list item - $(this).removeClass(self.hoverClass); - - } - - } - }); - - // Reset height cache on scroll - - $(window).on('resize', function() { - self.calculateHeights(); - }); - - // Window scroll event handler - $(window).on("scroll.tocify", function() { - - // Once all animations on the page are complete, this callback function will be called - $("html, body").promise().done(function() { - - // Local variables - - // Stores how far the user has scrolled - var winScrollTop = $(window).scrollTop(), - - // Stores the height of the window - winHeight = $(window).height(), - - // Stores the height of the document - docHeight = $(document).height(), - - scrollHeight = $("body")[0].scrollHeight, - - // Instantiates a variable that will be used to hold a selected HTML element - elem, - - lastElem, - - lastElemOffset, - - currentElem; - - if(self.options.extendPage) { - - // If the user has scrolled to the bottom of the page and the last toc item is not focused - if((self.webkit && winScrollTop >= scrollHeight - winHeight - self.options.extendPageOffset) || (!self.webkit && winHeight + winScrollTop > docHeight - self.options.extendPageOffset)) { - - if(!$(extendPageClass).length) { - - lastElem = $('div[data-unique="' + $(itemClass).last().attr("data-unique") + '"]'); - - if(!lastElem.length) return; - - // Gets the top offset of the page header that is linked to the last toc item - lastElemOffset = lastElem.offset().top; - - // Appends a div to the bottom of the page and sets the height to the difference of the window scrollTop and the last element's position top offset - $(self.options.context).append($("
        ", { - - "class": extendPageClassName, - - "height": Math.abs(lastElemOffset - winScrollTop) + "px", - - "data-unique": extendPageClassName - - })); - - if(self.extendPageScroll) { - - currentElem = self.element.find('li.active'); - - self._scrollTo($("div[data-unique=" + currentElem.attr("data-unique") + "]")); - - } - - } - - } - - } - - // The zero timeout ensures the following code is run after the scroll events - setTimeout(function() { - - // _Local variables_ - - // Stores the distance to the closest anchor - var // Stores the index of the closest anchor - closestAnchorIdx = null, - anchorText; - - // if never calculated before, calculate and cache the heights - if (self.cachedHeights.length == 0) { - self.calculateHeights(); - } - - var scrollTop = $(window).scrollTop(); - - // Determines the index of the closest anchor - self.cachedAnchors.each(function(idx) { - if (self.cachedHeights[idx] - scrollTop < 0) { - closestAnchorIdx = idx; - } else { - return false; - } - }); - - anchorText = $(self.cachedAnchors[closestAnchorIdx]).attr("data-unique"); - - // Stores the list item HTML element that corresponds to the currently traversed anchor tag - elem = $('li[data-unique="' + anchorText + '"]'); - - // If the `highlightOnScroll` option is true and a next element is found - if(self.options.highlightOnScroll && elem.length && !elem.hasClass(self.focusClass)) { - - // Removes highlighting from all of the list item's - self.element.find("." + self.focusClass).removeClass(self.focusClass); - - // Highlights the corresponding list item - elem.addClass(self.focusClass); - - // Scroll to highlighted element's header - var tocifyWrapper = self.tocifyWrapper; - var scrollToElem = $(elem).closest('.tocify-header'); - - var elementOffset = scrollToElem.offset().top, - wrapperOffset = tocifyWrapper.offset().top; - var offset = elementOffset - wrapperOffset; - - if (offset >= $(window).height()) { - var scrollPosition = offset + tocifyWrapper.scrollTop(); - tocifyWrapper.scrollTop(scrollPosition); - } else if (offset < 0) { - tocifyWrapper.scrollTop(0); - } - } - - if(self.options.scrollHistory) { - - // IF STATEMENT ADDED BY ROBERT - - if(window.location.hash !== "#" + anchorText && anchorText !== undefined) { - - if(history.replaceState) { - history.replaceState({}, "", "#" + anchorText); - // provide a fallback - } else { - scrollV = document.body.scrollTop; - scrollH = document.body.scrollLeft; - location.hash = "#" + anchorText; - document.body.scrollTop = scrollV; - document.body.scrollLeft = scrollH; - } - - } - - } - - // If the `showAndHideOnScroll` option is true - if(self.options.showAndHideOnScroll && self.options.showAndHide) { - - self._triggerShow(elem, true); - - } - - }, 0); - - }); - - }); - - }, - - // calculateHeights - // ---- - // ADDED BY ROBERT - calculateHeights: function() { - var self = this; - self.cachedHeights = []; - self.cachedAnchors = []; - var anchors = $(self.options.context).find("div[data-unique]"); - anchors.each(function(idx) { - var distance = (($(this).next().length ? $(this).next() : $(this)).offset().top - self.options.highlightOffset); - self.cachedHeights[idx] = distance; - }); - self.cachedAnchors = anchors; - }, - - // Show - // ---- - // Opens the current sub-header - show: function(elem, scroll) { - - // Stores the plugin context in the `self` variable - var self = this, - element = elem; - - // If the sub-header is not already visible - if (!elem.is(":visible")) { - - // If the current element does not have any nested subheaders, is not a header, and its parent is not visible - if(!elem.find(subheaderClass).length && !elem.parent().is(headerClass) && !elem.parent().is(":visible")) { - - // Sets the current element to all of the subheaders within the current header - elem = elem.parents(subheaderClass).add(elem); - - } - - // If the current element does not have any nested subheaders and is not a header - else if(!elem.children(subheaderClass).length && !elem.parent().is(headerClass)) { - - // Sets the current element to the closest subheader - elem = elem.closest(subheaderClass); - - } - - //Determines what jQuery effect to use - switch (self.options.showEffect) { - - //Uses `no effect` - case "none": - - elem.show(); - - break; - - //Uses the jQuery `show` special effect - case "show": - - elem.show(self.options.showEffectSpeed); - - break; - - //Uses the jQuery `slideDown` special effect - case "slideDown": - - elem.slideDown(self.options.showEffectSpeed); - - break; - - //Uses the jQuery `fadeIn` special effect - case "fadeIn": - - elem.fadeIn(self.options.showEffectSpeed); - - break; - - //If none of the above options were passed, then a `jQueryUI show effect` is expected - default: - - elem.show(); - - break; - - } - - } - - // If the current subheader parent element is a header - if(elem.parent().is(headerClass)) { - - // Hides all non-active sub-headers - self.hide($(subheaderClass).not(elem)); - - } - - // If the current subheader parent element is not a header - else { - - // Hides all non-active sub-headers - self.hide($(subheaderClass).not(elem.closest(headerClass).find(subheaderClass).not(elem.siblings()))); - - } - - // Maintains chainablity - return self; - - }, - - // Hide - // ---- - // Closes the current sub-header - hide: function(elem) { - - // Stores the plugin context in the `self` variable - var self = this; - - //Determines what jQuery effect to use - switch (self.options.hideEffect) { - - // Uses `no effect` - case "none": - - elem.hide(); - - break; - - // Uses the jQuery `hide` special effect - case "hide": - - elem.hide(self.options.hideEffectSpeed); - - break; - - // Uses the jQuery `slideUp` special effect - case "slideUp": - - elem.slideUp(self.options.hideEffectSpeed); - - break; - - // Uses the jQuery `fadeOut` special effect - case "fadeOut": - - elem.fadeOut(self.options.hideEffectSpeed); - - break; - - // If none of the above options were passed, then a `jqueryUI hide effect` is expected - default: - - elem.hide(); - - break; - - } - - // Maintains chainablity - return self; - }, - - // _triggerShow - // ------------ - // Determines what elements get shown on scroll and click - _triggerShow: function(elem, scroll) { - - var self = this; - - // If the current element's parent is a header element or the next element is a nested subheader element - if(elem.parent().is(headerClass) || elem.next().is(subheaderClass)) { - - // Shows the next sub-header element - self.show(elem.next(subheaderClass), scroll); - - } - - // If the current element's parent is a subheader element - else if(elem.parent().is(subheaderClass)) { - - // Shows the parent sub-header element - self.show(elem.parent(), scroll); - - } - - // Maintains chainability - return self; - - }, - - // _addCSSClasses - // -------------- - // Adds CSS classes to the newly generated table of contents HTML - _addCSSClasses: function() { - - // If the user wants a jqueryUI theme - if(this.options.theme === "jqueryui") { - - this.focusClass = "ui-state-default"; - - this.hoverClass = "ui-state-hover"; - - //Adds the default styling to the dropdown list - this.element.addClass("ui-widget").find(".toc-title").addClass("ui-widget-header").end().find("li").addClass("ui-widget-content"); - - } - - // If the user wants a twitterBootstrap theme - else if(this.options.theme === "bootstrap") { - - this.element.find(headerClass + "," + subheaderClass).addClass("nav nav-list"); - - this.focusClass = "active"; - - } - - // If a user does not want a prebuilt theme - else { - - // Adds more neutral classes (instead of jqueryui) - - this.focusClass = tocFocusClassName; - - this.hoverClass = tocHoverClassName; - - } - - //Maintains chainability - return this; - - }, - - // setOption - // --------- - // Sets a single Tocify option after the plugin is invoked - setOption: function() { - - // Calls the jQueryUI Widget Factory setOption method - $.Widget.prototype._setOption.apply(this, arguments); - - }, - - // setOptions - // ---------- - // Sets a single or multiple Tocify options after the plugin is invoked - setOptions: function() { - - // Calls the jQueryUI Widget Factory setOptions method - $.Widget.prototype._setOptions.apply(this, arguments); - - }, - - // _scrollTo - // --------- - // Scrolls to a specific element - _scrollTo: function(elem) { - - var self = this, - duration = self.options.smoothScroll || 0, - scrollTo = self.options.scrollTo; - - // Once all animations on the page are complete, this callback function will be called - $("html, body").promise().done(function() { - - // Animates the html and body element scrolltops - $("html, body").animate({ - - // Sets the jQuery `scrollTop` to the top offset of the HTML div tag that matches the current list item's `data-unique` tag - "scrollTop": $('div[data-unique="' + elem.attr("data-unique") + '"]').next().offset().top - ($.isFunction(scrollTo) ? scrollTo.call() : scrollTo) + "px" - - }, { - - // Sets the smoothScroll animation time duration to the smoothScrollSpeed option - "duration": duration - - }); - - }); - - // Maintains chainability - return self; - - } - - }); - -})); //end of plugin diff --git a/apidocs/cloud-api-source/source/javascripts/lib/_jquery_ui.js b/apidocs/cloud-api-source/source/javascripts/lib/_jquery_ui.js deleted file mode 100644 index 637e9c1425..0000000000 --- a/apidocs/cloud-api-source/source/javascripts/lib/_jquery_ui.js +++ /dev/null @@ -1,566 +0,0 @@ -/*! jQuery UI - v1.11.3 - 2015-02-12 - * http://jqueryui.com - * Includes: widget.js - * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ - -(function( factory ) { - if ( typeof define === "function" && define.amd ) { - - // AMD. Register as an anonymous module. - define([ "jquery" ], factory ); - } else { - - // Browser globals - factory( jQuery ); - } -}(function( $ ) { - /*! - * jQuery UI Widget 1.11.3 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/jQuery.widget/ - */ - - - var widget_uuid = 0, - widget_slice = Array.prototype.slice; - - $.cleanData = (function( orig ) { - return function( elems ) { - var events, elem, i; - for ( i = 0; (elem = elems[i]) != null; i++ ) { - try { - - // Only trigger remove when necessary to save time - events = $._data( elem, "events" ); - if ( events && events.remove ) { - $( elem ).triggerHandler( "remove" ); - } - - // http://bugs.jquery.com/ticket/8235 - } catch ( e ) {} - } - orig( elems ); - }; - })( $.cleanData ); - - $.widget = function( name, base, prototype ) { - var fullName, existingConstructor, constructor, basePrototype, - // proxiedPrototype allows the provided prototype to remain unmodified - // so that it can be used as a mixin for multiple widgets (#8876) - proxiedPrototype = {}, - namespace = name.split( "." )[ 0 ]; - - name = name.split( "." )[ 1 ]; - fullName = namespace + "-" + name; - - if ( !prototype ) { - prototype = base; - base = $.Widget; - } - - // create selector for plugin - $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { - return !!$.data( elem, fullName ); - }; - - $[ namespace ] = $[ namespace ] || {}; - existingConstructor = $[ namespace ][ name ]; - constructor = $[ namespace ][ name ] = function( options, element ) { - // allow instantiation without "new" keyword - if ( !this._createWidget ) { - return new constructor( options, element ); - } - - // allow instantiation without initializing for simple inheritance - // must use "new" keyword (the code above always passes args) - if ( arguments.length ) { - this._createWidget( options, element ); - } - }; - // extend with the existing constructor to carry over any static properties - $.extend( constructor, existingConstructor, { - version: prototype.version, - // copy the object used to create the prototype in case we need to - // redefine the widget later - _proto: $.extend( {}, prototype ), - // track widgets that inherit from this widget in case this widget is - // redefined after a widget inherits from it - _childConstructors: [] - }); - - basePrototype = new base(); - // we need to make the options hash a property directly on the new instance - // otherwise we'll modify the options hash on the prototype that we're - // inheriting from - basePrototype.options = $.widget.extend( {}, basePrototype.options ); - $.each( prototype, function( prop, value ) { - if ( !$.isFunction( value ) ) { - proxiedPrototype[ prop ] = value; - return; - } - proxiedPrototype[ prop ] = (function() { - var _super = function() { - return base.prototype[ prop ].apply( this, arguments ); - }, - _superApply = function( args ) { - return base.prototype[ prop ].apply( this, args ); - }; - return function() { - var __super = this._super, - __superApply = this._superApply, - returnValue; - - this._super = _super; - this._superApply = _superApply; - - returnValue = value.apply( this, arguments ); - - this._super = __super; - this._superApply = __superApply; - - return returnValue; - }; - })(); - }); - constructor.prototype = $.widget.extend( basePrototype, { - // TODO: remove support for widgetEventPrefix - // always use the name + a colon as the prefix, e.g., draggable:start - // don't prefix for widgets that aren't DOM-based - widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name - }, proxiedPrototype, { - constructor: constructor, - namespace: namespace, - widgetName: name, - widgetFullName: fullName - }); - - // If this widget is being redefined then we need to find all widgets that - // are inheriting from it and redefine all of them so that they inherit from - // the new version of this widget. We're essentially trying to replace one - // level in the prototype chain. - if ( existingConstructor ) { - $.each( existingConstructor._childConstructors, function( i, child ) { - var childPrototype = child.prototype; - - // redefine the child widget using the same prototype that was - // originally used, but inherit from the new version of the base - $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); - }); - // remove the list of existing child constructors from the old constructor - // so the old child constructors can be garbage collected - delete existingConstructor._childConstructors; - } else { - base._childConstructors.push( constructor ); - } - - $.widget.bridge( name, constructor ); - - return constructor; - }; - - $.widget.extend = function( target ) { - var input = widget_slice.call( arguments, 1 ), - inputIndex = 0, - inputLength = input.length, - key, - value; - for ( ; inputIndex < inputLength; inputIndex++ ) { - for ( key in input[ inputIndex ] ) { - value = input[ inputIndex ][ key ]; - if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { - // Clone objects - if ( $.isPlainObject( value ) ) { - target[ key ] = $.isPlainObject( target[ key ] ) ? - $.widget.extend( {}, target[ key ], value ) : - // Don't extend strings, arrays, etc. with objects - $.widget.extend( {}, value ); - // Copy everything else by reference - } else { - target[ key ] = value; - } - } - } - } - return target; - }; - - $.widget.bridge = function( name, object ) { - var fullName = object.prototype.widgetFullName || name; - $.fn[ name ] = function( options ) { - var isMethodCall = typeof options === "string", - args = widget_slice.call( arguments, 1 ), - returnValue = this; - - if ( isMethodCall ) { - this.each(function() { - var methodValue, - instance = $.data( this, fullName ); - if ( options === "instance" ) { - returnValue = instance; - return false; - } - if ( !instance ) { - return $.error( "cannot call methods on " + name + " prior to initialization; " + - "attempted to call method '" + options + "'" ); - } - if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { - return $.error( "no such method '" + options + "' for " + name + " widget instance" ); - } - methodValue = instance[ options ].apply( instance, args ); - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue && methodValue.jquery ? - returnValue.pushStack( methodValue.get() ) : - methodValue; - return false; - } - }); - } else { - - // Allow multiple hashes to be passed on init - if ( args.length ) { - options = $.widget.extend.apply( null, [ options ].concat(args) ); - } - - this.each(function() { - var instance = $.data( this, fullName ); - if ( instance ) { - instance.option( options || {} ); - if ( instance._init ) { - instance._init(); - } - } else { - $.data( this, fullName, new object( options, this ) ); - } - }); - } - - return returnValue; - }; - }; - - $.Widget = function( /* options, element */ ) {}; - $.Widget._childConstructors = []; - - $.Widget.prototype = { - widgetName: "widget", - widgetEventPrefix: "", - defaultElement: "
        ", - options: { - disabled: false, - - // callbacks - create: null - }, - _createWidget: function( options, element ) { - element = $( element || this.defaultElement || this )[ 0 ]; - this.element = $( element ); - this.uuid = widget_uuid++; - this.eventNamespace = "." + this.widgetName + this.uuid; - - this.bindings = $(); - this.hoverable = $(); - this.focusable = $(); - - if ( element !== this ) { - $.data( element, this.widgetFullName, this ); - this._on( true, this.element, { - remove: function( event ) { - if ( event.target === element ) { - this.destroy(); - } - } - }); - this.document = $( element.style ? - // element within the document - element.ownerDocument : - // element is window or document - element.document || element ); - this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); - } - - this.options = $.widget.extend( {}, - this.options, - this._getCreateOptions(), - options ); - - this._create(); - this._trigger( "create", null, this._getCreateEventData() ); - this._init(); - }, - _getCreateOptions: $.noop, - _getCreateEventData: $.noop, - _create: $.noop, - _init: $.noop, - - destroy: function() { - this._destroy(); - // we can probably remove the unbind calls in 2.0 - // all event bindings should go through this._on() - this.element - .unbind( this.eventNamespace ) - .removeData( this.widgetFullName ) - // support: jquery <1.6.3 - // http://bugs.jquery.com/ticket/9413 - .removeData( $.camelCase( this.widgetFullName ) ); - this.widget() - .unbind( this.eventNamespace ) - .removeAttr( "aria-disabled" ) - .removeClass( - this.widgetFullName + "-disabled " + - "ui-state-disabled" ); - - // clean up events and states - this.bindings.unbind( this.eventNamespace ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - }, - _destroy: $.noop, - - widget: function() { - return this.element; - }, - - option: function( key, value ) { - var options = key, - parts, - curOption, - i; - - if ( arguments.length === 0 ) { - // don't return a reference to the internal hash - return $.widget.extend( {}, this.options ); - } - - if ( typeof key === "string" ) { - // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } - options = {}; - parts = key.split( "." ); - key = parts.shift(); - if ( parts.length ) { - curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); - for ( i = 0; i < parts.length - 1; i++ ) { - curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; - curOption = curOption[ parts[ i ] ]; - } - key = parts.pop(); - if ( arguments.length === 1 ) { - return curOption[ key ] === undefined ? null : curOption[ key ]; - } - curOption[ key ] = value; - } else { - if ( arguments.length === 1 ) { - return this.options[ key ] === undefined ? null : this.options[ key ]; - } - options[ key ] = value; - } - } - - this._setOptions( options ); - - return this; - }, - _setOptions: function( options ) { - var key; - - for ( key in options ) { - this._setOption( key, options[ key ] ); - } - - return this; - }, - _setOption: function( key, value ) { - this.options[ key ] = value; - - if ( key === "disabled" ) { - this.widget() - .toggleClass( this.widgetFullName + "-disabled", !!value ); - - // If the widget is becoming disabled, then nothing is interactive - if ( value ) { - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - } - } - - return this; - }, - - enable: function() { - return this._setOptions({ disabled: false }); - }, - disable: function() { - return this._setOptions({ disabled: true }); - }, - - _on: function( suppressDisabledCheck, element, handlers ) { - var delegateElement, - instance = this; - - // no suppressDisabledCheck flag, shuffle arguments - if ( typeof suppressDisabledCheck !== "boolean" ) { - handlers = element; - element = suppressDisabledCheck; - suppressDisabledCheck = false; - } - - // no element argument, shuffle and use this.element - if ( !handlers ) { - handlers = element; - element = this.element; - delegateElement = this.widget(); - } else { - element = delegateElement = $( element ); - this.bindings = this.bindings.add( element ); - } - - $.each( handlers, function( event, handler ) { - function handlerProxy() { - // allow widgets to customize the disabled handling - // - disabled as an array instead of boolean - // - disabled class as method for disabling individual parts - if ( !suppressDisabledCheck && - ( instance.options.disabled === true || - $( this ).hasClass( "ui-state-disabled" ) ) ) { - return; - } - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - - // copy the guid so direct unbinding works - if ( typeof handler !== "string" ) { - handlerProxy.guid = handler.guid = - handler.guid || handlerProxy.guid || $.guid++; - } - - var match = event.match( /^([\w:-]*)\s*(.*)$/ ), - eventName = match[1] + instance.eventNamespace, - selector = match[2]; - if ( selector ) { - delegateElement.delegate( selector, eventName, handlerProxy ); - } else { - element.bind( eventName, handlerProxy ); - } - }); - }, - - _off: function( element, eventName ) { - eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + - this.eventNamespace; - element.unbind( eventName ).undelegate( eventName ); - - // Clear the stack to avoid memory leaks (#10056) - this.bindings = $( this.bindings.not( element ).get() ); - this.focusable = $( this.focusable.not( element ).get() ); - this.hoverable = $( this.hoverable.not( element ).get() ); - }, - - _delay: function( handler, delay ) { - function handlerProxy() { - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - var instance = this; - return setTimeout( handlerProxy, delay || 0 ); - }, - - _hoverable: function( element ) { - this.hoverable = this.hoverable.add( element ); - this._on( element, { - mouseenter: function( event ) { - $( event.currentTarget ).addClass( "ui-state-hover" ); - }, - mouseleave: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-hover" ); - } - }); - }, - - _focusable: function( element ) { - this.focusable = this.focusable.add( element ); - this._on( element, { - focusin: function( event ) { - $( event.currentTarget ).addClass( "ui-state-focus" ); - }, - focusout: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-focus" ); - } - }); - }, - - _trigger: function( type, event, data ) { - var prop, orig, - callback = this.options[ type ]; - - data = data || {}; - event = $.Event( event ); - event.type = ( type === this.widgetEventPrefix ? - type : - this.widgetEventPrefix + type ).toLowerCase(); - // the original event may come from any element - // so we need to reset the target on the new event - event.target = this.element[ 0 ]; - - // copy original event properties over to the new event - orig = event.originalEvent; - if ( orig ) { - for ( prop in orig ) { - if ( !( prop in event ) ) { - event[ prop ] = orig[ prop ]; - } - } - } - - this.element.trigger( event, data ); - return !( $.isFunction( callback ) && - callback.apply( this.element[0], [ event ].concat( data ) ) === false || - event.isDefaultPrevented() ); - } - }; - - $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { - $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { - if ( typeof options === "string" ) { - options = { effect: options }; - } - var hasOptions, - effectName = !options ? - method : - options === true || typeof options === "number" ? - defaultEffect : - options.effect || defaultEffect; - options = options || {}; - if ( typeof options === "number" ) { - options = { duration: options }; - } - hasOptions = !$.isEmptyObject( options ); - options.complete = callback; - if ( options.delay ) { - element.delay( options.delay ); - } - if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { - element[ method ]( options ); - } else if ( effectName !== method && element[ effectName ] ) { - element[ effectName ]( options.duration, options.easing, callback ); - } else { - element.queue(function( next ) { - $( this )[ method ](); - if ( callback ) { - callback.call( element[ 0 ] ); - } - next(); - }); - } - }; - }); - - var widget = $.widget; - - - -})); diff --git a/apidocs/cloud-api-source/source/javascripts/lib/_lunr.js b/apidocs/cloud-api-source/source/javascripts/lib/_lunr.js deleted file mode 100644 index 54457dab7a..0000000000 --- a/apidocs/cloud-api-source/source/javascripts/lib/_lunr.js +++ /dev/null @@ -1,1910 +0,0 @@ -/** - * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.5.7 - * Copyright (C) 2014 Oliver Nightingale - * MIT Licensed - * @license - */ - -(function(){ - - /** - * Convenience function for instantiating a new lunr index and configuring it - * with the default pipeline functions and the passed config function. - * - * When using this convenience function a new index will be created with the - * following functions already in the pipeline: - * - * lunr.StopWordFilter - filters out any stop words before they enter the - * index - * - * lunr.stemmer - stems the tokens before entering the index. - * - * Example: - * - * var idx = lunr(function () { - * this.field('title', 10) - * this.field('tags', 100) - * this.field('body') - * - * this.ref('cid') - * - * this.pipeline.add(function () { - * // some custom pipeline function - * }) - * - * }) - * - * @param {Function} config A function that will be called with the new instance - * of the lunr.Index as both its context and first parameter. It can be used to - * customize the instance of new lunr.Index. - * @namespace - * @module - * @returns {lunr.Index} - * - */ - var lunr = function (config) { - var idx = new lunr.Index - - idx.pipeline.add( - lunr.trimmer, - lunr.stopWordFilter, - lunr.stemmer - ) - - if (config) config.call(idx, idx) - - return idx - } - - lunr.version = "0.5.7" - /*! - * lunr.utils - * Copyright (C) 2014 Oliver Nightingale - */ - - /** - * A namespace containing utils for the rest of the lunr library - */ - lunr.utils = {} - - /** - * Print a warning message to the console. - * - * @param {String} message The message to be printed. - * @memberOf Utils - */ - lunr.utils.warn = (function (global) { - return function (message) { - if (global.console && console.warn) { - console.warn(message) - } - } - })(this) - - /*! - * lunr.EventEmitter - * Copyright (C) 2014 Oliver Nightingale - */ - - /** - * lunr.EventEmitter is an event emitter for lunr. It manages adding and removing event handlers and triggering events and their handlers. - * - * @constructor - */ - lunr.EventEmitter = function () { - this.events = {} - } - - /** - * Binds a handler function to a specific event(s). - * - * Can bind a single function to many different events in one call. - * - * @param {String} [eventName] The name(s) of events to bind this function to. - * @param {Function} handler The function to call when an event is fired. - * @memberOf EventEmitter - */ - lunr.EventEmitter.prototype.addListener = function () { - var args = Array.prototype.slice.call(arguments), - fn = args.pop(), - names = args - - if (typeof fn !== "function") throw new TypeError ("last argument must be a function") - - names.forEach(function (name) { - if (!this.hasHandler(name)) this.events[name] = [] - this.events[name].push(fn) - }, this) - } - - /** - * Removes a handler function from a specific event. - * - * @param {String} eventName The name of the event to remove this function from. - * @param {Function} handler The function to remove from an event. - * @memberOf EventEmitter - */ - lunr.EventEmitter.prototype.removeListener = function (name, fn) { - if (!this.hasHandler(name)) return - - var fnIndex = this.events[name].indexOf(fn) - this.events[name].splice(fnIndex, 1) - - if (!this.events[name].length) delete this.events[name] - } - - /** - * Calls all functions bound to the given event. - * - * Additional data can be passed to the event handler as arguments to `emit` - * after the event name. - * - * @param {String} eventName The name of the event to emit. - * @memberOf EventEmitter - */ - lunr.EventEmitter.prototype.emit = function (name) { - if (!this.hasHandler(name)) return - - var args = Array.prototype.slice.call(arguments, 1) - - this.events[name].forEach(function (fn) { - fn.apply(undefined, args) - }) - } - - /** - * Checks whether a handler has ever been stored against an event. - * - * @param {String} eventName The name of the event to check. - * @private - * @memberOf EventEmitter - */ - lunr.EventEmitter.prototype.hasHandler = function (name) { - return name in this.events - } - - /*! - * lunr.tokenizer - * Copyright (C) 2014 Oliver Nightingale - */ - - /** - * A function for splitting a string into tokens ready to be inserted into - * the search index. - * - * @module - * @param {String} obj The string to convert into tokens - * @returns {Array} - */ - lunr.tokenizer = function (obj) { - if (!arguments.length || obj == null || obj == undefined) return [] - if (Array.isArray(obj)) return obj.map(function (t) { return t.toLowerCase() }) - - var str = obj.toString().replace(/^\s+/, '') - - for (var i = str.length - 1; i >= 0; i--) { - if (/\S/.test(str.charAt(i))) { - str = str.substring(0, i + 1) - break - } - } - - return str - .split(/(?:\s+|\-)/) - .filter(function (token) { - return !!token - }) - .map(function (token) { - return token.toLowerCase() - }) - } - /*! - * lunr.Pipeline - * Copyright (C) 2014 Oliver Nightingale - */ - - /** - * lunr.Pipelines maintain an ordered list of functions to be applied to all - * tokens in documents entering the search index and queries being ran against - * the index. - * - * An instance of lunr.Index created with the lunr shortcut will contain a - * pipeline with a stop word filter and an English language stemmer. Extra - * functions can be added before or after either of these functions or these - * default functions can be removed. - * - * When run the pipeline will call each function in turn, passing a token, the - * index of that token in the original list of all tokens and finally a list of - * all the original tokens. - * - * The output of functions in the pipeline will be passed to the next function - * in the pipeline. To exclude a token from entering the index the function - * should return undefined, the rest of the pipeline will not be called with - * this token. - * - * For serialisation of pipelines to work, all functions used in an instance of - * a pipeline should be registered with lunr.Pipeline. Registered functions can - * then be loaded. If trying to load a serialised pipeline that uses functions - * that are not registered an error will be thrown. - * - * If not planning on serialising the pipeline then registering pipeline functions - * is not necessary. - * - * @constructor - */ - lunr.Pipeline = function () { - this._stack = [] - } - - lunr.Pipeline.registeredFunctions = {} - - /** - * Register a function with the pipeline. - * - * Functions that are used in the pipeline should be registered if the pipeline - * needs to be serialised, or a serialised pipeline needs to be loaded. - * - * Registering a function does not add it to a pipeline, functions must still be - * added to instances of the pipeline for them to be used when running a pipeline. - * - * @param {Function} fn The function to check for. - * @param {String} label The label to register this function with - * @memberOf Pipeline - */ - lunr.Pipeline.registerFunction = function (fn, label) { - if (label in this.registeredFunctions) { - lunr.utils.warn('Overwriting existing registered function: ' + label) - } - - fn.label = label - lunr.Pipeline.registeredFunctions[fn.label] = fn - } - - /** - * Warns if the function is not registered as a Pipeline function. - * - * @param {Function} fn The function to check for. - * @private - * @memberOf Pipeline - */ - lunr.Pipeline.warnIfFunctionNotRegistered = function (fn) { - var isRegistered = fn.label && (fn.label in this.registeredFunctions) - - if (!isRegistered) { - lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\n', fn) - } - } - - /** - * Loads a previously serialised pipeline. - * - * All functions to be loaded must already be registered with lunr.Pipeline. - * If any function from the serialised data has not been registered then an - * error will be thrown. - * - * @param {Object} serialised The serialised pipeline to load. - * @returns {lunr.Pipeline} - * @memberOf Pipeline - */ - lunr.Pipeline.load = function (serialised) { - var pipeline = new lunr.Pipeline - - serialised.forEach(function (fnName) { - var fn = lunr.Pipeline.registeredFunctions[fnName] - - if (fn) { - pipeline.add(fn) - } else { - throw new Error ('Cannot load un-registered function: ' + fnName) - } - }) - - return pipeline - } - - /** - * Adds new functions to the end of the pipeline. - * - * Logs a warning if the function has not been registered. - * - * @param {Function} functions Any number of functions to add to the pipeline. - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.add = function () { - var fns = Array.prototype.slice.call(arguments) - - fns.forEach(function (fn) { - lunr.Pipeline.warnIfFunctionNotRegistered(fn) - this._stack.push(fn) - }, this) - } - - /** - * Adds a single function after a function that already exists in the - * pipeline. - * - * Logs a warning if the function has not been registered. - * - * @param {Function} existingFn A function that already exists in the pipeline. - * @param {Function} newFn The new function to add to the pipeline. - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.after = function (existingFn, newFn) { - lunr.Pipeline.warnIfFunctionNotRegistered(newFn) - - var pos = this._stack.indexOf(existingFn) + 1 - this._stack.splice(pos, 0, newFn) - } - - /** - * Adds a single function before a function that already exists in the - * pipeline. - * - * Logs a warning if the function has not been registered. - * - * @param {Function} existingFn A function that already exists in the pipeline. - * @param {Function} newFn The new function to add to the pipeline. - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.before = function (existingFn, newFn) { - lunr.Pipeline.warnIfFunctionNotRegistered(newFn) - - var pos = this._stack.indexOf(existingFn) - this._stack.splice(pos, 0, newFn) - } - - /** - * Removes a function from the pipeline. - * - * @param {Function} fn The function to remove from the pipeline. - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.remove = function (fn) { - var pos = this._stack.indexOf(fn) - this._stack.splice(pos, 1) - } - - /** - * Runs the current list of functions that make up the pipeline against the - * passed tokens. - * - * @param {Array} tokens The tokens to run through the pipeline. - * @returns {Array} - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.run = function (tokens) { - var out = [], - tokenLength = tokens.length, - stackLength = this._stack.length - - for (var i = 0; i < tokenLength; i++) { - var token = tokens[i] - - for (var j = 0; j < stackLength; j++) { - token = this._stack[j](token, i, tokens) - if (token === void 0) break - }; - - if (token !== void 0) out.push(token) - }; - - return out - } - - /** - * Resets the pipeline by removing any existing processors. - * - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.reset = function () { - this._stack = [] - } - - /** - * Returns a representation of the pipeline ready for serialisation. - * - * Logs a warning if the function has not been registered. - * - * @returns {Array} - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.toJSON = function () { - return this._stack.map(function (fn) { - lunr.Pipeline.warnIfFunctionNotRegistered(fn) - - return fn.label - }) - } - /*! - * lunr.Vector - * Copyright (C) 2014 Oliver Nightingale - */ - - /** - * lunr.Vectors implement vector related operations for - * a series of elements. - * - * @constructor - */ - lunr.Vector = function () { - this._magnitude = null - this.list = undefined - this.length = 0 - } - - /** - * lunr.Vector.Node is a simple struct for each node - * in a lunr.Vector. - * - * @private - * @param {Number} The index of the node in the vector. - * @param {Object} The data at this node in the vector. - * @param {lunr.Vector.Node} The node directly after this node in the vector. - * @constructor - * @memberOf Vector - */ - lunr.Vector.Node = function (idx, val, next) { - this.idx = idx - this.val = val - this.next = next - } - - /** - * Inserts a new value at a position in a vector. - * - * @param {Number} The index at which to insert a value. - * @param {Object} The object to insert in the vector. - * @memberOf Vector. - */ - lunr.Vector.prototype.insert = function (idx, val) { - var list = this.list - - if (!list) { - this.list = new lunr.Vector.Node (idx, val, list) - return this.length++ - } - - var prev = list, - next = list.next - - while (next != undefined) { - if (idx < next.idx) { - prev.next = new lunr.Vector.Node (idx, val, next) - return this.length++ - } - - prev = next, next = next.next - } - - prev.next = new lunr.Vector.Node (idx, val, next) - return this.length++ - } - - /** - * Calculates the magnitude of this vector. - * - * @returns {Number} - * @memberOf Vector - */ - lunr.Vector.prototype.magnitude = function () { - if (this._magniture) return this._magnitude - var node = this.list, - sumOfSquares = 0, - val - - while (node) { - val = node.val - sumOfSquares += val * val - node = node.next - } - - return this._magnitude = Math.sqrt(sumOfSquares) - } - - /** - * Calculates the dot product of this vector and another vector. - * - * @param {lunr.Vector} otherVector The vector to compute the dot product with. - * @returns {Number} - * @memberOf Vector - */ - lunr.Vector.prototype.dot = function (otherVector) { - var node = this.list, - otherNode = otherVector.list, - dotProduct = 0 - - while (node && otherNode) { - if (node.idx < otherNode.idx) { - node = node.next - } else if (node.idx > otherNode.idx) { - otherNode = otherNode.next - } else { - dotProduct += node.val * otherNode.val - node = node.next - otherNode = otherNode.next - } - } - - return dotProduct - } - - /** - * Calculates the cosine similarity between this vector and another - * vector. - * - * @param {lunr.Vector} otherVector The other vector to calculate the - * similarity with. - * @returns {Number} - * @memberOf Vector - */ - lunr.Vector.prototype.similarity = function (otherVector) { - return this.dot(otherVector) / (this.magnitude() * otherVector.magnitude()) - } - /*! - * lunr.SortedSet - * Copyright (C) 2014 Oliver Nightingale - */ - - /** - * lunr.SortedSets are used to maintain an array of uniq values in a sorted - * order. - * - * @constructor - */ - lunr.SortedSet = function () { - this.length = 0 - this.elements = [] - } - - /** - * Loads a previously serialised sorted set. - * - * @param {Array} serialisedData The serialised set to load. - * @returns {lunr.SortedSet} - * @memberOf SortedSet - */ - lunr.SortedSet.load = function (serialisedData) { - var set = new this - - set.elements = serialisedData - set.length = serialisedData.length - - return set - } - - /** - * Inserts new items into the set in the correct position to maintain the - * order. - * - * @param {Object} The objects to add to this set. - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.add = function () { - Array.prototype.slice.call(arguments).forEach(function (element) { - if (~this.indexOf(element)) return - this.elements.splice(this.locationFor(element), 0, element) - }, this) - - this.length = this.elements.length - } - - /** - * Converts this sorted set into an array. - * - * @returns {Array} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.toArray = function () { - return this.elements.slice() - } - - /** - * Creates a new array with the results of calling a provided function on every - * element in this sorted set. - * - * Delegates to Array.prototype.map and has the same signature. - * - * @param {Function} fn The function that is called on each element of the - * set. - * @param {Object} ctx An optional object that can be used as the context - * for the function fn. - * @returns {Array} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.map = function (fn, ctx) { - return this.elements.map(fn, ctx) - } - - /** - * Executes a provided function once per sorted set element. - * - * Delegates to Array.prototype.forEach and has the same signature. - * - * @param {Function} fn The function that is called on each element of the - * set. - * @param {Object} ctx An optional object that can be used as the context - * @memberOf SortedSet - * for the function fn. - */ - lunr.SortedSet.prototype.forEach = function (fn, ctx) { - return this.elements.forEach(fn, ctx) - } - - /** - * Returns the index at which a given element can be found in the - * sorted set, or -1 if it is not present. - * - * @param {Object} elem The object to locate in the sorted set. - * @param {Number} start An optional index at which to start searching from - * within the set. - * @param {Number} end An optional index at which to stop search from within - * the set. - * @returns {Number} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.indexOf = function (elem, start, end) { - var start = start || 0, - end = end || this.elements.length, - sectionLength = end - start, - pivot = start + Math.floor(sectionLength / 2), - pivotElem = this.elements[pivot] - - if (sectionLength <= 1) { - if (pivotElem === elem) { - return pivot - } else { - return -1 - } - } - - if (pivotElem < elem) return this.indexOf(elem, pivot, end) - if (pivotElem > elem) return this.indexOf(elem, start, pivot) - if (pivotElem === elem) return pivot - } - - /** - * Returns the position within the sorted set that an element should be - * inserted at to maintain the current order of the set. - * - * This function assumes that the element to search for does not already exist - * in the sorted set. - * - * @param {Object} elem The elem to find the position for in the set - * @param {Number} start An optional index at which to start searching from - * within the set. - * @param {Number} end An optional index at which to stop search from within - * the set. - * @returns {Number} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.locationFor = function (elem, start, end) { - var start = start || 0, - end = end || this.elements.length, - sectionLength = end - start, - pivot = start + Math.floor(sectionLength / 2), - pivotElem = this.elements[pivot] - - if (sectionLength <= 1) { - if (pivotElem > elem) return pivot - if (pivotElem < elem) return pivot + 1 - } - - if (pivotElem < elem) return this.locationFor(elem, pivot, end) - if (pivotElem > elem) return this.locationFor(elem, start, pivot) - } - - /** - * Creates a new lunr.SortedSet that contains the elements in the intersection - * of this set and the passed set. - * - * @param {lunr.SortedSet} otherSet The set to intersect with this set. - * @returns {lunr.SortedSet} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.intersect = function (otherSet) { - var intersectSet = new lunr.SortedSet, - i = 0, j = 0, - a_len = this.length, b_len = otherSet.length, - a = this.elements, b = otherSet.elements - - while (true) { - if (i > a_len - 1 || j > b_len - 1) break - - if (a[i] === b[j]) { - intersectSet.add(a[i]) - i++, j++ - continue - } - - if (a[i] < b[j]) { - i++ - continue - } - - if (a[i] > b[j]) { - j++ - continue - } - }; - - return intersectSet - } - - /** - * Makes a copy of this set - * - * @returns {lunr.SortedSet} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.clone = function () { - var clone = new lunr.SortedSet - - clone.elements = this.toArray() - clone.length = clone.elements.length - - return clone - } - - /** - * Creates a new lunr.SortedSet that contains the elements in the union - * of this set and the passed set. - * - * @param {lunr.SortedSet} otherSet The set to union with this set. - * @returns {lunr.SortedSet} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.union = function (otherSet) { - var longSet, shortSet, unionSet - - if (this.length >= otherSet.length) { - longSet = this, shortSet = otherSet - } else { - longSet = otherSet, shortSet = this - } - - unionSet = longSet.clone() - - unionSet.add.apply(unionSet, shortSet.toArray()) - - return unionSet - } - - /** - * Returns a representation of the sorted set ready for serialisation. - * - * @returns {Array} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.toJSON = function () { - return this.toArray() - } - /*! - * lunr.Index - * Copyright (C) 2014 Oliver Nightingale - */ - - /** - * lunr.Index is object that manages a search index. It contains the indexes - * and stores all the tokens and document lookups. It also provides the main - * user facing API for the library. - * - * @constructor - */ - lunr.Index = function () { - this._fields = [] - this._ref = 'id' - this.pipeline = new lunr.Pipeline - this.documentStore = new lunr.Store - this.tokenStore = new lunr.TokenStore - this.corpusTokens = new lunr.SortedSet - this.eventEmitter = new lunr.EventEmitter - - this._idfCache = {} - - this.on('add', 'remove', 'update', (function () { - this._idfCache = {} - }).bind(this)) - } - - /** - * Bind a handler to events being emitted by the index. - * - * The handler can be bound to many events at the same time. - * - * @param {String} [eventName] The name(s) of events to bind the function to. - * @param {Function} handler The serialised set to load. - * @memberOf Index - */ - lunr.Index.prototype.on = function () { - var args = Array.prototype.slice.call(arguments) - return this.eventEmitter.addListener.apply(this.eventEmitter, args) - } - - /** - * Removes a handler from an event being emitted by the index. - * - * @param {String} eventName The name of events to remove the function from. - * @param {Function} handler The serialised set to load. - * @memberOf Index - */ - lunr.Index.prototype.off = function (name, fn) { - return this.eventEmitter.removeListener(name, fn) - } - - /** - * Loads a previously serialised index. - * - * Issues a warning if the index being imported was serialised - * by a different version of lunr. - * - * @param {Object} serialisedData The serialised set to load. - * @returns {lunr.Index} - * @memberOf Index - */ - lunr.Index.load = function (serialisedData) { - if (serialisedData.version !== lunr.version) { - lunr.utils.warn('version mismatch: current ' + lunr.version + ' importing ' + serialisedData.version) - } - - var idx = new this - - idx._fields = serialisedData.fields - idx._ref = serialisedData.ref - - idx.documentStore = lunr.Store.load(serialisedData.documentStore) - idx.tokenStore = lunr.TokenStore.load(serialisedData.tokenStore) - idx.corpusTokens = lunr.SortedSet.load(serialisedData.corpusTokens) - idx.pipeline = lunr.Pipeline.load(serialisedData.pipeline) - - return idx - } - - /** - * Adds a field to the list of fields that will be searchable within documents - * in the index. - * - * An optional boost param can be passed to affect how much tokens in this field - * rank in search results, by default the boost value is 1. - * - * Fields should be added before any documents are added to the index, fields - * that are added after documents are added to the index will only apply to new - * documents added to the index. - * - * @param {String} fieldName The name of the field within the document that - * should be indexed - * @param {Number} boost An optional boost that can be applied to terms in this - * field. - * @returns {lunr.Index} - * @memberOf Index - */ - lunr.Index.prototype.field = function (fieldName, opts) { - var opts = opts || {}, - field = { name: fieldName, boost: opts.boost || 1 } - - this._fields.push(field) - return this - } - - /** - * Sets the property used to uniquely identify documents added to the index, - * by default this property is 'id'. - * - * This should only be changed before adding documents to the index, changing - * the ref property without resetting the index can lead to unexpected results. - * - * @param {String} refName The property to use to uniquely identify the - * documents in the index. - * @param {Boolean} emitEvent Whether to emit add events, defaults to true - * @returns {lunr.Index} - * @memberOf Index - */ - lunr.Index.prototype.ref = function (refName) { - this._ref = refName - return this - } - - /** - * Add a document to the index. - * - * This is the way new documents enter the index, this function will run the - * fields from the document through the index's pipeline and then add it to - * the index, it will then show up in search results. - * - * An 'add' event is emitted with the document that has been added and the index - * the document has been added to. This event can be silenced by passing false - * as the second argument to add. - * - * @param {Object} doc The document to add to the index. - * @param {Boolean} emitEvent Whether or not to emit events, default true. - * @memberOf Index - */ - lunr.Index.prototype.add = function (doc, emitEvent) { - var docTokens = {}, - allDocumentTokens = new lunr.SortedSet, - docRef = doc[this._ref], - emitEvent = emitEvent === undefined ? true : emitEvent - - this._fields.forEach(function (field) { - var fieldTokens = this.pipeline.run(lunr.tokenizer(doc[field.name])) - - docTokens[field.name] = fieldTokens - lunr.SortedSet.prototype.add.apply(allDocumentTokens, fieldTokens) - }, this) - - this.documentStore.set(docRef, allDocumentTokens) - lunr.SortedSet.prototype.add.apply(this.corpusTokens, allDocumentTokens.toArray()) - - for (var i = 0; i < allDocumentTokens.length; i++) { - var token = allDocumentTokens.elements[i] - var tf = this._fields.reduce(function (memo, field) { - var fieldLength = docTokens[field.name].length - - if (!fieldLength) return memo - - var tokenCount = docTokens[field.name].filter(function (t) { return t === token }).length - - return memo + (tokenCount / fieldLength * field.boost) - }, 0) - - this.tokenStore.add(token, { ref: docRef, tf: tf }) - }; - - if (emitEvent) this.eventEmitter.emit('add', doc, this) - } - - /** - * Removes a document from the index. - * - * To make sure documents no longer show up in search results they can be - * removed from the index using this method. - * - * The document passed only needs to have the same ref property value as the - * document that was added to the index, they could be completely different - * objects. - * - * A 'remove' event is emitted with the document that has been removed and the index - * the document has been removed from. This event can be silenced by passing false - * as the second argument to remove. - * - * @param {Object} doc The document to remove from the index. - * @param {Boolean} emitEvent Whether to emit remove events, defaults to true - * @memberOf Index - */ - lunr.Index.prototype.remove = function (doc, emitEvent) { - var docRef = doc[this._ref], - emitEvent = emitEvent === undefined ? true : emitEvent - - if (!this.documentStore.has(docRef)) return - - var docTokens = this.documentStore.get(docRef) - - this.documentStore.remove(docRef) - - docTokens.forEach(function (token) { - this.tokenStore.remove(token, docRef) - }, this) - - if (emitEvent) this.eventEmitter.emit('remove', doc, this) - } - - /** - * Updates a document in the index. - * - * When a document contained within the index gets updated, fields changed, - * added or removed, to make sure it correctly matched against search queries, - * it should be updated in the index. - * - * This method is just a wrapper around `remove` and `add` - * - * An 'update' event is emitted with the document that has been updated and the index. - * This event can be silenced by passing false as the second argument to update. Only - * an update event will be fired, the 'add' and 'remove' events of the underlying calls - * are silenced. - * - * @param {Object} doc The document to update in the index. - * @param {Boolean} emitEvent Whether to emit update events, defaults to true - * @see Index.prototype.remove - * @see Index.prototype.add - * @memberOf Index - */ - lunr.Index.prototype.update = function (doc, emitEvent) { - var emitEvent = emitEvent === undefined ? true : emitEvent - - this.remove(doc, false) - this.add(doc, false) - - if (emitEvent) this.eventEmitter.emit('update', doc, this) - } - - /** - * Calculates the inverse document frequency for a token within the index. - * - * @param {String} token The token to calculate the idf of. - * @see Index.prototype.idf - * @private - * @memberOf Index - */ - lunr.Index.prototype.idf = function (term) { - var cacheKey = "@" + term - if (Object.prototype.hasOwnProperty.call(this._idfCache, cacheKey)) return this._idfCache[cacheKey] - - var documentFrequency = this.tokenStore.count(term), - idf = 1 - - if (documentFrequency > 0) { - idf = 1 + Math.log(this.tokenStore.length / documentFrequency) - } - - return this._idfCache[cacheKey] = idf - } - - /** - * Searches the index using the passed query. - * - * Queries should be a string, multiple words are allowed and will lead to an - * AND based query, e.g. `idx.search('foo bar')` will run a search for - * documents containing both 'foo' and 'bar'. - * - * All query tokens are passed through the same pipeline that document tokens - * are passed through, so any language processing involved will be run on every - * query term. - * - * Each query term is expanded, so that the term 'he' might be expanded to - * 'hello' and 'help' if those terms were already included in the index. - * - * Matching documents are returned as an array of objects, each object contains - * the matching document ref, as set for this index, and the similarity score - * for this document against the query. - * - * @param {String} query The query to search the index with. - * @returns {Object} - * @see Index.prototype.idf - * @see Index.prototype.documentVector - * @memberOf Index - */ - lunr.Index.prototype.search = function (query) { - var queryTokens = this.pipeline.run(lunr.tokenizer(query)), - queryVector = new lunr.Vector, - documentSets = [], - fieldBoosts = this._fields.reduce(function (memo, f) { return memo + f.boost }, 0) - - var hasSomeToken = queryTokens.some(function (token) { - return this.tokenStore.has(token) - }, this) - - if (!hasSomeToken) return [] - - queryTokens - .forEach(function (token, i, tokens) { - var tf = 1 / tokens.length * this._fields.length * fieldBoosts, - self = this - - var set = this.tokenStore.expand(token).reduce(function (memo, key) { - var pos = self.corpusTokens.indexOf(key), - idf = self.idf(key), - similarityBoost = 1, - set = new lunr.SortedSet - - // if the expanded key is not an exact match to the token then - // penalise the score for this key by how different the key is - // to the token. - if (key !== token) { - var diff = Math.max(3, key.length - token.length) - similarityBoost = 1 / Math.log(diff) - } - - // calculate the query tf-idf score for this token - // applying an similarityBoost to ensure exact matches - // these rank higher than expanded terms - if (pos > -1) queryVector.insert(pos, tf * idf * similarityBoost) - - // add all the documents that have this key into a set - Object.keys(self.tokenStore.get(key)).forEach(function (ref) { set.add(ref) }) - - return memo.union(set) - }, new lunr.SortedSet) - - documentSets.push(set) - }, this) - - var documentSet = documentSets.reduce(function (memo, set) { - return memo.intersect(set) - }) - - return documentSet - .map(function (ref) { - return { ref: ref, score: queryVector.similarity(this.documentVector(ref)) } - }, this) - .sort(function (a, b) { - return b.score - a.score - }) - } - - /** - * Generates a vector containing all the tokens in the document matching the - * passed documentRef. - * - * The vector contains the tf-idf score for each token contained in the - * document with the passed documentRef. The vector will contain an element - * for every token in the indexes corpus, if the document does not contain that - * token the element will be 0. - * - * @param {Object} documentRef The ref to find the document with. - * @returns {lunr.Vector} - * @private - * @memberOf Index - */ - lunr.Index.prototype.documentVector = function (documentRef) { - var documentTokens = this.documentStore.get(documentRef), - documentTokensLength = documentTokens.length, - documentVector = new lunr.Vector - - for (var i = 0; i < documentTokensLength; i++) { - var token = documentTokens.elements[i], - tf = this.tokenStore.get(token)[documentRef].tf, - idf = this.idf(token) - - documentVector.insert(this.corpusTokens.indexOf(token), tf * idf) - }; - - return documentVector - } - - /** - * Returns a representation of the index ready for serialisation. - * - * @returns {Object} - * @memberOf Index - */ - lunr.Index.prototype.toJSON = function () { - return { - version: lunr.version, - fields: this._fields, - ref: this._ref, - documentStore: this.documentStore.toJSON(), - tokenStore: this.tokenStore.toJSON(), - corpusTokens: this.corpusTokens.toJSON(), - pipeline: this.pipeline.toJSON() - } - } - - /** - * Applies a plugin to the current index. - * - * A plugin is a function that is called with the index as its context. - * Plugins can be used to customise or extend the behaviour the index - * in some way. A plugin is just a function, that encapsulated the custom - * behaviour that should be applied to the index. - * - * The plugin function will be called with the index as its argument, additional - * arguments can also be passed when calling use. The function will be called - * with the index as its context. - * - * Example: - * - * var myPlugin = function (idx, arg1, arg2) { - * // `this` is the index to be extended - * // apply any extensions etc here. - * } - * - * var idx = lunr(function () { - * this.use(myPlugin, 'arg1', 'arg2') - * }) - * - * @param {Function} plugin The plugin to apply. - * @memberOf Index - */ - lunr.Index.prototype.use = function (plugin) { - var args = Array.prototype.slice.call(arguments, 1) - args.unshift(this) - plugin.apply(this, args) - } - /*! - * lunr.Store - * Copyright (C) 2014 Oliver Nightingale - */ - - /** - * lunr.Store is a simple key-value store used for storing sets of tokens for - * documents stored in index. - * - * @constructor - * @module - */ - lunr.Store = function () { - this.store = {} - this.length = 0 - } - - /** - * Loads a previously serialised store - * - * @param {Object} serialisedData The serialised store to load. - * @returns {lunr.Store} - * @memberOf Store - */ - lunr.Store.load = function (serialisedData) { - var store = new this - - store.length = serialisedData.length - store.store = Object.keys(serialisedData.store).reduce(function (memo, key) { - memo[key] = lunr.SortedSet.load(serialisedData.store[key]) - return memo - }, {}) - - return store - } - - /** - * Stores the given tokens in the store against the given id. - * - * @param {Object} id The key used to store the tokens against. - * @param {Object} tokens The tokens to store against the key. - * @memberOf Store - */ - lunr.Store.prototype.set = function (id, tokens) { - if (!this.has(id)) this.length++ - this.store[id] = tokens - } - - /** - * Retrieves the tokens from the store for a given key. - * - * @param {Object} id The key to lookup and retrieve from the store. - * @returns {Object} - * @memberOf Store - */ - lunr.Store.prototype.get = function (id) { - return this.store[id] - } - - /** - * Checks whether the store contains a key. - * - * @param {Object} id The id to look up in the store. - * @returns {Boolean} - * @memberOf Store - */ - lunr.Store.prototype.has = function (id) { - return id in this.store - } - - /** - * Removes the value for a key in the store. - * - * @param {Object} id The id to remove from the store. - * @memberOf Store - */ - lunr.Store.prototype.remove = function (id) { - if (!this.has(id)) return - - delete this.store[id] - this.length-- - } - - /** - * Returns a representation of the store ready for serialisation. - * - * @returns {Object} - * @memberOf Store - */ - lunr.Store.prototype.toJSON = function () { - return { - store: this.store, - length: this.length - } - } - - /*! - * lunr.stemmer - * Copyright (C) 2014 Oliver Nightingale - * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt - */ - - /** - * lunr.stemmer is an english language stemmer, this is a JavaScript - * implementation of the PorterStemmer taken from http://tartaurs.org/~martin - * - * @module - * @param {String} str The string to stem - * @returns {String} - * @see lunr.Pipeline - */ - lunr.stemmer = (function(){ - var step2list = { - "ational" : "ate", - "tional" : "tion", - "enci" : "ence", - "anci" : "ance", - "izer" : "ize", - "bli" : "ble", - "alli" : "al", - "entli" : "ent", - "eli" : "e", - "ousli" : "ous", - "ization" : "ize", - "ation" : "ate", - "ator" : "ate", - "alism" : "al", - "iveness" : "ive", - "fulness" : "ful", - "ousness" : "ous", - "aliti" : "al", - "iviti" : "ive", - "biliti" : "ble", - "logi" : "log" - }, - - step3list = { - "icate" : "ic", - "ative" : "", - "alize" : "al", - "iciti" : "ic", - "ical" : "ic", - "ful" : "", - "ness" : "" - }, - - c = "[^aeiou]", // consonant - v = "[aeiouy]", // vowel - C = c + "[^aeiouy]*", // consonant sequence - V = v + "[aeiou]*", // vowel sequence - - mgr0 = "^(" + C + ")?" + V + C, // [C]VC... is m>0 - meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$", // [C]VC[V] is m=1 - mgr1 = "^(" + C + ")?" + V + C + V + C, // [C]VCVC... is m>1 - s_v = "^(" + C + ")?" + v; // vowel in stem - - var re_mgr0 = new RegExp(mgr0); - var re_mgr1 = new RegExp(mgr1); - var re_meq1 = new RegExp(meq1); - var re_s_v = new RegExp(s_v); - - var re_1a = /^(.+?)(ss|i)es$/; - var re2_1a = /^(.+?)([^s])s$/; - var re_1b = /^(.+?)eed$/; - var re2_1b = /^(.+?)(ed|ing)$/; - var re_1b_2 = /.$/; - var re2_1b_2 = /(at|bl|iz)$/; - var re3_1b_2 = new RegExp("([^aeiouylsz])\\1$"); - var re4_1b_2 = new RegExp("^" + C + v + "[^aeiouwxy]$"); - - var re_1c = /^(.+?[^aeiou])y$/; - var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; - - var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; - - var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; - var re2_4 = /^(.+?)(s|t)(ion)$/; - - var re_5 = /^(.+?)e$/; - var re_5_1 = /ll$/; - var re3_5 = new RegExp("^" + C + v + "[^aeiouwxy]$"); - - var porterStemmer = function porterStemmer(w) { - var stem, - suffix, - firstch, - re, - re2, - re3, - re4; - - if (w.length < 3) { return w; } - - firstch = w.substr(0,1); - if (firstch == "y") { - w = firstch.toUpperCase() + w.substr(1); - } - - // Step 1a - re = re_1a - re2 = re2_1a; - - if (re.test(w)) { w = w.replace(re,"$1$2"); } - else if (re2.test(w)) { w = w.replace(re2,"$1$2"); } - - // Step 1b - re = re_1b; - re2 = re2_1b; - if (re.test(w)) { - var fp = re.exec(w); - re = re_mgr0; - if (re.test(fp[1])) { - re = re_1b_2; - w = w.replace(re,""); - } - } else if (re2.test(w)) { - var fp = re2.exec(w); - stem = fp[1]; - re2 = re_s_v; - if (re2.test(stem)) { - w = stem; - re2 = re2_1b_2; - re3 = re3_1b_2; - re4 = re4_1b_2; - if (re2.test(w)) { w = w + "e"; } - else if (re3.test(w)) { re = re_1b_2; w = w.replace(re,""); } - else if (re4.test(w)) { w = w + "e"; } - } - } - - // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say) - re = re_1c; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - w = stem + "i"; - } - - // Step 2 - re = re_2; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - suffix = fp[2]; - re = re_mgr0; - if (re.test(stem)) { - w = stem + step2list[suffix]; - } - } - - // Step 3 - re = re_3; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - suffix = fp[2]; - re = re_mgr0; - if (re.test(stem)) { - w = stem + step3list[suffix]; - } - } - - // Step 4 - re = re_4; - re2 = re2_4; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - re = re_mgr1; - if (re.test(stem)) { - w = stem; - } - } else if (re2.test(w)) { - var fp = re2.exec(w); - stem = fp[1] + fp[2]; - re2 = re_mgr1; - if (re2.test(stem)) { - w = stem; - } - } - - // Step 5 - re = re_5; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - re = re_mgr1; - re2 = re_meq1; - re3 = re3_5; - if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) { - w = stem; - } - } - - re = re_5_1; - re2 = re_mgr1; - if (re.test(w) && re2.test(w)) { - re = re_1b_2; - w = w.replace(re,""); - } - - // and turn initial Y back to y - - if (firstch == "y") { - w = firstch.toLowerCase() + w.substr(1); - } - - return w; - }; - - return porterStemmer; - })(); - - lunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer') - /*! - * lunr.stopWordFilter - * Copyright (C) 2014 Oliver Nightingale - */ - - /** - * lunr.stopWordFilter is an English language stop word list filter, any words - * contained in the list will not be passed through the filter. - * - * This is intended to be used in the Pipeline. If the token does not pass the - * filter then undefined will be returned. - * - * @module - * @param {String} token The token to pass through the filter - * @returns {String} - * @see lunr.Pipeline - */ - lunr.stopWordFilter = function (token) { - if (lunr.stopWordFilter.stopWords.indexOf(token) === -1) return token - } - - lunr.stopWordFilter.stopWords = new lunr.SortedSet - lunr.stopWordFilter.stopWords.length = 119 - lunr.stopWordFilter.stopWords.elements = [ - "", - "a", - "able", - "about", - "across", - "after", - "all", - "almost", - "also", - "am", - "among", - "an", - "and", - "any", - "are", - "as", - "at", - "be", - "because", - "been", - "but", - "by", - "can", - "cannot", - "could", - "dear", - "did", - "do", - "does", - "either", - "else", - "ever", - "every", - "for", - "from", - "get", - "got", - "had", - "has", - "have", - "he", - "her", - "hers", - "him", - "his", - "how", - "however", - "i", - "if", - "in", - "into", - "is", - "it", - "its", - "just", - "least", - "let", - "like", - "likely", - "may", - "me", - "might", - "most", - "must", - "my", - "neither", - "no", - "nor", - "not", - "of", - "off", - "often", - "on", - "only", - "or", - "other", - "our", - "own", - "rather", - "said", - "say", - "says", - "she", - "should", - "since", - "so", - "some", - "than", - "that", - "the", - "their", - "them", - "then", - "there", - "these", - "they", - "this", - "tis", - "to", - "too", - "twas", - "us", - "wants", - "was", - "we", - "were", - "what", - "when", - "where", - "which", - "while", - "who", - "whom", - "why", - "will", - "with", - "would", - "yet", - "you", - "your" - ] - - lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter') - /*! - * lunr.trimmer - * Copyright (C) 2014 Oliver Nightingale - */ - - /** - * lunr.trimmer is a pipeline function for trimming non word - * characters from the begining and end of tokens before they - * enter the index. - * - * This implementation may not work correctly for non latin - * characters and should either be removed or adapted for use - * with languages with non-latin characters. - * - * @module - * @param {String} token The token to pass through the filter - * @returns {String} - * @see lunr.Pipeline - */ - lunr.trimmer = function (token) { - return token - .replace(/^\W+/, '') - .replace(/\W+$/, '') - } - - lunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer') - /*! - * lunr.stemmer - * Copyright (C) 2014 Oliver Nightingale - * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt - */ - - /** - * lunr.TokenStore is used for efficient storing and lookup of the reverse - * index of token to document ref. - * - * @constructor - */ - lunr.TokenStore = function () { - this.root = { docs: {} } - this.length = 0 - } - - /** - * Loads a previously serialised token store - * - * @param {Object} serialisedData The serialised token store to load. - * @returns {lunr.TokenStore} - * @memberOf TokenStore - */ - lunr.TokenStore.load = function (serialisedData) { - var store = new this - - store.root = serialisedData.root - store.length = serialisedData.length - - return store - } - - /** - * Adds a new token doc pair to the store. - * - * By default this function starts at the root of the current store, however - * it can start at any node of any token store if required. - * - * @param {String} token The token to store the doc under - * @param {Object} doc The doc to store against the token - * @param {Object} root An optional node at which to start looking for the - * correct place to enter the doc, by default the root of this lunr.TokenStore - * is used. - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.add = function (token, doc, root) { - var root = root || this.root, - key = token[0], - rest = token.slice(1) - - if (!(key in root)) root[key] = {docs: {}} - - if (rest.length === 0) { - root[key].docs[doc.ref] = doc - this.length += 1 - return - } else { - return this.add(rest, doc, root[key]) - } - } - - /** - * Checks whether this key is contained within this lunr.TokenStore. - * - * By default this function starts at the root of the current store, however - * it can start at any node of any token store if required. - * - * @param {String} token The token to check for - * @param {Object} root An optional node at which to start - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.has = function (token) { - if (!token) return false - - var node = this.root - - for (var i = 0; i < token.length; i++) { - if (!node[token[i]]) return false - - node = node[token[i]] - } - - return true - } - - /** - * Retrieve a node from the token store for a given token. - * - * By default this function starts at the root of the current store, however - * it can start at any node of any token store if required. - * - * @param {String} token The token to get the node for. - * @param {Object} root An optional node at which to start. - * @returns {Object} - * @see TokenStore.prototype.get - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.getNode = function (token) { - if (!token) return {} - - var node = this.root - - for (var i = 0; i < token.length; i++) { - if (!node[token[i]]) return {} - - node = node[token[i]] - } - - return node - } - - /** - * Retrieve the documents for a node for the given token. - * - * By default this function starts at the root of the current store, however - * it can start at any node of any token store if required. - * - * @param {String} token The token to get the documents for. - * @param {Object} root An optional node at which to start. - * @returns {Object} - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.get = function (token, root) { - return this.getNode(token, root).docs || {} - } - - lunr.TokenStore.prototype.count = function (token, root) { - return Object.keys(this.get(token, root)).length - } - - /** - * Remove the document identified by ref from the token in the store. - * - * By default this function starts at the root of the current store, however - * it can start at any node of any token store if required. - * - * @param {String} token The token to get the documents for. - * @param {String} ref The ref of the document to remove from this token. - * @param {Object} root An optional node at which to start. - * @returns {Object} - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.remove = function (token, ref) { - if (!token) return - var node = this.root - - for (var i = 0; i < token.length; i++) { - if (!(token[i] in node)) return - node = node[token[i]] - } - - delete node.docs[ref] - } - - /** - * Find all the possible suffixes of the passed token using tokens - * currently in the store. - * - * @param {String} token The token to expand. - * @returns {Array} - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.expand = function (token, memo) { - var root = this.getNode(token), - docs = root.docs || {}, - memo = memo || [] - - if (Object.keys(docs).length) memo.push(token) - - Object.keys(root) - .forEach(function (key) { - if (key === 'docs') return - - memo.concat(this.expand(token + key, memo)) - }, this) - - return memo - } - - /** - * Returns a representation of the token store ready for serialisation. - * - * @returns {Object} - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.toJSON = function () { - return { - root: this.root, - length: this.length - } - } - - - /** - * export the module via AMD, CommonJS or as a browser global - * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js - */ - ;(function (root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(factory) - } else if (typeof exports === 'object') { - /** - * Node. Does not work with strict CommonJS, but - * only CommonJS-like enviroments that support module.exports, - * like Node. - */ - module.exports = factory() - } else { - // Browser globals (root is window) - root.lunr = factory() - } - }(this, function () { - /** - * Just return a value to define the module export. - * This example returns an object, but the module - * can return a function as the exported value. - */ - return lunr - })) -})() diff --git a/apidocs/cloud-api-source/source/layouts/layout.erb b/apidocs/cloud-api-source/source/layouts/layout.erb deleted file mode 100644 index 9f8cc27c76..0000000000 --- a/apidocs/cloud-api-source/source/layouts/layout.erb +++ /dev/null @@ -1,108 +0,0 @@ -<%# -Copyright 2008-2013 Concur Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may -not use this file except in compliance with the License. You may obtain -a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations -under the License. -%> -<% language_tabs = current_page.data.language_tabs %> - - - - - - - <%= current_page.data.title || "API Documentation" %> - - <%= stylesheet_link_tag :screen, media: :screen %> - <%= stylesheet_link_tag :print, media: :print %> - - - <% if current_page.data.search %> - <%= javascript_include_tag "all" %> - <% else %> - <%= javascript_include_tag "all_nosearch" %> - <% end %> - - <% if language_tabs %> - - <% end %> - - - - - - NAV - <%= image_tag('navbar.png') %> - - -
        - <%= image_tag "logo.png" %> - <% if language_tabs %> -
        - <% language_tabs.each do |lang| %> - <% if lang.is_a? Hash %> - <%= lang.values.first %> - <% else %> - <%= lang %> - <% end %> - <% end %> -
        - <% end %> - <% if current_page.data.search %> - -
          - <% end %> -
          -
          - <% if current_page.data.toc_footers %> - - <% end %> -
          -
          -
          -
          - <%= yield %> - <% current_page.data.includes && current_page.data.includes.each do |include| %> - <%= partial "includes/#{include}" %> - <% end %> -
          -
          - <% if language_tabs %> -
          - <% language_tabs.each do |lang| %> - <% if lang.is_a? Hash %> - <%= lang.values.first %> - <% else %> - <%= lang %> - <% end %> - <% end %> -
          - <% end %> -
          -
          - - diff --git a/apidocs/cloud-api-source/source/stylesheets/_icon-font.scss b/apidocs/cloud-api-source/source/stylesheets/_icon-font.scss deleted file mode 100644 index b599483988..0000000000 --- a/apidocs/cloud-api-source/source/stylesheets/_icon-font.scss +++ /dev/null @@ -1,38 +0,0 @@ -@font-face { - font-family: 'slate'; - src:font-url('slate.eot?-syv14m'); - src:font-url('slate.eot?#iefix-syv14m') format('embedded-opentype'), - font-url('slate.woff2?-syv14m') format('woff2'), - font-url('slate.woff?-syv14m') format('woff'), - font-url('slate.ttf?-syv14m') format('truetype'), - font-url('slate.svg?-syv14m#slate') format('svg'); - font-weight: normal; - font-style: normal; -} - -%icon { - font-family: 'slate'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; -} - -%icon-exclamation-sign { - @extend %icon; - content: "\e600"; -} -%icon-info-sign { - @extend %icon; - content: "\e602"; -} -%icon-ok-sign { - @extend %icon; - content: "\e606"; -} -%icon-search { - @extend %icon; - content: "\e607"; -} diff --git a/apidocs/cloud-api-source/source/stylesheets/_normalize.css b/apidocs/cloud-api-source/source/stylesheets/_normalize.css deleted file mode 100644 index 46f646a5c0..0000000000 --- a/apidocs/cloud-api-source/source/stylesheets/_normalize.css +++ /dev/null @@ -1,427 +0,0 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9/10. - */ - -img { - border: 0; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ - -button, -input, -optgroup, -select, -textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} diff --git a/apidocs/cloud-api-source/source/stylesheets/_syntax.scss.erb b/apidocs/cloud-api-source/source/stylesheets/_syntax.scss.erb deleted file mode 100644 index dfeb0c1524..0000000000 --- a/apidocs/cloud-api-source/source/stylesheets/_syntax.scss.erb +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2008-2013 Concur Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may -not use this file except in compliance with the License. You may obtain -a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations -under the License. -*/ - -@import 'variables'; - -<%= Rouge::Themes::Base16::Monokai.render(:scope => '.highlight') %> - -.highlight .c, .highlight .cm, .highlight .c1, .highlight .cs { - color: #909090; -} - -.highlight, .highlight .w { - background-color: $code-bg; -} \ No newline at end of file diff --git a/apidocs/cloud-api-source/source/stylesheets/_variables.scss b/apidocs/cloud-api-source/source/stylesheets/_variables.scss deleted file mode 100644 index 5fe64b1f30..0000000000 --- a/apidocs/cloud-api-source/source/stylesheets/_variables.scss +++ /dev/null @@ -1,109 +0,0 @@ -/* -Copyright 2008-2013 Concur Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may -not use this file except in compliance with the License. You may obtain -a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations -under the License. -*/ - - -//////////////////////////////////////////////////////////////////////////////// -// CUSTOMIZE SLATE -//////////////////////////////////////////////////////////////////////////////// -// Use these settings to help adjust the appearance of Slate - - -// BACKGROUND COLORS -//////////////////// -$nav-bg: #393939; -$examples-bg: #393939; -$code-bg: #292929; -$code-annotation-bg: #1c1c1c; -$nav-subitem-bg: #262626; -$nav-active-bg: #2467af; -$lang-select-border: #000; -$lang-select-bg: #222; -$lang-select-active-bg: $examples-bg; // feel free to change this to blue or something -$lang-select-pressed-bg: #111; // color of language tab bg when mouse is pressed -$main-bg: #eaf2f6; -$aside-notice-bg: #8fbcd4; -$aside-warning-bg: #c97a7e; -$aside-success-bg: #6ac174; -$search-notice-bg: #c97a7e; - - -// TEXT COLORS -//////////////////// -$main-text: #333; // main content text color -$nav-text: #fff; -$nav-active-text: #fff; -$lang-select-text: #fff; // color of unselected language tab text -$lang-select-active-text: #fff; // color of selected language tab text -$lang-select-pressed-text: #fff; // color of language tab text when mouse is pressed - - -// SIZES -//////////////////// -$nav-width: 230px; // width of the navbar -$examples-width: 50%; // portion of the screen taken up by code examples -$logo-margin: 20px; // margin between nav items and logo, ignored if search is active -$main-padding: 28px; // padding to left and right of content & examples -$nav-padding: 15px; // padding to left and right of navbar -$nav-v-padding: 10px; // padding used vertically around search boxes and results -$nav-indent: 10px; // extra padding for ToC subitems -$code-annotation-padding: 13px; // padding inside code annotations -$h1-margin-bottom: 21px; // padding under the largest header tags -$tablet-width: 930px; // min width before reverting to tablet size -$phone-width: $tablet-width - $nav-width; // min width before reverting to mobile size - - -// FONTS -//////////////////// -%default-font { - font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei","微软雅黑", STXihei, "华文细黑", sans-serif; - font-size: 13px; -} - -%header-font { - @extend %default-font; - font-weight: bold; -} - -%code-font { - font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif; - font-size: 12px; - line-height: 1.5; -} - - -// OTHER -//////////////////// -$nav-active-shadow: #000; -$nav-footer-border-color: #666; -$nav-embossed-border-top: #000; -$nav-embossed-border-bottom: #939393; -$main-embossed-text-shadow: 0px 1px 0px #fff; -$search-box-border-color: #666; - - -//////////////////////////////////////////////////////////////////////////////// -// INTERNAL -//////////////////////////////////////////////////////////////////////////////// -// These settings are probably best left alone. - -%break-words { - word-break: break-all; - - /* Non standard for webkit */ - word-break: break-word; - - hyphens: auto; -} diff --git a/apidocs/cloud-api-source/source/stylesheets/print.css.scss b/apidocs/cloud-api-source/source/stylesheets/print.css.scss deleted file mode 100644 index 4bda057f01..0000000000 --- a/apidocs/cloud-api-source/source/stylesheets/print.css.scss +++ /dev/null @@ -1,142 +0,0 @@ -@charset "utf-8"; -@import 'normalize'; -@import 'compass'; -@import 'variables'; -@import 'icon-font'; - -/* -Copyright 2008-2013 Concur Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may -not use this file except in compliance with the License. You may obtain -a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations -under the License. -*/ - -$print-color: #999; -$print-color-light: #ccc; -$print-font-size: 12px; - -body { - @extend %default-font; -} - -.tocify, .toc-footer, .lang-selector, .search, #nav-button { - display: none; -} - -.tocify-wrapper>img { - margin: 0 auto; - display: block; -} - -.content { - font-size: 12px; - - pre, code { - @extend %code-font; - @extend %break-words; - border: 1px solid $print-color; - border-radius: 5px; - font-size: 0.8em; - } - - pre { - padding: 1.3em; - } - - code { - padding: 0.2em; - } - - table { - border: 1px solid $print-color; - tr { - border-bottom: 1px solid $print-color; - } - td,th { - padding: 0.7em; - } - } - - p { - line-height: 1.5; - } - - a { - text-decoration: none; - color: #000; - } - - h1 { - @extend %header-font; - font-size: 2.5em; - padding-top: 0.5em; - padding-bottom: 0.5em; - margin-top: 1em; - margin-bottom: $h1-margin-bottom; - border: 2px solid $print-color-light; - border-width: 2px 0; - text-align: center; - } - - h2 { - @extend %header-font; - font-size: 1.8em; - margin-top: 2em; - border-top: 2px solid $print-color-light; - padding-top: 0.8em; - } - - h1+h2, h1+div+h2 { - border-top: none; - padding-top: 0; - margin-top: 0; - } - - h3, h4 { - @extend %header-font; - font-size: 0.8em; - margin-top: 1.5em; - margin-bottom: 0.8em; - text-transform: uppercase; - } - - h5, h6 { - text-transform: uppercase; - } - - aside { - padding: 1em; - border: 1px solid $print-color-light; - border-radius: 5px; - margin-top: 1.5em; - margin-bottom: 1.5em; - line-height: 1.6; - } - - aside:before { - vertical-align: middle; - padding-right: 0.5em; - font-size: 14px; - } - - aside.notice:before { - @extend %icon-info-sign; - } - - aside.warning:before { - @extend %icon-exclamation-sign; - } - - aside.success:before { - @extend %icon-ok-sign; - } -} \ No newline at end of file diff --git a/apidocs/cloud-api-source/source/stylesheets/screen.css.scss b/apidocs/cloud-api-source/source/stylesheets/screen.css.scss deleted file mode 100644 index e4b3ef82b2..0000000000 --- a/apidocs/cloud-api-source/source/stylesheets/screen.css.scss +++ /dev/null @@ -1,620 +0,0 @@ -@charset "utf-8"; -@import 'normalize'; -@import 'compass'; -@import 'variables'; -@import 'syntax'; -@import 'icon-font'; - -/* -Copyright 2008-2013 Concur Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may -not use this file except in compliance with the License. You may obtain -a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations -under the License. -*/ - -//////////////////////////////////////////////////////////////////////////////// -// GENERAL STUFF -//////////////////////////////////////////////////////////////////////////////// - -html, body { - color: $main-text; - padding: 0; - margin: 0; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - @extend %default-font; - background-color: $main-bg; - height: 100%; - -webkit-text-size-adjust: none; /* Never autoresize text */ -} - -//////////////////////////////////////////////////////////////////////////////// -// TABLE OF CONTENTS -//////////////////////////////////////////////////////////////////////////////// - -#toc > ul > li > a > span { - float: right; - background-color: #2484FF; - border-radius: 40px; - width: 20px; -} - -@mixin embossed-bg { - background: - linear-gradient(to bottom, rgba(#000, 0.2), rgba(#000, 0) 8px), - linear-gradient(to top, rgba(#000, 0.2), rgba(#000, 0) 8px), - linear-gradient(to bottom, rgba($nav-embossed-border-top, 1), rgba($nav-embossed-border-top, 0) 1.5px), - linear-gradient(to top, rgba($nav-embossed-border-bottom, 1), rgba($nav-embossed-border-bottom, 0) 1.5px), - $nav-subitem-bg; -} - -.tocify-wrapper { - transition: left 0.3s ease-in-out; - - overflow-y: auto; - overflow-x: hidden; - position: fixed; - z-index: 30; - top: 0; - left: 0; - bottom: 0; - width: $nav-width; - background-color: $nav-bg; - font-size: 13px; - font-weight: bold; - - // language selector for mobile devices - .lang-selector { - display: none; - a { - padding-top: 0.5em; - padding-bottom: 0.5em; - } - } - - // This is the logo at the top of the ToC - &>img { - display: block; - } - - &>.search { - position: relative; - - input { - background: $nav-bg; - border-width: 0 0 1px 0; - border-color: $search-box-border-color; - padding: 6px 0 6px 20px; - box-sizing: border-box; - margin: $nav-v-padding $nav-padding; - width: $nav-width - 30; - outline: none; - color: $nav-text; - border-radius: 0; /* ios has a default border radius */ - } - - &:before { - position: absolute; - top: 17px; - left: $nav-padding; - color: $nav-text; - @extend %icon-search; - } - } - - img+.tocify { - margin-top: $logo-margin; - } - - .search-results { - margin-top: 0; - box-sizing: border-box; - height: 0; - overflow-y: auto; - overflow-x: hidden; - transition-property: height, margin; - transition-duration: 180ms; - transition-timing-function: ease-in-out; - &.visible { - height: 30%; - margin-bottom: 1em; - } - - @include embossed-bg; - - li { - margin: 1em $nav-padding; - line-height: 1; - } - - a { - color: $nav-text; - text-decoration: none; - - &:hover { - text-decoration: underline; - } - } - } - - - .tocify-item>a, .toc-footer li { - padding: 0 $nav-padding 0 $nav-padding; - display: block; - overflow-x: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - - // The Table of Contents is composed of multiple nested - // unordered lists. These styles remove the default - // styling of an unordered list because it is ugly. - ul, li { - list-style: none; - margin: 0; - padding: 0; - line-height: 28px; - } - - li { - color: $nav-text; - transition-property: background; - transition-timing-function: linear; - transition-duration: 230ms; - } - - // This is the currently selected ToC entry - .tocify-focus { - box-shadow: 0px 1px 0px $nav-active-shadow; - background-color: $nav-active-bg; - color: $nav-active-text; - } - - // Subheaders are the submenus that slide open - // in the table of contents. - .tocify-subheader { - display: none; // tocify will override this when needed - background-color: $nav-subitem-bg; - font-weight: 500; - .tocify-item>a { - padding-left: $nav-padding + $nav-indent; - font-size: 12px; - } - - // for embossed look: - @include embossed-bg; - &>li:last-child { - box-shadow: none; // otherwise it'll overflow out of the subheader - } - } - - .toc-footer { - padding: 1em 0; - margin-top: 1em; - border-top: 1px dashed $nav-footer-border-color; - - li,a { - color: $nav-text; - text-decoration: none; - } - - a:hover { - text-decoration: underline; - } - - li { - font-size: 0.8em; - line-height: 1.7; - text-decoration: none; - } - } - -} - -// button to show navigation on mobile devices -#nav-button { - span { - display: block; - $side-pad: $main-padding / 2 - 8px; - padding: $side-pad $side-pad $side-pad; - background-color: rgba($main-bg, 0.7); - transform-origin: 0 0; - transform: rotate(-90deg) translate(-100%, 0); - border-radius: 0 0 0 5px; - } - padding: 0 1.5em 5em 0; // increase touch size area - display: none; - position: fixed; - top: 0; - left: 0; - z-index: 100; - color: #000; - text-decoration: none; - font-weight: bold; - opacity: 0.7; - line-height: 16px; - img { - height: 16px; - vertical-align: bottom; - } - - transition: left 0.3s ease-in-out; - - &:hover { opacity: 1; } - &.open {left: $nav-width} -} - - -//////////////////////////////////////////////////////////////////////////////// -// PAGE LAYOUT AND CODE SAMPLE BACKGROUND -//////////////////////////////////////////////////////////////////////////////// - -.page-wrapper { - margin-left: $nav-width; - position: relative; - z-index: 10; - background-color: $main-bg; - min-height: 100%; - - padding-bottom: 1px; // prevent margin overflow - - // The dark box is what gives the code samples their dark background. - // It sits essentially under the actual content block, which has a - // transparent background. - // I know, it's hackish, but it's the simplist way to make the left - // half of the content always this background color. - .dark-box { - width: $examples-width; - background-color: $examples-bg; - position: absolute; - right: 0; - top: 0; - bottom: 0; - } - - .lang-selector { - position: fixed; - z-index: 50; - border-bottom: 5px solid $lang-select-active-bg; - } -} - -.lang-selector { - background-color: $lang-select-bg; - width: 100%; - font-weight: bold; - a { - display: block; - float:left; - color: $lang-select-text; - text-decoration: none; - padding: 0 10px; - line-height: 30px; - outline: 0; - - &:active, &:focus { - background-color: $lang-select-pressed-bg; - color: $lang-select-pressed-text; - } - - &.active { - background-color: $lang-select-active-bg; - color: $lang-select-active-text; - } - } - - &:after { - content: ''; - clear: both; - display: block; - } -} - -//////////////////////////////////////////////////////////////////////////////// -// CONTENT STYLES -//////////////////////////////////////////////////////////////////////////////// -// This is all the stuff with the light background in the left half of the page - -.content { - // to place content above the dark box - position: relative; - z-index: 30; - - &:after { - content: ''; - display: block; - clear: both; - } - - &>h1, &>h2, &>h3, &>h4, &>h5, &>h6, &>p, &>table, &>ul, &>ol, &>aside, &>dl { - margin-right: $examples-width; - padding: 0 $main-padding; - box-sizing: border-box; - display: block; - @include text-shadow($main-embossed-text-shadow); - - @extend %left-col; - } - - &>ul, &>ol { - padding-left: $main-padding + 15px; - } - - // the div is the tocify hidden div for placeholding stuff - &>h1, &>h2, &>div { - clear:both; - } - - h1 { - @extend %header-font; - font-size: 30px; - padding-top: 0.5em; - padding-bottom: 0.5em; - border-bottom: 1px solid #ccc; - margin-bottom: $h1-margin-bottom; - margin-top: 2em; - border-top: 1px solid #ddd; - background-image: linear-gradient(to bottom, #fff, #f9f9f9); - } - - h1:first-child, div:first-child + h1 { - border-top-width: 0; - margin-top: 0; - } - - h2 { - @extend %header-font; - font-size: 20px; - margin-top: 4em; - margin-bottom: 0; - border-top: 1px solid #ccc; - padding-top: 1.2em; - padding-bottom: 1.2em; - background-image: linear-gradient(to bottom, rgba(#fff, 0.4), rgba(#fff, 0)); - } - - // h2s right after h1s should bump right up - // against the h1s. - h1 + h2, h1 + div + h2 { - margin-top: $h1-margin-bottom * -1; - border-top: none; - } - - h3, h4, h5, h6 { - @extend %header-font; - font-size: 15px; - margin-top: 2.5em; - margin-bottom: 0.8em; - } - - h4, h5, h6 { - font-size: 10px; - } - - hr { - margin: 2em 0; - border-top: 2px solid $examples-bg; - border-bottom: 2px solid $main-bg; - } - - table { - margin-bottom: 1em; - overflow: auto; - th,td { - text-align: left; - vertical-align: top; - line-height: 1.6; - } - - th { - padding: 5px 10px; - border-bottom: 1px solid #ccc; - vertical-align: bottom; - } - - td { - padding: 10px; - } - - tr:last-child { - border-bottom: 1px solid #ccc; - } - - tr:nth-child(odd)>td { - background-color: lighten($main-bg,4.2%); - } - - tr:nth-child(even)>td { - background-color: lighten($main-bg,2.4%); - } - } - - dt { - font-weight: bold; - } - - dd { - margin-left: 15px; - } - - p, li, dt, dd { - line-height: 1.6; - margin-top: 0; - } - - img { - max-width: 100%; - } - - code { - background-color: rgba(0,0,0,0.05); - padding: 3px; - border-radius: 3px; - @extend %break-words; - @extend %code-font; - } - - pre>code { - background-color: transparent; - padding: 0; - } - - aside { - padding-top: 1em; - padding-bottom: 1em; - @include text-shadow(0 1px 0 lighten($aside-notice-bg, 15%)); - margin-top: 1.5em; - margin-bottom: 1.5em; - background: $aside-notice-bg; - line-height: 1.6; - - &.warning { - background-color: $aside-warning-bg; - @include text-shadow(0 1px 0 lighten($aside-warning-bg, 15%)); - } - - &.success { - background-color: $aside-success-bg; - @include text-shadow(0 1px 0 lighten($aside-success-bg, 15%)); - } - } - - aside:before { - vertical-align: middle; - padding-right: 0.5em; - font-size: 14px; - } - - aside.notice:before { - @extend %icon-info-sign; - } - - aside.warning:before { - @extend %icon-exclamation-sign; - } - - aside.success:before { - @extend %icon-ok-sign; - } - - .search-highlight { - padding: 2px; - margin: -2px; - border-radius: 4px; - border: 1px solid #F7E633; - @include text-shadow(1px 1px 0 #666); - background: linear-gradient(to top left, #F7E633 0%, #F1D32F 100%); - } -} - -//////////////////////////////////////////////////////////////////////////////// -// CODE SAMPLE STYLES -//////////////////////////////////////////////////////////////////////////////// -// This is all the stuff that appears in the right half of the page - -.content { - pre, blockquote { - background-color: $code-bg; - color: #fff; - - padding: 2em $main-padding; - margin: 0; - width: $examples-width; - - float:right; - clear:right; - - box-sizing: border-box; - @include text-shadow(0px 1px 2px rgba(0,0,0,0.4)); - - @extend %right-col; - - &>p { margin: 0; } - - a { - color: #fff; - text-decoration: none; - border-bottom: dashed 1px #ccc; - } - } - - pre { - @extend %code-font; - } - - blockquote { - &>p { - background-color: $code-annotation-bg; - border-radius: 5px; - padding: $code-annotation-padding; - color: #ccc; - border-top: 1px solid #000; - border-bottom: 1px solid #404040; - } - } -} - -//////////////////////////////////////////////////////////////////////////////// -// RESPONSIVE DESIGN -//////////////////////////////////////////////////////////////////////////////// -// These are the styles for phones and tablets -// There are also a couple styles disperesed - -@media (max-width: $tablet-width) { - .tocify-wrapper { - left: -$nav-width; - - &.open { - left: 0; - } - } - - .page-wrapper { - margin-left: 0; - } - - #nav-button { - display: block; - } - - .tocify-wrapper .tocify-item > a { - padding-top: 0.3em; - padding-bottom: 0.3em; - } -} - -@media (max-width: $phone-width) { - .dark-box { - display: none; - } - - %left-col { - margin-right: 0; - } - - .tocify-wrapper .lang-selector { - display: block; - } - - .page-wrapper .lang-selector { - display: none; - } - - %right-col { - width: auto; - float: none; - } - - %right-col + %left-col { - margin-top: $main-padding; - } -} diff --git a/apidocs/docker-cloud/fonts/slate.eot b/apidocs/docker-cloud/fonts/slate.eot deleted file mode 100644 index 13c4839a19..0000000000 Binary files a/apidocs/docker-cloud/fonts/slate.eot and /dev/null differ diff --git a/apidocs/docker-cloud/fonts/slate.svg b/apidocs/docker-cloud/fonts/slate.svg deleted file mode 100644 index 5f34982306..0000000000 --- a/apidocs/docker-cloud/fonts/slate.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - diff --git a/apidocs/docker-cloud/fonts/slate.ttf b/apidocs/docker-cloud/fonts/slate.ttf deleted file mode 100644 index ace9a46a7e..0000000000 Binary files a/apidocs/docker-cloud/fonts/slate.ttf and /dev/null differ diff --git a/apidocs/docker-cloud/fonts/slate.woff b/apidocs/docker-cloud/fonts/slate.woff deleted file mode 100644 index 1e72e0ee00..0000000000 Binary files a/apidocs/docker-cloud/fonts/slate.woff and /dev/null differ diff --git a/apidocs/docker-cloud/fonts/slate.woff2 b/apidocs/docker-cloud/fonts/slate.woff2 deleted file mode 100644 index 7c585a7273..0000000000 Binary files a/apidocs/docker-cloud/fonts/slate.woff2 and /dev/null differ diff --git a/apidocs/docker-cloud/images/docker-cloud.svg b/apidocs/docker-cloud/images/docker-cloud.svg deleted file mode 100644 index 49f2570958..0000000000 --- a/apidocs/docker-cloud/images/docker-cloud.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - Cloud - Created with Sketch. - - - - - - - - - \ No newline at end of file diff --git a/apidocs/docker-cloud/images/logo.png b/apidocs/docker-cloud/images/logo.png deleted file mode 100644 index 407d4cc3bf..0000000000 Binary files a/apidocs/docker-cloud/images/logo.png and /dev/null differ diff --git a/apidocs/docker-cloud/images/navbar.png b/apidocs/docker-cloud/images/navbar.png deleted file mode 100644 index df38e90d87..0000000000 Binary files a/apidocs/docker-cloud/images/navbar.png and /dev/null differ diff --git a/apidocs/docker-cloud/includes/action.html b/apidocs/docker-cloud/includes/action.html deleted file mode 100644 index c0c39f34eb..0000000000 --- a/apidocs/docker-cloud/includes/action.html +++ /dev/null @@ -1,513 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Actions

          - -

          Action

          - -
          -

          Example

          -
          -
          {
          -    "action": "Cluster Create",
          -    "end_date": "Wed, 17 Sep 2014 08:26:22 +0000",
          -    "ip": "56.78.90.12",
          -    "is_user_action": true,
          -    "can_be_canceled": false,
          -    "location": "New York, USA",
          -    "method": "POST",
          -    "object": "/api/infra/v1/user_namespace/cluster/eea638f4-b77a-4183-b241-22dbd7866f22/",
          -    "path": "/api/infra/v1/user_namespace/cluster/",
          -    "resource_uri": "/api/audit/v1/action/6246c558-976c-4df6-ba60-eb1a344a17af/",
          -    "start_date": "Wed, 17 Sep 2014 08:26:22 +0000",
          -    "state": "Success",
          -    "user": "user_namespace",
          -    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.78.2 (KHTML, like Gecko) Version/7.0.6 Safari/537.78.2",
          -    "uuid": "6246c558-976c-4df6-ba60-eb1a344a17af"
          -}
          -
          - -

          An action represents an API call by a user. Details of the API call such as timestamp, origin IP address, and user agent are logged in the action object.

          - -

          Simple API calls that do not require asynchronous execution will return immediately with the appropiate HTTP error code and an action object will be created either in Success or Failed states. API calls that do require asynchronous execution will return HTTP code 202 Accepted immediately and create an action object in In progress state, which will change to Success or Failed state depending on the outcome of the operation being performed. In both cases the response will include a X-DockerCloud-Action-URI header with the resource URI of the created action.

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          resource_uriA unique API endpoint that represents the action
          uuidA unique identifier for the action generated automatically on creation
          objectThe API object (resource URI) to which the action applies to
          actionName of the operation performed/being performed
          methodHTTP method used to access the API
          pathHTTP path of the API accessed
          userThe user authenticated in the request that created the action
          user_agentThe user agent provided by the client when accessing the API endpoint
          start_dateDate and time when the API call was performed and the operation started processing
          end_dateDate and time when the API call finished processing
          stateState of the operation (see table below)
          ipIP address of the user that performed the API call
          locationGeographic location of the IP address of the user that performed the API call
          is_user_actionIf the action has been triggered by the user
          can_be_canceledIf the action can be canceled by the user in the middle of its execution
          can_be_retriedIf the action can be retried by the user
          - -

          Action states

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          StateDescription
          PendingThe action needed asynchronous execution and it is waiting for an in progress action
          In progressThe action needed asynchronous execution and is being performed
          CancelingThe action is being canceled by user request
          CanceledThe action has been canceled
          SuccessThe action was executed successfully
          FailedThere was an issue when the action was being performed. Check the logs for more information.
          - -

          List all actions

          -
          import dockercloud
          -
          -actions = dockercloud.Action.list()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -actionList, err := dockercloud.ListActions()
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(actionList)
          -
          -
          GET /api/audit/v1/action/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud action ls
          -
          - -

          Lists all actions in chronological order. Returns a list of Action objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/audit/v1/action/

          - -

          Query Parameters

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          uuidFilter by UUID.
          stateFilter by state. Possible values: In progress, Success, Failed
          start_dateFilter by start date. Valid filtering values are start_date__gte (after or on the date supplied) and start_date__lte (before or on the date supplied)
          end_dateFilter by end date. Valid filtering values are end_date__gte (after or on the date supplied) and end_date__lte (before or on the date supplied)
          objectFilter by resource URI of the related object. This filter can only be combined with ‘include_related’ filter
          include_relatedThere is a parent-child relationship between Docker Cloud objects, described in table Relationships between Docker Cloud objects. If set to 'true’, will include the actions of the related objects to the object specified in “object” filter parameter. Possible values: 'true’ or 'false’
          - -

          Relationships between Docker Cloud objects

          - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          ObjectRelationships
          ContainerContainer, service, stack (if any)
          ServiceAll containers in the service, service, stack (if any)
          StackAll services in the stack, all containers in every service in the stack, stack
          NodeNode, node cluster (if any)
          Node clusterAll nodes in the cluster, node cluster
          - -

          Get an action by UUID

          -
          import dockercloud
          -
          -action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(action)
          -
          -
          GET /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud action inspect 7eaf7fff
          -
          - -

          Get all the details of an specific action

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/audit/v1/action/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the action to retrieve
          - -

          Get the logs of an action

          - -
          -

          Example log line

          -
          -
          {
          -    "type": "log",
          -    "log": "Log line from the action",
          -    "timestamp": 1433779324
          -}
          -
          -
          import dockercloud
          -
          -def log_handler(message):
          -    print message
          -
          -action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -action.logs(tail=300, follow=True, log_handler=log_handler)
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -c := make(chan dockercloud.Logs)
          -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -    log.Println(err)
          -}
          -
          -go action.GetLogs(c)
          -
          -for {
          -    log.Println(<-c)
          -}
          -
          -
          GET /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1
          -Host: ws.cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Connection: Upgrade
          -Upgrade: websocket
          -
          -
          docker-cloud action logs 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce
          -
          - -

          Get the logs of the specified action.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s STREAM API

          - -

          HTTP Request

          - -

          GET /api/audit/v1/action/(uuid)/logs/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the action to retrieve logs
          - -

          Query Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          tailNumber of lines to show from the end of the logs (default: 300)
          followWhether to stream logs or close the connection immediately (default: true)
          - -

          Cancel an action

          -
          POST /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/cancel/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -action, err = action.Cancel()
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(action)
          -
          - -

          Cancels an action in Pending or In progress state.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/audit/v1/action/(uuid)/cancel/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the action to cancel
          - -

          Retry an action

          -
          import dockercloud
          -
          -def log_handler(message):
          -  print message
          -
          -action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -action.logs(tail=300, follow=True, log_handler=log_handler)
          -
          -
          POST /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/retry/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -action, err = action.Retry()
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(action)
          -
          -
          docker-cloud action logs 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce
          -
          - -

          Retries an action in Success, Failed or Canceled state.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/audit/v1/action/(uuid)/retry/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the action to retry
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/availabilityzone.html b/apidocs/docker-cloud/includes/availabilityzone.html deleted file mode 100644 index 6de0c68fb4..0000000000 --- a/apidocs/docker-cloud/includes/availabilityzone.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Availability Zones

          - -

          Availability Zone

          - -
          -

          Example

          -
          -
          {
          -    "available": true,
          -    "name": "ap-northeast-1a",
          -    "region": "/api/infra/v1/region/az/ap-northeast-1/",
          -    "resource_uri": "/api/infra/v1/az/aws/ap-northeast-1/ap-northeast-1a/"
          -}
          -
          - -

          An Availability Zone is an isolated location inside a region. Providers that support availability zones: AWS

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          availableWhether the availability zone is currently available for new node deployments
          nameAn identifier for the availability zone
          regionThe resource URI of the region where the availability zone is allocated
          resource_uriA unique API endpoint that represents the zone
          - -

          List all availability zones

          -
          import dockercloud
          -
          -az = dockercloud.AZ.list()
          -
          -
          GET /api/infra/v1/az/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -az, err := dockercloud.ListAZ()
          -if err != nil {
          -    log.Println(err)
          -}
          -
          -log.Println(az)
          -
          -
          docker-cloud nodecluster az
          -
          - -

          Lists all availability zones from all regions of all supported cloud providers. Returns a list of Availability Zone objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/infra/v1/az/

          - -

          Query Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          nameFilter by availability zone name
          regionFilter by resource URI of the target region
          - -

          Get an individual availability zone

          -
          import dockercloud
          -
          -az = dockercloud.AZ.fetch("aws/sa-east-1/sa-east-1a")
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -az, err := dockercloud.GetAZ("aws/sa-east-1/sa-east-1a")
          -if err != nil {
          -    log.Println(err)
          -}
          -
          -log.Println(az)
          -
          -
          GET /api/infra/v1/az/aws/sa-east-1/sa-east-1a/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          - -

          Get all the details of a specific availability zone

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/infra/v1/az/(provider.name)/(region.name)/(name)/

          - -

          Path Parameters

          - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          nameThe name of the availability zone to retrieve
          providerThe name of the provider
          regionThe name of the region
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/container.html b/apidocs/docker-cloud/includes/container.html deleted file mode 100644 index 5fcb44f79e..0000000000 --- a/apidocs/docker-cloud/includes/container.html +++ /dev/null @@ -1,1154 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Containers

          - -

          Container

          - -
          -

          Example

          -
          -
          {
          -    "autodestroy": "OFF",
          -    "autorestart": "OFF",
          -    "bindings": [
          -        {
          -            "volume": "/api/infra/v1/user_namespace/volume/1863e34d-6a7d-4945-aefc-8f27a4ab1a9e/",
          -            "host_path": null,
          -            "container_path": "/data",
          -            "rewritable": true
          -        },
          -        {
          -            "volume": null,
          -            "host_path": "/etc",
          -            "container_path": "/etc",
          -            "rewritable": true
          -        }
          -    ],
          -    "cap_add": [
          -        "ALL"
          -    ],
          -    "cap_drop": [
          -        "NET_ADMIN",
          -        "SYS_ADMIN"
          -    ],
          -    "container_envvars": [
          -        {
          -            "key": "DB_1_ENV_DEBIAN_FRONTEND",
          -            "value": "noninteractive"
          -        },
          -        {
          -            "key": "DB_1_ENV_MYSQL_PASS",
          -            "value": "**Random**"
          -        },
          -        {
          -            "key": "DB_1_ENV_MYSQL_USER",
          -            "value": "admin"
          -        },
          -        {
          -            "key": "DB_1_ENV_PATH",
          -            "value": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
          -        },
          -        {
          -            "key": "DB_1_ENV_REPLICATION_MASTER",
          -            "value": "**False**"
          -        },
          -        {
          -            "key": "DB_1_ENV_REPLICATION_PASS",
          -            "value": "replica"
          -        },
          -        {
          -            "key": "DB_1_ENV_REPLICATION_SLAVE",
          -            "value": "**False**"
          -        },
          -        {
          -            "key": "DB_1_ENV_REPLICATION_USER",
          -            "value": "replica"
          -        },
          -        {
          -            "key": "DB_1_PORT",
          -            "value": "tcp://172.16.0.3:3306"
          -        },
          -        {
          -            "key": "DB_1_PORT_3306_TCP",
          -            "value": "tcp://172.16.0.3:3306"
          -        },
          -        {
          -            "key": "DB_1_PORT_3306_TCP_ADDR",
          -            "value": "172.16.0.3"
          -        },
          -        {
          -            "key": "DB_1_PORT_3306_TCP_PORT",
          -            "value": "3306"
          -        },
          -        {
          -            "key": "DB_1_PORT_3306_TCP_PROTO",
          -            "value": "tcp"
          -        },
          -        {
          -            "key": "DB_ENV_DEBIAN_FRONTEND",
          -            "value": "noninteractive"
          -        },
          -        {
          -            "key": "DB_ENV_MYSQL_PASS",
          -            "value": "**Random**"
          -        },
          -        {
          -            "key": "DB_ENV_MYSQL_USER",
          -            "value": "admin"
          -        },
          -        {
          -            "key": "DB_ENV_PATH",
          -            "value": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
          -        },
          -        {
          -            "key": "DB_ENV_REPLICATION_MASTER",
          -            "value": "**False**"
          -        },
          -        {
          -            "key": "DB_ENV_REPLICATION_PASS",
          -            "value": "replica"
          -        },
          -        {
          -            "key": "DB_ENV_REPLICATION_SLAVE",
          -            "value": "**False**"
          -        },
          -        {
          -            "key": "DB_ENV_REPLICATION_USER",
          -            "value": "replica"
          -        },
          -        {
          -            "key": "DB_PASS",
          -            "value": "szVaPz925B7I"
          -        },
          -        {
          -            "key": "DB_PORT",
          -            "value": "tcp://172.16.0.3:3306"
          -        },
          -        {
          -            "key": "DB_PORT_3306_TCP",
          -            "value": "tcp://172.16.0.3:3306"
          -        },
          -        {
          -            "key": "DB_PORT_3306_TCP_ADDR",
          -            "value": "172.16.0.3"
          -        },
          -        {
          -            "key": "DB_PORT_3306_TCP_PORT",
          -            "value": "3306"
          -        },
          -        {
          -            "key": "DB_PORT_3306_TCP_PROTO",
          -            "value": "tcp"
          -        },
          -        {
          -            "key": "DB_DOCKERCLOUD_API_URL",
          -            "value": "https://cloud.docker.com/api/app/v1/user_namespace/service/c0fed1dc-c528-40c9-aa4c-dc00672ebcbf/"
          -        }
          -    ],
          -    "container_ports": [
          -        {
          -            "endpoint_uri": "http://wordpress-stackable-1.admin.cont.dockerapp.io:49153/",
          -            "inner_port": 80,
          -            "outer_port": 49153,
          -            "port_name": "http",
          -            "protocol": "tcp",
          -            "published": true,
          -            "uri_protocol": "http"
          -        }
          -    ],
          -    "cpu_shares": 100,
          -    "cpuset": "0,1",
          -    "cgroup_parent": "m-executor-abcd",
          -    "deployed_datetime": "Thu, 16 Oct 2014 12:04:08 +0000",
          -    "destroyed_datetime": null,
          -    "devices": [
          -        "/dev/ttyUSB0:/dev/ttyUSB0"
          -    ],
          -    "dns": [
          -        "8.8.8.8"
          -    ],
          -    "dns_search": [
          -        "example.com",
          -        "c1dd4e1e-1356-411c-8613-e15146633640.local.dockerapp.io"
          -    ],
          -    "domainname": "domainname",
          -    "entrypoint": "",
          -    "exit_code": null,
          -    "exit_code_msg": null,
          -    "extra_hosts": [
          -        "onehost:50.31.209.229"
          -    ],
          -    "hostname": "hostname",
          -    "image_name": "tutum/wordpress-stackable:latest",
          -    "labels": {
          -        "com.example.description": "Accounting webapp",
          -        "com.example.department": "Finance",
          -        "com.example.label-with-empty-value": ""
          -    },
          -    "linked_to_container": [
          -        {
          -            "endpoints": {
          -                "3306/tcp": "tcp://172.16.0.3:3306"
          -            },
          -            "from_container": "/api/app/v1/user_namespace/container/c1dd4e1e-1356-411c-8613-e15146633640/",
          -            "name": "DB_1",
          -            "to_container": "/api/app/v1/user_namespace/container/ba434e1e-1234-411c-8613-e15146633640/"
          -        }
          -    ],
          -    "link_variables": {
          -        "WORDPRESS_STACKABLE_1_ENV_DB_HOST": "**LinkMe**",
          -        "WORDPRESS_STACKABLE_1_ENV_DB_NAME": "wordpress",
          -        "WORDPRESS_STACKABLE_1_ENV_DB_PASS": "szVaPz925B7I",
          -        "WORDPRESS_STACKABLE_1_ENV_DB_PORT": "**LinkMe**",
          -        "WORDPRESS_STACKABLE_1_ENV_DB_USER": "admin",
          -        "WORDPRESS_STACKABLE_1_ENV_DEBIAN_FRONTEND": "noninteractive",
          -        "WORDPRESS_STACKABLE_1_ENV_HOME": "/",
          -        "WORDPRESS_STACKABLE_1_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
          -        "WORDPRESS_STACKABLE_1_PORT": "tcp://172.16.0.2:80",
          -        "WORDPRESS_STACKABLE_1_PORT_80_TCP": "tcp://172.16.0.2:80",
          -        "WORDPRESS_STACKABLE_1_PORT_80_TCP_ADDR": "172.16.0.2",
          -        "WORDPRESS_STACKABLE_1_PORT_80_TCP_PORT": "80",
          -        "WORDPRESS_STACKABLE_1_PORT_80_TCP_PROTO": "tcp",
          -        "WORDPRESS_STACKABLE_ENV_DB_HOST": "**LinkMe**",
          -        "WORDPRESS_STACKABLE_ENV_DB_NAME": "wordpress",
          -        "WORDPRESS_STACKABLE_ENV_DB_PASS": "szVaPz925B7I",
          -        "WORDPRESS_STACKABLE_ENV_DB_PORT": "**LinkMe**",
          -        "WORDPRESS_STACKABLE_ENV_DB_USER": "admin",
          -        "WORDPRESS_STACKABLE_ENV_DEBIAN_FRONTEND": "noninteractive",
          -        "WORDPRESS_STACKABLE_ENV_HOME": "/",
          -        "WORDPRESS_STACKABLE_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
          -        "WORDPRESS_STACKABLE_PORT": "tcp://172.16.0.2:80",
          -        "WORDPRESS_STACKABLE_PORT_80_TCP": "tcp://172.16.0.2:80",
          -        "WORDPRESS_STACKABLE_PORT_80_TCP_ADDR": "172.16.0.2",
          -        "WORDPRESS_STACKABLE_PORT_80_TCP_PORT": "80",
          -        "WORDPRESS_STACKABLE_PORT_80_TCP_PROTO": "tcp"
          -    },
          -    "mac_address": "02:42:ac:11:65:43",
          -    "memory": 1024,
          -    "memory_swap": 4096,
          -    "name": "wordpress-stackable",
          -    "net": "bridge",
          -    "node": "/api/infra/v1/user_namespace/node/9691c44e-3155-4ca2-958d-c9571aac0a14/",
          -    "pid": "none",
          -    "private_ip": "10.7.0.1",
          -    "privileged": false,
          -    "public_dns": "wordpress-stackable-1.admin.cont.dockerapp.io",
          -    "read_only": true,
          -    "resource_uri": "/api/app/v1/user_namespace/container/c1dd4e1e-1356-411c-8613-e15146633640/",
          -    "roles": ["global"],
          -    "run_command": "/run-wordpress.sh",
          -    "security_opt": [
          -        "label:user:USER",
          -        "label:role:ROLE"
          -    ],
          -    "service": "/api/app/v1/user_namespace/service/adeebc1b-1b81-4af0-b8f2-cefffc69d7fb/",
          -    "started_datetime": "Thu, 16 Oct 2014 12:04:08 +0000",
          -    "state": "Running",
          -    "stdin_open": false,
          -    "stopped_datetime": null,
          -    "synchronized": true,
          -    "tty": false,
          -    "user": "root",
          -    "uuid": "c1dd4e1e-1356-411c-8613-e15146633640",
          -    "working_dir": "/app"
          -}
          -
          - -

          A container is a representation of a Docker container in a node.

          - -

          This is a namespaced endpoint.

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          uuidA unique identifier for the container generated automatically on creation
          resource_uriA unique API endpoint that represents the container
          image_nameThe Docker image name and tag of the container
          bindingsA list of volume bindings that the container has mounted (see table Container Binding attributes below)
          nameA user provided name for the container (inherited from the service)
          nodeThe resource URI of the node where this container is running
          serviceThe resource URI of the service which this container is part of
          public_dnsThe external FQDN of the container
          stateThe state of the container (see table Container states below)
          synchronizedFlag indicating if the container is synchronized with the current service definition.
          exit_codeThe numeric exit code of the container (if applicable, null otherwise)
          exit_code_msgA string representation of the exit code of the container (if applicable, null otherwise)
          deployed_datetimeThe date and time of the last deployment of the container (if applicable, null otherwise)
          started_datetimeThe date and time of the last start operation on the container (if applicable, null otherwise)
          stopped_datetimeThe date and time of the last stop operation on the container (if applicable, null otherwise)
          destroyed_datetimeThe date and time of the terminate operation on the container (if applicable, null otherwise)
          container_portsList of published ports of this container (see table Container Port attributes below)
          container_envvarsList of user-defined environment variables set on the containers of the service, which will override the container environment variables (see table Container Environment Variable attributes below)
          labelsContainer metadata in form of dictionary
          working_dirWorking directory for running binaries within a container
          userUser used on the container on launch
          hostnameHostname used on the container on launch
          domainnameDomainname used on the container on launch
          mac_addressEthernet device’s MAC address used on the container on launch
          cgroup_nameOptional parent cgroup for the container.
          ttyIf the container has the tty enable
          stdin_openIf the container has stdin opened
          dnsContainer custom DNS servers
          dns_searchContainer custom DNS search domain
          cap_addContainer added capabilities
          cap_dropContainer dropped capabilities
          devicesList of container device mappings
          extra_hostsList of container hostname mappings
          secuirty_optLabeling scheme of this container
          entrypointEntrypoint used on the container on launch
          run_commandRun command used on the container on launch
          cpu_sharesThe relative CPU priority of the container (see Runtime Constraints on CPU and Memory for more information)
          cpusetCPUs in which execution is allowed
          memoryThe memory limit of the container in MB (see Runtime Constraints on CPU and Memory for more information)
          memory_swapTotal memory limit (memory + swap) of the container in MB
          autorestartWhether to restart the container automatically if it stops (see Crash recovery for more information)
          autodestroyWhether to terminate the container automatically if it stops (see Autodestroy for more information)
          rolesList of Docker Cloud roles asigned to this container (see API roles for more information))
          linked_to_containerList of IP addresses of the linked containers (see table Container Link attributes below and Service links for more information)
          link_variablesList of environment variables that would be exposed in any container that is linked to this one
          privilegedWhether the container has Docker’s privileged flag set or not (see Runtime privilege for more information)
          read_onlyWhether the container filesystem is read-only or not
          private_ipIP address of the container on the overlay network. This IP will be reachable from any other container.
          netNetwork mode set on the container (see table Network Modes below, more information)
          pidPID (Process) Namespace mode for the container (more information)
          - -

          Container Binding attributes

          - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          host_pathThe host path of the volume
          container_pathThe container path where the volume is mounted
          rewritabletrue is the volume has writable permissions
          volumeThe resource URI of the volume
          - -

          Container Port attributes

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          protocolThe protocol of the port, either tcp or udp
          inner_portThe published port number inside the container
          outer_portThe published port number in the node public network interface
          port_nameName of the service associated to this port
          uri_protocolThe protocol to be used in the endpoint for this port (i.e. http)
          endpoint_uriThe URI of the endpoint for this port
          publishedWhether the port has been published in the host public network interface or not. Non-published ports can only be accessed via links.
          - -

          Container Environment Variable attributes

          - - - - - - - - - - - - - - - -
          AttributeDescription
          keyThe name of the environment variable
          valueThe value of the environment variable
          - -

          Container States

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          StateDescription
          StartingThe container is being deployed or started (from Stopped). No actions allowed in this state.
          RunningThe container is deployed and running. Possible actions in this state: stop, terminate.
          StoppingThe container is being stopped. No actions allowed in this state.
          StoppedThe container is stopped. Possible actions in this state: start, terminate.
          TerminatingThe container is being deleted. No actions allowed in this state.
          TerminatedThe container has been deleted. No actions allowed in this state.
          - -

          Network Modes

          - - - - - - - - - - - - - - - -
          StrategyDescription
          bridgeCreates a new network stack for the container on the docker bridge.
          hostUses the host network stack inside the container.
          - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          nameThe name given to the link
          from_containerThe resource URI of the “client” container
          to_containerThe resource URI of the “server” container being linked
          endpointsA dictionary with the endpoints (protocol, IP and port) to be used to reach each of the “server” container exposed ports
          - -

          List all containers

          -
          import dockercloud
          -
          -containers = dockercloud.Container.list()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -containerList, err := dockercloud.ListContainers()
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(containerList)
          -
          -
          GET /api/app/v1/container/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud container ps
          -
          - -

          Lists all current and recently terminated containers. Returns a list of Container objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/app/v1/[optional_namespace/]container/

          - -

          Query Parameters

          - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          uuidFilter by UUID
          stateFilter by state. Possible values: Starting, Running, Stopping, Stopped, Terminating, Terminated
          nameFilter by container name
          serviceFilter by resource URI of the target service.
          nodeFilter by resource URI of the target node.
          - -

          Get an existing container

          -
          import dockercloud
          -
          -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -container, err := dockerckoud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(container)
          -
          -
          GET /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud container inspect 7eaf7fff
          -
          - -

          Get all the details of an specific container

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/app/v1/[optional_namespace/]container/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the container to retrieve
          - -

          Get the logs of a container

          - -
          -

          Example log line

          -
          -
          {
          -    "type": "log",
          -    "log": "Log line from the container",
          -    "streamType": "stdout",
          -    "timestamp": 1433779324
          -}
          -
          -
          import dockercloud
          -
          -def log_handler(message):
          -    print message
          -
          -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -container.logs(tail=300, follow=True, log_handler=log_handler)
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -container, err := dockercloud.GetContainer("447ecddc-2890-4ea2-849b-99392e0dd7a6")
          -
          -if err != nil {
          -    log.Fatal(err)
          -}
          -c := make(chan dockercloud.Logs)
          -
          -go container.Logs(c)
          -    for {
          -        s := <-c
          -        log.Println(s)
          -    }
          -
          -
          GET /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1
          -Host: ws.cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Connection: Upgrade
          -Upgrade: websocket
          -
          -
          docker-cloud container logs 7eaf7fff
          -
          - -

          Get the logs of the specified container.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s STREAM API

          - -

          HTTP Request

          - -

          GET /api/app/v1/[optional_namespace/]container/(uuid)/logs/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the container to retrieve logs
          - -

          Query Parameters

          - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          tailNumber of lines to show from the end of the logs (default: 300)
          followWhether to stream logs or close the connection immediately (default: true)
          serviceFilter by service (resource URI)
          - -

          Start a container

          -
          import dockercloud
          -
          -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -container.start()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -    log.Println(err)
          -}
          -
          -if err = container.Start(); err != nil {
          -  log.Println(err)
          -}
          -
          -
          POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud container start 7eaf7fff
          -
          - -

          Starts a stopped container.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]container/(uuid)/start/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the container to start
          - -

          Stop a container

          -
          import dockercloud
          -
          -container = dockerlcoud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -container.stop()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -    log.Println(err)
          -}
          -
          -if err = container.Stop(); err != nil {
          -       log.Println(err)
          -   }
          -
          -
          POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/stop/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud container stop 7eaf7fff
          -
          - -

          Stops a running container.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]container/(uuid)/stop/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the container to stop
          - -

          Redeploy a container

          -
          import dockercloud
          -
          -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -container.redeploy()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -    log.Println(err)
          -}
          -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: true) to reuse the existing volumes
          -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}) to not reuse the existing volumes
          -if err = container.Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}); err != nil {
          -  log.Println(err)
          -}
          -
          -
          POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud container redeploy 7eaf7fff
          -
          - -

          Redeploys a container.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]container/(uuid)/redeploy/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the container to redeploy
          - -

          Query Parameters

          - - - - - - - - - - - -
          ParameterDescription
          reuse_volumesWheather to reuse container volumes for this redeploy operation or not (default: true).
          - -

          Terminate a container

          -
          import dockercloud
          -
          -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -container.delete()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -    log.Println(err)
          -}
          -
          -if err = container.Terminate(); err != nil {
          -       log.Println(err)
          -   }
          -
          -
          DELETE /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud container terminate 7eaf7fff
          -
          - -

          Terminates the specified container. This is not reversible. All data stored in the container will be permanently deleted.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          DELETE /api/app/v1/[optional_namespace/]container/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the container to terminate
          - -

          Execute command inside a container

          -
          import dockercloud
          -
          -def msg_handler(message):
          -    print message
          -
          -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -container.execute("ls", handler=msg_handler)
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -c := make(chan dockercloud.Exec)
          -
          -container.Exec("ls", c)
          -
          -
          -
          GET /api/app/v1/container/(uuid)/exec/ HTTP/1.1
          -Host: ws.cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Connection: Upgrade
          -Upgrade: websocket
          -
          -
          docker-cloud exec 7eaf7fff ls
          -
          - -

          Executes a command inside the specified running container, creating a bi-directional stream for the process’ standard input and output. This endpoint can be connected to using a bi-directional Secure Web Socket wss://ws.cloud.docker.com/api/app/v1/container/(uuid)/exec/

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s STREAM API

          - -

          HTTP Request

          - -

          GET /api/app/v1/[optional_namespace/]container/(uuid)/exec/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the container where the command will be executed
          - -

          Query Parameters

          - - - - - - - - - - - -
          ParameterDescription
          commandCommand to be executed (default: sh)
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/dockercloud-events.html b/apidocs/docker-cloud/includes/dockercloud-events.html deleted file mode 100644 index ef08ecbf80..0000000000 --- a/apidocs/docker-cloud/includes/dockercloud-events.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Docker Cloud Events

          - -

          Docker Cloud Event

          - -
          -

          Example

          -
          -
          {
          -    "type": "action",
          -    "action": "update",
          -    "parents": [
          -        "/api/app/v1/user_namespace/container/0b0e3538-88df-4f07-9aed-3a3cc4175076/"
          -    ],
          -    "resource_uri": "/api/app/v1/user_namespace/action/49f0efe8-a704-4a10-b02f-f96344fabadd/",
          -    "state": "Success",
          -    "uuid": "093ba3bb-08dd-48f0-8f12-4d3b85ef85b3",
          -    "datetime": "2016-02-01T16:47:28Z"
          -}
          -
          - -

          Docker Cloud events are generated every time any of the following objects is created or changes state:

          - -
            -
          • Stack
          • -
          • Service
          • -
          • Container
          • -
          • Node Cluster
          • -
          • Node
          • -
          • Action
          • -
          - -

          This is a namespaced endpoint.

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          typeType of object that was created or updated. For possible values, check the events types table below.
          actionType of action that was executed on the object. Posible values: create, update or delete
          parentsList of resource URIs (REST API) of the parents of the object, according to the “Parent-child hierarchy” table below
          resource_uriResource URI (REST API) of the object that was created or updated. You can do a GET operation on this URL to fetch its details
          stateThe current state of the object
          uuidUnique identifier for the event
          datetimeDate and time of the event in ISO 8601 format
          - -

          Event types

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          TypeDescription
          stackWhenever a Stack is created or updated
          serviceWhenever a Service is created or updated
          containerWhenever a Container is created or updated
          nodeclusterWhenever a Node Cluster is created or updated
          nodeWhenever a Node is created or updated
          actionWhenever a Action is created or updated
          errorSent when an error occurs on the websocket connection or as part of the authentication process
          - -

          Parent-child hierarchy

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          Object typeParent types
          Stack(None)
          ServiceStack
          ContainerService, Stack, Node, Node Cluster
          Node Cluster(None)
          NodeNode Cluster
          Action(object to which the action applies to)
          - -

          Listen to new Docker Cloud Events

          -
          import dockercloud
          -
          -def process_event(event):
          -    print event
          -
          -events = dockercloud.Events()
          -events.on_message(process_event)
          -events.run_forever()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -// Listens for container events only
          -myFilter := dockercloud.NewStreamFilter(&dockercloud.EventFilter{Type: "container"})
          -
          -stream := dockercloud.NewStream(myFilter)
          -
          -if err := stream.Connect(); err == nil {
          -    go stream.RunForever()
          -} else {
          -    log.Print("Connect err: " + err.Error())
          -}
          -
          -for {
          -    select {
          -    case event := <-stream.MessageChan:
          -        log.Println(event)
          -    case err := <-stream.ErrorChan:
          -        log.Println(err)
          -    }
          -}
          -
          -
          GET /api/audit/v1/events/ HTTP/1.1
          -Host: ws.cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Connection: Upgrade
          -Upgrade: websocket
          -
          -
          docker-cloud event
          -
          - -

          Listens for new Docker Cloud Events

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s STREAM API

          - -

          HTTP Request

          - -

          GET /api/audit/v1/[optional_namespace/]events/

          - -

          Query Parameters

          - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          typeFilter by type
          objectFilter by object resource URI
          parentFilter by object parents
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/node.html b/apidocs/docker-cloud/includes/node.html deleted file mode 100644 index 6fa50cf135..0000000000 --- a/apidocs/docker-cloud/includes/node.html +++ /dev/null @@ -1,531 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Nodes

          - -

          Node

          - -
          -

          Example

          -
          -
          {
          -    "availability_zone": "/api/infra/v1/az/testing-provider/testing-region/testing-az/",
          -    "cpu": 1,
          -    "current_num_containers": 4,
          -    "deployed_datetime": "Tue, 16 Sep 2014 17:01:15 +0000",
          -    "destroyed_datetime": null,
          -    "disk": 60,
          -    "docker_execdriver": "native-0.2",
          -    "docker_graphdriver": "aufs",
          -    "docker_version": "1.5.0",
          -    "external_fqdn": "fc1a5bb9-user.node.dockerapp.io",
          -    "last_seen": "Thu, 25 Sep 2014 13:14:44 +0000",
          -    "memory": 1792,
          -    "nickname": "fc1a5bb9-user.node.dockerapp.io",
          -    "node_cluster": "/api/infra/v1/user_namespace/nodecluster/d787a4b7-d525-4061-97a0-f423e8f1d229/",
          -    "node_type": "/api/infra/v1/user_namespace/nodetype/testing-provider/testing-type/",
          -    "public_ip": "10.45.2.11",
          -    "region": "/api/infra/v1/region/testing-provider/testing-region/",
          -    "resource_uri": "/api/infra/v1/user_namespace/node/fc1a5bb9-17f5-4819-b667-8c7cd819e949/",
          -    "state": "Deployed",
          -    "tags": [
          -        {"name": "tag_one"},
          -        {"name": "tag-two"}
          -    ],
          -    "tunnel": "https://tunnel01.cloud.docker.com:12345",
          -    "uuid": "fc1a5bb9-17f5-4819-b667-8c7cd819e949"
          -}
          -
          - -

          A node is a virtual machine provided by a cloud provider where containers can be deployed.

          - -

          This is a namespaced endpoint.

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          availability_zoneThe resource URI of the availability zone where the node is deployed, if any
          uuidA unique identifier for the node generated automatically on creation
          resource_uriA unique API endpoint that represents the node
          external_fqdnAn automatically generated FQDN for the node. Containers deployed on this node will inherit this FQDN.
          stateThe state of the node. See the below table for a list of possible states.
          node_clusterThe resource URI of the node cluster to which this node belongs to (if applicable)
          node_typeThe resource URI of the node type used for the node
          regionThe resource URI of the region where the node is deployed
          docker_execdriverDocker’s execution driver used in the node
          docker_graphdriverDocker’s storage driver used in the node
          docker_versionDocker’s version used in the node
          cpuNode number of CPUs
          diskNode storage size in GB
          memoryNode memory in MB
          current_num_containersThe actual number of containers deployed in this node
          last_seenDate and time of the last time the node was contacted by Docker Cloud
          public_ipThe public IP allocated to the node
          tunnelIf the node does not accept incoming connections to port 2375, the address of the reverse tunnel to access the docker daemon, or null otherwise
          deployed_datetimeThe date and time when this node cluster was deployed
          destroyed_datetimeThe date and time when this node cluster was terminated (if applicable)
          tagsList of tags to identify the node when deploying services (see Tags for more information)
          nicknameA user-friendly name for the node (external_fqdn by default)
          - -

          Node states

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          StateDescription
          DeployingThe node is being deployed in the cloud provider. No actions allowed in this state.
          DeployedThe node is deployed and provisioned and is ready to deploy containers. Possible actions in this state: terminate, docker-upgrade.
          UnreachableThe node is deployed but Docker Cloud cannot connect to the docker daemon. Possible actions in this state: health-check and terminate.
          UpgradingThe node docker daemon is being upgraded. No actions allowed in this state.
          TerminatingThe node is being terminated in the cloud provider. No actions allowed in this state.
          TerminatedThe node has been terminated and is no longer present in the cloud provider. No actions allowed in this state.
          - -

          List all nodes

          -
          import dockercloud
          -
          -nodes = dockercloud.Node.list()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -nodeList, err := dockercloud.ListNodes()
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(nodeList)
          -
          -
          GET /api/infra/v1/node/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud node ls
          -
          - -

          Lists all current and recently terminated nodes. Returns a list of Node objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/infra/v1/[optional_namespace/]node/

          - -

          Query Parameters

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          uuidFilter by UUID
          stateFilter by state. Possible values: Deploying, Deployed, Unreachable, Upgrading, Terminating, Terminated
          node_clusterFilter by resource URI of the target node cluster
          node_typeFilter by resource URI of the target node type
          regionFilter by resource URI of the target region
          docker_versionFilter by Docker engine version running in the nodes
          - -

          Get an existing node

          -
          import dockercloud
          -
          -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(node)
          -
          -
          GET /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud node inspect 7eaf7fff
          -
          - -

          Get all the details of an specific node

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/infra/v1/[optional_namespace/]node/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the node to retrieve
          - -

          Update a node

          -
          import dockercloud
          -
          -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -node.tags.add(["tag-1"])
          -node.save()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -    log.Println(err)
          -}
          -
          -if err = node.Update(dockercloud.Node{Tags: []string{{Name: "tag-1"}}}); err != nil {
          -            log.Println(err)
          -}
          -
          -
          PATCH /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -{"tags": [{"name": "tag-1"}], "nickname": "dev node"}
          -
          -
          docker-cloud tag add -t tag-1 7eaf7fff
          -docker-cloud tag set -t tag-2 7eaf7fff
          -
          - -

          Names the node with a user-friendly name and/or replaces the old tags for the new list provided.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          PATCH /api/infra/v1/[optional_namespace/]node/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the node to retrieve
          - -

          JSON Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          nickname(optional) A user-friendly name for the node (external_fqdn by default)
          tags(optional) List of tags the node will have. This operation replaces the user tag list.
          - -

          Upgrade Docker Daemon

          -
          import dockercloud
          -
          -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -node.upgrade_docker()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = node.Upgrade(); err != nil {
          -       log.Println(err)
          -   }
          -
          -
          POST /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/docker-upgrade/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud node upgrade 7eaf7fff
          -
          - -

          Upgrades the docker daemon of the node. This will restart your containers on that node. See Docker upgrade for more information.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/infra/v1/[optional_namespace/]node/(uuid)/docker-upgrade/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the node to upgrade
          - -

          Perform a health check of a node

          -
          POST /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/health-check/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          - -

          Tests connectivity between Docker Cloud and the node. Updates the node status to Deployed if the check was successful, or to Unreachable otherwise.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/infra/v1/[optional_namespace/]node/(uuid)/health-check/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the node to perform the health check to
          - -

          Terminate a node

          -
          import dockercloud
          -
          -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -node.delete()
          -
          -
          DELETE /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = node.Terminate(); err != nil {
          -   log.Println(err)
          -}
          -
          -
          docker-cloud node rm 7eaf7fff
          -
          - -

          Terminates the specified node.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          DELETE /api/infra/v1/[optional_namespace/]node/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the node to terminate
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/nodecluster.html b/apidocs/docker-cloud/includes/nodecluster.html deleted file mode 100644 index 0be9899695..0000000000 --- a/apidocs/docker-cloud/includes/nodecluster.html +++ /dev/null @@ -1,582 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Node Clusters

          - -

          Node Cluster

          - -
          -

          Example

          -
          -
          {
          -    "current_num_nodes": 1,
          -    "deployed_datetime": "Tue, 16 Sep 2014 17:01:15 +0000",
          -    "destroyed_datetime": null,
          -    "disk": 60,
          -    "nickname": "my test cluster",
          -    "name": "TestCluster",
          -    "node_type": "/api/infra/v1/nodetype/aws/t2.micro/",
          -    "nodes": [
          -        "/api/infra/v1/user_namespace/node/75d20367-0948-4f10-8ba4-ffb4d16ed3c6/"
          -    ],
          -    "region": "/api/infra/v1/region/aws/us-east-1/",
          -    "resource_uri": "/api/infra/v1/user_namespace/nodecluster/5516df0b-721e-4470-b350-741ff22e63a0/",
          -    "state": "Deployed",
          -    "tags": [
          -        {"name": "tag_one"},
          -        {"name": "tag-two"},
          -        {"name": "tagthree3"}
          -    ],
          -    "target_num_nodes": 2,
          -    "uuid": "5516df0b-721e-4470-b350-741ff22e63a0",
          -    "provider_options": {
          -        "vpc": {
          -            "id": "vpc-aa1c70d4",
          -            "subnets": ["subnet-aaa7d94f", "subnet-aa15fa64"],
          -            "security_groups": ["sg-aa1c70d4"]
          -        },
          -        "iam": {
          -            "instance_profile_name": "my_instance_profile"
          -        }
          -    }
          -}
          -
          - -

          A node cluster is a group of nodes that share the same provider, region and/or availability zone, and node type. They are on the same private network.

          - -

          This is a namespaced endpoint.

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          uuidA unique identifier for the node cluster generated automatically on creation
          resource_uriA unique API endpoint that represents the node cluster
          nameA user provided name for the node cluster
          stateThe state of the node cluster. See the below table for a list of possible states.
          node_typeThe resource URI of the node type used for the node cluster
          diskThe size of the disk where images and containers are stored (in GB)
          nodesA list of resource URIs of the Node objects on the node cluster
          regionThe resource URI of the Region object where the node cluster is deployed
          target_num_nodesThe desired number of nodes for the node cluster
          current_num_nodesThe actual number of nodes in the node cluster. This may differ from target_num_nodes if the node cluster is being deployed or scaled
          deployed_datetimeThe date and time when this node cluster was deployed
          destroyed_datetimeThe date and time when this node cluster was terminated (if applicable)
          tagsList of tags to identify the node cluster nodes when deploying services (see Tags for more information)
          provider_optionsProvider-specific extra options for the deployment of the node (see Provider options table below for more information)
          nicknameA user-friendly name for the node cluster (name by default)
          - -

          Node Cluster states

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          StateDescription
          InitThe node cluster has been created and has no deployed containers yet. Possible actions in this state: deploy, terminate.
          DeployingAll nodes in the cluster are either deployed or being deployed. No actions allowed in this state.
          DeployedAll nodes in the cluster are deployed and provisioned. Possible actions in this state: terminate.
          Partly deployedOne or more nodes of the cluster are deployed and running. Possible actions in this state: terminate.
          ScalingThe cluster is either deploying new nodes or terminating existing ones responding to a scaling request. No actions allowed in this state.
          TerminatingAll nodes in the cluster are either being terminated or already terminated. No actions allowed in this state.
          TerminatedThe node cluster and all its nodes have been terminated. No actions allowed in this state.
          Empty clusterThere are no nodes deployed in this cluster. Possible actions in this state: terminate.
          - -

          Provider options

          - -

          You can specify the following options when using the Amazon Web Services provider:

          - -
            -
          • vpc: VPC-related options (optional) - -
              -
            • id: AWS VPC identifier of the target VPC where the nodes of the cluster will be deployed (required)
            • -
            • subnets: a list of target subnet indentifiers inside selected VPC. If you specify more than one subnet, Docker Cloud will balance among all of them following a high-availability schema (optional)
            • -
            • security_groups: the security group that will be applied to every node of the cluster (optional)
            • -
          • -
          • iam: IAM-related options (optional) - -
              -
            • instance_profile_name: name of the instance profile (container for instance an IAM role) to attach to every node of the cluster (required)
            • -
          • -
          - -

          List all node clusters

          -
          import dockercloud
          -
          -nodeclusters = dockercloud.NodeCluster.list()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -nodeclusters, err := dockercloud.ListNodeClusters()
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(nodeclusters)
          -
          -
          GET /api/infra/v1/nodecluster/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud nodecluster ls
          -
          - -

          Lists all current and recently terminated node clusters. Returns a list of NodeCluster objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/infra/v1/[optional_namespace/]nodecluster/

          - -

          Query Parameters

          - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          uuidFilter by UUID
          stateFilter by state. Possible values: Init, Deploying, Deployed, Partly deployed, Scaling, Terminating, Terminated, Empty cluster
          nameFilter by node cluster name
          regionFilter by resource URI of the target region
          node_typeFilter by resource URI of the target node type
          - -

          Create a new node cluster

          -
          import dockercloud
          -
          -region = dockercloud.Region.fetch("digitalocean/lon1")
          -node_type = dockercloud.NodeType.fetch("digitalocean/1gb")
          -nodecluster = dockercloud.NodeCluster.create(name="my_cluster", node_type=node_type, region=region, disk=60)
          -nodecluster.save()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -nodecluster, err := dockercloud.CreateNodeCluster(dockercloud.NodeCreateRequest{Name: "my_cluster", Region: "/api/infra/v1/region/digitalocean/lon1/", NodeType: "/api/infra/v1/nodetype/digitalocean/1gb/", Target_num_nodes: 2})
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(nodecluster)
          -
          -
          POST /api/infra/v1/nodecluster/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -Content-Type: application/json
          -
          -{"name": "my_cluster", "region": "/api/infra/v1/region/digitalocean/lon1/", "node_type": "/api/infra/v1/nodetype/digitalocean/1gb/", "disk": 60}
          -
          -
          docker-cloud nodecluster create my_cluster digitalocean lon1 1gb
          -
          - -

          Creates a new node cluster without deploying it.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/infra/v1/[optional_namespace/]nodecluster/

          - -

          JSON Parameters

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          name(required) A user provided name for the node cluster
          node_type(required) The resource URI of the node type to be used for the node cluster
          region(required) The resource URI of the region where the node cluster is to be deployed
          disk(optional) The size of the volume to create where images and containers will be stored, in GB (default: 60). Not available for Digital Ocean. To create Softlayer nodes you must select one of the following sizes (in GBs): 10, 20, 25, 30, 40, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400, 500, 750, 1000, 1500 or 2000
          nickname(optional) A user-friendly name for the node cluster (name by default)
          target_num_nodes(optional) The desired number of nodes for the node cluster (default: 1)
          tags(optional) List of tags of the node cluster to be used when deploying services see Tags for more information) (default: [])
          provider_optionsProvider-specific extra options for the deployment of the node (see table Provider options above for more information)
          - -

          Get an existing node cluster

          -
          import dockercloud
          -
          -service = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(nodecluster)
          -
          -
          GET /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud nodecluster inspect 7eaf7fff
          -
          - -

          Get all the details of an specific node cluster

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the node cluster to retrieve
          - -

          Deploy a node cluster

          -
          import dockercloud
          -
          -nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -nodecluster.deploy()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = nodecluster.Deploy(); err != nil {
          -   log.Println(err)
          -}
          -
          -
          POST /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/deploy/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          - -

          Deploys and provisions a recently created node cluster in the specified region and cloud provider.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/deploy/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the node cluster to deploy
          - -

          Update an existing node cluster

          -
          import dockercloud
          -
          -nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -nodecluster.target_num_nodes = 3
          -nodecluster.tags.add("tag-1")
          -nodecluster.save()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = nodecluster.Update(dockercloud.NodeCreateRequest{Target_num_nodes: 4}); err != nil {
          -   log.Println(err)
          -}
          -
          -
          PATCH /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -Content-Type: application/json
          -
          -{"target_num_nodes": 3, "tags": [{"name": "tag-1"}]}
          -
          -
          docker-cloud nodecluster scale 7eaf7fff 3
          -docker-cloud tag add -t tag-1 7eaf7fff
          -docker-cloud tag set -t tag-2 7eaf7fff
          -
          - -

          Updates the node cluster details and applies the changes automatically.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          PATCH /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the node cluster to update
          - -

          JSON Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          target_num_nodes(optional) The number of nodes to scale this node cluster to
          tags(optional) List of tags the node cluster (and nodes within the node cluster) will have. This operation replaces the user tag list.
          - -

          Terminate a node cluster

          -
          import dockercloud
          -
          -nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -nodecluster.delete()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = nodecluster.Terminate(); err != nil {
          -   log.Println(err)
          -}
          -
          -
          DELETE /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          dockercloud nodecluster rm 7eaf7fff
          -
          - -

          Terminates all the nodes in a node cluster and the node cluster itself. This is not reversible.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          DELETE /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the node cluster to terminate
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/nodetype.html b/apidocs/docker-cloud/includes/nodetype.html deleted file mode 100644 index cf4262944a..0000000000 --- a/apidocs/docker-cloud/includes/nodetype.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Node Types

          - -

          Node Type

          - -
          -

          Example

          -
          -
          {
          -    "availability_zones": [],
          -    "available": true,
          -    "label": "1GB",
          -    "name": "1gb",
          -    "provider": "/api/infra/v1/provider/digitalocean/",
          -    "regions": [
          -        "/api/infra/v1/region/digitalocean/ams1/",
          -        "/api/infra/v1/region/digitalocean/sfo1/",
          -        "/api/infra/v1/region/digitalocean/nyc2/",
          -        "/api/infra/v1/region/digitalocean/ams2/",
          -        "/api/infra/v1/region/digitalocean/sgp1/",
          -        "/api/infra/v1/region/digitalocean/lon1/",
          -        "/api/infra/v1/region/digitalocean/nyc3/",
          -        "/api/infra/v1/region/digitalocean/nyc1/"
          -    ],
          -    "resource_uri": "/api/infra/v1/nodetype/digitalocean/1gb/"
          -}
          -
          - -

          A node type is a representation of an instance size supported by a certain cloud provider in a certain region and/or availability zone.

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          resource_uriA unique API endpoint that represents the node type
          nameAn identifier for the node type
          labelA user-friendly name for the node type
          regionsA list of resource URIs of the regions to which this node type can be deployed to
          availability_zonesA list of resource URIs of the availability zones to which this node type can be deployed to
          providerThe resource URI of the provider of the node type
          availableWhether the node type is currently available for new node deployments
          - -

          List all node types

          -
          import dockercloud
          -
          -nodetypes = dockercloud.NodeType.list()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -nodetypeList, err := dockercloud.ListNodeTypes()
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(nodetypeList)
          -
          -
          GET /api/infra/v1/nodetype/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud nodecluster nodetype
          -
          - -

          Lists all node types of all supported cloud providers. Returns a list of NodeType objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/infra/v1/nodetype/

          - -

          Query Parameters

          - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          nameFilter by node type name
          regionsFilter by resource URI of the target regions
          availability_zonesFilter by resource URI of the target availability zones
          - -

          Get an individual node type

          -
          import dockercloud
          -
          -nodetype = dockercloud.NodeType.fetch("digitalocean/1gb")
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -nodetype, err := dockercloud.GetNodeType("digitalocean","1gb")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(nodetype)
          -
          -
          GET /api/infra/v1/nodetype/digitalocean/1gb/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          - -

          Get all the details of a specific node type

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/infra/v1/nodetype/(provider.name)/(name)/

          - -

          Path Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          nameThe name of the node type to retrieve
          provider.nameThe name of the provider of the node type
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/provider.html b/apidocs/docker-cloud/includes/provider.html deleted file mode 100644 index 7b4368095e..0000000000 --- a/apidocs/docker-cloud/includes/provider.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Providers

          - -

          Provider

          - -
          -

          Example

          -
          -
          {
          -    "available": true,
          -    "label": "Digital Ocean",
          -    "name": "digitalocean",
          -    "regions": [
          -        "/api/infra/v1/region/digitalocean/ams1/",
          -        "/api/infra/v1/region/digitalocean/ams2/",
          -        "/api/infra/v1/region/digitalocean/ams3/",
          -        "/api/infra/v1/region/digitalocean/lon1/",
          -        "/api/infra/v1/region/digitalocean/nyc1/",
          -        "/api/infra/v1/region/digitalocean/nyc2/",
          -        "/api/infra/v1/region/digitalocean/nyc3/",
          -        "/api/infra/v1/region/digitalocean/sfo1/",
          -        "/api/infra/v1/region/digitalocean/sgp1/"
          -    ],
          -    "resource_uri": "/api/infra/v1/provider/digitalocean/"
          -}
          -
          - -

          A provider is a representation of a cloud provider supported by Docker Cloud. Providers have one or more regions where nodes are deployed.

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          resource_uriA unique API endpoint that represents the provider
          nameA unique identifier for the provider
          labelA user-friendly name for the provider
          regionsA list of resource URIs of the regions available in this provider
          availableWhether the provider is currently available for new node deployments
          - -

          List all providers

          -
          import dockercloud
          -
          -providers = dockercloud.Provider.list()
          -
          -
          GET /api/infra/v1/provider/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -providerList, err := dockercloud.ListProviders()
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(providerList)
          -
          -
          docker-cloud nodecluster provider
          -
          - -

          Lists all supported cloud providers. Returns a list of Provider objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/infra/v1/provider/

          - -

          Query Parameters

          - - - - - - - - - - - -
          ParameterDescription
          nameFilter by provider name
          - -

          Get an individual provider

          -
          import dockercloud
          -
          -provider = dockercloud.Provider.fetch("digitalocean")
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -provider, err := dockercloud.GetProvider("digitalocean")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(provider)
          -
          -
          GET /api/infra/v1/provider/digitalocean/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          - -

          Get all the details of a specific provider

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/infra/v1/provider/(name)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          nameThe name of the provider to retrieve
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/region.html b/apidocs/docker-cloud/includes/region.html deleted file mode 100644 index b44659201d..0000000000 --- a/apidocs/docker-cloud/includes/region.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Regions

          - -

          Region

          - -
          -

          Example

          -
          -
          {
          -    "availability_zones": [],
          -    "available": true,
          -    "label": "Amsterdam 2",
          -    "name": "ams2",
          -    "node_types": [
          -        "/api/infra/v1/nodetype/digitalocean/1gb/",
          -        "/api/infra/v1/nodetype/digitalocean/2gb/",
          -        "/api/infra/v1/nodetype/digitalocean/4gb/",
          -        "/api/infra/v1/nodetype/digitalocean/8gb/",
          -        "/api/infra/v1/nodetype/digitalocean/16gb/",
          -        "/api/infra/v1/nodetype/digitalocean/32gb/",
          -        "/api/infra/v1/nodetype/digitalocean/48gb/",
          -        "/api/infra/v1/nodetype/digitalocean/64gb/"
          -    ],
          -    "provider": "/api/infra/v1/provider/digitalocean/",
          -    "resource_uri": "/api/infra/v1/region/digitalocean/ams2/"
          -}
          -
          - -

          A region is a representation of an entire or a subset of a data center of a cloud provider. It can contain availability zones (depending on the provider) and one or more node types.

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          resource_uriA unique API endpoint that represents the region
          nameAn identifier for the region
          labelA user-friendly name for the region
          node_typesA list of resource URIs of the node types available in the region
          availability_zonesA list of resource URIs of the availability zones available in the region
          providerThe resource URI of the provider of the region
          availableWhether the region is currently available for new node deployments
          - -

          List all regions

          -
          import dockercloud
          -
          -regions = dockercloud.Region.list()
          -
          -
          GET /api/infra/v1/region/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -regionList, err := dockercloud.ListRegions()
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(regionList)
          -
          -
          docker-cloud nodecluster region
          -
          - -

          Lists all regions of all supported cloud providers. Returns a list of Region objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/infra/v1/region/

          - -

          Query Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          nameFilter by region name
          providerFilter by resource URI of the target provider
          - -

          Get an individual region

          -
          import dockercloud
          -
          -region = dockercloud.Region.fetch("digitalocean/lon1")
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -region, err := dockercloud.GetRegion("digitalocean","lon1")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(region)
          -
          -
          GET /api/infra/v1/region/digitalocean/lon1/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          - -

          Get all the details of a specific region

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/infra/v1/region/(provider.name)/(name)/

          - -

          Path Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          nameThe name of the region to retrieve
          provider.nameThe name of the provider of the region
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/registry.html b/apidocs/docker-cloud/includes/registry.html deleted file mode 100644 index 034f780021..0000000000 --- a/apidocs/docker-cloud/includes/registry.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Registries

          - -

          Registry

          - -
          -

          Example

          -
          -
          {
          -  "host": "registry-1.docker.io",
          -  "is_docker_registry": true,
          -  "is_ssl": true,
          -  "name": "Docker Hub",
          -  "port": 443,
          -  "resource_uri": "/api/repo/v1/user_namespace/registry/registry-1.docker.io/"
          -}
          -
          - -

          Represents a registry where repositories are hosted.

          - -

          This is a namespaced endpoint.

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          resource_uriA unique API endpoint that represents the registry
          nameHuman-readable name of the registry
          hostFQDN of the registry, i.e. registry-1.docker.io
          is_docker_registryWhether this registry is run by Docker
          is_sslWhether this registry has SSL activated or not
          portThe port number where the registry is listening to
          - -

          List all registries

          -
          GET /api/repo/v1/registry/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          - -

          Lists all current registries. Returns a list of Registry objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/repo/v1/[optional_namespace/]registry/

          - -

          Query Parameters

          - - - - - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          uuidFilter by UUID
          nameFilter by registry name
          hostFilter by registry host
          is_docker_registryFilter by whether the registry is run by Docker or not. Possible values: ‘true’ or 'false’
          - -

          Get an existing registry

          -
          GET /api/repo/v1/registry/registry-1.docker.io/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          - -

          Gets all the details of an specific registry

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/v1/[optional_namespace/]registry/(host)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          hostThe host of the registry to retrieve
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/repository.html b/apidocs/docker-cloud/includes/repository.html deleted file mode 100644 index d4af17c206..0000000000 --- a/apidocs/docker-cloud/includes/repository.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          External Repositories

          - -

          External Repository

          - -
          -

          Example

          -
          -
          {
          -  "in_use": false,
          -  "name": "my.registry.com/myrepo",
          -  "registry": "/api/repo/v1/user_namespace/registry/my.registry.com/",
          -  "resource_uri": "/api/repo/v1/user_namespace/repository/my.registry.com/myrepo/",
          -}
          -
          - -

          The repository endpoint is used to add and remove existing repositories on third party registries to be used in deployments and builds.

          - -

          This is a namespaced endpoint.

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          resource_uriA unique API endpoint that represents the repository
          nameName of the repository, i.e. my.registry.com/myrepo
          in_useIf the image is being used by any of your services
          registryResource URI of the registry where this image is hosted
          - -

          List all external repositories

          -
          import dockercloud
          -
          -repositories = dockercloud.Repository.list()
          -
          -
          GET /api/repo/v1/repository/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -repositoriesList, err := dockercloud.ListRepositories()
          -
          -if err != nil {
          -    log.Println(err)
          -}
          -
          -log.Pringln(repositoriesList)
          -
          -
          docker-cloud repository ls
          -
          - -

          Lists all added repositories from third party registries. Returns a list of Repository objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/repo/v1/[optional_namespace/]repository/

          - -

          Query Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          nameFilter by image name
          registryFilter by resource URI of the target repository registry
          - -

          Add a new external repository

          -
          import dockercloud
          -
          -repository = dockercloud.Repository.create(name="registry.local/user1/image1", username=username, password=password)
          -repository.save()
          -
          -
          POST /api/repo/v1/repository/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -Content-Type: application/json
          -
          -{"name": "registry.local/user1/image1", "username": "username", "password": "password"}
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -image, err := dockercloud.CreateImage(dockercloud.ImageCreateRequest{
          -  Name: "registry.local/user1/image1",
          -  Username: "username",
          -  Password: "password"
          -})
          -
          -
          docker-cloud repository register -u username -p password registry.local/user1/image1
          -
          - -

          Adds an existing repository on a third party registry.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/repo/v1/[optional_namespace/]repository/

          - -

          JSON Parameters

          - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          nameName of the repository, i.e. ‘my.registry.com/myrepo’
          usernameUsername to authenticate with the third party registry
          passwordPassword to authenticate with the third party registry
          - -

          Get an external repository details

          -
          import dockercloud
          -
          -repository = dockercloud.Repository.fetch("registry.local/user1/image1")
          -
          -
          GET /api/repo/v1/repository/registry.local/user1/image1/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -repository, err = dockercloud.GetRepository("registry.local/user1/image1")
          -
          -if err != nil {
          -    log.Println(err)
          -}
          -
          -log.Println(repository)
          -
          -
          docker-cloud repository inspect registry.local/user1/image1
          -
          - -

          Gets all the details of an specific repository

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/repo/v1/[optional_namespace/]repository/(name)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          nameThe name of the repository to retrieve
          - -

          Update credentials of an external repository

          -
          import dockercloud
          -
          -repository = dockercloud.Repository.fetch("registry.local/user1/image1")
          -repository.username = "new username"
          -repository.password = "new password"
          -repository.save()
          -
          -
          PATCH /api/repo/v1/repository/registry.local/user1/image1/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -Content-Type: application/json
          -
          -{"username": "username", "password": "password"}
          -
          -
          docker-cloud repository update -n "new username" -p "new password" registry.local/user1/image1
          -
          - -

          Updates the external repository credentials.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          PATCH /api/repo/v1/[optional_namespace/]repository/(name)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          nameThe name of the repository to update
          - -

          JSON Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          usernameUsername to authenticate with the private registry
          passwordPassword to authenticate with the private registry
          - -

          Remove an external repository

          -
          import dockercloud
          -
          -repository = dockercloud.Repository.fetch("registry.local/user1/image1")
          -repository.delete()
          -
          -
          DELETE /api/repo/v1/repository/registry.local/user1/image1/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -repository, err = dockercloud.GetRepository("registry.local/user1/image1")
          -
          -if err != nil {
          -    log.Println(err)
          -}
          -
          -repository.Remove()
          -
          -
          docker-cloud repository rm registry.local/user1/image1
          -
          - -

          Removes the external repository from Docker Cloud. It won’t remove the repository from the third party registry where it’s stored.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          DELETE /api/repo/v1/[optional_namespace/]repository/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          nameThe name of the external repository to remove
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/service.html b/apidocs/docker-cloud/includes/service.html deleted file mode 100644 index e6c0007ce7..0000000000 --- a/apidocs/docker-cloud/includes/service.html +++ /dev/null @@ -1,1472 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Services

          - -

          Service

          - -
          -

          Example

          -
          -
          {
          -  "autodestroy": "OFF",
          -  "autoredeploy": false,
          -  "autorestart": "ON_FAILURE",
          -  "bindings": [
          -    {
          -        "host_path": null,
          -        "container_path": "/tmp",
          -        "rewritable": true,
          -        "volumes_from": null
          -    },
          -    {
          -        "host_path": "/etc",
          -        "container_path": "/etc",
          -        "rewritable": true,
          -        "volumes_from": null
          -    },
          -    {
          -        "host_path": null,
          -        "container_path": null,
          -        "rewritable": true,
          -        "volumes_from": "/api/app/v1/user_namespace/service/2f4f54e5-9d3b-4ac1-85ad-a2d4ff25a179/"
          -    }
          -  ],
          -  "cap_add": [
          -    "ALL"
          -  ],
          -  "cap_drop": [
          -    "NET_ADMIN",
          -    "SYS_ADMIN"
          -  ],
          -  "container_envvars": [
          -    {
          -      "key": "DB_PASS",
          -      "value": "test"
          -    }
          -  ],
          -  "container_ports": [
          -    {
          -      "endpoint_uri": "http://wordpress-stackable.admin.srv.dockerapp.io:80/",
          -      "inner_port": 80,
          -      "outer_port": 80,
          -      "port_name": "http",
          -      "protocol": "tcp",
          -      "published": true
          -    }
          -  ],
          -  "containers": [
          -    "/api/app/v1/user_namespace/container/6f8ee454-9dc3-4387-80c3-57aac1be3cc6/",
          -    "/api/app/v1/user_namespace/container/fdf9c116-7c08-4a60-b0ce-c54ca72c2f25/"
          -  ],
          -  "cpu_shares": 100,
          -  "cpuset": "0,1",
          -  "cgroup_parent": "m-executor-abcd",
          -  "current_num_containers": 2,
          -  "deployed_datetime": "Mon, 13 Oct 2014 11:01:43 +0000",
          -  "deployment_strategy": "EMPTIEST_NODE",
          -  "destroyed_datetime": null,
          -  "devices": [
          -    "/dev/ttyUSB0:/dev/ttyUSB0"
          -  ],
          -  "dns": [
          -    "8.8.8.8"
          -  ],
          -  "dns_search": [
          -    "example.com"
          -  ],
          -  "domainname": "domainname",
          -  "entrypoint": "",
          -  "extra_hosts": [
          -    "onehost:50.31.209.229"
          -  ],
          -  "hostname": "hostname",
          -  "image_name": "tutum/wordpress-stackable:latest",
          -  "nickname": "wordpress-stackable",
          -  "labels": {
          -    "com.example.description": "Accounting webapp",
          -    "com.example.department": "Finance",
          -    "com.example.label-with-empty-value": ""
          -  },
          -  "link_variables": {
          -    "WORDPRESS_STACKABLE_1_ENV_DB_HOST": "**LinkMe**",
          -    "WORDPRESS_STACKABLE_1_ENV_DB_NAME": "wordpress",
          -    "WORDPRESS_STACKABLE_1_ENV_DB_PASS": "szVaPz925B7I",
          -    "WORDPRESS_STACKABLE_1_ENV_DB_PORT": "**LinkMe**",
          -    "WORDPRESS_STACKABLE_1_ENV_DB_USER": "admin",
          -    "WORDPRESS_STACKABLE_1_ENV_DEBIAN_FRONTEND": "noninteractive",
          -    "WORDPRESS_STACKABLE_1_ENV_HOME": "/",
          -    "WORDPRESS_STACKABLE_1_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
          -    "WORDPRESS_STACKABLE_1_PORT": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153",
          -    "WORDPRESS_STACKABLE_1_PORT_80_TCP": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153",
          -    "WORDPRESS_STACKABLE_1_PORT_80_TCP_ADDR": "wordpress-stackable-1.admin.cont.dockerapp.io",
          -    "WORDPRESS_STACKABLE_1_PORT_80_TCP_PORT": "49153",
          -    "WORDPRESS_STACKABLE_1_PORT_80_TCP_PROTO": "tcp",
          -    "WORDPRESS_STACKABLE_2_ENV_DB_HOST": "**LinkMe**",
          -    "WORDPRESS_STACKABLE_2_ENV_DB_NAME": "wordpress",
          -    "WORDPRESS_STACKABLE_2_ENV_DB_PASS": "szVaPz925B7I",
          -    "WORDPRESS_STACKABLE_2_ENV_DB_PORT": "**LinkMe**",
          -    "WORDPRESS_STACKABLE_2_ENV_DB_USER": "admin",
          -    "WORDPRESS_STACKABLE_2_ENV_DEBIAN_FRONTEND": "noninteractive",
          -    "WORDPRESS_STACKABLE_2_ENV_HOME": "/",
          -    "WORDPRESS_STACKABLE_2_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
          -    "WORDPRESS_STACKABLE_2_PORT": "tcp://wordpress-stackable-2.admin.cont.dockerapp.io:49154",
          -    "WORDPRESS_STACKABLE_2_PORT_80_TCP": "tcp://wordpress-stackable-2.admin.cont.dockerapp.io:49154",
          -    "WORDPRESS_STACKABLE_2_PORT_80_TCP_ADDR": "wordpress-stackable-2.admin.cont.dockerapp.io",
          -    "WORDPRESS_STACKABLE_2_PORT_80_TCP_PORT": "49154",
          -    "WORDPRESS_STACKABLE_2_PORT_80_TCP_PROTO": "tcp",
          -    "WORDPRESS_STACKABLE_ENV_DB_HOST": "**LinkMe**",
          -    "WORDPRESS_STACKABLE_ENV_DB_NAME": "wordpress",
          -    "WORDPRESS_STACKABLE_ENV_DB_PASS": "szVaPz925B7I",
          -    "WORDPRESS_STACKABLE_ENV_DB_PORT": "**LinkMe**",
          -    "WORDPRESS_STACKABLE_ENV_DB_USER": "admin",
          -    "WORDPRESS_STACKABLE_ENV_DEBIAN_FRONTEND": "noninteractive",
          -    "WORDPRESS_STACKABLE_ENV_HOME": "/",
          -    "WORDPRESS_STACKABLE_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
          -    "WORDPRESS_STACKABLE_PORT": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153",
          -    "WORDPRESS_STACKABLE_PORT_80_TCP": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153",
          -    "WORDPRESS_STACKABLE_PORT_80_TCP_ADDR": "wordpress-stackable-1.admin.cont.dockerapp.io",
          -    "WORDPRESS_STACKABLE_PORT_80_TCP_PORT": "49153",
          -    "WORDPRESS_STACKABLE_PORT_80_TCP_PROTO": "tcp",
          -    "WORDPRESS_STACKABLE_DOCKERCLOUD_API_URL": "https://cloud.docker.com/api/app/v1/user_namespace/service/adeebc1b-1b81-4af0-b8f2-cefffc69d7fb/"
          -  },
          -  "linked_from_service": [],
          -  "linked_to_service": [
          -    {
          -      "from_service": "/api/app/v1/user_namespace/service/09cbcf8d-a727-40d9-b420-c8e18b7fa55b/",
          -      "name": "DB",
          -      "to_service": "/api/app/v1/user_namespace/service/72f175bd-390b-46e3-9463-830aca32ce3e/"
          -    }
          -  ],
          -  "mac_address": "02:42:ac:11:65:43",
          -  "memory": 2048,
          -  "memory_swap": 8192,
          -  "name": "wordpress-stackable",
          -  "net": "bridge",
          -  "privileged": false,
          -  "public_dns": "wordpress-stackable.admin.svc.dockerapp.io",
          -  "read_only": true,
          -  "resource_uri": "/api/app/v1/user_namespace/service/09cbcf8d-a727-40d9-b420-c8e18b7fa55b/",
          -  "roles": ["global"],
          -  "run_command": "/run-wordpress.sh",
          -  "running_num_containers": 1,
          -  "security_opt": [
          -  ],
          -  "sequential_deployment": false,
          -  "started_datetime": "Mon, 13 Oct 2014 11:01:43 +0000",
          -  "state": "Partly running",
          -  "stack": "/api/app/v1/user_namespace/stack/46aca402-2109-4a70-a378-760cfed43816/",
          -  "stdin_open": false,
          -  "stopped_datetime": null,
          -  "stopped_num_containers": 0,
          -  "synchronized": true,
          -  "tags": [
          -        {"name": "tag_one"},
          -        {"name": "tag-two"},
          -        {"name": "tagthree3"}
          -  ],
          -  "target_num_containers": 2,
          -  "tty": false,
          -  "user": "root",
          -  "uuid": "09cbcf8d-a727-40d9-b420-c8e18b7fa55b",
          -  "working_dir": "/app"
          -}
          -
          - -

          A service is a template used to deploy one or more containers.

          - -

          This is a namespaced endpoint.

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          uuidA unique identifier for the service generated automatically on creation
          resource_uriA unique API endpoint that represents the service
          image_nameThe Docker image name and tag used for the service containers
          nameA user provided name for the service. This name will be inherited by the service containers and will be used in endpoint URLs, environment variable names, etc.
          public_dnsAn external FQDN that resolves to all IPs of the nodes where the service containers are running on (as an A record with multiple IP entries which will be used by clients in a round-robin fashion). If the service is not publishing any ports, this FQDN will fail to resolve.
          stateThe state of the service (see table Service states below)
          netNetwork mode to set on the containers (see table Network Modes below, more information /docker-cloud/apps/service-links/)
          pidSet the PID (Process) Namespace mode for the containers (more information)
          synchronizedFlag indicating if the current service definition is synchronized with the current containers.
          deployed_datetimeThe date and time of the last deployment of the service (if applicable, null otherwise)
          started_datetimeThe date and time of the last start operation on the service (if applicable, null otherwise)
          stopped_datetimeThe date and time of the last stop operation on the service (if applicable, null otherwise)
          destroyed_datetimeThe date and time of the terminate operation on the service (if applicable, null otherwise)
          target_num_containersThe requested number of containers to deploy for the service
          current_num_containersThe actual number of containers deployed for the service
          running_num_containersThe actual number of containers deployed for the service in Running state
          stopped_num_containersThe actual number of containers deployed for the service in Stopped state
          stackResource URIs of the stack that the service belongs to
          containersList of resource URIs of the containers launched as part of the service
          container_portsList of ports to be published on the containers of this service (see table Service Port attributes below)
          container_envvarsList of user-defined environment variables to set on the containers of the service, which will override the image environment variables (see table Service Environment Variable attributes below)
          labelsMetadata in form of dictionary used for every container of this service
          working_dirWorking directory for running binaries within a container of this service
          userSet the user used on containers of this service (root by default)
          hostnameSet the hostname used on containers of this service
          domainnameSet the domainname used on containers of this service
          mac_addressEthernet device’s MAC address used on containers of this service
          cgroup_nameOptional parent cgroup used on containers of this service.
          ttyIf the containers of this service have the tty enable (false by default)
          stdin_openIf the containers of this service have stdin opened (false by default)
          dnsCustom DNS servers for containers of this service
          dns_searchCustom DNS search domain for containers of this service
          cap_addAdded capabilities for containers of this service
          cap_dropDropped capabilities for containers of this service
          devicesList of device mappings for containers of this service
          extra_hostsList of hostname mappings for containers of this service
          secuirty_optLabeling scheme for containers of this service
          entrypointEntrypoint to be set on the containers launched as part of the service, which will override the image entrypoint
          run_commandRun command to be set on the containers launched as part of the service, which will override the image run command
          sequential_deploymentWhether the containers for this service should be deployed in sequence, linking each of them to the previous containers (see Service scaling for more information)
          cpu_sharesThe relative CPU priority of the containers of the service (see Runtime Constraints on CPU and Memory for more information)
          cpusetCPUs in which to allow execution
          memoryThe memory limit of the containers of the service in MB (see Runtime Constraints on CPU and Memory for more information)
          memory_swapTotal memory limit (memory + swap) of the containers of the service in MB
          linked_from_serviceA list of services that are linked to this one (see table Related services attributes below)
          linked_to_serviceA list of services that the service is linked to (see table Related services attributes below)
          bindingsA list of volume bindings that the service has mounted (see table Service binding attributes below)
          autorestartWhether to restart the containers of the service automatically if they stop (see Crash recovery for more information)
          autodestroyWhether to terminate the containers of the service automatically if they stop (see Autodestroy for more information)
          rolesList of Docker Cloud roles assigned to this service (see Service links for more information)
          link_variablesList of environment variables that would be exposed in the containers if they are linked to this service
          privilegedWhether to start the containers with Docker’s privileged flag set or not, which allows containers to access all devices on the host among other things (see Runtime privilege for more information)
          read_onlyWhether the filesystem of every service container is read-only or not (false by default)
          deployment_strategyContainer distribution among nodes (see table Deployment strategies below and Deployment strategies for more information)
          tagsList of tags to be used to deploy the service (see Tags for more information)
          autoredeployWhether to redeploy the containers of the service when its image is updated in Docker Cloud registry (see Docker Cloud’s private registry for more information)
          nicknameA user-friendly name for the service (name by default)
          - -

          Service binding attributes

          - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          host_pathThe host path of the volume
          container_pathThe container path where the volume is mounted
          rewritabletrue is the volume has writable permissions
          volumes_fromThe resource URI of the service
          - -

          Service Port attributes

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          protocolThe protocol of the port, either tcp or udp
          inner_portThe published port number inside the container
          outer_portThe published port number in the node public network interface
          port_nameName of the service associated to this port
          endpoint_uriThe URI of the service endpoint for this port
          publishedWhether the port has been published in the host public network interface or not. Non-published ports can only be accessed via links.
          - -

          Service Environment Variable attributes

          - - - - - - - - - - - - - - - -
          AttributeDescription
          keyThe name of the environment variable
          valueThe value of the environment variable
          - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          nameThe link name
          from_serviceThe resource URI of the origin of the link
          to_serviceThe resource URI of the target of the link
          - -

          Service states

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          StateDescription
          Not runningThe service has been created and has no deployed containers yet. Possible actions in this state: start, terminate.
          StartingAll containers for the service are either starting or already running. No actions allowed in this state.
          RunningAll containers for the service are deployed and running. Possible actions in this state: stop, redeploy, terminate.
          Partly runningOne or more containers of the service are deployed and running. Possible actions in this state: stop, redeploy, terminate.
          ScalingThe service is either deploying new containers or destroying existing ones responding to a scaling request. No actions allowed in this state.
          RedeployingThe service is redeploying all its containers with the updated configuration. No actions allowed in this state.
          StoppingAll containers for the service are either stopping or already stopped. No actions allowed in this state.
          StoppedAll containers for the service are stopped. Possible actions in this state: start, redeploy, terminate.
          TerminatingAll containers for the service are either being terminated or already terminated. No actions allowed in this state.
          TerminatedThe service and all its containers have been terminated. No actions allowed in this state.
          - -

          Deployment strategies

          - - - - - - - - - - - - - - - - - - - -
          StrategyDescription
          EMPTIEST_NODEIt will deploy containers to the node with the lower total amount of running containers (default).
          HIGH_AVAILABILITYIt will deploy containers to the node with the lower amount of running containers of the same service.
          EVERY_NODEIt will deploy one container on every node. The service won’t be able to scale manually. New containers will be deployed to new nodes automatically.
          - -

          Network Modes

          - - - - - - - - - - - - - - - -
          StrategyDescription
          bridgeCreates a new network stack for the container on the docker bridge.
          hostUses the host network stack inside the container.
          - -

          List all services

          -
          import dockercloud
          -
          -services = dockercloud.Service.list()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -serviceList, err := dockercloud.ListServices()
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(serviceList)
          -
          -
          GET /api/app/v1/service/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud service ps
          -
          - -

          Lists all current and recently terminated services. Returns a list of Service objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/app/v1/[optional_namespace/]service/

          - -

          Query Parameters

          - - - - - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          uuidFilter by UUID
          stateFilter by state. Possible values: Not running, Starting, Running, Partly running, Scaling, Redeploying, Stopping, Stopped, Terminating, Terminated
          nameFilter by service name
          stackFilter by resource URI of the target stack.
          - -

          Create a new service

          -
          import dockercloud
          -
          -service = dockercloud.Service.create(image="tutum/hello-world", name="my-new-app", target_num_containers=2)
          -service.save()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -service, err := dockercloud.CreateService(dockercloud.ServiceCreateRequest{Image: "tutum/hello-world",  Name: "my-new-app", Target_num_containers: 2})
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(service)
          -
          -
          POST /api/app/v1/service/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -Content-Type: application/json
          -
          -{"image": "tutum/hello-world", "name": "my-new-app", "target_num_containers": 2}
          -
          -
          docker-cloud service create -t 2 --name my-new-app tutum/hello-world
          -
          - -

          Creates a new service without starting it.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]service/

          - -

          JSON Parameters

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          image(required) The image used to deploy this service in docker format, i.e. tutum/hello-world
          name(optional) A human-readable name for the service, i.e. my-hello-world-app (default: image without namespace)
          target_num_containers(optional) The number of containers to run for this service initially (default: 1)
          run_command(optional) The command used to start the containers of this service, overriding the value specified in the image, i.e. /run.sh (default: null)
          entrypoint(optional) The command prefix used to start the containers of this service, overriding the value specified in the image, i.e. /usr/sbin/sshd (default: null)
          container_ports(optional) An array of objects with port information to be published in the containers for this service, which will be added to the image port information, i.e. [{"protocol": "tcp", "inner_port": 80, "outer_port": 80}] (default: []) (See table Service Port attributes below)
          container_envvars(optional) An array of objects with environment variables to be added in the service containers on launch (overriding any image-defined environment variables), i.e. [{"key": "DB_PASSWORD", "value": "mypass"}] (default: []) (See table Service Environment Variable attributes below)
          linked_to_service(optional) An array of service resource URIs to link this service to, including the link name, i.e. [{"to_service": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "name": "db"}] (default: []) (See table Related services attributes below)
          bindings(optional) An array of bindings this service has to mount, i.e. [{"volumes_from": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "rewritable": true}] (default: []) (See table Related bindings attributes below)
          autorestart(optional) Whether the containers for this service should be restarted if they stop, i.e. ALWAYS (default: OFF, possible values: OFF, ON_FAILURE, ALWAYS) (see Crash recovery for more information)
          autodestroy(optional) Whether the containers should be terminated if they stop, i.e. OFF (default: OFF, possible values: OFF, ON_SUCCESS, ALWAYS) (see Autodestroy for more information)
          sequential_deployment(optional) Whether the containers should be launched and scaled in sequence, i.e. true (default: false) (see Service scaling for more information)
          roles(optional) A list of Docker Cloud API roles to grant the service, i.e. ["global"] (default: [], possible values: global) (see Service links for more information)
          privileged(optional) Whether to start the containers with Docker’s privileged flag set or not, i.e. false (default: false) (see Runtime privilege for more information)
          deployment_strategy(optional) Container distribution among nodes (default: EMPTIEST_NODE, see table Deployment strategies above and Deployment strategies for more information)
          tags(optional) A list of tags to be used to deploy the service (see Tags for more information) (default: [])
          autoredeploy(optional) Whether to redeploy the containers of the service when its image is updated in Docker Cloud registry (default: false) (see Docker Cloud’s private registry for more information)
          net(optional) Set the network mode to the containers (default: bridge, possible values: bridge, host)
          pid(optional) Set the PID (Process) Namespace mode for the containers (default: none value, possible values: none, host)
          working_dir(optional) Working directory for running binaries within a container of this service (default: /)
          nickname(optional) A user-friendly name for the service (name by default)
          - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          host_path(optional) The host path of the volume
          container_path(required if volumes_from is omitted) The container path where the volume is mounted
          rewritable(optional) true is the volume has writable permissions (default: true)
          volumes_from(required if container_path is omitted) The resource URI of the service
          - -

          Service Port attributes

          - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          protocol(required) The protocol of the port, either tcp or udp
          inner_port(required) The port number inside the container to be published
          outer_port(optional) The port number in the node public network interface to be published (default: dynamic allocation if published is true)
          published(optional) Whether to publish the port in the host public network interface or not. Non-published ports can only be accessed via links. (default: false)
          - -

          Service Environment Variable attributes

          - - - - - - - - - - - - - - - -
          AttributeDescription
          key(required) The name of the environment variable
          value(required) The value of the environment variable
          - - - - - - - - - - - - - - - - - -
          AttributeDescription
          to_service(required) The resource URI of the target of the link
          name(optional) The link name
          - -

          Get an existing service

          -
          import dockercloud
          -
          -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(service)
          -
          -
          GET /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud service inspect 7eaf7fff
          -
          - -

          Get all the details of an specific service

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/app/v1/[optional_namespace/]service/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the service to retrieve
          - -

          Get the logs of a service

          - -
          -

          Example log line

          -
          -
          {
          -    "type": "log",
          -    "source": "wordpress-stackable-1",
          -    "log": "Log line from the container indicated by 'source'",
          -    "streamType": "stdout",
          -    "timestamp": 1433779324
          -}
          -
          -
          import dockercloud
          -
          -def log_handler(message):
          -    print message
          -
          -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -service.logs(tail=300, follow=True, log_handler=log_handler)
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -c := make(chan Logs)
          -
          -go service.Logs(c)
          -    for {
          -        s := <-c
          -        log.Println(s)
          -    }
          -
          -
          GET /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1
          -Host: ws.cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Connection: Upgrade
          -Upgrade: websocket
          -
          -
          docker-cloud service logs 7eaf7fff
          -
          - -

          Get the aggregated logs of all the containers of the service.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s STREAM API

          - -

          HTTP Request

          - -

          GET /api/app/v1/[optional_namespace/]service/(uuid)/logs/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the service to retrieve logs
          - -

          Query Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          tailNumber of lines to show from the end of the logs (default: 300)
          followWhether to stream logs or close the connection immediately (default: true)
          - -

          Update an existing service

          -
          import dockercloud
          -
          -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -service.target_num_containers = 3
          -service.tags.append({"name":"tag-1"})
          -service.save()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = service.Update(dockercloud.ServiceCreateRequest{Target_num_containers: 3}); err != nil {
          -   log.Println(err)
          -}
          -
          -
          PATCH /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -Content-Type: application/json
          -
          -{"autorestart": "ON_FAILURE", "autodestroy": "OFF", "container_envvars": [{"key": "DB_PASSWORD", "value": "mypass"}],
          -"container_ports": [{"protocol": "tcp", "inner_port": 80, "outer_port": 80}], "cpu_shares": 512,
          -"entrypoint": "/usr/sbin/sshd", "image": "tutum/hello-world",
          -"linked_to_service": [{"to_service": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "name": "db"}],
          -"memory": 2048, "privileged": True, "roles": ["global"], "run_command": "/run.sh", "sequential_deployment": False,
          -"tags": [{"name": "tag-1"}], "target_num_containers": 3, "autoredeploy": False}
          -
          -
          -
          docker-cloud service scale 7eaf7fff 3
          -docker-cloud tag add -t tag-1 7eaf7fff
          -docker-cloud tag set -t tag-2 7eaf7fff
          -
          - -

          Updates the service details.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          PATCH /api/app/v1/[optional_namespace/]service/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the service to update
          - -

          JSON Parameters

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          autorestart(optional) Whether the containers for this service should be restarted if they stop, i.e. ALWAYS (possible values: OFF, ON_FAILURE, ALWAYS) (see Crash recovery for more information)
          autodestroy(optional) Whether the containers should be terminated if they stop, i.e. OFF (possible values: OFF, ON_SUCCESS, ALWAYS) (see Autodestroy for more information)
          container_envvars(optional) An array of objects with environment variables to be added in the service containers on launch (overriding any image-defined environment variables), i.e. [{"key": "DB_PASSWORD", "value": "mypass"}] (See table Service Environment Variable attributes)
          container_ports(optional) An array of objects with port information to be published in the containers for this service, which will be added to the image port information, i.e. [{"protocol": "tcp", "inner_port": 80, "outer_port": 80}] (See table Service Port attributes)
          cpu_shares(optional) The relative CPU priority of the containers the service describes (see Runtime Constraints on CPU and Memory for more information)
          entrypoint(optional) The command prefix used to start the containers of this service, overriding the value specified in the image, i.e. /usr/sbin/sshd
          image(optional) The image used to deploy this service in docker format, i.e. tutum/hello-world, tutum/ubuntu:5.6. If no tag is indicated, it will be set to latest by default
          linked_to_service(optional) An array of service resource URIs to link this service to, including the link name, i.e. [{"to_service": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "name": "db"}] (See table Related services attributes below)
          memory(optional) The memory limit of the containers of the service in MB (see Runtime Constraints on CPU and Memory for more information)
          privileged(optional) Whether to start the containers with Docker’s privileged flag set or not, i.e. false (see Runtime privilege for more information)
          roles(optional) A list of Docker Cloud API roles to grant the service, i.e. ["global"] (possible values: global) (see Service links for more information)
          run_command(optional) The command used to start the containers of this service, overriding the value specified in the image, i.e. /run.sh
          sequential_deployment(optional) Whether the containers should be launched and scaled in sequence, i.e. true (see Service scaling for more information)
          tags(optional) List of new tags the service will have. This operation replaces the tag list
          target_num_containers(optional) The number of containers to scale this service to
          deployment_strategy(optional) Container distribution among nodes. A service cannot be updated to or from a deployment strategy of EVERY_NODE. (See table Deployment strategies above and Deployment strategies for more information)
          autoredeployWhether to redeploy the containers of the service when its image is updated in Docker Cloud registry (see Docker Cloud’s private registry for more information)
          net(optional) Set the network mode to the containers (default: bridge, possible values: bridge, host)
          pid(optional) Set the PID (Process) Namespace mode for the containers (default: none value, possible values: none, host)
          working_dir(optional) Working directory for running binaries within a container of this service (default: /)
          nickname(optional) A user-friendly name for the service (name by default)
          - -

          Start a service

          -
          import dockercloud
          -
          -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -service.start()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = service.Start(); err != nil {
          -   log.Println(err)
          -}
          -
          -
          POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud service start 7eaf7fff
          -
          - -

          Starts all containers in a stopped or partly running service.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]service/(uuid)/start/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the service to start
          - -

          Stop a service

          -
          import dockercloud
          -
          -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -service.stop()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = service.Stop(); err != nil {
          -   log.Println(err)
          -}
          -
          -
          POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/stop/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud service stop 7eaf7fff
          -
          - -

          Stops all containers in a running or partly running service.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]service/(uuid)/stop/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the service to stop
          - -

          Scale a service

          -
          import dockercloud
          -
          -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -service.target_num_containers = 3
          -service.save()
          -service.scale()
          -
          -
          POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/scale/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud service scale 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce 3
          -
          - -

          Scales the service to its current target_num_containers field.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]service/(uuid)/scale/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the service to scale
          - -

          Redeploy a service

          -
          import dockercloud
          -
          -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -service.redeploy()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: true}) to reuse the existing volumes
          -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}) to not reuse the existing volumes
          -if err = service.Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}); err != nil {
          -   log.Println(err)
          -}
          -
          -
          POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/redeploy/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud service redeploy 7eaf7fff
          -
          - -

          Redeploys all containers in the service with the current service configuration.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]service/(uuid)/redeploy/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the service to redeploy
          - -

          Query Parameters

          - - - - - - - - - - - -
          ParameterDescription
          reuse_volumesWheather to reuse container volumes for this redeploy operation or not (default: true).
          - -

          Terminate a service

          -
          import dockercloud
          -
          -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -service.delete()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = service.Terminate(); err != nil {
          -   log.Println(err)
          -}
          -
          -
          DELETE /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud service terminate 7eaf7fff
          -
          - -

          Terminate all the containers in a service and the service itself. This is not reversible. All the data stored in all containers of the service will be permanently deleted.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          DELETE /api/app/v1/[optional_namespace/]service/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the service to terminate
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/stack.html b/apidocs/docker-cloud/includes/stack.html deleted file mode 100644 index a7e4b3b3ac..0000000000 --- a/apidocs/docker-cloud/includes/stack.html +++ /dev/null @@ -1,688 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Stacks

          - -

          Stack

          - -
          -

          Example

          -
          -
          {
          -  "deployed_datetime": "Mon, 13 Oct 2014 11:01:43 +0000",
          -  "destroyed_datetime": null,
          -  "nickname": "deployment stack",
          -  "name": "dockercloud-app",
          -  "resource_uri": "/api/app/v1/user_namespace/stack/7fe7ec85-58be-4904-81da-de2219098d7c/",
          -  "services": [
          -    "/api/app/v1/user_namespace/service/09cbcf8d-a727-40d9-b420-c8e18b7fa55b/"
          -  ],
          -  "state": "Running",
          -  "synchronized": true,
          -  "uuid": "09cbcf8d-a727-40d9-b420-c8e18b7fa55b"
          -}
          -
          - -

          A stack is a logical grouping of closely related services, that may be linked with one another.

          - -

          This is a namespaced endpoint.

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          uuidA unique identifier for the stack generated automatically on creation
          resource_uriA unique API endpoint that represents the stack
          nameA user provided name for the stack.
          stateThe state of the stack (see table Stack states below)
          synchronizedFlag indicating if the current stack definition is synchronized with their services.
          servicesList of service resource URIs belonging to the stack
          deployed_datetimeThe date and time of the last deployment of the stack (if applicable, null otherwise)
          destroyed_datetimeThe date and time of the terminate operation on the stack (if applicable, null otherwise)
          nicknameA user-friendly name for the stack (name by default)
          - -

          Stack states

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          StateDescription
          Not RunningThe stack has been created and has no deployed services yet. Possible actions in this state: start, terminate.
          StartingAll services for the stack are either starting or already running. No actions allowed in this state.
          RunningAll services for the service are deployed and running. Possible actions in this state: redeploy, terminate.
          Partly runningOne or more services of the stack are deployed and running. Possible actions in this state: redeploy, terminate.
          StoppingAll services for the stack are either stopping or already stopped. No actions allowed in this state.
          StoppedAll services for the service are stopped. Possible actions in this state: start, redeploy, terminate.
          RedeployingThe stack is redeploying all its services with the updated configuration. No actions allowed in this state.
          TerminatingAll services for the stack are either being terminated or already terminated. No actions allowed in this state.
          TerminatedThe stack and all its services have been terminated. No actions allowed in this state.
          - -

          List all stacks

          -
          import dockercloud
          -
          -stacks = dockercloud.Stack.list()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -stackList, err := dockercloud.ListStacks()
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(stackList)
          -
          -
          GET /api/app/v1/stack/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud stack ls
          -
          - -

          Lists all current and recently terminated stacks. Returns a list of Stack objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/app/v1/[optional_namespace/]stack/

          - -

          Query Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          uuidFilter by UUID
          nameFilter by stack name
          - -

          Create a new stack

          -
          import dockercloud
          -
          -stack = dockercloud.Stack.create(name="my-new-stack", services=[{"name": "hello-word", "image": "tutum/hello-world", "target_num_containers": 2}])
          -stack.save()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -stack, err := dockercloud.CreateStack(dockercloud.StackCreateRequest{Name: "my-new-stack", Services: []dockercloud.ServiceCreateRequest{{Image: "tutum/hello-world", Name: "test", Target_num_containers: 2}}})
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(stack)
          -
          -
          POST /api/app/v1/stack/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -Content-Type: application/json
          -
          -{
          -    "name": "my-new-stack",
          -    "services": [
          -        {
          -            "name": "hello-word",
          -            "image": "tutum/hello-world",
          -            "target_num_containers": 2,
          -            "linked_to_service": [
          -                {
          -                    "to_service": "database",
          -                    "name": "DB"
          -                }
          -            ]
          -        },
          -        {
          -            "name": "database",
          -            "image": "tutum/mysql"
          -        }
          -    ]
          -}
          -
          -
          docker-cloud stack create --name hello-world -f docker-compose.yml
          -
          - -

          Creates a new stack without starting it. Note that the JSON syntax is abstracted by both, the Docker Cloud CLI and our UI, in order to use Stack YAML files.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]stack/

          - -

          JSON Parameters

          - - - - - - - - - - - - - - - - - - - -
          ParameterDescription
          name(required) A human-readable name for the stack, i.e. my-hello-world-stack
          nickname(optional) A user-friendly name for the stack (name by default)
          services(optional) List of services belonging to the stack. Each service accepts the same parameters as a Create new service operation (default: []) plus the ability to refer “links” and “volumes-from” by the name of another service in the stack (see example).
          - -

          Export an existing stack

          -
          import dockercloud
          -
          -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
          -stack.export()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = stack.Export(); err != nil {
          -   log.Println(err)
          -}
          -
          -
          GET /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/export/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud stack export 46aca402
          -
          - -

          Get a JSON representation of the stack following the Stack YAML representation.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/app/v1/[optional_namespace/]stack/(uuid)/export/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the stack to retrieve
          - -

          Get an existing stack

          -
          import dockercloud
          -
          -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(stack)
          -
          -
          GET /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud stack inspect 46aca402-2109-4a70-a378-760cfed43816
          -
          - -

          Get all the details of an specific stack

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/app/v1/[optional_namespace/]stack/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the stack to retrieve
          - -

          Update an existing stack

          -
          import dockercloud
          -
          -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
          -stack.services = {"services": [{"name": "hello-word", "image": "tutum/hello-world", "target_num_containers": 2}]}
          -stack.save()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = stack.Update(dockercloud.StackCreateRequest{Services: []dockercloud.ServiceCreateRequest{{Name: "hello-world", Image: "tutum/hello-world", Target_num_containers: 2}}}); err != nil {
          -   log.Println(err)
          -}
          -
          -
          PATCH /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -Content-Type: application/json
          -
          -{
          -    "services": [
          -        {
          -            "name": "hello-word",
          -            "image": "tutum/hello-world",
          -            "target_num_containers": 3,
          -            "linked_to_service": [
          -                {
          -                    "to_service": "database",
          -                    "name": "DB"
          -                }
          -            ]
          -        },
          -        {
          -            "name": "database",
          -            "image": "tutum/mysql"
          -        }
          -    ]
          -}
          -
          -
          docker-cloud stack update -f docker-compose.yml 46aca402
          -
          - -

          Updates the details of every service in the stack.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          PATCH /api/app/v1/[optional_namespace/]stack/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the stack to update
          - -

          JSON Parameters

          - - - - - - - - - - - -
          ParameterDescription
          services(optional) List of services belonging to the stack. Each service accepts the same parameters as a Update an existing service operation (default: []) plus the ability to refer “links” and “volumes-from” by the name of another service in the stack (see example).
          - -

          Stop a stack

          -
          import dockercloud
          -
          -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
          -stack.stop()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = stack.Stop(); err != nil {
          -   log.Println(err)
          -}
          -
          -
          POST /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/stop/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud stack stop 46aca402-2109-4a70-a378-760cfed43816
          -
          - -

          Stops the services in the stack.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]stack/(uuid)/stop/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the stack to stop
          - -

          Start a stack

          -
          import dockercloud
          -
          -stack = dockercloud.Stack.fetch()
          -stack.start()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = stack.Start(); err != nil {
          -   log.Println(err)
          -}
          -
          -
          POST /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/start/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud stack start 46aca402
          -
          - -

          Starts the services in the stack.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]stack/(uuid)/start/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the stack to start
          - -

          Redeploy a stack

          -
          import dockercloud
          -
          -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
          -stack.redeploy()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: true}) to reuse the existing volumes
          -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}) to not reuse the existing volumes
          -if err = stack.Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}); err != nil {
          -   log.Println(err)
          -}
          -
          -
          POST /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/redeploy/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud stack redeploy 46aca402
          -
          - -

          Redeploys all the services in the stack.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]stack/(uuid)/redeploy/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the stack to redeploy
          - -

          Query Parameters

          - - - - - - - - - - - -
          ParameterDescription
          reuse_volumesWheather to reuse container volumes for this redeploy operation or not (default: true).
          - -

          Terminate a stack

          -
          import dockercloud
          -
          -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
          -stack.delete()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -if err = stack.Terminate(); err != nil {
          -   log.Println(err)
          -}
          -
          -
          DELETE /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud stack terminate 46aca402
          -
          - -

          Terminate all the services in a the stack and the stack itself.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          DELETE /api/app/v1/[optional_namespace/]stack/(uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the stack to terminate
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/tag.html b/apidocs/docker-cloud/includes/tag.html deleted file mode 100644 index fd457a5d81..0000000000 --- a/apidocs/docker-cloud/includes/tag.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Tags

          - -

          Tag

          - -
          -

          Example

          -
          -
          {
          -    "name": "byon=false",
          -    "origin": "tutum"
          -}
          -
          - -

          Tags are used to target the deployment of services to a specific set of nodes. Learn more

          - -

          Attributes

          - - - - - - - - - - - - - - - -
          AttributeDescription
          nameName of the tag
          originPossible values: user, tutum
          - -

          List all node tags

          -
          GET /api/infra/v1/tag/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud tag ls 7eaf7fff-882c
          -
          - -

          Lists all tags used by all nodes. Returns a list of Tag objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/infra/v1/tag/

          - -

          Query Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          nameFilter by name
          originFilter by origin. Possible values: user, tutum
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/triggers.html b/apidocs/docker-cloud/includes/triggers.html deleted file mode 100644 index 1cc7e50086..0000000000 --- a/apidocs/docker-cloud/includes/triggers.html +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - - API Documentation - - - - - - - - - - - - - NAV - - - -
          - -
          -
          -
          -
          -
          -
          -

          Triggers

          - -

          Service triggers

          - -
          -

          Example

          -
          -
          {
          -  "url": "/api/app/v1/user_namespace/service/82d4a246-52d8-468d-903d-9da9ef05ff28/trigger/0224815a-c156-44e4-92d7-997c69354438/call/",
          -  "operation": "REDEPLOY",
          -  "name": "docker_trigger",
          -  "resource_uri": "/api/app/v1/user_namespace/service/82d4a246-52d8-468d-903d-9da9ef05ff28/trigger/0224815a-c156-44e4-92d7-997c69354438/"
          -}
          -
          - -

          Triggers are URLs that will start a redeploy of the service whenever a POST request is sent to them. They require no authorization headers, so they should be treated as access tokens. Triggers can be revoked if they are leaked or no longer used for security purposes. See Triggers for more information.

          - -

          This is a namespaced endpoint.

          - -

          Attributes

          - - - - - - - - - - - - - - - - - - - - - - - -
          AttributeDescription
          urlAddress to be used to call the trigger with a POST request
          nameA user provided name for the trigger
          operationThe operation that the trigger call performs (see table Operations below)
          resource_uriA unique API endpoint that represents the trigger
          - -

          Operations

          - - - - - - - - - - - - - - - -
          OperationDescription
          REDEPLOYPerforms a redeploy service operation.
          SCALEUPPerforms a scale up service operation.
          - -

          List all triggers

          -
          import dockercloud
          -
          -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
          -trigger = dockercloud.Trigger.fetch(service)
          -trigger.list()
          -
          -
          GET /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
          -
          -    if err != nil {
          -        log.Println(err)
          -    }
          -
          -trigger, err := service.ListTriggers()
          -
          -  if err != nil {
          -    log.Println(err)
          -  }
          -
          -    log.Println(trigger)
          -
          -
          docker-cloud trigger list 61a29874-9134-48f9-b460-f37d4bec4826
          -
          - -

          Lists all current triggers the service has associated to. Returns a list of Service Trigger objects.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/app/v1/[optional_namespace/]service/(uuid)/trigger/

          - -

          Path Parameters

          - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the service the triggers are associated to
          - -

          Create a new trigger

          -
          import dockercloud
          -
          -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
          -trigger = dockercloud.Trigger.fetch(service)
          -trigger.add(name="mytrigger_name", operation="REDEPLOY")
          -trigger.save()
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -trigger, err := service.CreateTrigger(dockercloud.TriggerCreateRequest{Name: "test-trigger", Operation: "REDEPLOY"})
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(trigger)
          -
          -
          POST /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -Content-Type: application/json
          -
          -{"name": "mytrigger_name", "operation": "REDEPLOY"}
          -
          -
          docker-cloud trigger create --name mytrigger_name --operation REDEPLOY 61a29874-9134-48f9-b460-f37d4bec4826
          -
          - -

          Creates a new service trigger.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]service/(uuid)/trigger/

          - -

          JSON Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          name(optional) A user provided name for the trigger
          operation(optional) The operation to be performed by the trigger (default: “REDEPLOY”)
          - -

          Get an existing trigger

          -
          import dockercloud
          -
          -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
          -trigger = dockercloud.Trigger.fetch(service)
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -trigger, err := service.GetTrigger("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -log.Println(trigger)
          -
          -
          GET /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          - -

          Get all the details of an specific trigger

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          GET /api/app/v1/[optional_namespace/]service/(uuid)/trigger/(trigger_uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the service the triggers are associated to
          trigger_uuidThe UUID of the trigger to retrieve
          - -

          Delete a trigger

          -
          import dockercloud
          -
          -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
          -trigger = dockercloud.Trigger.fetch(service)
          -trigger.delete("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -service.DeleteTrigger("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -
          DELETE /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
          -Host: cloud.docker.com
          -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
          -Accept: application/json
          -
          -
          docker-cloud trigger rm 61a29874-9134-48f9-b460-f37d4bec4826 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce
          -
          - -

          Deletes specific trigger. It will be no longer available to be called.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          DELETE /api/app/v1/[optional_namespace/]service/(uuid)/trigger/(trigger_uuid)/

          - -

          Path Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the associated service
          trigger_uuidThe UUID of the trigger to delete
          - -

          Call a trigger

          -
          import dockercloud
          -
          -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
          -trigger = dockercloud.Trigger.fetch(service)
          -trigger.call("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -
          import "github.com/docker/go-dockercloud/dockercloud"
          -
          -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
          -
          -if err != nil {
          -  log.Println(err)
          -}
          -
          -service.CallTrigger("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
          -
          -
          POST /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/call/ HTTP/1.1
          -Host: cloud.docker.com
          -Accept: application/json
          -
          - -

          Executes the trigger. For SCALEUP triggers, the number of containers to scale up can be passed at the end of the trigger call url, for example /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/call/3/.

          - -

          Endpoint Type

          - -

          Available in Docker Cloud’s REST API

          - -

          HTTP Request

          - -

          POST /api/app/v1/[optional_namespace/]service/(uuid)/trigger/(trigger_uuid)/call/

          - -

          Path Parameters

          - - - - - - - - - - - - - - - -
          ParameterDescription
          uuidThe UUID of the associated service
          trigger_uuidThe UUID of the trigger to call
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/index.html b/apidocs/docker-cloud/index.html deleted file mode 100644 index e3369babcf..0000000000 --- a/apidocs/docker-cloud/index.html +++ /dev/null @@ -1,6579 +0,0 @@ - - - - - - - Docker Cloud API reference - - - - - - - - - - - - - - NAV - - - -
          - -
          - http - go - python - CLI -
          - -
            -
            -
            -
            -
            -
            -
            -

            Introduction

            - -

            Docker Cloud currently offers a HTTP REST API and a Websocket Stream API which are used by both the Web UI and the CLI. This API documentation contains all API operations currently supported in the platform and provides examples of how to execute them using our Command Line Interface (CLI), Python SDK and Go SDK.

            - -

            Authentication

            - -

            In order to be able to make requests to the Docker Cloud API, you should first obtain an ApiKey for your account. For this, log into Docker Cloud, click on the menu on the upper right corner of the screen, select Account info and then select API keys.

            - -

            REST API

            -
            import dockercloud
            -dockercloud.user = "username"
            -dockercloud.apikey = "apikey"
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -dockercloud.User = "username"
            -dockercloud.ApiKey = "apikey"
            -
            -
            GET /api/app/v1/service/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            export DOCKERCLOUD_USER=username
            -export DOCKERCLOUD_APIKEY=apikey
            -
            - -
            -

            Make sure to replace username with your username and apikey with your API key.

            -
            - -

            The Docker Cloud REST API is reachable through the following hostname:

            - -

            https://cloud.docker.com/

            - -

            All requests should be sent to this endpoint using Basic authentication using your API key as password:

            - -

            Authorization: Basic dXNlcm5hbWU6YXBpa2V5

            - -

            HTTP responses are given in JSON format, so the following Accept header is required for every API call:

            - -

            Accept: application/json

            - -

            Namespaced endpoints

            - -

            Endpoints that are labeled as “namespaced” allow the users to operate over -different namespaces, for example over an individual user namespace, or the -namespace of an organization the user is a member of. A namespace identifies the -owner of the resource.

            - -

            The namespace is optional. If left blank, it defaults to the authenticated user -in the request. The namespace is set before the resource in the URL schema: -https://cloud.docker.com/api/<subsystem>/<version>/(optional_namespace/)<resource>/

            - -

            Examples:

            - -
              -
            • The user exampleuser wants to operate on the node cluster list endpoint in their own namespace. They can use either of the following urls: - -
                -
              • https://cloud.docker.com/api/infra/v1/nodecluster/ (namespace omitted, so will use the user authenticated in the request)
              • -
              • https://cloud.docker.com/api/infra/v1/exampleuser/nodecluster/
              • -
            • -
            • The user wants to operate on the node cluster list endpoint in an organization called exampleorg (which they have permission to see): - -
                -
              • https://cloud.docker.com/api/infra/v1/exampleorg/nodecluster/
              • -
            • -
            - -

            Namespaced endpoints in the docker-cloud CLI

            - -

            If you are using namespaces with the docker-cloud CLI, set them by changing -the value of the DOCKERCLOUD_NAMESPACE environment variable. You can either -set this globally, or specify it before each CLI command. To learn more, see the -Docker Cloud CLI README.

            - -

            Stream API

            -
            import websocket
            -import base64
            -
            -header = "Authorization: Basic %s" % base64.b64encode("%s:%s" % (username, password))
            -ws = websocket.WebSocketApp('wss://ws.cloud.docker.com/v1/events', header=[header])
            -
            -
            import "github.com/gorilla/websocket"
            -import "encoding/base64"
            -
            -var StreamUrl = "wss://ws.cloud.docker.com:443/v1/events"
            -
            -sEnc := base64.StdEncoding.EncodeToString([]byte(User + ":" + ApiKey))
            -header := http.Header{}
            -header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))
            -
            -var Dialer websocket.Dialer
            -ws, _, err := Dialer.Dial(url, header)
            -if err != nil {
            -    log.Println(err)
            -}
            -
            -
            GET /api/audit/v1/events HTTP/1.1
            -Host: ws.cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Connection: Upgrade
            -Upgrade: websocket
            -
            -
            export DOCKERCLOUD_USER=username
            -export DOCKERCLOUD_APIKEY=apikey
            -
            - -
            -

            Make sure to replace username with your username and apikey with your API key.

            -
            - -

            The Docker Cloud Stream API is reachable through the following hostname:

            - -

            wss://ws.cloud.docker.com/

            - -

            The Stream API requires the same authentication mechanism as the REST API:

            - -

            Authorization: Basic dXNlcm5hbWU6YXBpa2V5

            - -

            API roles

            - -
            -

            The CLI and the SDKs will detect this environment variable and automatically use it

            -
            - -

            If you give an API role to a container, the environment variable DOCKERCLOUD_AUTH inside the container will have the contents of the Authorization header that you can use to authenticate against the REST or Stream APIs:

            - -

            curl -H "Authorization: $DOCKERCLOUD_AUTH" https://cloud.docker.com/api/app/v1/service/

            - -

            Actions

            - -

            Action

            - -
            -

            Example

            -
            -
            {
            -    "action": "Cluster Create",
            -    "end_date": "Wed, 17 Sep 2014 08:26:22 +0000",
            -    "ip": "56.78.90.12",
            -    "is_user_action": true,
            -    "can_be_canceled": false,
            -    "location": "New York, USA",
            -    "method": "POST",
            -    "object": "/api/infra/v1/user_namespace/cluster/eea638f4-b77a-4183-b241-22dbd7866f22/",
            -    "path": "/api/infra/v1/user_namespace/cluster/",
            -    "resource_uri": "/api/audit/v1/action/6246c558-976c-4df6-ba60-eb1a344a17af/",
            -    "start_date": "Wed, 17 Sep 2014 08:26:22 +0000",
            -    "state": "Success",
            -    "user": "user_namespace",
            -    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.78.2 (KHTML, like Gecko) Version/7.0.6 Safari/537.78.2",
            -    "uuid": "6246c558-976c-4df6-ba60-eb1a344a17af"
            -}
            -
            - -

            An action represents an API call by a user. Details of the API call such as timestamp, origin IP address, and user agent are logged in the action object.

            - -

            Simple API calls that do not require asynchronous execution will return immediately with the appropriate HTTP error code and an action object will be created either in Success or Failed states. API calls that do require asynchronous execution will return HTTP code 202 Accepted immediately and create an action object in In progress state, which will change to Success or Failed state depending on the outcome of the operation being performed. In both cases the response will include a X-DockerCloud-Action-URI header with the resource URI of the created action.

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            resource_uriA unique API endpoint that represents the action
            uuidA unique identifier for the action generated automatically on creation
            objectThe API object (resource URI) to which the action applies to
            actionName of the operation performed/being performed
            methodHTTP method used to access the API
            pathHTTP path of the API accessed
            userThe user authenticated in the request that created the action
            user_agentThe user agent provided by the client when accessing the API endpoint
            start_dateDate and time when the API call was performed and the operation started processing
            end_dateDate and time when the API call finished processing
            stateState of the operation (see table below)
            ipIP address of the user that performed the API call
            locationGeographic location of the IP address of the user that performed the API call
            is_user_actionIf the action has been triggered by the user
            can_be_canceledIf the action can be canceled by the user in the middle of its execution
            can_be_retriedIf the action can be retried by the user
            - -

            Action states

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            StateDescription
            PendingThe action needed asynchronous execution and it is waiting for an in progress action
            In progressThe action needed asynchronous execution and is being performed
            CancelingThe action is being canceled by user request
            CanceledThe action has been canceled
            SuccessThe action was executed successfully
            FailedThere was an issue when the action was being performed. Check the logs for more information.
            - -

            List all actions

            -
            import dockercloud
            -
            -actions = dockercloud.Action.list()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -actionList, err := dockercloud.ListActions()
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(actionList)
            -
            -
            GET /api/audit/v1/action/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud action ls
            -
            - -

            Lists all actions in chronological order. Returns a list of Action objects.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/audit/v1/action/

            - -

            Query Parameters

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            uuidFilter by UUID.
            stateFilter by state. Possible values: In progress, Success, Failed
            start_dateFilter by start date. Valid filtering values are start_date__gte (after or on the date supplied) and start_date__lte (before or on the date supplied)
            end_dateFilter by end date. Valid filtering values are end_date__gte (after or on the date supplied) and end_date__lte (before or on the date supplied)
            objectFilter by resource URI of the related object. This filter can only be combined with ‘include_related’ filter
            include_relatedThere is a parent-child relationship between Docker Cloud objects, described in table Relationships between Docker Cloud objects. If set to 'true’, will include the actions of the related objects to the object specified in “object” filter parameter. Possible values: 'true’ or 'false’
            - -

            Relationships between Docker Cloud objects

            - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            ObjectRelationships
            ContainerContainer, service, stack (if any)
            ServiceAll containers in the service, service, stack (if any)
            StackAll services in the stack, all containers in every service in the stack, stack
            NodeNode, node cluster (if any)
            Node clusterAll nodes in the cluster, node cluster
            - -

            Get an action by UUID

            -
            import dockercloud
            -
            -action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(action)
            -
            -
            GET /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud action inspect 7eaf7fff
            -
            - -

            Get all the details of an specific action

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/audit/v1/action/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the action to retrieve
            - -

            Get the logs of an action

            - -
            -

            Example log line

            -
            -
            {
            -    "type": "log",
            -    "log": "Log line from the action",
            -    "timestamp": 1433779324
            -}
            -
            -
            import dockercloud
            -
            -def log_handler(message):
            -    print message
            -
            -action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -action.logs(tail=300, follow=True, log_handler=log_handler)
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -c := make(chan dockercloud.Logs)
            -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -    log.Println(err)
            -}
            -
            -go action.GetLogs(c)
            -
            -for {
            -    log.Println(<-c)
            -}
            -
            -
            GET /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1
            -Host: ws.cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Connection: Upgrade
            -Upgrade: websocket
            -
            -
            docker-cloud action logs 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce
            -
            - -

            Get the logs of the specified action.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s STREAM API

            - -

            HTTP Request

            - -

            GET /api/audit/v1/action/(uuid)/logs/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the action to retrieve logs
            - -

            Query Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            tailNumber of lines to show from the end of the logs (default: 300)
            followWhether to stream logs or close the connection immediately (default: true)
            - -

            Cancel an action

            -
            POST /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/cancel/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -action, err = action.Cancel()
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(action)
            -
            - -

            Cancels an action in Pending or In progress state.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/audit/v1/action/(uuid)/cancel/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the action to cancel
            - -

            Retry an action

            -
            import dockercloud
            -
            -def log_handler(message):
            -  print message
            -
            -action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -action.logs(tail=300, follow=True, log_handler=log_handler)
            -
            -
            POST /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/retry/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -action, err = action.Retry()
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(action)
            -
            -
            docker-cloud action logs 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce
            -
            - -

            Retries an action in Success, Failed or Canceled state.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/audit/v1/action/(uuid)/retry/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the action to retry
            - -

            Providers

            - -

            Provider

            - -
            -

            Example

            -
            -
            {
            -    "available": true,
            -    "label": "Digital Ocean",
            -    "name": "digitalocean",
            -    "regions": [
            -        "/api/infra/v1/region/digitalocean/ams1/",
            -        "/api/infra/v1/region/digitalocean/ams2/",
            -        "/api/infra/v1/region/digitalocean/ams3/",
            -        "/api/infra/v1/region/digitalocean/lon1/",
            -        "/api/infra/v1/region/digitalocean/nyc1/",
            -        "/api/infra/v1/region/digitalocean/nyc2/",
            -        "/api/infra/v1/region/digitalocean/nyc3/",
            -        "/api/infra/v1/region/digitalocean/sfo1/",
            -        "/api/infra/v1/region/digitalocean/sgp1/"
            -    ],
            -    "resource_uri": "/api/infra/v1/provider/digitalocean/"
            -}
            -
            - -

            A provider is a representation of a cloud provider supported by Docker Cloud. Providers have one or more regions where nodes are deployed.

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            resource_uriA unique API endpoint that represents the provider
            nameA unique identifier for the provider
            labelA user-friendly name for the provider
            regionsA list of resource URIs of the regions available in this provider
            availableWhether the provider is currently available for new node deployments
            - -

            List all providers

            -
            import dockercloud
            -
            -providers = dockercloud.Provider.list()
            -
            -
            GET /api/infra/v1/provider/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -providerList, err := dockercloud.ListProviders()
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(providerList)
            -
            -
            docker-cloud nodecluster provider
            -
            - -

            Lists all supported cloud providers. Returns a list of Provider objects.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/infra/v1/provider/

            - -

            Query Parameters

            - - - - - - - - - - - -
            ParameterDescription
            nameFilter by provider name
            - -

            Get an individual provider

            -
            import dockercloud
            -
            -provider = dockercloud.Provider.fetch("digitalocean")
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -provider, err := dockercloud.GetProvider("digitalocean")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(provider)
            -
            -
            GET /api/infra/v1/provider/digitalocean/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            - -

            Get all the details of a specific provider

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/infra/v1/provider/(name)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            nameThe name of the provider to retrieve
            - -

            Regions

            - -

            Region

            - -
            -

            Example

            -
            -
            {
            -    "availability_zones": [],
            -    "available": true,
            -    "label": "Amsterdam 2",
            -    "name": "ams2",
            -    "node_types": [
            -        "/api/infra/v1/nodetype/digitalocean/1gb/",
            -        "/api/infra/v1/nodetype/digitalocean/2gb/",
            -        "/api/infra/v1/nodetype/digitalocean/4gb/",
            -        "/api/infra/v1/nodetype/digitalocean/8gb/",
            -        "/api/infra/v1/nodetype/digitalocean/16gb/",
            -        "/api/infra/v1/nodetype/digitalocean/32gb/",
            -        "/api/infra/v1/nodetype/digitalocean/48gb/",
            -        "/api/infra/v1/nodetype/digitalocean/64gb/"
            -    ],
            -    "provider": "/api/infra/v1/provider/digitalocean/",
            -    "resource_uri": "/api/infra/v1/region/digitalocean/ams2/"
            -}
            -
            - -

            A region is a representation of an entire or a subset of a data center of a cloud provider. It can contain availability zones (depending on the provider) and one or more node types.

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            resource_uriA unique API endpoint that represents the region
            nameAn identifier for the region
            labelA user-friendly name for the region
            node_typesA list of resource URIs of the node types available in the region
            availability_zonesA list of resource URIs of the availability zones available in the region
            providerThe resource URI of the provider of the region
            availableWhether the region is currently available for new node deployments
            - -

            List all regions

            -
            import dockercloud
            -
            -regions = dockercloud.Region.list()
            -
            -
            GET /api/infra/v1/region/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -regionList, err := dockercloud.ListRegions()
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(regionList)
            -
            -
            docker-cloud nodecluster region
            -
            - -

            Lists all regions of all supported cloud providers. Returns a list of Region objects.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/infra/v1/region/

            - -

            Query Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            nameFilter by region name
            providerFilter by resource URI of the target provider
            - -

            Get an individual region

            -
            import dockercloud
            -
            -region = dockercloud.Region.fetch("digitalocean/lon1")
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -region, err := dockercloud.GetRegion("digitalocean","lon1")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(region)
            -
            -
            GET /api/infra/v1/region/digitalocean/lon1/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            - -

            Get all the details of a specific region

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/infra/v1/region/(provider.name)/(name)/

            - -

            Path Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            nameThe name of the region to retrieve
            provider.nameThe name of the provider of the region
            - -

            Availability Zones

            - -

            Availability Zone

            - -
            -

            Example

            -
            -
            {
            -    "available": true,
            -    "name": "ap-northeast-1a",
            -    "region": "/api/infra/v1/region/az/ap-northeast-1/",
            -    "resource_uri": "/api/infra/v1/az/aws/ap-northeast-1/ap-northeast-1a/"
            -}
            -
            - -

            An Availability Zone is an isolated location inside a region. Providers that support availability zones: AWS

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            availableWhether the availability zone is currently available for new node deployments
            nameAn identifier for the availability zone
            regionThe resource URI of the region where the availability zone is allocated
            resource_uriA unique API endpoint that represents the zone
            - -

            List all availability zones

            -
            import dockercloud
            -
            -az = dockercloud.AZ.list()
            -
            -
            GET /api/infra/v1/az/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -az, err := dockercloud.ListAZ()
            -if err != nil {
            -    log.Println(err)
            -}
            -
            -log.Println(az)
            -
            -
            docker-cloud nodecluster az
            -
            - -

            Lists all availability zones from all regions of all supported cloud providers. Returns a list of Availability Zone objects.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/infra/v1/az/

            - -

            Query Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            nameFilter by availability zone name
            regionFilter by resource URI of the target region
            - -

            Get an individual availability zone

            -
            import dockercloud
            -
            -az = dockercloud.AZ.fetch("aws/sa-east-1/sa-east-1a")
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -az, err := dockercloud.GetAZ("aws/sa-east-1/sa-east-1a")
            -if err != nil {
            -    log.Println(err)
            -}
            -
            -log.Println(az)
            -
            -
            GET /api/infra/v1/az/aws/sa-east-1/sa-east-1a/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            - -

            Get all the details of a specific availability zone

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/infra/v1/az/(provider.name)/(region.name)/(name)/

            - -

            Path Parameters

            - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            nameThe name of the availability zone to retrieve
            providerThe name of the provider
            regionThe name of the region
            - -

            Node Types

            - -

            Node Type

            - -
            -

            Example

            -
            -
            {
            -    "availability_zones": [],
            -    "available": true,
            -    "label": "1GB",
            -    "name": "1gb",
            -    "provider": "/api/infra/v1/provider/digitalocean/",
            -    "regions": [
            -        "/api/infra/v1/region/digitalocean/ams1/",
            -        "/api/infra/v1/region/digitalocean/sfo1/",
            -        "/api/infra/v1/region/digitalocean/nyc2/",
            -        "/api/infra/v1/region/digitalocean/ams2/",
            -        "/api/infra/v1/region/digitalocean/sgp1/",
            -        "/api/infra/v1/region/digitalocean/lon1/",
            -        "/api/infra/v1/region/digitalocean/nyc3/",
            -        "/api/infra/v1/region/digitalocean/nyc1/"
            -    ],
            -    "resource_uri": "/api/infra/v1/nodetype/digitalocean/1gb/"
            -}
            -
            - -

            A node type is a representation of an instance size supported by a certain cloud provider in a certain region and/or availability zone.

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            resource_uriA unique API endpoint that represents the node type
            nameAn identifier for the node type
            labelA user-friendly name for the node type
            regionsA list of resource URIs of the regions to which this node type can be deployed to
            availability_zonesA list of resource URIs of the availability zones to which this node type can be deployed to
            providerThe resource URI of the provider of the node type
            availableWhether the node type is currently available for new node deployments
            - -

            List all node types

            -
            import dockercloud
            -
            -nodetypes = dockercloud.NodeType.list()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -nodetypeList, err := dockercloud.ListNodeTypes()
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(nodetypeList)
            -
            -
            GET /api/infra/v1/nodetype/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud nodecluster nodetype
            -
            - -

            Lists all node types of all supported cloud providers. Returns a list of NodeType objects.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/infra/v1/nodetype/

            - -

            Query Parameters

            - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            nameFilter by node type name
            regionsFilter by resource URI of the target regions
            availability_zonesFilter by resource URI of the target availability zones
            - -

            Get an individual node type

            -
            import dockercloud
            -
            -nodetype = dockercloud.NodeType.fetch("digitalocean/1gb")
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -nodetype, err := dockercloud.GetNodeType("digitalocean","1gb")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(nodetype)
            -
            -
            GET /api/infra/v1/nodetype/digitalocean/1gb/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            - -

            Get all the details of a specific node type

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/infra/v1/nodetype/(provider.name)/(name)/

            - -

            Path Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            nameThe name of the node type to retrieve
            provider.nameThe name of the provider of the node type
            - -

            Node Clusters

            - -

            Node Cluster

            - -
            -

            Example

            -
            -
            {
            -    "current_num_nodes": 1,
            -    "deployed_datetime": "Tue, 16 Sep 2014 17:01:15 +0000",
            -    "destroyed_datetime": null,
            -    "disk": 60,
            -    "nickname": "my test cluster",
            -    "name": "TestCluster",
            -    "node_type": "/api/infra/v1/nodetype/aws/t2.micro/",
            -    "nodes": [
            -        "/api/infra/v1/user_namespace/node/75d20367-0948-4f10-8ba4-ffb4d16ed3c6/"
            -    ],
            -    "region": "/api/infra/v1/region/aws/us-east-1/",
            -    "resource_uri": "/api/infra/v1/user_namespace/nodecluster/5516df0b-721e-4470-b350-741ff22e63a0/",
            -    "state": "Deployed",
            -    "tags": [
            -        {"name": "tag_one"},
            -        {"name": "tag-two"},
            -        {"name": "tagthree3"}
            -    ],
            -    "target_num_nodes": 2,
            -    "uuid": "5516df0b-721e-4470-b350-741ff22e63a0",
            -    "provider_options": {
            -        "vpc": {
            -            "id": "vpc-aa1c70d4",
            -            "subnets": ["subnet-aaa7d94f", "subnet-aa15fa64"],
            -            "security_groups": ["sg-aa1c70d4"]
            -        },
            -        "iam": {
            -            "instance_profile_name": "my_instance_profile"
            -        }
            -    }
            -}
            -
            - -

            A node cluster is a group of nodes that share the same provider, region and/or availability zone, and node type. They are on the same private network.

            - -

            This is a namespaced endpoint.

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            uuidA unique identifier for the node cluster generated automatically on creation
            resource_uriA unique API endpoint that represents the node cluster
            nameA user provided name for the node cluster
            stateThe state of the node cluster. See the below table for a list of possible states.
            node_typeThe resource URI of the node type used for the node cluster
            diskThe size of the disk where images and containers are stored (in GB)
            nodesA list of resource URIs of the Node objects on the node cluster
            regionThe resource URI of the Region object where the node cluster is deployed
            target_num_nodesThe desired number of nodes for the node cluster
            current_num_nodesThe actual number of nodes in the node cluster. This may differ from target_num_nodes if the node cluster is being deployed or scaled
            deployed_datetimeThe date and time when this node cluster was deployed
            destroyed_datetimeThe date and time when this node cluster was terminated (if applicable)
            tagsList of tags to identify the node cluster nodes when deploying services (see Tags for more information)
            provider_optionsProvider-specific extra options for the deployment of the node (see Provider options table below for more information)
            nicknameA user-friendly name for the node cluster (name by default)
            - -

            Node Cluster states

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            StateDescription
            InitThe node cluster has been created and has no deployed containers yet. Possible actions in this state: deploy, terminate.
            DeployingAll nodes in the cluster are either deployed or being deployed. No actions allowed in this state.
            DeployedAll nodes in the cluster are deployed and provisioned. Possible actions in this state: terminate.
            Partly deployedOne or more nodes of the cluster are deployed and running. Possible actions in this state: terminate.
            ScalingThe cluster is either deploying new nodes or terminating existing ones responding to a scaling request. No actions allowed in this state.
            TerminatingAll nodes in the cluster are either being terminated or already terminated. No actions allowed in this state.
            TerminatedThe node cluster and all its nodes have been terminated. No actions allowed in this state.
            Empty clusterThere are no nodes deployed in this cluster. Possible actions in this state: terminate.
            - -

            Provider options

            - -

            You can specify the following options when using the Amazon Web Services provider:

            - -
              -
            • vpc: VPC-related options (optional) - -
                -
              • id: AWS VPC identifier of the target VPC where the nodes of the cluster will be deployed (required)
              • -
              • subnets: a list of target subnet identifiers inside selected VPC. If you specify more than one subnet, Docker Cloud will balance among all of them following a high-availability schema (optional)
              • -
              • security_groups: the security group that will be applied to every node of the cluster (optional)
              • -
            • -
            • iam: IAM-related options (optional) - -
                -
              • instance_profile_name: name of the instance profile (container for instance an IAM role) to attach to every node of the cluster (required)
              • -
            • -
            - -

            List all node clusters

            -
            import dockercloud
            -
            -nodeclusters = dockercloud.NodeCluster.list()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -nodeclusters, err := dockercloud.ListNodeClusters()
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(nodeclusters)
            -
            -
            GET /api/infra/v1/nodecluster/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud nodecluster ls
            -
            - -

            Lists all current and recently terminated node clusters. Returns a list of NodeCluster objects.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/infra/v1/[optional_namespace/]nodecluster/

            - -

            Query Parameters

            - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            uuidFilter by UUID
            stateFilter by state. Possible values: Init, Deploying, Deployed, Partly deployed, Scaling, Terminating, Terminated, Empty cluster
            nameFilter by node cluster name
            regionFilter by resource URI of the target region
            node_typeFilter by resource URI of the target node type
            - -

            Create a new node cluster

            -
            import dockercloud
            -
            -region = dockercloud.Region.fetch("digitalocean/lon1")
            -node_type = dockercloud.NodeType.fetch("digitalocean/1gb")
            -nodecluster = dockercloud.NodeCluster.create(name="my_cluster", node_type=node_type, region=region, disk=60)
            -nodecluster.save()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -nodecluster, err := dockercloud.CreateNodeCluster(dockercloud.NodeCreateRequest{Name: "my_cluster", Region: "/api/infra/v1/region/digitalocean/lon1/", NodeType: "/api/infra/v1/nodetype/digitalocean/1gb/", Target_num_nodes: 2})
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(nodecluster)
            -
            -
            POST /api/infra/v1/nodecluster/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -Content-Type: application/json
            -
            -{"name": "my_cluster", "region": "/api/infra/v1/region/digitalocean/lon1/", "node_type": "/api/infra/v1/nodetype/digitalocean/1gb/", "disk": 60}
            -
            -
            docker-cloud nodecluster create my_cluster digitalocean lon1 1gb
            -
            - -

            Creates a new node cluster without deploying it.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/infra/v1/[optional_namespace/]nodecluster/

            - -

            JSON Parameters

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            name(required) A user provided name for the node cluster
            node_type(required) The resource URI of the node type to be used for the node cluster
            region(required) The resource URI of the region where the node cluster is to be deployed
            disk(optional) The size of the volume to create where images and containers will be stored, in GB (default: 60). Not available for Digital Ocean. To create Softlayer nodes you must select one of the following sizes (in GBs): 10, 20, 25, 30, 40, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400, 500, 750, 1000, 1500 or 2000
            nickname(optional) A user-friendly name for the node cluster (name by default)
            target_num_nodes(optional) The desired number of nodes for the node cluster (default: 1)
            tags(optional) List of tags of the node cluster to be used when deploying services see Tags for more information) (default: [])
            provider_optionsProvider-specific extra options for the deployment of the node (see table Provider options above for more information)
            - -

            Get an existing node cluster

            -
            import dockercloud
            -
            -service = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(nodecluster)
            -
            -
            GET /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud nodecluster inspect 7eaf7fff
            -
            - -

            Get all the details of an specific node cluster

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the node cluster to retrieve
            - -

            Deploy a node cluster

            -
            import dockercloud
            -
            -nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -nodecluster.deploy()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = nodecluster.Deploy(); err != nil {
            -   log.Println(err)
            -}
            -
            -
            POST /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/deploy/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            - -

            Deploys and provisions a recently created node cluster in the specified region and cloud provider.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/deploy/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the node cluster to deploy
            - -

            Update an existing node cluster

            -
            import dockercloud
            -
            -nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -nodecluster.target_num_nodes = 3
            -nodecluster.tags.add("tag-1")
            -nodecluster.save()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = nodecluster.Update(dockercloud.NodeCreateRequest{Target_num_nodes: 4}); err != nil {
            -   log.Println(err)
            -}
            -
            -
            PATCH /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -Content-Type: application/json
            -
            -{"target_num_nodes": 3, "tags": [{"name": "tag-1"}]}
            -
            -
            docker-cloud nodecluster scale 7eaf7fff 3
            -docker-cloud tag add -t tag-1 7eaf7fff
            -docker-cloud tag set -t tag-2 7eaf7fff
            -
            - -

            Updates the node cluster details and applies the changes automatically.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            PATCH /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the node cluster to update
            - -

            JSON Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            target_num_nodes(optional) The number of nodes to scale this node cluster to
            tags(optional) List of tags the node cluster (and nodes within the node cluster) will have. This operation replaces the user tag list.
            - -

            Terminate a node cluster

            -
            import dockercloud
            -
            -nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -nodecluster.delete()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = nodecluster.Terminate(); err != nil {
            -   log.Println(err)
            -}
            -
            -
            DELETE /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            dockercloud nodecluster rm 7eaf7fff
            -
            - -

            Terminates all the nodes in a node cluster and the node cluster itself. This is not reversible.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            DELETE /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the node cluster to terminate
            - -

            Nodes

            - -

            Node

            - -
            -

            Example

            -
            -
            {
            -    "availability_zone": "/api/infra/v1/az/testing-provider/testing-region/testing-az/",
            -    "cpu": 1,
            -    "current_num_containers": 4,
            -    "deployed_datetime": "Tue, 16 Sep 2014 17:01:15 +0000",
            -    "destroyed_datetime": null,
            -    "disk": 60,
            -    "docker_execdriver": "native-0.2",
            -    "docker_graphdriver": "aufs",
            -    "docker_version": "1.5.0",
            -    "external_fqdn": "fc1a5bb9-user.node.dockerapp.io",
            -    "last_seen": "Thu, 25 Sep 2014 13:14:44 +0000",
            -    "memory": 1792,
            -    "nickname": "fc1a5bb9-user.node.dockerapp.io",
            -    "node_cluster": "/api/infra/v1/user_namespace/nodecluster/d787a4b7-d525-4061-97a0-f423e8f1d229/",
            -    "node_type": "/api/infra/v1/user_namespace/nodetype/testing-provider/testing-type/",
            -    "public_ip": "10.45.2.11",
            -    "region": "/api/infra/v1/region/testing-provider/testing-region/",
            -    "resource_uri": "/api/infra/v1/user_namespace/node/fc1a5bb9-17f5-4819-b667-8c7cd819e949/",
            -    "state": "Deployed",
            -    "tags": [
            -        {"name": "tag_one"},
            -        {"name": "tag-two"}
            -    ],
            -    "tunnel": "https://tunnel01.cloud.docker.com:12345",
            -    "uuid": "fc1a5bb9-17f5-4819-b667-8c7cd819e949"
            -}
            -
            - -

            A node is a virtual machine provided by a cloud provider where containers can be deployed.

            - -

            This is a namespaced endpoint.

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            availability_zoneThe resource URI of the availability zone where the node is deployed, if any
            uuidA unique identifier for the node generated automatically on creation
            resource_uriA unique API endpoint that represents the node
            external_fqdnAn automatically generated FQDN for the node. Containers deployed on this node will inherit this FQDN.
            stateThe state of the node. See the below table for a list of possible states.
            node_clusterThe resource URI of the node cluster to which this node belongs to (if applicable)
            node_typeThe resource URI of the node type used for the node
            regionThe resource URI of the region where the node is deployed
            docker_execdriverDocker’s execution driver used in the node
            docker_graphdriverDocker’s storage driver used in the node
            docker_versionDocker’s version used in the node
            cpuNode number of CPUs
            diskNode storage size in GB
            memoryNode memory in MB
            current_num_containersThe actual number of containers deployed in this node
            last_seenDate and time of the last time the node was contacted by Docker Cloud
            public_ipThe public IP allocated to the node
            tunnelIf the node does not accept incoming connections to port 2375, the address of the reverse tunnel to access the docker daemon, or null otherwise
            deployed_datetimeThe date and time when this node cluster was deployed
            destroyed_datetimeThe date and time when this node cluster was terminated (if applicable)
            tagsList of tags to identify the node when deploying services (see Tags for more information)
            nicknameA user-friendly name for the node (external_fqdn by default)
            - -

            Node states

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            StateDescription
            DeployingThe node is being deployed in the cloud provider. No actions allowed in this state.
            DeployedThe node is deployed and provisioned and is ready to deploy containers. Possible actions in this state: terminate, docker-upgrade.
            UnreachableThe node is deployed but Docker Cloud cannot connect to the docker daemon. Possible actions in this state: health-check and terminate.
            UpgradingThe node docker daemon is being upgraded. No actions allowed in this state.
            TerminatingThe node is being terminated in the cloud provider. No actions allowed in this state.
            TerminatedThe node has been terminated and is no longer present in the cloud provider. No actions allowed in this state.
            - -

            List all nodes

            -
            import dockercloud
            -
            -nodes = dockercloud.Node.list()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -nodeList, err := dockercloud.ListNodes()
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(nodeList)
            -
            -
            GET /api/infra/v1/node/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud node ls
            -
            - -

            Lists all current and recently terminated nodes. Returns a list of Node objects.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/infra/v1/[optional_namespace/]node/

            - -

            Query Parameters

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            uuidFilter by UUID
            stateFilter by state. Possible values: Deploying, Deployed, Unreachable, Upgrading, Terminating, Terminated
            node_clusterFilter by resource URI of the target node cluster
            node_typeFilter by resource URI of the target node type
            regionFilter by resource URI of the target region
            docker_versionFilter by Docker engine version running in the nodes
            - -

            Get an existing node

            -
            import dockercloud
            -
            -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(node)
            -
            -
            GET /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud node inspect 7eaf7fff
            -
            - -

            Get all the details of an specific node

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/infra/v1/[optional_namespace/]node/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the node to retrieve
            - -

            Update a node

            -
            import dockercloud
            -
            -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -node.tags.add(["tag-1"])
            -node.save()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -    log.Println(err)
            -}
            -
            -if err = node.Update(dockercloud.Node{Tags: []string{{Name: "tag-1"}}}); err != nil {
            -            log.Println(err)
            -}
            -
            -
            PATCH /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -{"tags": [{"name": "tag-1"}], "nickname": "dev node"}
            -
            -
            docker-cloud tag add -t tag-1 7eaf7fff
            -docker-cloud tag set -t tag-2 7eaf7fff
            -
            - -

            Names the node with a user-friendly name and/or replaces the old tags for the new list provided.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            PATCH /api/infra/v1/[optional_namespace/]node/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the node to retrieve
            - -

            JSON Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            nickname(optional) A user-friendly name for the node (external_fqdn by default)
            tags(optional) List of tags the node will have. This operation replaces the user tag list.
            - -

            Upgrade Docker Daemon

            -
            import dockercloud
            -
            -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -node.upgrade_docker()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = node.Upgrade(); err != nil {
            -       log.Println(err)
            -   }
            -
            -
            POST /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/docker-upgrade/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud node upgrade 7eaf7fff
            -
            - -

            Upgrades the docker daemon of the node. This will restart your containers on that node. See Docker upgrade for more information.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/infra/v1/[optional_namespace/]node/(uuid)/docker-upgrade/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the node to upgrade
            - -

            Perform a health check of a node

            -
            POST /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/health-check/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            - -

            Tests connectivity between Docker Cloud and the node. Updates the node status to Deployed if the check was successful, or to Unreachable otherwise.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/infra/v1/[optional_namespace/]node/(uuid)/health-check/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the node to perform the health check to
            - -

            Terminate a node

            -
            import dockercloud
            -
            -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -node.delete()
            -
            -
            DELETE /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = node.Terminate(); err != nil {
            -   log.Println(err)
            -}
            -
            -
            docker-cloud node rm 7eaf7fff
            -
            - -

            Terminates the specified node.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            DELETE /api/infra/v1/[optional_namespace/]node/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the node to terminate
            - -

            Registries

            - -

            Registry

            - -
            -

            Example

            -
            -
            {
            -  "host": "registry-1.docker.io",
            -  "is_docker_registry": true,
            -  "is_ssl": true,
            -  "name": "Docker Hub",
            -  "port": 443,
            -  "resource_uri": "/api/repo/v1/user_namespace/registry/registry-1.docker.io/"
            -}
            -
            - -

            Represents a registry where repositories are hosted.

            - -

            This is a namespaced endpoint.

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            resource_uriA unique API endpoint that represents the registry
            nameHuman-readable name of the registry
            hostFQDN of the registry, i.e. registry-1.docker.io
            is_docker_registryWhether this registry is run by Docker
            is_sslWhether this registry has SSL activated or not
            portThe port number where the registry is listening to
            - -

            List all registries

            -
            GET /api/repo/v1/registry/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            - -

            Lists all current registries. Returns a list of Registry objects.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/repo/v1/[optional_namespace/]registry/

            - -

            Query Parameters

            - - - - - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            uuidFilter by UUID
            nameFilter by registry name
            hostFilter by registry host
            is_docker_registryFilter by whether the registry is run by Docker or not. Possible values: ‘true’ or 'false’
            - -

            Get an existing registry

            -
            GET /api/repo/v1/registry/registry-1.docker.io/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            - -

            Gets all the details of an specific registry

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/v1/[optional_namespace/]registry/(host)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            hostThe host of the registry to retrieve
            - -

            External Repositories

            - -

            External Repository

            - -
            -

            Example

            -
            -
            {
            -  "in_use": false,
            -  "name": "my.registry.com/myrepo",
            -  "registry": "/api/repo/v1/user_namespace/registry/my.registry.com/",
            -  "resource_uri": "/api/repo/v1/user_namespace/repository/my.registry.com/myrepo/",
            -}
            -
            - -

            The repository endpoint is used to add and remove existing repositories on third party registries to be used in deployments and builds.

            - -

            This is a namespaced endpoint.

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            resource_uriA unique API endpoint that represents the repository
            nameName of the repository, i.e. my.registry.com/myrepo
            in_useIf the image is being used by any of your services
            registryResource URI of the registry where this image is hosted
            - -

            List all external repositories

            -
            import dockercloud
            -
            -repositories = dockercloud.Repository.list()
            -
            -
            GET /api/repo/v1/repository/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -repositoriesList, err := dockercloud.ListRepositories()
            -
            -if err != nil {
            -    log.Println(err)
            -}
            -
            -log.Pringln(repositoriesList)
            -
            -
            docker-cloud repository ls
            -
            - -

            Lists all added repositories from third party registries. Returns a list of Repository objects.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/repo/v1/[optional_namespace/]repository/

            - -

            Query Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            nameFilter by image name
            registryFilter by resource URI of the target repository registry
            - -

            Add a new external repository

            -
            import dockercloud
            -
            -repository = dockercloud.Repository.create(name="registry.local/user1/image1", username=username, password=password)
            -repository.save()
            -
            -
            POST /api/repo/v1/repository/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -Content-Type: application/json
            -
            -{"name": "registry.local/user1/image1", "username": "username", "password": "password"}
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -image, err := dockercloud.CreateImage(dockercloud.ImageCreateRequest{
            -  Name: "registry.local/user1/image1",
            -  Username: "username",
            -  Password: "password"
            -})
            -
            -
            docker-cloud repository register -u username -p password registry.local/user1/image1
            -
            - -

            Adds an existing repository on a third party registry.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/repo/v1/[optional_namespace/]repository/

            - -

            JSON Parameters

            - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            nameName of the repository, i.e. ‘my.registry.com/myrepo’
            usernameUsername to authenticate with the third party registry
            passwordPassword to authenticate with the third party registry
            - -

            Get an external repository details

            -
            import dockercloud
            -
            -repository = dockercloud.Repository.fetch("registry.local/user1/image1")
            -
            -
            GET /api/repo/v1/repository/registry.local/user1/image1/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -repository, err = dockercloud.GetRepository("registry.local/user1/image1")
            -
            -if err != nil {
            -    log.Println(err)
            -}
            -
            -log.Println(repository)
            -
            -
            docker-cloud repository inspect registry.local/user1/image1
            -
            - -

            Gets all the details of an specific repository

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/repo/v1/[optional_namespace/]repository/(name)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            nameThe name of the repository to retrieve
            - -

            Update credentials of an external repository

            -
            import dockercloud
            -
            -repository = dockercloud.Repository.fetch("registry.local/user1/image1")
            -repository.username = "new username"
            -repository.password = "new password"
            -repository.save()
            -
            -
            PATCH /api/repo/v1/repository/registry.local/user1/image1/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -Content-Type: application/json
            -
            -{"username": "username", "password": "password"}
            -
            -
            docker-cloud repository update -n "new username" -p "new password" registry.local/user1/image1
            -
            - -

            Updates the external repository credentials.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            PATCH /api/repo/v1/[optional_namespace/]repository/(name)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            nameThe name of the repository to update
            - -

            JSON Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            usernameUsername to authenticate with the private registry
            passwordPassword to authenticate with the private registry
            - -

            Remove an external repository

            -
            import dockercloud
            -
            -repository = dockercloud.Repository.fetch("registry.local/user1/image1")
            -repository.delete()
            -
            -
            DELETE /api/repo/v1/repository/registry.local/user1/image1/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -repository, err = dockercloud.GetRepository("registry.local/user1/image1")
            -
            -if err != nil {
            -    log.Println(err)
            -}
            -
            -repository.Remove()
            -
            -
            docker-cloud repository rm registry.local/user1/image1
            -
            - -

            Removes the external repository from Docker Cloud. It won’t remove the repository from the third party registry where it’s stored.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            DELETE /api/repo/v1/[optional_namespace/]repository/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            nameThe name of the external repository to remove
            - -

            Stacks

            - -

            Stack

            - -
            -

            Example

            -
            -
            {
            -  "deployed_datetime": "Mon, 13 Oct 2014 11:01:43 +0000",
            -  "destroyed_datetime": null,
            -  "nickname": "deployment stack",
            -  "name": "dockercloud-app",
            -  "resource_uri": "/api/app/v1/user_namespace/stack/7fe7ec85-58be-4904-81da-de2219098d7c/",
            -  "services": [
            -    "/api/app/v1/user_namespace/service/09cbcf8d-a727-40d9-b420-c8e18b7fa55b/"
            -  ],
            -  "state": "Running",
            -  "synchronized": true,
            -  "uuid": "09cbcf8d-a727-40d9-b420-c8e18b7fa55b"
            -}
            -
            - -

            A stack is a logical grouping of closely related services, that may be linked with one another.

            - -

            This is a namespaced endpoint.

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            uuidA unique identifier for the stack generated automatically on creation
            resource_uriA unique API endpoint that represents the stack
            nameA user provided name for the stack.
            stateThe state of the stack (see table Stack states below)
            synchronizedFlag indicating if the current stack definition is synchronized with their services.
            servicesList of service resource URIs belonging to the stack
            deployed_datetimeThe date and time of the last deployment of the stack (if applicable, null otherwise)
            destroyed_datetimeThe date and time of the terminate operation on the stack (if applicable, null otherwise)
            nicknameA user-friendly name for the stack (name by default)
            - -

            Stack states

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            StateDescription
            Not RunningThe stack has been created and has no deployed services yet. Possible actions in this state: start, terminate.
            StartingAll services for the stack are either starting or already running. No actions allowed in this state.
            RunningAll services for the service are deployed and running. Possible actions in this state: redeploy, terminate.
            Partly runningOne or more services of the stack are deployed and running. Possible actions in this state: redeploy, terminate.
            StoppingAll services for the stack are either stopping or already stopped. No actions allowed in this state.
            StoppedAll services for the service are stopped. Possible actions in this state: start, redeploy, terminate.
            RedeployingThe stack is redeploying all its services with the updated configuration. No actions allowed in this state.
            TerminatingAll services for the stack are either being terminated or already terminated. No actions allowed in this state.
            TerminatedThe stack and all its services have been terminated. No actions allowed in this state.
            - -

            List all stacks

            -
            import dockercloud
            -
            -stacks = dockercloud.Stack.list()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -stackList, err := dockercloud.ListStacks()
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(stackList)
            -
            -
            GET /api/app/v1/stack/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud stack ls
            -
            - -

            Lists all current and recently terminated stacks. Returns a list of Stack objects.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/app/v1/[optional_namespace/]stack/

            - -

            Query Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            uuidFilter by UUID
            nameFilter by stack name
            - -

            Create a new stack

            -
            import dockercloud
            -
            -stack = dockercloud.Stack.create(name="my-new-stack", services=[{"name": "hello-word", "image": "tutum/hello-world", "target_num_containers": 2}])
            -stack.save()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -stack, err := dockercloud.CreateStack(dockercloud.StackCreateRequest{Name: "my-new-stack", Services: []dockercloud.ServiceCreateRequest{{Image: "tutum/hello-world", Name: "test", Target_num_containers: 2}}})
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(stack)
            -
            -
            POST /api/app/v1/stack/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -Content-Type: application/json
            -
            -{
            -    "name": "my-new-stack",
            -    "services": [
            -        {
            -            "name": "hello-word",
            -            "image": "tutum/hello-world",
            -            "target_num_containers": 2,
            -            "linked_to_service": [
            -                {
            -                    "to_service": "database",
            -                    "name": "DB"
            -                }
            -            ]
            -        },
            -        {
            -            "name": "database",
            -            "image": "tutum/mysql"
            -        }
            -    ]
            -}
            -
            -
            docker-cloud stack create --name hello-world -f docker-compose.yml
            -
            - -

            Creates a new stack without starting it. Note that the JSON syntax is abstracted by both, the Docker Cloud CLI and our UI, in order to use Stack YAML files.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]stack/

            - -

            JSON Parameters

            - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            name(required) A human-readable name for the stack, i.e. my-hello-world-stack
            nickname(optional) A user-friendly name for the stack (name by default)
            services(optional) List of services belonging to the stack. Each service accepts the same parameters as a Create new service operation (default: []) plus the ability to refer “links” and “volumes-from” by the name of another service in the stack (see example).
            - -

            Export an existing stack

            -
            import dockercloud
            -
            -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
            -stack.export()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = stack.Export(); err != nil {
            -   log.Println(err)
            -}
            -
            -
            GET /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/export/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud stack export 46aca402
            -
            - -

            Get a JSON representation of the stack following the Stack YAML representation.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/app/v1/[optional_namespace/]stack/(uuid)/export/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the stack to retrieve
            - -

            Get an existing stack

            -
            import dockercloud
            -
            -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(stack)
            -
            -
            GET /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud stack inspect 46aca402-2109-4a70-a378-760cfed43816
            -
            - -

            Get all the details of an specific stack

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/app/v1/[optional_namespace/]stack/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the stack to retrieve
            - -

            Update an existing stack

            -
            import dockercloud
            -
            -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
            -stack.services = {"services": [{"name": "hello-word", "image": "tutum/hello-world", "target_num_containers": 2}]}
            -stack.save()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = stack.Update(dockercloud.StackCreateRequest{Services: []dockercloud.ServiceCreateRequest{{Name: "hello-world", Image: "tutum/hello-world", Target_num_containers: 2}}}); err != nil {
            -   log.Println(err)
            -}
            -
            -
            PATCH /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -Content-Type: application/json
            -
            -{
            -    "services": [
            -        {
            -            "name": "hello-word",
            -            "image": "tutum/hello-world",
            -            "target_num_containers": 3,
            -            "linked_to_service": [
            -                {
            -                    "to_service": "database",
            -                    "name": "DB"
            -                }
            -            ]
            -        },
            -        {
            -            "name": "database",
            -            "image": "tutum/mysql"
            -        }
            -    ]
            -}
            -
            -
            docker-cloud stack update -f docker-compose.yml 46aca402
            -
            - -

            Updates the details of every service in the stack.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            PATCH /api/app/v1/[optional_namespace/]stack/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the stack to update
            - -

            JSON Parameters

            - - - - - - - - - - - -
            ParameterDescription
            services(optional) List of services belonging to the stack. Each service accepts the same parameters as a Update an existing service operation (default: []) plus the ability to refer “links” and “volumes-from” by the name of another service in the stack (see example).
            - -

            Stop a stack

            -
            import dockercloud
            -
            -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
            -stack.stop()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = stack.Stop(); err != nil {
            -   log.Println(err)
            -}
            -
            -
            POST /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/stop/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud stack stop 46aca402-2109-4a70-a378-760cfed43816
            -
            - -

            Stops the services in the stack.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]stack/(uuid)/stop/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the stack to stop
            - -

            Start a stack

            -
            import dockercloud
            -
            -stack = dockercloud.Stack.fetch()
            -stack.start()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = stack.Start(); err != nil {
            -   log.Println(err)
            -}
            -
            -
            POST /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/start/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud stack start 46aca402
            -
            - -

            Starts the services in the stack.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]stack/(uuid)/start/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the stack to start
            - -

            Redeploy a stack

            -
            import dockercloud
            -
            -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
            -stack.redeploy()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: true}) to reuse the existing volumes
            -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}) to not reuse the existing volumes
            -if err = stack.Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}); err != nil {
            -   log.Println(err)
            -}
            -
            -
            POST /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/redeploy/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud stack redeploy 46aca402
            -
            - -

            Redeploys all the services in the stack.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]stack/(uuid)/redeploy/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the stack to redeploy
            - -

            Query Parameters

            - - - - - - - - - - - -
            ParameterDescription
            reuse_volumesWheather to reuse container volumes for this redeploy operation or not (default: true).
            - -

            Terminate a stack

            -
            import dockercloud
            -
            -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
            -stack.delete()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = stack.Terminate(); err != nil {
            -   log.Println(err)
            -}
            -
            -
            DELETE /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud stack terminate 46aca402
            -
            - -

            Terminate all the services in a the stack and the stack itself.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            DELETE /api/app/v1/[optional_namespace/]stack/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the stack to terminate
            - -

            Services

            - -

            Service

            - -
            -

            Example

            -
            -
            {
            -  "autodestroy": "OFF",
            -  "autoredeploy": false,
            -  "autorestart": "ON_FAILURE",
            -  "bindings": [
            -    {
            -        "host_path": null,
            -        "container_path": "/tmp",
            -        "rewritable": true,
            -        "volumes_from": null
            -    },
            -    {
            -        "host_path": "/etc",
            -        "container_path": "/etc",
            -        "rewritable": true,
            -        "volumes_from": null
            -    },
            -    {
            -        "host_path": null,
            -        "container_path": null,
            -        "rewritable": true,
            -        "volumes_from": "/api/app/v1/user_namespace/service/2f4f54e5-9d3b-4ac1-85ad-a2d4ff25a179/"
            -    }
            -  ],
            -  "cap_add": [
            -    "ALL"
            -  ],
            -  "cap_drop": [
            -    "NET_ADMIN",
            -    "SYS_ADMIN"
            -  ],
            -  "container_envvars": [
            -    {
            -      "key": "DB_PASS",
            -      "value": "test"
            -    }
            -  ],
            -  "container_ports": [
            -    {
            -      "endpoint_uri": "http://wordpress-stackable.admin.srv.dockerapp.io:80/",
            -      "inner_port": 80,
            -      "outer_port": 80,
            -      "port_name": "http",
            -      "protocol": "tcp",
            -      "published": true
            -    }
            -  ],
            -  "containers": [
            -    "/api/app/v1/user_namespace/container/6f8ee454-9dc3-4387-80c3-57aac1be3cc6/",
            -    "/api/app/v1/user_namespace/container/fdf9c116-7c08-4a60-b0ce-c54ca72c2f25/"
            -  ],
            -  "cpu_shares": 100,
            -  "cpuset": "0,1",
            -  "cgroup_parent": "m-executor-abcd",
            -  "current_num_containers": 2,
            -  "deployed_datetime": "Mon, 13 Oct 2014 11:01:43 +0000",
            -  "deployment_strategy": "EMPTIEST_NODE",
            -  "destroyed_datetime": null,
            -  "devices": [
            -    "/dev/ttyUSB0:/dev/ttyUSB0"
            -  ],
            -  "dns": [
            -    "8.8.8.8"
            -  ],
            -  "dns_search": [
            -    "example.com"
            -  ],
            -  "domainname": "domainname",
            -  "entrypoint": "",
            -  "extra_hosts": [
            -    "onehost:50.31.209.229"
            -  ],
            -  "hostname": "hostname",
            -  "image_name": "tutum/wordpress-stackable:latest",
            -  "nickname": "wordpress-stackable",
            -  "labels": {
            -    "com.example.description": "Accounting webapp",
            -    "com.example.department": "Finance",
            -    "com.example.label-with-empty-value": ""
            -  },
            -  "link_variables": {
            -    "WORDPRESS_STACKABLE_1_ENV_DB_HOST": "**LinkMe**",
            -    "WORDPRESS_STACKABLE_1_ENV_DB_NAME": "wordpress",
            -    "WORDPRESS_STACKABLE_1_ENV_DB_PASS": "szVaPz925B7I",
            -    "WORDPRESS_STACKABLE_1_ENV_DB_PORT": "**LinkMe**",
            -    "WORDPRESS_STACKABLE_1_ENV_DB_USER": "admin",
            -    "WORDPRESS_STACKABLE_1_ENV_DEBIAN_FRONTEND": "noninteractive",
            -    "WORDPRESS_STACKABLE_1_ENV_HOME": "/",
            -    "WORDPRESS_STACKABLE_1_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            -    "WORDPRESS_STACKABLE_1_PORT": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153",
            -    "WORDPRESS_STACKABLE_1_PORT_80_TCP": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153",
            -    "WORDPRESS_STACKABLE_1_PORT_80_TCP_ADDR": "wordpress-stackable-1.admin.cont.dockerapp.io",
            -    "WORDPRESS_STACKABLE_1_PORT_80_TCP_PORT": "49153",
            -    "WORDPRESS_STACKABLE_1_PORT_80_TCP_PROTO": "tcp",
            -    "WORDPRESS_STACKABLE_2_ENV_DB_HOST": "**LinkMe**",
            -    "WORDPRESS_STACKABLE_2_ENV_DB_NAME": "wordpress",
            -    "WORDPRESS_STACKABLE_2_ENV_DB_PASS": "szVaPz925B7I",
            -    "WORDPRESS_STACKABLE_2_ENV_DB_PORT": "**LinkMe**",
            -    "WORDPRESS_STACKABLE_2_ENV_DB_USER": "admin",
            -    "WORDPRESS_STACKABLE_2_ENV_DEBIAN_FRONTEND": "noninteractive",
            -    "WORDPRESS_STACKABLE_2_ENV_HOME": "/",
            -    "WORDPRESS_STACKABLE_2_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            -    "WORDPRESS_STACKABLE_2_PORT": "tcp://wordpress-stackable-2.admin.cont.dockerapp.io:49154",
            -    "WORDPRESS_STACKABLE_2_PORT_80_TCP": "tcp://wordpress-stackable-2.admin.cont.dockerapp.io:49154",
            -    "WORDPRESS_STACKABLE_2_PORT_80_TCP_ADDR": "wordpress-stackable-2.admin.cont.dockerapp.io",
            -    "WORDPRESS_STACKABLE_2_PORT_80_TCP_PORT": "49154",
            -    "WORDPRESS_STACKABLE_2_PORT_80_TCP_PROTO": "tcp",
            -    "WORDPRESS_STACKABLE_ENV_DB_HOST": "**LinkMe**",
            -    "WORDPRESS_STACKABLE_ENV_DB_NAME": "wordpress",
            -    "WORDPRESS_STACKABLE_ENV_DB_PASS": "szVaPz925B7I",
            -    "WORDPRESS_STACKABLE_ENV_DB_PORT": "**LinkMe**",
            -    "WORDPRESS_STACKABLE_ENV_DB_USER": "admin",
            -    "WORDPRESS_STACKABLE_ENV_DEBIAN_FRONTEND": "noninteractive",
            -    "WORDPRESS_STACKABLE_ENV_HOME": "/",
            -    "WORDPRESS_STACKABLE_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            -    "WORDPRESS_STACKABLE_PORT": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153",
            -    "WORDPRESS_STACKABLE_PORT_80_TCP": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153",
            -    "WORDPRESS_STACKABLE_PORT_80_TCP_ADDR": "wordpress-stackable-1.admin.cont.dockerapp.io",
            -    "WORDPRESS_STACKABLE_PORT_80_TCP_PORT": "49153",
            -    "WORDPRESS_STACKABLE_PORT_80_TCP_PROTO": "tcp",
            -    "WORDPRESS_STACKABLE_DOCKERCLOUD_API_URL": "https://cloud.docker.com/api/app/v1/user_namespace/service/adeebc1b-1b81-4af0-b8f2-cefffc69d7fb/"
            -  },
            -  "linked_from_service": [],
            -  "linked_to_service": [
            -    {
            -      "from_service": "/api/app/v1/user_namespace/service/09cbcf8d-a727-40d9-b420-c8e18b7fa55b/",
            -      "name": "DB",
            -      "to_service": "/api/app/v1/user_namespace/service/72f175bd-390b-46e3-9463-830aca32ce3e/"
            -    }
            -  ],
            -  "mac_address": "02:42:ac:11:65:43",
            -  "memory": 2048,
            -  "memory_swap": 8192,
            -  "name": "wordpress-stackable",
            -  "net": "bridge",
            -  "privileged": false,
            -  "public_dns": "wordpress-stackable.admin.svc.dockerapp.io",
            -  "read_only": true,
            -  "resource_uri": "/api/app/v1/user_namespace/service/09cbcf8d-a727-40d9-b420-c8e18b7fa55b/",
            -  "roles": ["global"],
            -  "run_command": "/run-wordpress.sh",
            -  "running_num_containers": 1,
            -  "security_opt": [
            -  ],
            -  "sequential_deployment": false,
            -  "started_datetime": "Mon, 13 Oct 2014 11:01:43 +0000",
            -  "state": "Partly running",
            -  "stack": "/api/app/v1/user_namespace/stack/46aca402-2109-4a70-a378-760cfed43816/",
            -  "stdin_open": false,
            -  "stopped_datetime": null,
            -  "stopped_num_containers": 0,
            -  "synchronized": true,
            -  "tags": [
            -        {"name": "tag_one"},
            -        {"name": "tag-two"},
            -        {"name": "tagthree3"}
            -  ],
            -  "target_num_containers": 2,
            -  "tty": false,
            -  "user": "root",
            -  "uuid": "09cbcf8d-a727-40d9-b420-c8e18b7fa55b",
            -  "working_dir": "/app"
            -}
            -
            - -

            A service is a template used to deploy one or more containers.

            - -

            This is a namespaced endpoint.

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            uuidA unique identifier for the service generated automatically on creation
            resource_uriA unique API endpoint that represents the service
            image_nameThe Docker image name and tag used for the service containers
            nameA user provided name for the service. This name will be inherited by the service containers and will be used in endpoint URLs, environment variable names, etc.
            public_dnsAn external FQDN that resolves to all IPs of the nodes where the service containers are running on (as an A record with multiple IP entries which will be used by clients in a round-robin fashion). If the service is not publishing any ports, this FQDN will fail to resolve.
            stateThe state of the service (see table Service states below)
            netNetwork mode to set on the containers (see table Network Modes below, more information /docker-cloud/apps/service-links/)
            pidSet the PID (Process) Namespace mode for the containers (more information)
            synchronizedFlag indicating if the current service definition is synchronized with the current containers.
            deployed_datetimeThe date and time of the last deployment of the service (if applicable, null otherwise)
            started_datetimeThe date and time of the last start operation on the service (if applicable, null otherwise)
            stopped_datetimeThe date and time of the last stop operation on the service (if applicable, null otherwise)
            destroyed_datetimeThe date and time of the terminate operation on the service (if applicable, null otherwise)
            target_num_containersThe requested number of containers to deploy for the service
            current_num_containersThe actual number of containers deployed for the service
            running_num_containersThe actual number of containers deployed for the service in Running state
            stopped_num_containersThe actual number of containers deployed for the service in Stopped state
            stackResource URIs of the stack that the service belongs to
            containersList of resource URIs of the containers launched as part of the service
            container_portsList of ports to be published on the containers of this service (see table Service Port attributes below)
            container_envvarsList of user-defined environment variables to set on the containers of the service, which will override the image environment variables (see table Service Environment Variable attributes below)
            labelsMetadata in form of dictionary used for every container of this service
            working_dirWorking directory for running binaries within a container of this service
            userSet the user used on containers of this service (root by default)
            hostnameSet the hostname used on containers of this service
            domainnameSet the domainname used on containers of this service
            mac_addressEthernet device’s MAC address used on containers of this service
            cgroup_nameOptional parent cgroup used on containers of this service.
            ttyIf the containers of this service have the tty enable (false by default)
            stdin_openIf the containers of this service have stdin opened (false by default)
            dnsCustom DNS servers for containers of this service
            dns_searchCustom DNS search domain for containers of this service
            cap_addAdded capabilities for containers of this service
            cap_dropDropped capabilities for containers of this service
            devicesList of device mappings for containers of this service
            extra_hostsList of hostname mappings for containers of this service
            secuirty_optLabeling scheme for containers of this service
            entrypointEntrypoint to be set on the containers launched as part of the service, which will override the image entrypoint
            run_commandRun command to be set on the containers launched as part of the service, which will override the image run command
            sequential_deploymentWhether the containers for this service should be deployed in sequence, linking each of them to the previous containers (see Service scaling for more information)
            cpu_sharesThe relative CPU priority of the containers of the service (see Runtime Constraints on CPU and Memory for more information)
            cpusetCPUs in which to allow execution
            memoryThe memory limit of the containers of the service in MB (see Runtime Constraints on CPU and Memory for more information)
            memory_swapTotal memory limit (memory + swap) of the containers of the service in MB
            linked_from_serviceA list of services that are linked to this one (see table Related services attributes below)
            linked_to_serviceA list of services that the service is linked to (see table Related services attributes below)
            bindingsA list of volume bindings that the service has mounted (see table Service binding attributes below)
            autorestartWhether to restart the containers of the service automatically if they stop (see Crash recovery for more information)
            autodestroyWhether to terminate the containers of the service automatically if they stop (see Autodestroy for more information)
            rolesList of Docker Cloud roles assigned to this service (see Service links for more information)
            link_variablesList of environment variables that would be exposed in the containers if they are linked to this service
            privilegedWhether to start the containers with Docker’s privileged flag set or not, which allows containers to access all devices on the host among other things (see Runtime privilege for more information)
            read_onlyWhether the filesystem of every service container is read-only or not (false by default)
            deployment_strategyContainer distribution among nodes (see table Deployment strategies below and Deployment strategies for more information)
            tagsList of tags to be used to deploy the service (see Tags for more information)
            autoredeployWhether to redeploy the containers of the service when its image is updated in Docker Cloud registry (see Docker Cloud’s private registry for more information)
            nicknameA user-friendly name for the service (name by default)
            - -

            Service binding attributes

            - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            host_pathThe host path of the volume
            container_pathThe container path where the volume is mounted
            rewritabletrue is the volume has writable permissions
            volumes_fromThe resource URI of the service
            - -

            Service Port attributes

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            protocolThe protocol of the port, either tcp or udp
            inner_portThe published port number inside the container
            outer_portThe published port number in the node public network interface
            port_nameName of the service associated to this port
            endpoint_uriThe URI of the service endpoint for this port
            publishedWhether the port has been published in the host public network interface or not. Non-published ports can only be accessed via links.
            - -

            Service Environment Variable attributes

            - - - - - - - - - - - - - - - -
            AttributeDescription
            keyThe name of the environment variable
            valueThe value of the environment variable
            - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            nameThe link name
            from_serviceThe resource URI of the origin of the link
            to_serviceThe resource URI of the target of the link
            - -

            Service states

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            StateDescription
            Not runningThe service has been created and has no deployed containers yet. Possible actions in this state: start, terminate.
            StartingAll containers for the service are either starting or already running. No actions allowed in this state.
            RunningAll containers for the service are deployed and running. Possible actions in this state: stop, redeploy, terminate.
            Partly runningOne or more containers of the service are deployed and running. Possible actions in this state: stop, redeploy, terminate.
            ScalingThe service is either deploying new containers or destroying existing ones responding to a scaling request. No actions allowed in this state.
            RedeployingThe service is redeploying all its containers with the updated configuration. No actions allowed in this state.
            StoppingAll containers for the service are either stopping or already stopped. No actions allowed in this state.
            StoppedAll containers for the service are stopped. Possible actions in this state: start, redeploy, terminate.
            TerminatingAll containers for the service are either being terminated or already terminated. No actions allowed in this state.
            TerminatedThe service and all its containers have been terminated. No actions allowed in this state.
            - -

            Deployment strategies

            - - - - - - - - - - - - - - - - - - - -
            StrategyDescription
            EMPTIEST_NODEIt will deploy containers to the node with the lower total amount of running containers (default).
            HIGH_AVAILABILITYIt will deploy containers to the node with the lower amount of running containers of the same service.
            EVERY_NODEIt will deploy one container on every node. The service won’t be able to scale manually. New containers will be deployed to new nodes automatically.
            - -

            Network Modes

            - - - - - - - - - - - - - - - -
            StrategyDescription
            bridgeCreates a new network stack for the container on the docker bridge.
            hostUses the host network stack inside the container.
            - -

            List all services

            -
            import dockercloud
            -
            -services = dockercloud.Service.list()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -serviceList, err := dockercloud.ListServices()
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(serviceList)
            -
            -
            GET /api/app/v1/service/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud service ps
            -
            - -

            Lists all current and recently terminated services. Returns a list of Service objects.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/app/v1/[optional_namespace/]service/

            - -

            Query Parameters

            - - - - - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            uuidFilter by UUID
            stateFilter by state. Possible values: Not running, Starting, Running, Partly running, Scaling, Redeploying, Stopping, Stopped, Terminating, Terminated
            nameFilter by service name
            stackFilter by resource URI of the target stack.
            - -

            Create a new service

            -
            import dockercloud
            -
            -service = dockercloud.Service.create(image="tutum/hello-world", name="my-new-app", target_num_containers=2)
            -service.save()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -service, err := dockercloud.CreateService(dockercloud.ServiceCreateRequest{Image: "tutum/hello-world",  Name: "my-new-app", Target_num_containers: 2})
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(service)
            -
            -
            POST /api/app/v1/service/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -Content-Type: application/json
            -
            -{"image": "tutum/hello-world", "name": "my-new-app", "target_num_containers": 2}
            -
            -
            docker-cloud service create -t 2 --name my-new-app tutum/hello-world
            -
            - -

            Creates a new service without starting it.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]service/

            - -

            JSON Parameters

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            image(required) The image used to deploy this service in docker format, i.e. tutum/hello-world
            name(optional) A human-readable name for the service, i.e. my-hello-world-app (default: image without namespace)
            target_num_containers(optional) The number of containers to run for this service initially (default: 1)
            run_command(optional) The command used to start the containers of this service, overriding the value specified in the image, i.e. /run.sh (default: null)
            entrypoint(optional) The command prefix used to start the containers of this service, overriding the value specified in the image, i.e. /usr/sbin/sshd (default: null)
            container_ports(optional) An array of objects with port information to be published in the containers for this service, which will be added to the image port information, i.e. [{"protocol": "tcp", "inner_port": 80, "outer_port": 80}] (default: []) (See table Service Port attributes below)
            container_envvars(optional) An array of objects with environment variables to be added in the service containers on launch (overriding any image-defined environment variables), i.e. [{"key": "DB_PASSWORD", "value": "mypass"}] (default: []) (See table Service Environment Variable attributes below)
            linked_to_service(optional) An array of service resource URIs to link this service to, including the link name, i.e. [{"to_service": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "name": "db"}] (default: []) (See table Related services attributes below)
            bindings(optional) An array of bindings this service has to mount, i.e. [{"volumes_from": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "rewritable": true}] (default: []) (See table Related bindings attributes below)
            autorestart(optional) Whether the containers for this service should be restarted if they stop, i.e. ALWAYS (default: OFF, possible values: OFF, ON_FAILURE, ALWAYS) (see Crash recovery for more information)
            autodestroy(optional) Whether the containers should be terminated if they stop, i.e. OFF (default: OFF, possible values: OFF, ON_SUCCESS, ALWAYS) (see Autodestroy for more information)
            sequential_deployment(optional) Whether the containers should be launched and scaled in sequence, i.e. true (default: false) (see Service scaling for more information)
            roles(optional) A list of Docker Cloud API roles to grant the service, i.e. ["global"] (default: [], possible values: global) (see Service links for more information)
            privileged(optional) Whether to start the containers with Docker’s privileged flag set or not, i.e. false (default: false) (see Runtime privilege for more information)
            deployment_strategy(optional) Container distribution among nodes (default: EMPTIEST_NODE, see table Deployment strategies above and Deployment strategies for more information)
            tags(optional) A list of tags to be used to deploy the service (see Tags for more information) (default: [])
            autoredeploy(optional) Whether to redeploy the containers of the service when its image is updated in Docker Cloud registry (default: false) (see Docker Cloud’s private registry for more information)
            net(optional) Set the network mode to the containers (default: bridge, possible values: bridge, host)
            pid(optional) Set the PID (Process) Namespace mode for the containers (default: none value, possible values: none, host)
            working_dir(optional) Working directory for running binaries within a container of this service (default: /)
            nickname(optional) A user-friendly name for the service (name by default)
            - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            host_path(optional) The host path of the volume
            container_path(required if volumes_from is omitted) The container path where the volume is mounted
            rewritable(optional) true is the volume has writable permissions (default: true)
            volumes_from(required if container_path is omitted) The resource URI of the service
            - -

            Service Port attributes

            - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            protocol(required) The protocol of the port, either tcp or udp
            inner_port(required) The port number inside the container to be published
            outer_port(optional) The port number in the node public network interface to be published (default: dynamic allocation if published is true)
            published(optional) Whether to publish the port in the host public network interface or not. Non-published ports can only be accessed via links. (default: false)
            - -

            Service Environment Variable attributes

            - - - - - - - - - - - - - - - -
            AttributeDescription
            key(required) The name of the environment variable
            value(required) The value of the environment variable
            - - - - - - - - - - - - - - - - - -
            AttributeDescription
            to_service(required) The resource URI of the target of the link
            name(optional) The link name
            - -

            Get an existing service

            -
            import dockercloud
            -
            -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(service)
            -
            -
            GET /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud service inspect 7eaf7fff
            -
            - -

            Get all the details of an specific service

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/app/v1/[optional_namespace/]service/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the service to retrieve
            - -

            Get the logs of a service

            - -
            -

            Example log line

            -
            -
            {
            -    "type": "log",
            -    "source": "wordpress-stackable-1",
            -    "log": "Log line from the container indicated by 'source'",
            -    "streamType": "stdout",
            -    "timestamp": 1433779324
            -}
            -
            -
            import dockercloud
            -
            -def log_handler(message):
            -    print message
            -
            -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -service.logs(tail=300, follow=True, log_handler=log_handler)
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -c := make(chan Logs)
            -
            -go service.Logs(c)
            -    for {
            -        s := <-c
            -        log.Println(s)
            -    }
            -
            -
            GET /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1
            -Host: ws.cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Connection: Upgrade
            -Upgrade: websocket
            -
            -
            docker-cloud service logs 7eaf7fff
            -
            - -

            Get the aggregated logs of all the containers of the service.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s STREAM API

            - -

            HTTP Request

            - -

            GET /api/app/v1/[optional_namespace/]service/(uuid)/logs/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the service to retrieve logs
            - -

            Query Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            tailNumber of lines to show from the end of the logs (default: 300)
            followWhether to stream logs or close the connection immediately (default: true)
            - -

            Update an existing service

            -
            import dockercloud
            -
            -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -service.target_num_containers = 3
            -service.tags.append({"name":"tag-1"})
            -service.save()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = service.Update(dockercloud.ServiceCreateRequest{Target_num_containers: 3}); err != nil {
            -   log.Println(err)
            -}
            -
            -
            PATCH /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -Content-Type: application/json
            -
            -{"autorestart": "ON_FAILURE", "autodestroy": "OFF", "container_envvars": [{"key": "DB_PASSWORD", "value": "mypass"}],
            -"container_ports": [{"protocol": "tcp", "inner_port": 80, "outer_port": 80}], "cpu_shares": 512,
            -"entrypoint": "/usr/sbin/sshd", "image": "tutum/hello-world",
            -"linked_to_service": [{"to_service": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "name": "db"}],
            -"memory": 2048, "privileged": True, "roles": ["global"], "run_command": "/run.sh", "sequential_deployment": False,
            -"tags": [{"name": "tag-1"}], "target_num_containers": 3, "autoredeploy": False}
            -
            -
            -
            docker-cloud service scale 7eaf7fff 3
            -docker-cloud tag add -t tag-1 7eaf7fff
            -docker-cloud tag set -t tag-2 7eaf7fff
            -
            - -

            Updates the service details.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            PATCH /api/app/v1/[optional_namespace/]service/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the service to update
            - -

            JSON Parameters

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            autorestart(optional) Whether the containers for this service should be restarted if they stop, i.e. ALWAYS (possible values: OFF, ON_FAILURE, ALWAYS) (see Crash recovery for more information)
            autodestroy(optional) Whether the containers should be terminated if they stop, i.e. OFF (possible values: OFF, ON_SUCCESS, ALWAYS) (see Autodestroy for more information)
            container_envvars(optional) An array of objects with environment variables to be added in the service containers on launch (overriding any image-defined environment variables), i.e. [{"key": "DB_PASSWORD", "value": "mypass"}] (See table Service Environment Variable attributes)
            container_ports(optional) An array of objects with port information to be published in the containers for this service, which will be added to the image port information, i.e. [{"protocol": "tcp", "inner_port": 80, "outer_port": 80}] (See table Service Port attributes)
            cpu_shares(optional) The relative CPU priority of the containers the service describes (see Runtime Constraints on CPU and Memory for more information)
            entrypoint(optional) The command prefix used to start the containers of this service, overriding the value specified in the image, i.e. /usr/sbin/sshd
            image(optional) The image used to deploy this service in docker format, i.e. tutum/hello-world, tutum/ubuntu:5.6. If no tag is indicated, it will be set to latest by default
            linked_to_service(optional) An array of service resource URIs to link this service to, including the link name, i.e. [{"to_service": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "name": "db"}] (See table Related services attributes below)
            memory(optional) The memory limit of the containers of the service in MB (see Runtime Constraints on CPU and Memory for more information)
            privileged(optional) Whether to start the containers with Docker’s privileged flag set or not, i.e. false (see Runtime privilege for more information)
            roles(optional) A list of Docker Cloud API roles to grant the service, i.e. ["global"] (possible values: global) (see Service links for more information)
            run_command(optional) The command used to start the containers of this service, overriding the value specified in the image, i.e. /run.sh
            sequential_deployment(optional) Whether the containers should be launched and scaled in sequence, i.e. true (see Service scaling for more information)
            tags(optional) List of new tags the service will have. This operation replaces the tag list
            target_num_containers(optional) The number of containers to scale this service to
            deployment_strategy(optional) Container distribution among nodes. A service cannot be updated to or from a deployment strategy of EVERY_NODE. (See table Deployment strategies above and Deployment strategies for more information)
            autoredeployWhether to redeploy the containers of the service when its image is updated in Docker Cloud registry (see Docker Cloud’s private registry for more information)
            net(optional) Set the network mode to the containers (default: bridge, possible values: bridge, host)
            pid(optional) Set the PID (Process) Namespace mode for the containers (default: none value, possible values: none, host)
            working_dir(optional) Working directory for running binaries within a container of this service (default: /)
            nickname(optional) A user-friendly name for the service (name by default)
            - -

            Start a service

            -
            import dockercloud
            -
            -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -service.start()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = service.Start(); err != nil {
            -   log.Println(err)
            -}
            -
            -
            POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud service start 7eaf7fff
            -
            - -

            Starts all containers in a stopped or partly running service.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]service/(uuid)/start/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the service to start
            - -

            Stop a service

            -
            import dockercloud
            -
            -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -service.stop()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = service.Stop(); err != nil {
            -   log.Println(err)
            -}
            -
            -
            POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/stop/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud service stop 7eaf7fff
            -
            - -

            Stops all containers in a running or partly running service.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]service/(uuid)/stop/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the service to stop
            - -

            Scale a service

            -
            import dockercloud
            -
            -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -service.target_num_containers = 3
            -service.save()
            -service.scale()
            -
            -
            POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/scale/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud service scale 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce 3
            -
            - -

            Scales the service to its current target_num_containers field.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]service/(uuid)/scale/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the service to scale
            - -

            Redeploy a service

            -
            import dockercloud
            -
            -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -service.redeploy()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: true}) to reuse the existing volumes
            -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}) to not reuse the existing volumes
            -if err = service.Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}); err != nil {
            -   log.Println(err)
            -}
            -
            -
            POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/redeploy/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud service redeploy 7eaf7fff
            -
            - -

            Redeploys all containers in the service with the current service configuration.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]service/(uuid)/redeploy/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the service to redeploy
            - -

            Query Parameters

            - - - - - - - - - - - -
            ParameterDescription
            reuse_volumesWheather to reuse container volumes for this redeploy operation or not (default: true).
            - -

            Terminate a service

            -
            import dockercloud
            -
            -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -service.delete()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -if err = service.Terminate(); err != nil {
            -   log.Println(err)
            -}
            -
            -
            DELETE /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud service terminate 7eaf7fff
            -
            - -

            Terminate all the containers in a service and the service itself. This is not reversible. All the data stored in all containers of the service will be permanently deleted.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            DELETE /api/app/v1/[optional_namespace/]service/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the service to terminate
            - -

            Containers

            - -

            Container

            - -
            -

            Example

            -
            -
            {
            -    "autodestroy": "OFF",
            -    "autorestart": "OFF",
            -    "bindings": [
            -        {
            -            "volume": "/api/infra/v1/user_namespace/volume/1863e34d-6a7d-4945-aefc-8f27a4ab1a9e/",
            -            "host_path": null,
            -            "container_path": "/data",
            -            "rewritable": true
            -        },
            -        {
            -            "volume": null,
            -            "host_path": "/etc",
            -            "container_path": "/etc",
            -            "rewritable": true
            -        }
            -    ],
            -    "cap_add": [
            -        "ALL"
            -    ],
            -    "cap_drop": [
            -        "NET_ADMIN",
            -        "SYS_ADMIN"
            -    ],
            -    "container_envvars": [
            -        {
            -            "key": "DB_1_ENV_DEBIAN_FRONTEND",
            -            "value": "noninteractive"
            -        },
            -        {
            -            "key": "DB_1_ENV_MYSQL_PASS",
            -            "value": "**Random**"
            -        },
            -        {
            -            "key": "DB_1_ENV_MYSQL_USER",
            -            "value": "admin"
            -        },
            -        {
            -            "key": "DB_1_ENV_PATH",
            -            "value": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            -        },
            -        {
            -            "key": "DB_1_ENV_REPLICATION_MASTER",
            -            "value": "**False**"
            -        },
            -        {
            -            "key": "DB_1_ENV_REPLICATION_PASS",
            -            "value": "replica"
            -        },
            -        {
            -            "key": "DB_1_ENV_REPLICATION_SLAVE",
            -            "value": "**False**"
            -        },
            -        {
            -            "key": "DB_1_ENV_REPLICATION_USER",
            -            "value": "replica"
            -        },
            -        {
            -            "key": "DB_1_PORT",
            -            "value": "tcp://172.16.0.3:3306"
            -        },
            -        {
            -            "key": "DB_1_PORT_3306_TCP",
            -            "value": "tcp://172.16.0.3:3306"
            -        },
            -        {
            -            "key": "DB_1_PORT_3306_TCP_ADDR",
            -            "value": "172.16.0.3"
            -        },
            -        {
            -            "key": "DB_1_PORT_3306_TCP_PORT",
            -            "value": "3306"
            -        },
            -        {
            -            "key": "DB_1_PORT_3306_TCP_PROTO",
            -            "value": "tcp"
            -        },
            -        {
            -            "key": "DB_ENV_DEBIAN_FRONTEND",
            -            "value": "noninteractive"
            -        },
            -        {
            -            "key": "DB_ENV_MYSQL_PASS",
            -            "value": "**Random**"
            -        },
            -        {
            -            "key": "DB_ENV_MYSQL_USER",
            -            "value": "admin"
            -        },
            -        {
            -            "key": "DB_ENV_PATH",
            -            "value": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            -        },
            -        {
            -            "key": "DB_ENV_REPLICATION_MASTER",
            -            "value": "**False**"
            -        },
            -        {
            -            "key": "DB_ENV_REPLICATION_PASS",
            -            "value": "replica"
            -        },
            -        {
            -            "key": "DB_ENV_REPLICATION_SLAVE",
            -            "value": "**False**"
            -        },
            -        {
            -            "key": "DB_ENV_REPLICATION_USER",
            -            "value": "replica"
            -        },
            -        {
            -            "key": "DB_PASS",
            -            "value": "szVaPz925B7I"
            -        },
            -        {
            -            "key": "DB_PORT",
            -            "value": "tcp://172.16.0.3:3306"
            -        },
            -        {
            -            "key": "DB_PORT_3306_TCP",
            -            "value": "tcp://172.16.0.3:3306"
            -        },
            -        {
            -            "key": "DB_PORT_3306_TCP_ADDR",
            -            "value": "172.16.0.3"
            -        },
            -        {
            -            "key": "DB_PORT_3306_TCP_PORT",
            -            "value": "3306"
            -        },
            -        {
            -            "key": "DB_PORT_3306_TCP_PROTO",
            -            "value": "tcp"
            -        },
            -        {
            -            "key": "DB_DOCKERCLOUD_API_URL",
            -            "value": "https://cloud.docker.com/api/app/v1/user_namespace/service/c0fed1dc-c528-40c9-aa4c-dc00672ebcbf/"
            -        }
            -    ],
            -    "container_ports": [
            -        {
            -            "endpoint_uri": "http://wordpress-stackable-1.admin.cont.dockerapp.io:49153/",
            -            "inner_port": 80,
            -            "outer_port": 49153,
            -            "port_name": "http",
            -            "protocol": "tcp",
            -            "published": true,
            -            "uri_protocol": "http"
            -        }
            -    ],
            -    "cpu_shares": 100,
            -    "cpuset": "0,1",
            -    "cgroup_parent": "m-executor-abcd",
            -    "deployed_datetime": "Thu, 16 Oct 2014 12:04:08 +0000",
            -    "destroyed_datetime": null,
            -    "devices": [
            -        "/dev/ttyUSB0:/dev/ttyUSB0"
            -    ],
            -    "dns": [
            -        "8.8.8.8"
            -    ],
            -    "dns_search": [
            -        "example.com",
            -        "c1dd4e1e-1356-411c-8613-e15146633640.local.dockerapp.io"
            -    ],
            -    "domainname": "domainname",
            -    "entrypoint": "",
            -    "exit_code": null,
            -    "exit_code_msg": null,
            -    "extra_hosts": [
            -        "onehost:50.31.209.229"
            -    ],
            -    "hostname": "hostname",
            -    "image_name": "tutum/wordpress-stackable:latest",
            -    "labels": {
            -        "com.example.description": "Accounting webapp",
            -        "com.example.department": "Finance",
            -        "com.example.label-with-empty-value": ""
            -    },
            -    "linked_to_container": [
            -        {
            -            "endpoints": {
            -                "3306/tcp": "tcp://172.16.0.3:3306"
            -            },
            -            "from_container": "/api/app/v1/user_namespace/container/c1dd4e1e-1356-411c-8613-e15146633640/",
            -            "name": "DB_1",
            -            "to_container": "/api/app/v1/user_namespace/container/ba434e1e-1234-411c-8613-e15146633640/"
            -        }
            -    ],
            -    "link_variables": {
            -        "WORDPRESS_STACKABLE_1_ENV_DB_HOST": "**LinkMe**",
            -        "WORDPRESS_STACKABLE_1_ENV_DB_NAME": "wordpress",
            -        "WORDPRESS_STACKABLE_1_ENV_DB_PASS": "szVaPz925B7I",
            -        "WORDPRESS_STACKABLE_1_ENV_DB_PORT": "**LinkMe**",
            -        "WORDPRESS_STACKABLE_1_ENV_DB_USER": "admin",
            -        "WORDPRESS_STACKABLE_1_ENV_DEBIAN_FRONTEND": "noninteractive",
            -        "WORDPRESS_STACKABLE_1_ENV_HOME": "/",
            -        "WORDPRESS_STACKABLE_1_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            -        "WORDPRESS_STACKABLE_1_PORT": "tcp://172.16.0.2:80",
            -        "WORDPRESS_STACKABLE_1_PORT_80_TCP": "tcp://172.16.0.2:80",
            -        "WORDPRESS_STACKABLE_1_PORT_80_TCP_ADDR": "172.16.0.2",
            -        "WORDPRESS_STACKABLE_1_PORT_80_TCP_PORT": "80",
            -        "WORDPRESS_STACKABLE_1_PORT_80_TCP_PROTO": "tcp",
            -        "WORDPRESS_STACKABLE_ENV_DB_HOST": "**LinkMe**",
            -        "WORDPRESS_STACKABLE_ENV_DB_NAME": "wordpress",
            -        "WORDPRESS_STACKABLE_ENV_DB_PASS": "szVaPz925B7I",
            -        "WORDPRESS_STACKABLE_ENV_DB_PORT": "**LinkMe**",
            -        "WORDPRESS_STACKABLE_ENV_DB_USER": "admin",
            -        "WORDPRESS_STACKABLE_ENV_DEBIAN_FRONTEND": "noninteractive",
            -        "WORDPRESS_STACKABLE_ENV_HOME": "/",
            -        "WORDPRESS_STACKABLE_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            -        "WORDPRESS_STACKABLE_PORT": "tcp://172.16.0.2:80",
            -        "WORDPRESS_STACKABLE_PORT_80_TCP": "tcp://172.16.0.2:80",
            -        "WORDPRESS_STACKABLE_PORT_80_TCP_ADDR": "172.16.0.2",
            -        "WORDPRESS_STACKABLE_PORT_80_TCP_PORT": "80",
            -        "WORDPRESS_STACKABLE_PORT_80_TCP_PROTO": "tcp"
            -    },
            -    "mac_address": "02:42:ac:11:65:43",
            -    "memory": 1024,
            -    "memory_swap": 4096,
            -    "name": "wordpress-stackable",
            -    "net": "bridge",
            -    "node": "/api/infra/v1/user_namespace/node/9691c44e-3155-4ca2-958d-c9571aac0a14/",
            -    "pid": "none",
            -    "private_ip": "10.7.0.1",
            -    "privileged": false,
            -    "public_dns": "wordpress-stackable-1.admin.cont.dockerapp.io",
            -    "read_only": true,
            -    "resource_uri": "/api/app/v1/user_namespace/container/c1dd4e1e-1356-411c-8613-e15146633640/",
            -    "roles": ["global"],
            -    "run_command": "/run-wordpress.sh",
            -    "security_opt": [
            -        "label:user:USER",
            -        "label:role:ROLE"
            -    ],
            -    "service": "/api/app/v1/user_namespace/service/adeebc1b-1b81-4af0-b8f2-cefffc69d7fb/",
            -    "started_datetime": "Thu, 16 Oct 2014 12:04:08 +0000",
            -    "state": "Running",
            -    "stdin_open": false,
            -    "stopped_datetime": null,
            -    "synchronized": true,
            -    "tty": false,
            -    "user": "root",
            -    "uuid": "c1dd4e1e-1356-411c-8613-e15146633640",
            -    "working_dir": "/app"
            -}
            -
            - -

            A container is a representation of a Docker container in a node.

            - -

            This is a namespaced endpoint.

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            uuidA unique identifier for the container generated automatically on creation
            resource_uriA unique API endpoint that represents the container
            image_nameThe Docker image name and tag of the container
            bindingsA list of volume bindings that the container has mounted (see table Container Binding attributes below)
            nameA user provided name for the container (inherited from the service)
            nodeThe resource URI of the node where this container is running
            serviceThe resource URI of the service which this container is part of
            public_dnsThe external FQDN of the container
            stateThe state of the container (see table Container states below)
            synchronizedFlag indicating if the container is synchronized with the current service definition.
            exit_codeThe numeric exit code of the container (if applicable, null otherwise)
            exit_code_msgA string representation of the exit code of the container (if applicable, null otherwise)
            deployed_datetimeThe date and time of the last deployment of the container (if applicable, null otherwise)
            started_datetimeThe date and time of the last start operation on the container (if applicable, null otherwise)
            stopped_datetimeThe date and time of the last stop operation on the container (if applicable, null otherwise)
            destroyed_datetimeThe date and time of the terminate operation on the container (if applicable, null otherwise)
            container_portsList of published ports of this container (see table Container Port attributes below)
            container_envvarsList of user-defined environment variables set on the containers of the service, which will override the container environment variables (see table Container Environment Variable attributes below)
            labelsContainer metadata in form of dictionary
            working_dirWorking directory for running binaries within a container
            userUser used on the container on launch
            hostnameHostname used on the container on launch
            domainnameDomainname used on the container on launch
            mac_addressEthernet device’s MAC address used on the container on launch
            cgroup_nameOptional parent cgroup for the container.
            ttyIf the container has the tty enable
            stdin_openIf the container has stdin opened
            dnsContainer custom DNS servers
            dns_searchContainer custom DNS search domain
            cap_addContainer added capabilities
            cap_dropContainer dropped capabilities
            devicesList of container device mappings
            extra_hostsList of container hostname mappings
            secuirty_optLabeling scheme of this container
            entrypointEntrypoint used on the container on launch
            run_commandRun command used on the container on launch
            cpu_sharesThe relative CPU priority of the container (see Runtime Constraints on CPU and Memory for more information)
            cpusetCPUs in which execution is allowed
            memoryThe memory limit of the container in MB (see Runtime Constraints on CPU and Memory for more information)
            memory_swapTotal memory limit (memory + swap) of the container in MB
            autorestartWhether to restart the container automatically if it stops (see Crash recovery for more information)
            autodestroyWhether to terminate the container automatically if it stops (see Autodestroy for more information)
            rolesList of Docker Cloud roles assigned to this container (see API roles for more information))
            linked_to_containerList of IP addresses of the linked containers (see table Container Link attributes below and Service links for more information)
            link_variablesList of environment variables that would be exposed in any container that is linked to this one
            privilegedWhether the container has Docker’s privileged flag set or not (see Runtime privilege for more information)
            read_onlyWhether the container filesystem is read-only or not
            private_ipIP address of the container on the overlay network. This IP will be reachable from any other container.
            netNetwork mode set on the container (see table Network Modes below, more information)
            pidPID (Process) Namespace mode for the container (more information)
            - -

            Container Binding attributes

            - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            host_pathThe host path of the volume
            container_pathThe container path where the volume is mounted
            rewritabletrue is the volume has writable permissions
            volumeThe resource URI of the volume
            - -

            Container Port attributes

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            protocolThe protocol of the port, either tcp or udp
            inner_portThe published port number inside the container
            outer_portThe published port number in the node public network interface
            port_nameName of the service associated to this port
            uri_protocolThe protocol to be used in the endpoint for this port (i.e. http)
            endpoint_uriThe URI of the endpoint for this port
            publishedWhether the port has been published in the host public network interface or not. Non-published ports can only be accessed via links.
            - -

            Container Environment Variable attributes

            - - - - - - - - - - - - - - - -
            AttributeDescription
            keyThe name of the environment variable
            valueThe value of the environment variable
            - -

            Container States

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            StateDescription
            StartingThe container is being deployed or started (from Stopped). No actions allowed in this state.
            RunningThe container is deployed and running. Possible actions in this state: stop, terminate.
            StoppingThe container is being stopped. No actions allowed in this state.
            StoppedThe container is stopped. Possible actions in this state: start, terminate.
            TerminatingThe container is being deleted. No actions allowed in this state.
            TerminatedThe container has been deleted. No actions allowed in this state.
            - -

            Network Modes

            - - - - - - - - - - - - - - - -
            StrategyDescription
            bridgeCreates a new network stack for the container on the docker bridge.
            hostUses the host network stack inside the container.
            - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            nameThe name given to the link
            from_containerThe resource URI of the “client” container
            to_containerThe resource URI of the “server” container being linked
            endpointsA dictionary with the endpoints (protocol, IP and port) to be used to reach each of the “server” container exposed ports
            - -

            List all containers

            -
            import dockercloud
            -
            -containers = dockercloud.Container.list()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -containerList, err := dockercloud.ListContainers()
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(containerList)
            -
            -
            GET /api/app/v1/container/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud container ps
            -
            - -

            Lists all current and recently terminated containers. Returns a list of Container objects.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/app/v1/[optional_namespace/]container/

            - -

            Query Parameters

            - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            uuidFilter by UUID
            stateFilter by state. Possible values: Starting, Running, Stopping, Stopped, Terminating, Terminated
            nameFilter by container name
            serviceFilter by resource URI of the target service.
            nodeFilter by resource URI of the target node.
            - -

            Get an existing container

            -
            import dockercloud
            -
            -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -container, err := dockerckoud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(container)
            -
            -
            GET /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud container inspect 7eaf7fff
            -
            - -

            Get all the details of an specific container

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/app/v1/[optional_namespace/]container/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the container to retrieve
            - -

            Get the logs of a container

            - -
            -

            Example log line

            -
            -
            {
            -    "type": "log",
            -    "log": "Log line from the container",
            -    "streamType": "stdout",
            -    "timestamp": 1433779324
            -}
            -
            -
            import dockercloud
            -
            -def log_handler(message):
            -    print message
            -
            -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -container.logs(tail=300, follow=True, log_handler=log_handler)
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -container, err := dockercloud.GetContainer("447ecddc-2890-4ea2-849b-99392e0dd7a6")
            -
            -if err != nil {
            -    log.Fatal(err)
            -}
            -c := make(chan dockercloud.Logs)
            -
            -go container.Logs(c)
            -    for {
            -        s := <-c
            -        log.Println(s)
            -    }
            -
            -
            GET /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1
            -Host: ws.cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Connection: Upgrade
            -Upgrade: websocket
            -
            -
            docker-cloud container logs 7eaf7fff
            -
            - -

            Get the logs of the specified container.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s STREAM API

            - -

            HTTP Request

            - -

            GET /api/app/v1/[optional_namespace/]container/(uuid)/logs/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the container to retrieve logs
            - -

            Query Parameters

            - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            tailNumber of lines to show from the end of the logs (default: 300)
            followWhether to stream logs or close the connection immediately (default: true)
            serviceFilter by service (resource URI)
            - -

            Start a container

            -
            import dockercloud
            -
            -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -container.start()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -    log.Println(err)
            -}
            -
            -if err = container.Start(); err != nil {
            -  log.Println(err)
            -}
            -
            -
            POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud container start 7eaf7fff
            -
            - -

            Starts a stopped container.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]container/(uuid)/start/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the container to start
            - -

            Stop a container

            -
            import dockercloud
            -
            -container = dockerlcoud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -container.stop()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -    log.Println(err)
            -}
            -
            -if err = container.Stop(); err != nil {
            -       log.Println(err)
            -   }
            -
            -
            POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/stop/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud container stop 7eaf7fff
            -
            - -

            Stops a running container.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]container/(uuid)/stop/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the container to stop
            - -

            Redeploy a container

            -
            import dockercloud
            -
            -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -container.redeploy()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -    log.Println(err)
            -}
            -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: true) to reuse the existing volumes
            -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}) to not reuse the existing volumes
            -if err = container.Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}); err != nil {
            -  log.Println(err)
            -}
            -
            -
            POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud container redeploy 7eaf7fff
            -
            - -

            Redeploys a container.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]container/(uuid)/redeploy/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the container to redeploy
            - -

            Query Parameters

            - - - - - - - - - - - -
            ParameterDescription
            reuse_volumesWheather to reuse container volumes for this redeploy operation or not (default: true).
            - -

            Terminate a container

            -
            import dockercloud
            -
            -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -container.delete()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -    log.Println(err)
            -}
            -
            -if err = container.Terminate(); err != nil {
            -       log.Println(err)
            -   }
            -
            -
            DELETE /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud container terminate 7eaf7fff
            -
            - -

            Terminates the specified container. This is not reversible. All data stored in the container will be permanently deleted.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            DELETE /api/app/v1/[optional_namespace/]container/(uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the container to terminate
            - -

            Execute command inside a container

            -
            import dockercloud
            -
            -def msg_handler(message):
            -    print message
            -
            -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -container.execute("ls", handler=msg_handler)
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -c := make(chan dockercloud.Exec)
            -
            -container.Exec("ls", c)
            -
            -
            -
            GET /api/app/v1/container/(uuid)/exec/ HTTP/1.1
            -Host: ws.cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Connection: Upgrade
            -Upgrade: websocket
            -
            -
            docker-cloud exec 7eaf7fff ls
            -
            - -

            Executes a command inside the specified running container, creating a bi-directional stream for the process’ standard input and output. This endpoint can be connected to using a bi-directional Secure Web Socket wss://ws.cloud.docker.com/api/app/v1/container/(uuid)/exec/

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s STREAM API

            - -

            HTTP Request

            - -

            GET /api/app/v1/[optional_namespace/]container/(uuid)/exec/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the container where the command will be executed
            - -

            Query Parameters

            - - - - - - - - - - - -
            ParameterDescription
            commandCommand to be executed (default: sh)
            - -

            Triggers

            - -

            Service triggers

            - -
            -

            Example

            -
            -
            {
            -  "url": "/api/app/v1/user_namespace/service/82d4a246-52d8-468d-903d-9da9ef05ff28/trigger/0224815a-c156-44e4-92d7-997c69354438/call/",
            -  "operation": "REDEPLOY",
            -  "name": "docker_trigger",
            -  "resource_uri": "/api/app/v1/user_namespace/service/82d4a246-52d8-468d-903d-9da9ef05ff28/trigger/0224815a-c156-44e4-92d7-997c69354438/"
            -}
            -
            - -

            Triggers are URLs that will start a redeploy of the service whenever a POST request is sent to them. They require no authorization headers, so they should be treated as access tokens. Triggers can be revoked if they are leaked or no longer used for security purposes. See Triggers for more information.

            - -

            This is a namespaced endpoint.

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            urlAddress to be used to call the trigger with a POST request
            nameA user provided name for the trigger
            operationThe operation that the trigger call performs (see table Operations below)
            resource_uriA unique API endpoint that represents the trigger
            - -

            Operations

            - - - - - - - - - - - - - - - -
            OperationDescription
            REDEPLOYPerforms a redeploy service operation.
            SCALEUPPerforms a scale up service operation.
            - -

            List all triggers

            -
            import dockercloud
            -
            -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
            -trigger = dockercloud.Trigger.fetch(service)
            -trigger.list()
            -
            -
            GET /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
            -
            -    if err != nil {
            -        log.Println(err)
            -    }
            -
            -trigger, err := service.ListTriggers()
            -
            -  if err != nil {
            -    log.Println(err)
            -  }
            -
            -    log.Println(trigger)
            -
            -
            docker-cloud trigger list 61a29874-9134-48f9-b460-f37d4bec4826
            -
            - -

            Lists all current triggers the service has associated to. Returns a list of Service Trigger objects.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/app/v1/[optional_namespace/]service/(uuid)/trigger/

            - -

            Path Parameters

            - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the service the triggers are associated to
            - -

            Create a new trigger

            -
            import dockercloud
            -
            -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
            -trigger = dockercloud.Trigger.fetch(service)
            -trigger.add(name="mytrigger_name", operation="REDEPLOY")
            -trigger.save()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -trigger, err := service.CreateTrigger(dockercloud.TriggerCreateRequest{Name: "test-trigger", Operation: "REDEPLOY"})
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(trigger)
            -
            -
            POST /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -Content-Type: application/json
            -
            -{"name": "mytrigger_name", "operation": "REDEPLOY"}
            -
            -
            docker-cloud trigger create --name mytrigger_name --operation REDEPLOY 61a29874-9134-48f9-b460-f37d4bec4826
            -
            - -

            Creates a new service trigger.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]service/(uuid)/trigger/

            - -

            JSON Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            name(optional) A user provided name for the trigger
            operation(optional) The operation to be performed by the trigger (default: “REDEPLOY”)
            - -

            Get an existing trigger

            -
            import dockercloud
            -
            -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
            -trigger = dockercloud.Trigger.fetch(service)
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -trigger, err := service.GetTrigger("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -log.Println(trigger)
            -
            -
            GET /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            - -

            Get all the details of an specific trigger

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            GET /api/app/v1/[optional_namespace/]service/(uuid)/trigger/(trigger_uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the service the triggers are associated to
            trigger_uuidThe UUID of the trigger to retrieve
            - -

            Delete a trigger

            -
            import dockercloud
            -
            -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
            -trigger = dockercloud.Trigger.fetch(service)
            -trigger.delete("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -service.DeleteTrigger("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -
            DELETE /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
            -Host: cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Accept: application/json
            -
            -
            docker-cloud trigger rm 61a29874-9134-48f9-b460-f37d4bec4826 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce
            -
            - -

            Deletes specific trigger. It will be no longer available to be called.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            DELETE /api/app/v1/[optional_namespace/]service/(uuid)/trigger/(trigger_uuid)/

            - -

            Path Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the associated service
            trigger_uuidThe UUID of the trigger to delete
            - -

            Call a trigger

            -
            import dockercloud
            -
            -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
            -trigger = dockercloud.Trigger.fetch(service)
            -trigger.call("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
            -
            -if err != nil {
            -  log.Println(err)
            -}
            -
            -service.CallTrigger("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
            -
            -
            POST /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/call/ HTTP/1.1
            -Host: cloud.docker.com
            -Accept: application/json
            -
            - -

            Executes the trigger. For SCALEUP triggers, the number of containers to scale up can be passed at the end of the trigger call url, for example /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/call/3/.

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s REST API

            - -

            HTTP Request

            - -

            POST /api/app/v1/[optional_namespace/]service/(uuid)/trigger/(trigger_uuid)/call/

            - -

            Path Parameters

            - - - - - - - - - - - - - - - -
            ParameterDescription
            uuidThe UUID of the associated service
            trigger_uuidThe UUID of the trigger to call
            - -

            Docker Cloud Events

            - -

            Docker Cloud Event

            - -
            -

            Example

            -
            -
            {
            -    "type": "action",
            -    "action": "update",
            -    "parents": [
            -        "/api/app/v1/user_namespace/container/0b0e3538-88df-4f07-9aed-3a3cc4175076/"
            -    ],
            -    "resource_uri": "/api/app/v1/user_namespace/action/49f0efe8-a704-4a10-b02f-f96344fabadd/",
            -    "state": "Success",
            -    "uuid": "093ba3bb-08dd-48f0-8f12-4d3b85ef85b3",
            -    "datetime": "2016-02-01T16:47:28Z"
            -}
            -
            - -

            Docker Cloud events are generated every time any of the following objects is created or changes state:

            - -
              -
            • Stack
            • -
            • Service
            • -
            • Container
            • -
            • Node Cluster
            • -
            • Node
            • -
            • Action
            • -
            - -

            This is a namespaced endpoint.

            - -

            Attributes

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AttributeDescription
            typeType of object that was created or updated. For possible values, check the events types table below.
            actionType of action that was executed on the object. Possible values: create, update or delete
            parentsList of resource URIs (REST API) of the parents of the object, according to the “Parent-child hierarchy” table below
            resource_uriResource URI (REST API) of the object that was created or updated. You can do a GET operation on this URL to fetch its details
            stateThe current state of the object
            uuidUnique identifier for the event
            datetimeDate and time of the event in ISO 8601 format
            - -

            Event types

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            TypeDescription
            stackWhenever a Stack is created or updated
            serviceWhenever a Service is created or updated
            containerWhenever a Container is created or updated
            nodeclusterWhenever a Node Cluster is created or updated
            nodeWhenever a Node is created or updated
            actionWhenever a Action is created or updated
            errorSent when an error occurs on the websocket connection or as part of the authentication process
            - -

            Parent-child hierarchy

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            Object typeParent types
            Stack(None)
            ServiceStack
            ContainerService, Stack, Node, Node Cluster
            Node Cluster(None)
            NodeNode Cluster
            Action(object to which the action applies to)
            - -

            Listen to new Docker Cloud Events

            -
            import dockercloud
            -
            -def process_event(event):
            -    print event
            -
            -events = dockercloud.Events()
            -events.on_message(process_event)
            -events.run_forever()
            -
            -
            import "github.com/docker/go-dockercloud/dockercloud"
            -
            -// Listens for container events only
            -myFilter := dockercloud.NewStreamFilter(&dockercloud.EventFilter{Type: "container"})
            -
            -stream := dockercloud.NewStream(myFilter)
            -
            -if err := stream.Connect(); err == nil {
            -    go stream.RunForever()
            -} else {
            -    log.Print("Connect err: " + err.Error())
            -}
            -
            -for {
            -    select {
            -    case event := <-stream.MessageChan:
            -        log.Println(event)
            -    case err := <-stream.ErrorChan:
            -        log.Println(err)
            -    }
            -}
            -
            -
            GET /api/audit/v1/events/ HTTP/1.1
            -Host: ws.cloud.docker.com
            -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
            -Connection: Upgrade
            -Upgrade: websocket
            -
            -
            docker-cloud event
            -
            - -

            Listens for new Docker Cloud Events

            - -

            Endpoint Type

            - -

            Available in Docker Cloud’s STREAM API

            - -

            HTTP Request

            - -

            GET /api/audit/v1/[optional_namespace/]events/

            - -

            Query Parameters

            - - - - - - - - - - - - - - - - - - - -
            ParameterDescription
            typeFilter by type
            objectFilter by object resource URI
            parentFilter by object parents
            - -

            Errors

            - -
            -

            API response structure

            -
            -
            {
            -    "error": "Descriptive error message"
            -}
            -
            - -

            The Docker Cloud API uses the following error codes:

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            Error CodeMeaning
            400Bad Request – There’s a problem in the content of your request. Retrying the same request will fail.
            401Unauthorized – Your API key is wrong or your account has been deactivated.
            402Payment Required – You need to provide billing information to perform this request.
            403Forbidden – Quota limit exceeded. Please contact support to request a quota increase.
            404Not Found – The requested object cannot be found.
            405Method Not Allowed – The endpoint requested does not implement the method sent.
            409Conflict – The object cannot be created or updated because another object exists with the same unique fields
            415Unsupported Media Type – Make sure you are using Accept and Content-Type headers as application/json and that the data your are POST-ing or PATCH-ing is in valid JSON format.
            429Too Many Requests – You are being throttled because of too many requests in a short period of time.
            500Internal Server Error – There was a server error while processing your request. Try again later, or contact support.
            503Service Unavailable – We’re temporarily offline for maintenance. Please try again later.
            504Gateway Timeout – Our API servers are at full capacity. Please try again later.
            - -
            -
            -
            - http - go - python - CLI -
            -
            -
            - - diff --git a/apidocs/docker-cloud/javascripts/all.js b/apidocs/docker-cloud/javascripts/all.js deleted file mode 100644 index a7bf81a395..0000000000 --- a/apidocs/docker-cloud/javascripts/all.js +++ /dev/null @@ -1,143 +0,0 @@ -!function(){if("ontouchstart"in window){var e,t,n,i,o,s,r={};e=function(e,t){return Math.abs(e[0]-t[0])>5||Math.abs(e[1]-t[1])>5},t=function(e){this.startXY=[e.touches[0].clientX,e.touches[0].clientY],this.threshold=!1},n=function(t){return this.threshold?!1:void(this.threshold=e(this.startXY,[t.touches[0].clientX,t.touches[0].clientY]))},i=function(t){if(!this.threshold&&!e(this.startXY,[t.changedTouches[0].clientX,t.changedTouches[0].clientY])){var n=t.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),i.simulated=!0,t.target.dispatchEvent(i)}},o=function(e){var t=Date.now(),n=t-r.time,i=e.clientX,o=e.clientY,a=[Math.abs(r.x-i),Math.abs(r.y-o)],c=s(e.target,"A")||e.target,h=c.nodeName,l="A"===h,u=window.navigator.standalone&&l&&e.target.getAttribute("href");return r.time=t,r.x=i,r.y=o,(!e.simulated&&(500>n||1500>n&&a[0]<50&&a[1]<50)||u)&&(e.preventDefault(),e.stopPropagation(),!u)?!1:(u&&(window.location=c.getAttribute("href")),void(c&&c.classList&&(c.classList.add("energize-focus"),window.setTimeout(function(){c.classList.remove("energize-focus")},150))))},s=function(e,t){for(var n=e;n!==document.body;){if(!n||n.nodeName===t)return n;n=n.parentNode}return null},document.addEventListener("touchstart",t,!1),document.addEventListener("touchmove",n,!1),document.addEventListener("touchend",i,!1),document.addEventListener("click",o,!0)}}(),/* -Copyright 2008-2013 Concur Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may -not use this file except in compliance with the License. You may obtain -a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations -under the License. -*/ -function(e){"use strict";function t(t){if(t&&""!==t){$(".lang-selector a").removeClass("active"),$(".lang-selector a[data-language-name='"+t+"']").addClass("active");for(var n=0;n=1){var e=n(location.search).language;if(e)return e;if(-1!=jQuery.inArray(location.search.substr(1),c))return location.search.substr(1)}return!1}function s(e){var t=n(location.search);return t.language?(t.language=e,i(t)):e}function r(e){if(history){var t=window.location.hash;t&&(t=t.replace(/^#+/,"")),history.pushState({},"","?"+s(e)+"#"+t),localStorage.setItem("language",e)}}function a(e){var n=localStorage.getItem("language");c=e;var i=o();i?(t(i),localStorage.setItem("language",i)):t(null!==n&&-1!=jQuery.inArray(n,c)?n:c[0])}var c=[];e.setupLanguages=a,e.activateLanguage=t,$(function(){$(".lang-selector a").on("click",function(){var e=$(this).data("language-name");return r(e),t(e),!1}),window.onpopstate=function(){t(o())}})}(window),/** - * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.5.7 - * Copyright (C) 2014 Oliver Nightingale - * MIT Licensed - * @license - */ -function(){var e=function(t){var n=new e.Index;return n.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),t&&t.call(n,n),n};e.version="0.5.7",/*! - * lunr.utils - * Copyright (C) 2014 Oliver Nightingale - */ -e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),/*! - * lunr.EventEmitter - * Copyright (C) 2014 Oliver Nightingale - */ -e.EventEmitter=function(){this.events={}},e.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},e.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);this.events[e].splice(n,1),this.events[e].length||delete this.events[e]}},e.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)})}},e.EventEmitter.prototype.hasHandler=function(e){return e in this.events},/*! - * lunr.tokenizer - * Copyright (C) 2014 Oliver Nightingale - */ -e.tokenizer=function(e){if(!arguments.length||null==e||void 0==e)return[];if(Array.isArray(e))return e.map(function(e){return e.toLowerCase()});for(var t=e.toString().replace(/^\s+/,""),n=t.length-1;n>=0;n--)if(/\S/.test(t.charAt(n))){t=t.substring(0,n+1);break}return t.split(/(?:\s+|\-)/).filter(function(e){return!!e}).map(function(e){return e.toLowerCase()})},/*! - * lunr.Pipeline - * Copyright (C) 2014 Oliver Nightingale - */ -e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions={},e.Pipeline.registerFunction=function(t,n){n in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+n),t.label=n,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var n=t.label&&t.label in this.registeredFunctions;n||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var n=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load un-registered function: "+t);n.add(i)}),n},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(t)+1;this._stack.splice(i,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(t);this._stack.splice(i,0,n)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._stack.length,o=0;n>o;o++){for(var s=e[o],r=0;i>r&&(s=this._stack[r](s,o,e),void 0!==s);r++);void 0!==s&&t.push(s)}return t},e.Pipeline.prototype.reset=function(){this._stack=[]},e.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return e.Pipeline.warnIfFunctionNotRegistered(t),t.label})},/*! - * lunr.Vector - * Copyright (C) 2014 Oliver Nightingale - */ -e.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},e.Vector.Node=function(e,t,n){this.idx=e,this.val=t,this.next=n},e.Vector.prototype.insert=function(t,n){var i=this.list;if(!i)return this.list=new e.Vector.Node(t,n,i),this.length++;for(var o=i,s=i.next;void 0!=s;){if(tn.idx?n=n.next:(i+=t.val*n.val,t=t.next,n=n.next);return i},e.Vector.prototype.similarity=function(e){return this.dot(e)/(this.magnitude()*e.magnitude())},/*! - * lunr.SortedSet - * Copyright (C) 2014 Oliver Nightingale - */ -e.SortedSet=function(){this.length=0,this.elements=[]},e.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},e.SortedSet.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(e){~this.indexOf(e)||this.elements.splice(this.locationFor(e),0,e)},this),this.length=this.elements.length},e.SortedSet.prototype.toArray=function(){return this.elements.slice()},e.SortedSet.prototype.map=function(e,t){return this.elements.map(e,t)},e.SortedSet.prototype.forEach=function(e,t){return this.elements.forEach(e,t)},e.SortedSet.prototype.indexOf=function(e,t,n){var t=t||0,n=n||this.elements.length,i=n-t,o=t+Math.floor(i/2),s=this.elements[o];return 1>=i?s===e?o:-1:e>s?this.indexOf(e,o,n):s>e?this.indexOf(e,t,o):s===e?o:void 0},e.SortedSet.prototype.locationFor=function(e,t,n){var t=t||0,n=n||this.elements.length,i=n-t,o=t+Math.floor(i/2),s=this.elements[o];if(1>=i){if(s>e)return o;if(e>s)return o+1}return e>s?this.locationFor(e,o,n):s>e?this.locationFor(e,t,o):void 0},e.SortedSet.prototype.intersect=function(t){for(var n=new e.SortedSet,i=0,o=0,s=this.length,r=t.length,a=this.elements,c=t.elements;;){if(i>s-1||o>r-1)break;a[i]!==c[o]?a[i]c[o]&&o++:(n.add(a[i]),i++,o++)}return n},e.SortedSet.prototype.clone=function(){var t=new e.SortedSet;return t.elements=this.toArray(),t.length=t.elements.length,t},e.SortedSet.prototype.union=function(e){var t,n,i;return this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone(),i.add.apply(i,n.toArray()),i},e.SortedSet.prototype.toJSON=function(){return this.toArray()},/*! - * lunr.Index - * Copyright (C) 2014 Oliver Nightingale - */ -e.Index=function(){this._fields=[],this._ref="id",this.pipeline=new e.Pipeline,this.documentStore=new e.Store,this.tokenStore=new e.TokenStore,this.corpusTokens=new e.SortedSet,this.eventEmitter=new e.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},e.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},e.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},e.Index.load=function(t){t.version!==e.version&&e.utils.warn("version mismatch: current "+e.version+" importing "+t.version);var n=new this;return n._fields=t.fields,n._ref=t.ref,n.documentStore=e.Store.load(t.documentStore),n.tokenStore=e.TokenStore.load(t.tokenStore),n.corpusTokens=e.SortedSet.load(t.corpusTokens),n.pipeline=e.Pipeline.load(t.pipeline),n},e.Index.prototype.field=function(e,t){var t=t||{},n={name:e,boost:t.boost||1};return this._fields.push(n),this},e.Index.prototype.ref=function(e){return this._ref=e,this},e.Index.prototype.add=function(t,n){var i={},o=new e.SortedSet,s=t[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var s=this.pipeline.run(e.tokenizer(t[n.name]));i[n.name]=s,e.SortedSet.prototype.add.apply(o,s)},this),this.documentStore.set(s,o),e.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var r=0;r0&&(i=1+Math.log(this.tokenStore.length/n)),this._idfCache[t]=i},e.Index.prototype.search=function(t){var n=this.pipeline.run(e.tokenizer(t)),i=new e.Vector,o=[],s=this._fields.reduce(function(e,t){return e+t.boost},0),r=n.some(function(e){return this.tokenStore.has(e)},this);if(!r)return[];n.forEach(function(t,n,r){var a=1/r.length*this._fields.length*s,c=this,h=this.tokenStore.expand(t).reduce(function(n,o){var s=c.corpusTokens.indexOf(o),r=c.idf(o),h=1,l=new e.SortedSet;if(o!==t){var u=Math.max(3,o.length-t.length);h=1/Math.log(u)}return s>-1&&i.insert(s,a*r*h),Object.keys(c.tokenStore.get(o)).forEach(function(e){l.add(e)}),n.union(l)},new e.SortedSet);o.push(h)},this);var a=o.reduce(function(e,t){return e.intersect(t)});return a.map(function(e){return{ref:e,score:i.similarity(this.documentVector(e))}},this).sort(function(e,t){return t.score-e.score})},e.Index.prototype.documentVector=function(t){for(var n=this.documentStore.get(t),i=n.length,o=new e.Vector,s=0;i>s;s++){var r=n.elements[s],a=this.tokenStore.get(r)[t].tf,c=this.idf(r);o.insert(this.corpusTokens.indexOf(r),a*c)}return o},e.Index.prototype.toJSON=function(){return{version:e.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},e.Index.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},/*! - * lunr.Store - * Copyright (C) 2014 Oliver Nightingale - */ -e.Store=function(){this.store={},this.length=0},e.Store.load=function(t){var n=new this;return n.length=t.length,n.store=Object.keys(t.store).reduce(function(n,i){return n[i]=e.SortedSet.load(t.store[i]),n},{}),n},e.Store.prototype.set=function(e,t){this.has(e)||this.length++,this.store[e]=t},e.Store.prototype.get=function(e){return this.store[e]},e.Store.prototype.has=function(e){return e in this.store},e.Store.prototype.remove=function(e){this.has(e)&&(delete this.store[e],this.length--)},e.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},/*! - * lunr.stemmer - * Copyright (C) 2014 Oliver Nightingale - * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt - */ -e.stemmer=function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},t={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",s=i+"[aeiou]*",r="^("+o+")?"+s+o,a="^("+o+")?"+s+o+"("+s+")?$",c="^("+o+")?"+s+o+s+o,h="^("+o+")?"+i,l=new RegExp(r),u=new RegExp(c),d=new RegExp(a),f=new RegExp(h),p=/^(.+?)(ss|i)es$/,g=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,m=/^(.+?)(ed|ing)$/,y=/.$/,w=/(at|bl|iz)$/,b=new RegExp("([^aeiouylsz])\\1$"),E=new RegExp("^"+o+i+"[^aeiouwxy]$"),x=/^(.+?[^aeiou])y$/,_=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,S=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,C=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,O=/^(.+?)(s|t)(ion)$/,k=/^(.+?)e$/,L=/ll$/,A=new RegExp("^"+o+i+"[^aeiouwxy]$"),T=function(n){var i,o,s,r,a,c,h;if(n.length<3)return n;if(s=n.substr(0,1),"y"==s&&(n=s.toUpperCase()+n.substr(1)),r=p,a=g,r.test(n)?n=n.replace(r,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),r=v,a=m,r.test(n)){var T=r.exec(n);r=l,r.test(T[1])&&(r=y,n=n.replace(r,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=f,a.test(i)&&(n=i,a=w,c=b,h=E,a.test(n)?n+="e":c.test(n)?(r=y,n=n.replace(r,"")):h.test(n)&&(n+="e"))}if(r=x,r.test(n)){var T=r.exec(n);i=T[1],n=i+"i"}if(r=_,r.test(n)){var T=r.exec(n);i=T[1],o=T[2],r=l,r.test(i)&&(n=i+e[o])}if(r=S,r.test(n)){var T=r.exec(n);i=T[1],o=T[2],r=l,r.test(i)&&(n=i+t[o])}if(r=C,a=O,r.test(n)){var T=r.exec(n);i=T[1],r=u,r.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=u,a.test(i)&&(n=i)}if(r=k,r.test(n)){var T=r.exec(n);i=T[1],r=u,a=d,c=A,(r.test(i)||a.test(i)&&!c.test(i))&&(n=i)}return r=L,a=u,r.test(n)&&a.test(n)&&(r=y,n=n.replace(r,"")),"y"==s&&(n=s.toLowerCase()+n.substr(1)),n};return T}(),e.Pipeline.registerFunction(e.stemmer,"stemmer"),/*! - * lunr.stopWordFilter - * Copyright (C) 2014 Oliver Nightingale - */ -e.stopWordFilter=function(t){return-1===e.stopWordFilter.stopWords.indexOf(t)?t:void 0},e.stopWordFilter.stopWords=new e.SortedSet,e.stopWordFilter.stopWords.length=119,e.stopWordFilter.stopWords.elements=["","a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"],e.Pipeline.registerFunction(e.stopWordFilter,"stopWordFilter"),/*! - * lunr.trimmer - * Copyright (C) 2014 Oliver Nightingale - */ -e.trimmer=function(e){return e.replace(/^\W+/,"").replace(/\W+$/,"")},e.Pipeline.registerFunction(e.trimmer,"trimmer"),/*! - * lunr.stemmer - * Copyright (C) 2014 Oliver Nightingale - * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt - */ -e.TokenStore=function(){this.root={docs:{}},this.length=0},e.TokenStore.load=function(e){var t=new this;return t.root=e.root,t.length=e.length,t},e.TokenStore.prototype.add=function(e,t,n){var n=n||this.root,i=e[0],o=e.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[t.ref]=t,void(this.length+=1)):this.add(o,t,n[i])},e.TokenStore.prototype.has=function(e){if(!e)return!1;for(var t=this.root,n=0;n (default options) - * $('#content').highlight('lorem'); - * - * // search for and highlight more terms at once - * // so you can save some time on traversing DOM - * $('#content').highlight(['lorem', 'ipsum']); - * $('#content').highlight('lorem ipsum'); - * - * // search only for entire word 'lorem' - * $('#content').highlight('lorem', { wordsOnly: true }); - * - * // don't ignore case during search of term 'lorem' - * $('#content').highlight('lorem', { caseSensitive: true }); - * - * // wrap every occurrance of term 'ipsum' in content - * // with - * $('#content').highlight('ipsum', { element: 'em', className: 'important' }); - * - * // remove default highlight - * $('#content').unhighlight(); - * - * // remove custom highlight - * $('#content').unhighlight({ element: 'em', className: 'important' }); - * - * - * Copyright (c) 2009 Bartek Szopka - * - * Licensed under MIT license. - * - */ -jQuery.extend({highlight:function(e,t,n,i){if(3===e.nodeType){var o=e.data.match(t);if(o){var s=document.createElement(n||"span");s.className=i||"highlight";var r=e.splitText(o.index);r.splitText(o[0].length);var a=r.cloneNode(!0);return s.appendChild(a),r.parentNode.replaceChild(s,r),1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&(e.tagName!==n.toUpperCase()||e.className!==i))for(var c=0;c1e-4});t.length?(r.empty(),$.each(t,function(e,t){var n=document.getElementById(t.ref);r.append("
          • "+$(n).text()+"
          • ")}),i.call(this)):(r.html("
          • "),$(".search-results li").text('No Results Found for "'+this.value+'"'))}else o(),r.removeClass("visible")}function i(){this.value&&s.highlight(this.value,a)}function o(){s.unhighlight(a)}var s,r,a={element:"span",className:"search-highlight"},c=new lunr.Index;c.ref("id"),c.field("title",{boost:10}),c.field("body"),c.pipeline.add(lunr.trimmer,lunr.stopWordFilter),$(e),$(t)}(),/*! jQuery UI - v1.11.3 - 2015-02-12 - * http://jqueryui.com - * Includes: widget.js - * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ -function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){/*! - * jQuery UI Widget 1.11.3 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/jQuery.widget/ - */ -var t=0,n=Array.prototype.slice;e.cleanData=function(t){return function(n){var i,o,s;for(s=0;null!=(o=n[s]);s++)try{i=e._data(o,"events"),i&&i.remove&&e(o).triggerHandler("remove")}catch(r){}t(n)}}(e.cleanData),e.widget=function(t,n,i){var o,s,r,a,c={},h=t.split(".")[0];return t=t.split(".")[1],o=h+"-"+t,i||(i=n,n=e.Widget),e.expr[":"][o.toLowerCase()]=function(t){return!!e.data(t,o)},e[h]=e[h]||{},s=e[h][t],r=e[h][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new r(e,t)},e.extend(r,s,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),a=new n,a.options=e.widget.extend({},a.options),e.each(i,function(t,i){return e.isFunction(i)?void(c[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},o=function(e){return n.prototype[t].apply(this,e)};return function(){var t,n=this._super,s=this._superApply;return this._super=e,this._superApply=o,t=i.apply(this,arguments),this._super=n,this._superApply=s,t}}()):void(c[t]=i)}),r.prototype=e.widget.extend(a,{widgetEventPrefix:s?a.widgetEventPrefix||t:t},c,{constructor:r,namespace:h,widgetName:t,widgetFullName:o}),s?(e.each(s._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,r,n._proto)}),delete s._childConstructors):n._childConstructors.push(r),e.widget.bridge(t,r),r},e.widget.extend=function(t){for(var i,o,s=n.call(arguments,1),r=0,a=s.length;a>r;r++)for(i in s[r])o=s[r][i],s[r].hasOwnProperty(i)&&void 0!==o&&(t[i]=e.isPlainObject(o)?e.isPlainObject(t[i])?e.widget.extend({},t[i],o):e.widget.extend({},o):o);return t},e.widget.bridge=function(t,i){var o=i.prototype.widgetFullName||t;e.fn[t]=function(s){var r="string"==typeof s,a=n.call(arguments,1),c=this;return r?this.each(function(){var n,i=e.data(this,o);return"instance"===s?(c=i,!1):i?e.isFunction(i[s])&&"_"!==s.charAt(0)?(n=i[s].apply(i,a),n!==i&&void 0!==n?(c=n&&n.jquery?c.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+s+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+s+"'")}):(a.length&&(s=e.widget.extend.apply(null,[s].concat(a))),this.each(function(){var t=e.data(this,o);t?(t.option(s||{}),t._init&&t._init()):e.data(this,o,new i(s,this))})),c}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
            ",options:{disabled:!1,create:null},_createWidget:function(n,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=t++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),n),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,o,s,r=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(r={},i=t.split("."),t=i.shift(),i.length){for(o=r[t]=e.widget.extend({},this.options[t]),s=0;s",{id:c+t,"class":c}).append(i._nestElements(e(this),t)),i.element.append(n),e(this).nextUntil(this.nodeName.toLowerCase()).each(function(){0===e(this).find(i.options.selectors).length?e(this).filter(i.options.selectors).each(function(){e(this).is(s)||i._appendSubheaders.call(this,i,n)}):e(this).find(i.options.selectors).each(function(){e(this).is(s)||i._appendSubheaders.call(this,i,n)})}))})):void i.element.addClass(a)},_setActiveElement:function(e){var n=this,i=t.location.hash.substring(1),o=n.element.find("li[data-unique='"+i+"']");return i.length?(n.element.find("."+n.focusClass).removeClass(n.focusClass),o.addClass(n.focusClass),n.options.showAndHide&&o.click()):(n.element.find("."+n.focusClass).removeClass(n.focusClass),!i.length&&e&&n.options.highlightDefault&&n.element.find(f).first().addClass(n.focusClass)),n},_nestElements:function(t,n){var i,o,s;return i=e.grep(this.items,function(e){return e===t.text()}),this.items.push(i.length?t.text()+n:t.text()),s=this._generateHashValue(i,t,n),o=e("
          • ",{"class":d,"data-unique":s}).append(e("",{text:t.text()})),t.before(e("
            ",{name:s,"data-unique":s})),o},_generateHashValue:function(e,t,n){var i="",o=this.options.hashGenerator;if("pretty"===o){for(i=t.text().toLowerCase().replace(/\s/g,"-"),i=i.replace(/[^\x00-\x7F]/g,"");i.indexOf("--")>-1;)i=i.replace(/--/g,"-");for(;i.indexOf(":-")>-1;)i=i.replace(/:-/g,"-")}else i="function"==typeof o?o(t.text(),t):t.text().replace(/\s/g,"");return e.length&&(i+=""+n),i},_appendSubheaders:function(t,n){var i=e(this).index(t.options.selectors),o=e(t.options.selectors).eq(i-1),s=+e(this).prop("tagName").charAt(1),r=+o.prop("tagName").charAt(1);r>s?t.element.find(u+"[data-tag="+s+"]").last().append(t._nestElements(e(this),i)):s===r?n.find(f).last().after(t._nestElements(e(this),i)):n.find(f).last().after(e("
              ",{"class":l,"data-tag":s})).next(u).append(t._nestElements(e(this),i))},_setEventHandlers:function(){var o=this;this.element.on("click.tocify","li",function(){if(o.options.history&&(t.location.hash=e(this).attr("data-unique")),o.element.find("."+o.focusClass).removeClass(o.focusClass),e(this).addClass(o.focusClass),o.options.showAndHide){var n=e('li[data-unique="'+e(this).attr("data-unique")+'"]');o._triggerShow(n)}o._scrollTo(e(this))}),this.element.find("li").on({"mouseenter.tocify":function(){e(this).addClass(o.hoverClass),e(this).css("cursor","pointer")},"mouseleave.tocify":function(){"bootstrap"!==o.options.theme&&e(this).removeClass(o.hoverClass)}}),e(t).on("resize",function(){o.calculateHeights()}),e(t).on("scroll.tocify",function(){e("html, body").promise().done(function(){var s,r,a,c,h=e(t).scrollTop(),l=e(t).height(),u=e(n).height(),d=e("body")[0].scrollHeight;if(o.options.extendPage&&(o.webkit&&h>=d-l-o.options.extendPageOffset||!o.webkit&&l+h>u-o.options.extendPageOffset)&&!e(g).length){if(r=e('div[data-unique="'+e(f).last().attr("data-unique")+'"]'),!r.length)return;a=r.offset().top,e(o.options.context).append(e("
              ",{"class":p,height:Math.abs(a-h)+"px","data-unique":p})),o.extendPageScroll&&(c=o.element.find("li.active"),o._scrollTo(e("div[data-unique="+c.attr("data-unique")+"]")))}setTimeout(function(){var r,a=null;0==o.cachedHeights.length&&o.calculateHeights();var c=e(t).scrollTop();if(o.cachedAnchors.each(function(e){return o.cachedHeights[e]-c<0?void(a=e):!1}),r=e(o.cachedAnchors[a]).attr("data-unique"),s=e('li[data-unique="'+r+'"]'),o.options.highlightOnScroll&&s.length&&!s.hasClass(o.focusClass)){o.element.find("."+o.focusClass).removeClass(o.focusClass),s.addClass(o.focusClass);var h=o.tocifyWrapper,l=e(s).closest(".tocify-header"),u=l.offset().top,d=h.offset().top,f=u-d;if(f>=e(t).height()){var p=f+h.scrollTop();h.scrollTop(p)}else 0>f&&h.scrollTop(0)}o.options.scrollHistory&&t.location.hash!=="#"+r&&r!==i&&(history.replaceState?history.replaceState({},"","#"+r):(scrollV=n.body.scrollTop,scrollH=n.body.scrollLeft,location.hash="#"+r,n.body.scrollTop=scrollV,n.body.scrollLeft=scrollH)),o.options.showAndHideOnScroll&&o.options.showAndHide&&o._triggerShow(s,!0)},0)})})},calculateHeights:function(){var t=this;t.cachedHeights=[],t.cachedAnchors=[];var n=e(t.options.context).find("div[data-unique]");n.each(function(n){var i=(e(this).next().length?e(this).next():e(this)).offset().top-t.options.highlightOffset;t.cachedHeights[n]=i}),t.cachedAnchors=n},show:function(t){var n=this;if(!t.is(":visible"))switch(t.find(u).length||t.parent().is(h)||t.parent().is(":visible")?t.children(u).length||t.parent().is(h)||(t=t.closest(u)):t=t.parents(u).add(t),n.options.showEffect){case"none":t.show();break;case"show":t.show(n.options.showEffectSpeed);break;case"slideDown":t.slideDown(n.options.showEffectSpeed);break;case"fadeIn":t.fadeIn(n.options.showEffectSpeed);break;default:t.show()}return n.hide(e(u).not(t.parent().is(h)?t:t.closest(h).find(u).not(t.siblings()))),n},hide:function(e){var t=this;switch(t.options.hideEffect){case"none":e.hide();break;case"hide":e.hide(t.options.hideEffectSpeed);break;case"slideUp":e.slideUp(t.options.hideEffectSpeed);break;case"fadeOut":e.fadeOut(t.options.hideEffectSpeed);break;default:e.hide()}return t},_triggerShow:function(e,t){var n=this;return e.parent().is(h)||e.next().is(u)?n.show(e.next(u),t):e.parent().is(u)&&n.show(e.parent(),t),n},_addCSSClasses:function(){return"jqueryui"===this.options.theme?(this.focusClass="ui-state-default",this.hoverClass="ui-state-hover",this.element.addClass("ui-widget").find(".toc-title").addClass("ui-widget-header").end().find("li").addClass("ui-widget-content")):"bootstrap"===this.options.theme?(this.element.find(h+","+u).addClass("nav nav-list"),this.focusClass="active"):(this.focusClass=s,this.hoverClass=r),this},setOption:function(){e.Widget.prototype._setOption.apply(this,arguments)},setOptions:function(){e.Widget.prototype._setOptions.apply(this,arguments)},_scrollTo:function(t){var n=this,i=n.options.smoothScroll||0,o=n.options.scrollTo;return e("html, body").promise().done(function(){e("html, body").animate({scrollTop:e('div[data-unique="'+t.attr("data-unique")+'"]').next().offset().top-(e.isFunction(o)?o.call():o)+"px"},{duration:i})}),n}})}),/*! - * imagesLoaded PACKAGED v3.1.8 - * JavaScript is all like "You images are done yet or what?" - * MIT License - */ -function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,o=this,s=o.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,o=this.getListenersAsObject(e),s="object"==typeof n;for(i in o)o.hasOwnProperty(i)&&-1===t(o[i],n)&&o[i].push(s?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,o,s=this.getListenersAsObject(e);for(o in s)s.hasOwnProperty(o)&&(i=t(s[o],n),-1!==i&&s[o].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,o,s=e?this.removeListener:this.addListener,r=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)s.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(o=t[i])&&("function"==typeof o?s.call(this,i,o):r.call(this,i,o));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,o,s,r=this.getListenersAsObject(e);for(o in r)if(r.hasOwnProperty(o))for(i=r[o].length;i--;)n=r[o][i],n.once===!0&&this.removeListener(e,n.listener),s=n.listener.apply(this,t||[]),s===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return o.EventEmitter=s,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}.call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var o=function(){};n.removeEventListener?o=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(o=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var s={bind:i,unbind:o};"function"==typeof define&&define.amd?define("eventie/eventie",s):e.eventie=s}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function o(e){return"[object Array]"===d.call(e)}function s(e){var t=[];if(o(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function r(e,t,n){if(!(this instanceof r))return new r(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=s(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),h&&(this.jqDeferred=new h.Deferred);var o=this;setTimeout(function(){o.check()})}function a(e){this.img=e}function c(e){this.src=e,f[e]=this}var h=e.jQuery,l=e.console,u=void 0!==l,d=Object.prototype.toString;r.prototype=new t,r.prototype.options={},r.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var o=n.querySelectorAll("img"),s=0,r=o.length;r>s;s++){var a=o[s];this.addImage(a)}}},r.prototype.addImage=function(e){var t=new a(e);this.images.push(t)},r.prototype.check=function(){function e(e,o){return t.options.debug&&u&&l.log("confirm",e,o),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return void this.complete();for(var o=0;i>o;o++){var s=this.images[o];s.on("confirm",e),s.check()}},r.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},r.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},h&&(h.fn.imagesLoaded=function(e,t){var n=new r(this,e,t);return n.jqDeferred.promise(h(this))}),a.prototype=new t,a.prototype.check=function(){var e=f[this.img.src]||new c(this.img.src);if(e.isConfirmed)return void this.confirm(e.isLoaded,"cached was confirmed");if(this.img.complete&&void 0!==this.img.naturalWidth)return void this.confirm(0!==this.img.naturalWidth,"naturalWidth");var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},a.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var f={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},r}),function(e){"use strict";function t(){setTimeout(function(){toc.setOption("showEffectSpeed",180)},50)}var n=function(){$(".tocify-wrapper").removeClass("open"),$("#nav-button").removeClass("open")},i=function(){e.toc=$("#toc").tocify({selectors:"h1, h2",extendPage:!1,theme:"none",smoothScroll:!1,showEffectSpeed:0,hideEffectSpeed:180,ignoreSelector:".toc-ignore",highlightOffset:60,scrollTo:-1,scrollHistory:!0,hashGenerator:function(e,t){return t.prop("id")}}).data("toc-tocify"),$("#nav-button").click(function(){return $(".tocify-wrapper").toggleClass("open"),$("#nav-button").toggleClass("open"),!1}),$(".page-wrapper").click(n),$(".tocify-item").click(n)};$(function(){i(),t(),$(".content").imagesLoaded(function(){e.toc.calculateHeights()})})}(window); \ No newline at end of file diff --git a/apidocs/docker-cloud/javascripts/all_nosearch.js b/apidocs/docker-cloud/javascripts/all_nosearch.js deleted file mode 100644 index 816537543f..0000000000 --- a/apidocs/docker-cloud/javascripts/all_nosearch.js +++ /dev/null @@ -1,43 +0,0 @@ -!function(){if("ontouchstart"in window){var e,t,n,i,o,s,r={};e=function(e,t){return Math.abs(e[0]-t[0])>5||Math.abs(e[1]-t[1])>5},t=function(e){this.startXY=[e.touches[0].clientX,e.touches[0].clientY],this.threshold=!1},n=function(t){return this.threshold?!1:void(this.threshold=e(this.startXY,[t.touches[0].clientX,t.touches[0].clientY]))},i=function(t){if(!this.threshold&&!e(this.startXY,[t.changedTouches[0].clientX,t.changedTouches[0].clientY])){var n=t.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),i.simulated=!0,t.target.dispatchEvent(i)}},o=function(e){var t=Date.now(),n=t-r.time,i=e.clientX,o=e.clientY,a=[Math.abs(r.x-i),Math.abs(r.y-o)],c=s(e.target,"A")||e.target,h=c.nodeName,u="A"===h,l=window.navigator.standalone&&u&&e.target.getAttribute("href");return r.time=t,r.x=i,r.y=o,(!e.simulated&&(500>n||1500>n&&a[0]<50&&a[1]<50)||l)&&(e.preventDefault(),e.stopPropagation(),!l)?!1:(l&&(window.location=c.getAttribute("href")),void(c&&c.classList&&(c.classList.add("energize-focus"),window.setTimeout(function(){c.classList.remove("energize-focus")},150))))},s=function(e,t){for(var n=e;n!==document.body;){if(!n||n.nodeName===t)return n;n=n.parentNode}return null},document.addEventListener("touchstart",t,!1),document.addEventListener("touchmove",n,!1),document.addEventListener("touchend",i,!1),document.addEventListener("click",o,!0)}}(),/* -Copyright 2008-2013 Concur Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may -not use this file except in compliance with the License. You may obtain -a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations -under the License. -*/ -function(e){"use strict";function t(t){if(t&&""!==t){$(".lang-selector a").removeClass("active"),$(".lang-selector a[data-language-name='"+t+"']").addClass("active");for(var n=0;n=1){var e=n(location.search).language;if(e)return e;if(-1!=jQuery.inArray(location.search.substr(1),c))return location.search.substr(1)}return!1}function s(e){var t=n(location.search);return t.language?(t.language=e,i(t)):e}function r(e){if(history){var t=window.location.hash;t&&(t=t.replace(/^#+/,"")),history.pushState({},"","?"+s(e)+"#"+t),localStorage.setItem("language",e)}}function a(e){var n=localStorage.getItem("language");c=e;var i=o();i?(t(i),localStorage.setItem("language",i)):t(null!==n&&-1!=jQuery.inArray(n,c)?n:c[0])}var c=[];e.setupLanguages=a,e.activateLanguage=t,$(function(){$(".lang-selector a").on("click",function(){var e=$(this).data("language-name");return r(e),t(e),!1}),window.onpopstate=function(){t(o())}})}(window),/*! jQuery UI - v1.11.3 - 2015-02-12 - * http://jqueryui.com - * Includes: widget.js - * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ -function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){/*! - * jQuery UI Widget 1.11.3 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/jQuery.widget/ - */ -var t=0,n=Array.prototype.slice;e.cleanData=function(t){return function(n){var i,o,s;for(s=0;null!=(o=n[s]);s++)try{i=e._data(o,"events"),i&&i.remove&&e(o).triggerHandler("remove")}catch(r){}t(n)}}(e.cleanData),e.widget=function(t,n,i){var o,s,r,a,c={},h=t.split(".")[0];return t=t.split(".")[1],o=h+"-"+t,i||(i=n,n=e.Widget),e.expr[":"][o.toLowerCase()]=function(t){return!!e.data(t,o)},e[h]=e[h]||{},s=e[h][t],r=e[h][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new r(e,t)},e.extend(r,s,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),a=new n,a.options=e.widget.extend({},a.options),e.each(i,function(t,i){return e.isFunction(i)?void(c[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},o=function(e){return n.prototype[t].apply(this,e)};return function(){var t,n=this._super,s=this._superApply;return this._super=e,this._superApply=o,t=i.apply(this,arguments),this._super=n,this._superApply=s,t}}()):void(c[t]=i)}),r.prototype=e.widget.extend(a,{widgetEventPrefix:s?a.widgetEventPrefix||t:t},c,{constructor:r,namespace:h,widgetName:t,widgetFullName:o}),s?(e.each(s._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,r,n._proto)}),delete s._childConstructors):n._childConstructors.push(r),e.widget.bridge(t,r),r},e.widget.extend=function(t){for(var i,o,s=n.call(arguments,1),r=0,a=s.length;a>r;r++)for(i in s[r])o=s[r][i],s[r].hasOwnProperty(i)&&void 0!==o&&(t[i]=e.isPlainObject(o)?e.isPlainObject(t[i])?e.widget.extend({},t[i],o):e.widget.extend({},o):o);return t},e.widget.bridge=function(t,i){var o=i.prototype.widgetFullName||t;e.fn[t]=function(s){var r="string"==typeof s,a=n.call(arguments,1),c=this;return r?this.each(function(){var n,i=e.data(this,o);return"instance"===s?(c=i,!1):i?e.isFunction(i[s])&&"_"!==s.charAt(0)?(n=i[s].apply(i,a),n!==i&&void 0!==n?(c=n&&n.jquery?c.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+s+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+s+"'")}):(a.length&&(s=e.widget.extend.apply(null,[s].concat(a))),this.each(function(){var t=e.data(this,o);t?(t.option(s||{}),t._init&&t._init()):e.data(this,o,new i(s,this))})),c}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
              ",options:{disabled:!1,create:null},_createWidget:function(n,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=t++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),n),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,o,s,r=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(r={},i=t.split("."),t=i.shift(),i.length){for(o=r[t]=e.widget.extend({},this.options[t]),s=0;s",{id:c+t,"class":c}).append(i._nestElements(e(this),t)),i.element.append(n),e(this).nextUntil(this.nodeName.toLowerCase()).each(function(){0===e(this).find(i.options.selectors).length?e(this).filter(i.options.selectors).each(function(){e(this).is(s)||i._appendSubheaders.call(this,i,n)}):e(this).find(i.options.selectors).each(function(){e(this).is(s)||i._appendSubheaders.call(this,i,n)})}))})):void i.element.addClass(a)},_setActiveElement:function(e){var n=this,i=t.location.hash.substring(1),o=n.element.find("li[data-unique='"+i+"']");return i.length?(n.element.find("."+n.focusClass).removeClass(n.focusClass),o.addClass(n.focusClass),n.options.showAndHide&&o.click()):(n.element.find("."+n.focusClass).removeClass(n.focusClass),!i.length&&e&&n.options.highlightDefault&&n.element.find(f).first().addClass(n.focusClass)),n},_nestElements:function(t,n){var i,o,s;return i=e.grep(this.items,function(e){return e===t.text()}),this.items.push(i.length?t.text()+n:t.text()),s=this._generateHashValue(i,t,n),o=e("
            • ",{"class":d,"data-unique":s}).append(e("",{text:t.text()})),t.before(e("
              ",{name:s,"data-unique":s})),o},_generateHashValue:function(e,t,n){var i="",o=this.options.hashGenerator;if("pretty"===o){for(i=t.text().toLowerCase().replace(/\s/g,"-"),i=i.replace(/[^\x00-\x7F]/g,"");i.indexOf("--")>-1;)i=i.replace(/--/g,"-");for(;i.indexOf(":-")>-1;)i=i.replace(/:-/g,"-")}else i="function"==typeof o?o(t.text(),t):t.text().replace(/\s/g,"");return e.length&&(i+=""+n),i},_appendSubheaders:function(t,n){var i=e(this).index(t.options.selectors),o=e(t.options.selectors).eq(i-1),s=+e(this).prop("tagName").charAt(1),r=+o.prop("tagName").charAt(1);r>s?t.element.find(l+"[data-tag="+s+"]").last().append(t._nestElements(e(this),i)):s===r?n.find(f).last().after(t._nestElements(e(this),i)):n.find(f).last().after(e("
                ",{"class":u,"data-tag":s})).next(l).append(t._nestElements(e(this),i))},_setEventHandlers:function(){var o=this;this.element.on("click.tocify","li",function(){if(o.options.history&&(t.location.hash=e(this).attr("data-unique")),o.element.find("."+o.focusClass).removeClass(o.focusClass),e(this).addClass(o.focusClass),o.options.showAndHide){var n=e('li[data-unique="'+e(this).attr("data-unique")+'"]');o._triggerShow(n)}o._scrollTo(e(this))}),this.element.find("li").on({"mouseenter.tocify":function(){e(this).addClass(o.hoverClass),e(this).css("cursor","pointer")},"mouseleave.tocify":function(){"bootstrap"!==o.options.theme&&e(this).removeClass(o.hoverClass)}}),e(t).on("resize",function(){o.calculateHeights()}),e(t).on("scroll.tocify",function(){e("html, body").promise().done(function(){var s,r,a,c,h=e(t).scrollTop(),u=e(t).height(),l=e(n).height(),d=e("body")[0].scrollHeight;if(o.options.extendPage&&(o.webkit&&h>=d-u-o.options.extendPageOffset||!o.webkit&&u+h>l-o.options.extendPageOffset)&&!e(g).length){if(r=e('div[data-unique="'+e(f).last().attr("data-unique")+'"]'),!r.length)return;a=r.offset().top,e(o.options.context).append(e("
                ",{"class":p,height:Math.abs(a-h)+"px","data-unique":p})),o.extendPageScroll&&(c=o.element.find("li.active"),o._scrollTo(e("div[data-unique="+c.attr("data-unique")+"]")))}setTimeout(function(){var r,a=null;0==o.cachedHeights.length&&o.calculateHeights();var c=e(t).scrollTop();if(o.cachedAnchors.each(function(e){return o.cachedHeights[e]-c<0?void(a=e):!1}),r=e(o.cachedAnchors[a]).attr("data-unique"),s=e('li[data-unique="'+r+'"]'),o.options.highlightOnScroll&&s.length&&!s.hasClass(o.focusClass)){o.element.find("."+o.focusClass).removeClass(o.focusClass),s.addClass(o.focusClass);var h=o.tocifyWrapper,u=e(s).closest(".tocify-header"),l=u.offset().top,d=h.offset().top,f=l-d;if(f>=e(t).height()){var p=f+h.scrollTop();h.scrollTop(p)}else 0>f&&h.scrollTop(0)}o.options.scrollHistory&&t.location.hash!=="#"+r&&r!==i&&(history.replaceState?history.replaceState({},"","#"+r):(scrollV=n.body.scrollTop,scrollH=n.body.scrollLeft,location.hash="#"+r,n.body.scrollTop=scrollV,n.body.scrollLeft=scrollH)),o.options.showAndHideOnScroll&&o.options.showAndHide&&o._triggerShow(s,!0)},0)})})},calculateHeights:function(){var t=this;t.cachedHeights=[],t.cachedAnchors=[];var n=e(t.options.context).find("div[data-unique]");n.each(function(n){var i=(e(this).next().length?e(this).next():e(this)).offset().top-t.options.highlightOffset;t.cachedHeights[n]=i}),t.cachedAnchors=n},show:function(t){var n=this;if(!t.is(":visible"))switch(t.find(l).length||t.parent().is(h)||t.parent().is(":visible")?t.children(l).length||t.parent().is(h)||(t=t.closest(l)):t=t.parents(l).add(t),n.options.showEffect){case"none":t.show();break;case"show":t.show(n.options.showEffectSpeed);break;case"slideDown":t.slideDown(n.options.showEffectSpeed);break;case"fadeIn":t.fadeIn(n.options.showEffectSpeed);break;default:t.show()}return n.hide(e(l).not(t.parent().is(h)?t:t.closest(h).find(l).not(t.siblings()))),n},hide:function(e){var t=this;switch(t.options.hideEffect){case"none":e.hide();break;case"hide":e.hide(t.options.hideEffectSpeed);break;case"slideUp":e.slideUp(t.options.hideEffectSpeed);break;case"fadeOut":e.fadeOut(t.options.hideEffectSpeed);break;default:e.hide()}return t},_triggerShow:function(e,t){var n=this;return e.parent().is(h)||e.next().is(l)?n.show(e.next(l),t):e.parent().is(l)&&n.show(e.parent(),t),n},_addCSSClasses:function(){return"jqueryui"===this.options.theme?(this.focusClass="ui-state-default",this.hoverClass="ui-state-hover",this.element.addClass("ui-widget").find(".toc-title").addClass("ui-widget-header").end().find("li").addClass("ui-widget-content")):"bootstrap"===this.options.theme?(this.element.find(h+","+l).addClass("nav nav-list"),this.focusClass="active"):(this.focusClass=s,this.hoverClass=r),this},setOption:function(){e.Widget.prototype._setOption.apply(this,arguments)},setOptions:function(){e.Widget.prototype._setOptions.apply(this,arguments)},_scrollTo:function(t){var n=this,i=n.options.smoothScroll||0,o=n.options.scrollTo;return e("html, body").promise().done(function(){e("html, body").animate({scrollTop:e('div[data-unique="'+t.attr("data-unique")+'"]').next().offset().top-(e.isFunction(o)?o.call():o)+"px"},{duration:i})}),n}})}),/*! - * imagesLoaded PACKAGED v3.1.8 - * JavaScript is all like "You images are done yet or what?" - * MIT License - */ -function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,o=this,s=o.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,o=this.getListenersAsObject(e),s="object"==typeof n;for(i in o)o.hasOwnProperty(i)&&-1===t(o[i],n)&&o[i].push(s?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,o,s=this.getListenersAsObject(e);for(o in s)s.hasOwnProperty(o)&&(i=t(s[o],n),-1!==i&&s[o].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,o,s=e?this.removeListener:this.addListener,r=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)s.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(o=t[i])&&("function"==typeof o?s.call(this,i,o):r.call(this,i,o));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,o,s,r=this.getListenersAsObject(e);for(o in r)if(r.hasOwnProperty(o))for(i=r[o].length;i--;)n=r[o][i],n.once===!0&&this.removeListener(e,n.listener),s=n.listener.apply(this,t||[]),s===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return o.EventEmitter=s,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}.call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var o=function(){};n.removeEventListener?o=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(o=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var s={bind:i,unbind:o};"function"==typeof define&&define.amd?define("eventie/eventie",s):e.eventie=s}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function o(e){return"[object Array]"===d.call(e)}function s(e){var t=[];if(o(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function r(e,t,n){if(!(this instanceof r))return new r(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=s(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),h&&(this.jqDeferred=new h.Deferred);var o=this;setTimeout(function(){o.check()})}function a(e){this.img=e}function c(e){this.src=e,f[e]=this}var h=e.jQuery,u=e.console,l=void 0!==u,d=Object.prototype.toString;r.prototype=new t,r.prototype.options={},r.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var o=n.querySelectorAll("img"),s=0,r=o.length;r>s;s++){var a=o[s];this.addImage(a)}}},r.prototype.addImage=function(e){var t=new a(e);this.images.push(t)},r.prototype.check=function(){function e(e,o){return t.options.debug&&l&&u.log("confirm",e,o),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return void this.complete();for(var o=0;i>o;o++){var s=this.images[o];s.on("confirm",e),s.check()}},r.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},r.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},h&&(h.fn.imagesLoaded=function(e,t){var n=new r(this,e,t);return n.jqDeferred.promise(h(this))}),a.prototype=new t,a.prototype.check=function(){var e=f[this.img.src]||new c(this.img.src);if(e.isConfirmed)return void this.confirm(e.isLoaded,"cached was confirmed");if(this.img.complete&&void 0!==this.img.naturalWidth)return void this.confirm(0!==this.img.naturalWidth,"naturalWidth");var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},a.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var f={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},r}),function(e){"use strict";function t(){setTimeout(function(){toc.setOption("showEffectSpeed",180)},50)}var n=function(){$(".tocify-wrapper").removeClass("open"),$("#nav-button").removeClass("open")},i=function(){e.toc=$("#toc").tocify({selectors:"h1, h2",extendPage:!1,theme:"none",smoothScroll:!1,showEffectSpeed:0,hideEffectSpeed:180,ignoreSelector:".toc-ignore",highlightOffset:60,scrollTo:-1,scrollHistory:!0,hashGenerator:function(e,t){return t.prop("id")}}).data("toc-tocify"),$("#nav-button").click(function(){return $(".tocify-wrapper").toggleClass("open"),$("#nav-button").toggleClass("open"),!1}),$(".page-wrapper").click(n),$(".tocify-item").click(n)};$(function(){i(),t(),$(".content").imagesLoaded(function(){e.toc.calculateHeights()})})}(window); \ No newline at end of file diff --git a/apidocs/docker-cloud/stylesheets/print.css b/apidocs/docker-cloud/stylesheets/print.css deleted file mode 100644 index 7b58586abf..0000000000 --- a/apidocs/docker-cloud/stylesheets/print.css +++ /dev/null @@ -1 +0,0 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.content h1,.content h2,.content h3,.content h4,body{font-family:"Helvetica Neue", Helvetica, Arial, "Microsoft Yahei","微软雅黑", STXihei, "华文细黑", sans-serif;font-size:13px}.content h1,.content h2,.content h3,.content h4{font-weight:bold}.content pre,.content code{font-family:Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif;font-size:12px;line-height:1.5}.content pre,.content code{word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto}@font-face{font-family:'slate';src:url("../fonts/slate.eot?-syv14m");src:url("../fonts/slate.eot?#iefix-syv14m") format("embedded-opentype"),url("../fonts/slate.woff2?-syv14m") format("woff2"),url("../fonts/slate.woff?-syv14m") format("woff"),url("../fonts/slate.ttf?-syv14m") format("truetype"),url("../fonts/slate.svg?-syv14m#slate") format("svg");font-weight:normal;font-style:normal}.content aside.warning:before,.content aside.notice:before,.content aside.success:before{font-family:'slate';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1}.content aside.warning:before{content:"\e600"}.content aside.notice:before{content:"\e602"}.content aside.success:before{content:"\e606"}.tocify,.toc-footer,.lang-selector,.search,#nav-button{display:none}.tocify-wrapper>img{margin:0 auto;display:block}.content{font-size:12px}.content pre,.content code{border:1px solid #999;border-radius:5px;font-size:0.8em}.content pre{padding:1.3em}.content code{padding:0.2em}.content table{border:1px solid #999}.content table tr{border-bottom:1px solid #999}.content table td,.content table th{padding:0.7em}.content p{line-height:1.5}.content a{text-decoration:none;color:#000}.content h1{font-size:2.5em;padding-top:0.5em;padding-bottom:0.5em;margin-top:1em;margin-bottom:21px;border:2px solid #ccc;border-width:2px 0;text-align:center}.content h2{font-size:1.8em;margin-top:2em;border-top:2px solid #ccc;padding-top:0.8em}.content h1+h2,.content h1+div+h2{border-top:none;padding-top:0;margin-top:0}.content h3,.content h4{font-size:0.8em;margin-top:1.5em;margin-bottom:0.8em;text-transform:uppercase}.content h5,.content h6{text-transform:uppercase}.content aside{padding:1em;border:1px solid #ccc;border-radius:5px;margin-top:1.5em;margin-bottom:1.5em;line-height:1.6}.content aside:before{vertical-align:middle;padding-right:0.5em;font-size:14px} \ No newline at end of file diff --git a/apidocs/docker-cloud/stylesheets/screen.css b/apidocs/docker-cloud/stylesheets/screen.css deleted file mode 100644 index 5cb708361d..0000000000 --- a/apidocs/docker-cloud/stylesheets/screen.css +++ /dev/null @@ -1,12 +0,0 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6,html,body{font-family:"Helvetica Neue", Helvetica, Arial, "Microsoft Yahei","微软雅黑", STXihei, "华文细黑", sans-serif;font-size:13px}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6{font-weight:bold}.content code,.content pre{font-family:Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif;font-size:12px;line-height:1.5}.content code{word-break:break-all;word-break:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto}.highlight table td{padding:5px}.highlight table pre{margin:0}.highlight,.highlight .w{color:#f8f8f2;background-color:#272822}.highlight .err{color:#151515;background-color:#ac4142}.highlight .c,.highlight .cd,.highlight .cm,.highlight .c1,.highlight .cs{color:#505050}.highlight .cp{color:#f4bf75}.highlight .nt{color:#f4bf75}.highlight .o,.highlight .ow{color:#d0d0d0}.highlight .p,.highlight .pi{color:#d0d0d0}.highlight .gi{color:#90a959}.highlight .gd{color:#ac4142}.highlight .gh{color:#6a9fb5;background-color:#151515;font-weight:bold}.highlight .k,.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kv{color:#aa759f}.highlight .kc{color:#d28445}.highlight .kt{color:#d28445}.highlight .kd{color:#d28445}.highlight .s,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .s2,.highlight .sh,.highlight .sx,.highlight .s1{color:#90a959}.highlight .sr{color:#75b5aa}.highlight .si{color:#8f5536}.highlight .se{color:#8f5536}.highlight .nn{color:#f4bf75}.highlight .nc{color:#f4bf75}.highlight .no{color:#f4bf75}.highlight .na{color:#6a9fb5}.highlight .m,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .il,.highlight .mo,.highlight .mb,.highlight .mx{color:#90a959}.highlight .ss{color:#90a959}.highlight .c,.highlight .cm,.highlight .c1,.highlight .cs{color:#909090}.highlight,.highlight .w{background-color:#292929}@font-face{font-family:'slate';src:url("../fonts/slate.eot?-syv14m");src:url("../fonts/slate.eot?#iefix-syv14m") format("embedded-opentype"),url("../fonts/slate.woff2?-syv14m") format("woff2"),url("../fonts/slate.woff?-syv14m") format("woff"),url("../fonts/slate.ttf?-syv14m") format("truetype"),url("../fonts/slate.svg?-syv14m#slate") format("svg");font-weight:normal;font-style:normal}.content aside.warning:before,.content aside.notice:before,.content aside.success:before,.tocify-wrapper>.search:before{font-family:'slate';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1}.content aside.warning:before{content:"\e600"}.content aside.notice:before{content:"\e602"}.content aside.success:before{content:"\e606"}.tocify-wrapper>.search:before{content:"\e607"}html,body{color:#333;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#eaf2f6;height:100%;-webkit-text-size-adjust:none}#toc>ul>li>a>span{float:right;background-color:#2484FF;border-radius:40px;width:20px}.tocify-wrapper{transition:left 0.3s ease-in-out;overflow-y:auto;overflow-x:hidden;position:fixed;z-index:30;top:0;left:0;bottom:0;width:230px;background-color:#393939;font-size:13px;font-weight:bold}.tocify-wrapper .lang-selector{display:none}.tocify-wrapper .lang-selector a{padding-top:0.5em;padding-bottom:0.5em}.tocify-wrapper>img{display:block}.tocify-wrapper>.search{position:relative}.tocify-wrapper>.search input{background:#393939;border-width:0 0 1px 0;border-color:#666;padding:6px 0 6px 20px;box-sizing:border-box;margin:10px 15px;width:200px;outline:none;color:#fff;border-radius:0}.tocify-wrapper>.search:before{position:absolute;top:17px;left:15px;color:#fff}.tocify-wrapper img+.tocify{margin-top:20px}.tocify-wrapper .search-results{margin-top:0;box-sizing:border-box;height:0;overflow-y:auto;overflow-x:hidden;transition-property:height, margin;transition-duration:180ms;transition-timing-function:ease-in-out;background:linear-gradient(to bottom, rgba(0,0,0,0.2), transparent 8px),linear-gradient(to top, rgba(0,0,0,0.2), transparent 8px),linear-gradient(to bottom, #000, transparent 1.5px),linear-gradient(to top, #939393, rgba(147,147,147,0) 1.5px),#262626}.tocify-wrapper .search-results.visible{height:30%;margin-bottom:1em}.tocify-wrapper .search-results li{margin:1em 15px;line-height:1}.tocify-wrapper .search-results a{color:#fff;text-decoration:none}.tocify-wrapper .search-results a:hover{text-decoration:underline}.tocify-wrapper .tocify-item>a,.tocify-wrapper .toc-footer li{padding:0 15px 0 15px;display:block;overflow-x:hidden;white-space:nowrap;text-overflow:ellipsis}.tocify-wrapper ul,.tocify-wrapper li{list-style:none;margin:0;padding:0;line-height:28px}.tocify-wrapper li{color:#fff;transition-property:background;transition-timing-function:linear;transition-duration:230ms}.tocify-wrapper .tocify-focus{box-shadow:0px 1px 0px #000;background-color:#2467af;color:#fff}.tocify-wrapper .tocify-subheader{display:none;background-color:#262626;font-weight:500;background:linear-gradient(to bottom, rgba(0,0,0,0.2), transparent 8px),linear-gradient(to top, rgba(0,0,0,0.2), transparent 8px),linear-gradient(to bottom, #000, transparent 1.5px),linear-gradient(to top, #939393, rgba(147,147,147,0) 1.5px),#262626}.tocify-wrapper .tocify-subheader .tocify-item>a{padding-left:25px;font-size:12px}.tocify-wrapper .tocify-subheader>li:last-child{box-shadow:none}.tocify-wrapper .toc-footer{padding:1em 0;margin-top:1em;border-top:1px dashed #666}.tocify-wrapper .toc-footer li,.tocify-wrapper .toc-footer a{color:#fff;text-decoration:none}.tocify-wrapper .toc-footer a:hover{text-decoration:underline}.tocify-wrapper .toc-footer li{font-size:0.8em;line-height:1.7;text-decoration:none}#nav-button{padding:0 1.5em 5em 0;display:none;position:fixed;top:0;left:0;z-index:100;color:#000;text-decoration:none;font-weight:bold;opacity:0.7;line-height:16px;transition:left 0.3s ease-in-out}#nav-button span{display:block;padding:6px 6px 6px;background-color:rgba(234,242,246,0.7);-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:rotate(-90deg) translate(-100%, 0);transform:rotate(-90deg) translate(-100%, 0);border-radius:0 0 0 5px}#nav-button img{height:16px;vertical-align:bottom}#nav-button:hover{opacity:1}#nav-button.open{left:230px}.page-wrapper{margin-left:230px;position:relative;z-index:10;background-color:#eaf2f6;min-height:100%;padding-bottom:1px}.page-wrapper .dark-box{width:50%;background-color:#393939;position:absolute;right:0;top:0;bottom:0}.page-wrapper .lang-selector{position:fixed;z-index:50;border-bottom:5px solid #393939}.lang-selector{background-color:#222;width:100%;font-weight:bold}.lang-selector a{display:block;float:left;color:#fff;text-decoration:none;padding:0 10px;line-height:30px;outline:0}.lang-selector a:active,.lang-selector a:focus{background-color:#111;color:#fff}.lang-selector a.active{background-color:#393939;color:#fff}.lang-selector:after{content:'';clear:both;display:block}.content{position:relative;z-index:30}.content:after{content:'';display:block;clear:both}.content>h1,.content>h2,.content>h3,.content>h4,.content>h5,.content>h6,.content>p,.content>table,.content>ul,.content>ol,.content>aside,.content>dl{margin-right:50%;padding:0 28px;box-sizing:border-box;display:block;text-shadow:0px 1px 0px #fff}.content>ul,.content>ol{padding-left:43px}.content>h1,.content>h2,.content>div{clear:both}.content h1{font-size:30px;padding-top:0.5em;padding-bottom:0.5em;border-bottom:1px solid #ccc;margin-bottom:21px;margin-top:2em;border-top:1px solid #ddd;background-image:linear-gradient(to bottom, #fff, #f9f9f9)}.content h1:first-child,.content div:first-child+h1{border-top-width:0;margin-top:0}.content h2{font-size:20px;margin-top:4em;margin-bottom:0;border-top:1px solid #ccc;padding-top:1.2em;padding-bottom:1.2em;background-image:linear-gradient(to bottom, rgba(255,255,255,0.4), rgba(255,255,255,0))}.content h1+h2,.content h1+div+h2{margin-top:-21px;border-top:none}.content h3,.content h4,.content h5,.content h6{font-size:15px;margin-top:2.5em;margin-bottom:0.8em}.content h4,.content h5,.content h6{font-size:10px}.content hr{margin:2em 0;border-top:2px solid #393939;border-bottom:2px solid #eaf2f6}.content table{margin-bottom:1em;overflow:auto}.content table th,.content table td{text-align:left;vertical-align:top;line-height:1.6}.content table th{padding:5px 10px;border-bottom:1px solid #ccc;vertical-align:bottom}.content table td{padding:10px}.content table tr:last-child{border-bottom:1px solid #ccc}.content table tr:nth-child(odd)>td{background-color:#f9fbfc}.content table tr:nth-child(even)>td{background-color:#f3f7fa}.content dt{font-weight:bold}.content dd{margin-left:15px}.content p,.content li,.content dt,.content dd{line-height:1.6;margin-top:0}.content img{max-width:100%}.content code{background-color:rgba(0,0,0,0.05);padding:3px;border-radius:3px}.content pre>code{background-color:transparent;padding:0}.content aside{padding-top:1em;padding-bottom:1em;text-shadow:0 1px 0 #c6dde9;margin-top:1.5em;margin-bottom:1.5em;background:#8fbcd4;line-height:1.6}.content aside.warning{background-color:#c97a7e;text-shadow:0 1px 0 #dfb0b3}.content aside.success{background-color:#6ac174;text-shadow:0 1px 0 #a0d7a6}.content aside:before{vertical-align:middle;padding-right:0.5em;font-size:14px}.content .search-highlight{padding:2px;margin:-2px;border-radius:4px;border:1px solid #F7E633;text-shadow:1px 1px 0 #666;background:linear-gradient(to top left, #f7e633 0%, #f1d32f 100%)}.content pre,.content blockquote{background-color:#292929;color:#fff;padding:2em 28px;margin:0;width:50%;float:right;clear:right;box-sizing:border-box;text-shadow:0px 1px 2px rgba(0,0,0,0.4)}.content pre>p,.content blockquote>p{margin:0}.content pre a,.content blockquote a{color:#fff;text-decoration:none;border-bottom:dashed 1px #ccc}.content blockquote>p{background-color:#1c1c1c;border-radius:5px;padding:13px;color:#ccc;border-top:1px solid #000;border-bottom:1px solid #404040}@media (max-width: 930px){.tocify-wrapper{left:-230px}.tocify-wrapper.open{left:0}.page-wrapper{margin-left:0}#nav-button{display:block}.tocify-wrapper .tocify-item>a{padding-top:0.3em;padding-bottom:0.3em}}@media (max-width: 700px){.dark-box{display:none}.content>h1,.content>h2,.content>h3,.content>h4,.content>h5,.content>h6,.content>p,.content>table,.content>ul,.content>ol,.content>aside,.content>dl{margin-right:0}.tocify-wrapper .lang-selector{display:block}.page-wrapper .lang-selector{display:none}.content pre,.content blockquote{width:auto;float:none}.content>pre+h1,.content>blockquote+h1,.content>pre+h2,.content>blockquote+h2,.content>pre+h3,.content>blockquote+h3,.content>pre+h4,.content>blockquote+h4,.content>pre+h5,.content>blockquote+h5,.content>pre+h6,.content>blockquote+h6,.content>pre+p,.content>blockquote+p,.content>pre+table,.content>blockquote+table,.content>pre+ul,.content>blockquote+ul,.content>pre+ol,.content>blockquote+ol,.content>pre+aside,.content>blockquote+aside,.content>pre+dl,.content>blockquote+dl{margin-top:28px}} - -/** overrides **/ -.logo { - padding: 10px 0 0 15px; -} -// .tocify-wrapper { -// background-color: rgb(16, 28, 41) -// } - .tocify-wrapper>.search:before { - left: 19px; -} \ No newline at end of file diff --git a/apidocs/layouts/single.html b/apidocs/layouts/single.html deleted file mode 100644 index 8d058662a5..0000000000 --- a/apidocs/layouts/single.html +++ /dev/null @@ -1,6577 +0,0 @@ - - - - - - - Docker Cloud API reference - - - - - - - - - - - - - - NAV - - - -
                - -
                - http - go - python - CLI -
                - -
                  -
                  -
                  -
                  -
                  -
                  -
                  -

                  Introduction

                  - -

                  Docker Cloud currently offers a HTTP REST API and a Websocket Stream API which are used by both the Web UI and the CLI. This API documentation contains all API operations currently supported in the platform and provides examples of how to execute them using our Command Line Interface (CLI), Python SDK and Go SDK.

                  - -

                  Authentication

                  - -

                  In order to be able to make requests to the Docker Cloud API, you should first obtain an ApiKey for your account. For this, log into Docker Cloud, click on the menu on the upper right corner of the screen, select Account info and then select API keys.

                  - -

                  REST API

                  -
                  import dockercloud
                  -dockercloud.user = "username"
                  -dockercloud.apikey = "apikey"
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -dockercloud.User = "username"
                  -dockercloud.ApiKey = "apikey"
                  -
                  -
                  GET /api/app/v1/service/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  export DOCKERCLOUD_USER=username
                  -export DOCKERCLOUD_APIKEY=apikey
                  -
                  - -
                  -

                  Make sure to replace username with your username and apikey with your API key.

                  -
                  - -

                  The Docker Cloud REST API is reachable through the following hostname:

                  - -

                  https://cloud.docker.com/

                  - -

                  All requests should be sent to this endpoint using Basic authentication using your API key as password:

                  - -

                  Authorization: Basic dXNlcm5hbWU6YXBpa2V5

                  - -

                  HTTP responses are given in JSON format, so the following Accept header is required for every API call:

                  - -

                  Accept: application/json

                  - -

                  Namespaced endpoints

                  - -

                  Endpoints that are labeled as “namespaced” allow the users to operate over -different namespaces, for example over an individual user namespace, or the -namespace of an organization the user is a member of. A namespace identifies the -owner of the resource.

                  - -

                  The namespace is optional. If left blank, it defaults to the authenticated user -in the request. The namespace is set before the resource in the URL schema: -https://cloud.docker.com/api/<subsystem>/<version>/(optional_namespace/)<resource>/

                  - -

                  Examples:

                  - -
                    -
                  • The user exampleuser wants to operate on the node cluster list endpoint in their own namespace. They can use either of the following urls: - -
                      -
                    • https://cloud.docker.com/api/infra/v1/nodecluster/ (namespace omitted, so will use the user authenticated in the request)
                    • -
                    • https://cloud.docker.com/api/infra/v1/exampleuser/nodecluster/
                    • -
                  • -
                  • The user wants to operate on the node cluster list endpoint in an organization called exampleorg (which they have permission to see): - -
                      -
                    • https://cloud.docker.com/api/infra/v1/exampleorg/nodecluster/
                    • -
                  • -
                  - -

                  Namespaced endpoints in the docker-cloud CLI

                  - -

                  If you are using namespaces with the docker-cloud CLI, set them by changing -the value of the DOCKERCLOUD_NAMESPACE environment variable. You can either -set this globally, or specify it before each CLI command. To learn more, see the -Docker Cloud CLI README.

                  - -

                  Stream API

                  -
                  import websocket
                  -import base64
                  -
                  -header = "Authorization: Basic %s" % base64.b64encode("%s:%s" % (username, password))
                  -ws = websocket.WebSocketApp('wss://ws.cloud.docker.com/v1/events', header=[header])
                  -
                  -
                  import "github.com/gorilla/websocket"
                  -import "encoding/base64"
                  -
                  -var StreamUrl = "wss://ws.cloud.docker.com:443/v1/events"
                  -
                  -sEnc := base64.StdEncoding.EncodeToString([]byte(User + ":" + ApiKey))
                  -header := http.Header{}
                  -header.Add("Authorization", fmt.Sprintf("Basic %s", sEnc))
                  -
                  -var Dialer websocket.Dialer
                  -ws, _, err := Dialer.Dial(url, header)
                  -if err != nil {
                  -    log.Println(err)
                  -}
                  -
                  -
                  GET /api/audit/v1/events HTTP/1.1
                  -Host: ws.cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Connection: Upgrade
                  -Upgrade: websocket
                  -
                  -
                  export DOCKERCLOUD_USER=username
                  -export DOCKERCLOUD_APIKEY=apikey
                  -
                  - -
                  -

                  Make sure to replace username with your username and apikey with your API key.

                  -
                  - -

                  The Docker Cloud Stream API is reachable through the following hostname:

                  - -

                  wss://ws.cloud.docker.com/

                  - -

                  The Stream API requires the same authentication mechanism as the REST API:

                  - -

                  Authorization: Basic dXNlcm5hbWU6YXBpa2V5

                  - -

                  API roles

                  - -
                  -

                  The CLI and the SDKs will detect this environment variable and automatically use it

                  -
                  - -

                  If you give an API role to a container, the environment variable DOCKERCLOUD_AUTH inside the container will have the contents of the Authorization header that you can use to authenticate against the REST or Stream APIs:

                  - -

                  curl -H "Authorization: $DOCKERCLOUD_AUTH" https://cloud.docker.com/api/app/v1/service/

                  - -

                  Actions

                  - -

                  Action

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -    "action": "Cluster Create",
                  -    "end_date": "Wed, 17 Sep 2014 08:26:22 +0000",
                  -    "ip": "56.78.90.12",
                  -    "is_user_action": true,
                  -    "can_be_canceled": false,
                  -    "location": "New York, USA",
                  -    "method": "POST",
                  -    "object": "/api/infra/v1/user_namespace/cluster/eea638f4-b77a-4183-b241-22dbd7866f22/",
                  -    "path": "/api/infra/v1/user_namespace/cluster/",
                  -    "resource_uri": "/api/audit/v1/action/6246c558-976c-4df6-ba60-eb1a344a17af/",
                  -    "start_date": "Wed, 17 Sep 2014 08:26:22 +0000",
                  -    "state": "Success",
                  -    "user": "user_namespace",
                  -    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.78.2 (KHTML, like Gecko) Version/7.0.6 Safari/537.78.2",
                  -    "uuid": "6246c558-976c-4df6-ba60-eb1a344a17af"
                  -}
                  -
                  - -

                  An action represents an API call by a user. Details of the API call such as timestamp, origin IP address, and user agent are logged in the action object.

                  - -

                  Simple API calls that do not require asynchronous execution will return immediately with the appropiate HTTP error code and an action object will be created either in Success or Failed states. API calls that do require asynchronous execution will return HTTP code 202 Accepted immediately and create an action object in In progress state, which will change to Success or Failed state depending on the outcome of the operation being performed. In both cases the response will include a X-DockerCloud-Action-URI header with the resource URI of the created action.

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  resource_uriA unique API endpoint that represents the action
                  uuidA unique identifier for the action generated automatically on creation
                  objectThe API object (resource URI) to which the action applies to
                  actionName of the operation performed/being performed
                  methodHTTP method used to access the API
                  pathHTTP path of the API accessed
                  userThe user authenticated in the request that created the action
                  user_agentThe user agent provided by the client when accessing the API endpoint
                  start_dateDate and time when the API call was performed and the operation started processing
                  end_dateDate and time when the API call finished processing
                  stateState of the operation (see table below)
                  ipIP address of the user that performed the API call
                  locationGeographic location of the IP address of the user that performed the API call
                  is_user_actionIf the action has been triggered by the user
                  can_be_canceledIf the action can be canceled by the user in the middle of its execution
                  can_be_retriedIf the action can be retried by the user
                  - -

                  Action states

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  StateDescription
                  PendingThe action needed asynchronous execution and it is waiting for an in progress action
                  In progressThe action needed asynchronous execution and is being performed
                  CancelingThe action is being canceled by user request
                  CanceledThe action has been canceled
                  SuccessThe action was executed successfully
                  FailedThere was an issue when the action was being performed. Check the logs for more information.
                  - -

                  List all actions

                  -
                  import dockercloud
                  -
                  -actions = dockercloud.Action.list()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -actionList, err := dockercloud.ListActions()
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(actionList)
                  -
                  -
                  GET /api/audit/v1/action/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud action ls
                  -
                  - -

                  Lists all actions in chronological order. Returns a list of Action objects.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/audit/v1/action/

                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  uuidFilter by UUID.
                  stateFilter by state. Possible values: In progress, Success, Failed
                  start_dateFilter by start date. Valid filtering values are start_date__gte (after or on the date supplied) and start_date__lte (before or on the date supplied)
                  end_dateFilter by end date. Valid filtering values are end_date__gte (after or on the date supplied) and end_date__lte (before or on the date supplied)
                  objectFilter by resource URI of the related object. This filter can only be combined with ‘include_related’ filter
                  include_relatedThere is a parent-child relationship between Docker Cloud objects, described in table Relationships between Docker Cloud objects. If set to 'true’, will include the actions of the related objects to the object specified in “object” filter parameter. Possible values: 'true’ or 'false’
                  - -

                  Relationships between Docker Cloud objects

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  ObjectRelationships
                  ContainerContainer, service, stack (if any)
                  ServiceAll containers in the service, service, stack (if any)
                  StackAll services in the stack, all containers in every service in the stack, stack
                  NodeNode, node cluster (if any)
                  Node clusterAll nodes in the cluster, node cluster
                  - -

                  Get an action by UUID

                  -
                  import dockercloud
                  -
                  -action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(action)
                  -
                  -
                  GET /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud action inspect 7eaf7fff
                  -
                  - -

                  Get all the details of an specific action

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/audit/v1/action/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the action to retrieve
                  - -

                  Get the logs of an action

                  - -
                  -

                  Example log line

                  -
                  -
                  {
                  -    "type": "log",
                  -    "log": "Log line from the action",
                  -    "timestamp": 1433779324
                  -}
                  -
                  -
                  import dockercloud
                  -
                  -def log_handler(message):
                  -    print message
                  -
                  -action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -action.logs(tail=300, follow=True, log_handler=log_handler)
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -c := make(chan dockercloud.Logs)
                  -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -    log.Println(err)
                  -}
                  -
                  -go action.GetLogs(c)
                  -
                  -for {
                  -    log.Println(<-c)
                  -}
                  -
                  -
                  GET /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1
                  -Host: ws.cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Connection: Upgrade
                  -Upgrade: websocket
                  -
                  -
                  docker-cloud action logs 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce
                  -
                  - -

                  Get the logs of the specified action.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s STREAM API

                  - -

                  HTTP Request

                  - -

                  GET /api/audit/v1/action/(uuid)/logs/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the action to retrieve logs
                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  tailNumber of lines to show from the end of the logs (default: 300)
                  followWhether to stream logs or close the connection immediately (default: true)
                  - -

                  Cancel an action

                  -
                  POST /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/cancel/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -action, err = action.Cancel()
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(action)
                  -
                  - -

                  Cancels an action in Pending or In progress state.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/audit/v1/action/(uuid)/cancel/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the action to cancel
                  - -

                  Retry an action

                  -
                  import dockercloud
                  -
                  -def log_handler(message):
                  -  print message
                  -
                  -action = dockercloud.Action.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -action.logs(tail=300, follow=True, log_handler=log_handler)
                  -
                  -
                  POST /api/audit/v1/action/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/retry/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -action, err := dockercloud.GetAction("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -action, err = action.Retry()
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(action)
                  -
                  -
                  docker-cloud action logs 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce
                  -
                  - -

                  Retries an action in Success, Failed or Canceled state.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/audit/v1/action/(uuid)/retry/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the action to retry
                  - -

                  Providers

                  - -

                  Provider

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -    "available": true,
                  -    "label": "Digital Ocean",
                  -    "name": "digitalocean",
                  -    "regions": [
                  -        "/api/infra/v1/region/digitalocean/ams1/",
                  -        "/api/infra/v1/region/digitalocean/ams2/",
                  -        "/api/infra/v1/region/digitalocean/ams3/",
                  -        "/api/infra/v1/region/digitalocean/lon1/",
                  -        "/api/infra/v1/region/digitalocean/nyc1/",
                  -        "/api/infra/v1/region/digitalocean/nyc2/",
                  -        "/api/infra/v1/region/digitalocean/nyc3/",
                  -        "/api/infra/v1/region/digitalocean/sfo1/",
                  -        "/api/infra/v1/region/digitalocean/sgp1/"
                  -    ],
                  -    "resource_uri": "/api/infra/v1/provider/digitalocean/"
                  -}
                  -
                  - -

                  A provider is a representation of a cloud provider supported by Docker Cloud. Providers have one or more regions where nodes are deployed.

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  resource_uriA unique API endpoint that represents the provider
                  nameA unique identifier for the provider
                  labelA user-friendly name for the provider
                  regionsA list of resource URIs of the regions available in this provider
                  availableWhether the provider is currently available for new node deployments
                  - -

                  List all providers

                  -
                  import dockercloud
                  -
                  -providers = dockercloud.Provider.list()
                  -
                  -
                  GET /api/infra/v1/provider/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -providerList, err := dockercloud.ListProviders()
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(providerList)
                  -
                  -
                  docker-cloud nodecluster provider
                  -
                  - -

                  Lists all supported cloud providers. Returns a list of Provider objects.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/infra/v1/provider/

                  - -

                  Query Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  nameFilter by provider name
                  - -

                  Get an individual provider

                  -
                  import dockercloud
                  -
                  -provider = dockercloud.Provider.fetch("digitalocean")
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -provider, err := dockercloud.GetProvider("digitalocean")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(provider)
                  -
                  -
                  GET /api/infra/v1/provider/digitalocean/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  - -

                  Get all the details of a specific provider

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/infra/v1/provider/(name)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  nameThe name of the provider to retrieve
                  - -

                  Regions

                  - -

                  Region

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -    "availability_zones": [],
                  -    "available": true,
                  -    "label": "Amsterdam 2",
                  -    "name": "ams2",
                  -    "node_types": [
                  -        "/api/infra/v1/nodetype/digitalocean/1gb/",
                  -        "/api/infra/v1/nodetype/digitalocean/2gb/",
                  -        "/api/infra/v1/nodetype/digitalocean/4gb/",
                  -        "/api/infra/v1/nodetype/digitalocean/8gb/",
                  -        "/api/infra/v1/nodetype/digitalocean/16gb/",
                  -        "/api/infra/v1/nodetype/digitalocean/32gb/",
                  -        "/api/infra/v1/nodetype/digitalocean/48gb/",
                  -        "/api/infra/v1/nodetype/digitalocean/64gb/"
                  -    ],
                  -    "provider": "/api/infra/v1/provider/digitalocean/",
                  -    "resource_uri": "/api/infra/v1/region/digitalocean/ams2/"
                  -}
                  -
                  - -

                  A region is a representation of an entire or a subset of a data center of a cloud provider. It can contain availability zones (depending on the provider) and one or more node types.

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  resource_uriA unique API endpoint that represents the region
                  nameAn identifier for the region
                  labelA user-friendly name for the region
                  node_typesA list of resource URIs of the node types available in the region
                  availability_zonesA list of resource URIs of the availability zones available in the region
                  providerThe resource URI of the provider of the region
                  availableWhether the region is currently available for new node deployments
                  - -

                  List all regions

                  -
                  import dockercloud
                  -
                  -regions = dockercloud.Region.list()
                  -
                  -
                  GET /api/infra/v1/region/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -regionList, err := dockercloud.ListRegions()
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(regionList)
                  -
                  -
                  docker-cloud nodecluster region
                  -
                  - -

                  Lists all regions of all supported cloud providers. Returns a list of Region objects.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/infra/v1/region/

                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  nameFilter by region name
                  providerFilter by resource URI of the target provider
                  - -

                  Get an individual region

                  -
                  import dockercloud
                  -
                  -region = dockercloud.Region.fetch("digitalocean/lon1")
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -region, err := dockercloud.GetRegion("digitalocean","lon1")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(region)
                  -
                  -
                  GET /api/infra/v1/region/digitalocean/lon1/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  - -

                  Get all the details of a specific region

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/infra/v1/region/(provider.name)/(name)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  nameThe name of the region to retrieve
                  provider.nameThe name of the provider of the region
                  - -

                  Availability Zones

                  - -

                  Availability Zone

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -    "available": true,
                  -    "name": "ap-northeast-1a",
                  -    "region": "/api/infra/v1/region/az/ap-northeast-1/",
                  -    "resource_uri": "/api/infra/v1/az/aws/ap-northeast-1/ap-northeast-1a/"
                  -}
                  -
                  - -

                  An Availability Zone is an isolated location inside a region. Providers that support availability zones: AWS

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  availableWhether the availability zone is currently available for new node deployments
                  nameAn identifier for the availability zone
                  regionThe resource URI of the region where the availability zone is allocated
                  resource_uriA unique API endpoint that represents the zone
                  - -

                  List all availability zones

                  -
                  import dockercloud
                  -
                  -az = dockercloud.AZ.list()
                  -
                  -
                  GET /api/infra/v1/az/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -az, err := dockercloud.ListAZ()
                  -if err != nil {
                  -    log.Println(err)
                  -}
                  -
                  -log.Println(az)
                  -
                  -
                  docker-cloud nodecluster az
                  -
                  - -

                  Lists all availability zones from all regions of all supported cloud providers. Returns a list of Availability Zone objects.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/infra/v1/az/

                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  nameFilter by availability zone name
                  regionFilter by resource URI of the target region
                  - -

                  Get an individual availability zone

                  -
                  import dockercloud
                  -
                  -az = dockercloud.AZ.fetch("aws/sa-east-1/sa-east-1a")
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -az, err := dockercloud.GetAZ("aws/sa-east-1/sa-east-1a")
                  -if err != nil {
                  -    log.Println(err)
                  -}
                  -
                  -log.Println(az)
                  -
                  -
                  GET /api/infra/v1/az/aws/sa-east-1/sa-east-1a/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  - -

                  Get all the details of a specific availability zone

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/infra/v1/az/(provider.name)/(region.name)/(name)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  nameThe name of the availability zone to retrieve
                  providerThe name of the provider
                  regionThe name of the region
                  - -

                  Node Types

                  - -

                  Node Type

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -    "availability_zones": [],
                  -    "available": true,
                  -    "label": "1GB",
                  -    "name": "1gb",
                  -    "provider": "/api/infra/v1/provider/digitalocean/",
                  -    "regions": [
                  -        "/api/infra/v1/region/digitalocean/ams1/",
                  -        "/api/infra/v1/region/digitalocean/sfo1/",
                  -        "/api/infra/v1/region/digitalocean/nyc2/",
                  -        "/api/infra/v1/region/digitalocean/ams2/",
                  -        "/api/infra/v1/region/digitalocean/sgp1/",
                  -        "/api/infra/v1/region/digitalocean/lon1/",
                  -        "/api/infra/v1/region/digitalocean/nyc3/",
                  -        "/api/infra/v1/region/digitalocean/nyc1/"
                  -    ],
                  -    "resource_uri": "/api/infra/v1/nodetype/digitalocean/1gb/"
                  -}
                  -
                  - -

                  A node type is a representation of an instance size supported by a certain cloud provider in a certain region and/or availability zone.

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  resource_uriA unique API endpoint that represents the node type
                  nameAn identifier for the node type
                  labelA user-friendly name for the node type
                  regionsA list of resource URIs of the regions to which this node type can be deployed to
                  availability_zonesA list of resource URIs of the availability zones to which this node type can be deployed to
                  providerThe resource URI of the provider of the node type
                  availableWhether the node type is currently available for new node deployments
                  - -

                  List all node types

                  -
                  import dockercloud
                  -
                  -nodetypes = dockercloud.NodeType.list()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -nodetypeList, err := dockercloud.ListNodeTypes()
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(nodetypeList)
                  -
                  -
                  GET /api/infra/v1/nodetype/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud nodecluster nodetype
                  -
                  - -

                  Lists all node types of all supported cloud providers. Returns a list of NodeType objects.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/infra/v1/nodetype/

                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  nameFilter by node type name
                  regionsFilter by resource URI of the target regions
                  availability_zonesFilter by resource URI of the target availability zones
                  - -

                  Get an individual node type

                  -
                  import dockercloud
                  -
                  -nodetype = dockercloud.NodeType.fetch("digitalocean/1gb")
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -nodetype, err := dockercloud.GetNodeType("digitalocean","1gb")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(nodetype)
                  -
                  -
                  GET /api/infra/v1/nodetype/digitalocean/1gb/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  - -

                  Get all the details of a specific node type

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/infra/v1/nodetype/(provider.name)/(name)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  nameThe name of the node type to retrieve
                  provider.nameThe name of the provider of the node type
                  - -

                  Node Clusters

                  - -

                  Node Cluster

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -    "current_num_nodes": 1,
                  -    "deployed_datetime": "Tue, 16 Sep 2014 17:01:15 +0000",
                  -    "destroyed_datetime": null,
                  -    "disk": 60,
                  -    "nickname": "my test cluster",
                  -    "name": "TestCluster",
                  -    "node_type": "/api/infra/v1/nodetype/aws/t2.micro/",
                  -    "nodes": [
                  -        "/api/infra/v1/user_namespace/node/75d20367-0948-4f10-8ba4-ffb4d16ed3c6/"
                  -    ],
                  -    "region": "/api/infra/v1/region/aws/us-east-1/",
                  -    "resource_uri": "/api/infra/v1/user_namespace/nodecluster/5516df0b-721e-4470-b350-741ff22e63a0/",
                  -    "state": "Deployed",
                  -    "tags": [
                  -        {"name": "tag_one"},
                  -        {"name": "tag-two"},
                  -        {"name": "tagthree3"}
                  -    ],
                  -    "target_num_nodes": 2,
                  -    "uuid": "5516df0b-721e-4470-b350-741ff22e63a0",
                  -    "provider_options": {
                  -        "vpc": {
                  -            "id": "vpc-aa1c70d4",
                  -            "subnets": ["subnet-aaa7d94f", "subnet-aa15fa64"],
                  -            "security_groups": ["sg-aa1c70d4"]
                  -        },
                  -        "iam": {
                  -            "instance_profile_name": "my_instance_profile"
                  -        }
                  -    }
                  -}
                  -
                  - -

                  A node cluster is a group of nodes that share the same provider, region and/or availability zone, and node type. They are on the same private network.

                  - -

                  This is a namespaced endpoint.

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  uuidA unique identifier for the node cluster generated automatically on creation
                  resource_uriA unique API endpoint that represents the node cluster
                  nameA user provided name for the node cluster
                  stateThe state of the node cluster. See the below table for a list of possible states.
                  node_typeThe resource URI of the node type used for the node cluster
                  diskThe size of the disk where images and containers are stored (in GB)
                  nodesA list of resource URIs of the Node objects on the node cluster
                  regionThe resource URI of the Region object where the node cluster is deployed
                  target_num_nodesThe desired number of nodes for the node cluster
                  current_num_nodesThe actual number of nodes in the node cluster. This may differ from target_num_nodes if the node cluster is being deployed or scaled
                  deployed_datetimeThe date and time when this node cluster was deployed
                  destroyed_datetimeThe date and time when this node cluster was terminated (if applicable)
                  tagsList of tags to identify the node cluster nodes when deploying services (see Tags for more information)
                  provider_optionsProvider-specific extra options for the deployment of the node (see Provider options table below for more information)
                  nicknameA user-friendly name for the node cluster (name by default)
                  - -

                  Node Cluster states

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  StateDescription
                  InitThe node cluster has been created and has no deployed containers yet. Possible actions in this state: deploy, terminate.
                  DeployingAll nodes in the cluster are either deployed or being deployed. No actions allowed in this state.
                  DeployedAll nodes in the cluster are deployed and provisioned. Possible actions in this state: terminate.
                  Partly deployedOne or more nodes of the cluster are deployed and running. Possible actions in this state: terminate.
                  ScalingThe cluster is either deploying new nodes or terminating existing ones responding to a scaling request. No actions allowed in this state.
                  TerminatingAll nodes in the cluster are either being terminated or already terminated. No actions allowed in this state.
                  TerminatedThe node cluster and all its nodes have been terminated. No actions allowed in this state.
                  Empty clusterThere are no nodes deployed in this cluster. Possible actions in this state: terminate.
                  - -

                  Provider options

                  - -

                  You can specify the following options when using the Amazon Web Services provider:

                  - -
                    -
                  • vpc: VPC-related options (optional) - -
                      -
                    • id: AWS VPC identifier of the target VPC where the nodes of the cluster will be deployed (required)
                    • -
                    • subnets: a list of target subnet indentifiers inside selected VPC. If you specify more than one subnet, Docker Cloud will balance among all of them following a high-availability schema (optional)
                    • -
                    • security_groups: the security group that will be applied to every node of the cluster (optional)
                    • -
                  • -
                  • iam: IAM-related options (optional) - -
                      -
                    • instance_profile_name: name of the instance profile (container for instance an IAM role) to attach to every node of the cluster (required)
                    • -
                  • -
                  - -

                  List all node clusters

                  -
                  import dockercloud
                  -
                  -nodeclusters = dockercloud.NodeCluster.list()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -nodeclusters, err := dockercloud.ListNodeClusters()
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(nodeclusters)
                  -
                  -
                  GET /api/infra/v1/nodecluster/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud nodecluster ls
                  -
                  - -

                  Lists all current and recently terminated node clusters. Returns a list of NodeCluster objects.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/infra/v1/[optional_namespace/]nodecluster/

                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  uuidFilter by UUID
                  stateFilter by state. Possible values: Init, Deploying, Deployed, Partly deployed, Scaling, Terminating, Terminated, Empty cluster
                  nameFilter by node cluster name
                  regionFilter by resource URI of the target region
                  node_typeFilter by resource URI of the target node type
                  - -

                  Create a new node cluster

                  -
                  import dockercloud
                  -
                  -region = dockercloud.Region.fetch("digitalocean/lon1")
                  -node_type = dockercloud.NodeType.fetch("digitalocean/1gb")
                  -nodecluster = dockercloud.NodeCluster.create(name="my_cluster", node_type=node_type, region=region, disk=60)
                  -nodecluster.save()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -nodecluster, err := dockercloud.CreateNodeCluster(dockercloud.NodeCreateRequest{Name: "my_cluster", Region: "/api/infra/v1/region/digitalocean/lon1/", NodeType: "/api/infra/v1/nodetype/digitalocean/1gb/", Target_num_nodes: 2})
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(nodecluster)
                  -
                  -
                  POST /api/infra/v1/nodecluster/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -Content-Type: application/json
                  -
                  -{"name": "my_cluster", "region": "/api/infra/v1/region/digitalocean/lon1/", "node_type": "/api/infra/v1/nodetype/digitalocean/1gb/", "disk": 60}
                  -
                  -
                  docker-cloud nodecluster create my_cluster digitalocean lon1 1gb
                  -
                  - -

                  Creates a new node cluster without deploying it.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/infra/v1/[optional_namespace/]nodecluster/

                  - -

                  JSON Parameters

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  name(required) A user provided name for the node cluster
                  node_type(required) The resource URI of the node type to be used for the node cluster
                  region(required) The resource URI of the region where the node cluster is to be deployed
                  disk(optional) The size of the volume to create where images and containers will be stored, in GB (default: 60). Not available for Digital Ocean. To create Softlayer nodes you must select one of the following sizes (in GBs): 10, 20, 25, 30, 40, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400, 500, 750, 1000, 1500 or 2000
                  nickname(optional) A user-friendly name for the node cluster (name by default)
                  target_num_nodes(optional) The desired number of nodes for the node cluster (default: 1)
                  tags(optional) List of tags of the node cluster to be used when deploying services see Tags for more information) (default: [])
                  provider_optionsProvider-specific extra options for the deployment of the node (see table Provider options above for more information)
                  - -

                  Get an existing node cluster

                  -
                  import dockercloud
                  -
                  -service = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(nodecluster)
                  -
                  -
                  GET /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud nodecluster inspect 7eaf7fff
                  -
                  - -

                  Get all the details of an specific node cluster

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the node cluster to retrieve
                  - -

                  Deploy a node cluster

                  -
                  import dockercloud
                  -
                  -nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -nodecluster.deploy()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = nodecluster.Deploy(); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  POST /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/deploy/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  - -

                  Deploys and provisions a recently created node cluster in the specified region and cloud provider.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/deploy/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the node cluster to deploy
                  - -

                  Update an existing node cluster

                  -
                  import dockercloud
                  -
                  -nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -nodecluster.target_num_nodes = 3
                  -nodecluster.tags.add("tag-1")
                  -nodecluster.save()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = nodecluster.Update(dockercloud.NodeCreateRequest{Target_num_nodes: 4}); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  PATCH /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -Content-Type: application/json
                  -
                  -{"target_num_nodes": 3, "tags": [{"name": "tag-1"}]}
                  -
                  -
                  docker-cloud nodecluster scale 7eaf7fff 3
                  -docker-cloud tag add -t tag-1 7eaf7fff
                  -docker-cloud tag set -t tag-2 7eaf7fff
                  -
                  - -

                  Updates the node cluster details and applies the changes automatically.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  PATCH /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the node cluster to update
                  - -

                  JSON Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  target_num_nodes(optional) The number of nodes to scale this node cluster to
                  tags(optional) List of tags the node cluster (and nodes within the node cluster) will have. This operation replaces the user tag list.
                  - -

                  Terminate a node cluster

                  -
                  import dockercloud
                  -
                  -nodecluster = dockercloud.NodeCluster.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -nodecluster.delete()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -nodecluster, err := dockercloud.GetNodeCluster("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = nodecluster.Terminate(); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  DELETE /api/infra/v1/nodecluster/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  dockercloud nodecluster rm 7eaf7fff
                  -
                  - -

                  Terminates all the nodes in a node cluster and the node cluster itself. This is not reversible.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  DELETE /api/infra/v1/[optional_namespace/]nodecluster/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the node cluster to terminate
                  - -

                  Nodes

                  - -

                  Node

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -    "availability_zone": "/api/infra/v1/az/testing-provider/testing-region/testing-az/",
                  -    "cpu": 1,
                  -    "current_num_containers": 4,
                  -    "deployed_datetime": "Tue, 16 Sep 2014 17:01:15 +0000",
                  -    "destroyed_datetime": null,
                  -    "disk": 60,
                  -    "docker_execdriver": "native-0.2",
                  -    "docker_graphdriver": "aufs",
                  -    "docker_version": "1.5.0",
                  -    "external_fqdn": "fc1a5bb9-user.node.dockerapp.io",
                  -    "last_seen": "Thu, 25 Sep 2014 13:14:44 +0000",
                  -    "memory": 1792,
                  -    "nickname": "fc1a5bb9-user.node.dockerapp.io",
                  -    "node_cluster": "/api/infra/v1/user_namespace/nodecluster/d787a4b7-d525-4061-97a0-f423e8f1d229/",
                  -    "node_type": "/api/infra/v1/user_namespace/nodetype/testing-provider/testing-type/",
                  -    "public_ip": "10.45.2.11",
                  -    "region": "/api/infra/v1/region/testing-provider/testing-region/",
                  -    "resource_uri": "/api/infra/v1/user_namespace/node/fc1a5bb9-17f5-4819-b667-8c7cd819e949/",
                  -    "state": "Deployed",
                  -    "tags": [
                  -        {"name": "tag_one"},
                  -        {"name": "tag-two"}
                  -    ],
                  -    "tunnel": "https://tunnel01.cloud.docker.com:12345",
                  -    "uuid": "fc1a5bb9-17f5-4819-b667-8c7cd819e949"
                  -}
                  -
                  - -

                  A node is a virtual machine provided by a cloud provider where containers can be deployed.

                  - -

                  This is a namespaced endpoint.

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  availability_zoneThe resource URI of the availability zone where the node is deployed, if any
                  uuidA unique identifier for the node generated automatically on creation
                  resource_uriA unique API endpoint that represents the node
                  external_fqdnAn automatically generated FQDN for the node. Containers deployed on this node will inherit this FQDN.
                  stateThe state of the node. See the below table for a list of possible states.
                  node_clusterThe resource URI of the node cluster to which this node belongs to (if applicable)
                  node_typeThe resource URI of the node type used for the node
                  regionThe resource URI of the region where the node is deployed
                  docker_execdriverDocker’s execution driver used in the node
                  docker_graphdriverDocker’s storage driver used in the node
                  docker_versionDocker’s version used in the node
                  cpuNode number of CPUs
                  diskNode storage size in GB
                  memoryNode memory in MB
                  current_num_containersThe actual number of containers deployed in this node
                  last_seenDate and time of the last time the node was contacted by Docker Cloud
                  public_ipThe public IP allocated to the node
                  tunnelIf the node does not accept incoming connections to port 2375, the address of the reverse tunnel to access the docker daemon, or null otherwise
                  deployed_datetimeThe date and time when this node cluster was deployed
                  destroyed_datetimeThe date and time when this node cluster was terminated (if applicable)
                  tagsList of tags to identify the node when deploying services (see Tags for more information)
                  nicknameA user-friendly name for the node (external_fqdn by default)
                  - -

                  Node states

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  StateDescription
                  DeployingThe node is being deployed in the cloud provider. No actions allowed in this state.
                  DeployedThe node is deployed and provisioned and is ready to deploy containers. Possible actions in this state: terminate, docker-upgrade.
                  UnreachableThe node is deployed but Docker Cloud cannot connect to the docker daemon. Possible actions in this state: health-check and terminate.
                  UpgradingThe node docker daemon is being upgraded. No actions allowed in this state.
                  TerminatingThe node is being terminated in the cloud provider. No actions allowed in this state.
                  TerminatedThe node has been terminated and is no longer present in the cloud provider. No actions allowed in this state.
                  - -

                  List all nodes

                  -
                  import dockercloud
                  -
                  -nodes = dockercloud.Node.list()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -nodeList, err := dockercloud.ListNodes()
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(nodeList)
                  -
                  -
                  GET /api/infra/v1/node/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud node ls
                  -
                  - -

                  Lists all current and recently terminated nodes. Returns a list of Node objects.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/infra/v1/[optional_namespace/]node/

                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  uuidFilter by UUID
                  stateFilter by state. Possible values: Deploying, Deployed, Unreachable, Upgrading, Terminating, Terminated
                  node_clusterFilter by resource URI of the target node cluster
                  node_typeFilter by resource URI of the target node type
                  regionFilter by resource URI of the target region
                  docker_versionFilter by Docker engine version running in the nodes
                  - -

                  Get an existing node

                  -
                  import dockercloud
                  -
                  -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(node)
                  -
                  -
                  GET /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud node inspect 7eaf7fff
                  -
                  - -

                  Get all the details of an specific node

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/infra/v1/[optional_namespace/]node/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the node to retrieve
                  - -

                  Update a node

                  -
                  import dockercloud
                  -
                  -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -node.tags.add(["tag-1"])
                  -node.save()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -    log.Println(err)
                  -}
                  -
                  -if err = node.Update(dockercloud.Node{Tags: []string{{Name: "tag-1"}}}); err != nil {
                  -            log.Println(err)
                  -}
                  -
                  -
                  PATCH /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -{"tags": [{"name": "tag-1"}], "nickname": "dev node"}
                  -
                  -
                  docker-cloud tag add -t tag-1 7eaf7fff
                  -docker-cloud tag set -t tag-2 7eaf7fff
                  -
                  - -

                  Names the node with a user-friendly name and/or replaces the old tags for the new list provided.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  PATCH /api/infra/v1/[optional_namespace/]node/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the node to retrieve
                  - -

                  JSON Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  nickname(optional) A user-friendly name for the node (external_fqdn by default)
                  tags(optional) List of tags the node will have. This operation replaces the user tag list.
                  - -

                  Upgrade Docker Daemon

                  -
                  import dockercloud
                  -
                  -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -node.upgrade_docker()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = node.Upgrade(); err != nil {
                  -       log.Println(err)
                  -   }
                  -
                  -
                  POST /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/docker-upgrade/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud node upgrade 7eaf7fff
                  -
                  - -

                  Upgrades the docker daemon of the node. This will restart your containers on that node. See Docker upgrade for more information.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/infra/v1/[optional_namespace/]node/(uuid)/docker-upgrade/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the node to upgrade
                  - -

                  Perform a health check of a node

                  -
                  POST /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/health-check/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  - -

                  Tests connectivity between Docker Cloud and the node. Updates the node status to Deployed if the check was successful, or to Unreachable otherwise.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/infra/v1/[optional_namespace/]node/(uuid)/health-check/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the node to perform the health check to
                  - -

                  Terminate a node

                  -
                  import dockercloud
                  -
                  -node = dockercloud.Node.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -node.delete()
                  -
                  -
                  DELETE /api/infra/v1/node/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -node, err := dockercloud.GetNode("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = node.Terminate(); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  docker-cloud node rm 7eaf7fff
                  -
                  - -

                  Terminates the specified node.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  DELETE /api/infra/v1/[optional_namespace/]node/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the node to terminate
                  - -

                  Registries

                  - -

                  Registry

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -  "host": "registry-1.docker.io",
                  -  "is_docker_registry": true,
                  -  "is_ssl": true,
                  -  "name": "Docker Hub",
                  -  "port": 443,
                  -  "resource_uri": "/api/repo/v1/user_namespace/registry/registry-1.docker.io/"
                  -}
                  -
                  - -

                  Represents a registry where repositories are hosted.

                  - -

                  This is a namespaced endpoint.

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  resource_uriA unique API endpoint that represents the registry
                  nameHuman-readable name of the registry
                  hostFQDN of the registry, i.e. registry-1.docker.io
                  is_docker_registryWhether this registry is run by Docker
                  is_sslWhether this registry has SSL activated or not
                  portThe port number where the registry is listening to
                  - -

                  List all registries

                  -
                  GET /api/repo/v1/registry/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  - -

                  Lists all current registries. Returns a list of Registry objects.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/repo/v1/[optional_namespace/]registry/

                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  uuidFilter by UUID
                  nameFilter by registry name
                  hostFilter by registry host
                  is_docker_registryFilter by whether the registry is run by Docker or not. Possible values: ‘true’ or 'false’
                  - -

                  Get an existing registry

                  -
                  GET /api/repo/v1/registry/registry-1.docker.io/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  - -

                  Gets all the details of an specific registry

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/v1/[optional_namespace/]registry/(host)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  hostThe host of the registry to retrieve
                  - -

                  External Repositories

                  - -

                  External Repository

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -  "in_use": false,
                  -  "name": "my.registry.com/myrepo",
                  -  "registry": "/api/repo/v1/user_namespace/registry/my.registry.com/",
                  -  "resource_uri": "/api/repo/v1/user_namespace/repository/my.registry.com/myrepo/",
                  -}
                  -
                  - -

                  The repository endpoint is used to add and remove existing repositories on third party registries to be used in deployments and builds.

                  - -

                  This is a namespaced endpoint.

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  resource_uriA unique API endpoint that represents the repository
                  nameName of the repository, i.e. my.registry.com/myrepo
                  in_useIf the image is being used by any of your services
                  registryResource URI of the registry where this image is hosted
                  - -

                  List all external repositories

                  -
                  import dockercloud
                  -
                  -repositories = dockercloud.Repository.list()
                  -
                  -
                  GET /api/repo/v1/repository/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -repositoriesList, err := dockercloud.ListRepositories()
                  -
                  -if err != nil {
                  -    log.Println(err)
                  -}
                  -
                  -log.Pringln(repositoriesList)
                  -
                  -
                  docker-cloud repository ls
                  -
                  - -

                  Lists all added repositories from third party registries. Returns a list of Repository objects.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/repo/v1/[optional_namespace/]repository/

                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  nameFilter by image name
                  registryFilter by resource URI of the target repository registry
                  - -

                  Add a new external repository

                  -
                  import dockercloud
                  -
                  -repository = dockercloud.Repository.create(name="registry.local/user1/image1", username=username, password=password)
                  -repository.save()
                  -
                  -
                  POST /api/repo/v1/repository/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -Content-Type: application/json
                  -
                  -{"name": "registry.local/user1/image1", "username": "username", "password": "password"}
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -image, err := dockercloud.CreateImage(dockercloud.ImageCreateRequest{
                  -  Name: "registry.local/user1/image1",
                  -  Username: "username",
                  -  Password: "password"
                  -})
                  -
                  -
                  docker-cloud repository register -u username -p password registry.local/user1/image1
                  -
                  - -

                  Adds an existing repository on a third party registry.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/repo/v1/[optional_namespace/]repository/

                  - -

                  JSON Parameters

                  - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  nameName of the repository, i.e. ‘my.registry.com/myrepo’
                  usernameUsername to authenticate with the third party registry
                  passwordPassword to authenticate with the third party registry
                  - -

                  Get an external repository details

                  -
                  import dockercloud
                  -
                  -repository = dockercloud.Repository.fetch("registry.local/user1/image1")
                  -
                  -
                  GET /api/repo/v1/repository/registry.local/user1/image1/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -repository, err = dockercloud.GetRepository("registry.local/user1/image1")
                  -
                  -if err != nil {
                  -    log.Println(err)
                  -}
                  -
                  -log.Println(repository)
                  -
                  -
                  docker-cloud repository inspect registry.local/user1/image1
                  -
                  - -

                  Gets all the details of an specific repository

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/repo/v1/[optional_namespace/]repository/(name)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  nameThe name of the repository to retrieve
                  - -

                  Update credentials of an external repository

                  -
                  import dockercloud
                  -
                  -repository = dockercloud.Repository.fetch("registry.local/user1/image1")
                  -repository.username = "new username"
                  -repository.password = "new password"
                  -repository.save()
                  -
                  -
                  PATCH /api/repo/v1/repository/registry.local/user1/image1/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -Content-Type: application/json
                  -
                  -{"username": "username", "password": "password"}
                  -
                  -
                  docker-cloud repository update -n "new username" -p "new password" registry.local/user1/image1
                  -
                  - -

                  Updates the external repository credentials.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  PATCH /api/repo/v1/[optional_namespace/]repository/(name)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  nameThe name of the repository to update
                  - -

                  JSON Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  usernameUsername to authenticate with the private registry
                  passwordPassword to authenticate with the private registry
                  - -

                  Remove an external repository

                  -
                  import dockercloud
                  -
                  -repository = dockercloud.Repository.fetch("registry.local/user1/image1")
                  -repository.delete()
                  -
                  -
                  DELETE /api/repo/v1/repository/registry.local/user1/image1/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -repository, err = dockercloud.GetRepository("registry.local/user1/image1")
                  -
                  -if err != nil {
                  -    log.Println(err)
                  -}
                  -
                  -repository.Remove()
                  -
                  -
                  docker-cloud repository rm registry.local/user1/image1
                  -
                  - -

                  Removes the external repository from Docker Cloud. It won’t remove the repository from the third party registry where it’s stored.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  DELETE /api/repo/v1/[optional_namespace/]repository/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  nameThe name of the external repository to remove
                  - -

                  Stacks

                  - -

                  Stack

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -  "deployed_datetime": "Mon, 13 Oct 2014 11:01:43 +0000",
                  -  "destroyed_datetime": null,
                  -  "nickname": "deployment stack",
                  -  "name": "dockercloud-app",
                  -  "resource_uri": "/api/app/v1/user_namespace/stack/7fe7ec85-58be-4904-81da-de2219098d7c/",
                  -  "services": [
                  -    "/api/app/v1/user_namespace/service/09cbcf8d-a727-40d9-b420-c8e18b7fa55b/"
                  -  ],
                  -  "state": "Running",
                  -  "synchronized": true,
                  -  "uuid": "09cbcf8d-a727-40d9-b420-c8e18b7fa55b"
                  -}
                  -
                  - -

                  A stack is a logical grouping of closely related services, that may be linked with one another.

                  - -

                  This is a namespaced endpoint.

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  uuidA unique identifier for the stack generated automatically on creation
                  resource_uriA unique API endpoint that represents the stack
                  nameA user provided name for the stack.
                  stateThe state of the stack (see table Stack states below)
                  synchronizedFlag indicating if the current stack definition is synchronized with their services.
                  servicesList of service resource URIs belonging to the stack
                  deployed_datetimeThe date and time of the last deployment of the stack (if applicable, null otherwise)
                  destroyed_datetimeThe date and time of the terminate operation on the stack (if applicable, null otherwise)
                  nicknameA user-friendly name for the stack (name by default)
                  - -

                  Stack states

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  StateDescription
                  Not RunningThe stack has been created and has no deployed services yet. Possible actions in this state: start, terminate.
                  StartingAll services for the stack are either starting or already running. No actions allowed in this state.
                  RunningAll services for the service are deployed and running. Possible actions in this state: redeploy, terminate.
                  Partly runningOne or more services of the stack are deployed and running. Possible actions in this state: redeploy, terminate.
                  StoppingAll services for the stack are either stopping or already stopped. No actions allowed in this state.
                  StoppedAll services for the service are stopped. Possible actions in this state: start, redeploy, terminate.
                  RedeployingThe stack is redeploying all its services with the updated configuration. No actions allowed in this state.
                  TerminatingAll services for the stack are either being terminated or already terminated. No actions allowed in this state.
                  TerminatedThe stack and all its services have been terminated. No actions allowed in this state.
                  - -

                  List all stacks

                  -
                  import dockercloud
                  -
                  -stacks = dockercloud.Stack.list()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -stackList, err := dockercloud.ListStacks()
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(stackList)
                  -
                  -
                  GET /api/app/v1/stack/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud stack ls
                  -
                  - -

                  Lists all current and recently terminated stacks. Returns a list of Stack objects.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/app/v1/[optional_namespace/]stack/

                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  uuidFilter by UUID
                  nameFilter by stack name
                  - -

                  Create a new stack

                  -
                  import dockercloud
                  -
                  -stack = dockercloud.Stack.create(name="my-new-stack", services=[{"name": "hello-word", "image": "tutum/hello-world", "target_num_containers": 2}])
                  -stack.save()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -stack, err := dockercloud.CreateStack(dockercloud.StackCreateRequest{Name: "my-new-stack", Services: []dockercloud.ServiceCreateRequest{{Image: "tutum/hello-world", Name: "test", Target_num_containers: 2}}})
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(stack)
                  -
                  -
                  POST /api/app/v1/stack/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -Content-Type: application/json
                  -
                  -{
                  -    "name": "my-new-stack",
                  -    "services": [
                  -        {
                  -            "name": "hello-word",
                  -            "image": "tutum/hello-world",
                  -            "target_num_containers": 2,
                  -            "linked_to_service": [
                  -                {
                  -                    "to_service": "database",
                  -                    "name": "DB"
                  -                }
                  -            ]
                  -        },
                  -        {
                  -            "name": "database",
                  -            "image": "tutum/mysql"
                  -        }
                  -    ]
                  -}
                  -
                  -
                  docker-cloud stack create --name hello-world -f docker-compose.yml
                  -
                  - -

                  Creates a new stack without starting it. Note that the JSON syntax is abstracted by both, the Docker Cloud CLI and our UI, in order to use Stack YAML files.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]stack/

                  - -

                  JSON Parameters

                  - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  name(required) A human-readable name for the stack, i.e. my-hello-world-stack
                  nickname(optional) A user-friendly name for the stack (name by default)
                  services(optional) List of services belonging to the stack. Each service accepts the same parameters as a Create new service operation (default: []) plus the ability to refer “links” and “volumes-from” by the name of another service in the stack (see example).
                  - -

                  Export an existing stack

                  -
                  import dockercloud
                  -
                  -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
                  -stack.export()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = stack.Export(); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  GET /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/export/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud stack export 46aca402
                  -
                  - -

                  Get a JSON representation of the stack following the Stack YAML representation.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/app/v1/[optional_namespace/]stack/(uuid)/export/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the stack to retrieve
                  - -

                  Get an existing stack

                  -
                  import dockercloud
                  -
                  -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(stack)
                  -
                  -
                  GET /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud stack inspect 46aca402-2109-4a70-a378-760cfed43816
                  -
                  - -

                  Get all the details of an specific stack

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/app/v1/[optional_namespace/]stack/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the stack to retrieve
                  - -

                  Update an existing stack

                  -
                  import dockercloud
                  -
                  -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
                  -stack.services = {"services": [{"name": "hello-word", "image": "tutum/hello-world", "target_num_containers": 2}]}
                  -stack.save()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = stack.Update(dockercloud.StackCreateRequest{Services: []dockercloud.ServiceCreateRequest{{Name: "hello-world", Image: "tutum/hello-world", Target_num_containers: 2}}}); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  PATCH /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -Content-Type: application/json
                  -
                  -{
                  -    "services": [
                  -        {
                  -            "name": "hello-word",
                  -            "image": "tutum/hello-world",
                  -            "target_num_containers": 3,
                  -            "linked_to_service": [
                  -                {
                  -                    "to_service": "database",
                  -                    "name": "DB"
                  -                }
                  -            ]
                  -        },
                  -        {
                  -            "name": "database",
                  -            "image": "tutum/mysql"
                  -        }
                  -    ]
                  -}
                  -
                  -
                  docker-cloud stack update -f docker-compose.yml 46aca402
                  -
                  - -

                  Updates the details of every service in the stack.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  PATCH /api/app/v1/[optional_namespace/]stack/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the stack to update
                  - -

                  JSON Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  services(optional) List of services belonging to the stack. Each service accepts the same parameters as a Update an existing service operation (default: []) plus the ability to refer “links” and “volumes-from” by the name of another service in the stack (see example).
                  - -

                  Stop a stack

                  -
                  import dockercloud
                  -
                  -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
                  -stack.stop()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = stack.Stop(); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  POST /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/stop/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud stack stop 46aca402-2109-4a70-a378-760cfed43816
                  -
                  - -

                  Stops the services in the stack.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]stack/(uuid)/stop/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the stack to stop
                  - -

                  Start a stack

                  -
                  import dockercloud
                  -
                  -stack = dockercloud.Stack.fetch()
                  -stack.start()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = stack.Start(); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  POST /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/start/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud stack start 46aca402
                  -
                  - -

                  Starts the services in the stack.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]stack/(uuid)/start/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the stack to start
                  - -

                  Redeploy a stack

                  -
                  import dockercloud
                  -
                  -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
                  -stack.redeploy()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: true}) to reuse the existing volumes
                  -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}) to not reuse the existing volumes
                  -if err = stack.Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  POST /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/redeploy/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud stack redeploy 46aca402
                  -
                  - -

                  Redeploys all the services in the stack.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]stack/(uuid)/redeploy/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the stack to redeploy
                  - -

                  Query Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  reuse_volumesWheather to reuse container volumes for this redeploy operation or not (default: true).
                  - -

                  Terminate a stack

                  -
                  import dockercloud
                  -
                  -stack = dockercloud.Stack.fetch("46aca402-2109-4a70-a378-760cfed43816")
                  -stack.delete()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -stack, err := dockercloud.GetStack("46aca402-2109-4a70-a378-760cfed43816")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = stack.Terminate(); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  DELETE /api/app/v1/stack/46aca402-2109-4a70-a378-760cfed43816/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud stack terminate 46aca402
                  -
                  - -

                  Terminate all the services in a the stack and the stack itself.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  DELETE /api/app/v1/[optional_namespace/]stack/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the stack to terminate
                  - -

                  Services

                  - -

                  Service

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -  "autodestroy": "OFF",
                  -  "autoredeploy": false,
                  -  "autorestart": "ON_FAILURE",
                  -  "bindings": [
                  -    {
                  -        "host_path": null,
                  -        "container_path": "/tmp",
                  -        "rewritable": true,
                  -        "volumes_from": null
                  -    },
                  -    {
                  -        "host_path": "/etc",
                  -        "container_path": "/etc",
                  -        "rewritable": true,
                  -        "volumes_from": null
                  -    },
                  -    {
                  -        "host_path": null,
                  -        "container_path": null,
                  -        "rewritable": true,
                  -        "volumes_from": "/api/app/v1/user_namespace/service/2f4f54e5-9d3b-4ac1-85ad-a2d4ff25a179/"
                  -    }
                  -  ],
                  -  "cap_add": [
                  -    "ALL"
                  -  ],
                  -  "cap_drop": [
                  -    "NET_ADMIN",
                  -    "SYS_ADMIN"
                  -  ],
                  -  "container_envvars": [
                  -    {
                  -      "key": "DB_PASS",
                  -      "value": "test"
                  -    }
                  -  ],
                  -  "container_ports": [
                  -    {
                  -      "endpoint_uri": "http://wordpress-stackable.admin.srv.dockerapp.io:80/",
                  -      "inner_port": 80,
                  -      "outer_port": 80,
                  -      "port_name": "http",
                  -      "protocol": "tcp",
                  -      "published": true
                  -    }
                  -  ],
                  -  "containers": [
                  -    "/api/app/v1/user_namespace/container/6f8ee454-9dc3-4387-80c3-57aac1be3cc6/",
                  -    "/api/app/v1/user_namespace/container/fdf9c116-7c08-4a60-b0ce-c54ca72c2f25/"
                  -  ],
                  -  "cpu_shares": 100,
                  -  "cpuset": "0,1",
                  -  "cgroup_parent": "m-executor-abcd",
                  -  "current_num_containers": 2,
                  -  "deployed_datetime": "Mon, 13 Oct 2014 11:01:43 +0000",
                  -  "deployment_strategy": "EMPTIEST_NODE",
                  -  "destroyed_datetime": null,
                  -  "devices": [
                  -    "/dev/ttyUSB0:/dev/ttyUSB0"
                  -  ],
                  -  "dns": [
                  -    "8.8.8.8"
                  -  ],
                  -  "dns_search": [
                  -    "example.com"
                  -  ],
                  -  "domainname": "domainname",
                  -  "entrypoint": "",
                  -  "extra_hosts": [
                  -    "onehost:50.31.209.229"
                  -  ],
                  -  "hostname": "hostname",
                  -  "image_name": "tutum/wordpress-stackable:latest",
                  -  "nickname": "wordpress-stackable",
                  -  "labels": {
                  -    "com.example.description": "Accounting webapp",
                  -    "com.example.department": "Finance",
                  -    "com.example.label-with-empty-value": ""
                  -  },
                  -  "link_variables": {
                  -    "WORDPRESS_STACKABLE_1_ENV_DB_HOST": "**LinkMe**",
                  -    "WORDPRESS_STACKABLE_1_ENV_DB_NAME": "wordpress",
                  -    "WORDPRESS_STACKABLE_1_ENV_DB_PASS": "szVaPz925B7I",
                  -    "WORDPRESS_STACKABLE_1_ENV_DB_PORT": "**LinkMe**",
                  -    "WORDPRESS_STACKABLE_1_ENV_DB_USER": "admin",
                  -    "WORDPRESS_STACKABLE_1_ENV_DEBIAN_FRONTEND": "noninteractive",
                  -    "WORDPRESS_STACKABLE_1_ENV_HOME": "/",
                  -    "WORDPRESS_STACKABLE_1_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                  -    "WORDPRESS_STACKABLE_1_PORT": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153",
                  -    "WORDPRESS_STACKABLE_1_PORT_80_TCP": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153",
                  -    "WORDPRESS_STACKABLE_1_PORT_80_TCP_ADDR": "wordpress-stackable-1.admin.cont.dockerapp.io",
                  -    "WORDPRESS_STACKABLE_1_PORT_80_TCP_PORT": "49153",
                  -    "WORDPRESS_STACKABLE_1_PORT_80_TCP_PROTO": "tcp",
                  -    "WORDPRESS_STACKABLE_2_ENV_DB_HOST": "**LinkMe**",
                  -    "WORDPRESS_STACKABLE_2_ENV_DB_NAME": "wordpress",
                  -    "WORDPRESS_STACKABLE_2_ENV_DB_PASS": "szVaPz925B7I",
                  -    "WORDPRESS_STACKABLE_2_ENV_DB_PORT": "**LinkMe**",
                  -    "WORDPRESS_STACKABLE_2_ENV_DB_USER": "admin",
                  -    "WORDPRESS_STACKABLE_2_ENV_DEBIAN_FRONTEND": "noninteractive",
                  -    "WORDPRESS_STACKABLE_2_ENV_HOME": "/",
                  -    "WORDPRESS_STACKABLE_2_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                  -    "WORDPRESS_STACKABLE_2_PORT": "tcp://wordpress-stackable-2.admin.cont.dockerapp.io:49154",
                  -    "WORDPRESS_STACKABLE_2_PORT_80_TCP": "tcp://wordpress-stackable-2.admin.cont.dockerapp.io:49154",
                  -    "WORDPRESS_STACKABLE_2_PORT_80_TCP_ADDR": "wordpress-stackable-2.admin.cont.dockerapp.io",
                  -    "WORDPRESS_STACKABLE_2_PORT_80_TCP_PORT": "49154",
                  -    "WORDPRESS_STACKABLE_2_PORT_80_TCP_PROTO": "tcp",
                  -    "WORDPRESS_STACKABLE_ENV_DB_HOST": "**LinkMe**",
                  -    "WORDPRESS_STACKABLE_ENV_DB_NAME": "wordpress",
                  -    "WORDPRESS_STACKABLE_ENV_DB_PASS": "szVaPz925B7I",
                  -    "WORDPRESS_STACKABLE_ENV_DB_PORT": "**LinkMe**",
                  -    "WORDPRESS_STACKABLE_ENV_DB_USER": "admin",
                  -    "WORDPRESS_STACKABLE_ENV_DEBIAN_FRONTEND": "noninteractive",
                  -    "WORDPRESS_STACKABLE_ENV_HOME": "/",
                  -    "WORDPRESS_STACKABLE_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                  -    "WORDPRESS_STACKABLE_PORT": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153",
                  -    "WORDPRESS_STACKABLE_PORT_80_TCP": "tcp://wordpress-stackable-1.admin.cont.dockerapp.io:49153",
                  -    "WORDPRESS_STACKABLE_PORT_80_TCP_ADDR": "wordpress-stackable-1.admin.cont.dockerapp.io",
                  -    "WORDPRESS_STACKABLE_PORT_80_TCP_PORT": "49153",
                  -    "WORDPRESS_STACKABLE_PORT_80_TCP_PROTO": "tcp",
                  -    "WORDPRESS_STACKABLE_DOCKERCLOUD_API_URL": "https://cloud.docker.com/api/app/v1/user_namespace/service/adeebc1b-1b81-4af0-b8f2-cefffc69d7fb/"
                  -  },
                  -  "linked_from_service": [],
                  -  "linked_to_service": [
                  -    {
                  -      "from_service": "/api/app/v1/user_namespace/service/09cbcf8d-a727-40d9-b420-c8e18b7fa55b/",
                  -      "name": "DB",
                  -      "to_service": "/api/app/v1/user_namespace/service/72f175bd-390b-46e3-9463-830aca32ce3e/"
                  -    }
                  -  ],
                  -  "mac_address": "02:42:ac:11:65:43",
                  -  "memory": 2048,
                  -  "memory_swap": 8192,
                  -  "name": "wordpress-stackable",
                  -  "net": "bridge",
                  -  "privileged": false,
                  -  "public_dns": "wordpress-stackable.admin.svc.dockerapp.io",
                  -  "read_only": true,
                  -  "resource_uri": "/api/app/v1/user_namespace/service/09cbcf8d-a727-40d9-b420-c8e18b7fa55b/",
                  -  "roles": ["global"],
                  -  "run_command": "/run-wordpress.sh",
                  -  "running_num_containers": 1,
                  -  "security_opt": [
                  -  ],
                  -  "sequential_deployment": false,
                  -  "started_datetime": "Mon, 13 Oct 2014 11:01:43 +0000",
                  -  "state": "Partly running",
                  -  "stack": "/api/app/v1/user_namespace/stack/46aca402-2109-4a70-a378-760cfed43816/",
                  -  "stdin_open": false,
                  -  "stopped_datetime": null,
                  -  "stopped_num_containers": 0,
                  -  "synchronized": true,
                  -  "tags": [
                  -        {"name": "tag_one"},
                  -        {"name": "tag-two"},
                  -        {"name": "tagthree3"}
                  -  ],
                  -  "target_num_containers": 2,
                  -  "tty": false,
                  -  "user": "root",
                  -  "uuid": "09cbcf8d-a727-40d9-b420-c8e18b7fa55b",
                  -  "working_dir": "/app"
                  -}
                  -
                  - -

                  A service is a template used to deploy one or more containers.

                  - -

                  This is a namespaced endpoint.

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  uuidA unique identifier for the service generated automatically on creation
                  resource_uriA unique API endpoint that represents the service
                  image_nameThe Docker image name and tag used for the service containers
                  nameA user provided name for the service. This name will be inherited by the service containers and will be used in endpoint URLs, environment variable names, etc.
                  public_dnsAn external FQDN that resolves to all IPs of the nodes where the service containers are running on (as an A record with multiple IP entries which will be used by clients in a round-robin fashion). If the service is not publishing any ports, this FQDN will fail to resolve.
                  stateThe state of the service (see table Service states below)
                  netNetwork mode to set on the containers (see table Network Modes below, more information /docker-cloud/apps/service-links/)
                  pidSet the PID (Process) Namespace mode for the containers (more information)
                  synchronizedFlag indicating if the current service definition is synchronized with the current containers.
                  deployed_datetimeThe date and time of the last deployment of the service (if applicable, null otherwise)
                  started_datetimeThe date and time of the last start operation on the service (if applicable, null otherwise)
                  stopped_datetimeThe date and time of the last stop operation on the service (if applicable, null otherwise)
                  destroyed_datetimeThe date and time of the terminate operation on the service (if applicable, null otherwise)
                  target_num_containersThe requested number of containers to deploy for the service
                  current_num_containersThe actual number of containers deployed for the service
                  running_num_containersThe actual number of containers deployed for the service in Running state
                  stopped_num_containersThe actual number of containers deployed for the service in Stopped state
                  stackResource URIs of the stack that the service belongs to
                  containersList of resource URIs of the containers launched as part of the service
                  container_portsList of ports to be published on the containers of this service (see table Service Port attributes below)
                  container_envvarsList of user-defined environment variables to set on the containers of the service, which will override the image environment variables (see table Service Environment Variable attributes below)
                  labelsMetadata in form of dictionary used for every container of this service
                  working_dirWorking directory for running binaries within a container of this service
                  userSet the user used on containers of this service (root by default)
                  hostnameSet the hostname used on containers of this service
                  domainnameSet the domainname used on containers of this service
                  mac_addressEthernet device’s MAC address used on containers of this service
                  cgroup_nameOptional parent cgroup used on containers of this service.
                  ttyIf the containers of this service have the tty enable (false by default)
                  stdin_openIf the containers of this service have stdin opened (false by default)
                  dnsCustom DNS servers for containers of this service
                  dns_searchCustom DNS search domain for containers of this service
                  cap_addAdded capabilities for containers of this service
                  cap_dropDropped capabilities for containers of this service
                  devicesList of device mappings for containers of this service
                  extra_hostsList of hostname mappings for containers of this service
                  secuirty_optLabeling scheme for containers of this service
                  entrypointEntrypoint to be set on the containers launched as part of the service, which will override the image entrypoint
                  run_commandRun command to be set on the containers launched as part of the service, which will override the image run command
                  sequential_deploymentWhether the containers for this service should be deployed in sequence, linking each of them to the previous containers (see Service scaling for more information)
                  cpu_sharesThe relative CPU priority of the containers of the service (see Runtime Constraints on CPU and Memory for more information)
                  cpusetCPUs in which to allow execution
                  memoryThe memory limit of the containers of the service in MB (see Runtime Constraints on CPU and Memory for more information)
                  memory_swapTotal memory limit (memory + swap) of the containers of the service in MB
                  linked_from_serviceA list of services that are linked to this one (see table Related services attributes below)
                  linked_to_serviceA list of services that the service is linked to (see table Related services attributes below)
                  bindingsA list of volume bindings that the service has mounted (see table Service binding attributes below)
                  autorestartWhether to restart the containers of the service automatically if they stop (see Crash recovery for more information)
                  autodestroyWhether to terminate the containers of the service automatically if they stop (see Autodestroy for more information)
                  rolesList of Docker Cloud roles assigned to this service (see Service links for more information)
                  link_variablesList of environment variables that would be exposed in the containers if they are linked to this service
                  privilegedWhether to start the containers with Docker’s privileged flag set or not, which allows containers to access all devices on the host among other things (see Runtime privilege for more information)
                  read_onlyWhether the filesystem of every service container is read-only or not (false by default)
                  deployment_strategyContainer distribution among nodes (see table Deployment strategies below and Deployment strategies for more information)
                  tagsList of tags to be used to deploy the service (see Tags for more information)
                  autoredeployWhether to redeploy the containers of the service when its image is updated in Docker Cloud registry (see Docker Cloud’s private registry for more information)
                  nicknameA user-friendly name for the service (name by default)
                  - -

                  Service binding attributes

                  - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  host_pathThe host path of the volume
                  container_pathThe container path where the volume is mounted
                  rewritabletrue is the volume has writable permissions
                  volumes_fromThe resource URI of the service
                  - -

                  Service Port attributes

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  protocolThe protocol of the port, either tcp or udp
                  inner_portThe published port number inside the container
                  outer_portThe published port number in the node public network interface
                  port_nameName of the service associated to this port
                  endpoint_uriThe URI of the service endpoint for this port
                  publishedWhether the port has been published in the host public network interface or not. Non-published ports can only be accessed via links.
                  - -

                  Service Environment Variable attributes

                  - - - - - - - - - - - - - - - -
                  AttributeDescription
                  keyThe name of the environment variable
                  valueThe value of the environment variable
                  - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  nameThe link name
                  from_serviceThe resource URI of the origin of the link
                  to_serviceThe resource URI of the target of the link
                  - -

                  Service states

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  StateDescription
                  Not runningThe service has been created and has no deployed containers yet. Possible actions in this state: start, terminate.
                  StartingAll containers for the service are either starting or already running. No actions allowed in this state.
                  RunningAll containers for the service are deployed and running. Possible actions in this state: stop, redeploy, terminate.
                  Partly runningOne or more containers of the service are deployed and running. Possible actions in this state: stop, redeploy, terminate.
                  ScalingThe service is either deploying new containers or destroying existing ones responding to a scaling request. No actions allowed in this state.
                  RedeployingThe service is redeploying all its containers with the updated configuration. No actions allowed in this state.
                  StoppingAll containers for the service are either stopping or already stopped. No actions allowed in this state.
                  StoppedAll containers for the service are stopped. Possible actions in this state: start, redeploy, terminate.
                  TerminatingAll containers for the service are either being terminated or already terminated. No actions allowed in this state.
                  TerminatedThe service and all its containers have been terminated. No actions allowed in this state.
                  - -

                  Deployment strategies

                  - - - - - - - - - - - - - - - - - - - -
                  StrategyDescription
                  EMPTIEST_NODEIt will deploy containers to the node with the lower total amount of running containers (default).
                  HIGH_AVAILABILITYIt will deploy containers to the node with the lower amount of running containers of the same service.
                  EVERY_NODEIt will deploy one container on every node. The service won’t be able to scale manually. New containers will be deployed to new nodes automatically.
                  - -

                  Network Modes

                  - - - - - - - - - - - - - - - -
                  StrategyDescription
                  bridgeCreates a new network stack for the container on the docker bridge.
                  hostUses the host network stack inside the container.
                  - -

                  List all services

                  -
                  import dockercloud
                  -
                  -services = dockercloud.Service.list()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -serviceList, err := dockercloud.ListServices()
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(serviceList)
                  -
                  -
                  GET /api/app/v1/service/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud service ps
                  -
                  - -

                  Lists all current and recently terminated services. Returns a list of Service objects.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/app/v1/[optional_namespace/]service/

                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  uuidFilter by UUID
                  stateFilter by state. Possible values: Not running, Starting, Running, Partly running, Scaling, Redeploying, Stopping, Stopped, Terminating, Terminated
                  nameFilter by service name
                  stackFilter by resource URI of the target stack.
                  - -

                  Create a new service

                  -
                  import dockercloud
                  -
                  -service = dockercloud.Service.create(image="tutum/hello-world", name="my-new-app", target_num_containers=2)
                  -service.save()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -service, err := dockercloud.CreateService(dockercloud.ServiceCreateRequest{Image: "tutum/hello-world",  Name: "my-new-app", Target_num_containers: 2})
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(service)
                  -
                  -
                  POST /api/app/v1/service/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -Content-Type: application/json
                  -
                  -{"image": "tutum/hello-world", "name": "my-new-app", "target_num_containers": 2}
                  -
                  -
                  docker-cloud service create -t 2 --name my-new-app tutum/hello-world
                  -
                  - -

                  Creates a new service without starting it.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]service/

                  - -

                  JSON Parameters

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  image(required) The image used to deploy this service in docker format, i.e. tutum/hello-world
                  name(optional) A human-readable name for the service, i.e. my-hello-world-app (default: image without namespace)
                  target_num_containers(optional) The number of containers to run for this service initially (default: 1)
                  run_command(optional) The command used to start the containers of this service, overriding the value specified in the image, i.e. /run.sh (default: null)
                  entrypoint(optional) The command prefix used to start the containers of this service, overriding the value specified in the image, i.e. /usr/sbin/sshd (default: null)
                  container_ports(optional) An array of objects with port information to be published in the containers for this service, which will be added to the image port information, i.e. [{"protocol": "tcp", "inner_port": 80, "outer_port": 80}] (default: []) (See table Service Port attributes below)
                  container_envvars(optional) An array of objects with environment variables to be added in the service containers on launch (overriding any image-defined environment variables), i.e. [{"key": "DB_PASSWORD", "value": "mypass"}] (default: []) (See table Service Environment Variable attributes below)
                  linked_to_service(optional) An array of service resource URIs to link this service to, including the link name, i.e. [{"to_service": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "name": "db"}] (default: []) (See table Related services attributes below)
                  bindings(optional) An array of bindings this service has to mount, i.e. [{"volumes_from": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "rewritable": true}] (default: []) (See table Related bindings attributes below)
                  autorestart(optional) Whether the containers for this service should be restarted if they stop, i.e. ALWAYS (default: OFF, possible values: OFF, ON_FAILURE, ALWAYS) (see Crash recovery for more information)
                  autodestroy(optional) Whether the containers should be terminated if they stop, i.e. OFF (default: OFF, possible values: OFF, ON_SUCCESS, ALWAYS) (see Autodestroy for more information)
                  sequential_deployment(optional) Whether the containers should be launched and scaled in sequence, i.e. true (default: false) (see Service scaling for more information)
                  roles(optional) A list of Docker Cloud API roles to grant the service, i.e. ["global"] (default: [], possible values: global) (see Service links for more information)
                  privileged(optional) Whether to start the containers with Docker’s privileged flag set or not, i.e. false (default: false) (see Runtime privilege for more information)
                  deployment_strategy(optional) Container distribution among nodes (default: EMPTIEST_NODE, see table Deployment strategies above and Deployment strategies for more information)
                  tags(optional) A list of tags to be used to deploy the service (see Tags for more information) (default: [])
                  autoredeploy(optional) Whether to redeploy the containers of the service when its image is updated in Docker Cloud registry (default: false) (see Docker Cloud’s private registry for more information)
                  net(optional) Set the network mode to the containers (default: bridge, possible values: bridge, host)
                  pid(optional) Set the PID (Process) Namespace mode for the containers (default: none value, possible values: none, host)
                  working_dir(optional) Working directory for running binaries within a container of this service (default: /)
                  nickname(optional) A user-friendly name for the service (name by default)
                  - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  host_path(optional) The host path of the volume
                  container_path(required if volumes_from is omitted) The container path where the volume is mounted
                  rewritable(optional) true is the volume has writable permissions (default: true)
                  volumes_from(required if container_path is omitted) The resource URI of the service
                  - -

                  Service Port attributes

                  - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  protocol(required) The protocol of the port, either tcp or udp
                  inner_port(required) The port number inside the container to be published
                  outer_port(optional) The port number in the node public network interface to be published (default: dynamic allocation if published is true)
                  published(optional) Whether to publish the port in the host public network interface or not. Non-published ports can only be accessed via links. (default: false)
                  - -

                  Service Environment Variable attributes

                  - - - - - - - - - - - - - - - -
                  AttributeDescription
                  key(required) The name of the environment variable
                  value(required) The value of the environment variable
                  - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  to_service(required) The resource URI of the target of the link
                  name(optional) The link name
                  - -

                  Get an existing service

                  -
                  import dockercloud
                  -
                  -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(service)
                  -
                  -
                  GET /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud service inspect 7eaf7fff
                  -
                  - -

                  Get all the details of an specific service

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/app/v1/[optional_namespace/]service/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the service to retrieve
                  - -

                  Get the logs of a service

                  - -
                  -

                  Example log line

                  -
                  -
                  {
                  -    "type": "log",
                  -    "source": "wordpress-stackable-1",
                  -    "log": "Log line from the container indicated by 'source'",
                  -    "streamType": "stdout",
                  -    "timestamp": 1433779324
                  -}
                  -
                  -
                  import dockercloud
                  -
                  -def log_handler(message):
                  -    print message
                  -
                  -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -service.logs(tail=300, follow=True, log_handler=log_handler)
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -c := make(chan Logs)
                  -
                  -go service.Logs(c)
                  -    for {
                  -        s := <-c
                  -        log.Println(s)
                  -    }
                  -
                  -
                  GET /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1
                  -Host: ws.cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Connection: Upgrade
                  -Upgrade: websocket
                  -
                  -
                  docker-cloud service logs 7eaf7fff
                  -
                  - -

                  Get the aggregated logs of all the containers of the service.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s STREAM API

                  - -

                  HTTP Request

                  - -

                  GET /api/app/v1/[optional_namespace/]service/(uuid)/logs/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the service to retrieve logs
                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  tailNumber of lines to show from the end of the logs (default: 300)
                  followWhether to stream logs or close the connection immediately (default: true)
                  - -

                  Update an existing service

                  -
                  import dockercloud
                  -
                  -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -service.target_num_containers = 3
                  -service.tags.append({"name":"tag-1"})
                  -service.save()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = service.Update(dockercloud.ServiceCreateRequest{Target_num_containers: 3}); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  PATCH /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -Content-Type: application/json
                  -
                  -{"autorestart": "ON_FAILURE", "autodestroy": "OFF", "container_envvars": [{"key": "DB_PASSWORD", "value": "mypass"}],
                  -"container_ports": [{"protocol": "tcp", "inner_port": 80, "outer_port": 80}], "cpu_shares": 512,
                  -"entrypoint": "/usr/sbin/sshd", "image": "tutum/hello-world",
                  -"linked_to_service": [{"to_service": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "name": "db"}],
                  -"memory": 2048, "privileged": True, "roles": ["global"], "run_command": "/run.sh", "sequential_deployment": False,
                  -"tags": [{"name": "tag-1"}], "target_num_containers": 3, "autoredeploy": False}
                  -
                  -
                  -
                  docker-cloud service scale 7eaf7fff 3
                  -docker-cloud tag add -t tag-1 7eaf7fff
                  -docker-cloud tag set -t tag-2 7eaf7fff
                  -
                  - -

                  Updates the service details.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  PATCH /api/app/v1/[optional_namespace/]service/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the service to update
                  - -

                  JSON Parameters

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  autorestart(optional) Whether the containers for this service should be restarted if they stop, i.e. ALWAYS (possible values: OFF, ON_FAILURE, ALWAYS) (see Crash recovery for more information)
                  autodestroy(optional) Whether the containers should be terminated if they stop, i.e. OFF (possible values: OFF, ON_SUCCESS, ALWAYS) (see Autodestroy for more information)
                  container_envvars(optional) An array of objects with environment variables to be added in the service containers on launch (overriding any image-defined environment variables), i.e. [{"key": "DB_PASSWORD", "value": "mypass"}] (See table Service Environment Variable attributes)
                  container_ports(optional) An array of objects with port information to be published in the containers for this service, which will be added to the image port information, i.e. [{"protocol": "tcp", "inner_port": 80, "outer_port": 80}] (See table Service Port attributes)
                  cpu_shares(optional) The relative CPU priority of the containers the service describes (see Runtime Constraints on CPU and Memory for more information)
                  entrypoint(optional) The command prefix used to start the containers of this service, overriding the value specified in the image, i.e. /usr/sbin/sshd
                  image(optional) The image used to deploy this service in docker format, i.e. tutum/hello-world, tutum/ubuntu:5.6. If no tag is indicated, it will be set to latest by default
                  linked_to_service(optional) An array of service resource URIs to link this service to, including the link name, i.e. [{"to_service": "/api/app/v1/service/80ff1635-2d56-478d-a97f-9b59c720e513/", "name": "db"}] (See table Related services attributes below)
                  memory(optional) The memory limit of the containers of the service in MB (see Runtime Constraints on CPU and Memory for more information)
                  privileged(optional) Whether to start the containers with Docker’s privileged flag set or not, i.e. false (see Runtime privilege for more information)
                  roles(optional) A list of Docker Cloud API roles to grant the service, i.e. ["global"] (possible values: global) (see Service links for more information)
                  run_command(optional) The command used to start the containers of this service, overriding the value specified in the image, i.e. /run.sh
                  sequential_deployment(optional) Whether the containers should be launched and scaled in sequence, i.e. true (see Service scaling for more information)
                  tags(optional) List of new tags the service will have. This operation replaces the tag list
                  target_num_containers(optional) The number of containers to scale this service to
                  deployment_strategy(optional) Container distribution among nodes. A service cannot be updated to or from a deployment strategy of EVERY_NODE. (See table Deployment strategies above and Deployment strategies for more information)
                  autoredeployWhether to redeploy the containers of the service when its image is updated in Docker Cloud registry (see Docker Cloud’s private registry for more information)
                  net(optional) Set the network mode to the containers (default: bridge, possible values: bridge, host)
                  pid(optional) Set the PID (Process) Namespace mode for the containers (default: none value, possible values: none, host)
                  working_dir(optional) Working directory for running binaries within a container of this service (default: /)
                  nickname(optional) A user-friendly name for the service (name by default)
                  - -

                  Start a service

                  -
                  import dockercloud
                  -
                  -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -service.start()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = service.Start(); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud service start 7eaf7fff
                  -
                  - -

                  Starts all containers in a stopped or partly running service.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]service/(uuid)/start/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the service to start
                  - -

                  Stop a service

                  -
                  import dockercloud
                  -
                  -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -service.stop()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = service.Stop(); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/stop/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud service stop 7eaf7fff
                  -
                  - -

                  Stops all containers in a running or partly running service.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]service/(uuid)/stop/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the service to stop
                  - -

                  Scale a service

                  -
                  import dockercloud
                  -
                  -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -service.target_num_containers = 3
                  -service.save()
                  -service.scale()
                  -
                  -
                  POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/scale/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud service scale 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce 3
                  -
                  - -

                  Scales the service to its current target_num_containers field.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]service/(uuid)/scale/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the service to scale
                  - -

                  Redeploy a service

                  -
                  import dockercloud
                  -
                  -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -service.redeploy()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: true}) to reuse the existing volumes
                  -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}) to not reuse the existing volumes
                  -if err = service.Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  POST /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/redeploy/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud service redeploy 7eaf7fff
                  -
                  - -

                  Redeploys all containers in the service with the current service configuration.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]service/(uuid)/redeploy/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the service to redeploy
                  - -

                  Query Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  reuse_volumesWheather to reuse container volumes for this redeploy operation or not (default: true).
                  - -

                  Terminate a service

                  -
                  import dockercloud
                  -
                  -service = dockercloud.Service.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -service.delete()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -service, err := dockercloud.GetService("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -if err = service.Terminate(); err != nil {
                  -   log.Println(err)
                  -}
                  -
                  -
                  DELETE /api/app/v1/service/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud service terminate 7eaf7fff
                  -
                  - -

                  Terminate all the containers in a service and the service itself. This is not reversible. All the data stored in all containers of the service will be permanently deleted.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  DELETE /api/app/v1/[optional_namespace/]service/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the service to terminate
                  - -

                  Containers

                  - -

                  Container

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -    "autodestroy": "OFF",
                  -    "autorestart": "OFF",
                  -    "bindings": [
                  -        {
                  -            "volume": "/api/infra/v1/user_namespace/volume/1863e34d-6a7d-4945-aefc-8f27a4ab1a9e/",
                  -            "host_path": null,
                  -            "container_path": "/data",
                  -            "rewritable": true
                  -        },
                  -        {
                  -            "volume": null,
                  -            "host_path": "/etc",
                  -            "container_path": "/etc",
                  -            "rewritable": true
                  -        }
                  -    ],
                  -    "cap_add": [
                  -        "ALL"
                  -    ],
                  -    "cap_drop": [
                  -        "NET_ADMIN",
                  -        "SYS_ADMIN"
                  -    ],
                  -    "container_envvars": [
                  -        {
                  -            "key": "DB_1_ENV_DEBIAN_FRONTEND",
                  -            "value": "noninteractive"
                  -        },
                  -        {
                  -            "key": "DB_1_ENV_MYSQL_PASS",
                  -            "value": "**Random**"
                  -        },
                  -        {
                  -            "key": "DB_1_ENV_MYSQL_USER",
                  -            "value": "admin"
                  -        },
                  -        {
                  -            "key": "DB_1_ENV_PATH",
                  -            "value": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
                  -        },
                  -        {
                  -            "key": "DB_1_ENV_REPLICATION_MASTER",
                  -            "value": "**False**"
                  -        },
                  -        {
                  -            "key": "DB_1_ENV_REPLICATION_PASS",
                  -            "value": "replica"
                  -        },
                  -        {
                  -            "key": "DB_1_ENV_REPLICATION_SLAVE",
                  -            "value": "**False**"
                  -        },
                  -        {
                  -            "key": "DB_1_ENV_REPLICATION_USER",
                  -            "value": "replica"
                  -        },
                  -        {
                  -            "key": "DB_1_PORT",
                  -            "value": "tcp://172.16.0.3:3306"
                  -        },
                  -        {
                  -            "key": "DB_1_PORT_3306_TCP",
                  -            "value": "tcp://172.16.0.3:3306"
                  -        },
                  -        {
                  -            "key": "DB_1_PORT_3306_TCP_ADDR",
                  -            "value": "172.16.0.3"
                  -        },
                  -        {
                  -            "key": "DB_1_PORT_3306_TCP_PORT",
                  -            "value": "3306"
                  -        },
                  -        {
                  -            "key": "DB_1_PORT_3306_TCP_PROTO",
                  -            "value": "tcp"
                  -        },
                  -        {
                  -            "key": "DB_ENV_DEBIAN_FRONTEND",
                  -            "value": "noninteractive"
                  -        },
                  -        {
                  -            "key": "DB_ENV_MYSQL_PASS",
                  -            "value": "**Random**"
                  -        },
                  -        {
                  -            "key": "DB_ENV_MYSQL_USER",
                  -            "value": "admin"
                  -        },
                  -        {
                  -            "key": "DB_ENV_PATH",
                  -            "value": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
                  -        },
                  -        {
                  -            "key": "DB_ENV_REPLICATION_MASTER",
                  -            "value": "**False**"
                  -        },
                  -        {
                  -            "key": "DB_ENV_REPLICATION_PASS",
                  -            "value": "replica"
                  -        },
                  -        {
                  -            "key": "DB_ENV_REPLICATION_SLAVE",
                  -            "value": "**False**"
                  -        },
                  -        {
                  -            "key": "DB_ENV_REPLICATION_USER",
                  -            "value": "replica"
                  -        },
                  -        {
                  -            "key": "DB_PASS",
                  -            "value": "szVaPz925B7I"
                  -        },
                  -        {
                  -            "key": "DB_PORT",
                  -            "value": "tcp://172.16.0.3:3306"
                  -        },
                  -        {
                  -            "key": "DB_PORT_3306_TCP",
                  -            "value": "tcp://172.16.0.3:3306"
                  -        },
                  -        {
                  -            "key": "DB_PORT_3306_TCP_ADDR",
                  -            "value": "172.16.0.3"
                  -        },
                  -        {
                  -            "key": "DB_PORT_3306_TCP_PORT",
                  -            "value": "3306"
                  -        },
                  -        {
                  -            "key": "DB_PORT_3306_TCP_PROTO",
                  -            "value": "tcp"
                  -        },
                  -        {
                  -            "key": "DB_DOCKERCLOUD_API_URL",
                  -            "value": "https://cloud.docker.com/api/app/v1/user_namespace/service/c0fed1dc-c528-40c9-aa4c-dc00672ebcbf/"
                  -        }
                  -    ],
                  -    "container_ports": [
                  -        {
                  -            "endpoint_uri": "http://wordpress-stackable-1.admin.cont.dockerapp.io:49153/",
                  -            "inner_port": 80,
                  -            "outer_port": 49153,
                  -            "port_name": "http",
                  -            "protocol": "tcp",
                  -            "published": true,
                  -            "uri_protocol": "http"
                  -        }
                  -    ],
                  -    "cpu_shares": 100,
                  -    "cpuset": "0,1",
                  -    "cgroup_parent": "m-executor-abcd",
                  -    "deployed_datetime": "Thu, 16 Oct 2014 12:04:08 +0000",
                  -    "destroyed_datetime": null,
                  -    "devices": [
                  -        "/dev/ttyUSB0:/dev/ttyUSB0"
                  -    ],
                  -    "dns": [
                  -        "8.8.8.8"
                  -    ],
                  -    "dns_search": [
                  -        "example.com",
                  -        "c1dd4e1e-1356-411c-8613-e15146633640.local.dockerapp.io"
                  -    ],
                  -    "domainname": "domainname",
                  -    "entrypoint": "",
                  -    "exit_code": null,
                  -    "exit_code_msg": null,
                  -    "extra_hosts": [
                  -        "onehost:50.31.209.229"
                  -    ],
                  -    "hostname": "hostname",
                  -    "image_name": "tutum/wordpress-stackable:latest",
                  -    "labels": {
                  -        "com.example.description": "Accounting webapp",
                  -        "com.example.department": "Finance",
                  -        "com.example.label-with-empty-value": ""
                  -    },
                  -    "linked_to_container": [
                  -        {
                  -            "endpoints": {
                  -                "3306/tcp": "tcp://172.16.0.3:3306"
                  -            },
                  -            "from_container": "/api/app/v1/user_namespace/container/c1dd4e1e-1356-411c-8613-e15146633640/",
                  -            "name": "DB_1",
                  -            "to_container": "/api/app/v1/user_namespace/container/ba434e1e-1234-411c-8613-e15146633640/"
                  -        }
                  -    ],
                  -    "link_variables": {
                  -        "WORDPRESS_STACKABLE_1_ENV_DB_HOST": "**LinkMe**",
                  -        "WORDPRESS_STACKABLE_1_ENV_DB_NAME": "wordpress",
                  -        "WORDPRESS_STACKABLE_1_ENV_DB_PASS": "szVaPz925B7I",
                  -        "WORDPRESS_STACKABLE_1_ENV_DB_PORT": "**LinkMe**",
                  -        "WORDPRESS_STACKABLE_1_ENV_DB_USER": "admin",
                  -        "WORDPRESS_STACKABLE_1_ENV_DEBIAN_FRONTEND": "noninteractive",
                  -        "WORDPRESS_STACKABLE_1_ENV_HOME": "/",
                  -        "WORDPRESS_STACKABLE_1_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                  -        "WORDPRESS_STACKABLE_1_PORT": "tcp://172.16.0.2:80",
                  -        "WORDPRESS_STACKABLE_1_PORT_80_TCP": "tcp://172.16.0.2:80",
                  -        "WORDPRESS_STACKABLE_1_PORT_80_TCP_ADDR": "172.16.0.2",
                  -        "WORDPRESS_STACKABLE_1_PORT_80_TCP_PORT": "80",
                  -        "WORDPRESS_STACKABLE_1_PORT_80_TCP_PROTO": "tcp",
                  -        "WORDPRESS_STACKABLE_ENV_DB_HOST": "**LinkMe**",
                  -        "WORDPRESS_STACKABLE_ENV_DB_NAME": "wordpress",
                  -        "WORDPRESS_STACKABLE_ENV_DB_PASS": "szVaPz925B7I",
                  -        "WORDPRESS_STACKABLE_ENV_DB_PORT": "**LinkMe**",
                  -        "WORDPRESS_STACKABLE_ENV_DB_USER": "admin",
                  -        "WORDPRESS_STACKABLE_ENV_DEBIAN_FRONTEND": "noninteractive",
                  -        "WORDPRESS_STACKABLE_ENV_HOME": "/",
                  -        "WORDPRESS_STACKABLE_ENV_PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                  -        "WORDPRESS_STACKABLE_PORT": "tcp://172.16.0.2:80",
                  -        "WORDPRESS_STACKABLE_PORT_80_TCP": "tcp://172.16.0.2:80",
                  -        "WORDPRESS_STACKABLE_PORT_80_TCP_ADDR": "172.16.0.2",
                  -        "WORDPRESS_STACKABLE_PORT_80_TCP_PORT": "80",
                  -        "WORDPRESS_STACKABLE_PORT_80_TCP_PROTO": "tcp"
                  -    },
                  -    "mac_address": "02:42:ac:11:65:43",
                  -    "memory": 1024,
                  -    "memory_swap": 4096,
                  -    "name": "wordpress-stackable",
                  -    "net": "bridge",
                  -    "node": "/api/infra/v1/user_namespace/node/9691c44e-3155-4ca2-958d-c9571aac0a14/",
                  -    "pid": "none",
                  -    "private_ip": "10.7.0.1",
                  -    "privileged": false,
                  -    "public_dns": "wordpress-stackable-1.admin.cont.dockerapp.io",
                  -    "read_only": true,
                  -    "resource_uri": "/api/app/v1/user_namespace/container/c1dd4e1e-1356-411c-8613-e15146633640/",
                  -    "roles": ["global"],
                  -    "run_command": "/run-wordpress.sh",
                  -    "security_opt": [
                  -        "label:user:USER",
                  -        "label:role:ROLE"
                  -    ],
                  -    "service": "/api/app/v1/user_namespace/service/adeebc1b-1b81-4af0-b8f2-cefffc69d7fb/",
                  -    "started_datetime": "Thu, 16 Oct 2014 12:04:08 +0000",
                  -    "state": "Running",
                  -    "stdin_open": false,
                  -    "stopped_datetime": null,
                  -    "synchronized": true,
                  -    "tty": false,
                  -    "user": "root",
                  -    "uuid": "c1dd4e1e-1356-411c-8613-e15146633640",
                  -    "working_dir": "/app"
                  -}
                  -
                  - -

                  A container is a representation of a Docker container in a node.

                  - -

                  This is a namespaced endpoint.

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  uuidA unique identifier for the container generated automatically on creation
                  resource_uriA unique API endpoint that represents the container
                  image_nameThe Docker image name and tag of the container
                  bindingsA list of volume bindings that the container has mounted (see table Container Binding attributes below)
                  nameA user provided name for the container (inherited from the service)
                  nodeThe resource URI of the node where this container is running
                  serviceThe resource URI of the service which this container is part of
                  public_dnsThe external FQDN of the container
                  stateThe state of the container (see table Container states below)
                  synchronizedFlag indicating if the container is synchronized with the current service definition.
                  exit_codeThe numeric exit code of the container (if applicable, null otherwise)
                  exit_code_msgA string representation of the exit code of the container (if applicable, null otherwise)
                  deployed_datetimeThe date and time of the last deployment of the container (if applicable, null otherwise)
                  started_datetimeThe date and time of the last start operation on the container (if applicable, null otherwise)
                  stopped_datetimeThe date and time of the last stop operation on the container (if applicable, null otherwise)
                  destroyed_datetimeThe date and time of the terminate operation on the container (if applicable, null otherwise)
                  container_portsList of published ports of this container (see table Container Port attributes below)
                  container_envvarsList of user-defined environment variables set on the containers of the service, which will override the container environment variables (see table Container Environment Variable attributes below)
                  labelsContainer metadata in form of dictionary
                  working_dirWorking directory for running binaries within a container
                  userUser used on the container on launch
                  hostnameHostname used on the container on launch
                  domainnameDomainname used on the container on launch
                  mac_addressEthernet device’s MAC address used on the container on launch
                  cgroup_nameOptional parent cgroup for the container.
                  ttyIf the container has the tty enable
                  stdin_openIf the container has stdin opened
                  dnsContainer custom DNS servers
                  dns_searchContainer custom DNS search domain
                  cap_addContainer added capabilities
                  cap_dropContainer dropped capabilities
                  devicesList of container device mappings
                  extra_hostsList of container hostname mappings
                  secuirty_optLabeling scheme of this container
                  entrypointEntrypoint used on the container on launch
                  run_commandRun command used on the container on launch
                  cpu_sharesThe relative CPU priority of the container (see Runtime Constraints on CPU and Memory for more information)
                  cpusetCPUs in which execution is allowed
                  memoryThe memory limit of the container in MB (see Runtime Constraints on CPU and Memory for more information)
                  memory_swapTotal memory limit (memory + swap) of the container in MB
                  autorestartWhether to restart the container automatically if it stops (see Crash recovery for more information)
                  autodestroyWhether to terminate the container automatically if it stops (see Autodestroy for more information)
                  rolesList of Docker Cloud roles asigned to this container (see API roles for more information))
                  linked_to_containerList of IP addresses of the linked containers (see table Container Link attributes below and Service links for more information)
                  link_variablesList of environment variables that would be exposed in any container that is linked to this one
                  privilegedWhether the container has Docker’s privileged flag set or not (see Runtime privilege for more information)
                  read_onlyWhether the container filesystem is read-only or not
                  private_ipIP address of the container on the overlay network. This IP will be reachable from any other container.
                  netNetwork mode set on the container (see table Network Modes below, more information)
                  pidPID (Process) Namespace mode for the container (more information)
                  - -

                  Container Binding attributes

                  - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  host_pathThe host path of the volume
                  container_pathThe container path where the volume is mounted
                  rewritabletrue is the volume has writable permissions
                  volumeThe resource URI of the volume
                  - -

                  Container Port attributes

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  protocolThe protocol of the port, either tcp or udp
                  inner_portThe published port number inside the container
                  outer_portThe published port number in the node public network interface
                  port_nameName of the service associated to this port
                  uri_protocolThe protocol to be used in the endpoint for this port (i.e. http)
                  endpoint_uriThe URI of the endpoint for this port
                  publishedWhether the port has been published in the host public network interface or not. Non-published ports can only be accessed via links.
                  - -

                  Container Environment Variable attributes

                  - - - - - - - - - - - - - - - -
                  AttributeDescription
                  keyThe name of the environment variable
                  valueThe value of the environment variable
                  - -

                  Container States

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  StateDescription
                  StartingThe container is being deployed or started (from Stopped). No actions allowed in this state.
                  RunningThe container is deployed and running. Possible actions in this state: stop, terminate.
                  StoppingThe container is being stopped. No actions allowed in this state.
                  StoppedThe container is stopped. Possible actions in this state: start, terminate.
                  TerminatingThe container is being deleted. No actions allowed in this state.
                  TerminatedThe container has been deleted. No actions allowed in this state.
                  - -

                  Network Modes

                  - - - - - - - - - - - - - - - -
                  StrategyDescription
                  bridgeCreates a new network stack for the container on the docker bridge.
                  hostUses the host network stack inside the container.
                  - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  nameThe name given to the link
                  from_containerThe resource URI of the “client” container
                  to_containerThe resource URI of the “server” container being linked
                  endpointsA dictionary with the endpoints (protocol, IP and port) to be used to reach each of the “server” container exposed ports
                  - -

                  List all containers

                  -
                  import dockercloud
                  -
                  -containers = dockercloud.Container.list()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -containerList, err := dockercloud.ListContainers()
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(containerList)
                  -
                  -
                  GET /api/app/v1/container/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud container ps
                  -
                  - -

                  Lists all current and recently terminated containers. Returns a list of Container objects.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/app/v1/[optional_namespace/]container/

                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  uuidFilter by UUID
                  stateFilter by state. Possible values: Starting, Running, Stopping, Stopped, Terminating, Terminated
                  nameFilter by container name
                  serviceFilter by resource URI of the target service.
                  nodeFilter by resource URI of the target node.
                  - -

                  Get an existing container

                  -
                  import dockercloud
                  -
                  -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -container, err := dockerckoud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(container)
                  -
                  -
                  GET /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud container inspect 7eaf7fff
                  -
                  - -

                  Get all the details of an specific container

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/app/v1/[optional_namespace/]container/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the container to retrieve
                  - -

                  Get the logs of a container

                  - -
                  -

                  Example log line

                  -
                  -
                  {
                  -    "type": "log",
                  -    "log": "Log line from the container",
                  -    "streamType": "stdout",
                  -    "timestamp": 1433779324
                  -}
                  -
                  -
                  import dockercloud
                  -
                  -def log_handler(message):
                  -    print message
                  -
                  -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -container.logs(tail=300, follow=True, log_handler=log_handler)
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -container, err := dockercloud.GetContainer("447ecddc-2890-4ea2-849b-99392e0dd7a6")
                  -
                  -if err != nil {
                  -    log.Fatal(err)
                  -}
                  -c := make(chan dockercloud.Logs)
                  -
                  -go container.Logs(c)
                  -    for {
                  -        s := <-c
                  -        log.Println(s)
                  -    }
                  -
                  -
                  GET /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/logs/ HTTP/1.1
                  -Host: ws.cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Connection: Upgrade
                  -Upgrade: websocket
                  -
                  -
                  docker-cloud container logs 7eaf7fff
                  -
                  - -

                  Get the logs of the specified container.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s STREAM API

                  - -

                  HTTP Request

                  - -

                  GET /api/app/v1/[optional_namespace/]container/(uuid)/logs/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the container to retrieve logs
                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  tailNumber of lines to show from the end of the logs (default: 300)
                  followWhether to stream logs or close the connection immediately (default: true)
                  serviceFilter by service (resource URI)
                  - -

                  Start a container

                  -
                  import dockercloud
                  -
                  -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -container.start()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -    log.Println(err)
                  -}
                  -
                  -if err = container.Start(); err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -
                  POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud container start 7eaf7fff
                  -
                  - -

                  Starts a stopped container.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]container/(uuid)/start/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the container to start
                  - -

                  Stop a container

                  -
                  import dockercloud
                  -
                  -container = dockerlcoud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -container.stop()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -    log.Println(err)
                  -}
                  -
                  -if err = container.Stop(); err != nil {
                  -       log.Println(err)
                  -   }
                  -
                  -
                  POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/stop/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud container stop 7eaf7fff
                  -
                  - -

                  Stops a running container.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]container/(uuid)/stop/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the container to stop
                  - -

                  Redeploy a container

                  -
                  import dockercloud
                  -
                  -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -container.redeploy()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -    log.Println(err)
                  -}
                  -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: true) to reuse the existing volumes
                  -//Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}) to not reuse the existing volumes
                  -if err = container.Redeploy(dockercloud.ReuseVolumesOption{Reuse: false}); err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -
                  POST /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/start/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud container redeploy 7eaf7fff
                  -
                  - -

                  Redeploys a container.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]container/(uuid)/redeploy/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the container to redeploy
                  - -

                  Query Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  reuse_volumesWheather to reuse container volumes for this redeploy operation or not (default: true).
                  - -

                  Terminate a container

                  -
                  import dockercloud
                  -
                  -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -container.delete()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -    log.Println(err)
                  -}
                  -
                  -if err = container.Terminate(); err != nil {
                  -       log.Println(err)
                  -   }
                  -
                  -
                  DELETE /api/app/v1/container/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud container terminate 7eaf7fff
                  -
                  - -

                  Terminates the specified container. This is not reversible. All data stored in the container will be permanently deleted.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  DELETE /api/app/v1/[optional_namespace/]container/(uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the container to terminate
                  - -

                  Execute command inside a container

                  -
                  import dockercloud
                  -
                  -def msg_handler(message):
                  -    print message
                  -
                  -container = dockercloud.Container.fetch("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -container.execute("ls", handler=msg_handler)
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -container, err := dockercloud.GetContainer("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -c := make(chan dockercloud.Exec)
                  -
                  -container.Exec("ls", c)
                  -
                  -
                  -
                  GET /api/app/v1/container/(uuid)/exec/ HTTP/1.1
                  -Host: ws.cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Connection: Upgrade
                  -Upgrade: websocket
                  -
                  -
                  docker-cloud exec 7eaf7fff ls
                  -
                  - -

                  Executes a command inside the specified running container, creating a bi-directional stream for the process’ standard input and output. This endpoint can be connected to using a bi-directional Secure Web Socket wss://ws.cloud.docker.com/api/app/v1/container/(uuid)/exec/

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s STREAM API

                  - -

                  HTTP Request

                  - -

                  GET /api/app/v1/[optional_namespace/]container/(uuid)/exec/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the container where the command will be executed
                  - -

                  Query Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  commandCommand to be executed (default: sh)
                  - -

                  Triggers

                  - -

                  Service triggers

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -  "url": "/api/app/v1/user_namespace/service/82d4a246-52d8-468d-903d-9da9ef05ff28/trigger/0224815a-c156-44e4-92d7-997c69354438/call/",
                  -  "operation": "REDEPLOY",
                  -  "name": "docker_trigger",
                  -  "resource_uri": "/api/app/v1/user_namespace/service/82d4a246-52d8-468d-903d-9da9ef05ff28/trigger/0224815a-c156-44e4-92d7-997c69354438/"
                  -}
                  -
                  - -

                  Triggers are URLs that will start a redeploy of the service whenever a POST request is sent to them. They require no authorization headers, so they should be treated as access tokens. Triggers can be revoked if they are leaked or no longer used for security purposes. See Triggers for more information.

                  - -

                  This is a namespaced endpoint.

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  urlAddress to be used to call the trigger with a POST request
                  nameA user provided name for the trigger
                  operationThe operation that the trigger call performs (see table Operations below)
                  resource_uriA unique API endpoint that represents the trigger
                  - -

                  Operations

                  - - - - - - - - - - - - - - - -
                  OperationDescription
                  REDEPLOYPerforms a redeploy service operation.
                  SCALEUPPerforms a scale up service operation.
                  - -

                  List all triggers

                  -
                  import dockercloud
                  -
                  -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
                  -trigger = dockercloud.Trigger.fetch(service)
                  -trigger.list()
                  -
                  -
                  GET /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
                  -
                  -    if err != nil {
                  -        log.Println(err)
                  -    }
                  -
                  -trigger, err := service.ListTriggers()
                  -
                  -  if err != nil {
                  -    log.Println(err)
                  -  }
                  -
                  -    log.Println(trigger)
                  -
                  -
                  docker-cloud trigger list 61a29874-9134-48f9-b460-f37d4bec4826
                  -
                  - -

                  Lists all current triggers the service has associated to. Returns a list of Service Trigger objects.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/app/v1/[optional_namespace/]service/(uuid)/trigger/

                  - -

                  Path Parameters

                  - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the service the triggers are associated to
                  - -

                  Create a new trigger

                  -
                  import dockercloud
                  -
                  -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
                  -trigger = dockercloud.Trigger.fetch(service)
                  -trigger.add(name="mytrigger_name", operation="REDEPLOY")
                  -trigger.save()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -trigger, err := service.CreateTrigger(dockercloud.TriggerCreateRequest{Name: "test-trigger", Operation: "REDEPLOY"})
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(trigger)
                  -
                  -
                  POST /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -Content-Type: application/json
                  -
                  -{"name": "mytrigger_name", "operation": "REDEPLOY"}
                  -
                  -
                  docker-cloud trigger create --name mytrigger_name --operation REDEPLOY 61a29874-9134-48f9-b460-f37d4bec4826
                  -
                  - -

                  Creates a new service trigger.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]service/(uuid)/trigger/

                  - -

                  JSON Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  name(optional) A user provided name for the trigger
                  operation(optional) The operation to be performed by the trigger (default: “REDEPLOY”)
                  - -

                  Get an existing trigger

                  -
                  import dockercloud
                  -
                  -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
                  -trigger = dockercloud.Trigger.fetch(service)
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -trigger, err := service.GetTrigger("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -log.Println(trigger)
                  -
                  -
                  GET /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  - -

                  Get all the details of an specific trigger

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  GET /api/app/v1/[optional_namespace/]service/(uuid)/trigger/(trigger_uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the service the triggers are associated to
                  trigger_uuidThe UUID of the trigger to retrieve
                  - -

                  Delete a trigger

                  -
                  import dockercloud
                  -
                  -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
                  -trigger = dockercloud.Trigger.fetch(service)
                  -trigger.delete("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -service.DeleteTrigger("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -
                  DELETE /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Accept: application/json
                  -
                  -
                  docker-cloud trigger rm 61a29874-9134-48f9-b460-f37d4bec4826 7eaf7fff-882c-4f3d-9a8f-a22317ac00ce
                  -
                  - -

                  Deletes specific trigger. It will be no longer available to be called.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  DELETE /api/app/v1/[optional_namespace/]service/(uuid)/trigger/(trigger_uuid)/

                  - -

                  Path Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the associated service
                  trigger_uuidThe UUID of the trigger to delete
                  - -

                  Call a trigger

                  -
                  import dockercloud
                  -
                  -service = dockercloud.Service.fetch('61a29874-9134-48f9-b460-f37d4bec4826')
                  -trigger = dockercloud.Trigger.fetch(service)
                  -trigger.call("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -service, err := dockercloud.GetService("61a29874-9134-48f9-b460-f37d4bec4826")
                  -
                  -if err != nil {
                  -  log.Println(err)
                  -}
                  -
                  -service.CallTrigger("7eaf7fff-882c-4f3d-9a8f-a22317ac00ce")
                  -
                  -
                  POST /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/call/ HTTP/1.1
                  -Host: cloud.docker.com
                  -Accept: application/json
                  -
                  - -

                  Executes the trigger. For SCALEUP triggers, the number of containers to scale up can be passed at the end of the trigger call url, for example /api/app/v1/service/61a29874-9134-48f9-b460-f37d4bec4826/trigger/7eaf7fff-882c-4f3d-9a8f-a22317ac00ce/call/3/.

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s REST API

                  - -

                  HTTP Request

                  - -

                  POST /api/app/v1/[optional_namespace/]service/(uuid)/trigger/(trigger_uuid)/call/

                  - -

                  Path Parameters

                  - - - - - - - - - - - - - - - -
                  ParameterDescription
                  uuidThe UUID of the associated service
                  trigger_uuidThe UUID of the trigger to call
                  - -

                  Docker Cloud Events

                  - -

                  Docker Cloud Event

                  - -
                  -

                  Example

                  -
                  -
                  {
                  -    "type": "action",
                  -    "action": "update",
                  -    "parents": [
                  -        "/api/app/v1/user_namespace/container/0b0e3538-88df-4f07-9aed-3a3cc4175076/"
                  -    ],
                  -    "resource_uri": "/api/app/v1/user_namespace/action/49f0efe8-a704-4a10-b02f-f96344fabadd/",
                  -    "state": "Success",
                  -    "uuid": "093ba3bb-08dd-48f0-8f12-4d3b85ef85b3",
                  -    "datetime": "2016-02-01T16:47:28Z"
                  -}
                  -
                  - -

                  Docker Cloud events are generated every time any of the following objects is created or changes state:

                  - -
                    -
                  • Stack
                  • -
                  • Service
                  • -
                  • Container
                  • -
                  • Node Cluster
                  • -
                  • Node
                  • -
                  • Action
                  • -
                  - -

                  This is a namespaced endpoint.

                  - -

                  Attributes

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  AttributeDescription
                  typeType of object that was created or updated. For possible values, check the events types table below.
                  actionType of action that was executed on the object. Posible values: create, update or delete
                  parentsList of resource URIs (REST API) of the parents of the object, according to the “Parent-child hierarchy” table below
                  resource_uriResource URI (REST API) of the object that was created or updated. You can do a GET operation on this URL to fetch its details
                  stateThe current state of the object
                  uuidUnique identifier for the event
                  datetimeDate and time of the event in ISO 8601 format
                  - -

                  Event types

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  TypeDescription
                  stackWhenever a Stack is created or updated
                  serviceWhenever a Service is created or updated
                  containerWhenever a Container is created or updated
                  nodeclusterWhenever a Node Cluster is created or updated
                  nodeWhenever a Node is created or updated
                  actionWhenever a Action is created or updated
                  errorSent when an error occurs on the websocket connection or as part of the authentication process
                  - -

                  Parent-child hierarchy

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  Object typeParent types
                  Stack(None)
                  ServiceStack
                  ContainerService, Stack, Node, Node Cluster
                  Node Cluster(None)
                  NodeNode Cluster
                  Action(object to which the action applies to)
                  - -

                  Listen to new Docker Cloud Events

                  -
                  import dockercloud
                  -
                  -def process_event(event):
                  -    print event
                  -
                  -events = dockercloud.Events()
                  -events.on_message(process_event)
                  -events.run_forever()
                  -
                  -
                  import "github.com/docker/go-dockercloud/dockercloud"
                  -
                  -// Listens for container events only
                  -myFilter := dockercloud.NewStreamFilter(&dockercloud.EventFilter{Type: "container"})
                  -
                  -stream := dockercloud.NewStream(myFilter)
                  -
                  -if err := stream.Connect(); err == nil {
                  -    go stream.RunForever()
                  -} else {
                  -    log.Print("Connect err: " + err.Error())
                  -}
                  -
                  -for {
                  -    select {
                  -    case event := <-stream.MessageChan:
                  -        log.Println(event)
                  -    case err := <-stream.ErrorChan:
                  -        log.Println(err)
                  -    }
                  -}
                  -
                  -
                  GET /api/audit/v1/events/ HTTP/1.1
                  -Host: ws.cloud.docker.com
                  -Authorization: Basic dXNlcm5hbWU6YXBpa2V5
                  -Connection: Upgrade
                  -Upgrade: websocket
                  -
                  -
                  docker-cloud event
                  -
                  - -

                  Listens for new Docker Cloud Events

                  - -

                  Endpoint Type

                  - -

                  Available in Docker Cloud’s STREAM API

                  - -

                  HTTP Request

                  - -

                  GET /api/audit/v1/[optional_namespace/]events/

                  - -

                  Query Parameters

                  - - - - - - - - - - - - - - - - - - - -
                  ParameterDescription
                  typeFilter by type
                  objectFilter by object resource URI
                  parentFilter by object parents
                  - -

                  Errors

                  - -
                  -

                  API response structure

                  -
                  -
                  {
                  -    "error": "Descriptive error message"
                  -}
                  -
                  - -

                  The Docker Cloud API uses the following error codes:

                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  Error CodeMeaning
                  400Bad Request – There’s a problem in the content of your request. Retrying the same request will fail.
                  401Unauthorized – Your API key is wrong or your account has been deactivated.
                  402Payment Required – You need to provide billing information to perform this request.
                  403Forbidden – Quota limit exceeded. Please contact support to request a quota increase.
                  404Not Found – The requested object cannot be found.
                  405Method Not Allowed – The endpoint requested does not implement the method sent.
                  409Conflict – The object cannot be created or updated because another object exists with the same unique fields
                  415Unsupported Media Type – Make sure you are using Accept and Content-Type headers as application/json and that the data your are POST-ing or PATCH-ing is in valid JSON format.
                  429Too Many Requests – You are being throttled because of too many requests in a short period of time.
                  500Internal Server Error – There was a server error while processing your request. Try again later, or contact support.
                  503Service Unavailable – We’re temporarily offline for maintenance. Please try again later.
                  504Gateway Timeout – Our API servers are at full capacity. Please try again later.
                  - -
                  -
                  -
                  - http - go - python - CLI -
                  -
                  -
                  - - diff --git a/compose/django.md b/compose/django.md index 8c1ffaa34d..794abb1079 100644 --- a/compose/django.md +++ b/compose/django.md @@ -152,7 +152,7 @@ In this section, you set up the database connection for Django. } These settings are determined by the - [postgres](https://store.docker.com/images/postgres) Docker image + [postgres](https://hub.docker.com/images/postgres) Docker image specified in `docker-compose.yml`. 3. Save and close the file. diff --git a/config/containers/logging/plugins.md b/config/containers/logging/plugins.md index ebe799a724..b2bbf71d30 100644 --- a/config/containers/logging/plugins.md +++ b/config/containers/logging/plugins.md @@ -10,7 +10,7 @@ Docker logging plugins allow you to extend and customize Docker's logging capabilities beyond those of the [built-in logging drivers](configure.md). A logging service provider can [implement their own plugins](/engine/extend/plugins_logging.md) and make them -available on Docker Hub, Docker Store, or a private registry. This topic shows +available on Docker Hub, Docker Hub, or a private registry. This topic shows how a user of that logging service can configure Docker to use the plugin. ## Install the logging driver plugin @@ -39,5 +39,3 @@ detailed in the If the logging driver supports additional options, you can specify them using one or more `--log-opt` flags with the option name as the key and the option value as the value. - - diff --git a/datacenter/dtr/2.0/install/license.md b/datacenter/dtr/2.0/install/license.md index f9cd60d2c2..a026b8e650 100644 --- a/datacenter/dtr/2.0/install/license.md +++ b/datacenter/dtr/2.0/install/license.md @@ -20,7 +20,7 @@ DTR installation: ## Download your license -Go to [Docker Store](https://store.docker.com/bundles/docker-datacenter) and +Go to [Docker Hub](https://hub.docker.com/bundles/docker-datacenter) and download your license. ![](../images/license-1.png) @@ -40,4 +40,4 @@ Click the **Apply new license** button, and upload your new license file. ## Where to go next * [Install DTR](index.md) -* [Install DTR offline](install-dtr-offline.md) \ No newline at end of file +* [Install DTR offline](install-dtr-offline.md) diff --git a/datacenter/dtr/2.1/guides/install/license.md b/datacenter/dtr/2.1/guides/install/license.md index 9c75d2d8f4..4791be26ea 100644 --- a/datacenter/dtr/2.1/guides/install/license.md +++ b/datacenter/dtr/2.1/guides/install/license.md @@ -17,7 +17,7 @@ DTR installation: ## Download your license -Go to [Docker Store](https://store.docker.com/bundles/docker-datacenter) and +Go to [Docker Hub](https://hub.docker.com/bundles/docker-datacenter) and download your license. ![](../images/license-1.png) diff --git a/datacenter/dtr/2.2/guides/admin/configure/license-your-installation.md b/datacenter/dtr/2.2/guides/admin/configure/license-your-installation.md index 19063a61a8..8ed1f5f770 100644 --- a/datacenter/dtr/2.2/guides/admin/configure/license-your-installation.md +++ b/datacenter/dtr/2.2/guides/admin/configure/license-your-installation.md @@ -17,7 +17,7 @@ DTR installation: ## Download your license -Go to [Docker Store](https://store.docker.com/bundles/docker-datacenter) and +Go to [Docker Hub](https://hub.docker.com/my-content) and download your license. ![](../../images/license-1.png) diff --git a/datacenter/dtr/2.2/guides/admin/configure/set-up-vulnerability-scans.md b/datacenter/dtr/2.2/guides/admin/configure/set-up-vulnerability-scans.md index b7d09bd93d..664336e8ce 100644 --- a/datacenter/dtr/2.2/guides/admin/configure/set-up-vulnerability-scans.md +++ b/datacenter/dtr/2.2/guides/admin/configure/set-up-vulnerability-scans.md @@ -14,7 +14,7 @@ access. Before you begin, make sure that you or your organization has purchased a DTR license that includes Docker Security Scanning, and that your Docker ID can -access and download this license from the Docker Store. +access and download this license from the Docker Hub. If you are using a license associated with an individual account, no additional action is needed. If you are using a license associated with an organization @@ -34,8 +34,8 @@ this step and proceed to [enable DTR Security Scanning](#enable-dtr-security-sca If your current DTR license doesn't include scanning, you must first download the new license. -1. Log in to the Docker Store using a Docker ID with access to the license you need. -2. In the top right corner, click your user account icon, and select **Subscriptions**. +1. Log in to the Docker Hub using a Docker ID with access to the license you need. +2. In the top right corner, click your user account icon, and select **Purchased Content**. 3. If necessary, select an organization account from the **Accounts** menu at the upper right. 4. Locate Docker Datacenter in the **Subscriptions** list. 5. Click **Subscription Details** and select **Setup instructions**. @@ -141,12 +141,11 @@ Your choice is saved automatically. To update the CVE database for your DTR instance when it cannot contact the update server, you download and install a `.tar` file that contains the database updates. To download the file: -1. Log in to the [Docker Store](https://store.docker.com/). +1. Log in to the [Docker Hub](https://hub.docker.com/). - If you are a member of an Organization managing licenses using Docker Store, + If you are a member of an Organization managing licenses using Docker Hub, make sure your account is a member of the `Owners` team. Only Owners can - view and manage licenses and other entitlements for Organizations from the - Docker Store. + view and manage licenses and other entitlements for Organizations from Docker Hub. 2. In the top right corner, click your user account icon, and select **My Content**. 3. If necessary, select an organization account from the **Accounts** menu at the upper right. @@ -158,7 +157,7 @@ To update the CVE database for your DTR instance when it cannot contact the upda 6. Click **Download CVE Vulnerability Database** link to download the database file. ![](../../images/cve-file-2.png){: .with-border} - + If you run into problems, contact us at nautilus-feedback@docker.com for the file. To manually update the DTR CVE database from a `.tar` file: diff --git a/datacenter/dtr/2.2/guides/user/manage-images/sign-images/index.md b/datacenter/dtr/2.2/guides/user/manage-images/sign-images/index.md index 547494cb05..5a89b98470 100644 --- a/datacenter/dtr/2.2/guides/user/manage-images/sign-images/index.md +++ b/datacenter/dtr/2.2/guides/user/manage-images/sign-images/index.md @@ -39,7 +39,7 @@ To sign images in a way that UCP trusts them you need to: * Initialize trust metadata for the repository * Delegate signing to the keys in your UCP client bundle -In this example we're going to pull an NGINX image from Docker Store, +In this example we're going to pull an NGINX image from Docker Hub, re-tag it as `dtr.example.org/dev/nginx:1`, push the image to DTR and sign it in a way that is trusted by UCP. If you manage multiple repositories, you need to do the same procedure for every one of them. @@ -56,11 +56,11 @@ the easiest way to do it is by pushing an image to that repository. Navigate to the **DTR web UI**, and create a repository for your image. In this example we've created the `dev/nginx` repository. -From the Docker CLI client, pull an NGINX image from Docker Store, +From the Docker CLI client, pull an NGINX image from Docker Hub, re-tag it, sign and push it to DTR. ```bash -# Pull NGINX from Docker Store +# Pull NGINX from Docker Hub docker pull nginx:latest # Re-tag NGINX diff --git a/datacenter/dtr/2.3/guides/admin/configure/license-your-installation.md b/datacenter/dtr/2.3/guides/admin/configure/license-your-installation.md index 3c14e283a5..a976e7e827 100644 --- a/datacenter/dtr/2.3/guides/admin/configure/license-your-installation.md +++ b/datacenter/dtr/2.3/guides/admin/configure/license-your-installation.md @@ -17,7 +17,7 @@ DTR installation: ## Download your license -Go to [Docker Store](https://store.docker.com/editions/enterprise/docker-ee-trial) +Go to [Docker Hub](https://hub.docker.com/editions/enterprise/docker-ee-trial) and download your license. ![](../../images/license-1.png){: .with-border} diff --git a/datacenter/dtr/2.3/guides/admin/configure/set-up-vulnerability-scans.md b/datacenter/dtr/2.3/guides/admin/configure/set-up-vulnerability-scans.md index c35e6ed8dc..cdf1e1b3a2 100644 --- a/datacenter/dtr/2.3/guides/admin/configure/set-up-vulnerability-scans.md +++ b/datacenter/dtr/2.3/guides/admin/configure/set-up-vulnerability-scans.md @@ -14,7 +14,7 @@ access. Before you begin, make sure that you or your organization has purchased a DTR license that includes Docker Security Scanning, and that your Docker ID can -access and download this license from the Docker Store. +access and download this license from the Docker Hub. If you are using a license associated with an individual account, no additional action is needed. If you are using a license associated with an organization @@ -34,7 +34,7 @@ this step and proceed to [enable DTR Security Scanning](#enable-dtr-security-sca If your current DTR license doesn't include scanning, you must first download the new license. -1. Log in to the Docker Store using a Docker ID with access to the license you need. +1. Log in to [Docker Hub](https://hub.docker.com) using a Docker ID with access to the license you need. 2. In the top right corner, click your user account icon, and select **My Content**. 3. Locate **Docker Enterprise Edition** in the content list, and click **Setup**. 4. Click **License Key** to download the license. @@ -139,12 +139,12 @@ Your choice is saved automatically. To update the CVE database for your DTR instance when it cannot contact the update server, you download and install a `.tar` file that contains the database updates. To download the file: -1. Log in to the [Docker Store](https://store.docker.com/). +1. Log in to [Docker Hub](https://hub.docker.com/). - If you are a member of an Organization managing licenses using Docker Store, + If you are a member of an Organization managing licenses using Docker Hub, make sure your account is a member of the `Owners` team. Only Owners can - view and manage licenses and other entitlements for Organizations from the - Docker Store. + view and manage licenses and other entitlements for Organizations from + Docker Hub. 2. In the top right corner, click your user account icon, and select **My Content**. 3. If necessary, select an organization account from the **Accounts** menu at the upper right. diff --git a/datacenter/dtr/2.3/guides/user/manage-images/sign-images/index.md b/datacenter/dtr/2.3/guides/user/manage-images/sign-images/index.md index add8e4487c..4ffda257e5 100644 --- a/datacenter/dtr/2.3/guides/user/manage-images/sign-images/index.md +++ b/datacenter/dtr/2.3/guides/user/manage-images/sign-images/index.md @@ -39,7 +39,7 @@ To sign images in a way that UCP trusts them, you need to: * Initialize trust metadata for the repository * Delegate signing to the keys in your UCP client bundle -In this example we're going to pull an NGINX image from Docker Store, +In this example we're going to pull an NGINX image from Docker Hub, re-tag it as `dtr.example.org/dev/nginx:1`, push the image to DTR and sign it in a way that is trusted by UCP. If you manage multiple repositories, you need to do the same procedure for every one of them. @@ -56,11 +56,11 @@ the easiest way to do it is by pushing an image to that repository. Navigate to the **DTR web UI**, and create a repository for your image. In this example we've created the `dev/nginx` repository. -From the Docker CLI client, pull an NGINX image from Docker Store, +From the Docker CLI client, pull an NGINX image from Docker Hub, re-tag it, sign and push it to DTR. ```bash -# Pull NGINX from Docker Store +# Pull NGINX from Docker Hub docker pull nginx:latest # Re-tag NGINX diff --git a/datacenter/dtr/2.4/guides/admin/configure/license-your-installation.md b/datacenter/dtr/2.4/guides/admin/configure/license-your-installation.md index 3c14e283a5..a976e7e827 100644 --- a/datacenter/dtr/2.4/guides/admin/configure/license-your-installation.md +++ b/datacenter/dtr/2.4/guides/admin/configure/license-your-installation.md @@ -17,7 +17,7 @@ DTR installation: ## Download your license -Go to [Docker Store](https://store.docker.com/editions/enterprise/docker-ee-trial) +Go to [Docker Hub](https://hub.docker.com/editions/enterprise/docker-ee-trial) and download your license. ![](../../images/license-1.png){: .with-border} diff --git a/datacenter/dtr/2.4/guides/admin/configure/set-up-vulnerability-scans.md b/datacenter/dtr/2.4/guides/admin/configure/set-up-vulnerability-scans.md index 7f8c754b8f..5d7570f3c2 100644 --- a/datacenter/dtr/2.4/guides/admin/configure/set-up-vulnerability-scans.md +++ b/datacenter/dtr/2.4/guides/admin/configure/set-up-vulnerability-scans.md @@ -16,7 +16,7 @@ access. Before you begin, make sure that you or your organization has purchased a DTR license that includes Docker Security Scanning, and that your Docker ID can -access and download this license from the Docker Store. +access and download this license from Docker Hub. If you are using a license associated with an individual account, no additional action is needed. If you are using a license associated with an organization @@ -36,7 +36,7 @@ this step and proceed to [enable DTR Security Scanning](#enable-dtr-security-sca If your current DTR license doesn't include scanning, you must first download the new license. -1. Log in to the Docker Store using a Docker ID with access to the license you need. +1. Log in to Docker Hub using a Docker ID with access to the license you need. 2. In the top right corner, click your user account icon, and select **My Content**. 3. Locate **Docker Enterprise Edition** in the content list, and click **Setup**. 4. Click **License Key** to download the license. @@ -141,12 +141,12 @@ Your choice is saved automatically. To update the CVE database for your DTR instance when it cannot contact the update server, you download and install a `.tar` file that contains the database updates. To download the file: -1. Log in to the [Docker Store](https://store.docker.com/). +1. Log in to the [Docker Hub](https://hub.docker.com/). - If you are a member of an Organization managing licenses using Docker Store, + If you are a member of an Organization managing licenses using Docker Hub, make sure your account is a member of the `Owners` team. Only Owners can view and manage licenses and other entitlements for Organizations from the - Docker Store. + Docker Hub. 2. In the top right corner, click your user account icon, and select **My Content**. 3. If necessary, select an organization account from the **Accounts** menu at the upper right. diff --git a/datacenter/dtr/2.4/guides/user/manage-images/sign-images/index.md b/datacenter/dtr/2.4/guides/user/manage-images/sign-images/index.md index cef1a76464..2b72a73769 100644 --- a/datacenter/dtr/2.4/guides/user/manage-images/sign-images/index.md +++ b/datacenter/dtr/2.4/guides/user/manage-images/sign-images/index.md @@ -39,7 +39,7 @@ To sign images in a way that UCP trusts them, you need to: * Initialize trust metadata for the repository * Delegate signing to the keys in your UCP client bundle -In this example we're going to pull an NGINX image from Docker Store, +In this example we're going to pull an NGINX image from Docker Hub, re-tag it as `dtr.example.org/dev/nginx:1`, push the image to DTR and sign it in a way that is trusted by UCP. If you manage multiple repositories, you need to do the same procedure for every one of them. @@ -56,11 +56,11 @@ the easiest way to do it is by pushing an image to that repository. Navigate to the **DTR web UI**, and create a repository for your image. In this example we've created the `dev/nginx` repository. -From the Docker CLI client, pull an NGINX image from Docker Store, +From the Docker CLI client, pull an NGINX image from Docker Hub, re-tag it, sign and push it to DTR. ```bash -# Pull NGINX from Docker Store +# Pull NGINX from Docker Hub docker pull nginx:latest # Re-tag NGINX diff --git a/datacenter/ucp/1.1/install-sandbox.md b/datacenter/ucp/1.1/install-sandbox.md index b61c934288..aac9d066d5 100644 --- a/datacenter/ucp/1.1/install-sandbox.md +++ b/datacenter/ucp/1.1/install-sandbox.md @@ -202,7 +202,7 @@ host for the controller works fine. supplied to replace it with the actual IP address. The first time you run the `ucp` tool, the `docker run` command pulls the - UCP bootstrapper image from Docker Cloud. The tool downloads the packages it + UCP bootstrapper image from Docker Hub. The tool downloads the packages it needs, and verifies that your system will support a UCP installation. 4. Enter a password for UCP when prompted, and then confirm it. diff --git a/datacenter/ucp/1.1/installation/license.md b/datacenter/ucp/1.1/installation/license.md index acbddbae62..e2824437ea 100644 --- a/datacenter/ucp/1.1/installation/license.md +++ b/datacenter/ucp/1.1/installation/license.md @@ -11,7 +11,7 @@ installation. Here's how to do it. ## Download your license -Go to [Docker Store](https://store.docker.com/bundles/docker-datacenter) and +Go to [Docker Hub](https://hub.docker.com/bundles/docker-datacenter) and download your UCP license or get a free trial license. ![](../images/license-ucp-1.png) @@ -32,4 +32,4 @@ Click **Upload License** for the changes to take effect. ## Where to go next * [Install UCP](install-production.md) -* [Install UCP offline](install-offline.md) \ No newline at end of file +* [Install UCP offline](install-offline.md) diff --git a/datacenter/ucp/2.0/guides/configuration/integrate-with-dtr.md b/datacenter/ucp/2.0/guides/configuration/integrate-with-dtr.md index 43794ed84e..8a6f2623fb 100644 --- a/datacenter/ucp/2.0/guides/configuration/integrate-with-dtr.md +++ b/datacenter/ucp/2.0/guides/configuration/integrate-with-dtr.md @@ -91,11 +91,11 @@ trying to pull and push images from your local Docker installation to DTR. ![](../images/dtr-integration-1.png) -2. Pull the `hello-world` image from Docker Store, re-tag it, and push it to the +2. Pull the `hello-world` image from Docker Hub, re-tag it, and push it to the DTR repository you created. ```none - # Pull hello-world from Docker Store + # Pull hello-world from Docker Hub docker pull hello-world:latest # Re-tag it diff --git a/datacenter/ucp/2.0/guides/installation/license.md b/datacenter/ucp/2.0/guides/installation/license.md index f726b30b12..8ccc9c335e 100644 --- a/datacenter/ucp/2.0/guides/installation/license.md +++ b/datacenter/ucp/2.0/guides/installation/license.md @@ -9,7 +9,7 @@ installation. Here's how to do it. ## Download your license -Go to [Docker Store](https://store.docker.com/bundles/docker-datacenter) and +Go to [Docker Hub](https://hub.docker.com/bundles/docker-datacenter) and download your UCP license or get a free trial license. ![](../images/license-ucp-1.png){: .with-border} diff --git a/datacenter/ucp/2.1/guides/admin/configure/integrate-with-dtr.md b/datacenter/ucp/2.1/guides/admin/configure/integrate-with-dtr.md index 596b84b37b..799a609b79 100644 --- a/datacenter/ucp/2.1/guides/admin/configure/integrate-with-dtr.md +++ b/datacenter/ucp/2.1/guides/admin/configure/integrate-with-dtr.md @@ -91,11 +91,11 @@ trying to pull and push images from your local Docker installation to DTR. ![](/datacenter/ucp/2.1/guides/images/dtr-integration-1.png) -2. Pull the `hello-world` image from Docker Store, re-tag it, and push it to the +2. Pull the `hello-world` image from Docker Hub, re-tag it, and push it to the DTR repository you created. ```none - # Pull hello-world from Docker Store + # Pull hello-world from Docker Hub docker pull hello-world:latest # Re-tag it diff --git a/datacenter/ucp/2.1/guides/admin/configure/license-your-installation.md b/datacenter/ucp/2.1/guides/admin/configure/license-your-installation.md index c27c379998..0d72628c68 100644 --- a/datacenter/ucp/2.1/guides/admin/configure/license-your-installation.md +++ b/datacenter/ucp/2.1/guides/admin/configure/license-your-installation.md @@ -9,7 +9,7 @@ installation. Here's how to do it. ## Download your license -Go to [Docker Store](https://store.docker.com/bundles/docker-datacenter) and +Go to [Docker Hub](https://hub.docker.com/bundles/docker-datacenter) and download your UCP license or get a free trial license. ![](../../images/license-ucp-1.png){: .with-border} diff --git a/datacenter/ucp/2.1/guides/admin/install/index.md b/datacenter/ucp/2.1/guides/admin/install/index.md index 85a5ae18e2..59a1e36bfb 100644 --- a/datacenter/ucp/2.1/guides/admin/install/index.md +++ b/datacenter/ucp/2.1/guides/admin/install/index.md @@ -85,7 +85,7 @@ license. ![](../../../../../images/try-ddc-1.png){: .with-border} If you're registered in the beta program and don't have a license yet, you -can get it from your [Docker Store subscriptions](https://store.docker.com/?overlay=subscriptions). +can get it from [Docker Hub](https://hub.docker.com/my-content). diff --git a/datacenter/ucp/2.1/guides/admin/upgrade-offline.md b/datacenter/ucp/2.1/guides/admin/upgrade-offline.md index cf153ee918..61011a71d7 100644 --- a/datacenter/ucp/2.1/guides/admin/upgrade-offline.md +++ b/datacenter/ucp/2.1/guides/admin/upgrade-offline.md @@ -9,7 +9,7 @@ Upgrading Universal Control Plane is the same, whether your hosts have access to the internet or not. The only difference when upgrading on an offline host, -is that instead of pulling the UCP images from Docker Store, you use a +is that instead of pulling the UCP images from Docker Hub, you use a computer that is connected to the internet to download a single package with all the images. Then you copy that package to the host where you’ll upgrade UCP. diff --git a/datacenter/ucp/2.2/guides/access-control/deploy-view-only-service.md b/datacenter/ucp/2.2/guides/access-control/deploy-view-only-service.md index 6336ed7f30..c6318733a1 100644 --- a/datacenter/ucp/2.2/guides/access-control/deploy-view-only-service.md +++ b/datacenter/ucp/2.2/guides/access-control/deploy-view-only-service.md @@ -9,7 +9,7 @@ collection that contains one service. 1. Create an organization and a team. 2. Create a collection for the view-only service. -3. Create a grant to manage user access to the collection. +3. Create a grant to manage user access to the collection. ![](../images/view-only-access-diagram.svg) @@ -22,9 +22,9 @@ who isn't an administrator to the team. 1. Log in to UCP as an administrator. 2. Navigate to the **Organizations & Teams** page and click **Create Organization**. Name the new organization "engineering" and - click **Create**. + click **Create**. 3. Click **Create Team**, name the new team "Dev", and click **Create**. -3. Add a non-admin user to the Dev team. +3. Add a non-admin user to the Dev team. ## Create a collection for the service @@ -36,7 +36,7 @@ who isn't an administrator to the team. ![](../images/deploy-view-only-service-1.png) -The `/Shared/View-only services` collection is ready to use for access +The `/Shared/View-only services` collection is ready to use for access control. ## Deploy a service @@ -48,7 +48,7 @@ collection. 1. Navigate to the **Services** page and create a new service, named "WordPress". 2. In the **Image** textbox, enter "wordpress:latest". This identifies the - most recent WordPress image in the Docker Store. + most recent WordPress image in Docker Hub. 3. In the left pane, click **Collection**. The **Swarm** collection appears. 4. Click **View children** to list all of the collections. In **Shared**, Click **View children**, find the **View-only services** collection and @@ -71,7 +71,7 @@ Currently, users who aren't administrators can't access the and click **Select Collection**. 3. Click **Roles**, and in the dropdown, select **View Only**. 4. Click **Subjects**, and under **Select subject type**, click **Organizations**. - In the dropdown, select **engineering**. + In the dropdown, select **engineering**. 5. Click **Create** to grant permissions to the organization. ![](../images/deploy-view-only-service-4.png) @@ -80,21 +80,21 @@ Everything is in place to show role-based access control in action. ## Verify the user's permissions -Users in the `engineering` organization have view-only access to the +Users in the `engineering` organization have view-only access to the `/Shared/View-only services` collection. You can confirm this by logging in as a non-admin user in the organization and trying to delete the service. -1. Log in as the user who you assigned to the Dev team. +1. Log in as the user who you assigned to the Dev team. 2. Navigate to the **Services** page and click **WordPress**. 3. In the details pane, confirm that the service's collection is **/Shared/View-only services**. ![](../images/deploy-view-only-service-2.png) - + 4. Click the checkbox next to the **WordPress** service, click **Actions**, and select **Remove**. You get an error message, because the user doesn't have `Service Delete` access to the collection. ## Where to go next -- [Isolate volumes between two different teams](isolate-volumes-between-teams.md) \ No newline at end of file +- [Isolate volumes between two different teams](isolate-volumes-between-teams.md) diff --git a/datacenter/ucp/2.2/guides/admin/configure/integrate-with-dtr.md b/datacenter/ucp/2.2/guides/admin/configure/integrate-with-dtr.md index 99ce3844de..36a5ac5df1 100644 --- a/datacenter/ucp/2.2/guides/admin/configure/integrate-with-dtr.md +++ b/datacenter/ucp/2.2/guides/admin/configure/integrate-with-dtr.md @@ -78,7 +78,7 @@ system: # Restart the Docker daemon $ sudo /bin/systemctl restart docker.service ``` - + * For SUSE SLES 12: ```bash @@ -105,11 +105,11 @@ images from your local Docker installation to DTR. ![](/datacenter/ucp/2.2/guides/images/dtr-integration-1.png) -2. Pull the `hello-world` image from Docker Store, re-tag it, and push it to the +2. Pull the `hello-world` image from Docker Hub, re-tag it, and push it to the DTR repository you created. ```none - # Pull hello-world from Docker Store + # Pull hello-world from Docker Hub docker image pull hello-world:latest # Re-tag it diff --git a/datacenter/ucp/2.2/guides/admin/configure/license-your-installation.md b/datacenter/ucp/2.2/guides/admin/configure/license-your-installation.md index 8f0956a682..c62b3ff167 100644 --- a/datacenter/ucp/2.2/guides/admin/configure/license-your-installation.md +++ b/datacenter/ucp/2.2/guides/admin/configure/license-your-installation.md @@ -9,7 +9,7 @@ installation. Here's how to do it. ## Download your license -Go to [Docker Store](https://www.docker.com/enterprise-edition) and +Go to [Docker Hub](https://www.docker.com/enterprise-edition) and download your UCP license, or get a free trial license. ![](../../images/license-ucp-1.png){: .with-border} @@ -17,7 +17,7 @@ download your UCP license, or get a free trial license. ## License your installation Once you've downloaded the license file, you can apply it to your UCP -installation. +installation. In the UCP web UI, log in with administrator credentials and navigate to the **Admin Settings** page. diff --git a/datacenter/ucp/2.2/guides/admin/install/index.md b/datacenter/ucp/2.2/guides/admin/install/index.md index 6800f815ca..ed69b96aa4 100644 --- a/datacenter/ucp/2.2/guides/admin/install/index.md +++ b/datacenter/ucp/2.2/guides/admin/install/index.md @@ -78,9 +78,9 @@ To install UCP: Now that UCP is installed, you need to license it. -1. Go to the - [Docker Store](https://www.docker.com/enterprise-edition) - and buy a Docker EE subscription, or get a free trial license. +1. Go to + [Docker Hub](https://www.docker.com/editions/enterprise/docker-ee-trial/trial) + to get a free trial license. 2. In your browser, navigate to the UCP web UI, log in with your administrator credentials and upload your license. Navigate to the diff --git a/develop/dev-best-practices.md b/develop/dev-best-practices.md index dc3a9ae267..c7101b1bcc 100644 --- a/develop/dev-best-practices.md +++ b/develop/dev-best-practices.md @@ -110,9 +110,9 @@ updates. ## Use CI/CD for testing and deployment - When you check a change into source control or create a pull request, use - [Docker Cloud](/docker-cloud/builds/automated-build.md) or + [Docker Hub](/docker-hub/builds/automated-build.md) or another CI/CD pipeline to automatically build and tag a Docker image and test - it. Docker Cloud can also deploy tested apps straight into production. + it. - Take this even further with [Docker EE](/ee/index.md) by requiring your development, testing, and security teams to sign images before they can diff --git a/develop/develop-images/image_management.md b/develop/develop-images/image_management.md index 15e2d97184..7d28b36800 100644 --- a/develop/develop-images/image_management.md +++ b/develop/develop-images/image_management.md @@ -20,9 +20,7 @@ by running your own [private registry](#docker-registry). centralizes information about organizations, user accounts, and images. It includes a web UI, authentication and authorization using organizations, CLI and API access using commands such as `docker login`, `docker pull`, and `docker -push`, comments, stars, search, and more. Docker Hub is also integrated into -[Docker Store](/docker-store/), which is a marketplace that allows you to buy -and sell entitlements to non-free images. +push`, comments, stars, search, and more. ## Docker Registry @@ -52,4 +50,4 @@ Content trust gives you the ability to both verify the integrity and the publisher of all the data received from a registry over any channel. See [Content trust](/engine/security/trust/index.md) for information about -configuring and using this feature on Docker clients. \ No newline at end of file +configuring and using this feature on Docker clients. diff --git a/docker-cloud/apps/api-roles.md b/docker-cloud/apps/api-roles.md deleted file mode 100644 index 1a8abdc133..0000000000 --- a/docker-cloud/apps/api-roles.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -description: API Roles -keywords: API, Services, roles -redirect_from: -- /docker-cloud/feature-reference/api-roles/ -title: Service API roles -notoc: true ---- - -You can configure a service so that it can access the Docker Cloud API. When you -grant API access to a service, its containers receive a token through an -environment variable, which is used to query the Docker Cloud API. - -Docker Cloud has a "full access" role which when granted allows any operation -to be performed on the API. You can enable this option on the **Environment variables** screen of the Service wizard, or [specify it in your service's stackfile](stack-yaml-reference.md#roles). When enabled, Docker Cloud generates an authorization token for the -service's containers which is stored in an environment variable called -`DOCKERCLOUD_AUTH`. - -Use this variable to set the `Authorization` HTTP header when calling -Docker Cloud's API: - -```bash -$ curl -H "Authorization: $DOCKERCLOUD_AUTH" -H "Accept: application/json" https://cloud.docker.com/api/app/v1/service/ -``` - -You can use this feature with Docker Cloud's [automatic environment variables](service-links.md), to let your application inside a container read and perform operations using Docker Cloud's API. - -```bash -$ curl -H "Authorization: $DOCKERCLOUD_AUTH" -H "Accept: application/json" $WEB_DOCKERCLOUD_API_URL -``` - -For example, you can use information retrieved using the API to read the linked -endpoints, and use them to reconfigure a proxy container. - -See the [API documentation](/apidocs/docker-cloud.md) for more information on the different API operations available. diff --git a/docker-cloud/apps/auto-destroy.md b/docker-cloud/apps/auto-destroy.md deleted file mode 100644 index 8e0340d2e9..0000000000 --- a/docker-cloud/apps/auto-destroy.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -description: Autodestroy -keywords: Autodestroy, service, terminate, container -redirect_from: -- /docker-cloud/feature-reference/auto-destroy/ -title: Destroy containers automatically ---- - -When enabled on a service, **Autodestroy** automatically terminates containers -when they stop. **This destroys all data in the container on stop.** This is -useful for one-time actions that store their results in an external system. - -The following Autodestroy options are available: - -- `OFF`: the container remains in the **Stopped** state regardless of exit code, and is not destroyed. -- `ON_SUCCESS`: if the container stops with an exit code of 0 (normal shutdown), Docker Cloud automatically destroys it. If it stops with any other exit code, Docker Cloud leaves it in the **Stopped** state. -- `ALWAYS`: if the container stops, Docker Cloud automatically terminates it regardless of the exit code. - -If **Autorestart** is activated, Docker Cloud evaluates whether to try restarting the container or not before evaluating **Autodestroy**. - -## Launch a service with Autodestroy - -You can enable **Autodestroy** on the **Service configuration** step of the **Launch new service** wizard. - -![](images/autodestroy.png) - -Autodestroy is set to `OFF` (deactivated) by default. - -### Use the API or CLI - -You can enable autodestroy when launching a service through the API or CLI. - -If not provided, it has a default value of `OFF`. Check our [API documentation](/apidocs/docker-cloud.md) for more information. - -#### Launch with autodestroy using the API -``` -POST /api/app/v1/service/ HTTP/1.1 -{ - "autodestroy": "ALWAYS", - [...] -} -``` - -#### Launch with autodestroy using the CLI -``` -$ docker-cloud service run --autodestroy ALWAYS [...] -``` - -## Enable autodestroy on an already deployed service - -You can also activate or deactivate the **Autodestroy** setting on a service -after it has been deployed, by editing the service. - -1. Go to the service detail page. -2. Click **Edit**. -3. Select the new autodestroy setting. -4. Click **Save**. - -### Use the API or CLI - -You can set the **Autodestroy** option after the service has been -deployed, using the API or CLI. - -Check our [API documentation](/apidocs/docker-cloud.md) for more information. - -#### Enable autodestroy using the API -``` -PATCH /api/app/v1/service/(uuid)/ HTTP/1.1 -{ - "autodestroy": "ALWAYS" -} -``` - -#### Enable autodestroy using the CLI -``` -$ docker-cloud service set --autodestroy ALWAYS (name or uuid) -``` diff --git a/docker-cloud/apps/auto-redeploy.md b/docker-cloud/apps/auto-redeploy.md deleted file mode 100644 index 3fb1daa33d..0000000000 --- a/docker-cloud/apps/auto-redeploy.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -description: Autoredeploy -keywords: Autoredeploy, image, store, service -redirect_from: -- /docker-cloud/feature-reference/auto-redeploy/ -title: Redeploy services automatically ---- - -[![Automated Deployments with Docker Cloud](images/video-auto-redeploy-docker-cloud.png)](https://www.youtube.com/watch?v=I4depUwfbFc "Automated Deployments with Docker Cloud"){:target="_blank"} - -Docker Cloud's **Autoredeploy** feature allows a service that uses an image -stored in Docker Hub to automatically redeploy whenever a new image is pushed or -built. - -> **Notes**: -> ->* **Autoredeploy** works only for hub images with the _latest_ tag. -> ->* To enable **autoredeploy** on an image stored in a third party registry, -> you need to use [redeploy triggers](triggers.md) instead. - -## Launch a new service with autoredeploy - -You can launch a service with **autoredeploy** enabled by enabling it from the **general settings** section of the **Launch new service** wizard. - -![](images/service-wizard-autoredeploy.png) - -By default, autoredeploy is *deactivated*. - -### Use the CLI or API - -You can enable **autoredeploy** when launching a service using the CLI or API. - -By default, autoredeploy is set to `false`. See the [API documentation](/apidocs/docker-cloud.md) for more information. - -#### Enable autoredeploy using the CLI - -``` -$ docker-cloud service run --autoredeploy [...] -``` - -#### Enable autoredeploy using the API - -``` -POST /api/app/v1/service/ HTTP/1.1 -{ - "autoredeploy": true, - [...] -} -``` - -## Enable autoredeploy to an already deployed service - -You can activate or deactivate **autoredeploy** on a service after it has been deployed. - -1. Click into the service detail page. -2. Click **Edit**. -3. Change the **autoredeploy** setting on the form to `true`. -4. Click **Save changes**. - - -### Use the CLI or API - -You can set the **autoredeploy** option after the service has been deployed, -using the CLI or API. - -Check our [API documentation](/apidocs/docker-cloud.md) for more information. - - -#### Enable autoredeploy using the CLI - -```bash -$ docker-cloud service set --autoredeploy (name or uuid) -``` - -### Enable autoredeploy using the API - -``` -PATCH /api/app/v1/service/(uuid)/ HTTP/1.1 -{ - "autoredeploy": true -} -``` diff --git a/docker-cloud/apps/autorestart.md b/docker-cloud/apps/autorestart.md deleted file mode 100644 index fe04542daf..0000000000 --- a/docker-cloud/apps/autorestart.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -description: Automatically restart a container in Docker Cloud -keywords: container, restart, automated -redirect_from: -- /docker-cloud/feature-reference/autorestart/ -title: Restart a container automatically ---- - -**Autorestart** is a service-level setting that can automatically start your -containers if they stop or crash. You can use this setting as an automatic crash -recovery mechanism. - -Autorestart uses Docker's `--autorestart` flag. When called, the Docker daemon -attempts to restart the container until it succeeds. If the first restart -attempts fail, the daemon continues to attempt a restart, but uses an -incremental back-off algorithm. - -The following Autorestart options are available: - -- `OFF`: the container does not restart, regardless of the exit code. -- `ON_FAILURE`: the container restarts *only* if it stops with an exit code other than 0. (0 is for normal shutdown.) -- `ALWAYS`: the container restarts automatically, regardless of the exit code. - -> **Note**: If you are using **Autorestart** set to `ALWAYS`, **Autodestroy** must be set to `OFF`. - -If the Docker daemon in a node restarts (because it was upgraded, or because the -underlying node was restarted), the daemon only restarts containers that -have **Autorestart** set to `ALWAYS`. - -## Launching a Service with Autorestart - -You can enable **Autorestart** on the **Service configuration** step of the **Launch new service wizard**. - -![](images/autorestart.png) - -Autorestart is set to `OFF` by default, which means that autorestart is *deactivated*. - -### Using the API and CLI - -You can set the **Autorestart** option when launching a service through the -API and through the CLI. Autorestart is set to `OFF` by default.  - -#### Set autorestart using the API - -``` -POST /api/app/v1/service/ HTTP/1.1 -{ - "autorestart": "ON_FAILURE", - [...] -} -``` - -#### Set autorestart using the CLI - -``` -$ docker-cloud service run --autorestart ON_FAILURE [...] -``` - -See our [API documentation](/apidocs/docker-cloud.md) for more information. - -## Enabling autorestart on an already deployed service - -You can activate or deactivate **Autorestart** on a service after it has been deployed by editing the service. - -1. Go to the service detail page. -2. Click **Edit**. -3. Choose the autorestart option to apply. -4. Click **Save**. - -### Using the API and CLI - -You can change the **Autorestart** setting after the service has been deployed using the API or CLI. - -#### Enable autorestart using the API -``` -PATCH /api/app/v1/service/(uuid)/ HTTP/1.1 -{ - "autorestart": "ALWAYS", -} -``` - -#### Enable autorestart using the CLI - -``` -$ docker-cloud service set --autorestart ALWAYS (name or uuid) -``` - -See the [API documentation](/apidocs/docker-cloud.md) for more information. diff --git a/docker-cloud/apps/deploy-tags.md b/docker-cloud/apps/deploy-tags.md deleted file mode 100644 index 9948923f41..0000000000 --- a/docker-cloud/apps/deploy-tags.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -description: Deployment tags -keywords: Deployment, tags, services -redirect_from: -- /docker-cloud/feature-reference/deploy-tags/ -title: Deployment tags ---- - -You can use **Deployment tags** to make sure certain services are deployed only -to specific nodes. Tagged services only deploy to nodes that match **all** of -the tags on that service. Docker Cloud shows an error if no nodes match all of -the service's deployment tags. A node might have extra tags that are not -specified on the service, but these do not prevent the service from deploying. - -You can specify multiple tags on services, on individual nodes, and on node clusters. All nodes that are members of a node cluster inherit the tags specified on the cluster. See [Automatic deployment tags](deploy-tags.md#automatic-deployment-tags) to learn more. - -#### Deployment tags example - -In this example, we have five nodes. One is used for development and testing, and four are used for production. The production nodes are distributed between frontend and backend. The table below summarizes their names and tags: - -| Node name | Tags | -| --------- | ---- | -| my-node-dev | `aws` `us-east-1` `development` `test` `frontend` `backend`| -| my-node-prod-1 | `aws` `us-east-1` `production` `frontend` | -| my-node-prod-2 | `aws` `us-east-2` `production` `frontend` | -| my-node-prod-3 | `aws` `us-east-1` `production` `backend` | -| my-node-prod-4 | `aws` `us-east-2` `production` `backend` | - -Imagine that you deploy a service called **my-webapp-dev** with two tags: -`development` and `frontend`. All containers for the service would be deployed -to the node labeled **my-node-dev**, because the node is tagged with both -`development` *and* `frontend`. - -Similarly, if you deploy a production service called **my-webapp-prod** with the -two tags `production` and `frontend`, all containers for that service -would be deployed to the two nodes **my-node-prod-1** and **my-node-prod-2** -because those two nodes are tagged with both `production` *and* `frontend`. - -> **Tip**: Containers are distributed between the two nodes based on the -[deployment strategy](../infrastructure/deployment-strategies.md) selected. - -## Automatic deployment tags - -When you launch a node cluster, four tags are automatically assigned to the -node cluster and all nodes in that cluster: - -* Provider name (for example `digitalocean`, `aws`) -* "[Bring your own node](../infrastructure/byoh.md)" (BYON) status (for example `byon=false` or `byon=true`) -* Region name (for example `us-east-1`, `lon1`) -* Node cluster name (for example `my-node-cluster-dev-1`) - -## Add tags to a node or node cluster at launch - -A single node is considered a node cluster with a size of 1. Because of this, you create a node cluster even if you are only launching a single node. - -1. Click **Node clusters** in the left navigation menu. -2. Click **Create**. -3. In the **Deploy tags** field, enter the tags to assign to the cluster and all -of its member nodes. - - ![](images/nodecluster-wizard-tags.png) - - When the node cluster scales up, new nodes automatically inherit the - node cluster's tags, including the [Automatic deployment tags](deploy-tags.md#automatic-deployment-tags) described above. - - You can see a node cluster's tags on the left side of the cluster's detail page. - -4. Click **Launch node cluster**. - -### Update or add tags on a node or node cluster - -To change the tags on an existing node or node cluster: - -1. Go to the node or node cluster's detail page. -2. Click the tags below the node or node cluster status line to edit them. - - ![](images/node-detail-tags.png) - - If there are no tags assigned to the cluster, move your cursor under the deployment status line and click the tag icon that appears. - -3. In the dialog that appears, add or remove tags. - - The individual nodes in a cluster inherit all tags from the cluster, including automatic tags. Each individual node can have extra tags in addition to the tags it inherits as a member of a node cluster. - -4. Click **Save** to save your tag changes to the nodes. - -## Add tags to a service at launch - -To deploy a service to a specific node using tags, you must first specify one or more tags on the service. If you don't add any tags to a service, the service is deployed to all available nodes. - -1. Use the **Create new service** wizard to start a new service. - - ![](images/service-wizard-tags.png) - -2. Select tags from the **deployment constraints** list to add to this service. Only tags that already exist on your nodes appear in the list. - - Tags in a service define which nodes are used on deployment: only nodes that match *all* tags specified in the service are used for deployment. - -### Update or add tags to a service - -You can add or remove tags on a running service from the service's detail view. - -1. From the service detail view, click **Edit**. -2. Select tags from the **deployment constraints** list to add to this service. Only tags that already exist on your nodes appear in the list. - - ![](images/service-wizard-tags.png) - -3. Click **Save Changes**. - -**If you update the tags on a service, you must redeploy the service for them to take effect.** To do this you can terminate all containers and relaunch them, or you can scale -your service down to zero nodes and then scale it back up. New containers are -deployed to the nodes that match the new tags. - -## Using deployment tags in the API and CLI - -See the [tags API and CLI documentation](/apidocs/docker-cloud.md#tags) for more information on how to use tags with our API and CLI. diff --git a/docker-cloud/apps/deploy-to-cloud-btn.md b/docker-cloud/apps/deploy-to-cloud-btn.md deleted file mode 100644 index edc8c2df74..0000000000 --- a/docker-cloud/apps/deploy-to-cloud-btn.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -description: Deploy to Docker Cloud -keywords: deploy, docker, cloud -redirect_from: -- /docker-cloud/feature-reference/deploy-to-cloud/ -- /docker-cloud/tutorials/deploy-to-cloud/ -title: Add a "Deploy to Docker Cloud" button ---- - -The **Deploy to Docker Cloud** button allows developers to deploy stacks with -one click in Docker Cloud as long as they are logged in. The button is intended -to be added to `README.md` files in public GitHub repositories, although it can -be used anywhere else. - -> **Note**: You must be _logged in_ to Docker Cloud for the button to work -> Otherwise, the link results in a 404 error. - -This is an example button to deploy our [python quickstart](https://github.com/docker/dockercloud-quickstart-python){: target="_blank" class="_"}: - - - -The button redirects the user to the **Launch new Stack** wizard, with the stack -definition already filled with the contents of any of the following files (which -are fetched in the order shown) from the repository (taking into account branch -and relative path): - -* `docker-cloud.yml` -* `docker-compose.yml` -* `fig.yml` - -The user can still modify the stack definition before deployment. - -## Add the 'Deploy to Docker Cloud' button in GitHub - -You can simply add the following snippet to your `README.md` file: - -```md -[![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/) -``` - -Docker Cloud detects the HTTP referer header and deploy the stack file found in the repository, branch and relative path where the source `README.md` file is stored. - - -## Add the 'Deploy to Docker Cloud' button in Docker Hub - -If the button is displayed on the Docker Hub, Docker Cloud cannot automatically detect the source GitHub repository, branch and path. In this case, edit the repository description and add the following code: - -```md -[![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/?repo=) -``` - -where `` is the path to your GitHub repository (see below). - - -## Add the 'Deploy to Docker Cloud' button anywhere else - -If you want to use the button somewhere else, such as from external documentation or a landing site, you just need to create a link to the following URL: - -```html -https://cloud.docker.com/stack/deploy/?repo= -``` - -where `` is the path to your GitHub repository. For example: - -* `https://github.com/docker/dockercloud-quickstart-python` -* `https://github.com/docker/dockercloud-quickstart-python/tree/staging` to use branch `staging` instead of the default branch -* `https://github.com/docker/dockercloud-quickstart-python/tree/master/example` to use branch `master` and the relative path `/example` inside the repository - -You can use your own image for the link (or no image). Our **Deploy to Docker Cloud** image is available at the following URL: - -* `https://files.cloud.docker.com/images/deploy-to-dockercloud.svg` diff --git a/docker-cloud/apps/images/autodestroy.png b/docker-cloud/apps/images/autodestroy.png deleted file mode 100644 index b4593df596..0000000000 Binary files a/docker-cloud/apps/images/autodestroy.png and /dev/null differ diff --git a/docker-cloud/apps/images/autorestart.png b/docker-cloud/apps/images/autorestart.png deleted file mode 100644 index 723c88ee34..0000000000 Binary files a/docker-cloud/apps/images/autorestart.png and /dev/null differ diff --git a/docker-cloud/apps/images/data-volumes-wizard.png b/docker-cloud/apps/images/data-volumes-wizard.png deleted file mode 100644 index aefdb35d21..0000000000 Binary files a/docker-cloud/apps/images/data-volumes-wizard.png and /dev/null differ diff --git a/docker-cloud/apps/images/exposing-port.png b/docker-cloud/apps/images/exposing-port.png deleted file mode 100644 index e1adc50157..0000000000 Binary files a/docker-cloud/apps/images/exposing-port.png and /dev/null differ diff --git a/docker-cloud/apps/images/host-volumes-wizard.png b/docker-cloud/apps/images/host-volumes-wizard.png deleted file mode 100644 index 3ea0a15917..0000000000 Binary files a/docker-cloud/apps/images/host-volumes-wizard.png and /dev/null differ diff --git a/docker-cloud/apps/images/lbd-containers-start.png b/docker-cloud/apps/images/lbd-containers-start.png deleted file mode 100644 index f5a8a59401..0000000000 Binary files a/docker-cloud/apps/images/lbd-containers-start.png and /dev/null differ diff --git a/docker-cloud/apps/images/lbd-endpoints.png b/docker-cloud/apps/images/lbd-endpoints.png deleted file mode 100644 index b516687fc6..0000000000 Binary files a/docker-cloud/apps/images/lbd-endpoints.png and /dev/null differ diff --git a/docker-cloud/apps/images/lbd-four-nodes.png b/docker-cloud/apps/images/lbd-four-nodes.png deleted file mode 100644 index 67e59152e6..0000000000 Binary files a/docker-cloud/apps/images/lbd-four-nodes.png and /dev/null differ diff --git a/docker-cloud/apps/images/lbd-hello-world-jumpstart.png b/docker-cloud/apps/images/lbd-hello-world-jumpstart.png deleted file mode 100644 index b32b09d354..0000000000 Binary files a/docker-cloud/apps/images/lbd-hello-world-jumpstart.png and /dev/null differ diff --git a/docker-cloud/apps/images/lbd-hostname-1.png b/docker-cloud/apps/images/lbd-hostname-1.png deleted file mode 100644 index 6a9db436bf..0000000000 Binary files a/docker-cloud/apps/images/lbd-hostname-1.png and /dev/null differ diff --git a/docker-cloud/apps/images/lbd-lb-conf.png b/docker-cloud/apps/images/lbd-lb-conf.png deleted file mode 100644 index 0dd024f781..0000000000 Binary files a/docker-cloud/apps/images/lbd-lb-conf.png and /dev/null differ diff --git a/docker-cloud/apps/images/lbd-lb-endpoint.png b/docker-cloud/apps/images/lbd-lb-endpoint.png deleted file mode 100644 index 1a043e2713..0000000000 Binary files a/docker-cloud/apps/images/lbd-lb-endpoint.png and /dev/null differ diff --git a/docker-cloud/apps/images/lbd-lb-envvar.png b/docker-cloud/apps/images/lbd-lb-envvar.png deleted file mode 100644 index 08ddb795a0..0000000000 Binary files a/docker-cloud/apps/images/lbd-lb-envvar.png and /dev/null differ diff --git a/docker-cloud/apps/images/lbd-lb-ports.png b/docker-cloud/apps/images/lbd-lb-ports.png deleted file mode 100644 index 623b34e5e1..0000000000 Binary files a/docker-cloud/apps/images/lbd-lb-ports.png and /dev/null differ diff --git a/docker-cloud/apps/images/lbd-node-wizard.png b/docker-cloud/apps/images/lbd-node-wizard.png deleted file mode 100644 index 7a4ee34071..0000000000 Binary files a/docker-cloud/apps/images/lbd-node-wizard.png and /dev/null differ diff --git a/docker-cloud/apps/images/lbd-reload.gif b/docker-cloud/apps/images/lbd-reload.gif deleted file mode 100644 index f2c87c467d..0000000000 Binary files a/docker-cloud/apps/images/lbd-reload.gif and /dev/null differ diff --git a/docker-cloud/apps/images/lbd-web-conf.png b/docker-cloud/apps/images/lbd-web-conf.png deleted file mode 100644 index 004959ed5a..0000000000 Binary files a/docker-cloud/apps/images/lbd-web-conf.png and /dev/null differ diff --git a/docker-cloud/apps/images/new-trigger-created.png b/docker-cloud/apps/images/new-trigger-created.png deleted file mode 100644 index 4fba3c9a9c..0000000000 Binary files a/docker-cloud/apps/images/new-trigger-created.png and /dev/null differ diff --git a/docker-cloud/apps/images/node-detail-tags.png b/docker-cloud/apps/images/node-detail-tags.png deleted file mode 100644 index 58c8b397d1..0000000000 Binary files a/docker-cloud/apps/images/node-detail-tags.png and /dev/null differ diff --git a/docker-cloud/apps/images/nodecluster-wizard-tags.png b/docker-cloud/apps/images/nodecluster-wizard-tags.png deleted file mode 100644 index fa164c19a1..0000000000 Binary files a/docker-cloud/apps/images/nodecluster-wizard-tags.png and /dev/null differ diff --git a/docker-cloud/apps/images/ports-published.png b/docker-cloud/apps/images/ports-published.png deleted file mode 100644 index 531ba0d51f..0000000000 Binary files a/docker-cloud/apps/images/ports-published.png and /dev/null differ diff --git a/docker-cloud/apps/images/publishing-port.png b/docker-cloud/apps/images/publishing-port.png deleted file mode 100644 index 40f6620c5a..0000000000 Binary files a/docker-cloud/apps/images/publishing-port.png and /dev/null differ diff --git a/docker-cloud/apps/images/redeploy-service.png b/docker-cloud/apps/images/redeploy-service.png deleted file mode 100644 index 75645aae09..0000000000 Binary files a/docker-cloud/apps/images/redeploy-service.png and /dev/null differ diff --git a/docker-cloud/apps/images/revoke-trigger.png b/docker-cloud/apps/images/revoke-trigger.png deleted file mode 100644 index 42808caaf1..0000000000 Binary files a/docker-cloud/apps/images/revoke-trigger.png and /dev/null differ diff --git a/docker-cloud/apps/images/service-before-scaling.png b/docker-cloud/apps/images/service-before-scaling.png deleted file mode 100644 index ccb8e4568a..0000000000 Binary files a/docker-cloud/apps/images/service-before-scaling.png and /dev/null differ diff --git a/docker-cloud/apps/images/service-during-scaling.png b/docker-cloud/apps/images/service-during-scaling.png deleted file mode 100644 index 1d0b722b2a..0000000000 Binary files a/docker-cloud/apps/images/service-during-scaling.png and /dev/null differ diff --git a/docker-cloud/apps/images/service-links-diagram.png b/docker-cloud/apps/images/service-links-diagram.png deleted file mode 100644 index 8a7ec7acf7..0000000000 Binary files a/docker-cloud/apps/images/service-links-diagram.png and /dev/null differ diff --git a/docker-cloud/apps/images/service-wizard-autoredeploy.png b/docker-cloud/apps/images/service-wizard-autoredeploy.png deleted file mode 100644 index 36622f094a..0000000000 Binary files a/docker-cloud/apps/images/service-wizard-autoredeploy.png and /dev/null differ diff --git a/docker-cloud/apps/images/service-wizard-scale.png b/docker-cloud/apps/images/service-wizard-scale.png deleted file mode 100644 index f38fa245b3..0000000000 Binary files a/docker-cloud/apps/images/service-wizard-scale.png and /dev/null differ diff --git a/docker-cloud/apps/images/service-wizard-sequential-deployment.png b/docker-cloud/apps/images/service-wizard-sequential-deployment.png deleted file mode 100644 index 07e91758aa..0000000000 Binary files a/docker-cloud/apps/images/service-wizard-sequential-deployment.png and /dev/null differ diff --git a/docker-cloud/apps/images/service-wizard-tags.png b/docker-cloud/apps/images/service-wizard-tags.png deleted file mode 100644 index f77bc8dd53..0000000000 Binary files a/docker-cloud/apps/images/service-wizard-tags.png and /dev/null differ diff --git a/docker-cloud/apps/images/stack-create.png b/docker-cloud/apps/images/stack-create.png deleted file mode 100644 index fe7a57d946..0000000000 Binary files a/docker-cloud/apps/images/stack-create.png and /dev/null differ diff --git a/docker-cloud/apps/images/stack-edit.png b/docker-cloud/apps/images/stack-edit.png deleted file mode 100644 index e13d67d463..0000000000 Binary files a/docker-cloud/apps/images/stack-edit.png and /dev/null differ diff --git a/docker-cloud/apps/images/triggers-tab-blank.png b/docker-cloud/apps/images/triggers-tab-blank.png deleted file mode 100644 index ef02849e14..0000000000 Binary files a/docker-cloud/apps/images/triggers-tab-blank.png and /dev/null differ diff --git a/docker-cloud/apps/images/video-auto-redeploy-docker-cloud.png b/docker-cloud/apps/images/video-auto-redeploy-docker-cloud.png deleted file mode 100644 index 9c53e8b845..0000000000 Binary files a/docker-cloud/apps/images/video-auto-redeploy-docker-cloud.png and /dev/null differ diff --git a/docker-cloud/apps/images/volumes-from-wizard.png b/docker-cloud/apps/images/volumes-from-wizard.png deleted file mode 100644 index c3557427b1..0000000000 Binary files a/docker-cloud/apps/images/volumes-from-wizard.png and /dev/null differ diff --git a/docker-cloud/apps/index.md b/docker-cloud/apps/index.md deleted file mode 100644 index 7b131a251c..0000000000 --- a/docker-cloud/apps/index.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -description: Manage your Docker Cloud Applications -keywords: applications, reference, Cloud -title: Applications in Docker Cloud -notoc: true ---- - -Applications in Docker Cloud are usually several Services linked together using -the specifications from a [Stackfile](stacks.md) or a Compose file. You can also -create individual services using the Docker Cloud Services wizard, and you can -attach [Volumes](volumes.md) to use as long-lived storage for your services. - -If you are using Docker Cloud's autobuild and autotest features, you can also -use [autoredeploy](auto-redeploy.md) to automatically redeploy the application -each time its underlying services are updated. - -* [Deployment tags](deploy-tags.md) -* [Add a Deploy to Docker Cloud button](deploy-to-cloud-btn.md) -* [Manage service stacks](stacks.md) - * [Stack YAML reference](stack-yaml-reference.md) -* [Publish and expose service or container ports](ports.md) -* [Redeploy running services](service-redeploy.md) -* [Scale your service](service-scaling.md) -* [Service API Roles](api-roles.md) -* [Service discovery and links](service-links.md) -* [Work with data volumes](volumes.md) -* [Create a proxy or load balancer](load-balance-hello-world.md) - -### Automate your applications - -Use the following features to automate specific actions on your Docker Cloud applications. - -* [Automatic container destroy](auto-destroy.md) -* [Automatic container restart](autorestart.md) -* [Autoredeploy](auto-redeploy.md) -* [Use triggers](triggers.md) diff --git a/docker-cloud/apps/load-balance-hello-world.md b/docker-cloud/apps/load-balance-hello-world.md deleted file mode 100644 index 3dbaa05a7f..0000000000 --- a/docker-cloud/apps/load-balance-hello-world.md +++ /dev/null @@ -1,199 +0,0 @@ ---- -description: Create a proxy or load balancer -keywords: proxy, load, balancer -redirect_from: -- /docker-cloud/getting-started/intermediate/load-balance-hello-world/ -- /docker-cloud/tutorials/load-balance-hello-world/ -title: Create a proxy or load balancer ---- - -When you deploy a web service to multiple containers, you might want to load -balance between the containers using a proxy or load balancer. - -In this tutorial, you use the **dockercloud/hello-world** image as a sample -web service and **dockercloud/haproxy** to load balance traffic to the service. -If you follow this tutorial exactly, your traffic is distributed evenly -between eight containers in a node cluster containing four nodes. - -## Create a Node Cluster - -First, deploy a node cluster of four nodes. - -1. If you have not linked to a host or cloud services provider, do that now. - - You can find instructions on how to link to your own hosts, or to different providers [here](../infrastructure/index.md). - -2. Click **Node Clusters** in the left-hand navigation menu. - -3. Click **Create**. - -4. Enter a name for the node cluster, select the **Provider**, **Region**, and **Type/Size**. - -5. Add a **deployment tag** of `web`. (This is used to make sure the right services are deployed to the correct nodes.) - -5. Drag or increment the **Number of nodes** slider to **4**. - - ![](images/lbd-node-wizard.png) - -4. Click **Launch node cluster**. - - This might take up to 10 minutes while the nodes are provisioned. This a great time to grab a cup of coffee. - -Once the node cluster is deployed and all four nodes are running, we're -ready to continue and launch our web service. - -![](images/lbd-four-nodes.png) - -## Launch the web service - -1. Click **Services** in the left hand menu, and click **Create**. - -3. Click the **rocket icon** at the top of page, and select the **dockercloud/hello-world** image. - - ![](images/lbd-hello-world-jumpstart.png) - -4. On the **Service configuration** screen, configure the service using these values: - - * **image**: Set the tag to `latest` so you get the most recent build of the image. - * **service name**: `web`. This is what we call the service internally. - * **number of containers**: 8 - * **deployment strategy**: `high availability`. Deploy evenly to all nodes. - * **deployment constraints**: `web`. Deploy only to nodes with this tag. - - > **Note**: For this tutorial, make sure you change the *deployment strategy* to **High Availability**, and add the *tag* **web** to ensure this service is deployed to the right nodes. - - ![](images/lbd-web-conf.png) - -5. Last, scroll down to the **Ports** section and make sure the **published** box is checked next to port 80. - - We're going to access these containers from the public internet, and - publishing the port makes them available externally. Make sure you leave the - `node port` field unset so that it stays dynamic. - -6. Click **Create and deploy**. - - Docker Cloud switches to the **Service detail** view after you create the - service. - -7. Scroll up to the **Containers** section to see the containers as they deploy. - - The icons for each container change color to indicate what phase of deployment they're in. Once all containers are green (successfully started), continue to the next step. - -![](images/lbd-containers-start.png) - -## Test the web service - -1. Once your containers are all green (running), scroll down to the - **Endpoints** section. - - A list shows all the endpoints available for this service on the public internet. - - ![Available endpoints](images/lbd-endpoints.png) - -2. Click an endpoint URL (it should look something like - `http://web-1.username.cont.dockerapp.io:49154`) to open a new tab in your - browser and view the **dockercloud/hello-world** web page. Note the hostname - for the page that loads. - - ![Endpoint URL details](images/lbd-hostname-1.png) - -3. Click other endpoints and check the hostnames. You see different hostnames - which match the container name (web-2, web-3, and so on). - -## Launch the load balancer - -We verified that the web service is working, so now we can set up the load balancer. - -1. Click **Services** in the left navigation bar, and click **Create** again. - - This time we launch a load balancer that listens on port 80 and balances the traffic across the 8 containers that are running the `web` service.  - -3. Click the **rocket icon** if necessary and find the **Proxies** section. - -4. Click the **dockercloud/haproxy** image. - -5. On the next screen, set the **service name** to `lb`. - - Leave the tag, deployment strategy, and number of containers at their default values. - - ![](images/lbd-lb-conf.png) - -6. Locate the **API Roles** field at end of the **General settings** section. - -7. Set the **API Role** to `Full access`. - - When you assign the service an API role, it passes a `DOCKERCLOUD_AUTH` - environment variable to the service's containers, which allows them to query - Docker Cloud's API on your behalf. You can [read more about API Roles here](../apps/api-roles.md). - - The **dockercloud/haproxy** image uses the API to check how many containers - are in the `web` service we launched earlier. **HAproxy** then uses this - information to update its configuration dynamically as the web service - scales.  - -8. Next, scroll down to the **Ports** section. - -9. Click the **Published** checkbox next to the container port 80. - -10. Click the word *dynamic* next to port 80, and enter 80 to set the published -port to also use port 80.  - - ![](images/lbd-lb-ports.png) - -11. Scroll down to the **Links** section. - -12. Select `web` from the drop down list, and click the blue **plus sign** to -add the link. - - This links the load balancing service `lb` with the web service `web`. The - link appears in the table in the Links section. - - ![Links section](images/lbd-lb-envvar.png) - - A new set of `WEB` environment variables appears in the service we're about - to launch. You can read more about - service link environment variables [here](../apps/service-links.md). - -13. Click **Create and deploy** and confirm that the service launches. - -## Test the load-balanced web service - -1. On the load balancer service detail page, scroll down to the **endpoints** - section. - - Unlike on the web service, this time the HTTP URL for the load balancer is - mapped to port 80.  - - ![Load balancer mapped to port 80](images/lbd-lb-endpoint.png) - -2. Click the endpoint URL to open it in a new tab. - - The same hello-world webpage you saw earlier is shown. Make note of the - hostname. - -3. Refresh the web page. - - With each refresh, the hostname changes as the requests are load-balanced to - different containers.  - - ![Changing hostname](images/lbd-reload.gif) - - Each container in the web service has a different hostname, which - appears in the webpage as `container_name-#`. When you refresh the - page, the load balancer routes the request to a new host and the displayed hostname changes. - - > **Tip**: If you don't see the hostname change, clear your browser's cache - or load the page from a different web browser.  - -Congratulations! You just deployed a load balanced web service using Docker -Cloud! - -## Further reading: load balancing the load balancer - -What if you had so many `web` containers that you needed more than one `lb` -container? - -Docker Cloud automatically assigns a DNS endpoint to all services. This endpoint -routes to all of the containers of that service. You can use the DNS endpoint to -load balance your load balancer. To learn more, read up on [service -links](service-links.md). diff --git a/docker-cloud/apps/ports.md b/docker-cloud/apps/ports.md deleted file mode 100644 index 0e35a3cbb7..0000000000 --- a/docker-cloud/apps/ports.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -description: Publish and expose service or container ports -keywords: publish, expose, ports, containers, services -redirect_from: -- /docker-cloud/feature-reference/ports/ -title: Publish and expose service or container ports ---- - -In Docker Cloud you can **publish** or **expose** ports in services and -containers, just like you can in Docker Engine (as documented -[here](/engine/reference/run.md#expose-incoming-ports)). - -* **Exposed ports** are ports that a container or service is using either to -provide a service, or listen on. By default, exposed ports in Docker Cloud are -only privately accessible. This means only other services that are linked to -the service which is exposing the ports can communicate over the -exposed port. - - *Exposed ports* cannot be accessed publicly over the internet. - -* **Published ports** are exposed ports that are accessible publicly over the internet. Published ports are published to the public-facing network interface in which the container is running on the node (host). - - *Published ports* **can** be accessed publicly over the internet. - -## Launch a Service with an exposed port - -If the image that you are using for your service already exposes any ports, these appear in Docker Cloud in the **Launch new service** wizard. - -1. From the **Launch new service** wizard, select the image to use. -2. Scroll down to the **Ports** section. - - ![](images/exposing-port.png) - -The image in this example screenshot *exposes* port 80. Remember, this means -that the port is only accessible to other services that link this service. It -is not accessible publicly over the internet. - -You can expose more ports from this screen by clicking **Add Port**. - -### Using the API/CLI - -See the API and CLI documentation [here](/apidocs/docker-cloud.md#service) for -information on how to launch a service with an exposed port. - -## Launch a Service with a published port - -If the image that you are using for your service already exposes any ports, -these appear in Docker Cloud in the **Launch new service** wizard. You can -choose to publish and map them from the wizard. - -1. From the **Launch new service** wizard, select the image to use. -2. Scroll down to the **Ports** section. - This section displays any ports configured in the image. -4. Click the **Published** checkbox. -5. Optionally, choose which port on the node where you want to make the exposed port available. - - By default, Docker Cloud assigns a published port dynamically. You can also - choose a specific port. For example, you might choose to take a port that is - exposed internally on port 80, and publish it externally on port 8080. - ![](images/publishing-port.png) - -To access the published port over the internet, connect to the port you -specified in the "Node port" section. If you used the default **dynamic** -option, find the published port on the service detail page. - -### Using the API/CLI - -See the API and CLI documentation [here](/apidocs/docker-cloud.md#service) on -how to launch a service with a published port. - - -## Check which ports a service has published - -The **Endpoints** section in the Service view lists the published ports for a service. Ports that are exposed internally are not listed in this section but can be viewed by editing the service configuration. - -* The **Service endpoints** list shows the endpoints that automatically round-robin route to the containers in a service. -* The **Container endpoints** list shows the endpoints for each individual container. Click the blue "link" icon to open the endpoint URL in a new tab. - - - -![](images/ports-published.png) - -### Using the API/CLI - -See the API and CLI documentation [here](/apidocs/docker-cloud.md#service) to learn how to list a service's exposed and published ports. - -## Service and container DNS endpoints - -The short word before `dockerapp.io` in an endpoint URL tells you what type of endpoint it is. The three available types are: - -* `node` routes to a specific node or host -* `svc` routes round-robin style to the containers of a service -* `cont` routes to a specific container within a service regardless of which host the container is deployed on - -For example, you might see an endpoint such as `web.quickstart-python.0a0b0c0d.svc.dockerapp.io`. You would know that this is a `service` endpoint, for reaching the `web` service in the `quickstart-python` stack. - -### Container endpoints - -Each container that has one or more published ports is automatically assigned a -DNS endpoint in the format -`container-name[.stack-name].shortuuid.cont.dockerapp.io`. This DNS endpoint -(single A record) resolves to the public IP of the node where the container is -running. If the container is redeployed into another node, the DNS updates -automatically and resolves to the new node or host. - -You can see a list of container endpoints on the stack, service or container -detail views, in the **Endpoints** tab. - -### Service endpoints - -Each service that has at least one port published with a fixed (not dynamic) -host port is assigned a DNS endpoint in the format -`service-name[.stack-name].shortuuid.svc.dockerapp.io`. This DNS endpoint -(multiple A record) resolves to the IPs of the nodes where the containers are -running, in a [round-robin -fashion](https://en.wikipedia.org/wiki/Round-robin_DNS). - -You can see a list of service endpoints on the stack and service detail views, under the **Endpoints** tab. diff --git a/docker-cloud/apps/service-links.md b/docker-cloud/apps/service-links.md deleted file mode 100644 index 1f4ad3a1da..0000000000 --- a/docker-cloud/apps/service-links.md +++ /dev/null @@ -1,257 +0,0 @@ ---- -description: Service discovery -keywords: service, discover, links -redirect_from: -- /docker-cloud/feature-reference/service-links/ -title: Service discovery and links ---- - -Docker Cloud creates a per-user overlay network which connects all containers -across all of the user's hosts. This network connects all of your containers on -the `10.7.0.0/16` subnet, and gives every container a local IP. This IP persists -on each container even if the container is redeployed and ends up on a different -host. Every container can reach any other container on any port within the -subnet. - -Docker Cloud gives your containers two ways find other services: - -* Using service and container names directly as **hostnames** - -* Using **service links**, which are based on [Docker Compose links](/compose/compose-file/#links) - -**Service and Container Hostnames** update automatically when a service scales -up or down or redeploys. As a user, you can configure service names, and Docker -Cloud uses these names to find the IP of the services and containers for you. -You can use hostnames in your code to provide abstraction that allows you to -easily swap service containers or components. - -**Service links** create environment variables which allow containers to -communicate with each other within a stack, or with other services outside of a -stack. You can specify service links explicitly when you create a new service -or edit an existing one, or specify them in the stackfile for a service stack. - -### Hostnames vs service links - -When a service is scaled up, a new hostname is created and automatically -resolves to the new IP of the container, and the parent service hostname record -also updates to include the new container's IP. However, new service link -environment variables are not created, and existing ones are not removed, when a -service scales up or down. - -## Using service and container names as hostnames - -You can use hostnames to connect any container in your Docker Cloud account to -any other container on your account without having to create service links or -manage environment variables. This is the recommended service discovery method. - -Hostnames always resolve to the correct IP for the service or container, -and update as the service scales up, scales down, or redeploys. The Docker -Cloud automatic DNS service resolves the service name to the correct IP on the -overlay network, even if the container has moved or is now on a different host. - -### Discovering containers on the same service or stack - -A container can always discover other containers on the same stack using just -the **container name** as hostname. This includes containers of the same -service. Similarly, a container can always discover other services on the same -stack using the **service name**. - -For example, a container `webapp-1` in the service `webapp` can connect to the -container `db-1` in the service `db` by using `db-1` as the hostname. It can -also connect to a peer container, `webapp-2`, by using `webapp-2` as the -hostname. - -A container `proxy-1` on the same stack could discover all `webapp` containers -by using the **service name** `webapp` as hostname. Connecting to the service -name resolves as an `A` -[round-robin](http://en.wikipedia.org/wiki/Round-robin_DNS) record, listing all -IPs of all containers on the service `webapp`. - -### Discovering services or containers on another stack - -To find a service or a container on another stack, append `.` to the -service or container name. For example, if `webapp-1` on the stack `production` -needs to access container `db-1` on the stack `common`, it could use the -hostname `db-1.common` which Docker Cloud resolves to the appropriate IP. - -### Discovering services or containers not included in a stack - -To find a container or service that is not included in a stack, use the service -or container name as the hostname. - -If the container making the query is part of a stack, and there is a local match -on the same stack, the local match takes precedence over the service or -container that is outside the stack. - -> **Tip**: To work around this, you can rename the local match so that it has a -more specific name. You might also put the external service or container in a -dedicated stack so that you can specify the stack name as part of the namespace. - -## Using service links for service discovery - -Docker Cloud's service linking is modeled on [Docker Compose -links](/compose/compose-file/#links) to provide a basic service discovery -functionality using directional links recorded in environment variables. - -When you link a "client" service to a "server" service, Docker Cloud performs -the following actions on the "client" service: - -1. Creates a group of environment variables that contain information about the exposed ports of the "server" service, including its IP address, port, and protocol. - -2. Copies all of the "server" service environment variables to the "client" service with an `HOSTNAME_ENV_` prefix. - -3. Adds a DNS hostname to the Docker Cloud DNS service that resolves to the "server" service IP address. - -Some environment variables such as the API endpoint are updated when a service -scales up or down. Service links are only updated when a service is deployed or -redeployed, but are not updated during runtime. No new service link environment -variables are created when a service scales up or down. - ->**Tip:** You can specify one of several [container distribution strategies](/docker-cloud/infrastructure/deployment-strategies.md) for -applications deployed to multiple nodes. These strategies enable automatic -deployments of containers to nodes, and sometimes auto-linking of containers. -If a service with -[EVERY_NODE](/docker-cloud/infrastructure/deployment-strategies.md#every-node) -strategy is linked to another service with EVERY_NODE strategy, containers are -linked one-to-one on each node. - -### Service link example - -For the explanation of service linking, consider the following application -diagram. - -![](images/service-links-diagram.png) - -Imagine that you are running a web service (`my-web-app`) with 2 containers -(`my-web-app-1` and `my-web-app-2`). You want to add a proxy service -(`my-proxy`) with one container (`my-proxy-1`) to balance HTTP traffic to -each of the containers in your `my-web-app` application, with a link name of -`web`. - -### Service link environment variables - -Several environment variables are set on each container at startup to provide -link details to other containers. The links created are directional. These are -similar to those used by Docker Compose. - -For our example app above, the following environment variables are set in the -proxy containers to provide service links. The example proxy application can use -these environment variables to configure itself on startup, and start balancing -traffic between the two containers of `my-web-app`. - -| Name | Value | -|:------------------------|:----------------------| -| WEB_1_PORT | `tcp://172.16.0.5:80` | -| WEB_1_PORT_80_TCP | `tcp://172.16.0.5:80` | -| WEB_1_PORT_80_TCP_ADDR | `172.16.0.5` | -| WEB_1_PORT_80_TCP_PORT | `80` | -| WEB_1_PORT_80_TCP_PROTO | `tcp` | -| WEB_2_PORT | `tcp://172.16.0.6:80` | -| WEB_2_PORT_80_TCP | `tcp://172.16.0.6:80` | -| WEB_2_PORT_80_TCP_ADDR | `172.16.0.6` | -| WEB_2_PORT_80_TCP_PORT | `80` | -| WEB_2_PORT_80_TCP_PROTO | `tcp` | - -To create these service links, you would specify the following in your stackfile: - -```yml -my-proxy: - links: - - my-web-app:web -``` - -This example snippet creates a directional link from `my-proxy` to `my-web-app`, and calls that link `web`. - -### DNS hostnames vs service links - -> **Note**: Hostnames are updated during runtime if the service scales up or down. Environment variables are only set or updated at deploy or redeploy. If your services scale up or down frequently, you should use hostnames rather than service links. - -In the example, the `my-proxy` containers can access the service links using following hostnames: - -| Hostname | Value | -|:---------|:--------------------------| -| `web` | `172.16.0.5 172.16.0.6` | -| `web-1` | `172.16.0.5` | -| `web-2` | `172.16.0.6` | - -The best way for the `my-proxy` service to connect to the `my-web-app` service -containers is using the hostnames, because they are updated during runtime if -`my-web-app` scales up or down. If `my-web-app` scales up, the new hostname -`web-3` automatically resolves to the new IP of the container, and the hostname -`web` is updated to include the new IP in its round-robin record. - -However, the service link environment variables are not added or updated until -the service is redeployed. If `my-web-app` scales up, no new service link -environment variables (such as `WEB_3_PORT`, `WEB_3_PORT_80_TCP`, etc) are added -to the "client" container. This means the client does not know how to contact -the new "server" container. - -### Service environment variables - -Environment variables specified in the service definition are instantiated in -each individual container. This ensures that each container has a copy of the -service's defined environment variables, and also allows other connecting -containers to read them. - -These environment variables are prefixed with the `HOSTNAME_ENV_` in each -container. - -In our example, if we launch our `my-web-app` service with an environment -variable of `WEBROOT=/login`, the following environment variables are set and -available in the proxy containers: - -| Name | Value | -|:------------------|:---------| -| WEB_1_ENV_WEBROOT | `/login` | -| WEB_2_ENV_WEBROOT | `/login` | - -In our example, this enables the "client" service (`my-proxy-1`) to read -configuration information such as usernames and passwords, or simple -configuration, from the "server" service containers (`my-web-app-1` and -`my-web-app-2`). - -#### Docker Cloud specific environment variables - -In addition to the standard Docker environment variables, Docker Cloud also sets -special environment variables that enable containers to self-configure. These -environment variables are updated on redeploy. - -In the example above, the following environment variables are available in the `my-proxy` containers: - -| Name | Value | -|:-------------------------------|:--------------------------------------------------------------------------------------| -| WEB_DOCKERCLOUD_API_URL | `https://cloud.docker.com/api/app/v1/service/3b5fbc69-151c-4f08-9164-a4ff988689ff/` | -| DOCKERCLOUD_SERVICE_API_URI | `/api/v1/service/651b58c47-479a-4108-b044-aaa274ef6455/` | -| DOCKERCLOUD_SERVICE_API_URL | `https://cloud.docker.com/api/app/v1/service/651b58c47-479a-4108-b044-aaa274ef6455/` | -| DOCKERCLOUD_CONTAINER_API_URI | `/api/v1/container/20ae2cff-44c0-4955-8fbe-ac5841d1286f/` | -| DOCKERCLOUD_CONTAINER_API_URL | `https://cloud.docker.com/api/app/v1/container/20ae2cff-44c0-4955-8fbe-ac5841d1286f/` | -| DOCKERCLOUD_NODE_API_URI | `/api/v1/node/d804d973-c8b8-4f5b-a0a0-558151ffcf02/` | -| DOCKERCLOUD_NODE_API_URL | `https://cloud.docker.com/api/infra/v1/node/d804d973-c8b8-4f5b-a0a0-558151ffcf02/` | -| DOCKERCLOUD_CONTAINER_FQDN | `my-proxy-1.20ae2cff.cont.dockerapp.io` | -| DOCKERCLOUD_CONTAINER_HOSTNAME | `my-proxy-1` | -| DOCKERCLOUD_SERVICE_FQDN | `my-proxy.651b58c47.svc.dockerapp.io` | -| DOCKERCLOUD_SERVICE_HOSTNAME | `my-proxy` | -| DOCKERCLOUD_NODE_FQDN | `d804d973-c8b8-4f5b-a0a0-558151ffcf02.node.dockerapp.io` | -| DOCKERCLOUD_NODE_HOSTNAME | `d804d973-c8b8-4f5b-a0a0-558151ffcf02` | - -Where: - -* `WEB_DOCKERCLOUD_API_URL` is the Docker Cloud API resource URL of the linked service. Because this is a link, the link name is the environment variable prefix. - -* `DOCKERCLOUD_SERVICE_API_URI` and `DOCKERCLOUD_SERVICE_API_URL` are the Docker Cloud API resource URI and URL of the service running in the container. - -* `DOCKERCLOUD_CONTAINER_API_URI` and `DOCKERCLOUD_CONTAINER_API_URL` are the Docker Cloud API resource URI and URL of the container itself. - -* `DOCKERCLOUD_NODE_API_URI` and `DOCKERCLOUD_NODE_API_URL` are the Docker Cloud API resource URI and URL of the node where the container is running. - -* `DOCKERCLOUD_CONTAINER_HOSTNAME` and `DOCKERCLOUD_CONTAINER_FQDN` are the external hostname and Fully Qualified Domain Name (FQDN) of the container itself. - -* `DOCKERCLOUD_SERVICE_HOSTNAME` and `DOCKERCLOUD_SERVICE_FQDN` are the external hostname and Fully Qualified Domain Name (FQDN) of the service to which the container belongs. - -* `DOCKERCLOUD_NODE_HOSTNAME` and `DOCKERCLOUD_NODE_FQDN` are the external hostname and Fully Qualified Domain Name (FQDN) of the node where the container is running. - -These environment variables are also copied to linked containers with the `NAME_ENV_` prefix. - -If you provide API access to your service, you can use the generated token -(stored in `DOCKERCLOUD_AUTH`) to access these API URLs to gather information or -automate operations, such as scaling. diff --git a/docker-cloud/apps/service-redeploy.md b/docker-cloud/apps/service-redeploy.md deleted file mode 100644 index a81ee78195..0000000000 --- a/docker-cloud/apps/service-redeploy.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -description: Redeploy running services -keywords: redeploy, running, services -redirect_from: -- /docker-cloud/feature-reference/service-redeploy/ -title: Redeploy a running service ---- - -You can **redeploy** services in Docker Cloud while they are running to -regenerate a service's containers. You might do this when a new version of the -image is pushed to the registry, or to apply changes that you made to -the service's settings. - -When you redeploy a service, Docker Cloud terminates the current service -containers. It then deploys new containers using the most recent service -definition, including service and deployment tags, deployment strategies, port -mappings, and so on. - -> **Note**: Your containers might be redeployed to different nodes during redeployment. - -#### Container hostnames - -*Container* **hostnames** change on redeployment, and if your service uses -**dynamic published ports**, new ports might be used on redeployment. - -Container hostnames appear in the following format: -`servicename-1.new-container-short-uuid.cont.dockerapp.io` - -However, containers keep their local IPs after redeployment, even if they end up -in different nodes. This means that linked services do not need to be -redeployed. To learn more, see [Service Links](service-links.md). - -#### Service hostnames - -*Service* hostnames remain the same after redeployment. Service hostnames are only -available for ports that are bound to a specific port on the host. They are -_not_ available if the port is dynamically allocated. - -Service hostnames appear in the following format: -`servicename.service-short-uuid.svc.dockerapp.io` - -#### Redeploy with volumes - -If your containers use volumes, the new containers can **reuse** the -existing volumes. If you chose to reuse the volumes, the containers redeploy to the same nodes to preserve their links to the volumes. - -> **Note**: When you redeploy services with reused volumes, your redeployment can fail if the service's deployment tags no longer allow it to be deployed on the node that the volume resides on. To learn more, see [Deployment Tags](deploy-tags.md). - -## Redeploy a service using the web interface - -1. Click **Services** in the left menu to view a list of services. -2. Click the checkbox to the left of the service or services you want to redeploy. -2. From the **Actions** menu at the top right, choose **Redeploy**. - ![](images/redeploy-service.png) -The service begins redeploying immediately. - - - -## Redeploy a service using the API and CLI - -See the Docker Cloud [API and CLI documentation](/apidocs/docker-cloud.md#redeploy-a-service) for more information -on using our API and CLI to redeploy services. - -## Autoredeploy on image push to Docker Hub - -If your service uses an image stored in Docker Hub or Docker Cloud, you can -enable **Autoredeploy** on the service. Autoredeploy triggers a redeployment -whenever a new image is pushed. See the [Autoredeploy documentation](auto-redeploy.md) to learn more. - -## Redeploy a service using webhooks - -You can also use **triggers** to redeploy a service, for example when its image -is pushed or rebuilt in a third-party registry. See the [Triggers documentation](triggers.md) to learn more. diff --git a/docker-cloud/apps/service-scaling.md b/docker-cloud/apps/service-scaling.md deleted file mode 100644 index 9754d3253d..0000000000 --- a/docker-cloud/apps/service-scaling.md +++ /dev/null @@ -1,157 +0,0 @@ ---- -description: Scale your service, spawn new containers -keywords: spawn, container, service, deploy -redirect_from: -- /docker-cloud/feature-reference/service-scaling/ -title: Scale your service ---- - -Docker Cloud makes it easy to spawn new containers of your service to handle -additional load. Two modes are available to allow you to scale services with -different configuration requirements. - -## Deployment and scaling modes - -Any service that handles additional load by increasing the number of containers -of the service is considered "horizontally scalable". - -There are two deployment modes when scaling a service: - -- **Parallel mode** (default): all containers of a service are - deployed at the same time without any links between them. This is - the fastest way to deploy, and is the default. - -- **Sequential mode**: each new container is deployed in the service one at a - time. Each container is linked to all previous containers using service - links. This makes complex configuration possible within the containers - startup logic. This mode is explained in detail in the following sections. - -## When should I use Parallel scaling? - - When the containers in a service work independently of each other and do not - need to coordinate between themselves, they can be scaled up in parallel mode. - -Examples include: - -- Stateless web servers and proxies -- “Worker” instances that process jobs from a queue -- “Cron”-style instances that execute periodic tasks - -The default scaling mode is parallel, so no additional configuration is -required to use this mode. - -## When should I use Sequential scaling? - -Some services require coordination between different containers to ensure that -the service functions correctly. Many databases, such as MySQL for example, -require that the containers know about each other at startup time so that -traffic can be routed to them appropriately. When this is the case, you should -use [sequential scaling](service-scaling.md#sequential-deployment-and-scaling). - -To allow peer-aware container startup, you can enable sequential scaling mode. See [Sequential Scaling](service-scaling.md#sequential-deployment-and-scaling) for more information. - -## Set the initial number of containers - -When you configure a service in Docker Cloud, you can specify an initial number of containers for the service before you launch. - -![](images/service-wizard-scale.png) - -Docker Cloud immediately launches as many containers as you specified. - -### Set the initial containers using the API - -You can specify the initial number of containers for a service when deploying it through the API: - -``` -POST /api/app/v1/service/ HTTP/1.1 -{ - "target_num_containers": 2, - [...] -} -``` - -If you don’t specify the number of containers to deploy, this command defaults to `1`. See the [API documentation](/apidocs/docker-cloud.md) for more information. - -### Set the initial containers using the CLI - -You can also specify the initial number of containers for a service when deploying it using the CLI: - -```bash -$ docker-cloud service run -t 2 [...] -``` - -If you don’t specify the number of containers to deploy, the CLI uses the default value of `1`. See the [CLI documentation](/apidocs/docker-cloud.md) for more information. - -## Scale an already running service - -If you need to scale a service up or down while it is running, you can change the number of containers from the service detail page: - -![](images/service-before-scaling.png) - -1. Click the slider at the top of the service detail page. -2. Drag the slider to the number of containers you want. -3. Click **Scale**. - - The application starts scaling immediately, whether this means starting new containers, or gracefully shutting down existing ones. - -![](images/service-during-scaling.png) - -### Scale a running service using the API - -You can scale an already running service through the API: - -``` -PATCH /api/app/v1/service/(uuid)/ HTTP/1.1 -{ - "target_num_containers": 2 -} -``` -See the [scale a service API documentation](/apidocs/docker-cloud.md#scale-a-service). - -### Scale a running service using the CLI - -You can also scale an already running service using the CLI: - -```bash -$ docker-cloud service scale (uuid or name) 2 -``` - -See the [scale a service CLI documentation](/apidocs/docker-cloud.md#scale-a-service). - -## Sequential deployment and scaling - -When a service with more than one container is deployed using **sequential deployment** mode, the second and subsequent containers are linked to all the -previous ones using [service links](service-links.md). These links are useful if -your service needs to know about other instances, for example to allow automatic -configuration on startup. - -See the [Service links](service-links.md) topic for a list of environment variables that the links create in your containers. - -You can set the **Sequential deployment** setting on the **Service configuration** step of the **Launch new service** wizard: - -![](images/service-wizard-sequential-deployment.png) - -### Set the scaling mode using the API - -You can also set the `sequential_deployment` option when deploying an -application through the API: - -``` -POST /api/app/v1/service/ HTTP/1.1 -{ - "sequential_deployment": true, - [...] -} -``` - -See [create a new service](/apidocs/docker-cloud.md#create-a-new-service) for -more information. - -### Set the scaling mode using the CLI - -You can also set the `sequential_deployment` option when deploying an -application through the CLI:  - -```bash -$ docker-cloud service run --sequential [...]  -``` diff --git a/docker-cloud/apps/stack-yaml-reference.md b/docker-cloud/apps/stack-yaml-reference.md deleted file mode 100644 index 0614e1d6b5..0000000000 --- a/docker-cloud/apps/stack-yaml-reference.md +++ /dev/null @@ -1,329 +0,0 @@ ---- -description: Stack YAML reference for Docker Cloud -keywords: YAML, stack, reference, docker cloud -redirect_from: -- /docker-cloud/feature-reference/stack-yaml-reference/ -title: Docker Cloud stack file YAML reference ---- - -A stack is a collection of services that make up an application in a specific environment. Learn more about stacks for Docker Cloud [here](stacks.md). A **stack file** is a file in YAML format that defines one or more services, similar to a `docker-compose.yml` file for Docker Compose but with a few extensions. The default name for this file is `docker-cloud.yml`. - -**Looking for information on stack files for Swarm?** A good place to start is the [Compose reference file](/compose/compose-file/index.md), particularly the section on `deploy` key and its sub-options, and the reference on [Docker stacks](/compose/bundles.md). Also, the new [Getting Started tutorial](/get-started/index.md) demos use of a stack file to deploy an application to a swarm. - -## Stack file example - -Below is an example `docker-cloud.yml`: - -```yml -lb: - image: dockercloud/haproxy - links: - - web - ports: - - "80:80" - roles: - - global -web: - image: dockercloud/quickstart-python - links: - - redis - target_num_containers: 4 -redis: - image: redis -``` - -Each key defined in `docker-cloud.yml` creates a service with that name in Docker Cloud. In the example above, three services are created: `lb`, `web`, and `redis`. Each service is a dictionary whose possible keys are documented below. - -The `image` key is mandatory. Other keys are optional and are analogous to their [Docker Cloud Service API](/apidocs/docker-cloud.md#create-a-new-service) counterparts. - -## image (required) - -The image used to deploy this service. This is the only mandatory key. - -```yml -image: drupal -image: dockercloud/hello-world -image: my.registry.com/redis -``` - -## autodestroy -Whether the containers for this service should be terminated if they stop (default: `no`, possible values: `no`, `on-success`, `always`). - -```yml -autodestroy: always -``` - -## autoredeploy -Whether to redeploy the containers of the service when its image is updated in Docker Cloud registry (default: `false`). - -```yml -autoredeploy: true -``` - -## cap_add, cap_drop -Add or drop container capabilities. See `man 7 capabilities` for a full list. - -```yml -cap_add: - - ALL -cap_drop: - - NET_ADMIN - - SYS_ADMIN -``` - -## cgroup_parent -Specify an optional parent cgroup for the container. - -```yml -cgroup_parent: m-executor-abcd -``` - -## command -Override the default command in the image. - -```yml -command: echo 'Hello World!' -``` - -## deployment_strategy -Container distribution among nodes (default: `emptiest_node`, possible values: `emptiest_node`, `high_availability`, `every_node`). Learn more [here](../infrastructure/deployment-strategies.md). - -```yml -deployment_strategy: high_availability -``` - -## devices -List of device mappings. Uses the same format as the `--device` docker client create option. - -```yml -devices: - - "/dev/ttyUSB0:/dev/ttyUSB0" -``` - -## dns -Specify custom DNS servers. Can be a single value or a list. - -```yml -dns: 8.8.8.8 -dns: - - 8.8.8.8 - - 9.9.9.9 -``` - -## dns_search -Specify custom DNS search domains. Can be a single value or a list. - -```yml -dns_search: example.com -dns_search: - - dc1.example.com - - dc2.example.com -``` - -## environment -A list of environment variables to add in the service's containers at launch. The environment variables specified here override any image-defined environment variables. You can use either an array or a dictionary format. - -Dictionary format: -```yml -environment: - PASSWORD: my_password -``` - -Array format: -```yml -environment: - - PASSWORD=my_password -``` - -When you use the Docker Cloud CLI to create a stack, you can use the environment variables defined locally in your shell to define those in the stack. This is useful if you don't want to store passwords or other sensitive information in your stack file: - -```yml -environment: - - PASSWORD -``` - -## expose -Expose ports without publishing them to the host machine - they'll only be accessible from your nodes in Docker Cloud. `udp` ports can be specified with a `/udp` suffix. - -```yml -expose: - - "80" - - "90/udp" -``` - -## extra_hosts -Add hostname mappings. Uses the same values as the docker client `--add-host` parameter. - -```yml -extra_hosts: - - "somehost:162.242.195.82" - - "otherhost:50.31.209.229" -``` - -## labels -Add metadata to containers using Docker Engine labels. You can use either an array or a dictionary. - -We recommend using reverse-DNS notation to prevent your labels from conflicting with those used by other software. - -```yml -labels: - com.example.description: "Accounting webapp" - com.example.department: "Finance" - com.example.label-with-empty-value: "" - -labels: - - "com.example.description=Accounting webapp" - - "com.example.department=Finance" - - "com.example.label-with-empty-value" -``` - -## links -Link to another service. - -Either specify both the service unique name and the link alias (`SERVICE:ALIAS`), or just the service unique name (which is also used for the alias). If a service you want to link to is part of a different stack, specify the external stack name too. - -- If the target service belongs to *this* stack, its service unique name is its service name. -- If the target service does not belong to *any* stacks (it is a standalone service), its service unique name is its service name. -- If the target service belongs to another stack, its service unique name is its service name plus the service stack name, separated by a period (`.`). - -```yml -links: - - mysql - - redis:cache - - amqp.staging:amqp -``` - -Environment variables are created for each link that Docker Cloud resolves to the containers IPs of the linked service. More information [here](service-links.md). - -## net -Networking mode. Only "bridge" and "host" options are supported for now. - -```yml -net: host -``` - -## pid -Sets the PID mode to the host PID mode. This turns on sharing between container and the host operating system PID address space. Containers launched with this (optional) flag can access and be accessed by other containers in the namespace belonging to the host running the Docker daemon. - -```yml -pid: "host" -``` - -## ports -Expose ports. Either specify both ports (`HOST:CONTAINER`), or just the container port (an ephemeral host port is chosen). `udp` ports can be specified with a `/udp` suffix. - -```yml -ports: - - "80" - - "443:443" - - "500/udp" - - "4500:4500/udp" - - "49022:22" -``` - -## privileged - -Whether to start the containers with Docker Engine's privileged flag set or not (default: `false`). - -```yml -privileged: true -``` - -## restart -Whether the containers for this service should be restarted if they stop (default: `no`, possible values: `no`, `on-failure`, `always`). - -```yml -restart: always -``` - -## roles -A list of Docker Cloud API roles to grant the service. The only supported value is `global`, which creates an environment variable `DOCKERCLOUD_AUTH` used to authenticate against Docker Cloud API. Learn more [here](api-roles.md). - -```yml -roles: - - global -``` - -## security_opt -Override the default labeling scheme for each container. - -```yml -security_opt: - - label:user:USER - - label:role:ROLE -``` - -## sequential_deployment -Whether the containers should be launched and scaled in sequence (default: `false`). Learn more [here](service-scaling.md). - -```yml -sequential_deployment: true -``` - -## tags -Indicates the [deploy tags](deploy-tags.md) to select the nodes where containers are created. - -```yml -tags: - - staging - - web -``` - -## target_num_containers -The number of containers to run for this service (default: `1`). - -```yml -target_num_containers: 3 -``` - -## volumes -Mount paths as volumes, optionally specifying a path on the host machine (`HOST:CONTAINER`), or an access mode (`HOST:CONTAINER:ro`). - -```yml -volumes: - - /etc/mysql - - /sys:/sys - - /etc:/etc:ro -``` - -## volumes_from -Mount all of the volumes from another service by specifying a service unique name. - -- If the target service belongs to this stack, its service unique name is its service name. -- If the target service does not belong to any stack, its service unique name is its service name. -- If the target service belongs to another stack, its service unique name is its service name plus the service stack name, separated by ".". Learn more [here](volumes.md). - -```yml -volumes_from: - - database - - mongodb.staging -``` - -## Single value keys analogous to a `docker run` counterpart - -``` -working_dir: /app -entrypoint: /app/entrypoint.sh -user: root -hostname: foo -domainname: foo.com -mac_address: 02:42:ac:11:65:43 -cpu_shares: 512 -cpuset: 0,1 -mem_limit: 100000m -memswap_limit: 200000m -privileged: true -read_only: true -stdin_open: true -tty: true -``` - -## Unsupported Docker-compose keys - -Stack files (`docker-cloud.yml`) were designed with `docker-compose.yml` in mind to maximize compatibility. However the following keys used in Compose are not supported in Docker Cloud stackfiles: - -``` -build -external_links -env_file -``` diff --git a/docker-cloud/apps/stacks.md b/docker-cloud/apps/stacks.md deleted file mode 100644 index 7fdfd48129..0000000000 --- a/docker-cloud/apps/stacks.md +++ /dev/null @@ -1,128 +0,0 @@ ---- -description: Manage service stacks -keywords: service, stack, yaml -redirect_from: -- /docker-cloud/feature-reference/stacks/ -title: Manage service stacks ---- - -A **stack** is a collection of services that make up an application in a specific environment. A **stack file** is a file in YAML format, similar to a `docker-compose.yml` file, that defines one or more services. The YAML reference is documented [here](stack-yaml-reference.md). - -Stacks are a convenient way to automatically deploy multiple services that are linked to each other, without needing to define each one separately. - -Stack files define environment variables, deployment tags, the number of containers, and related environment-specific configuration. Because of this, you should use a separate stack file for development, staging, production, and other environments. - -### Stack file example - -Below is an example `docker-cloud.yml`: - -```yml -lb: - image: dockercloud/haproxy - links: - - web - ports: - - "80:80" - roles: - - global -web: - image: dockercloud/quickstart-python - links: - - redis - target_num_containers: 4 -redis: - image: redis -``` - -Each key defined in `docker-cloud.yml` creates a service with that name in Docker Cloud. In the example above, three services are created: `lb`, `web` and `redis`. Each service is a dictionary and its keys are specified below. - -Only the `image` key is mandatory. Other keys are optional and are analogous to their [Docker Cloud Service API](/apidocs/docker-cloud.md#create-a-new-service) counterparts. - -## Create a stack - -Docker Cloud allows you to create stacks from the web interface, as well as via the Docker Cloud API and the `docker-cloud` command line. - -To create a stack from the Docker Cloud web interface: - -1. Log in to Docker Cloud. -2. Click **Stacks**. -3. Click **Create**. -4. Enter a name for the stackfile. -5. Enter or paste the stack file in the **Stackfile** field, or drag a file to the field to upload it. (You can also click in the field to browse for and upload a file on your computer.) - - ![](images/stack-create.png) - -6. Click **Create** or **Create and deploy**. - -### Create a stack using the API - -You can also create a new stack by uploading a stack file directly using the Docker Cloud API. When you use the API, the stack file is in **JSON** format, like the following example: - -```json -POST /api/v1/stack/ HTTP/1.1 -{ - "name": "my-new-stack", - "services": [ - { - "name": "hello-word", - "image": "dockercloud/hello-world", - "target_num_containers": 2 - } - ] -} -``` - -Check our [API documentation](/apidocs/docker-cloud.md#stacks) for more information. - -### Create a stack using the CLI - -You can create a stack from a YAML file by executing: - -```bash -$ docker-cloud stack create -f docker-cloud.yml -``` - -Check our [CLI documentation](/apidocs/docker-cloud.md#stacks) for more information. - - -## Update an existing stack - -You can specify an existing stack when you create a service, however you might not always have the stack definition ready at that time, or you might later want to add a service to an existing stack. - -To update a stack from the Docker Cloud web interface: - -1. Navigate to the stack you want to update. -2. Click **Edit**. - - ![](images/stack-edit.png) -3. Edit the stack file, or upload a new one from your computer. -4. Click **Save**. - -### Update an existing stack using the API - -You can also update a stack by uploading the new stack file directly using the Docker Cloud API. When you use the API, the stack file is in **JSON** format, like the following example: - -```json -PATCH /api/app/v1/stack/(uuid)/ HTTP/1.1 -{ - "services": [ - { - "name": "hello-word", - "image": "dockercloud/hello-world", - "target_num_containers": 2 - } - ] -} -``` - -Check our [API documentation](/apidocs/docker-cloud.md#stacks) for more information. - -### Update an existing stack using the CLI - -You can update a stack from a YAML file by executing: - -```bash -docker-cloud stack update -f docker-cloud.yml (uuid or name) -``` - -Check our [CLI documentation](/apidocs/docker-cloud.md#stacks) for more information. \ No newline at end of file diff --git a/docker-cloud/apps/triggers.md b/docker-cloud/apps/triggers.md deleted file mode 100644 index 154f0ae69a..0000000000 --- a/docker-cloud/apps/triggers.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -description: Use triggers -keywords: API, triggers, endpoints -redirect_from: -- /docker-cloud/feature-reference/triggers/ -title: Use triggers ---- - -## What are triggers? - -**Triggers** are API endpoints that redeploy or scale a specific service -whenever a `POST` HTTP request is sent to them. You can create one or more -triggers per service. - -Triggers do not require any authentication. This allows third party services -like Docker Hub to call them, however because of this it is important that you -keep their URLs secret. - -The body of the `POST` request is passed in to the new containers as an -environment variable called `DOCKERCLOUD_TRIGGER_BODY`. - -### Trigger types - -Docker Cloud supports two types of triggers: - -* **Redeploy** triggers, which redeploy the service when called -* **Scale up** triggers, which scale the service by one or more containers when called - -## Create a trigger - -1. Click the name of the service you want to create a trigger for. -2. Go to the detail page and scroll down to the **Triggers** section. - - ![](images/triggers-tab-blank.png) - -3. In the **Trigger name** field, enter a name for the trigger. -4. Select a trigger type. -5. Click the **+** (plus sign) icon. - - ![](images/new-trigger-created.png) - -6. Use the POST request URL provided to configure the webhook in your -application or third party service. - -## Revoke triggers - -To stop a trigger from automatically scaling or redeploying, you must revoke it. - -1. Go to the detail page of the service. -2. Scroll down to the **Triggers** section. -3. Click the **trashcan** icon for the trigger you want to revoke. - - ![](images/revoke-trigger.png) - -Once the trigger is revoked, it stops accepting requests. - -## Use triggers in the API and CLI - -See our [API and CLI documentation](/apidocs/docker-cloud.md#triggers) to learn how to use triggers with our API and the CLI. diff --git a/docker-cloud/apps/volumes.md b/docker-cloud/apps/volumes.md deleted file mode 100644 index 1d31e3f51b..0000000000 --- a/docker-cloud/apps/volumes.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -description: Work with data volumes -keywords: data, volumes, create, reuse -redirect_from: -- /docker-cloud/tutorials/download-volume-data/ -- /docker-cloud/feature-reference/volumes/ -title: Work with data volumes ---- - -In Docker Cloud, you can define one or more data volumes for a service. -**Volumes** are directories that are stored outside of the container's -filesystem and which hold reusable and shareable data that can persist even when -containers are terminated. This data can be reused by the same service on -redeployment, or shared with other services. - -## Add a data volume to a service - -Data volumes can be either specified in the image's `Dockerfile` using the -[VOLUME instruction](/engine/reference/builder/#volume), or when -creating a service. - -To define a data volume in a service, specify the **container path** where it -should be created in the **Volumes** step of the **Create new service** wizard. -Each container of the service has its own volume. Data volumes are reused -when the service is redeployed (data persists in this case), and deleted if the -service is terminated. - -![](images/data-volumes-wizard.png) - -If you don't define a **host path**, Docker Cloud creates a new empty volume. -Otherwise, the specified **host path** is mounted on the **container path**. -When you specify a host path, you can also specify whether to mount the volume -read-only, or read/write. - -![](images/host-volumes-wizard.png) - - -## Reuse data volumes from another service - -You can reuse data volumes from another service. To do this when creating a service, go through the **Create new service**, and continue to the **Volumes** step. From the **Volumes** page, choose a source service from the **Add volumes from** menu. - -![](images/volumes-from-wizard.png) - -All reused data volumes are mounted on the same paths as in the source service. -Containers must be on the same host to share volumes, so the containers -of the new service deploy to the same nodes where the source service -containers are deployed. - -> **Note**: A service with data volumes cannot be terminated until all services that are using its volumes have also been terminated. - -## Back up data volumes - -You might find it helpful to download or back up the data from volumes that are attached to running containers. - -1. Run an SSH service that mounts the volumes of the service you want to back up. - - In the example snippet below, replace `mysql` with the actual service name. - - ``` - $ docker-cloud service run -n downloader -p 22:2222 -e AUTHORIZED_KEYS="$(cat ~/.ssh/id_rsa.pub)" --volumes-from mysql tutum/ubuntu - ``` - -2. Run a `scp` (secure-copy) to download the files to your local machine. - - In the example snippet below, replace `downloader-1.uuid.cont.dockerapp.io` with the container's Fully Qualified Domain Name (FQDN), and replace `/var/lib/mysql` with the path within the container from which you want to download the data. The data is downloaded to the current local folder. - - ``` - $ scp -r -P 2222 root@downloader-1.uuid.cont.dockerapp.io:/var/lib/mysql . - ``` diff --git a/docker-cloud/builds/push-images.md b/docker-cloud/builds/push-images.md deleted file mode 100644 index 2168392ce3..0000000000 --- a/docker-cloud/builds/push-images.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -description: Push images to Docker Cloud -keywords: images, private, registry -redirect_from: -- /docker-cloud/getting-started/intermediate/pushing-images-to-dockercloud/ -- /docker-cloud/tutorials/pushing-images-to-dockercloud/ -title: Push images to Docker Cloud -notoc: true ---- - -Docker Cloud uses Docker Hub as its native registry for storing both public and -private repositories. Once you push your images to Docker Hub, they are -available in Docker Cloud. - -If you don't have Swarm Mode enable, images pushed to Docker Hub automatically appear for you on the **Services/Wizard** page on Docker Cloud. - -> **Note**: You must use Docker Engine 1.6 or later to push to Docker Hub. -Follow the [official installation instructions](/install/index.md){: target="_blank" class="_" } depending on your system. - -1. In a terminal window, set the environment variable **DOCKER_ID_USER** as *your username* in Docker Cloud. - - This allows you to copy and paste the commands directly from this tutorial. - - ``` - $ export DOCKER_ID_USER="username" - ``` - - If you don't want to set this environment variable, change the examples in - this tutorial to replace `DOCKER_ID_USER` with your Docker Cloud username. - -2. Log in to Docker Cloud using the `docker login` command. - - ``` - $ docker login - ``` - This logs you in using your Docker ID, which is shared between both Docker Hub and Docker Cloud. - - If you have never logged in to Docker Hub or Docker Cloud and do not have a Docker ID, running this command prompts you to create a Docker ID. - -3. Tag your image using `docker tag`. - - In the example below replace `my_image` with your image's name, and `DOCKER_ID_USER` with your Docker Cloud username if needed. - - ``` - $ docker tag my_image $DOCKER_ID_USER/my_image - ``` - -4. Push your image to Docker Hub using `docker push` (making the same replacements as in the previous step). - - ``` - $ docker push $DOCKER_ID_USER/my_image - ``` - -5. Check that the image you just pushed appears in Docker Cloud. - - Go to Docker Cloud and navigate to the **Repositories** tab and confirm that your image appears in this list. - ->**Note**: If you're a member of any organizations that are using Docker -> Cloud, you might need to switch to the organization account namespace using the -> account menu at the upper right to see other repositories. diff --git a/docker-cloud/builds/repos.md b/docker-cloud/builds/repos.md deleted file mode 100644 index 3bf175ac7d..0000000000 --- a/docker-cloud/builds/repos.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -description: Create and edit Docker Cloud repositories -keywords: Docker Cloud repositories, automated, build, images -title: Docker Cloud repositories ---- - -Repositories in Docker Cloud store your Docker images. You can create -repositories and manually [push images](push-images.md) using `docker push`, or -you can link to a source code provider and use [automated builds](automated-build.md) to build the images for you. These repositories -can be either public or private. - -![Docker Cloud repository General view](images/repo-general.png) - -Additionally, you can access your Docker Hub repositories and automated builds -from within Docker Cloud. - -## Create a new repository in Docker Cloud - -To store your images in Docker Cloud, you create a repository. All individual users can create one private repository for free, and can create unlimited public repositories. - -1. Click **Repositories** in the left navigation. -2. Click **Create**. -3. Enter a **name** and an optional **description**. -4. Choose a visibility setting for the repository. -5. Optionally, click a linked source code provider to set up automated builds. - 1. Select a namespace from that source code provider. - 2. From that namespace, select a repository to build. - 3. Optionally, expand the build settings section to set up build rules and enable or disable Autobuilds. - - > **Note**: You do not need to set up automated builds right away, and you can change the build settings at any time after the repository is created. If you choose not to enable automated builds, you can still push images to the repository using the `docker` or `docker-cloud` CLI. -6. Click **Create**. - - ![Create repository page](images/create-repository.png) - -### Repositories for Organizations - -Only members of an organization's `Owners` team can create new repositories for -the organization. Members of `Owners` can also change the organization's billing -information, and link the organization to a source code provider to set up -automated builds. - -A member of the `Owners` team must also set up the repository's access -permissions so that other teams within the organization can use it. To learn -more, see the [organizations and teams documentation](../orgs.md#set-team-permissions). - -## Edit an existing repository in Docker Cloud - -You can edit repositories in Docker Cloud to change the description and build configuration. - -From the **General** page, you can edit the repository's short description, or click to edit the version of the ReadMe displayed on the repository page. - -> **Note**: Edits to the Docker Cloud **ReadMe** are not reflected in the source code linked to a repository. - -To run a build, or to set up or change automated build settings, click the **Builds** tab, and click **Configure Automated Builds**. See the documentation on [configuring automated build settings](automated-build.md#configure-automated-build-settings) for more -information. - -## Change repository privacy settings - -Repositories in Docker Cloud can be either public or private. Public -repositories are visible from the Docker Store's Community Content section, and -can also be searched for from Docker Cloud's **Create Service** wizard. Private -repositories are only visible to the user account that created it (unless it -belongs to an Organization, see below). - -> **Note**: These _privacy_ settings are separate from the [repository _access_ permissions](../orgs.md#change-team-permissions-for-an-individual-repository) available for repositories shared among members of an [organization](../orgs.md). - -If a private repository belongs to an [Organization](../orgs.md), members of the -`Owners` team configure access. Only members of the `Owners` team can change an -organization's repository privacy settings. - -Each Docker Cloud account comes with one free private repository. Additional -private repositories are available for subscribers on paid plans. - -To change a repository's privacy settings: - -1. Navigate to the repository in Docker Cloud. -2. Click the **Settings** tab. -3. Click the **Make public** or **Make private** button. -4. In the dialog that appears, enter the name of the repository to confirm the change. -5. Click the button to save the change. - -## Delete a repository - -When you delete a repository in Docker Cloud, all of the images in that -repository are also deleted. - -If automated builds are configured for the repository, the build rules and -settings are deleted along with any Docker Security Scan results. However, this -does not affect the code in the linked source code repository, and does not -remove the source code provider link. - -If you are running a service from deleted repository , the service continues -to run, but cannot be scaled up or redeployed. If any builds use the Docker -`FROM` directive and reference a deleted repository, those builds fail. - -To delete a repository: - -1. Navigate to the repository, and click the **Settings** tab. -2. Click **Delete**. -3. Enter the name of the repository to confirm deletion, and click **Delete**. - -External (third-party) repositories cannot be deleted from within Docker Cloud, -however you can remove a link to them using the same process for a repository in -Docker Cloud. The link is removed, but images in the external repository are not -deleted. - -> **Note**: If the repository to be deleted or removed belongs to an [Organization](../orgs.md), only members of the `Owners` team can delete it. - - -## Link to a repository from a third party registry - -You can link to repositories hosted on a third party registry. This allows you -to deploy images from the third party registry to nodes in Docker Cloud, and -also allows you to enable automated builds which push built images back to the -registry. - -> **Note**: To link to a repository that you want to share with an organization, contact a member of the organization's `Owners` team. Only the Owners team can import new external registry repositories for an organization. - -1. Click **Repositories** in the side menu. - -2. Click the down arrow menu next to the **Create** button. - -3. Select **Import**. - -4. Enter the name of the repository that you want to add. - - For example, `registry.com/namespace/reponame` where `registry.com` is the - hostname of the registry. - ![Import repository popup](images/third-party-images-modal.png) - -5. Enter credentials for the registry. - - > **Note**: These credentials must have **push** permission to push - built images back to the repository. If you provide **read-only** - credentials, you can run automated tests and deploy from the - repository to your nodes, but you cannot push built images to - it. - -6. Click **Import**. - -7. Confirm that the repository on the third-party registry now appears in your **Repositories** dropdown list. - -## What's next? - -Once you create or link to a repository in Docker Cloud, you can set up [automated testing](automated-testing.md) and [automated builds](automated-build.md). diff --git a/docker-cloud/cloud-swarm/connect-to-swarm.md b/docker-cloud/cloud-swarm/connect-to-swarm.md deleted file mode 100644 index 07641d3886..0000000000 --- a/docker-cloud/cloud-swarm/connect-to-swarm.md +++ /dev/null @@ -1,170 +0,0 @@ ---- -previewflag: cloud-swarm -description: how to register and unregister swarms in Docker Cloud -keywords: swarm mode, swarms, orchestration Cloud, fleet management -title: Connect to a swarm through Docker Cloud ---- - -Docker Cloud allows you to connect your local Docker Engine to any swarm you -have access to in Docker Cloud. There are a couple of different ways to do this, -depending on how you are running Docker on your local system: - -- [Connect to a swarm with a Docker Cloud generated run command](#connect-to-a-swarm-with-a-docker-cloud-generated-run-command) -- [Use Docker for Mac or Docker for Windows (Edge) to connect to swarms](#use-docker-for-mac-or-windows-edge-to-connect-to-swarms) - -## Connect to a swarm with a Docker Cloud generated run command - -On platforms other than Docker for Mac or Docker for Windows (Edge channel), you -can connect to a swarm manually at the command line by running a proxy container -in your local Docker instance, which connects to a manager node on the target -swarm. - -1. Log in to Docker Cloud in your web browser. -2. Click **Swarms** in the top navigation, and click the name of the swarm you want to connect to. -3. Copy the command provided in the dialog that appears. - - ![Connect to swarm popup](images/swarm-connect.png) - -4. In a terminal window connected to your local Docker Engine, paste the command, and press **Enter**. - - You are prompted for your Docker ID and password, then the local Docker Engine downloads a containerized Docker Cloud client tool, and connects to the swarm. - - ``` - $ docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST dockercloud/client gordon/vote-swarm - Use your Docker ID credentials to authenticate: - Username: gordon - Password: - - => You can now start using the swarm gordon/vote-swarm by executing: - export DOCKER_HOST=tcp://127.0.0.1:32770 -``` - -5. To complete the connection process, run the `export DOCKER_HOST` command as provided in the output of the previous command. This connects your local shell to the client proxy. - - Be sure to include the given client connection port in the URL. For our example, the command is: `export DOCKER_HOST=tcp://127.0.0.1:32770`. - - (If you are connecting to your first swarm, the _command:port_ is likely to be `export DOCKER_HOST=tcp://127.0.0.1:32768`.) - -6. Now, you can run `docker node ls` to verify that the swarm is running. - - Here is an example of `docker node ls` output for a swarm running one manager and two workers on **Amazon Web Services**. - - ``` - $ docker node ls - ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS - dhug6p7arwrm3a9j62zh0a0hf ip-172-31-23-167.us-west-1.compute.internal Ready Active - xmbxtffkrzaveqhyuouj0rxso ip-172-31-4-109.us-west-1.compute.internal Ready Active - yha4q9bleg80kvbn9tqgxd69g * ip-172-31-24-61.us-west-1.compute.internal Ready Active Leader - ``` - - Here is an example of `docker node ls` output for a swarm running one manager and two workers on **Microsoft Azure Cloud Services**. - - ``` - $ docker node ls - ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS - 6uotpiv8vyxsjzdtux13nkvj4 swarm-worker000001 Ready Active - qmvk4swo9rdv1viu9t88dw0t3 swarm-worker000000 Ready Active - w7kgzzdkka0k2svssz1dk1fzw * swarm-manager000000 Ready Active Leader - ``` - - From this point on, you can use the - [CLI commands](/engine/swarm/index.md#swarm-mode-cli-commands) - to manage your cloud-hosted [swarm mode](/engine/swarm/) just as you - would a local swarm. - -7. Now that your swarm is set up, try out the example to [deploy a service to the swarm](/engine/swarm/swarm-tutorial/deploy-service/), -and other subsequent tasks in the Swarm getting started tutorial. - -### Switch between your swarm and Docker hosts in the same shell - -To switch to Docker hosts: - -* If you are running Docker for Mac or Docker for Windows, and want to -connect to the Docker Engine for those apps, run `docker-machine env -u` -as a preview, then run the unset command: `eval $(docker-machine env -u)`. -For example: - - ``` - $ docker-machine env -u - unset DOCKER_TLS_VERIFY - unset DOCKER_HOST - unset DOCKER_CERT_PATH - unset DOCKER_MACHINE_NAME - # Run this command to configure your shell: - # eval $(docker-machine env -u) - ``` - -* If you are using Docker Machine, and want to switch to one of your local VMs, be sure to unset `DOCKER_TLS_VERIFY`. Best practice is similar to the previous step. Run `docker-machine env -u` as a preview, then run the unset command: `eval $(docker-machine env -u)`. Follow this with `docker-machine ls` to view your current machines, then connect to the one you want with `docker-machine env my-local-machine` and run the given `eval` command. For example: - - ``` - $ docker-machine env my-local-machine - export DOCKER_TLS_VERIFY="1" - export DOCKER_HOST="tcp://192.168.99.100:2376" - export DOCKER_CERT_PATH="/Users//.docker/machine/machines/my-local-machine" - export DOCKER_MACHINE_NAME="my-local-machine" - # Run this command to configure your shell: - # eval $(docker-machine env my-local-machine) - ``` - -To switch back to the deployed swarm, re-run the `export DOCKER_HOST` command with the connection port for the swarm you want to work with. (For example, `export DOCKER_HOST=tcp://127.0.0.1:32770`) - -To learn more, see [Unset environment variables in the current shell](/machine/get-started/#unset-environment-variables-in-the-current-shell). - -## Use Docker for Mac or Windows (Edge) to connect to swarms - -On Docker for Mac and Docker for Windows current Edge releases, -you can access your Docker Cloud account and connect directly to your swarms through those Docker desktop application menus. - -* See [Docker Cloud (Edge feature) in Docker for Mac topics](/docker-for-mac/#docker-cloud-edge-feature) - -* See [Docker Cloud (Edge feature) in Docker for Windows topics](/docker-for-windows/#docker-cloud-edge-feature) - -> **Tip**: This is different from using Docker for Mac or Windows with -Docker Machine as described in previous examples. Here, we are -by-passing Docker Machine, and using the desktop Moby VM directly, so -there is no need to manually set shell environment variables. - -This works the same way on both Docker for Mac and Docker for Windows. - -Here is an example, showing the Docker for Mac UI. - -1. Make sure you are logged in to your Docker Cloud account on the desktop app. - - ![Docker for Mac Cloud login](images/d4mac-cloud-login.png) - -2. Choose the swarm you want from the menu. - - ![Docker for Mac Cloud login](images/d4mac-swarm-connect.png) - -3. A new terminal window opens and connects to the swarm you chose. The swarm name is shown at the prompt. For this example, we connected to `vote-swarm`. - - ```shell - [vote-swarm] ~ - ``` - -4. Now, you can run `docker node ls` to verify that the swarm is running. - - ```shell - [vote-swarm] ~ $ docker node ls - ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS - 7ex8inrg8xzgonaunwp35zxfl ip-172-31-6-204.us-west-1.compute.internal Ready Active - ec3kxibdxqhgw5aele7x853er * ip-172-31-0-178.us-west-1.compute.internal Ready Active Leader - z4ngrierv27wdm6oy0z3t9r1z ip-172-31-31-240.us-west-1.compute.internal Ready Active - ``` - -## Reconnect a swarm - -If you accidentally unregister a swarm from Docker Cloud, or decide that you -want to re-register the swarm after it has been removed, you can -[re-register it](register-swarms.md#register-a-swarm) using the same -process as a normal registration. If the swarm is registered to -an organization, its access permissions were deleted when it was -unregistered, and must be recreated. - -> **Note**: You cannot register a new or different swarm under the name of a -swarm that was unregistered. To re-register a swarm, it must have the same swarm -ID as it did when previously registered. - -## Where to go next - -Learn how to [create a new swarm in Docker Cloud](create-cloud-swarm.md). diff --git a/docker-cloud/cloud-swarm/create-cloud-swarm-aws.md b/docker-cloud/cloud-swarm/create-cloud-swarm-aws.md deleted file mode 100644 index 02ef330499..0000000000 --- a/docker-cloud/cloud-swarm/create-cloud-swarm-aws.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -previewflag: cloud-swarm -description: Create new swarms on AWS with Docker Cloud -keywords: swarm mode, swarms, create swarm, Cloud, AWS -title: Create a new swarm on Amazon Web Services in Docker Cloud ---- - -{% include content/cloud-swarm-overview.md %} - -## Link your service provider to Docker Cloud - -To create a swarm, you need to give Docker Cloud permission to deploy swarm -nodes on your behalf in your cloud services provider account. - -If you haven't yet linked Docker Cloud to AWS, follow the steps in [Link Amazon Web Services to Docker Cloud](link-aws-swarm.md). Once it's -linked, it shows up on the **Swarms -> Create** page as a connected service -provider. - -![](images/aws-creds-cloud.png) - -## Create a swarm - -1. If necessary, log in to Docker Cloud and switch to Swarm Mode - -2. Click **Swarms** in the top navigation, then click **Create**. - - Alternatively, you can select **+ -> Swarm** from the top navigation to get to the same page. - -3. Enter a name for the new swarm. - - Your Docker ID is pre-populated. In the example, our swarm name - is "vote-swarm". - - ![](images/aws-create-swarm-1-name.png) - - >**Tip:** For Docker Cloud, use all lower case letters for swarm names. No spaces, capitalized letters, or special characters other than `.`, `_`, or `-` are allowed. AWS does not accept underscores in the name `_`. - -4. Select Amazon Web Services as the service provider and select a channel (`Stable` or `Edge`) from the drop-down menu. - - You can learn more about **stable** and **edge** channels in the [Install Docker overview](/install/) and the [Docker CE Edge](/edge/) topics. - - In this example, we use the `Stable` channel. - - ![](images/aws-create-swarm-0.png) - -5. Select a **Region** from the drop-down menu. - - > **Tip:** The SSH keys available to you in the next steps are - filtered by the region you select here. Make sure that you have - appropriate SSH keys available on the region you select. - - Optionally, click **Region Advanced Settings** to configure a - [Virtual Private Cloud(VPC)](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Introduction.html) on which to run this swarm. - - ![](images/aws-create-swarm-3-region.png) - - For guidance on setting up a VPC, see [Recommended VPC and subnet setup](/docker-for-aws/faqs/#can-i-use-my-existing-vpc) in the Docker for AWS topics. - -6. Choose how many swarm managers and swarm worker nodes to deploy. - - Here, we create one manager and two worker nodes. (This maps nicely to the [Swarm tutorial setup](/engine/swarm/swarm-tutorial/index.md) and the [voting app sample in Docker Labs](https://github.com/docker/labs/blob/master/beginner/chapters/votingapp.md).) - - ![](images/cloud-create-swarm-4-size.png) - -7. Configure swarm properties. - - ![](images/aws-create-swarm-5-properties.png) - - * Select a public SSH key for Docker Cloud to use to connect to the - nodes on AWS. Public keys from the [key pairs you configured on AWS](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) are provided in the drop-down menu. Only keys associated with the - Region you selected (in step 5) are shown. - - * Choose whether to provide daily resource cleanup. - - Enabling this option helps to avoid charges for resources that you are no longer using. (See also, topics on [resource cleanup](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CleaningUp.html) in the AWS documentation.) - - * Enable or disable Cloudwatch for container logging. - - When enabled, Docker sends container logs to [Amazon Cloudwatch](https://aws.amazon.com/cloudwatch/), as described in the Docker for AWS topic on [Logging](/docker-for-aws/index.md#logging). - -7. Select the instance sizes for the managers, and for the workers. - - ![](images/aws-create-swarm-6-manager-worker.png) - - In general, the larger your swarm, the larger the instance sizes you should use. See the Docker for AWS topics for more on [resource configuration](/docker-for-aws/index.md#configuration). - -9. Click **Create**. - - Docker for AWS bootstraps all of the recommended infrastructure to - start using Docker on AWS automatically. You don't need to worry - about rolling your own instances, security groups, or load balancers - when using Docker for AWS. (To learn more, see - [Why Docker for AWS](/docker-for-aws/why.md).) - - This takes a few minutes. When the swarm is ready, its indicator on the Swarms page shows steady green. - - ![](images/aws-create-swarm-7-list.png) - - > **Note**: At this time, you cannot add nodes to a swarm from - within Docker Cloud. To add new nodes to an existing swarm, - log in to your AWS account, and add nodes manually. (You can - unregister or dissolve swarms directly from Docker Cloud.) - -## Where to go next - -Learn how to [connect to a swarm through Docker Cloud](connect-to-swarm.md). - -Learn how to [register existing swarms](register-swarms.md). - -You can get an overivew of topics on [swarms in Docker Cloud](index.md). - -To find out more about Docker swarm in general, see the Docker engine -[Swarm Mode overview](/engine/swarm/). diff --git a/docker-cloud/cloud-swarm/create-cloud-swarm-azure.md b/docker-cloud/cloud-swarm/create-cloud-swarm-azure.md deleted file mode 100644 index fc54bfd44c..0000000000 --- a/docker-cloud/cloud-swarm/create-cloud-swarm-azure.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -previewflag: cloud-swarm -description: Create new swarms on Azure with Docker Cloud -keywords: swarm mode, swarms, create swarm, Cloud, Azure -title: Create a new swarm on Microsoft Azure in Docker Cloud ---- - -[![Deploying Swarms on Microsoft Azure with Docker Cloud](images/video-azure-docker-cloud.png)](https://www.youtube.com/watch?v=LlpyiGAVBVg "Deploying Swarms on Microsoft Azure with Docker Cloud"){:target="_blank" class="_"} - -{% include content/cloud-swarm-overview.md %} - -## Link Docker Cloud to your service provider - -To create a swarm, you need to give Docker Cloud permission to deploy swarm -nodes on your behalf in your cloud services provider account. - -If you haven't yet linked Docker Cloud to Azure, follow the steps in [Link Microsoft Azure Cloud Services to Docker Cloud](link-azure-swarm/). Once it's -linked, it shows up on the **Swarms -> Create** page as a connected service -provider. - -![](images/azure-creds-cloud.png) - -> **Note:** If you are using a Microsoft Azure Visual Studio MSDN -subscription, you need to enable _programmatic deployments_ on the Docker CE -VM Azure Marketplace item. See the Microsoft Azure blog post on [Working with -Marketplace Images on Azure Resource -Manager](https://azure.microsoft.com/en-us/blog/working-with-marketplace-images-on-azure-resource-manager/){: target="_blank" class="_"} for instructions on how to do this. - -## Create a swarm - -1. If necessary, log in to Docker Cloud and switch to Swarm Mode - -2. Click **Swarms** in the top navigation, then click **Create**. - - Alternatively, you can select **+ -> Swarm** from the top navigation to - get to the same page. - -3. Enter a name for the new swarm. - - Your Docker ID is pre-populated. In the example, our swarm name - is "vote_swarm". - - ![](images/azure-create-swarm-1-name.png) - - >**Tip:** Use all lower case letters for swarm names. No spaces, capitalized letters, or special characters other than `.`, `_`, or `-` are allowed. - -4. Select Microsoft Azure as the service provider, select a channel (`Stable` or `Edge`) from the drop-down menu, provide an App name, and select the Azure -Subscription you want to use. - - You can learn more about **stable** and **edge** channels in the [Install Docker overview](install/) and the [Docker CE Edge](/edge/) topics. - - In this example, we use the `Stable` channel, our app name is "voting_app" and we've selected a Pay-As-You-Go subscription. - - ![](images/azure-create-swarm-0.png) - -5. Make sure that **Create new resource group** is selected, provide a name for the group, and select a location from the drop-down menu. - - Our example app is called `swarm_vote_resources`, and it is located in West US. - - ![](images/azure-create-swarm-3-resource-group.png) - - >**Tip:** Be sure to create a new resource group for a swarm. If you choose to use an existing group, the swarm fails as Azure does not currently support this. - -6. Choose how many swarm managers and worker nodes to deploy. - - Here, we create one manager and two worker nodes. (This maps nicely to the [Swarm tutorial setup](/engine/swarm/swarm-tutorial/index.md) and the [voting app sample in Docker Labs](https://github.com/docker/labs/blob/master/beginner/chapters/votingapp.md).) - - ![](images/cloud-create-swarm-4-size.png) - -8. Configure swarm properties, SSH key and resource cleanup. - - Copy-paste the public [SSH key](ssh-key-setup.md) you want to use to connect to the nodes. (Provide the one for which you have the private key locally.) - - ![](images/azure-create-swarm-5-properties.png) - - * To list existing SSH keys: `ls -al ~/.ssh` - - * To copy the public SSH key to your clipboard: `pbcopy < ~/.ssh/id_rsa.pub` - - Choose whether to provide daily resource cleanup. (Enabling this - option helps avoid charges for resources that you are no longer - using.) - -7. Select the machine sizes for the managers, and for the workers. - - ![](images/azure-create-swarm-6-manager-worker.png) - - The larger your swarm, the larger the machine size you should use. - To learn more about resource setup, see [configuration options](/docker-for-azure/index.md#configuration) in the Docker - for Azure topics. - - You can find Microsoft Azure Linux Virtual Machine pricing and options [here](https://azure.microsoft.com/en-us/pricing/details/virtual-machines/linux/). - -9. Click **Create**. - - Docker for Azure bootstraps all of the recommended infrastructure to start - using Docker on Azure automatically. You don’t need to worry about rolling - your own instances, security groups, or load balancers when using Docker for - Azure. (To learn more, see [Why Docker for Azure](/docker-for-azure/why.md).) - - This takes a few minutes. When the swarm is ready, its indicator on the Swarms page shows steady green. - - ![](images/azure-create-swarm-7-list.png) - - > **Note**: At this time, you cannot add nodes to a swarm from - within Docker Cloud. To add new nodes to an existing swarm, - log in to your Azure account, and add nodes manually. (You can - unregister or dissolve swarms directly from Docker Cloud.) - -## Where to go next - -Learn how to [connect to a swarm through Docker Cloud](connect-to-swarm.md). - -Learn how to [register existing swarms](register-swarms.md). - -You can get an overivew of topics on [swarms in Docker Cloud](index.md). - -To find out more about Docker swarm in general, see the Docker engine -[Swarm Mode overview](/engine/swarm/). diff --git a/docker-cloud/cloud-swarm/images/aws-arn-wizard.png b/docker-cloud/cloud-swarm/images/aws-arn-wizard.png deleted file mode 100644 index 657107207b..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-arn-wizard.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-create-swarm-0.png b/docker-cloud/cloud-swarm/images/aws-create-swarm-0.png deleted file mode 100644 index caa0f97b35..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-create-swarm-0.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-create-swarm-1-name.png b/docker-cloud/cloud-swarm/images/aws-create-swarm-1-name.png deleted file mode 100644 index 7dbadf9177..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-create-swarm-1-name.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-create-swarm-3-region-x.png b/docker-cloud/cloud-swarm/images/aws-create-swarm-3-region-x.png deleted file mode 100644 index 74fba134e9..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-create-swarm-3-region-x.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-create-swarm-3-region.png b/docker-cloud/cloud-swarm/images/aws-create-swarm-3-region.png deleted file mode 100644 index 099941b340..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-create-swarm-3-region.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-create-swarm-4-size.png b/docker-cloud/cloud-swarm/images/aws-create-swarm-4-size.png deleted file mode 100644 index 3780f762d4..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-create-swarm-4-size.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-create-swarm-5-properties.png b/docker-cloud/cloud-swarm/images/aws-create-swarm-5-properties.png deleted file mode 100644 index 97c5c172dc..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-create-swarm-5-properties.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-create-swarm-6-manager-worker.png b/docker-cloud/cloud-swarm/images/aws-create-swarm-6-manager-worker.png deleted file mode 100644 index 817f3276cb..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-create-swarm-6-manager-worker.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-create-swarm-7-list-x.png b/docker-cloud/cloud-swarm/images/aws-create-swarm-7-list-x.png deleted file mode 100644 index 9f99aa6e73..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-create-swarm-7-list-x.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-create-swarm-7-list.png b/docker-cloud/cloud-swarm/images/aws-create-swarm-7-list.png deleted file mode 100644 index 59904fe9be..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-create-swarm-7-list.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-create-swarm-vpc.png b/docker-cloud/cloud-swarm/images/aws-create-swarm-vpc.png deleted file mode 100644 index 18b7d247f6..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-create-swarm-vpc.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-creds-cloud.png b/docker-cloud/cloud-swarm/images/aws-creds-cloud.png deleted file mode 100644 index 3c111375fa..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-creds-cloud.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-patch-snip-it.png b/docker-cloud/cloud-swarm/images/aws-patch-snip-it.png deleted file mode 100644 index 9125315f3c..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-patch-snip-it.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-1.png b/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-1.png deleted file mode 100644 index 0e742dab51..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-1.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-2.png b/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-2.png deleted file mode 100644 index 24eccfb864..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-2.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-3.png b/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-3.png deleted file mode 100644 index 6030be5517..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-3.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-4-policy.png b/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-4-policy.png deleted file mode 100644 index 01b8c3b92d..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-4-policy.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-orig.png b/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-orig.png deleted file mode 100644 index fba6ee61c8..0000000000 Binary files a/docker-cloud/cloud-swarm/images/aws-swarm-iam-role-orig.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-create-swarm-0.png b/docker-cloud/cloud-swarm/images/azure-create-swarm-0.png deleted file mode 100644 index 4167302eff..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-create-swarm-0.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-create-swarm-1-name.png b/docker-cloud/cloud-swarm/images/azure-create-swarm-1-name.png deleted file mode 100644 index 4cc613ae47..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-create-swarm-1-name.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-create-swarm-2-appname.png b/docker-cloud/cloud-swarm/images/azure-create-swarm-2-appname.png deleted file mode 100644 index a5f715815f..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-create-swarm-2-appname.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-create-swarm-3-resource-group.png b/docker-cloud/cloud-swarm/images/azure-create-swarm-3-resource-group.png deleted file mode 100644 index 0ebfcc402e..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-create-swarm-3-resource-group.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-create-swarm-5-properties.png b/docker-cloud/cloud-swarm/images/azure-create-swarm-5-properties.png deleted file mode 100644 index 759497d077..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-create-swarm-5-properties.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-create-swarm-6-manager-worker.png b/docker-cloud/cloud-swarm/images/azure-create-swarm-6-manager-worker.png deleted file mode 100644 index 0711479e83..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-create-swarm-6-manager-worker.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-create-swarm-7-list-x.png b/docker-cloud/cloud-swarm/images/azure-create-swarm-7-list-x.png deleted file mode 100644 index fac47de79c..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-create-swarm-7-list-x.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-create-swarm-7-list.png b/docker-cloud/cloud-swarm/images/azure-create-swarm-7-list.png deleted file mode 100644 index 9453722d2f..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-create-swarm-7-list.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-create-swarm.png b/docker-cloud/cloud-swarm/images/azure-create-swarm.png deleted file mode 100644 index 86baf90e31..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-create-swarm.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-creds-cloud.png b/docker-cloud/cloud-swarm/images/azure-creds-cloud.png deleted file mode 100644 index a7766c2278..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-creds-cloud.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-docker-app-enabled.png b/docker-cloud/cloud-swarm/images/azure-docker-app-enabled.png deleted file mode 100644 index 11c908e37c..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-docker-app-enabled.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-eula-1-marketplace.png b/docker-cloud/cloud-swarm/images/azure-eula-1-marketplace.png deleted file mode 100644 index 3089b329a6..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-eula-1-marketplace.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-eula-2-deploy-vm.png b/docker-cloud/cloud-swarm/images/azure-eula-2-deploy-vm.png deleted file mode 100644 index 0c667eacb4..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-eula-2-deploy-vm.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-eula-3-enable-subscription.png b/docker-cloud/cloud-swarm/images/azure-eula-3-enable-subscription.png deleted file mode 100644 index 5cff303299..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-eula-3-enable-subscription.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-eula-4-verify.png b/docker-cloud/cloud-swarm/images/azure-eula-4-verify.png deleted file mode 100644 index ddb9d37e24..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-eula-4-verify.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-extra-create-swarm-1.png b/docker-cloud/cloud-swarm/images/azure-extra-create-swarm-1.png deleted file mode 100644 index ff82d3e423..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-extra-create-swarm-1.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-extra-create-swarm-2-details.png b/docker-cloud/cloud-swarm/images/azure-extra-create-swarm-2-details.png deleted file mode 100644 index 7278b11d6e..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-extra-create-swarm-2-details.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-extra-create-swarm-3-properties.png b/docker-cloud/cloud-swarm/images/azure-extra-create-swarm-3-properties.png deleted file mode 100644 index 7efb06a586..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-extra-create-swarm-3-properties.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-global-admin-permissions.png b/docker-cloud/cloud-swarm/images/azure-global-admin-permissions.png deleted file mode 100644 index 9f5c061ba5..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-global-admin-permissions.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-global-admin-plugin.png b/docker-cloud/cloud-swarm/images/azure-global-admin-plugin.png deleted file mode 100644 index 327736686d..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-global-admin-plugin.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-id-wizard.png b/docker-cloud/cloud-swarm/images/azure-id-wizard.png deleted file mode 100644 index eecde012f1..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-id-wizard.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-permissions.png b/docker-cloud/cloud-swarm/images/azure-permissions.png deleted file mode 100644 index e45ec29554..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-permissions.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/azure-subscription-id.png b/docker-cloud/cloud-swarm/images/azure-subscription-id.png deleted file mode 100644 index bac8c075f1..0000000000 Binary files a/docker-cloud/cloud-swarm/images/azure-subscription-id.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/cloud-create-swarm-4-size.png b/docker-cloud/cloud-swarm/images/cloud-create-swarm-4-size.png deleted file mode 100644 index 3ee7159da8..0000000000 Binary files a/docker-cloud/cloud-swarm/images/cloud-create-swarm-4-size.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/cloud-swarm-home.png b/docker-cloud/cloud-swarm/images/cloud-swarm-home.png deleted file mode 100644 index 9a79204792..0000000000 Binary files a/docker-cloud/cloud-swarm/images/cloud-swarm-home.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/cloud-swarms.png b/docker-cloud/cloud-swarm/images/cloud-swarms.png deleted file mode 100644 index 753922a0d0..0000000000 Binary files a/docker-cloud/cloud-swarm/images/cloud-swarms.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/d4mac-cloud-login.png b/docker-cloud/cloud-swarm/images/d4mac-cloud-login.png deleted file mode 100644 index 911d86435b..0000000000 Binary files a/docker-cloud/cloud-swarm/images/d4mac-cloud-login.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/d4mac-swarm-connect.png b/docker-cloud/cloud-swarm/images/d4mac-swarm-connect.png deleted file mode 100644 index b8241b075d..0000000000 Binary files a/docker-cloud/cloud-swarm/images/d4mac-swarm-connect.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/d4win-swarm-connect.png b/docker-cloud/cloud-swarm/images/d4win-swarm-connect.png deleted file mode 100644 index 323f7a5f5c..0000000000 Binary files a/docker-cloud/cloud-swarm/images/d4win-swarm-connect.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/d4win-swarm-connected-shell.png b/docker-cloud/cloud-swarm/images/d4win-swarm-connected-shell.png deleted file mode 100644 index 154ba80e0e..0000000000 Binary files a/docker-cloud/cloud-swarm/images/d4win-swarm-connected-shell.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/swarm-connect.png b/docker-cloud/cloud-swarm/images/swarm-connect.png deleted file mode 100644 index cace323c98..0000000000 Binary files a/docker-cloud/cloud-swarm/images/swarm-connect.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/swarm-toggle.png b/docker-cloud/cloud-swarm/images/swarm-toggle.png deleted file mode 100644 index afe2c03e6f..0000000000 Binary files a/docker-cloud/cloud-swarm/images/swarm-toggle.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/images/video-azure-docker-cloud.png b/docker-cloud/cloud-swarm/images/video-azure-docker-cloud.png deleted file mode 100644 index 17c7d8cc13..0000000000 Binary files a/docker-cloud/cloud-swarm/images/video-azure-docker-cloud.png and /dev/null differ diff --git a/docker-cloud/cloud-swarm/index.md b/docker-cloud/cloud-swarm/index.md deleted file mode 100644 index 16404faa86..0000000000 --- a/docker-cloud/cloud-swarm/index.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -previewflag: cloud-swarm -description: Work with swarms in Docker Cloud -keywords: swarm mode, swarms, orchestration Cloud, fleet management -redirect_from: -- /docker-cloud/cloud-swarm/create-cloud-swarm/ -title: Swarms in Docker Cloud (Beta) -notoc: true ---- - -Docker Cloud now allows you to connect to clusters of Docker Engines in [swarm mode](/engine/swarm/). - -With Beta Swarm Mode in Docker Cloud, you can provision swarms to popular cloud -providers, or register existing swarms to Docker Cloud. Use your Docker ID to -authenticate and securely access personal or team swarms. - -* [Using Swarm Mode with Docker Cloud](using-swarm-mode.md) - -* [Swarm Mode and organizations](using-swarm-mode.md#swarm-mode-and-organizations) - -* [Register existing swarms](register-swarms.md) - -* [Create a new swarm on AWS in Docker Cloud](create-cloud-swarm-aws.md) - -* [Create a new swarm on Microsoft Azure in Docker Cloud](create-cloud-swarm-azure.md) - -* [Connect to a swarm through Docker Cloud](connect-to-swarm.md) - -* [Link Amazon Web Services to Docker Cloud](link-aws-swarm.md) - -* [Link Microsoft Azure Cloud Services to Docker Cloud](link-azure-swarm.md) - -* [Set up SSH keys](ssh-key-setup.md) diff --git a/docker-cloud/cloud-swarm/link-aws-swarm.md b/docker-cloud/cloud-swarm/link-aws-swarm.md deleted file mode 100644 index 410001fdd2..0000000000 --- a/docker-cloud/cloud-swarm/link-aws-swarm.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -previewflag: cloud-swarm -description: Link your Amazon Web Services account -keywords: AWS, Cloud, link -title: Link Amazon Web Services to Docker Cloud ---- - -You can create a role with AWS IAM (Identity and Access Management) so that -Docker Cloud can provision and manage swarms on your behalf. - -> **Note**: Your AWS account must support EC2-VPC to deploy swarms, and -you must also have an [SSH key in each AWS region](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) -you deploy swarms in. - -If you used Docker Cloud with AWS to deploy classic Node Clusters, you can add -the new policy to your existing role by following the instructions -[below](#attach-a-policy-for-legacy-aws-links). - -## Create a dockercloud-swarm-role role with an embedded policy - -1. Go to the AWS IAM Role creation panel at https://console.aws.amazon.com/iam/home#roles. Click **Create role**. - -2. Select **Another AWS account** to allow your Docker Cloud account to perform actions in this AWS account. - - ![link aws accounts](images/aws-swarm-iam-role-1.png) - -3. In the **Account ID** field, enter the ID for the Docker Cloud service: `689684103426`. - -4. Select **Require external ID (Best practice when a third party will assume this role)**. - - * In the **External ID** field, enter the namespace - to link. - - This is either your Docker Cloud username, - or if you are using Organizations in Docker Cloud, - the organization name. Failure to use the correct - name results in the following error - message: `Invalid AWS credentials or insufficient - EC2 permissions` when attempting to link your - Docker account to your AWS account. - - * Leave **Require MFA** unchecked. - - Click **Next: Permissions**. - -5. On the next screen, do not select a policy (you add the policy in a later step). - - Click **Next: Review**. - - ![review settings](images/aws-swarm-iam-role-3.png) - -6. Give the new role a name, such as `dockercloud-swarm-role`. - - > **Note**: You must use one role per Docker Cloud account - namespace, so if you use a single AWS account for - multiple Docker Cloud accounts, you should add an - identifying namespace to the end of the name. For example, - you might have `dockercloud-swarm-role-moby` and - `dockercloud-swarm-role-teamawesome`. - -7. Click **Create Role**. - - AWS IAM creates the new role and returns you to the **Roles** list. - -8. Click the name of the role you just created to view its details. - -9. On the **Permissions** tab, click **+ Add an inline policy**. - -11. Choose the **JSON** tab. - -12. Copy and paste the policy document found in the [Docker for AWS page](/docker-for-aws/iam-permissions/). - - ![attach a policy](images/aws-swarm-iam-role-4-policy.png) - -13. Click **Review Policy**. The policy validator reports any syntax errors. - Give the policy a name like `dockercloud-swarm-policy` and an optional - description. - -14. Click **Create Policy** to save your work. - -15. Back on the role view, click into the new role to view details, and copy the full **Role ARN** string. - - The ARN string should look something like `arn:aws:iam::123456789123:role/dockercloud-swarm-role`. The next step requires the. - - ![Role summary showing Role ARN](images/aws-swarm-iam-role-2.png) - -Now skip down to the topic on how to -[Add your AWS account credentials to Docker Cloud](#add-your-aws-account-credentials-to-docker-cloud). - -## Attach a policy for legacy AWS links - -If you already have your AWS account connected to Docker Cloud and used the -legacy node cluster functionality you need to create and attach a new -policy, and re-link your account. - -1. Go to the AWS IAM Roles list at https://console.aws.amazon.com/iam/home#roles. - -2. Click your existing version of the `dockercloud-role`. - -3. On the **Permissions** tab, click **+ Add an inline policy**. - -5. On the next page, click **Custom Policy** and click **Select**. - -6. On the **Policy Editor** page that appears, give the policy a name like `dockercloud-swarm-policy`. - -7. In the **Policy Document** section, copy and paste the policy document found in the [Docker for AWS page](/docker-for-aws/iam-permissions/). - -8. Click **Validate Policy**. - -9. If the validation succeeds, click **Apply Policy**. - -10. Select and copy the **Role ARN** on the role screen. - It shouldn't have changed, but you need it to re-link your account. - -Because you edited the role's permissions, you need to re-link -to your account. Back in Docker Cloud, click the account menu and -select **Cloud Settings**, and in the **Service providers** section, -click the green plug icon to _unlink_ your AWS account. - -Then, follow the instructions below to re-link your account. - -## Add your AWS account credentials to Docker Cloud - -Once you've created the a `dockercloud-swarm-policy`, -added the `dockercloud-swarm-role` inline, and have the role's -Role ARN, go back to Docker Cloud to connect the account. - -1. In Docker Cloud, click the account menu at the upper right and select **Cloud settings**. -2. In the **Service providers** section, click the plug icon next to Amazon Web Services. - - ![Add AWS Credentials popup](images/aws-arn-wizard.png) - -3. Enter the full `Role ARN` for the role you just created. -4. Click **Save**. - - ![Service providers list, showing newly added AWS credentials](images/aws-creds-cloud.png) - -You are now ready to deploy a swarm! - -## Where to go next - -**Ready to create swarms on AWS?** See [Create a new swarm on Amazon Web Services in Docker Cloud](create-cloud-swarm-aws.md). - -You can get an overview of topics on [swarms in Docker Cloud](index.md). - -**Using Standard Mode to managing Docker nodes on AWS?** If you are -setting up nodes on AWS in [Standard Mode](/docker-cloud/standard/), -go back to [What's next in Standard Mode](/docker-cloud/infrastructure/link-aws.md##whats-next). diff --git a/docker-cloud/cloud-swarm/link-azure-swarm.md b/docker-cloud/cloud-swarm/link-azure-swarm.md deleted file mode 100644 index ab6c74a210..0000000000 --- a/docker-cloud/cloud-swarm/link-azure-swarm.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -previewflag: cloud-swarm -description: Link your Microsoft Azure account -keywords: Azure, Cloud, link -title: Link Microsoft Azure Cloud Services to Docker Cloud ---- - -You can link your [Microsoft Azure Cloud Services](https://portal.azure.com/) account so that Docker Cloud can provision and -manage swarms on your behalf. - -For this, you need an SSH key and your Azure subscription ID to authenticate Docker to your service provider. Also, you need to enable your Azure subscription on behalf of Docker Cloud. - -## Create or locate the SSH key you want to use - -When you are ready to create and deploy swarms, you must have an [SSH](`/engine/reference/glossary.md#ssh`) key to authenticate Docker Cloud to your Azure account. See the topic [Set up SSH keys](/docker-cloud/cloud-swarm/ssh-key-setup.md) to learn how to check for existing keys or set up a new one, and copy the public key. - -## Find your Azure subscription ID - -You also need your Azure Cloud Services subscription ID to provide to -Docker Cloud. There are a few ways to navigate to it on Azure. - -You can click a resource from the Dashboard and find the subscription ID under -"Essentials" on the resulting display. Alternatively, from the left menu, go to -**Billing -> Subscriptions -> Subscription ID** or simply click -**Subscriptions**, then click a subscription in the list to drill down. - -![Azure subscriptions page](images/azure-subscription-id.png) - -When you are ready to add your subscription ID to Docker Cloud, -copy it from your Azure Dashboard. - -## Add your Azure account credentials to Docker Cloud - -Go to Docker Cloud to connect the account. - -1. In Docker Cloud, click the account menu at the upper right and -select **Cloud settings**. - -2. In the **Service Providers** section, click the plug icon next to -Microsoft Azure. - - ![Enter Azure subscription ID popup](images/azure-id-wizard.png) - - >**Tip:** If you are a member of an Azure Organization, your - administrator must first link to Docker Cloud as described in - [Link an Azure Organization as Global Admin](#link-an-azure-organization-as-global-admin). - -3. Provide your subscription ID and click **Save**. - - This grants Docker Cloud access to your Microsoft Azure account, and links - the two accounts. Your Azure login credentials automatically populate - to Docker Cloud under **Service Providers -> Microsoft Azure**. - - ![Microsoft Azure entry in Service providers list](images/azure-creds-cloud.png) - -## Enable your Azure subscription for Docker Cloud - -You need to verify Microsoft Azure terms of use and manually enable your Azure subscription on behalf of Docker Cloud. You need do this only once, before you attempt to deploy a Docker Cloud Microsoft Azure swarm for the first time. - ->**Tip:** If your Azure subscription is not enabled first, the swarm deployment fails. The error shows up on your **Azure portal -> resource groups -> _ResourceGroupForYourSwarm_ -> deployments**. - -1. Go to the [Microsoft Azure Marketplace](https://portal.azure.com/#blade/Microsoft_Azure_Marketplace/GalleryFeaturedMenuItemBlade/selectedMenuItemId/home) and search for **Docker**, or specifically **Docker for Azure CE**. - - ![](images/azure-eula-1-marketplace.png) - -2. Select **Docker for Azure CE** and click the option on the lower right to deploy programmatically. - - ![](images/azure-eula-2-deploy-vm.png) - -3. Read the terms of use, click **Enable** for your subscription, and click **Save**. - - ![](images/azure-eula-3-enable-subscription.png) - -4. Verify that your subscription is enabled. - - Go to **Dashboard -> Subscriptions** to view details on your current subscriptions. Docker for Azure CE should be listed as enabled Programmatic deployment. - - ![](images/azure-eula-4-verify.png) - -You are now ready to deploy a swarm! - -## Link an Azure Organization as Global Admin - -For members of Azure Organizations, your gobal administrator first needs to link -their account and grant permissions to Docker Cloud for the organization as a -whole. Then, you can link your individual user account to Docker Cloud with your -subscription ID. - -The Global Admin steps are as follows: - -1. Go to [Microsoft Azure](https://portal.azure.com/), find your - Subscription ID for Global Admin rights (**Azure -> Billing -> - Subscriptions -> Subscriptions ID**), and copy the ID. - -2. On Docker Cloud, go to **Cloud Settings -> Service Providers**. - - ![](images/azure-global-admin-plugin.png) - -3. Click **Global Admin**, paste your Global Admin Subscription ID from -Azure into the field, and click **Save**. - - ![](images/azure-global-admin-permissions.png) - - Azure Organization members can now link their user accounts to - Docker Cloud per the individual user instructions above. - -## Where to go next - -**Ready to create swarms on Azure?** See [Create a new swarm on Microsoft Azure in Docker Cloud](create-cloud-swarm-azure.md). - -You need an SSH key to provide to Docker Cloud during the swarm create -process. If you haven't done so yet, check out how to [Set up SSH -keys](ssh-key-setup.md). - -You can get an overivew of topics on [swarms in Docker Cloud](index.md). - -**Using Standard Mode to managing Docker nodes on Azure?** If you are -setting up nodes on Azure in [Standard Mode](/docker-cloud/standard/), -go back to [What's next in Standard Mode](/docker-cloud/infrastructure/link-azure.md##whats-next). diff --git a/docker-cloud/cloud-swarm/register-swarms.md b/docker-cloud/cloud-swarm/register-swarms.md deleted file mode 100644 index 0597e58de0..0000000000 --- a/docker-cloud/cloud-swarm/register-swarms.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -previewflag: cloud-swarm -description: how to register and unregister swarms in Docker Cloud -keywords: register swarms, unregister swarms -title: Register existing swarms ---- - -With Beta Swarm Mode, you can register existing -swarms with Docker Cloud to easily -manage multiple swarms running anywhere. - -Before you begin, you need the following: - -- a Docker ID -- a Docker swarm composed of v1.13 (or later) Docker Engine nodes -- a terminal session connected to one of the swarm's manager nodes -- incoming port 2376 unblocked on that manager node - -> **Note**: The IP to the manager node for your swarm must be open and publicly accessible so that Docker Cloud can connect and run commands. - -## Register a swarm - -To register an existing swarm in Docker Cloud: - -1. Log in to Docker Cloud if necessary. -2. If necessary, click the **Swarm Mode** toggle to activate the Swarm Mode interface. -3. Click **Swarms** in the top navigation. -4. Click **Bring your own swarm**. -5. Select the whole command displayed in the dialog, and copy it to your clipboard. -6. In terminal or another shell, connect to the Docker Engine running in the swarm's manager node using SSH. -7. Paste the command you copied into the terminal session connected to the manager node. -8. When prompted, log in using your Docker ID and password. - - The registration process uses your Docker ID to determine which namespaces you have access to. Once you log in, the CLI lists these namespaces to help you with the next step. - -9. Enter a name, with a namespace before the name if needed, and press Enter. - - If you do not enter a name, the swarm is registered to your Docker ID account using the swarm ID, which is the long string displayed before the shell prompt. For example, the prompt might look like this: - - ```none - Enter a name for the new cluster [mydockerid/5rdshkgzn1sw016zimgckzx3j]: - ``` - - Enter a name at the prompt to prevent Docker Cloud from registering the swarm using the long swarm ID as the name. - - To register a swarm with an organization, prefix the new name with the organization name, for example `myorganization/myteamswarm`. - -The manager node pulls the `dockercloud/registration` container which creates a -global service called `dockercloud-server-proxy`. This service runs on _all_ of -the swarm's manager nodes. - -The swarm then appears in the **Swarms** screen in Docker Cloud. - -### Swarm Registration example - -```none -$ docker run -ti --rm -v /var/run/docker.sock:/var/run/docker.sock dockercloud/registration -Use your Docker ID credentials to authenticate: -Username: myusername -Password: - -Available namespaces: -* myorganization -* pacificocean -* sealife -Enter name for the new cluster [myusername/1btbwtge4xwjj0mjpdpr7jutn]: myusername/myswarm -Registering this Docker cluster with Docker Cloud... -Successfully registered the node as myswarm -You can now access this cluster using the following command in any Docker Engine: - docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST dockercloud/client myswarm -``` - -![List of swarms in Docker Cloud](images/cloud-swarms.png) - -## Swarm states in Docker Cloud - -Swarms that are registered in Docker Cloud appear in the Swarms list. Each line in the list shows the swarm's state. The states are: - -| State | Description | Actions available | -|:---------------|:--------------------------------------------------------|:---------------------------------| -| **DEPLOYING** | Docker Cloud is in the process of provisioning the swarm. | None | -| **DEPLOYED** | The swarm is running, connected, and sending heartbeat pings to Docker Cloud, and Cloud can contact it to run a health check. | All (Edit endpoint, remove) | -| **UNREACHABLE** | The swarm is sending heartbeat pings and Docker Cloud is receiving them, but Cloud cannot connect to the swarm. | Remove | -| **UNAVAILABLE** | Docker Cloud is not receiving heartbeats from the swarm. | Remove | -| **TERMINATING** | Docker Cloud is in the process of destroying this swarm. | None | -| **TERMINATED** | The swarm has been destroyed and is removed from the list in 5 minutes. | None | -| **REMOVED** | The swarm was unregistered from Docker Cloud but not destroyed. The swarm is removed from list in 5 minutes. | None | -| **FAILED** | Provisioning failed. | Remove | - -### Understanding and resolving problems - -* If a swarm is UNREACHABLE, it may be behind a firewall or NAT. - -* If a swarm is UNAVAILABLE check the swarm from your infrastructure provider. The manager node(s) may be unresponsive or the server proxy service might not be running. You can SSH into an UNAVAILABLE swarm. - -* Removing a swarm only removes the swarm from the interface in Docker Cloud, effectively - [unregistering](#unregister-a-swarm-from-docker-cloud) it. It does not - change the swarm itself or any processes running on the swarm. - -## Unregister a swarm from Docker Cloud - -Unregistering a swarm from Docker Cloud only removes the swarm from Docker -Cloud, deletes any access rights granted to teams, and disables proxy -connections. Unregistering does not stop the services, containers, or processes on the swarm, and it does not disband the swarm or terminate the nodes. - -To unregister a swarm from Docker Cloud: - -1. Log in to Docker Cloud if necessary. -2. Click **Swarms** in the top navigation. -3. Put your mouse cursor on the swarm you want to unregister. -4. Click the trash can icon that appears. -5. In the confirmation dialog that appears, click **Remove**. - -Docker Cloud marks the swarm as `REMOVED` and removes the swarm from the list in -the next few minutes. - -## Where to go next - -Learn how to [connect to a swarm through Docker Cloud](connect-to-swarm.md). diff --git a/docker-cloud/cloud-swarm/ssh-key-setup.md b/docker-cloud/cloud-swarm/ssh-key-setup.md deleted file mode 100644 index 116df1f5b5..0000000000 --- a/docker-cloud/cloud-swarm/ssh-key-setup.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -previewflag: cloud-swarm -description: How to set up SSH keys -keywords: Cloud, SSH keys, Azure, link -title: Set up SSH keys ---- - -You can link your Cloud and Service providers so that Docker Cloud can provision and manage swarms on your behalf. For this, you need an SSH key to authenticate Docker to your provider. - -## About SSH - -{% include content/ssh/ssh-overview.md %} - -## Check for existing SSH keys - -You may not need to generate a new SSH key if you have an existing key that you -want to reuse. - -{% include content/ssh/ssh-find-keys.md %} - -If you find an existing key you want to use, skip to the topic that describes -how to [copy your public key for use with Docker -Cloud](#copy-your-public-key-for-use-with-docker-cloud). - -Otherwise, [create a new SSH -key](#create-a-new-ssh-key-for-use-by-docker-cloud). - -## Create a new SSH key - -{% include content/ssh/ssh-gen-keys.md %} - -## Add your key to the ssh-agent - -{% include content/ssh/ssh-add-keys-to-agent.md %} - -## Copy your public key for use with Docker Cloud - -You need your SSH public key to provide to Docker Cloud. When you are ready -to add it, you can copy the public key as follows. - -{% include content/ssh/ssh-copy-key.md %} - -## Related topics - -* [Swarms in Docker Cloud](index.md) - -* [Link to Docker Cloud to Amazon Web Services](link-aws-swarm.md) - -* [Link Docker Cloud to Microsoft Azure Cloud Services](link-azure-swarm.md) - -* [Create a new swarm on Microsoft Azure in Docker Cloud](create-cloud-swarm-azure.md) - -* [Create a new swarm on AWS in Docker Cloud](create-cloud-swarm-azure.md) diff --git a/docker-cloud/cloud-swarm/using-swarm-mode.md b/docker-cloud/cloud-swarm/using-swarm-mode.md deleted file mode 100644 index 9ccfa31aac..0000000000 --- a/docker-cloud/cloud-swarm/using-swarm-mode.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -previewflag: cloud-swarm -description: Work with swarms in Docker Cloud -keywords: swarm mode, swarms, orchestration Cloud, fleet management -title: Using Swarm Mode with Docker Cloud ---- - -Docker Cloud now allows you to connect to clusters of Docker Engines running in v1.13 [swarm mode](/engine/swarm/). - -## Swarm Mode - -The current release of Docker Cloud automatically opts in new users to Beta -Swarm Mode. - -> **Note**: All Swarm management features in Docker Cloud are free while in Beta. - -### New to Docker Cloud? - -If you just signed up as a new Docker Cloud user, -Swarm Mode is baked into the standard web -interface. Once you sign in, you are ready to -get started managing and deploying your apps in -Docker Cloud! - -### Already a Docker Cloud user? - -If you are already a Docker Cloud user, you still have access to legacy -features for managing [node clusters](/docker-cloud/infrastructure/). You also -have the option to switch to the Beta Swarm Mode interface. Swarm management -replaces node cluster management features when Swarm Mode is enabled. - -#### Enable Swarm Mode in Docker Cloud - -Click the **Swarm Mode** toggle to enable the Swarm Mode interface. - -![the Swarm Mode toggle](images/swarm-toggle.png) - -You can switch between node cluster and Swarm Mode at any time, and enabling -Swarm Mode does _not_ remove or disconnect existing node clusters. The content, -stacks, and node clusters you already created are available to you and -collaborators. - -## Swarm Mode and organizations - -If you use Docker Cloud in an [organization](/docker-cloud/orgs/), you can -use Swarm Mode to access any Docker swarms available to your organization. -Members of the `owners` team grant each team in an organization access to the -swarms they need. If necessary, you can create new teams to manage beta swarm -access. - -If you use Swarm Mode as a member of a team other than the `owners` team, -you only see the swarms that you have been granted access to. - -Members of the `owners` team must switch to the Swarm Mode Docker Cloud -interface to grant teams access to an organization's swarms. Swarms only appear -in the [resource management](/docker-cloud/orgs/#/set-team-permissions) screens -for teams when in the Swarm Mode interface. - -## Where to go next - -Learn how to [register an existing swarm](register-swarms.md). diff --git a/docker-cloud/docker-errors-faq.md b/docker-cloud/docker-errors-faq.md deleted file mode 100644 index f31a547cb8..0000000000 --- a/docker-cloud/docker-errors-faq.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -description: Known Docker Engine issues in Docker Cloud -keywords: Engine, issues, troubleshoot -redirect_from: -- /docker-cloud/faq/docker-errors-faq/ -title: Known issues in Docker Cloud -toc_max: 2 -toc_min: 1 ---- - -This is a list of known issues with current versions of Docker Engine along with -our recommended workaround. You might encounter these errors in Docker Cloud. - -## Errors and messages - ---- - -## Get i/o timeout - - - -*Get https://index.docker.io/v1/repositories/\/images: dial tcp: lookup \ on \:53: read udp \:53: i/o timeout* - -### Description - -The DNS resolver configured on the host cannot resolve the registry's hostname. - -### GitHub link - -N/A - -### Workaround - -Retry the operation, or if the error persists, use another DNS resolver. You can do this by updating your `/etc/resolv.conf` file with these or other DNS servers: - - nameserver 8.8.8.8 - nameserver 8.8.4.4 - ---- - -## 500 Server Error: userland proxy - -*500 Server Error: Internal Server Error ("Cannot start container \: Error starting userland proxy: listen tcp 0.0.0.0:\: bind: address already in use")* - -### Description - -Docker Cloud is trying to deploy a container publishing a port which is already -being used by a process on the host (like the SSH server listening in port -`22`). - -### GitHub link - -N/A - -### Workaround - -Either choose another port, or SSH into the node and manually stop the process -which is using the port that you are trying to use. - ---- - -## 500 Server Error: bind failed - -*500 Server Error: Internal Server Error ("Cannot start container \: Bind for 0.0.0.0:\ failed: port is already allocated")* - -### Description - -Docker Cloud is trying to deploy a container publishing a port which is already -used by another container outside of the scope of Docker Cloud. - -### GitHub link - -N/A - -### Workaround - -Either choose another port, or SSH into the node and manually stop the container -which is using the port that you are trying to use. - ---- - -## 500 Server Error: cannot start, executable not found - -*500 Server Error: Internal Server Error ("Cannot start container \: [8] System error: exec: "\": executable file not found in $PATH")* - -### Description - -The `run` command you specified for the container does not exist on the -container. - -### GitHub link - -N/A - -### Workaround - -Edit the service to fix the run command. - ---- - -## Timeout when pulling image from the registry - -*Timeout when pulling image from the registry* - -### Description - -Timeouts occur when pulling the image takes more than 10 minutes. This can -sometimes be caused by the Docker daemon waiting for a nonexistent process while -pulling the required image. - -### GitHub link - - -[docker/docker#12823](https://github.com/moby/moby/issues/12823){: target="_blank" class="_" } - -### Workaround - -Restart the `dockercloud-agent` service (`sudo service dockercloud-agent -restart`) on the node, or restart the node. - ---- - -## Docker Cloud CLI does not currently support Python 3 - -### Description - -The `docker-cloud` command line interface (CLI) does not currently support -Python 3.x. - - -### GitHub link - -[docker/docker-cloud#21](https://github.com/docker/dockercloud-cli/issues/21){: target="_blank" class="_"} - -### Workarounds - -* Use Python 2.x with the Docker Cloud CLI. - ---- - -## Problems installing and running Docker Cloud with Python 3 - -### Description - -* Some users have encountered problems installing and/or running -Docker Cloud with Anaconda Python 3.5.2 on a Windows host. - -* Some users running Python on Windows have encountered problems -running `docker-cloud` inside a container using `docker run`. - -### GitHub link - -[docker/for-win#368](https://github.com/docker/for-win/issues/368){: target="_blank" class="_" } - -[docker/dockercloud-cli#45](https://github.com/docker/dockercloud-cli/issues/45){: target="_blank" class"_" } - -### Workarounds - -* If you encounter problems with the installation, use Python 2.x. - -* Before attempting to run `docker-cloud` in a container with `docker run`, -make sure that you [have Linux containers -enabled](/docker-for-windows/index.md#switch-between-windows-and-linux-containers){: target="_blank" class"_" }. diff --git a/docker-cloud/dockerid.md b/docker-cloud/dockerid.md deleted file mode 100644 index 563de95ef8..0000000000 --- a/docker-cloud/dockerid.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -description: Using your DockerID to log in to Docker Cloud -keywords: one, two, three -title: Docker Cloud settings and Docker ID ---- - -Docker Cloud uses your Docker ID for access and access control, and this allows -you to link your Hub and Cloud accounts. - -If you already have an account on Docker Hub, you can use the same credentials to -log in to Docker Cloud. - -If you don't have a [Docker ID](../docker-id/) yet, you can sign up for one from -the Cloud website, or using the `docker login` command in the Docker CLI. The -name you choose for your Docker ID becomes part of your account namespace. - -## Manage cloud services and source providers - -You can link to your own hosts, or to hosted nodes from a Cloud Services -Provider such as Amazon Web Services or Microsoft Azure from your Docker Cloud -account. - -You can also link to source code repositories such as GitHub and -Bitbucket from your Docker Cloud account settings. - -## Email addresses - -You can associate multiple email addresses with your Docker ID, and one of these -becomes the primary address for the account. The primary address is used by -Docker to send password reset notifications and other important information, so -be sure to keep it updated. - -To add another email address to your Docker ID: - -1. In Docker Cloud, click the user icon menu at top right, and click **Account Settings**. -2. In the **Emails** section, enter a new email address for the account. -3. Click the **plus sign** icon (**+**) to add the address and send a verification email. - -The new email address is not added to the account until you confirm it by -clicking the link in the verification email. This link is only good for a -limited time. To send a new verification email, click the envelope icon next to -the email address that you want to verify. - -If you have multiple verified email addresses associated with the account, you can click **Set as primary** to change the primary email address. - -## Notifications - -You can configure your account so that you receive email notifications for certain types of events in Docker Cloud. - -You can also connect Slack to your Docker Cloud account so you can get notifications through your chat channels. To learn more, see [Docker Cloud notifications in Slack](slack-integration.md). - -## Paid accounts - -Like free Docker Hub accounts, free Docker Cloud accounts come with one free -private repository. - -If you require more private repositories, visit your **Cloud settings** and -select **Plan** to see the available paid accounts. diff --git a/docker-cloud/getting-started/connect-infra.md b/docker-cloud/getting-started/connect-infra.md deleted file mode 100644 index 6cbaa1031c..0000000000 --- a/docker-cloud/getting-started/connect-infra.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -description: How to link Docker Cloud to a hosted cloud services provider or your own hosts -keywords: node, create, understand -redirect_from: -- /docker-cloud/getting-started/use-hosted/ -title: Link to your infrastructure ---- - -To deploy Docker Cloud nodes, you first need to grant Docker Cloud access to your infrastructure. - -This could mean granting access to a cloud services provider such as AWS or Azure, or installing the Docker Cloud Agent on your own hosts. Once this is done, you can provision nodes directly from within Docker Cloud using the Web UI, CLI, or API. - -## Link to a cloud service provider -To link your cloud provider accounts, first go to your [Docker Cloud dashboard](https://cloud.docker.com/). - -Then, use one of the detailed tutorials below to link your account. You should open the detailed linking tutorial in a new tab or window so you can continue the tutorial when you're finished. - - - [Amazon Web Services](../infrastructure/link-aws.md) (uses an Access Key ID + Secret Access Key) - - [DigitalOcean](../infrastructure/link-do.md) (uses OAuth) - - [Microsoft Azure](../infrastructure/link-azure.md) (uses OAuth) - - [IBM SoftLayer](../infrastructure/link-softlayer.md) (uses an API key) - - [Packet.net](../infrastructure/link-packet.md) (uses an API key) - - You can always come back and link more cloud service providers later. - -## Link to your own hosts (Bring Your Own Node - BYON) - -If you are not using a cloud services provider but using your own hosts, install the Docker Cloud Agent on those hosts so that Docker Cloud can communicate with them. Follow the directions at [Bring Your Own Node instructions](../infrastructure/byoh.md). Open these instructions in a new window or tab so you can return to this tutorial once you're done linking your hosts. - -## Ready to go? -Once you've linked to your cloud services provider or to your own hosts, [continue the tutorial and deploy your first node](your_first_node.md). diff --git a/docker-cloud/getting-started/deploy-app/10_provision_a_data_backend_for_your_service.md b/docker-cloud/getting-started/deploy-app/10_provision_a_data_backend_for_your_service.md deleted file mode 100644 index 49266ac8ad..0000000000 --- a/docker-cloud/getting-started/deploy-app/10_provision_a_data_backend_for_your_service.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -description: Provision a data backend for the service -keywords: provision, Python, service -redirect_from: -- /docker-cloud/getting-started/python/10_provision_a_data_backend_for_your_service/ -- /docker-cloud/getting-started/golang/10_provision_a_data_backend_for_your_service/ -title: Provision a data backend for your service ---- - -Docker Cloud offers a large number of data stores in the *Jumpstart* library, -including Redis, MongoDB, PostgreSQL, and MySQL. - -You may have noticed that your app has a visit counter that's been disabled up -until now. In this step you add a data backend for your service to use. In -this specific tutorial we use a Redis cache, but most concepts apply to any -data backend. - -## Provision the service - -The first step is to provision the data service itself. Run this command to -create and run the Redis service using the [redis](https://github.com/docker-library/redis/){: target="_blank" class="_"} -image: - -```none -$ docker-cloud service run \ ---env REDIS_PASS="password" \ ---name redis \ -redis -``` -**--env REDIS_PASS="password"** defines an environment variable that sets the password for Redis. Because we are not publishing any ports for this service, only services **linked** to your *Redis service* can connect to it. - -Use `docker-cloud service ps` to check if your new redis service is *running*. This might take a minute or two. - -```none -$ docker-cloud service ps -NAME UUID STATUS IMAGE DEPLOYED -redis 89806f93 ▶ Running redis:latest 29 minutes ago -web bf644f91 ▶ Running my-username/python-quickstart:latest 26 minutes ago -lb 2f0d4b38 ▶ Running dockercloud/haproxy:latest 25 minutes ago -``` - -## Link the web service to the redis service - -Next, we set up the link between the `redis` service and the `web` service. - -```bash -$ docker-cloud service set --link redis:redis --redeploy web -``` - -In this command, we're creating a link from the `web` service (specified at the end of the command) to the `redis` service, and naming the link `redis`. - -Next, visit or `curl` the load balanced web endpoint again. The web service now counts of the number of visits to the web service. This uses the Redis data backend, and is synchronized between all of the service's containers. - -If you're using curl, you should see the counter incrementing like this: - -```none -$ curl lb-1.$DOCKER_ID_USER.cont.dockerapp.io -Hello World
                  Hostname: web-1
                  Counter: 1% -$ curl lb-1.$DOCKER_ID_USER.cont.dockerapp.io -Hello World
                  Hostname: web-3
                  Counter: 2% -$ curl lb-1.$DOCKER_ID_USER.cont.dockerapp.io -Hello World
                  Hostname: web-2
                  Counter: 3% -$ curl lb-1.$DOCKER_ID_USER.cont.dockerapp.io -Hello World
                  Hostname: web-5
                  Counter: 4% -$ curl lb-1.$DOCKER_ID_USER.cont.dockerapp.io -Hello World
                  Hostname: web-3
                  Counter: 5% -``` - -## What's Next? - -Next, we look at [Stackfiles for your service](11_service_stacks.md). diff --git a/docker-cloud/getting-started/deploy-app/11_service_stacks.md b/docker-cloud/getting-started/deploy-app/11_service_stacks.md deleted file mode 100644 index 4d15a9b1bc..0000000000 --- a/docker-cloud/getting-started/deploy-app/11_service_stacks.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -description: Stackfiles for your service -keywords: Python, service, stack -redirect_from: -- /docker-cloud/getting-started/python/11_service_stacks/ -title: Stackfiles for your service ---- - -## What are stack files? - -A stack is a logical grouping of related services that are usually deployed -together and require each other to work as intended. If you are familiar with -*fig* or *Docker Compose* then you should feel right at home with **stacks**. -You can learn more about stacks [here](../../apps/stacks.md). - -Stack files are YAML files, and you can learn more about the available syntax -[here](../../apps/stack-yaml-reference.md). You can also interact with stacks -using the [stack commands in our API](/apidocs/docker-cloud.md#stacks). - -## Service definitions in the stack file - -The services that you created in this tutorial form a stack with three services: -the load-balancer, the web application, and the redis cache. - -Look at the file called `docker-cloud.yml` in your quickstart to see the stack -file that defines the three services (lb, web, redis) you created in the -previous steps, including all modifications and environment variables. - -This is what the `docker-cloud.yml` file looks like. (If you are using the -quickstart-go version, you see `quickstart-go` instead of -`quickstart-python`.) - -```yml -lb: - image: dockercloud/haproxy - autorestart: always - links: - - web - ports: - - "80:80" - roles: - - global -web: - image: dockercloud/quickstart-python - autorestart: always - links: - - redis - environment: - - NAME=Friendly Users - deployment_strategy: high_availability - target_num_containers: 4 -redis: - image: redis - autorestart: always - environment: - - REDIS_PASS=password - - REDIS_APPENDONLY=yes - - REDIS_APPENDFSYNC=always -``` - -You can use this stack file to quickly deploy this cluster of three services to -another set of nodes. You can also edit the file to change the configuration. - -## Run a stack - -To create the services in a stack file you use the simple `stack up` command. - -You can run this in the path containing your stackfile (docker-cloud.yml), like -so: - -```bash -$ docker-cloud stack up -``` - -Or you can specify the YML file to use and its location: - -```bash -$ docker-cloud up -f /usr/dockercloud/quickstart-python/docker-cloud.yml -``` - -## What's Next? - -Next, we do some [data management with volumes](12_data_management_with_volumes.md). diff --git a/docker-cloud/getting-started/deploy-app/12_data_management_with_volumes.md b/docker-cloud/getting-started/deploy-app/12_data_management_with_volumes.md deleted file mode 100644 index b1309f5d9c..0000000000 --- a/docker-cloud/getting-started/deploy-app/12_data_management_with_volumes.md +++ /dev/null @@ -1,154 +0,0 @@ ---- -description: Data management with Volumes -keywords: Python, data, management -redirect_from: -- /docker-cloud/getting-started/python/12_data_management_with_volumes/ -title: Data management with volumes ---- - -In the previous step, we set up Redis but didn't provide it a way to store the -data it's caching. This means that if you redeployed the redis service, or if -the container crashed, the data would be lost. To save the data so it persists -beyond the life of a container, or share data from one container to another, -you need to define a volume. - -## Data persistence - -To persist, data in Docker Cloud must be stored in a volume. The volume -can be defined on the image (for example in the Dockerfile), or specified when -you create a new service in the Docker Cloud web UI. Learn more about volumes in -Docker Cloud [here](/docker-cloud/apps/volumes.md). - -### Test for lack of persistence - -If you `redeploy` the Redis service you created earlier, the counter resets. - -Let's try that. First, redeploy the redis service to reset the counter. - -```bash -$ docker-cloud service redeploy redis --not-reuse-volumes -``` - -Check the container status using the `container ps` command, and wait until the new container is running again. In the example below you can see the original container in the "Terminated" state, and the new container that is "Starting". - -```none -$ docker-cloud container ps --service redis -NAME UUID STATUS IMAGE RUN COMMAND EXIT CODE DEPLOYED PORTS -redis-1 5ddc0d66 ✘ Terminated redis:staging /run.sh 0 15 minutes ago 6379/tcp -redis-1 3eff67a9 ⚙ Starting redis:staging /run.sh -``` - -Once the container is running, get the web endpoint using `container ps`, then try curling or visiting the web endpoint again - -```none -$ curl lb-1.$DOCKER_ID_USER.cont.dockerapp.io:80 -

                  Hello Friendly Users!

                  Hostname: web-1
                  Visits: 1% -``` - -The Redis cache service redeployment caused the counter to reset. - -### Enabling persistence - -The specific Redis image (*redis*) in this tutorial supports data persistence. -This is not a common requirement for a Redis cache and it's not enabled by -default in most images. However to activate this in *our* image, you only need -to set two environment variables. - -Run the following command to create and set these two environment variables. - -```none -$ docker-cloud service set \ --e REDIS_APPENDONLY=yes \ --e REDIS_APPENDFSYNC=always \ -redis --redeploy -``` - -This command defines two new environment variables in the **redis** service and -then redeploys the service so they take effect. You can learn more about our -open source `redis` image [here](https://github.com/docker-library/redis/){: target="_blank" class="_"}. - -With these settings, Redis can create and store its data in a volume. The volume is in `/data`. - -Visit the web endpoint a few more times to make sure that the cache is working -as expected. Then redeploy the Redis service to see if the counter resets, or if -it persists even after the container is terminated and re-created. - -Curl the service to increment the counter: - -```none -$ curl lb-1.$DOCKER_ID_USER.cont.dockerapp.io:80 -

                  Hello Python users!!

                  Hostname: web-1
                  Visits: 1% -$ curl lb-1.$DOCKER_ID_USER.cont.dockerapp.io:80 -

                  Hello Python users!!

                  Hostname: web-2
                  Visits: 2% -$ curl lb-1.$DOCKER_ID_USER.cont.dockerapp.io:80 -

                  Hello Python users!!

                  Hostname: web-3
                  Visits: 3% -``` - -Next, redeploy the service using the `service redeploy` command: - -```none -$ docker-cloud service redeploy redis -``` - -Check the service status: - -```none -$ docker-cloud container ps --service redis -NAME UUID STATUS IMAGE RUN COMMAND EXIT CODE DEPLOYED PORTS -cache-1 8193cc1b ✘ Terminated redis:staging /run.sh 0 10 minutes ago 6379/tcp -cache-1 61f63d97 ▶ Running redis:staging /run.sh 37 seconds ago 6379/tcp -``` - -Once the service is running again, curl the web page again to see what the counter value is. - -```none -$ curl lb-1.$DOCKER_ID_USER.cont.dockerapp.io:80 -

                  Hello Python users!!

                  Hostname: web-3
                  Visits: 4% -``` - -Congratulations! You've set up data persistence in Docker Cloud! - -## Sharing/reusing data volumes between services - -A service's volume can be accessed by another service. To do this you use the `--volumes-from` flag when creating the new service. - -You might use this functionality to share data between two services, or to back -up, restore, or migrate a volume to a local host or a cloud storage provider. - -## Download volume data for backup - -In this next step, you download the `/data` volume from Redis to your local host using SCP (secure copy). - -First, run an SSH service that mounts the volumes of the redis you want to back up: - -```bash -$ docker-cloud service run -n download -p 2222:22 -e AUTHORIZED_KEYS="$(cat ~/.ssh/id_rsa.pub)" --volumes-from redis tutum/ubuntu -``` - -Then run **scp** to download the data volume files in Redis: - -```bash -$ scp -r -P 2222 root@downloader-1.$DOCKER_ID_USER.svc.dockerapp.io:/data . -``` - -You now have a backup copy of the Redis data on your local host machine! - -## What's Next? - -Congratulations! You've completed the tutorials! You can now push an image to -Docker Cloud, deploy an app to your Cloud nodes, set environment variables, -scale the service, view logs, set up a load balancer and a data back end, and -set up a volume to save the data. - -There's lots more to learn about Docker Cloud, so check out [the rest of our documentation](/docker-cloud/), the [API and CLI Documentation](../../../apidocs/docker-cloud.md), and our [Knowledge Hub](https://success.docker.com/Cloud) and [Docker Cloud Forums](https://forums.docker.com/c/docker-cloud). - -You might also want to delete or remove all of your hello world Stacks, Services, and Nodes running in Docker Cloud. To clean up when you're finished with the tutorial: - -- Click **Stacks** in the left navigation, hover over the stack you created and click the selection box that appears, then click **Terminate**. -- Once the Stack has terminated, click **Services** in the left navigation, hover over each service you created, click the selection box that appears, then click **Terminate**. -- Click **Node Clusters** in the left navigation, hover over the node cluster you created, click the selection box that appears, then click **Terminate**. - -Objects (Stacks, Services, Node Clusters, and Containers and nodes) still appear -in the list in Docker Cloud for about five minutes after they are terminated. - -Happy Docking! diff --git a/docker-cloud/getting-started/deploy-app/1_introduction.md b/docker-cloud/getting-started/deploy-app/1_introduction.md deleted file mode 100644 index 85ce41acbb..0000000000 --- a/docker-cloud/getting-started/deploy-app/1_introduction.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -description: Deploy an app to Docker Cloud -keywords: deploy, Python, application -redirect_from: -- /docker-cloud/getting-started/python/1_introduction/ -- /docker-cloud/getting-started/golang/1_introduction/ -title: Introduction to deploying an app in Docker Cloud -notoc: true ---- - -In this tutorial you bring an application to Docker Cloud using either Go -or Python. This tutorial is intended for more advanced beginners who have some -experience with web applications, and who want to learn more about -multi-container services in Docker Cloud. - -This tutorial assumes that you have: - -- a free [Docker ID account](https://hub.docker.com/){: target="_blank" class="_"}. -- at least one node running. If you don't have any nodes set up in Docker Cloud yet, [start here](../../getting-started/your_first_node.md) to set these up. -- Docker Engine installed - see the installation guides for [macOS, Windows, and Linux](/engine/installation/){: target="_blank" class="_"}. Use the `docker login` command to connect to your account in Docker Cloud, so you can run `docker-cloud` CLI commands. - -## What's next? - -Let's get started! - -[Set up your environment](2_set_up.md). diff --git a/docker-cloud/getting-started/deploy-app/2_set_up.md b/docker-cloud/getting-started/deploy-app/2_set_up.md deleted file mode 100644 index 8d9b938e42..0000000000 --- a/docker-cloud/getting-started/deploy-app/2_set_up.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -description: Set up the application -keywords: Python, application, setup -redirect_from: -- /docker-cloud/getting-started/python/2_set_up/ -- /docker-cloud/getting-started/golang/2_set_up/ -title: Set up your environment ---- - -In this step you install the Docker Cloud CLI to interact with the service using your command shell. This tutorial uses CLI commands to complete actions. - -## Install the Docker Cloud CLI - -Install the docker-cloud CLI using the package manager for your system. - -#### Run the CLI in a Docker container - -If you have Docker Engine installed locally, you can run the following `docker` -command in your shell regardless of which operating system you are using. - -```none -docker run dockercloud/cli -h -``` - -This command runs the `docker-cloud` CLI image in a container for you. Learn -more about how to use this container -[here](https://github.com/docker/dockercloud-cli#docker-image). - -#### Install for Linux or Windows - -You can install the CLI locally using the [pip](https://pip.pypa.io/en/stable/) -package manager, which is a package manager for -[Python](https://www.python.org/) applications. - -* If you already have 2.x or Python 3.x installed, you probably have `pip` and -`setuptools`, but need to upgrade per the instructions -[here](https://packaging.python.org/installing/). - - > The Docker Cloud CLI does not currently support Python 3.x. - > - > We recommend using Python 2.x with Docker Cloud. To learn more, - see the Python and CLI issues described in - [Known issues in Docker Cloud](/docker-cloud/docker-errors-faq.md). - -* If you do not have Python or `pip` installed, you can either [install -Python](https://wiki.python.org/moin/BeginnersGuide/Download) or use this -[standalone pip -installer](https://pip.pypa.io/en/latest/installing/#installing-with-get-pip-py). You do not need Python for our purposes, just `pip`. - -Now that you have `pip`, open a shell or terminal -window and run the following command to install the docker-cloud CLI: - -```bash -$ pip install docker-cloud -``` - -#### Install on macOS - -We recommend installing Docker CLI for macOS using Homebrew. If you don't have `brew` installed, follow the instructions at [http://brew.sh](http://brew.sh){:target="_blank" class="_"}. - -Once Homebrew is installed, open Terminal and run the following command: - -```bash -$ brew install docker-cloud -``` - -> **Note**: You can also use [pip](https://pip.pypa.io/en/stable/) to install on macOS, but we suggest Homebrew since it is a package manager designed for the Mac. - -## Validate the CLI installation -Check that the CLI installed correctly, using the `docker-cloud -v` command. (This command is the same for every platform.) - -```bash -$ docker-cloud -v -docker-cloud 1.0.0 -``` - -You can now use the `docker-cloud` CLI commands from your shell. - -The documentation for the Docker Cloud CLI tool and API [here](/apidocs/docker-cloud.md). - - -## Log in - -Use the `login` CLI command to log in to Docker Cloud. Use the username and password you used when creating your Docker ID. If you use Docker Hub, you can use the same username and password you use to log in to Docker Hub. - -``` -$ docker login -Username: my-username -Password: -Login succeeded! -``` - -You must log in to continue this tutorial. - -## Set your username as an environment variable - -For simplicity in this tutorial, we use an environment variable for your Docker Cloud username. If you plan to copy and paste the tutorial commands, set the environment variable using the command below. (Change `my-username` to your username.) - -If you don't want to do this, make sure you substitute your username for $DOCKER_ID_USER whenever you see it in the example commands. - -```none -$ export DOCKER_ID_USER=my-username -``` - -**If you are running the tutorial with an organization's resources:** - -By default, the `docker-cloud` CLI uses your default user namespace, meaning the -repositories, nodes, and services associated with your individual Docker ID -account name. To use the CLI to interact with objects that belong to an -[organization](../../orgs.md), prefix these commands with -`DOCKERCLOUD_NAMESPACE=my-organization`, or set this variable as in the example below. - -```none -$ export DOCKERCLOUD_NAMESPACE=my-organization -``` - - - See the [CLI documentation](../../installing-cli.md#use-the-docker-cloud-cli-with-an-organization) for more information. - - -Next up, we [prepare the app](3_prepare_the_app.md). diff --git a/docker-cloud/getting-started/deploy-app/3_prepare_the_app.md b/docker-cloud/getting-started/deploy-app/3_prepare_the_app.md deleted file mode 100644 index 4f465d77a9..0000000000 --- a/docker-cloud/getting-started/deploy-app/3_prepare_the_app.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -description: Prepare the application -keywords: Python, prepare, application -redirect_from: -- /docker-cloud/getting-started/python/3_prepare_the_app/ -- /docker-cloud/getting-started/golang/3_prepare_the_app/ -title: Prepare the application ---- - -In this step, you prepare a simple application that can be deployed. - -## Clone the sample app - -Run the following command to clone the sample application. You can use -either the Python or the Go version of this application, but you don't need to -install Python or Go to follow the tutorial. - -### Python quickstart - -```bash -$ git clone https://github.com/docker/dockercloud-quickstart-python.git -$ cd dockercloud-quickstart-python -``` - -### Go quickstart - -```bash -$ git clone https://github.com/docker/dockercloud-quickstart-go.git -$ cd dockercloud-quickstart-go -``` - -## Build the application - -*Skip the following step if you don't have Docker Engine installed locally.* - -Next, we build this application to create an image. Run the following command to build the app. This creates a Docker image and tags it with whatever follows the word `tag`. Tag the image either `quickstart-python` or `quickstart-go` depending on which quickstart you are using. - -### Python quickstart - -```bash -$ docker build --tag quickstart-python . -``` - -### Go quickstart - -```bash -$ docker build --tag quickstart-go . -``` - -## What's next? - -Next, we [Push the Docker image to Docker Cloud's Registry](4_push_to_cloud_registry.md). diff --git a/docker-cloud/getting-started/deploy-app/4_push_to_cloud_registry.md b/docker-cloud/getting-started/deploy-app/4_push_to_cloud_registry.md deleted file mode 100644 index e902995748..0000000000 --- a/docker-cloud/getting-started/deploy-app/4_push_to_cloud_registry.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -description: Push the Docker image to Docker Cloud's Registry -keywords: image, Docker, cloud -redirect_from: -- /docker-cloud/getting-started/python/4_push_to_cloud_registry/ -- /docker-cloud/getting-started/golang/4_push_to_cloud_registry/ -title: Push the image to Docker Cloud's registry ---- - -*Skip this step if you don't have Docker Engine installed locally.* - -## Overview - -In this step you take the image that you built in the previous step, and push it to Docker Cloud. - -In step 2, you set your Docker Cloud username as an environment variable called **DOCKER_ID_USER**. If you skipped this step, change the `$DOCKER_ID_USER` to your Docker ID username before running this command. - -> **Note**: By default, the `docker-cloud` CLI uses your default user namespace, -meaning the repositories, nodes, and services associated with your individual -Docker ID account name. To use the CLI to interact with objects that belong to -an [organization](/docker-cloud/orgs.md), prefix these commands with -`DOCKERCLOUD_NAMESPACE=my-organization`. See the [CLI documentation](/docker-cloud/installing-cli.md#use-the-docker-cloud-cli-with-an-organization) for more information. - -## Tag the image - -First tag the image. Tags in this case denote different builds of an image. - -### Python quickstart - -```bash -$ docker tag quickstart-python $DOCKER_ID_USER/quickstart-python -``` - -### Go quickstart - -```bash -$ docker tag quickstart-go $DOCKER_ID_USER/quickstart-go -``` - -## Publish the image - -Next, push the tagged image to the repository. - -### Python quickstart - -``` -$ docker push $DOCKER_ID_USER/quickstart-python -``` - -### Go quickstart - -``` -$ docker push $DOCKER_ID_USER/quickstart-go -``` - -## Verify the image location - -After the push command completes, verify that the image is now in Docker Cloud's -registry. Do this by logging in to [Docker Cloud](https://cloud.docker.com) and -clicking **Repositories** in the left navigation. Your image should appear in -the repository list. - -## What's next? - -[Deploy the app as a Docker Cloud service](5_deploy_the_app_as_a_service.md). diff --git a/docker-cloud/getting-started/deploy-app/5_deploy_the_app_as_a_service.md b/docker-cloud/getting-started/deploy-app/5_deploy_the_app_as_a_service.md deleted file mode 100644 index e15716af5d..0000000000 --- a/docker-cloud/getting-started/deploy-app/5_deploy_the_app_as_a_service.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -description: Deploy the app as a Docker Cloud service -keywords: Python, deploy, Cloud -redirect_from: -- /docker-cloud/getting-started/python/5_deploy_the_app_as_a_service/ -- /docker-cloud/getting-started/golang/5_deploy_the_app_as_a_service/ -title: Deploy the app as a Docker Cloud service ---- - -In this step you deploy the app as a Docker Cloud Service. Remember that a service is a group of containers of the same **image:tag**. - -## Deploy app with Docker Engine installed locally - -> **Note**: By default, the `docker-cloud` CLI uses your default user namespace, -meaning the repositories, nodes, and services associated with your individual -Docker ID account name. To use the CLI to interact with objects that belong to -an [organization](../../orgs.md), prefix these commands with -`DOCKERCLOUD_NAMESPACE=my-organization`. See the [CLI documentation](../../installing-cli.md#use-the-docker-cloud-cli-with-an-organization) for more information. - -Start by running the service. - -```bash -$ docker-cloud service run -p 80 --name web $DOCKER_ID_USER/quickstart-python -``` - -or - -```bash -$ docker-cloud service run -p 80 --name web $DOCKER_ID_USER/quickstart-go -``` - -## The run command - -The `run` command **creates and runs** the service using the image you chose. -The **-p 80** flag publishes port 80 in the container so that it is publicly -accessible, and maps it to a dynamically assigned port in the node. - -It might take a minute or two to get your service up and running. Once it -completes the startup process, it is in the *running* state. - -To check the status of your service from the CLI use the `docker-cloud service ps` command. - -```none -$ docker-cloud service ps -NAME UUID STATUS IMAGE DEPLOYED -web 68a6fb2c ▶ Running my-username/quickstart-python:latest 1 hour ago -``` - -Make sure that the **STATUS** for your service is **Running**. Next, visit the -app at the URL generated by its service name. Find this URL by running -`docker-cloud container ps --no-trunc`. - -```none -$ docker-cloud container ps --no-trunc -NAME UUID STATUS IMAGE RUN COMMAND EXIT CODE DEPLOYED PORTS -web-1 6c89f20e ▶ Running my-username/quickstart-python:latest python app.py 1 minute ago web-1.my-username.cont.dockerapp.io:49162->80/tcp -``` - -The **PORTS** column contains the URL you can use to see the service running in -a browser. Copy the URL, open a browser, and go to that URL. In the example above, the URL is -`web-1.my-username.cont.dockerapp.io:49162`. - -If you don't want to leave the command line, you can use the `curl` command instead. - -```bash -$ curl web-1.$DOCKER_ID_USER.cont.dockerapp.io:49162 -Hello World!
                  Hostname: web-1
                  Counter: Redis Cache not found, counter disabled.% -``` -> **Tip**: Your Docker ID is used as part of the namespace when running containers in Docker Cloud. In the example above, instead of copying the URL entirely, you can see we used the $DOCKER_ID_USER variable. - -**CONGRATULATIONS!** You've deployed your first service using Docker Cloud. - -## What's Next? - -[Define environment variables](6_define_environment_variables.md). diff --git a/docker-cloud/getting-started/deploy-app/6_define_environment_variables.md b/docker-cloud/getting-started/deploy-app/6_define_environment_variables.md deleted file mode 100644 index 291bf1338c..0000000000 --- a/docker-cloud/getting-started/deploy-app/6_define_environment_variables.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -description: Define environment variables -keywords: Python, service, environment, service -redirect_from: -- /docker-cloud/getting-started/python/6_define_environment_variables/ -- /docker-cloud/getting-started/golang/6_define_environment_variables/ -title: Define environment variables ---- - -Docker lets you store data such as configuration settings, encryption keys, and external resource addresses in environment variables. Docker Cloud makes it easy to define, share, and update the environment variables for your services. - -At runtime, environment variables are exposed to the application inside the container. - -## Look inside your deployed app - -Let's look inside the app you just deployed. - -### Python quickstart - -Open the file in `quickstart-python/app.py`, and look at the return statement in the method *hello()*. The code uses **os.getenv('NAME', "world")** to get the environment variable -**NAME**. - -```python -return html.format(name=os.getenv('NAME', "world"), hostname=socket.gethostname(), visits=visits) -``` - -### Go quickstart - -Open the file in `quickstart-go/main.go`, and look at the *fmt.Fprintf* call in the *indexHandler* method. The code uses **os.Getenv("NAME")** to get the environment variable **NAME**. - -```go -fmt.Fprintf(w, "

                  hello, %s

                  \nHostname: %s
                  MongoDB Status: %s", os.Getenv("NAME"), hostname, mongostatus) -``` - -## Edit an environment variable - -If you modify the environment variable, the message the app shows when you curl or visit the service webpage changes accordingly. Let's try it! - -Run the following command to change the **NAME** variable, and then redeploy the `web` service. - -```bash -$ docker-cloud service set --env NAME="Friendly Users" --redeploy web -``` - -## Check endpoint status - -Execute `docker-cloud container ps` again to see the container's new endpoint. -You should now see two `web-1` containers, one with a status of **terminated** -(that's the original container) and another one either **starting** or already -**running**. - -```none -$ docker-cloud container ps -NAME UUID STATUS IMAGE RUN COMMAND EXIT CODE DEPLOYED PORTS -web-1 a2ff2247 ✘ Terminated my-username/quickstart-python:latest python app.py 40 minutes ago web-1.my-username.cont.dockerapp.io:49165->80/tcp -web-1 ae20d960 ▶ Running my-username/quickstart-python:latest python app.py 20 seconds ago web-1.my-username.cont.dockerapp.io:49166->80/tcp -``` - -Now curl the new endpoint to see the updated greeting. - -> **Note**: If `docker-cloud container ps` doesn't show an endpoint for the container yet, wait until the container status changes to **running**. - -```none -$ curl web-1.$DOCKER_ID_USER.cont.dockerapp.io:49162 -Hello Friendly Users!
                  Hostname: e360d05cdb81
                  Counter: Redis Cache not found, counter disabled.% -``` - -Your service now returns `Hello Friendly Users!`. Great! You've modified your service using environment variables! - -### Environment Variables and the Dockerfile - -Environment variables can also be set in the Dockerfile, and modified at runtime -(like you just did). - -Wondering where the default value for the **NAME** environment variable is set? -Look in the quickstart's Dockerfile. - -```none -# Environment Variables -ENV NAME World -``` - -## What's Next? - -Next, we [scale the service](7_scale_the_service.md). diff --git a/docker-cloud/getting-started/deploy-app/7_scale_the_service.md b/docker-cloud/getting-started/deploy-app/7_scale_the_service.md deleted file mode 100644 index 60528a97ea..0000000000 --- a/docker-cloud/getting-started/deploy-app/7_scale_the_service.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -description: Scale the service -keywords: scale, Python, service -redirect_from: -- /docker-cloud/getting-started/python/7_scale_the_service/ -- /docker-cloud/getting-started/golang/7_scale_the_service/ -title: Scale the service -notoc: true ---- - -Right now, your service is running on a single container. That's great for now. - -You can check how many containers are running using the `docker-cloud container ps` command. - -```none -$ docker-cloud container ps -NAME UUID STATUS IMAGE RUN COMMAND EXIT CODE DEPLOYED PORTS -web-1 6c89f20e ▶ Running my-username/python-quickstart:latest python app.py 1 hour ago web-1.my-username.cont.dockerapp.io:49162->80/tcp -``` - -A single container works just fine for now, but it could be a problem if that container becomes unresponsive. To avoid this, you can scale to more than one container. You do this with the `service scale` command: - -```bash -$ docker-cloud service scale web 2 -``` - -In this example, you can see we're scaling the service called `web` to `2` containers. - -Run `service ps` again, and you should now see your service scaling: - -```none -$ docker-cloud service ps -NAME UUID STATUS IMAGE DEPLOYED -web 68a6fb2c ⚙ Scaling my-username/python-quickstart:latest 1 hour ago -``` - -If you run `container ps` you should see multiple containers: - -```none -$ docker-cloud container ps -NAME UUID STATUS IMAGE RUN COMMAND EXIT CODE DEPLOYED PORTS -web-1 6c89f20e ▶ Running my-username/python-quickstart:latest python app.py 1 hour ago web-1.my-username.cont.dockerapp.io:49162->80/tcp -web-2 ab045c42 ⚙ Starting my-username/python-quickstart:latest 80/tcp -``` - -Containers aren't assigned a *PORT* until they are *running*, so you need to wait until the Service status goes from *Scaling* to *Running* to see what port is assigned to them. - -```none -$ docker-cloud container ps -NAME UUID STATUS IMAGE RUN COMMAND EXIT CODE DEPLOYED PORTS -web-1 6c89f20e ▶ Running my-username/python-quickstart:latest python app.py 1 hour ago web-1.my-username.cont.dockerapp.io:49162->80/tcp -web-2 ab045c42 ▶ Running my-username/python-quickstart:latest python app.py 1 minute ago web-2.my-username.cont.dockerapp.io:49156->80/tcp -``` - -Use either of the URLs from the `container ps` command to visit one of your service's containers, either using your browser or curl. - -In the example output above, the URL `web-1.my-username.cont.dockerapp.io:49162` reaches the web app on the first container, and `web-2.my-username.cont.dockerapp.io:49156` reaches the web app on the second container. - -If you use curl to visit the pages, you should see something like this: - -```none -$ curl web-1.$DOCKER_ID_USER.cont.dockerapp.io:49166 -Hello Python Users!
                  Hostname: web-1
                  Counter: Redis Cache not found, counter disabled.% -$ curl web-2.$DOCKER_ID_USER.cont.dockerapp.io:49156 -Hello Python Users!
                  Hostname: web-2
                  Counter: Redis Cache not found, counter disabled.% -``` - -Congratulations! You now have *two* containers running in your **web** service. - -## What's Next? - -[View service logs](8_view_logs.md) diff --git a/docker-cloud/getting-started/deploy-app/8_view_logs.md b/docker-cloud/getting-started/deploy-app/8_view_logs.md deleted file mode 100644 index 21231b7ffe..0000000000 --- a/docker-cloud/getting-started/deploy-app/8_view_logs.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -description: View service logs -keywords: View, logs, Python -redirect_from: -- /docker-cloud/getting-started/python/8_view_logs/ -- /docker-cloud/getting-started/golang/8_view_logs/ -title: View service logs -notoc: true ---- - -Docker Cloud grants you access to the logs your application writes to `stdout`. -An internal service multiplexes all the logs from all the containers of a -service into a single stream. To see a service's logs run the `docker-cloud -service logs` command with the name of the service. - -If you run `docker-cloud service logs web`, you see logs for both *web-1* and -*web-2*, like the example below. - -```none -$ docker-cloud service logs web -[web-1] 2015-01-13T22:45:37.250431077Z * Running on http://0.0.0.0:80/ -[web-1] 2015-01-07T17:20:19.076174813Z 83.50.33.64 - - [07/Jan/2015 17:20:19] "GET / HTTP/1.1" 200 - -[web-1] 2015-01-07T17:20:34.209098162Z 83.50.33.64 - - [07/Jan/2015 17:20:34] "GET / HTTP/1.1" 200 - -[web-1] 2015-01-07T18:46:07.116759956Z 83.50.33.64 - - [07/Jan/2015 18:46:07] "GET / HTTP/1.1" 200 - -[web-2] 2015-01-07T18:48:24.550419508Z * Running on http://0.0.0.0:5000/ -[web-2] 2015-01-07T18:48:37.116759956Z 83.50.33.64 - - [07/Jan/2015 18:48:37] "GET / HTTP/1.1" 200 - -``` - -To see a specific container's logs, use the `container logs` and the -specific container's name. To learn more about service and container -hostnames, see [Service Discovery](../../apps/service-links.md#using-service-and-container-names-as-hostnames). - -```none -$ docker-cloud container logs web-1 -2015-01-07T17:18:24.550419508Z * Running on http://0.0.0.0:80/ -2015-01-07T17:20:19.076174813Z 83.50.33.64 - - [07/Jan/2015 17:20:19] "GET / HTTP/1.1" 200 - -2015-01-07T17:20:34.209098162Z 83.50.33.64 - - [07/Jan/2015 17:20:34] "GET / HTTP/1.1" 200 - -2015-01-07T18:46:07.116759956Z 83.50.33.64 - - [07/Jan/2015 18:46:07] "GET / HTTP/1.1" 200 - -``` - -Visit your application using curl or your browser again. Run the `service logs -web` command again to see another log message for your visit. - -## What's Next? - -Now, let's explore how to -[Load balance the service](9_load-balance_the_service.md). diff --git a/docker-cloud/getting-started/deploy-app/9_load-balance_the_service.md b/docker-cloud/getting-started/deploy-app/9_load-balance_the_service.md deleted file mode 100644 index 6da1e7b4b4..0000000000 --- a/docker-cloud/getting-started/deploy-app/9_load-balance_the_service.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -description: Load-balance the service -keywords: load, balance, Python -redirect_from: -- /docker-cloud/getting-started/python/9_load-balance_the_service/ -- /docker-cloud/getting-started/golang/9_load-balance_the_service/ -title: Load-balance the service -notoc: true ---- - -To load-balance your application, you need to deploy a load-balancing service. -This service distributes incoming requests to all of the available containers in -the application. - -In this example, you need a load balancer that forwards incoming requests to -both container #1 (web-1) and container #2 (web-2). For this tutorial, you'll -use [Docker Cloud's HAProxy image](https://github.com/docker/dockercloud-haproxy){: target="_blank" class="_"} to load balance, but you could also use other custom load balancers. - -You can configure and run the `haproxy` load balancer service from the command line using a command like the example below. (If you are using the Go quickstart, edit the `link-service` value before running the command.) - -```none -$ docker-cloud service run \ --p 80:80/tcp \ ---role global \ ---autorestart ALWAYS \ ---link-service web:web \ ---name lb \ -dockercloud/haproxy -``` - -**-p 80:80/tcp** publishes port 80 of the container, and maps it to port 80 of the node. - -**--role global** grants [API access](../../apps/api-roles.md) to this service. You can use this to query the Docker Cloud API from within the service. - -**--autorestart ALWAYS** tells Docker Cloud to always [restart the containers](../../apps/autorestart.md) if they stop. - -**--link-service web:web** links your load balancer service *haproxy* with the *web* service, and names the link *web*. (Learn more about Service Linking [here](../../apps/service-links.md).) - -**--name lb** names the service *lb* (short for *load balancer*). - -**dockercloud/haproxy** specifies the public image that we're using to make this service. - -Run the `service ps` command to check if your service is already running. - -```none -$ docker-cloud service ps -NAME UUID STATUS IMAGE DEPLOYED -web 68a6fb2c ▶ Running my-username/quickstart-python:latest 2 hours ago -lb e81f3815 ▶ Running dockercloud/haproxy:latest 11 minutes ago -``` - -Now let's check the container for this service. Run `docker-cloud container ps`. - -```none -$ docker-cloud container ps -NAME UUID STATUS IMAGE RUN COMMAND EXIT CODE DEPLOYED PORTS -web-1 6c89f20e ▶ Running my-username/quickstart-python:latest python app.py 2 hours ago web-1.my-username.cont.dockerapp.io:49162->80/tcp -web-2 ab045c42 ▶ Running my-username/quickstart-python:latest python app.py 33 minutes ago web-2.my-username.cont.dockerapp.io:49156->80/tcp -lb-1 9793e58b ▶ Running dockercloud/haproxy:latest /run.sh 14 minutes ago 443/tcp, lb-1.my-username.cont.dockerapp.io:80->80/tcp -``` - -You should notice an URL endpoint in the *PORT* column for haproxy-1. In the -example above, this is `lb-1.my-username.cont.dockerapp.io:80`. Open the `lb-1` -URL in your browser or curl from the CLI. - -If you refresh or run curl multiple times, you should see requests distributed -between the two containers of the `web` service. You can see which container -responds to your request in the `Hostname` section of the response. - -```none -$ curl lb-1.$DOCKER_ID_USER.cont.dockerapp.io -Hello Friendly Users!
                  Hostname: web-1
                  Counter: Redis Cache not found, counter disabled.% -$ curl lb-1.$DOCKER_ID_USER.cont.dockerapp.io -Hello Friendly Users!
                  Hostname: web-2
                  Counter: Redis Cache not found, counter disabled.% -``` - -You can learn more about *dockercloud/haproxy*, our free open source HAProxy image here. - -## What's Next? - -[Provision a data backend for your service](10_provision_a_data_backend_for_your_service.md) diff --git a/docker-cloud/getting-started/deploy-app/index.md b/docker-cloud/getting-started/deploy-app/index.md deleted file mode 100644 index 8f50ea9007..0000000000 --- a/docker-cloud/getting-started/deploy-app/index.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -description: Go or Python and Docker Cloud -keywords: Python, Go, Docker, Cloud, application -redirect_from: -- /docker-cloud/getting-started/python/ -- /docker-cloud/getting-started/golang/ -title: Deploy an application ---- - -* [Introduction to Deploying an app to Docker Cloud](1_introduction.md) -* [Set up your environment](2_set_up.md) -* [Prepare the application](3_prepare_the_app.md) -* [Push an image to Docker Cloud's Registry](4_push_to_cloud_registry.md) -* [Deploy the app as a Docker Cloud service](5_deploy_the_app_as_a_service.md) -* [Define environment variables](6_define_environment_variables.md) -* [Scale the service](7_scale_the_service.md) -* [View service logs](8_view_logs.md) -* [Load-balance the service](9_load-balance_the_service.md) -* [Provision a data backend for the service](10_provision_a_data_backend_for_your_service.md) -* [Stackfiles for your service](11_service_stacks.md) -* [Data management with Volumes](12_data_management_with_volumes.md) \ No newline at end of file diff --git a/docker-cloud/getting-started/images/create-first-service.png b/docker-cloud/getting-started/images/create-first-service.png deleted file mode 100644 index afafcc731f..0000000000 Binary files a/docker-cloud/getting-started/images/create-first-service.png and /dev/null differ diff --git a/docker-cloud/getting-started/images/first-service-container-list.png b/docker-cloud/getting-started/images/first-service-container-list.png deleted file mode 100644 index 694d0039d4..0000000000 Binary files a/docker-cloud/getting-started/images/first-service-container-list.png and /dev/null differ diff --git a/docker-cloud/getting-started/images/first-service-container.png b/docker-cloud/getting-started/images/first-service-container.png deleted file mode 100644 index 293a8ca1eb..0000000000 Binary files a/docker-cloud/getting-started/images/first-service-container.png and /dev/null differ diff --git a/docker-cloud/getting-started/images/first-service-create-and-deploy-button.png b/docker-cloud/getting-started/images/first-service-create-and-deploy-button.png deleted file mode 100644 index a0747af0f7..0000000000 Binary files a/docker-cloud/getting-started/images/first-service-create-and-deploy-button.png and /dev/null differ diff --git a/docker-cloud/getting-started/images/first-service-ports.png b/docker-cloud/getting-started/images/first-service-ports.png deleted file mode 100644 index 1400b1123a..0000000000 Binary files a/docker-cloud/getting-started/images/first-service-ports.png and /dev/null differ diff --git a/docker-cloud/getting-started/images/first-service-timeline.png b/docker-cloud/getting-started/images/first-service-timeline.png deleted file mode 100644 index 870dc058dc..0000000000 Binary files a/docker-cloud/getting-started/images/first-service-timeline.png and /dev/null differ diff --git a/docker-cloud/getting-started/images/first-service-webpage.png b/docker-cloud/getting-started/images/first-service-webpage.png deleted file mode 100644 index ce1a8754fe..0000000000 Binary files a/docker-cloud/getting-started/images/first-service-webpage.png and /dev/null differ diff --git a/docker-cloud/getting-started/images/first-service-wizard.png b/docker-cloud/getting-started/images/first-service-wizard.png deleted file mode 100644 index ee89ee5107..0000000000 Binary files a/docker-cloud/getting-started/images/first-service-wizard.png and /dev/null differ diff --git a/docker-cloud/getting-started/images/first_node.png b/docker-cloud/getting-started/images/first_node.png deleted file mode 100644 index 51473705d6..0000000000 Binary files a/docker-cloud/getting-started/images/first_node.png and /dev/null differ diff --git a/docker-cloud/getting-started/index.md b/docker-cloud/getting-started/index.md deleted file mode 100644 index a8604e3927..0000000000 --- a/docker-cloud/getting-started/index.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -description: 'Getting Started with Docker Cloud: Setting up a node using a hosted - cloud provider or your own nodes, deploying a service and clustering.' -keywords: one, two, three -title: Getting started with Docker Cloud -notoc: true ---- - -If you're completely new to Docker Cloud, start here! - -* [Introducing Docker Cloud](intro_cloud.md) Start here! Then, you can either: - * [Link to your Infrastructure](connect-infra.md) Link one of the following providers: - * [Link your Amazon Web Services account](../infrastructure/link-aws.md) - * [Link your Microsoft Azure account](../infrastructure/link-azure.md) - * [Link your Digital Ocean account](../infrastructure/link-do.md) - * [Link your Packet account](../infrastructure/link-packet.md) - * [Link your SoftLayer account](../infrastructure/link-softlayer.md) - * [Set up self-hosted nodes](../infrastructure/byoh.md) ...Or bring your own hosts -* [Deploy your first node](your_first_node.md) Then, deploy your first nodes, -* [Create your first service](your_first_service.md) ...And finish by deploying your first service. - -Ready to deploy your first web service? [Deploy a web application in Docker Cloud](deploy-app/index.md) diff --git a/docker-cloud/getting-started/intro_cloud.md b/docker-cloud/getting-started/intro_cloud.md deleted file mode 100644 index 868c0f4862..0000000000 --- a/docker-cloud/getting-started/intro_cloud.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -description: Introducing Docker Cloud concepts and terminology -keywords: node, create, understand -redirect_from: -- /docker-cloud/getting-started/beginner/intro_cloud/ -title: Introducing Docker Cloud ---- - -This page introduces core Docker Cloud concepts and features so you can easily follow along with the tutorial. - -The tutorial goes through the following steps: - -1. Set up your hosts by linking to a cloud service provider or your own Linux hosts. -2. Deploy your first node cluster. -3. Deploy your first service. - -Know all this stuff already? Skip to [Link to your infrastructure](connect-infra.md). - -## What is a node? -A node is an individual Linux host used to deploy and run your applications. Docker Cloud does not provide hosting services, so all of your applications, services, and containers run on your own hosts. Your hosts can come from several different sources, including physical servers, virtual machines or cloud providers. - -## What is a node cluster? -When launching a node from a cloud provider you actually create a node cluster. Node Clusters are groups of nodes of the same type and from the same cloud provider. Node clusters allow you to scale the infrastructure by provisioning more nodes with a drag of a slider. - -### Use cloud service providers -Docker Cloud makes it easy to provision nodes from existing cloud providers. If you already have an account with an infrastructure as a service provider, you can provision new nodes directly from within Docker Cloud. Today we have native support for Amazon Web Services, DigitalOcean, Microsoft Azure, Packet.net, and IBM SoftLayer. - -### Use your own hosts ("Bring your own nodes") -You can also provide your own node or nodes. This means you can use any Linux host connected to the Internet as a Docker Cloud node as long as you can install a Cloud agent. The agent registers itself with your Docker account, and allows you to use Docker Cloud to deploy containerized applications. - -## What is a service? -Services are logical groups of containers from the same image. Services make it simple to scale your application across different nodes. In Docker Cloud you drag a slider to increase or decrease the availability, performance, and redundancy of the application. Services can also be linked one to another even if they are deployed on different nodes, regions, or even cloud providers. - -## Let's get started! -Log in to Docker Cloud using your Docker ID. (These are the same credentials you used for Docker Hub if you had an account there.) - -Start here [by linking your infrastructure to Docker Cloud](connect-infra.md). diff --git a/docker-cloud/getting-started/your_first_node.md b/docker-cloud/getting-started/your_first_node.md deleted file mode 100644 index fadb06c5bf..0000000000 --- a/docker-cloud/getting-started/your_first_node.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -description: Deploy your first node on Docker Cloud -keywords: node, create, understand -redirect_from: -- /docker-cloud/getting-started/beginner/your_first_node/ -- /docker-cloud/getting-started/beginner/deploy_first_node/ -title: Deploy your first node -notoc: true ---- - -In this step you create your first node (inside a node cluster) on Docker Cloud. - -After you link your Docker Cloud account with your hosts (either your own hosts or one or more cloud providers), the next step is to launch your first node. - -When launching a node you actually create a _node cluster_. Node clusters are groups of nodes of the same type and from the same cloud provider, and they allow you to scale the infrastructure by provisioning more nodes with a drag of a slider. - - To start, go to the **Nodes** section and click **Create**. - -![](images/first_node.png) - -Enter the following: - - - **Name**: name for the node cluster. This can contain alphanumeric characters, dashes, and underscores. - - **Deploy tags**: (optional) these are used to limit what can be deployed on the specific cluster. Read more about deployment tags [here](../apps/deploy-tags.md). - - **Provider**: the cloud provider or host to use. Only providers you have configured appear in this menu. - - **Region**: the region on which to provision the node cluster. - - **Type/size**: the type and size of the nodes in the cluster. - - **Number of nodes**: the number of nodes to create in the node cluster. This can be modified later. - - **Disk size**: the disk size for each node. - -> **Note**: You might see more or different options in this screen depending on which hosts or providers you're using. For example, DigitalOcean nodes have a fixed disk size depending on the type and size of the node you choose. - -Click **Launch node cluster** to provision this node cluster. It may take several minutes for the cluster to launch. To view and follow along with deployment progress, click into the node cluster, click the **Timeline** tab, then expand the **Node Cluster Deploy** item to view the console. - -Once the node cluster is deployed, a Success message appears near the top of the page. - -From the Node cluster detail view you can see the status of your nodes, destroy individual nodes or the whole cluster, upgrade individual nodes, and scale your node cluster from 1 to 10 nodes. You can also click an individual node's hostname to see which containers are running on it. - -## What's next? - -Now that you've got at least one **node** deployed, it's time to deploy your first **service**. - -Remember that a service is a group of containers from the same container image. Services make it simple to scale your application across a number of nodes. They can also be linked one to another even if they are deployed on different nodes, regions, or even on different cloud providers. - -[Continue the tutorial and deploy your first service](your_first_service.md). diff --git a/docker-cloud/getting-started/your_first_service.md b/docker-cloud/getting-started/your_first_service.md deleted file mode 100644 index 97f1ffdf8a..0000000000 --- a/docker-cloud/getting-started/your_first_service.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -description: Deploy your first service on Docker Cloud -keywords: service, Cloud, three -redirect_from: -- /docker-cloud/getting-started/beginner/your_first_service/ -- /docker-cloud/getting-started/beginner/deploy_first_service/ -title: Create your first service ---- - -This page describes how to create a service on Docker Cloud. - -## What is a service? - -A service is a group of containers of the same **image:tag**. Services make it simple to scale your application. With Docker Cloud, you simply drag a slider to change the number of containers in a service. - -Before you can deploy a service in Docker Cloud, you must have at least one node deployed. If you haven't done this yet [follow the tutorial to deploy a node](your_first_node.md). - -When you create a service in the Docker Cloud web interface, a wizard walks you through configuring the service in three steps. - -1. **Choose a Container Image** Images can come from Docker Cloud's Jumpstarts library, your personal Docker Hub account or Docker Hub's public index, or from third party registries you connect. -1. **Configure the Service** From here, give the service a name, set the initial number of containers, expose/publish ports, modify the run command or entrypoint, set memory and CPU limits. -1. **Set Environment variables** Set the edit environment variables and link your service to other existing services in Docker Cloud. - -> **Note**: In this Quickstart tutorial we don't work with environment variables or connect [data volumes](../apps/volumes.md), but these are also available as optional steps in the wizard. - -## Select a Service Image - -From any page on Docker Cloud, click the **Services** section, then click **Create**. - -![](images/create-first-service.png) - -For the purposes of this tutorial, click the rocket icon and look for the **Miscellaneous** section. - -You see an image called `dockercloud/hello-world`. -![](images/first-service-wizard.png) - -Click the **dockercloud/hello-world** image. This image creates a container that runs NGINX, and shows a simple *hello world* web page. - -## Configure the Service - -In this step Docker Cloud loads all of the Image tags available for the image. In this case our tutorial image **dockercloud/hello-world** only has one image tag called **latest**. - -For the purposes of this tutorial, you don't actually need to enter or change -anything for most of the fields on the Create Service page. - -### Publishing a port - -Since we need to access this container over the Internet, we first need to publish a port. By default, ports are not accessible publicly. To learn more about ports click [here](../apps/ports.md). - -Click the **Ports** table, where it says *Click to override ports defined in image*. This activates that section so you can make changes. Then click the **Published** checkbox. - -![](images/first-service-ports.png) - -For this tutorial leave the Node port set to *dynamic*. This means that **port 80** of the container is mapped to a random available port in the node in which the container is deployed. To force a specific port in the node, click *dynamic* and specify a port. - -> **Note**: Two containers in the same node cannot publish to the same *node port*. - -## Create and Deploy - -You don't need to modify anything else in this service for the tutorial, so click **Create and deploy**. Docker Cloud creates, and deploys your new service (just like it says on the tin!) - -![](images/first-service-create-and-deploy-button.png) - -Next, Cloud sends you to the Service's detailed view. The detailed view contains six informational sections: - - - **Containers**: lists the containers that are part of this service and their status. This is also where you'd go to launch more containers to scale a service. - - **Endpoints**: shows a list of available service and container endpoints. - - **Triggers**: allows you to set triggers that perform automatic actions such as scaling a node or redeploying an image when the source updates. - - **Links**: lists the links between services. For this tutorial this section is empty. - - **Volumes**: lists the volumes attached to the service to store data. For this tutorial this section is empty. - - **Environment Variables**: lists the environment variables for the service. - -Two additional tabs of information are available for each service: - - - **Logs**: shows check the recent logs from all the containers in this service. - - **Timeline**: a timeline of all the API calls, and accompanying logs, that were performed against this service. - - -Click the **Timeline** tab to see a log output similar to the one below. It can take a couple of minutes for the container to deploy. - -``` -Deploying... -Creating 1 new containers -Preparing to deploy container f93b1a05-4444-49e5-98b0-9dc3a7618453 -hello-world-1: Choosing best node. Deployment strategy: BALANCE -hello-world-1: Deploying in 8468426e-tutorial.node.dockerapp.io -hello-world-1: Pulling image dockercloud/hello-world:latest in 8468426e-tutorial.node.dockerapp.io -hello-world-1: Creating in 8468426e-tutorial.node.dockerapp.io -hello-world-1: Starting with docker id df9525795bef5394e1a33b2ef42e26ba991bdccece4bc4f4f34e1def5c095fe9 in 8468426e-tutorial.node.dockerapp.io -hello-world-1: Inspecting and checking its configuration -hello-world-1: Running in 8468426e-tutorial.node.dockerapp.io -``` - -The web interface looks something like this: - -![](images/first-service-timeline.png) - -The **hello-world** status line updates to **Running** once the container deploys successfully. - -The **Containers** list shows all of the containers in this service. There should just be one for now. - -![](images/first-service-container-list.png) - -Click the container's name to go to the Container's detail view. From -this page you can see additional information about the containers, such as -endpoints, logs, environment variables, volumes, a terminal, and the console -timeline. - -![](images/first-service-container.png) - -The **Endpoints** section lists the endpoints (ports) that this container is publishing. In the screenshot above, there is a single endpoint: **hello-world-66622790-1.9ab56d66.container.docker.io:32768**. The endpoint is composed of both the container's hostname and a port number. - -Click the links icon to the right of the endpoint. This opens a new tab and shows the webpage that the **hello-world** container is hosting. - -![](images/first-service-webpage.png) - -**Congratulations!** You've successfully deployed your first service using Docker Cloud. - -## Optional cleanup - -You probably don't need the `hello-world` container to run for very long after you complete the tutorial. To clean up and remove all of the resources you created during this tutorial: - -- Click **Services**, hover over the `hello-world` container and click the selection box that appears, then click the **Terminate** icon to the right of the service information. -- Click **Node Clusters**, select the node cluster you created, and click the **Terminate** icon at the right end of the cluster information. - -Both terminated Services and Node Clusters remain in the UI for about five minutes. After that time, they no longer appear. - -## What's next? - -Learn more about [scaling your service](../apps/service-scaling.md), or check out some of our other [Deploy an app tutorial](deploy-app/index.md). diff --git a/docker-cloud/images/Beta-Swarm-Mode-List-View.png b/docker-cloud/images/Beta-Swarm-Mode-List-View.png deleted file mode 100644 index 698fe1dc77..0000000000 Binary files a/docker-cloud/images/Beta-Swarm-Mode-List-View.png and /dev/null differ diff --git a/docker-cloud/images/Docker-Cloud-Blue.png b/docker-cloud/images/Docker-Cloud-Blue.png deleted file mode 100644 index 94de0f4666..0000000000 Binary files a/docker-cloud/images/Docker-Cloud-Blue.png and /dev/null differ diff --git a/docker-cloud/images/Docker-Cloud-Blue.svg b/docker-cloud/images/Docker-Cloud-Blue.svg deleted file mode 100644 index 56fc7a8b7c..0000000000 --- a/docker-cloud/images/Docker-Cloud-Blue.svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docker-cloud/images/Docker-Cloud-white.svg b/docker-cloud/images/Docker-Cloud-white.svg deleted file mode 100644 index 22f38ea865..0000000000 --- a/docker-cloud/images/Docker-Cloud-white.svg +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docker-cloud/images/cloud-build.png b/docker-cloud/images/cloud-build.png deleted file mode 100644 index a9ef1ceb4b..0000000000 Binary files a/docker-cloud/images/cloud-build.png and /dev/null differ diff --git a/docker-cloud/images/cloud-clusters.png b/docker-cloud/images/cloud-clusters.png deleted file mode 100644 index 7497b598bb..0000000000 Binary files a/docker-cloud/images/cloud-clusters.png and /dev/null differ diff --git a/docker-cloud/images/cloud-stack.png b/docker-cloud/images/cloud-stack.png deleted file mode 100644 index fe7a57d946..0000000000 Binary files a/docker-cloud/images/cloud-stack.png and /dev/null differ diff --git a/docker-cloud/images/play-button.png b/docker-cloud/images/play-button.png deleted file mode 100644 index a24989917a..0000000000 Binary files a/docker-cloud/images/play-button.png and /dev/null differ diff --git a/docker-cloud/images/play-button.snagproj b/docker-cloud/images/play-button.snagproj deleted file mode 100644 index 8be8239698..0000000000 Binary files a/docker-cloud/images/play-button.snagproj and /dev/null differ diff --git a/docker-cloud/images/slack-notification-updates.png b/docker-cloud/images/slack-notification-updates.png deleted file mode 100644 index f72a02dbed..0000000000 Binary files a/docker-cloud/images/slack-notification-updates.png and /dev/null differ diff --git a/docker-cloud/images/slack-oauth-authorize.png b/docker-cloud/images/slack-oauth-authorize.png deleted file mode 100644 index 3f3a4c6d73..0000000000 Binary files a/docker-cloud/images/slack-oauth-authorize.png and /dev/null differ diff --git a/docker-cloud/index.md b/docker-cloud/index.md deleted file mode 100644 index 50435278a6..0000000000 --- a/docker-cloud/index.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -description: Docker Cloud -keywords: Docker, cloud -notoc: true -title: Welcome to the Docker Cloud docs! -redirect_from: -- /engine/installation/cloud/cloud/ -- /engine/installation/cloud/ -- /engine/installation/cloud/overview/ -- /engine/installation/google/ -- /engine/installation/softlayer/ -- /engine/installation/rackspace/ -- /engine/installation/joyent/ ---- - -
                  -
                  Docker Cloud logo
                  -
                  - -Docker Cloud provides a hosted [registry service](builds/repos.md) with -[build](builds/automated-build.md) and [testing](builds/automated-testing.md) -facilities for Dockerized application images; tools to help you set up and -[manage host infrastructure](infrastructure/); and [application lifecycle features](apps/) to automate deploying (and redeploying) services created from -images. - -Log in to Docker Cloud using your free [Docker ID](../docker-id/). - - - - - - - - - - - - - - - - - - - - - -
                  Manage Builds and ImagesManage Swarms (Beta Swarm Mode)

                  Build and test your code, and build Docker images. Link Cloud repositories to your source code provider to automate building images and pushing them to Cloud.

                  Provision swarms to popular cloud providers, register existing swarms, and use your Docker ID to authenticate and securely access personal or team swarms.

                  Manage Infrastructure (Standard Mode)Manage Nodes and Apps (Standard Mode)

                  Link to your hosts, upgrade the Docker Cloud agent, and manage container distribution. See the AWS FAQ and Packet.net FAQ.

                  Deploy and manage nodes, services, and applications in Docker Cloud (Standard Mode).

                  API Docs    ●    Frequently Asked Questions    ●    Release Notes
                  - -## About Docker Cloud - -### Images, Builds, and Testing - -Docker Cloud uses the hosted Docker Cloud Registry, which allows you to publish -Dockerized images on the internet either publicly or privately. Docker Cloud can -also store pre-built images, or link to your source code so it can build the -code into Docker images, and optionally test the resulting images before pushing -them to a repository. - -![Build configuration of repo](images/cloud-build.png) - -### Swarm Management (Beta Swarm Mode) - -With [Beta Swarm Mode](/docker-cloud/cloud-swarm/index.md), you can create new -swarms from within Docker Cloud, register existing swarms to Docker Cloud, or -provision swarms to your cloud providers. Your Docker ID authenticates and -securely accesses personal or team swarms. Docker Cloud allows you to connect -your local Docker Engine to any swarm you have access to in Docker Cloud. - -![Swarm mode list](images//Beta-Swarm-Mode-List-View.png) - -### Infrastructure management (Standard Mode) - -Before you can do anything with your images, you need somewhere to run them. -Docker Cloud allows you to link to your infrastructure or cloud services -provider so you can provision new nodes automatically. Once you have nodes set -up, you can deploy images directly from Docker Cloud repositories. - -![Node clusters](images/cloud-clusters.png) - -### Services, Stacks, and Applications (Standard Mode) - -Images are just one layer in containerized applications. Once you've built an -image, you can use it to deploy services (which are composed of one or more -containers created from an image), or use Docker Cloud's -[stackfiles](apps/stacks.md) to combine it with other services and -microservices, to form a full application. - -![Stacks/Wizard - editing yaml file](images/cloud-stack.png) diff --git a/docker-cloud/infrastructure/byoh.md b/docker-cloud/infrastructure/byoh.md deleted file mode 100644 index be0ab47ed1..0000000000 --- a/docker-cloud/infrastructure/byoh.md +++ /dev/null @@ -1,132 +0,0 @@ ---- -description: Use the Docker Cloud Agent -keywords: agent, Cloud, install -redirect_from: -- /docker-cloud/feature-reference/byoh/ -- /docker-cloud/tutorials/byoh/ -- /docker-cloud/getting-started/use-byon/ -title: Use the Docker Cloud Agent ---- - -Docker Cloud allows you to use any Linux host ("bring your own host") as a node which you can then use to deploy containers. To do this, you must install the **Docker Cloud Agent** on your Linux host so that Docker Cloud can remotely manage it. - -> **Note**: The Docker Cloud Agent only supports x64 architecture at this time. - -The **Docker Cloud Agent** installs its own Docker binary, and automatically removes any prior installation of the Docker Engine packages. See the [Known Limitations](byoh.md#known-limitations) section for more information. - -You can still run `docker` CLI commands on a host that is running the Docker Cloud Agent. If you do this, you might see the Docker Cloud system containers that start with `dockercloud/`. - - -## Install the Docker Cloud Agent - -1. Before you begin, make sure that ports **6783/tcp** and **6783/udp** are open on the target host. Optionally, open port **2375/tcp** too. - - The first two ports allow the node to join the overlay network that allows [service discovery](../apps/service-links.md) among nodes on a Docker Cloud account. Port 2375 allows Docker Cloud to contact the Docker daemon on the host directly using TLS mutual authentication. If this port is not open, Docker Cloud sets up a reverse tunnel from the host to access this port. - -2. Log in to Docker Cloud and go to the **Node dashboard**. - -3. Click **Bring your own node**. - - The dialog that appears lists the currently supported distributions of Linux, and provides a command that you can copy. - This command includes a token that allows the agent to talk to Docker Cloud. - - ![](images/node-byoh-wizard-v2.png) - -4. Copy the command to your clipboard. - -5. Execute this command on your Linux host. - - The command downloads a script which installs and configures the Docker Cloud Agent, and registers it with Docker Cloud. - -6. Confirm that the new Linux host appears in the Node dashboard in Docker Cloud. The node is now ready to accept container deployments! - -7. Repeat this process for each host. - -## Install the Docker Cloud Agent using the CLI - -If you prefer not to use the web interface, you can generate the command needed -to install and configure the **Docker Cloud Agent** using the `docker-cloud` -CLI. - -To generate the command with the token, run: - -``` -$ docker-cloud node byo -``` - -The command outputs the following, including the installation command instructions and the associated registration token. - -``` -Docker Cloud lets you use your own servers as nodes to run containers. For -this you have to install our agent. - -Run the following command on your server: - -curl -Ls https://get.cloud.docker.com/ | sudo -H sh -s 63ad1c63ec5d431a9b31133e37e8a614 -``` - -Copy and paste this command, and execute it on your host. The host automatically -appears in the list of nodes once the process completes. - -## Uninstall the Docker Cloud Agent - -To uninstall `dockercloud-agent` from your host, execute the following command: - -``` -$ apt-get remove dockercloud-agent -``` - -## Upgrade Docker Cloud Agent - -To upgrade `dockercloud-agent`, execute the following command on the host: - -``` -$ apt-get update && apt-get install -y dockercloud-agent -``` - -## Restart Docker Cloud Agent - -To restart the `dockercloud-agent`, execute the following command from your BYON host: - -``` -$ service dockercloud-agent restart -``` - -## Known limitations - -### Firewall requirements - -The following ports **must** be opened in any firewalls: - -* **6783/tcp** and **6783/udp**: These ports allow the node to join the private overlay network for containers in other nodes. - -You should also open the following ports: - -* **2375/tcp**: This allows Docker Cloud to communicate with the Docker daemon running in the node. If port 2375 is not accessible, Docker Cloud attempts to connect with the node through a secure reverse tunnel. - -You must also open any ports that you plan to publish in your services, however these are not required to install the Docker Cloud Agent. - -### Supported Linux distributions - -The **Docker Cloud Agent** has been tested on: - -- Ubuntu 14.04, 15.04, 15.10 -- Debian 8 -- Centos 7 -- Red Hat Enterprise Linux 7 -- Fedora 21, 22, 23 - -Contact Docker support if you have a different distribution that you would like -to have supported. - -### Install Docker Cloud Agent on a node with Docker already installed - -If you install the Docker Cloud Agent on a node which already has Docker Engine -installed, `apt-get` removes the older `docker` installation, then installs the -`docker` binary that is bundled with `dockercloud-agent`. The installation -script also tries to install the kernel headers required for `AUFS` support. - -> **Note**: If you remove, upgrade, or install over the version of Docker Engine bundled with the Docker Cloud Agent, your nodes may not maintain a connection with Docker Cloud correctly. You must reinstall a compatible Engine version (currently version 1.11.2-cs5). Contact Docker Support for more information. - -* If you were already using the `AUFS` storage driver before installing `dockercloud-agent`, your existing containers and images appear automatically once installation finishes. -* If you were using `devicemapper` or any other storage driver, and the `AUFS` driver installs successfully you can't use your existing containers and images. You can check if the installation succeeded by running `docker info | grep Storage`. diff --git a/docker-cloud/infrastructure/cloud-on-aws-faq.md b/docker-cloud/infrastructure/cloud-on-aws-faq.md deleted file mode 100644 index 9cd0e03b38..0000000000 --- a/docker-cloud/infrastructure/cloud-on-aws-faq.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -description: Docker Cloud on AWS -keywords: Cloud, AWS, faq -redirect_from: -- /docker-cloud/faq/cloud-on-aws-faq/ -title: Use Docker Cloud on AWS ---- - -This section answers frequently asked questions about using Docker Cloud with -Amazon Web Services (AWS). - -## I can't get my account to link to Docker Cloud. How do I troubleshoot it? - -To validate your AWS Security Credentials, Docker Cloud tries to dry-run an -instance on every region. Credentials are marked as valid if the operation -succeeds at least in one of the regions. If you get the following message -`Invalid AWS credentials or insufficient EC2 permissions` follow these steps to -troubleshoot it: - -1. [Download AWS CLI](https://aws.amazon.com/cli/){: target="_blank" class="_"}. -2. [Configure the CLI](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html){: target="_blank" class="_"} with your security credentials. -2. Run the following command: - - ``` - aws ec2 run-instances --dry-run --image-id ami-4d883350 --instance-type m3.medium - ``` - -This tries to dry-run an Ubuntu 14.04 LTS 64-bit in `sa-east-1` (Sao Paulo, -South America). You can look for the AMI in the region you want to deploy to -[here](http://cloud-images.ubuntu.com/locator/ec2/){: target="_blank" -class="_"}. It should show you the error message. If your configuration is -correct, you see the following message: - -``` -A client error (DryRunOperation) occurred when calling the RunInstances operation: Request would have succeeded, but DryRun flag is set. -``` - -## "AWS returned an error: unauthorized operation" using instance profiles to deploy node clusters - -This error occurs when you are using an instance profile that has more -permissions than the IAM user you are using with Docker Cloud. You can fix this -by adding the `"Action":"iam:PassRole"` permission to the IAM policy for the -`dockercloud` service user. You can read more about this -[here](http://blogs.aws.amazon.com/security/post/Tx3M0IFB5XBOCQX/Granting-Permission-to-Launch-EC2-Instances-with-IAM-Roles-PassRole-Permission){: -target="_blank" class="_"}. - -## What objects does Docker Cloud create in my EC2 account? - -If you decide to let Docker Cloud create elements for you, it creates: - -- A VPC with the tag name `dc-vpc` and CIDR range `10.78.0.0/16`. -- A set of subnets if there are no subnets already created in the VPC. Docker Cloud creates a subnet in every Availability Zone (AZ) possible, and leaves enough CIDR space for the user to create customized subnets. Every subnet created is tagged with `dc-subnet`. -- An internet gateway named `dc-gateway` attached to the VPC. -- A route table named `dc-route-table` in the VPC, associating the subnet with the gateway. - -## How can I customize VPC/IAM elements in Docker Cloud through the AWS dashboard? - -Users with AWS EC2-VPC accounts can customize any of the elements explained -above through the AWS API or the dashboard. - -In the launch node cluster view, you can choose: - -- VPC dropdown: - 1. `Auto` - Delegates creation of the VPC to Docker Cloud. - 2. `vpc-XXXX (dc-vpc)` - Docker Cloud's default VPC. This only appears if you have already deployed nodes to that region. You can choose subnets and security groups with the VPC. See "Which objects does Docker Cloud create in my EC2 account" for detailed info. - 3. `vpc-XXXX` - You can select one of the VPCs already created by you. If you tag name them, it is displayed too. -- Subnets dropdown: - 1. `Auto` - Delegates the management of the subnets to Docker Cloud. Creates them if they do not exist or uses the ones tagged with `dc-subnet`. - 2. Multiple selection of existing subnets. See `How does Docker Cloud balance my nodes among different availability zones?` section for detailed info. -- Security groups dropdown: - 1. `Auto` - 2. Multiple selection of existing security groups. -- IAM roles dropdown: - 1. `None` - Docker Cloud does not apply any instance profiles to the node. - 2. `my_instance_role_name` - You can select one of the IAM roles already created by you. - -## How do I customize VPC/IAM elements in Docker Cloud using the API? - -Add the following section to your body parameters: - -```json -"provider_options" = { - "vpc": { # optional - "id": "vpc-xxxxxxxx", # required - "subnets": ["subnet-xxxxxxxx", "subnet-yyyyyyyy"], # optional - "security_groups": ["sg-xxxxxxxx"] # optional - }, - "iam": { # optional - "instance_profile_name": "my_instance_profile_name" # required - } -} -``` - -## How does Docker Cloud balance my nodes among different availability zones? (high availability schema) - -By default, Docker Cloud tries to deploy your node cluster using a high -availability strategy. To do this, it places every instance one by one in the -less populated availability zone for that node cluster. We can see this behavior -with some examples: - -### We allow Docker Cloud to manage VPCs and subnets - -Docker Cloud can take over VPC and subnet management for you when you deploy a -node cluster. - -For example, assume this is the first time you're deploying a node cluster. You -delegate deployment management to Docker Cloud in the Sao Paulo (South America, -`sa-east-1`) region. You don't send any `provider_options` using the API, and -you leave the VPC, subnet, security groups and IAM role values set to their -defaults on the dashboard. In this situation: - -1. Docker Cloud looks for a VPC called `dc-vpc`. The VPC does not exist on the first try, so Docker Cloud creates it and a `dc-gateway`, which attaches to the VPC. -2. Docker Cloud retrieves all subnets in the VPC. No subnets exist on the first try. -3. Docker Cloud creates the subnet. -4. For every availability zone (AZ), Docker Cloud splits the VPC CIDR IP space in (# of AZs + 1) blocks and tries to create (# of AZs) subnets. Remember, we left space for custom subnets. -5. For every subnet, Docker Cloud tries to dry-run an instance of the selected type and creates it if the operation succeeds, creating and associating a `dc-route-table` to the subnet. -6. Once all subnets have been created, Docker Cloud deploys every node of the cluster using a round-robin pattern. - -> **Note** If the `dry-run` fails on any of the availability zones, you may see fewer subnets than were originally specified by the number of zones. - -### Scaling a node cluster - -Following the example in the previous section, you have a node cluster deployed and want to scale it up. Docker Cloud: - -1. Looks for `dc-vpc`. Found! -2. Looks for `dc-subnet`s. Found! -3. Counts the nodes in every subnet. -4. Chooses the less populated subnet and deploys the next node there. -4. Repeats until all nodes are deployed. - -### We choose where to deploy - -What if you have another VPC for some other purpose, (the components already exist) and you want to deploy a node cluster in that VPC. - -Docker Cloud: - -1. Looks for the selected VPC. Found! -2. Looks for selected subnets. If you do not select any subnets, Docker Cloud tries to create them using the rules previously described. -3. If you selected more than one subnet, Docker Cloud distributes the nodes in the cluster among those subnets. If not, all nodes are placed in the same subnet. - -## What happens if I restart a node in the AWS console? - -After the node boots up, the Docker Cloud Agent tries to contact the Cloud API -and register itself with its new IP. Once it registers, Docker Cloud -automatically updates the DNS of the node and the containers on it to use the -new IP. The node's state changes from `Unreachable` to `Deployed`. - -## Can I use an elastic IP for my nodes? - -Yes. However, you must restart the Docker Cloud Agent (or the host) for the -changes to take effect in Docker Cloud. - -## What happens when I terminate a node from the AWS console? - -If you created the node using Docker Cloud, but you terminate it in the AWS -console, all data in that node is destroyed as the volume attached to it is set -to destroy on node termination. As long as the Docker Cloud IAM user still has -access, Cloud detects the termination and marks the node as `Terminated`. - -If you created the host yourself, added it to Docker Cloud as a "Bring Your Own -Node" and then terminated it, the node stays in the `Unreachable` state until -you manually remove it. - -## How do I SSH into a node? - -Use the instructions [here](ssh-into-a-node.md) to access your nodes over SSH. -If you chose a custom security group, remember to open port 22. - -## How do I back up my Docker container volumes to AWS S3? - -Use the [dockercloud/dockup](https://hub.docker.com/r/dockercloud/dockup/){: -target="_blank" class="_"} utility image to back up your volumes. You only need -to run it taking the volumes of the container you want to back up with -`volumes-from` and pass it the environment configuration of the container. You -can find more information in its Github repository. diff --git a/docker-cloud/infrastructure/cloud-on-packet.net-faq.md b/docker-cloud/infrastructure/cloud-on-packet.net-faq.md deleted file mode 100644 index f0fa027f12..0000000000 --- a/docker-cloud/infrastructure/cloud-on-packet.net-faq.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -description: Docker Cloud and Packet.net -keywords: Packet.net, Cloud, drives -redirect_from: -- /docker-cloud/faq/cloud-on-packet.net-faq/ -title: Use Docker Cloud and Packet.net ---- - -This page answers frequently asked questions about using Docker Cloud with Packet.net. - -## What does Docker Cloud create in my Packet.net account? - -Docker Cloud creates a project named "Docker Cloud" which contains all the devices that Docker Cloud deploys, no matter what type of device you chose. - -Device storage is organized as follows: - -- Type 1 devices have a RAID 1 of two SSD drives mounted in `/`. -- Type 3 devices also have a RAID 1 of two SSD drives mounted in `/`, and also offer two NVMe drives without being mounted. Docker Cloud mounts a RAID 1 in `/var/lib/docker`. - -An SSH keypair named `dockercloud-` is created if no key is found in your account. - -## How long does it take to deploy a Packet.net device? - -Docker Cloud deploys Ubuntu 14.04 LTS images on both types. Type 1 takes between -5 and 10 minutes to initialize, while type 3 can take up to 15 minutes. The Packet.net engineering team is working to reduce these deployment times. - -## What happens if I restart a node in the Packet.net portal? - -After the node boots up, the Docker Cloud Agent contacts Docker Cloud using the -API and registers itself with its new IP. Cloud then automatically updates the -DNS of the node and the containers on it to use the new IP. The node changes -state from `Unreachable` to `Deployed`. - -## Can I terminate a node from the Packet.net portal? - -If you create a node using Docker Cloud but terminate it from the Packet.net -portal, all data in the node is destroyed. Docker Cloud detects the termination -and marks the node as `Terminated`. - -If you turn off the device, Docker Cloud marks it as `Unreachable` because the -node has not been terminated, but Cloud cannot contact it. - -If you created the host yourself, added it to Docker Cloud as a "Bring Your Own -Node" and then terminated it, the node is marked as `Unreachable` until you -manually remove it. - -## How can I log in to a Packet.net node managed by Docker Cloud? - -Packet.net copies SSH keys into the created device. This means you can upload your own SSH public key to Packet.net's portal and then SSH into the node using the `root` user. You can also log in to the node from Packet's console, or use a container to copy your SSH keys into the node, as explained in [Sshing into a node](../infrastructure/ssh-into-a-node.md). - -## Packet has returned an error, what can I do? - -Here is a list of known errors thrown by Packet.net API: - -- **You have reached the maximum number of projects you can create (number)**. Please contact `help@packet.net` -> Packet.net limits the number of projects that an account can create. Delete projects in the account or contact [Packet.net](https://www.packet.net/) support to increase the limit. -- **There is an error with your Packet.net account**. Please contact `help@packet.net` -> There is something else wrong with your Packet.net account. Contact [Packet.net](https://www.packet.net/) for more details. diff --git a/docker-cloud/infrastructure/deployment-strategies.md b/docker-cloud/infrastructure/deployment-strategies.md deleted file mode 100644 index 6419bbc9c3..0000000000 --- a/docker-cloud/infrastructure/deployment-strategies.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -description: Schedule a deployment -keywords: schedule, deployment, container -redirect_from: -- /docker-cloud/feature-reference/deployment-strategies/ -title: Container distribution strategies ---- - -Docker Cloud can use different distribution strategies when deploying containers -to more than one node. You can use different strategies to change how your -service distributes new containers when scaling. - -## Set a deployment distribution strategy - -You can set the deployment strategy when creating a service, either through the -Docker Cloud web UI, or using the API or CLI. You can also specify a -deployment strategy in the [stack file](../apps/stack-yaml-reference.md) used to -define a [service stack](../apps/stacks.md). - -For all methods, the default deployment strategy is "Emptiest node". - -### Emptiest node (default) - -This is the default strategy, and is commonly used to balance the total load of -all services across all nodes. - -A service configured to deploy using the `EMPTIEST_NODE` strategy deploys its -containers to the nodes that match its [deploy tags](../apps/deploy-tags.md) -with the **fewest total containers** at the time of each container's deployment, -regardless of the service. - -### High availability - -This setting is typically used to increase the service availability. - -A service using the `HIGH_AVAILABILITY` strategy deploys its containers to the -node that matches its deploy tags with the **fewest containers of that service** -at the time of each container's deployment. This means that the containers are -spread across all nodes that match the deploy tags for the service. - -### Every node - -A service using the `EVERY_NODE` strategy deploys one container **on each node** that matches its deploy tags. - -When a service uses the `EVERY_NODE` strategy: - -* A new container is deployed to every new node that matches the service's deploy tags. -* The service cannot be manually scaled. -* If the service uses volumes, each container on each node has a different volume. -* If an `EVERY_NODE` "client" service is linked to a "server" service that is also using the `EVERY_NODE` strategy, containers are linked one-to-one on each node. The "client" services are *not* automatically linked to "server" services on other nodes. - -> **Note**: Because of how links are configured when using the **every node** -> strategy, you cannot currently switch from **every node** to **high -> availability** or **emptiest node** and vice versa. diff --git a/docker-cloud/infrastructure/docker-upgrade.md b/docker-cloud/infrastructure/docker-upgrade.md deleted file mode 100644 index 68e496f8e5..0000000000 --- a/docker-cloud/infrastructure/docker-upgrade.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -description: Upgrade Docker Engine on a node -keywords: upgrade, engine, node -redirect_from: -- /docker-cloud/feature-reference/docker-upgrade/ -- /docker-cloud/tutorials/docker-upgrade/ -title: Upgrade Docker Engine on a node ---- - -Docker Cloud helps you manage nodes that have Docker Engine installed on them. -You can upgrade the version of Docker Engine on your nodes when new versions are -released. Docker Cloud doesn't *automatically* upgrade your nodes for you -because your containers would need to be restarted to complete the upgrade. -Instead, we allow you to choose when you want to upgrade so you can plan for potential outage time during the restart. - -## Upgrade Docker Engine in a node - -Before you upgrade your nodes, go to the detail page of the node that you want to upgrade. On the left side is a **Docker Info** section that lists the currently installed version of Docker Engine. - -If a new version is available, an up-arrow icon and a **New Docker version available** message appear above the current version line. Click the up-arrow -icon to start the upgrade process. - -![](images/upgrade-message.png) - -After upgrading Docker Engine, any containers that was running before the -upgrade is automatically restarted, regardless of the -[autorestart](../apps/autorestart.md) setting. Containers that were stopped are not -restarted. - - -## Upgrade nodes using the API and CLI - -See our [API and CLI documentation](/apidocs/docker-cloud.md#upgrade-docker-daemon34) for more information on how to upgrade nodes with our API, SDKs, and the CLI. diff --git a/docker-cloud/infrastructure/images/aws-iam-role-1.png b/docker-cloud/infrastructure/images/aws-iam-role-1.png deleted file mode 100644 index a480ac26c5..0000000000 Binary files a/docker-cloud/infrastructure/images/aws-iam-role-1.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/aws-iam-role-2.png b/docker-cloud/infrastructure/images/aws-iam-role-2.png deleted file mode 100644 index e6c2916f06..0000000000 Binary files a/docker-cloud/infrastructure/images/aws-iam-role-2.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/aws-link-account.png b/docker-cloud/infrastructure/images/aws-link-account.png deleted file mode 100644 index 10223ac096..0000000000 Binary files a/docker-cloud/infrastructure/images/aws-link-account.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/aws-modal.png b/docker-cloud/infrastructure/images/aws-modal.png deleted file mode 100644 index 861a994394..0000000000 Binary files a/docker-cloud/infrastructure/images/aws-modal.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/azure-link-account.png b/docker-cloud/infrastructure/images/azure-link-account.png deleted file mode 100644 index 9dcffca716..0000000000 Binary files a/docker-cloud/infrastructure/images/azure-link-account.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/azure-link-modal.png b/docker-cloud/infrastructure/images/azure-link-modal.png deleted file mode 100644 index 0247d166e5..0000000000 Binary files a/docker-cloud/infrastructure/images/azure-link-modal.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/azure-portal-subscriptions.png b/docker-cloud/infrastructure/images/azure-portal-subscriptions.png deleted file mode 100644 index 373f1c4dfc..0000000000 Binary files a/docker-cloud/infrastructure/images/azure-portal-subscriptions.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/azure-upload-certificate.png b/docker-cloud/infrastructure/images/azure-upload-certificate.png deleted file mode 100644 index 9e80a0b5db..0000000000 Binary files a/docker-cloud/infrastructure/images/azure-upload-certificate.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/do-approve-access.png b/docker-cloud/infrastructure/images/do-approve-access.png deleted file mode 100644 index 32498d69cd..0000000000 Binary files a/docker-cloud/infrastructure/images/do-approve-access.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/do-link-account.png b/docker-cloud/infrastructure/images/do-link-account.png deleted file mode 100644 index 529a9ded48..0000000000 Binary files a/docker-cloud/infrastructure/images/do-link-account.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/do-login-screen.png b/docker-cloud/infrastructure/images/do-login-screen.png deleted file mode 100644 index 7a035f1ddd..0000000000 Binary files a/docker-cloud/infrastructure/images/do-login-screen.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/get-node-ip.png b/docker-cloud/infrastructure/images/get-node-ip.png deleted file mode 100644 index 2b5fb54927..0000000000 Binary files a/docker-cloud/infrastructure/images/get-node-ip.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/node-byoh-wizard-v2.png b/docker-cloud/infrastructure/images/node-byoh-wizard-v2.png deleted file mode 100644 index df42409f51..0000000000 Binary files a/docker-cloud/infrastructure/images/node-byoh-wizard-v2.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/packet-add-apikey.png b/docker-cloud/infrastructure/images/packet-add-apikey.png deleted file mode 100644 index 481b28d655..0000000000 Binary files a/docker-cloud/infrastructure/images/packet-add-apikey.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/packet-link-account.png b/docker-cloud/infrastructure/images/packet-link-account.png deleted file mode 100644 index 8f6751c1a4..0000000000 Binary files a/docker-cloud/infrastructure/images/packet-link-account.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/softlayer-link-account.png b/docker-cloud/infrastructure/images/softlayer-link-account.png deleted file mode 100644 index 5b175dd8e0..0000000000 Binary files a/docker-cloud/infrastructure/images/softlayer-link-account.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/softlayer-modal.png b/docker-cloud/infrastructure/images/softlayer-modal.png deleted file mode 100644 index 7fd0eb3ec1..0000000000 Binary files a/docker-cloud/infrastructure/images/softlayer-modal.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/softlayer-step-1.png b/docker-cloud/infrastructure/images/softlayer-step-1.png deleted file mode 100644 index c29ed0171b..0000000000 Binary files a/docker-cloud/infrastructure/images/softlayer-step-1.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/softlayer-step-2.png b/docker-cloud/infrastructure/images/softlayer-step-2.png deleted file mode 100644 index ed62e93528..0000000000 Binary files a/docker-cloud/infrastructure/images/softlayer-step-2.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/softlayer-step-6.png b/docker-cloud/infrastructure/images/softlayer-step-6.png deleted file mode 100644 index c7435a160e..0000000000 Binary files a/docker-cloud/infrastructure/images/softlayer-step-6.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/softlayer-step-7.png b/docker-cloud/infrastructure/images/softlayer-step-7.png deleted file mode 100644 index b153be5420..0000000000 Binary files a/docker-cloud/infrastructure/images/softlayer-step-7.png and /dev/null differ diff --git a/docker-cloud/infrastructure/images/upgrade-message.png b/docker-cloud/infrastructure/images/upgrade-message.png deleted file mode 100644 index 8bf177089e..0000000000 Binary files a/docker-cloud/infrastructure/images/upgrade-message.png and /dev/null differ diff --git a/docker-cloud/infrastructure/index.md b/docker-cloud/infrastructure/index.md deleted file mode 100644 index f8946447ac..0000000000 --- a/docker-cloud/infrastructure/index.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -description: Manage network in Docker Cloud -keywords: nodes, hosts, infrastructure, Cloud -title: Docker Cloud infrastructure overview (Standard Mode) ---- - -Docker Cloud uses an agent and system containers to deploy and manage nodes (hosts) on your behalf. All nodes accessible to your account are connected by an overlay or mesh network, regardless of host or cloud service provider. - -## Deploy nodes from Docker Cloud - -When you use Docker Cloud to deploy nodes on a hosted provider, the service stores your cloud provider credentials and then deploys nodes for you using the services' API to perform actions on your behalf. - -## Bring your own host - -If you are using [Bring Your Own Host](byoh.md), Docker Cloud provides a script that: - -- installs the Docker Cloud Agent on the host -- downloads and installs the latest Docker CS Engine version and the AUFS storage driver -- sets up TLS certificates and the Docker security configuration -- registers the host with Docker Cloud under your user account - -Once this connection is established, the Docker Cloud Agent manages the node and performs updates when the user requests them, and can also create and maintain a reverse tunnel to Docker Cloud if firewall restrictions prevent a direct connection. - -## Internal networking - -Docker Cloud communicates with the Docker daemon running in the node using the following IPs, on port **2375/tcp**. - -- 52.204.126.235/32 -- 52.6.30.174/32 -- 52.205.192.142/32 -- 52.205.2.114/32 - -If the port is not accessible, Docker Cloud creates a secure reverse tunnel from the nodes to Docker Cloud. - -When you add a node on Docker Cloud, the node joins the Weave private overlay network for containers in other nodes by connecting on ports **6783/tcp** and **6783/udp**. (You should make sure these ports are open.) - -## Node management - -Nodes managed by Docker Cloud are connected to any other nodes owned by the user or organization, regardless of the host or service provider. - -Docker Cloud uses system containers to do the following: - -- Set up a secure overlay network between all nodes using Weave -- Create a stream of Docker events from nodes to Docker Cloud -- Synchronize node clocks -- Rotate container logs when they exceed 10 MB -- Remove `Terminated` images (images not used by a container for 30 minutes) - - > **Note**: If this is not sufficient for your needs, you can add a logging container to your services. - -## Internal overlay network - -Docker Cloud creates a per-user overlay network which connects all containers across all of the user's hosts. This network connects all of your containers on the `10.7.0.0/16` subnet, and gives every container a local IP. This IP persists on each container even if the container is redeployed and ends up on a different host. Every container can reach any other container on any port within the subnet. - -## External access - -The easiest way to access nodes is to ensure that your public ssh key is available to them. You can quickly copy your public key to all of the nodes in your Docker Cloud account by running the **authorizedkeys** container. See [SSHing into a node](ssh-into-a-node.md) for more information. - -## What's in this section? -The pages in this section explain how to link Docker Cloud to your infrastructure providers or your own hosts, and how to manage your nodes from within Docker Cloud. - -* [SSH into a Docker Cloud-managed node](ssh-into-a-node.md) -* Read more about [Deployment strategies](deployment-strategies.md) -* Learn how to [Upgrade Docker Engine on a node](docker-upgrade.md) -* [Use the Docker Cloud Agent to Bring your Own Host](byoh.md) -* [Link to Amazon Web Services hosts](link-aws.md) - * [Using Docker Cloud on AWS FAQ](cloud-on-aws-faq.md) -* [Link to DigitalOcean hosts](link-do.md) -* [Link to Microsoft Azure hosts](link-azure.md) -* [Link to Packet hosts](link-packet.md) - * [Using Docker Cloud and Packet FAQ](cloud-on-packet.net-faq.md) -* [Link to SoftLayer hosts](link-softlayer.md) diff --git a/docker-cloud/infrastructure/link-aws.md b/docker-cloud/infrastructure/link-aws.md deleted file mode 100644 index 4acaee038e..0000000000 --- a/docker-cloud/infrastructure/link-aws.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -description: Link your Amazon Web Services account -keywords: AWS, Cloud, link -redirect_from: -- /docker-cloud/getting-started/beginner/link-aws/ -- /docker-cloud/getting-started/link-aws/ -title: Link an Amazon Web Services account ---- - -You can create a role with AWS IAM (Identity and Access Management) so that -Docker Cloud can provision and manage swarms on your behalf. - -## How to create the link - -For instructions on how to link your AWS account to Docker Cloud, -see [the AWS instructions that enable swarm -mode](/docker-cloud/cloud-swarm/link-aws-swarm.md). - -> **Note**: The procedure for linking these accounts is the same, regardless -of whether you are using Docker Cloud in -[Swarm Mode](/docker-cloud/index.md) or not. If you are -using standard mode, come back to these topics after you have linked -your AWS account. - -## What's next? - -You're ready to start using AWS as the infrastructure provider for Docker Cloud! -If you came here from the tutorial, [continue the tutorial and deploy your first -node](/docker-cloud/getting-started/your_first_node.md). diff --git a/docker-cloud/infrastructure/link-azure.md b/docker-cloud/infrastructure/link-azure.md deleted file mode 100644 index f29cf20c4f..0000000000 --- a/docker-cloud/infrastructure/link-azure.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -description: Link your Microsoft Azure account -keywords: Microsoft, Azure, account -redirect_from: -- /docker-cloud/getting-started/beginner/link-azure/ -- /docker-cloud/getting-started/link-azure/ -title: Link a Microsoft Azure account ---- - -You can link your Microsoft Azure account to your Docker Cloud account to deploy -**nodes** and **node clusters** using Docker Cloud's Dashboard, API, or CLI. You -must link your Azure account so that Docker Cloud can interact with Azure on -your behalf to create and manage your **nodes** (virtual machines). - -## How to create the link - -For instructions on how to link your Microsoft Azure account to Docker Cloud, -see [the Azure instructions that enable swarm -mode](/docker-cloud/cloud-swarm/link-azure-swarm.md). - -> **Note**: The procedure for linking these accounts is the same, regardless -of whether you are using Docker Cloud in -[Swarm Mode](/docker-cloud/index.md) or not. If you are -using standard mode, come back to these topics after you have linked -your Microsoft Azure account. - -## What's next? - -You're ready to start using Microsoft Azure as the infrastructure provider for -Docker Cloud! If you came here from the tutorial, click here to [continue the -tutorial and deploy your first -node](/docker-cloud/getting-started/your_first_node.md). diff --git a/docker-cloud/infrastructure/link-do.md b/docker-cloud/infrastructure/link-do.md deleted file mode 100644 index d4322e26b4..0000000000 --- a/docker-cloud/infrastructure/link-do.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -description: Link your DigitalOcean account -keywords: link, DigitalOcean, account -redirect_from: -- /docker-cloud/getting-started/beginner/link-do/ -- /docker-cloud/getting-started/link-do/ -- /engine/installation/cloud/cloud-ex-machine-ocean/ -title: Link a DigitalOcean account ---- - -You can link your DigitalOcean account to your Docker Cloud account to deploy -**nodes** and **node clusters** using Docker Cloud's Dashboard, API, and CLI. -You must link your DigitalOcean account so that Docker Cloud can interact with -DigitalOcean on your behalf to create and manage your **nodes** (droplets). - -If you don't have a **DigitalOcean** account, you can sign up with this link to -get a $10 credit: -[https://www.digitalocean.com/?refcode=bc0c34035aa5](https://www.digitalocean.com/?refcode=bc0c34035aa5) - -## Link your DigitalOcean Account - -To link your DigitalOcean account so you can launch **nodes** using Docker -Cloud, navigate to **Account info \> Cloud Providers**. A list of all -the providers that you can link to Docker Cloud is shown. Click **Link account** next to -DigitalOcean. - -![](images/do-link-account.png) - -You're redirected to a DigitalOcean login screen. Use your **DigitalOcean** -credentials to log in to your account. - -![](images/do-login-screen.png) - -Once you log in, a message appears prompting you to confirm the link. - -![](images/do-approve-access.png) - -## What's next? - -You're ready to start using DigitalOcean as the infrastructure provider for -Docker Cloud! If you came here from the tutorial, click here to [continue the -tutorial and deploy your first node](../getting-started/your_first_node.md). diff --git a/docker-cloud/infrastructure/link-packet.md b/docker-cloud/infrastructure/link-packet.md deleted file mode 100644 index 079558f29f..0000000000 --- a/docker-cloud/infrastructure/link-packet.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -description: Link your Packet account -keywords: Packet, link, Cloud -redirect_from: -- /docker-cloud/getting-started/beginner/link-packet/ -- /docker-cloud/getting-started/link-packet/ -title: Link a Packet account -notoc: true ---- - -You can register your [Packet](https://www.packet.net/promo/docker-cloud/) -account credentials in your Docker Cloud account to deploy **nodes** and **node -clusters** using Docker Cloud's Dashboard, API, and CLI. Your Packet API key is -required so Docker Cloud can interact with Packet on your behalf to create and -manage your **nodes** (Packet devices). - -To link your Packet account so you can launch **nodes** from Docker Cloud, -navigate to **Account info \> Cloud Providers**. Click **Add credentials**. - -![](images/packet-link-account.png) - -If you already have an API key to use with Docker Cloud, enter it in the -`Authentication token`. - -Otherwise, open a new tab and log into your Packet account. Click **API Keys** -from the left menu. Then, click the **+** button at the bottom right corner, -enter a description for your new API key, and click **Generate**. - -![](images/packet-add-apikey.png) - -Copy the **Token** of the new API key. - -Go back to the Docker Cloud tab and paste the new API key in the `Authentication -token` field of the `Packet credentials` dialog. - -## What's next? - -You're ready to start using Packet as the infrastructure provider for Docker -Cloud! If you came here from the tutorial, click here to [continue the tutorial -and deploy your first node](../getting-started/your_first_node.md). diff --git a/docker-cloud/infrastructure/link-softlayer.md b/docker-cloud/infrastructure/link-softlayer.md deleted file mode 100644 index b318945ffb..0000000000 --- a/docker-cloud/infrastructure/link-softlayer.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -description: Link your SoftLayer account -keywords: SoftLayer, link, cloud -redirect_from: -- /docker-cloud/getting-started/beginner/link-softlayer/ -- /docker-cloud/getting-started/link-softlayer/ -title: Link a SoftLayer account ---- - -You can register your SoftLayer account credentials in your Docker Cloud account -to deploy **nodes** using Docker Cloud's Dashboard, API, or CLI. Docker Cloud -uses your SoftLayer username and API key to interact with SoftLayer on your -behalf to create and manage your **nodes** (virtual servers). - -Although any SoftLayer account with the right privileges works, we recommend -creating a new **dockercloud-user** user. If you have already created a service -user, or do not wish to do so, continue to [Add SoftLayer Account -Credentials](link-softlayer.md#add-softlayer-account-credentials). - -### Create dockercloud-user in SoftLayer - -Go to the **Users** section in SoftLayer (using the following URL): -[https://control.softlayer.com/account/users](https://control.softlayer.com/account/users) - -Click **Add User**: - -![](images/softlayer-step-1.png) - -Fill out the **Add User - Profile** form, and enter `dockercloud-user` in the -username field. Docker Cloud uses the service user's API key, so the password -you set is less important. Click **Add User**. - -![](images/softlayer-step-2.png) - -In the next step, **Permissions**, select the following permissions: - -* Support - * View Tickets - * Add Tickets - * Edit Tickets -* Devices - * View Virtual Server Details -* Services - * Manage SSH keys -* Account - * Cancel Server - * Cancel Services - * Add Server - -Click **Add Portal Permissions**. - -Go back to the **Users** list, and click **Generate** under the **API Key** column: - -![](images/softlayer-step-6.png) - -Once generated, click the **View** link under the **API Key** column, and copy the generated API Key. - -![](images/softlayer-step-7.png) - -Once you create the new user `dockercloud-user`, have its -credentials, and set its permissions, go back to Docker Cloud. - -## Add SoftLayer account credentials - -To link your SoftLayer account so you can launch **nodes** from Docker Cloud, -navigate to **Account info \> Cloud providers**. Click **Add -credentials**. - -![](images/softlayer-link-account.png) - -Copy and paste the `username` and the `API Key` you received from SoftLayer into their corresponding fields in dialog that appears. - -![](images/softlayer-modal.png) - -## What's next? - -You're ready to start using SoftLayer as the infrastructure provider -for Docker Cloud! If you came here from the tutorial, click here to [continue the tutorial and deploy your first node](../getting-started/your_first_node.md). diff --git a/docker-cloud/infrastructure/ssh-into-a-node.md b/docker-cloud/infrastructure/ssh-into-a-node.md deleted file mode 100644 index 285c561487..0000000000 --- a/docker-cloud/infrastructure/ssh-into-a-node.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -description: SSHing into a Docker Cloud-managed node -keywords: ssh, Cloud, node -redirect_from: -- /docker-cloud/getting-started/intermediate/ssh-into-a-node/ -- /docker-cloud/tutorials/ssh-into-a-node/ -- /docker-cloud/faq/how-ssh-nodes/ -title: SSH into a Docker Cloud-managed node ---- - -You can add a public SSH key to the `authorized_keys` file in each of your Linux -nodes, so that you can log into the nodes using SSH without providing a password. - -The quickest way to do this is to create the SSH keys, then run our -[dockercloud/authorizednodes](https://hub.docker.com/r/dockercloud/authorizedkeys){:target="_blank" class="_"} -utility image. Follow the instructions at that link to add the public SSH key to -each node. - -Afterward, from a machine which has the private key available, you can SSH into -any of the nodes without providing a password. \ No newline at end of file diff --git a/docker-cloud/installing-cli.md b/docker-cloud/installing-cli.md deleted file mode 100644 index 8d06f2559a..0000000000 --- a/docker-cloud/installing-cli.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -description: Using the Docker Cloud CLI on Linux, Windows, and macOS, installing, updating, uninstall -keywords: cloud, command-line, CLI -redirect_from: -- /docker-cloud/getting-started/intermediate/installing-cli/ -- /docker-cloud/getting-started/installing-cli/ -- /docker-cloud/tutorials/installing-cli/ -title: The Docker Cloud CLI ---- - -Docker Cloud maintains a Command Line Interface (CLI) tool that you can use -to interact with the service. We highly recommend installing the CLI, as it -allows you to script and automate actions in Docker Cloud without using the web -interface. If you only ever use the web interface, this is not necessary. - -## Install - -Install the docker-cloud CLI either by running a Docker container, or by using the package manager for your system. - -#### Run the CLI in a Docker container - -If you have Docker Engine installed locally, you can run the following `docker` -command in your shell regardless of which operating system you are using. - -```none -$ docker run dockercloud/cli -h -``` - -This command runs the `docker-cloud` CLI image in a container for you. Learn -more about how to use this container -[here](https://github.com/docker/dockercloud-cli#docker-image). - -#### Install for Linux or Windows - -You can install the CLI locally using the [pip](https://pip.pypa.io/en/stable/) -package manager, which is a package manager for -[Python](https://www.python.org/) applications. - -* If you already have Python 2.x or 3.x installed, you probably have `pip` and -`setuptools`, but need to upgrade per the instructions -[here](https://packaging.python.org/installing/). - -> The Docker Cloud CLI does not currently support Python 3.x. -> -> we recommend using Python 2.x. To learn more, -see the Python and CLI issues described in -[Known issues in Docker Cloud](/docker-cloud/docker-errors-faq.md). - -* If you do not have Python or `pip` installed, you can either [install -Python](https://wiki.python.org/moin/BeginnersGuide/Download) or use this -[standalone pip -installer](https://pip.pypa.io/en/latest/installing/#installing-with-get-pip-py). You do not need Python for our purposes, just `pip`. - -Now that you have `pip`, open a shell or terminal -window and run the following command to install the docker-cloud CLI: - -```bash -$ pip install docker-cloud -``` - -If you encounter errors on Linux machines, make sure that `python-dev` is -installed. For example, on Ubuntu, run the following command: - -``` -$ apt-get install python-dev -``` - -#### Install on macOS - -We recommend installing Docker CLI for macOS using Homebrew. If you don't have -`brew` installed, follow the instructions here: [http://brew.sh](http://brew.sh){: target="_blank" class="_"} - -Once Homebrew is installed, open Terminal and run the following command: - -```bash -$ brew install docker-cloud -``` - -> **Note**: You can also use [pip](https://pip.pypa.io/en/stable/) to install on macOS, but we suggest Homebrew since it is a package manager designed for the -Mac. - -#### Validate the installation - -Check that the CLI installed correctly: - -```bash -$ docker-cloud -v -docker-cloud 1.0.0 -``` - -## Getting Started - -First, you should log in using the `docker` CLI and the `docker login` command. -Your Docker ID, which you also use to log in to Docker Hub, is also used for -logging in to Docker Cloud. - -```none -$ docker login -Username: user -Password: -Email: user@example.org -Login succeeded! -``` - -#### What's next? - -See the [Developer documentation](/apidocs/docker-cloud.md) for more information on using the CLI and our APIs. - - -## Use the docker-cloud CLI with an organization - -When you use the docker-cloud CLI, it authenticates against the Docker Cloud -service with the user credentials saved by the `docker login` command. To use -the CLI to interact with objects belonging to an [Organization](orgs.md), you -must override the `DOCKERCLOUD_NAMESPACE` environment variable that sets this -user. - -For example: - -```none -$ export DOCKERCLOUD_NAMESPACE=myorganization -``` - -You can also set the `DOCKERCLOUD_NAMESPACE` variable before each CLI command. -For example: - -```none -$ DOCKERCLOUD_NAMESPACE=myteam docker container ps -``` - -To learn more, see the [Docker Cloud CLI README](https://github.com/docker/dockercloud-cli#namespace). - - -## Upgrade the docker-cloud CLI - -Periodically, Docker adds new features and fixes bugs in the existing CLI. To use these new features, you must upgrade the CLI. - -#### Upgrade the docker-cloud CLI on Linux or Windows - -```none -$ pip install -U docker-cloud -``` - -#### Upgrade the docker-cloud CLI on macOS - -```none -$ brew update && brew upgrade docker-cloud -``` - -## Uninstall the docker-cloud CLI - -If you are having trouble using the docker-cloud CLI, or find that it conflicts -with other applications on your system, you may want to uninstall and reinstall. - -#### Uninstall on Linux or Windows - -Open your terminal or command shell and execute the following command: - -```none -$ pip uninstall docker-cloud -``` - -#### Uninstall on macOS - -Open your Terminal application and execute the following command: - -```none -$ brew uninstall docker-cloud -``` diff --git a/docker-cloud/migration/cloud-to-aws-ecs.md b/docker-cloud/migration/cloud-to-aws-ecs.md deleted file mode 100644 index 24460a5f6a..0000000000 --- a/docker-cloud/migration/cloud-to-aws-ecs.md +++ /dev/null @@ -1,674 +0,0 @@ ---- -description: How to migrate apps from Docker Cloud to Amazon ECS -keywords: cloud, migration, kubernetes, aws, ecs -title: Migrate Docker Cloud stacks to Amazon Elastic Container Service ---- - -## Elastic Container Service (ECS) - -This page explains how to prepare your applications for migration from Docker Cloud to [Amazon Elastic Container Service (ECS)](https://aws.amazon.com/ecs/) clusters. ECS is a managed container orchestration service from AWS that is responsible for managing cluster state and scheduling containers onto a fleet of container instances. It exposes an API and comes with tooling that you can use to migrate your containerized applications with minimized effort. - -At a high level, migrating your Docker Cloud applications requires that you: - -- **Build** a target environment -- **Convert** your Docker Cloud YAML stackfiles to Docker compose files or ECS task definitions -- **Test** the new task definitions in the new environment -- **Point** your application CNAMES to new service endpoints. -- **Migrate** your applications from Docker Cloud to the new environment. - -To demonstrate, we **build** an ECS cluster, **convert** the Docker Cloud stackfile for [example-voting-app](https://github.com/dockersamples/example-voting-app) to an ECS task definition, and **test** the task definition in a sandboxed environment to ensure that it is safe to migrate. - -> The actual process of migrating -- switching customers from your Docker Cloud applications to AWS ECS or EKS applications -- will vary by application and environment. - -## Amazon Elastic Container Service for Kubernetes (EKS) - -If you'd rather migrate your Docker Cloud applications to Amazon EKS after it becomes generally available, follow the [guidance](https://docs.docker.com/docker-cloud/migration/cloud-to-kube-gke/#db-service) Docker has written for converting your stackfiles to Kubernetes manifests.  Although the steps for creating and connecting to an EKS cluster will be slightly different than GKE and AKS, the manifests that you will create will be identical. - -## Voting-app example - -The Docker Cloud stack that we're going to use for our example is a voting application as defined in [dockercloud.yml](https://raw.githubusercontent.com/dockersamples/example-voting-app/master/dockercloud.yml). The rest of this document describes a couple of approaches you could use to convert this file into a set of ECS task definitions. - -In the [dockercloud.yml](https://raw.githubusercontent.com/dockersamples/example-voting-app/master/dockercloud.yml), the voting app is defined as a stack of six microservices: - -- **vote**: Web front-end that displays voting options -- **redis**: In-memory k/v store that collects votes -- **worker**: Stores votes in database -- **db**: Persistent store for votes -- **result**: Web server that pulls and displays results from database -- **lb**: Container-based load balancer - -![image of voting app arch](images/votingapp-arch.png){:width="500px"} - -Votes are accepted with the `vote` service and stored in persistent backend database `db` with the help of services, `redis`, `worker`, and `lb`. The vote tally is displayed with the `result` service. - -## Migration prerequisites - -To complete the migration from Docker Cloud to ECS, you'll need: - -1. An AWS account -2. An ECS cluster -3. A IAM user with permission to perform the actions outlined in this document - - -## Build a test environment - -Amazon Elastic Container Service (Amazon ECS) is a highly scalable, high-performance [container](https://aws.amazon.com/containers/) orchestration service that supports [Docker](https://aws.amazon.com/docker/) containers and allows you to easily run and scale containerized applications on AWS. Amazon ECS eliminates the need for you to install and operate your own container orchestration software, manage and scale a cluster of virtual machines, or schedule containers on those virtual machines. - -With simple API calls, you can launch and stop Docker-enabled applications, query the complete state of your application, and access many familiar features such as IAM roles, security groups, load balancers, Amazon CloudWatch Events, AWS CloudFormation templates, and AWS CloudTrail logs - -To build an ECS cluster, you will need to: - -1. [Create an AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) -2. [Create an IAM user](https://aws.amazon.com/premiumsupport/knowledge-center/create-new-iam-user/) -3. Create an IAM policy which will allow you to perform the actions in this document -4. [Attach this policy to an IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-attach-detach.html#attach-managed-policy-console) -5. Create an ECS cluster - - -### Create an ECS cluster - -In this section we'll describe how to provision a cluster using ecs-cli, a purpose built CLI that you can use to manage and deploy services onto an ECS cluster.  - -If you don't have the CLI installed on your machine, follow the steps outlined in this [document](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_installation.html).  - -### Configure the Amazon ecs-cli - -Set up a CLI profile with the following command, substituting `profile_name` with your desired profile name, `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables with your AWS credentials. - -``` -ecs-cli configure profile --profile-name  --access-key  --secret-key -``` - -Complete the configuration with the following command, substituting `region_name` with your desired AWS region, `cluster_name` with the name of an existing Amazon ECS cluster or a new cluster to use, and `configuration_name` for the name you'd like to give this configuration. - -``` -ecs-cli configure --cluster  --region  --config-name -``` - -### Provision a new ECS cluster - -To provision a cluster, execute the following command: - -``` -ecs-cli up --keypair --capability-iam --size 5 --instance-type t2.large --cluster-config -``` - -### Convert Docker Cloud stackfile - -The following sections deal with each service definition separately. - -To migrate your application from Docker Cloud to ECS, you can either recreate your Docker cloud stackfile as ECS task definitions or you can convert your stackfile to docker compose files which can be consumed directly by the ecs-cli or converted into an ECS task definition using the [container-transform](https://github.com/micahhausler/container-transform) utility.   - -In the Docker Cloud stackfile, the six Docker _services_ in our `example-voting-app` stack are defined as **top-level keys**: - -``` -db:  -redis: -result: -lb: -vote: -worker: -``` - -An ECS task definition is a declarative way to describe the container images and run time parameters, e.g. environment variables, placement constraints, and so forth, that are part of your application stack and/or microservice.  You reference these task definitions when you create ECS service definitions which describe a variety of things including how many replicas of your task you want to run, how updates should be handled, what scaling policies to use, and whether the service should be fronted by a load balancer. - -You can think of an ECS task as the smallest unit of deployment; all of the containers that are defined with a task definition are deployed as a unit.  When tasks are run as part of an ECS service, the ECS service scheduler is responsible for maintaining the desired state for that service, i.e. the number of tasks to run and/or scaling that service in accordance with your scaling policies.  The ECS service is also how you specify which the version of your task definition you want do deploy onto the ECS cluster.   - -An ECS service is an abstraction that provides stable networking for a set of tasks.  Using AWS [Service Discovery](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html), it's now possible to register a service's endpoints in a [Route 53](https://aws.amazon.com/route53/) hosted zone which allows services to discover each other by querying DNS.  ECS services can also be fronted by an application, network, or classic load balancer. - -The following diagram shows three tasks deployed as part of a single ECS service that is being fronted by an application load balancer. - -![image of voting app arch](images/AWS-migration1.png) - -### db service - -**Docker Cloud stackfile**: The Docker Cloud stackfile defines an image and a restart policy for the `db` service. - -``` -db: - image: 'postgres:9.4' - restart: always -``` - -**ECS task definition**: before you can create a service from this stackfile, you first need to create a task definition.  - -``` -cat > db-taskdef.json < ecs-params.yml < --ecs-params ecs-params.yml --project-name create  -``` -To create a service directly from a compose file, you'd use this command: -``` -ecs-cli compose --file  --ecs-params ecs-params.yml --project-name  up  -``` -For a list of the available options for the `ecs-cli`, see the [ecs-cli command line reference](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_reference.html).  - -***At present, the ecs-cli can only ingest docker compose files that are version 2.0 or below.*** - -If your compose file is newer than version 2.0, you can use the [container-transform](http://container-transform.readthedocs.io/en/latest/) utility to convert the compose file to a task definition.   - -When you're ready to register the task definition, execute the following command:  -``` -aws ecs register-task-definition --cli-input-json file://db-taskdef.json   -``` -Now that we've created a task definition for the Postgres database, we need to create a ECS service.  When you create a service, the tasks are automatically monitored by the ECS scheduler which will restart tasks when they fail in order to maintain your desired state.  With ECS, you can also associate a name with your service in Route 53 so other services can discover it by querying DNS.  For this service, you're going to create an A record.  - -The first step involves creating a namespace for our `db` service, for example, `corp.local`.  The following command creates a private hosted zone in Route 53 that will be used for our namespace.   - -**Note**: _You only need to create the namespace once.  All subsequent services will be registered under the same namespace_.  -``` -export OPERATION_ID=$(aws servicediscovery create-private-dns-namespace --name local --vpc  --region  --query 'Operation.Id' --output text) -``` -Get the namespace id for the namespace that was created. -``` -export NAMESPACE_ID=$(aws servicediscovery get-operation --operation-id $OPERATION_ID --region  | jq '.Operation.Targets.NAMESPACE') -``` -Register the db service with the namespace.  This will create an A record for the service in a Route 53 private hosted zone that our services will use for service discovery.  -``` -export SERVICE_ARN=$(aws servicediscovery create-service --name db --dns-config 'NamespaceId='$NAMESPACE_ID',DnsRecords=[{Type="A",TTL="300"}]' --health-check-custom-config FailureThreshold=1 --region  | jq '.Service.Arn') -``` -Since we've configured this task to use `awsvpc` networking mode, we need to specify the list of target subnets and security group(s) for this task.  To get a list of the available subnets in a VPC, execute the following command.  Replace `vpc_id` with the id of the target VPC:  -``` -export SUBNETS=$(aws ec2 describe-subnets --filters Name=vpc-id,Values= --region  --query 'Subnets[].SubnetId' --output json) -``` -Get the CIDR range for the VPC.  -``` -export VPC_CIDR=$(aws ec2 describe-vpcs --vpc-id  --region  --query 'Vpcs[].CidrBlock' --output text) -``` -Create a security group.  -``` -export SG_ID=$(aws ec2 create-security-group --group-name  --description "Allow inbound access from the VPC" --vpc-id  --region  --output text) -``` -Create an inbound rule that allows all traffic from the VPC.   -``` -aws ec2 authorize-security-group-ingress --group-id $SG_ID --protocol all --cidr $VPC_CIDR  -``` -_Once the application is running, this rule should be scoped down to only allow inbound traffic from the calling service(s)._  - -Create an ECS service definition for the `db` service. -``` -cat > db.json <", -    "serviceName": "db-svc", -    "taskDefinition": "db:1", -    "serviceRegistries": [ -       { -          "registryArn": ${SERVICE_ARN},  -          "containerName": "db"  -       } -    ], -    "launchType": "EC2", -    "desiredCount": 1, -    "networkConfiguration": { -        "awsvpcConfiguration": { -            "subnets": ${SUBNETS}, -            "securityGroups": ["${SG_ID}"], -            "assignPublicIp": "DISABLED" -        } -    } -} -EOF -``` - -Create the service. -``` -aws ecs create-service --region  --cli-input-json file://db.json -``` - -### Redis service - -Docker Cloud stackfile: - -``` -redis: -  image: 'redis:latest' -  restart: always -``` - -ECS task definition: - -``` -cat > redis-taskdef.json < --cli-input-json file://redis-taskdef.json -``` - -This task definition will create a ECS task that runs a `redis:alpine` container that listens on port 6379.  - -Register the `redis:alpine` service with the service discovery service.  This will create a A record in a Route 53 private hosted zone that other services will use for service discovery. - -``` -export SERVICE_ARN=$(aws servicediscovery create-service --name redis --dns-config 'NamespaceId='$NAMESPACE_ID',DnsRecords=[{Type="A",TTL="300"}]' --health-check-custom-config FailureThreshold=1 --region  | jq '.Service.Arn') -``` - -Create a service definition for the `redis:alpine` service.  - -``` -cat > redis.json <", -    "serviceName": "redis-svc", -    "taskDefinition": "redis:1", -    "serviceRegistries": [ -       { -          "registryArn": ${SERVICE_ARN},  -          "containerName": "redis" -       } -    ], -    "launchType": "EC2", -    "desiredCount": 1, -    "networkConfiguration": { -        "awsvpcConfiguration": { -            "subnets": ${SUBNETS}, -            "securityGroups": ["${SG_ID}"], -            "assignPublicIp": "DISABLED" -        } -    }  -} -EOF -``` - -Create the `redis` service. -``` -aws ecs create-service --region  --cli-input-json file://redis.json -``` - -### lb service - -The Docker Cloud stackfile defines and `lb` service to distribute traffic to the instances of vote task.  On AWS, this is unnecessary because ECS allows you to front your service with an Application, Network, or Classic Load Balancer.  We will show how to use an application load balancer with an ECS service in the `vote` section.  - -### Vote service - -The Docker Cloud stackfile for the `vote` service defines an image, a restart policy, and a specific number of Pods (replicas: 5). It also enables the Docker Cloud `autoredeploy` feature. We can tell that it listens on port 80 because the Docker Cloud `lb` service forwards traffic to it on port 80; we can also inspect its image. - -_**Autoredeploy options**_: _Autoredeploy is a Docker Cloud feature that automatically updates running applications every time you push an image. You can replicate this behavior within AWS by building an automated CI/CD pipeline using CodeCommit, CodePipeline, and CodeBuild services._ - -Docker Cloud stackfile: - -``` -vote: -  autoredeploy: true -  image: 'docker/example-voting-app-vote:latest' -  restart: always -  target_num_containers: 5 -``` - -Create a security group for the load balancer.  -``` -export SG_ID=$(aws ec2 create-security-group --group-name  --description -"Allow inbound on port 80 from the Internet" --vpc-id  --region  --output text) -``` - -Create an ingress rule for the security group that allows port 80 inbound from the Internet.  -``` -aws ec2 authorize-security-group-ingress --group-id $SG_ID --protocol tcp --port 80 --cidr $VPC_CIDR  -``` - -Get the list of subnets from your VPC. -``` -aws ec2 describe-subnets --filters Name=vpc-id,Values= --region  --query 'Subnets[].SubnetId' --output text -``` -Create an application load balancer for the `voter` service. Replace `subnet_ids` with the subnets that your container instances are running on. -``` -export $LB_ARN=$(aws elbv2 create-load-balancer --name  --subnets  --security-groups $SG_ID --type application | jq '.LoadBalancers[].LoadBalancerArn') -``` - -Create a target group for the application load balancer.  Replace `vpc_id` with the id of the VPC that your container instances are a part of.  -``` -export TARGET_ARN=$(aws elbv2 create-target-group --name  --protocol HTTP --port 80 --vpc-id  | jq '.TargetGroups[].TargetGroupArn') -``` - -Add a listener to the load balancer.  This will route port 80 traffic to the target group where your voter service will run.    -``` -aws elbv2 create-listener --load-balancer-arn $LB_ARN --protocol HTTP --port 80 --default-actions Type=forward,TargetGroupArn=$TARGET_ARN -``` - -Create a task definition for the `voter` service.  When you set the host port to 0, the host port is assigned a random high port by Docker.  As the tasks start, the application load balancer dynamically discovers and registers the host port so requests can be routed to the task's container port.   - -``` -cat > voter-taskdef.json < --cli-input-json file://voter-taskdef.json -``` - -Create a service definition for the `voter` service.  - -``` -cat > voter.json <", -    "serviceName": "voter-svc", -    "taskDefinition": "voter:1", -    "loadBalancers": [{ -        "targetGroupArn": ${TARGET_ARN}, -        "containerName": "voter", -        "containerPort": 80, -    }], -    "launchType": "EC2", -    "desiredCount": 2 -} -EOF -``` - -Create the `voter` service.  -``` -aws ecs create-service --region  --cli-input-json file://voter.json -``` - -This creates an ECS service behind an application load balancer.  It is assigned a public DNS name for the service running behind it.  Its listener accepts requests on port 80 and distributes them across the tasks in the target group you created earlier.  This is why the `lb` service from the Docker Cloud app is not necessary. - -### worker service - -The worker service defines an image, restart policy and a specific number of replicas (3).  The worker service is a standalone service that transfers voter data from the `redis` service to the `db` service.  - -Docker Cloud stackfile: - -``` -worker: -  autoredeploy: true -  image: 'docker/example-voting-app-worker:latest' -  restart: always -  target_num_containers: 3 -``` - -ECS task definition: -``` -cat > worker-taskdef.json < --cli-input-json file://worker-taskdef.json -``` - -Create a service definition for the `worker` service.  - -``` -cat > worker.json <", -    "serviceName": "worker-svc", -    "taskDefinition": "worker:1", -    "serviceRegistries": [ -       { -          "registryArn": ${SERVICE_ARN},  -          "containerName": "worker" -          "containerPort": 55555   -       } -    ], -    "launchType": "EC2", -    "desiredCount": 3, -} -EOF -``` - -Create the `worker` service. -``` -aws ecs create-service --region  --cli-input-json file://worker.json -``` - -### result service - -Docker Cloud stackfile: -``` -result: -  autoredeploy: true -  image: 'docker/example-voting-app-result:latest' -  ports: -    - '80:80' -  restart: always - target_num_containers: 3 -``` - -ECS task definition: - -``` -cat > result-taskdef.json < --cli-input-json file://result-taskdef.json -``` - -Create an application load balancer for the `results` service. Replace `subnet_ids` with the subnets that your container instances are running on. -``` -export LB_ARN=$(aws elbv2 create-load-balancer --name  --subnets  --security-groups $SG_ID --type application | jq '.LoadBalancers[].LoadBalancerArn') -``` - -Create a target group for the load balancer. -``` -export TARGET_ARN=$(aws elbv2 create-target-group --name  --protocol HTTP --port 80 --vpc-id  | jq '.TargetGroups[].TargetGroupArn') -``` - -Add a listener to the load balancer -``` -aws elbv2 create-listener --load-balancer-arn $LB_ARN --protocol HTTP --port 80 --default-actions Type=forward,TargetGroupArn=$TARGET_ARN -``` - -Modify the target group attributes.  The `result` service uses websocks which requires sticky sessions to be enabled.  -``` -aws elbv2 modify-target-group-attributes --target-group-arn $TARGET_ARN --attributes Key=stickiness.enabled,Value=true Key=stickiness.lb_cookie.duration_seconds,Value=3600   -``` - -Create a service definition.  -``` -cat > result.json <", -    "serviceName": "result-svc", -    "taskDefinition": "result:1", -    "loadBalancers": [ -        { -            "targetGroupArn": ${TARGET_ARN}, -            "containerName": "result", -            "containerPort": 80  -        } -    ], -    "launchType": "EC2", -    "desiredCount": 3  -} -EOF -``` - -Create the `result` service. -``` -aws ecs create-service --region  --cli-input-json file://result.json -``` - -### Finish Configuring Security Groups - -Add the load balancer security group to the security group for your container instances. -``` -aws ec2 authorize-security-group-ingress --group-id  --protocol all --source-group $SG_ID  -``` - -### Test the app on ECS - -Before migrating, you should thoroughly test each ECS service on an ECS cluster. Healthy testing includes deploying each component of the application as an ECS service onto your cluster, performing scaling operations, increasing load, running failure scenarios, and doing updates and rollbacks. These tests are specific to each of your applications. You should also manage your ECS task and service definitions in a version control system like CodeCommit.  - -To check to see a list of the services you created, type the following command:  -``` -aws ecs list-services --cluster  --region   -``` - -To see whether a service is running, type the following command:  -``` -ecs-cli ps --cluster  --region -``` - -To test whether the application works in your environment, get the URLs of the 2 load balancers, replacing with the name you gave the load balancer earlier. -``` -aws elbv2 describe-load-balancers --names  --region  | jq '.LoadBalancers[].DNSName' -``` - -1. Copy/paste the value for the `vote` service into a browser and cast a vote. -2. Copy/paste the value for the `result` service into a browser and ensure your vote registered. - -### Migrate apps from Docker Cloud - -_Remember to point your application CNAMES to new service endpoints._ - -How you migrate your applications is unique to your environment and applications. -1. Plan with all developers and operations teams. -2. Plan with customers. -3. Plan with owners of other applications that interact with your Docker Cloud app. -4. Plan a rollback strategy if problems occur. - -After the migration is complete, make sure everything is working as expected. Ensure that users are hitting the new application on the AWS infrastructure and you're getting the results you expect. - -## Summary - -In this post, we how to move an application from Docker Cloud to Amazon ECS with no code changes.  While this may initially help accelerate your migration to ECS, you're still left with services like Postgres and Redis that you'll have to manage yourself.   AWS gives you an opportunity to replace those services with managed services, like RDS and Elasticache which alleviate a lot of that “undifferentiated heavy lifting” we associate with managing infrastructure services like these.  We encourage you to look at a migration of this kind as an opportunity to optimize by re-architecting your application to take advantage of AWS's managed services.  For an in-depth look at how to do this, see [“Deploying the voting app to ECS with Fargate”](https://read.acloud.guru/deploy-the-voting-app-to-aws-ecs-with-fargate-cb75f226408f).  The beauty of this approach is that lets you run containerized applciations without managing the underlying compute infrastruture, which leaves you more time to create great applications and less time worrying about your infrastructure. diff --git a/docker-cloud/migration/cloud-to-kube-aks.md b/docker-cloud/migration/cloud-to-kube-aks.md deleted file mode 100644 index f72cf595be..0000000000 --- a/docker-cloud/migration/cloud-to-kube-aks.md +++ /dev/null @@ -1,789 +0,0 @@ ---- -description: How to migrate apps from Docker Cloud to AKS -keywords: cloud, migration, kubernetes, azure, aks -title: Migrate Docker Cloud stacks to Azure Container Service ---- - -## AKS Kubernetes - -This page explains how to prepare your applications for migration from Docker Cloud to [Azure Container Service (AKS)](https://azure.microsoft.com/en-us/free/){: target="_blank" class="_"} clusters. AKS is a hosted Kubernetes service on Microsoft Azure. It exposes standard Kubernetes APIs so that standard Kubernetes tools and apps run on it without needing to be reconfigured. - -At a high level, migrating your Docker Cloud applications requires that you: - -- **Build** a target environment (Kubernetes cluster on AKS). -- **Convert** your Docker Cloud YAML stackfiles. -- **Test** the converted YAML stackfiles in the new environment. -- **Point** your application CNAMES to new service endpoints. -- **Migrate** your applications from Docker Cloud to the new environment. - -To demonstrate, we **build** a target environment of AKS nodes, **convert** the Docker Cloud stackfile for [example-voting-app](https://github.com/dockersamples/example-voting-app){: target="_blank" class="_"} to a Kubernetes manifest, and **test** the manifest in the new environment to ensure that it is safe to migrate. - -> The actual process of migrating -- switching customers from your Docker Cloud applications to AKS applications -- will vary by application and environment. - -## Voting-app example - -The Docker Cloud stack of our example voting application is defined in [dockercloud.yml](https://raw.githubusercontent.com/dockersamples/example-voting-app/master/dockercloud.yml){: target="_blank" class="_"}. This document explains how `dockercloud.yml` is converted to a Kubernetes YAML manifest file so that you have the tools to do the same for your applications. - -In the [dockercloud.yml](https://raw.githubusercontent.com/dockersamples/example-voting-app/master/dockercloud.yml){: target="_blank" class="_"}, the voting app is defined as a stack of six microservices: - -- **vote**: Web front-end that displays voting options -- **redis**: In-memory k/v store that collects votes -- **worker**: Stores votes in database -- **db**: Persistent store for votes -- **result**: Web server that pulls and displays results from database -- **lb**: Container-based load balancer - -Votes are accepted with the `vote` service and stored in persistent backend database (`db`) with the help of services, `redis`, `worker`, and `lb`. The vote tally is displayed with the `result` service. - -![image of voting app arch](images/votingapp-arch.png){:width="500px"} - -## Migration prerequisites - -To complete the migration from Docker Cloud to Kubernetes on AKS, you need: - -- An active Azure subscription with billing enabled. - -## Build target environment - -Azure Container Service (AKS) is a managed Kubernetes service. Azure takes care of all of the Kubernetes control plane management (the master nodes) -- delivering the control plane APIs, managing control plane HA, managing control plane upgrades, etc. You only need to look after worker nodes -- how many, the size and spec, where to deploy them, etc. - -High-level steps to build a working AKS cluster are: - -1. Generate credentials to register AKS with Azure AD. -2. Deploy an AKS cluster (and register with Azure AD). -3. Connect to the AKS cluster. - -### Generate AD registration credentials - -Currently, AKS needs to be manually registered with Azure Active Directory (AD) so that it can receive security tokens and integrate with secure sign-on and authorization. - -> _When you register an [Azure AD "application"](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects){: target="_blank" class="_"}_ _in the Azure portal, two objects are created in your Azure AD tenant: an application object, and a service principal object._ - -The following steps create the registration and output the credentials required to register AKS when deploying a cluster. - -1. Log in to the [Azure portal](https://portal.azure.com){: target="_blank" class="_"}. -2. Click **Azure Active Directory** > **App registrations** > **New application registration**. -3. Assign a **Name**, select application type **Web app/API**, and enter a **Sign-on URL**. The sign-on URL needs to be a valid DNS name but does not need to be resolvable. An example might be `https://k8s-vote.com`. -4. Click **Create**. -5. Copy and save the **Application ID** (this is your **Service principal client ID**). -6. Click **Settings** > **Keys** and set a description and duration. -7. Click **Save**. -8. Copy and save the **Value** (this your **Service principal client secret**, and also the only time you will see it, so don't lose it!). - -You now have the credentials required to register AKS as part of the next section. - -### Deploy an AKS cluster - -In this section, we build a three-node cluster; your cluster should probably be based on the configuration of your Docker Cloud node cluster. - -Whereas Docker Cloud deploys work to all nodes in a cluster (managers and workers), _Kubernetes only deploys work to worker nodes_. This affects how you should size your cluster. If your Docker Cloud node cluster was working well with three managers and two workers of a particular size, you should probably size your AKS cluster to have five nodes of a similar size. - -> In Docker Cloud, to see the configuration of each of your clusters, select **Node Clusters** > _your_cluster_. - -Before continuing, ensure you know: - -- Your **Azure subscription credentials** -- **Azure region** to which you want to deploy your AKS cluster -- **SSH public key** to use when connecting to AKS nodes -- **Service principal client ID** and **Service principal client secret** (from the previous section) -- **Number, size, and spec** of the worker nodes you want. - -To deploy a cluster of AKS nodes: - -1. Select **+Create a resource** from the left-hand panel of the Azure portal dashboard. - -2. Select **Containers** > **Azure Container Service - AKS (preview)**. _Do not select the other ACS option._ - -3. Fill out the required fields and click **OK**: - - - **Cluster name**: Set any name for the cluster. - - **Kubernetes version**: Select one of the 1.8.x versions. - - **Subscription**: Select the subscription to pay for the cluster. - - **Resource group**: Create a new resource group or choose one from your existing list. - - **Location**: Select the Azure region to which to deploy the cluster. AKS may not be available in all Azure regions. - -4. Configure additional AKS cluster parameters and click **OK**: - - - **User name**: The default option should be fine. - - **SSH public key**: The public key (certificate) of a key-pair that you own and that can be used for SSH. If you need to generate a new set, you can use tools such as `ssh-keygen` or PuTTY. The key should be a minimum of 2048 bits of type `ssh-rsa`. - - **Service principal client ID**: The application ID that you copied in an earlier step. - - **Service principal client secret**: The password value that you copied in a previous step. - - **Node count**: The number of _worker_ nodes that you want in the cluster. It should probably match the _total_ number of nodes in your existing Docker Cloud node cluster (managers + workers). - - **Node virtual machine size**: The size and specification of each AKS _worker_ node. It should probably match the configuration of your existing Docker Cloud node cluster. - -5. Review the configuration on the Summary screen and click **OK** to deploy the cluster. It can take a few minutes. - -### Connect to the AKS cluster - -You can connect to your AKS cluster from the web-based [Azure Cloud Shell](https://docs.microsoft.com/en-us/azure/cloud-shell/overview){: target="_blank" class="_"}; but to do so from your laptop, or other local terminal, you must: - -- Install the Azure CLI tool (`az`). -- Install the Kubernetes CLI (`kubectl`) -- Configure `kubectl` to connect to your AKS cluster. - -To connect to your AKS cluster from a local terminal: - -1. Download and install the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest){: target="_blank" class="_"} for your Operating System. - -2. With the Azure CLI, install the Kubernetes CLI, `kubectl`. - - ``` - > az aks install-cli - Downloading client to C:\Program Files (x86)\kubectl.exe from... - ``` - - You can install `kubectl` with or without `az`. If you have `kubectl` already installed, ensure that the current context is correct: - - ``` - > kubectl config get-context - > kubectl config use-context - ``` - -3. Start the Azure login process: - - ``` - > az login - To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter... - ``` - -4. Open the "devicelogin" page in a browser and paste the authentication code. When complete, the CLI returns some JSON. - -5. Get the credentials and use them to configure `kubectl`: - - The values for `--resource-group` and `--name` are the Resource Group and Cluster Name that you set in the previous steps. Substitute the values below with the values for your environment. - - ``` - > az aks get-credentials --resource-group=k8s-vote --name=k8s-vote - Merged "k8s-vote" as current context in C:\Users\nigel\.kube\config - ``` - -6. Test that `kubectl` can connect to your cluster. - - ``` - > kubectl get nodes - NAME STATUS ROLES AGE VERSION - aks-agentpool-29046111-0 Ready agent 3m v1.8.1 - aks-agentpool-29046111-1 Ready agent 2m v1.8.1 - aks-agentpool-29046111-2 Ready agent 2m v1.8.1 - ``` - - If the values returned match your AKS cluster (number of nodes, age, and version), then you have successfully configured `kubectl` to manage your AKS cluster. - -You now have an AKS cluster and have configured `kubectl` to manage it. Let's look at how to convert your Docker Cloud app into a Kubernetes app. - -## Convert Docker Cloud stackfile - -**In the following sections, we discuss each service definition separately, but you should group them into one stackfile with the `.yml` extension, for example, [k8s-vote.yml](#combined-manifest-k8s-vote.yml){: target="_blank" class="_"}.** - -To prepare your applications for migration from Docker Cloud to Kubernetes, you must recreate your Docker Cloud stackfiles as Kubernetes _manifests_. Once you have each application converted, you can test and deploy. Like Docker Cloud stackfiles, Kubernetes manifests are YAML files but usually longer and more complex. - -> In Docker Cloud, to find the stackfiles for your existing applications, you can either: (1) Select **Stacks** > _your_stack_ > **Edit**, or (2) Select **Stacks** > _your_stack_ and scroll down. - -In the Docker Cloud stackfile, the six Docker _services_ in our `example-voting-app` stack are defined as **top-level keys**: - -``` -db: -redis: -result: -lb: -vote: -worker: -``` - -Kubernetes applications are built from objects (such as [Pods](https://kubernetes.io/docs/concepts/workloads/pods/pod/){: target="_blank" class="_"}) -and object abstractions (such as [Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/){: target="_blank" class="_"} -and [Services](https://kubernetes.io/docs/concepts/services-networking/service/){: target="_blank" class="_"}). For each _Docker service_ in our voting app stack, we create one Kubernetes Deployment and one _Kubernetes Service_. Each Kubernetes Deployment spawns Pods. A Pod represents one or more containers (usually one) and is the smallest unit of work in Kubernetes. - -> A [Docker serivce](https://docs.docker.com/engine/swarm/how-swarm-mode-works/services/){: target="_blank" class="_"} is one component of an application that is generated from one image. -> A [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/){: target="_blank" class="_"} is a networking construct that load balances Pods behind a proxy. - -A Kubernetes Deployment defines the application "service" -- which Docker image to use and the runtime instructions (which container ports to map and the container restart policy). The Deployment is also where you define rolling updates, rollbacks, and other advanced features. - -A Kubernetes Service object is an abstraction that provides stable networking for a set of Pods. A Service is where you can register a cluster-wide DNS name and virtual IP (VIP) for accessing the Pods, and also create cloud-native load balancers. - -This diagram shows four Pods deployed as part of a single Deployment. Each Pod is labeled as “app=vote”. The Deployment has a label selector, “app=vote”, and this combination of labels and label selector is what allows the Deployment object to manage Pods (create, terminate, scale, update, roll back, and so on). Likewise, the Service object selects Pods on the same label (“app-vote”) which allows the service to provide a stable network abstraction (IP and DNS name) for the Pods. - -![Voting app vote Kube pods](images/votingapp-kube-pods-vote.png){:width="500px"} - -### db service - -> Consider using a hosted database service for production databases. This is something that, ideally, should not change as part of your migration away from Docker Cloud stacks. - -**Docker Cloud stackfile**: The Docker Cloud stackfile defines an image and a restart policy for the `db` service. - -``` -db: - image: 'postgres:9.4' - restart: always -``` - -**Kubernetes manifest**: The Kubernetes translation defines two object types or "kinds": a _Deployment_ and a _Service_ (separated by three dashes `---`). Each object includes an API version, metadata (labels and name), and a `spec` field for object configuration (that is, the Deployment Pods and the Service). - -``` -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - name: db - labels: - app: db -spec: - selector: - matchLabels: - app: db - template: - metadata: - labels: - app: db - spec: - containers: - - image: postgres:9.4 - name: db - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - name: db -spec: - clusterIP: None - ports: - - port: 55555 - targetPort: 0 - selector: - app: db -``` - -About the Kubernetes fields in general: - -- `apiVersion` sets the schema version for Kubernetes to use when managing the object. The versions set here are supported on AKS (1.7.7 and 1.8.1). -- `kind` defines the object type. In this example, we only define Deployments and Services but there are many others. -- `metadata` assigns a name and set of labels to the object. -- `spec` is where we configure the object. In a Deployment, `spec` defines the Pods to deploy. - -It is important that **Pod labels** (`Deployment.spec.template.metadata.labels`) match both the Deployment label selector (`Deployment.spec.selector.matchLabels`) and the Service label selector (`Service.spec.selector`). This is how the Deployment object knows which Pods to manage and how the Service object knows which Pods to provide networking for. - -> Deployment and Service label selectors have different fields in the YAML file because Deployments use [set-based selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#set-based-requirement){: target="_blank" class="_"} -and Services use [equality-based selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#equality-based-requirement){: target="_blank" class="_"}. - -For the `db` Deployment, we define a container called `db` based on the `postgres:9.4` Docker image, and define a restart policy. All Pods created by this Deployment have the label, `app=db` and the Deployment selects on them. - -The `db` Service is a “headless” service (`clusterIP: None`). Headless services are useful when you want a stable DNS name but do not need the cluster-wide VIP. They create a stable DNS record, but instead of creating a VIP, they map the DNS name to multiple -[A records](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#a-records){: target="_blank" class="_"} -- one for each Pod associated with the Service. - -The Service’s label selector (`Service.spec.selector`) has the value, "app=db". This means the Service provides stable networking and load balancing for all Pods on the cluster labeled as “app=db”. Pods defined in the Deployment section are all labelled as "app-db". It is this mapping between the Service label selector and the Pod labels that tells the Service object which Pods for which to provide networking. - -### redis service - -**Docker Cloud stackfile**: - -``` -redis: - image: 'redis:latest' - restart: always -``` - -**Kubernetes manifest**: - -``` -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: redis - name: redis -spec: - selector: - matchLabels: - app: redis - template: - metadata: - labels: - app: redis - spec: - containers: - - image: redis:alpine - name: redis - ports: - - containerPort: 6379 - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: redis - name: redis -spec: - ports: - - port: 6379 - targetPort: 6379 - selector: - app: redis -``` - -Here, the Deployment object deploys a Pod from the `redis:alpine` image and sets the container port to `6379`. It also sets the `labels` for the Pods to the same value ("app=redis") as the Deployment’s label selector to tie the two together. - -The Service object defines a cluster-wide DNS mapping for the name "redis" on port 6379. This means that traffic for `tcp://redis:6379` is routed to this Service and is load balanced across all Pods on the cluster with the "app=redis" label. The Service is accessed on the cluster-wide `port` and forwards to the Pods on the `targetPort`. Again, the label-selector for the Service and the labels for the Pods are what tie the two together. - -The diagram shows traffic intended for `tcp://redis:6379` being sent to the redis Service and then load balanced across all Pods that match the Service label selector. - -![Voting app redis Kube pods](images/votingapp-kube-pods-redis.png){:width="500px"} - -### lb service - -The Docker Cloud stackfile defines an `lb` service to balance traffic to the vote service. On AKS, this is not necessary because Kubernetes lets you define a Service object with `type=balancer`, which creates a native Azure load balancer to do this job. We demonstrate in the `vote` section. - -### vote service - -The Docker Cloud stackfile for the `vote` service defines an image, a restart policy, and a specific number of Pods (replicas: 5). It also enables the Docker Cloud `autoredeploy` feature. We can tell that it listens on port 80 because the Docker Cloud `lb` service forwards traffic to it on port 80; we can also inspect its image. - -> **Autoredeploy options**: Autoredeploy is a Docker Cloud feature that automatically updates running applications every time you push an image. It is not native to Docker CE, AKS or GKE, but you may be able to regain it with Docker Cloud auto-builds, using web-hooks from the Docker Cloud repository for your image back to the CI/CD pipeline in your dev/staging/production environment. - -**Docker Cloud stackfile**: - -``` -vote: - autoredeploy: true - image: 'docker/example-voting-app-vote:latest' - restart: always - target_num_containers: 5 -``` - -**Kubernetes manifest**: - -``` -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: vote - name: vote -spec: - selector: - matchLabels: - app: vote - replicas: 5 - template: - metadata: - labels: - app: vote - spec: - containers: - - image: docker/example-voting-app-vote:latest - name: vote - ports: - - containerPort: 80 - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: vote - name: vote -spec: - type: LoadBalancer - ports: - - port: 80 - selector: - app: vote -``` - -Again, we ensure that both Deployment and Service objects can find the Pods with matching labels ("app=vote"). We also set the number of Pod replicas to five (`Deployment.spec.replicas`) so that it matches the `target_num_containers` from the Docker Cloud stackfile. - -We define the Service as "type=loadbalancer". This creates a native Azure load balancer with a stable, publicly routable IP for the service. It also maps port 80 so that traffic hitting port 80 is load balanced across all five Pod replicas in the cluster. (This is why the `lb` service from the Docker Cloud app is not needed.) - -### worker service - -Like the `vote` service, the `worker` service defines an image, a restart policy, and a specific number of Pods (replicas: 5). It also defines the Docker Cloud `autoredeploy` policy (which is not supported in AKS). - -> **Autoredeploy options**: Autoredeploy is a Docker Cloud feature that automatically updates running applications every time you push an image. It is not native to Docker CE, AKS or GKE, but you may be able to regain it with Docker Cloud auto-builds, using web-hooks from the Docker Cloud repository for your image back to the CI/CD pipeline in your dev/staging/production environment. - -**Docker Cloud stackfile**: - -``` -worker: - autoredeploy: true - image: 'docker/example-voting-app-worker:latest' - restart: always - target_num_containers: 3 -``` - -**Kubernetes manifest**: - -``` -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: worker - name: worker -spec: - selector: - matchLabels: - app: worker - replicas: 3 - template: - metadata: - labels: - app: worker - spec: - containers: - - image: docker/example-voting-app-worker:latest - name: worker - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: worker - name: worker -spec: - clusterIP: None - ports: - - port: 55555 - targetPort: 0 - selector: - app: worker -``` - -Again, we ensure that both Deployment and Service objects can find the Pods with matching labels ("app=worker"). - -The `worker` Service (like `db`) is another ["headless" service](https://kubernetes.io/docs/concepts/services-networking/service/#headless-services){: target="_blank" class="_"} where a DNS name is created and mapped to individual -[A records](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#a-records){: target="_blank" class="_"} for each Pod rather than a cluster-wide VIP. - -### result service - -**Docker Cloud stackfile**: - -``` -result: - autoredeploy: true - image: 'docker/example-voting-app-result:latest' - ports: - - '80:80' - restart: always -``` - -**Kubernetes manifest**: - -``` -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: result - name: result -spec: - selector: - matchLabels: - app: result - template: - metadata: - labels: - app: result - spec: - containers: - - image: docker/example-voting-app-result:latest - name: result - ports: - - containerPort: 80 - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: result - name: result -spec: - type: LoadBalancer - ports: - - port: 80 - selector: - app: result -``` - -The Deployment section defines the usual names, labels and container spec. The `result` Service (like the `vote` Service) defines a native Azure load balancer to distribute external traffic to the cluster on port 80. - -### Combined manifest k8s-vote.yml - -You can combine all Deployments and Services in a single YAML file, or have individual YAML files per Docker Cloud service. The choice is yours, but it's usually easier to deploy and manage one file. - -> You should manage your Kubernetes manifest files the way you manage your application code -- checking them in and out of version control repositories etc. - -Here, we combine all the Kubernetes definitions explained above into one YAML file that we call, `k8s-vote.yml`. - -``` -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - name: db - labels: - app: db -spec: - selector: - matchLabels: - app: db - template: - metadata: - labels: - app: db - spec: - containers: - - image: postgres:9.4 - name: db - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - name: db -spec: - clusterIP: None - ports: - - port: 55555 - targetPort: 0 - selector: - app: db ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: redis - name: redis -spec: - selector: - matchLabels: - app: redis - template: - metadata: - labels: - app: redis - spec: - containers: - - image: redis:alpine - name: redis - ports: - - containerPort: 6379 - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: redis - name: redis -spec: - ports: - - port: 6379 - targetPort: 6379 - selector: - app: redis ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: vote - name: vote -spec: - selector: - matchLabels: - app: vote - replicas: 5 - template: - metadata: - labels: - app: vote - spec: - containers: - - image: docker/example-voting-app-vote:latest - name: vote - ports: - - containerPort: 80 - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: vote - name: vote -spec: - type: LoadBalancer - ports: - - port: 80 - selector: - app: vote ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: worker - name: worker -spec: - selector: - matchLabels: - app: worker - replicas: 3 - template: - metadata: - labels: - app: worker - spec: - containers: - - image: docker/example-voting-app-worker:latest - name: worker - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: worker - name: worker -spec: - clusterIP: None - ports: - - port: 55555 - targetPort: 0 - selector: - app: worker ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: result - name: result -spec: - selector: - matchLabels: - app: result - template: - metadata: - labels: - app: result - spec: - containers: - - image: docker/example-voting-app-result:latest - name: result - ports: - - containerPort: 80 - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: result - name: result -spec: - type: LoadBalancer - ports: - - port: 80 - selector: - app: result -``` - -Save the Kubernetes manifest file (as `k8s-vote.yml`) and check it into version control. - -## Test the app on AKS - -Before migrating, you should thoroughly test each new Kubernetes manifest on a AKS cluster. Healthy testing includes _deploying_ the application with the new manifest file, performing _scaling_ operations, increasing _load_, running _failure_ scenarios, and doing _updates_ and _rollbacks_. These tests are specific to each of your applications. You should also manage your manifest files in a version control system. - -The following steps explain how to deploy your app from the Kubernetes manifest file and verify that it is running. The steps are based on the sample application used throughout this guide, but the general commands should work for any app. - -> Run from an [Azure Cloud Shell](https://shell.azure.com/){: target="_blank" class="_"} or local terminal with `kubectl` configured to talk to your AKS cluster. - -1. Verify that your shell/terminal is configured to talk to your AKS cluster. The output should match your cluster. - - ``` - > kubectl get nodes - NAME STATUS ROLES AGE VERSION - aks-agentpool-29046111-0 Ready agent 6h v1.8.1 - aks-agentpool-29046111-1 Ready agent 6h v1.8.1 - aks-agentpool-29046111-2 Ready agent 6h v1.8.1 - ``` - -2. Deploy your Kubernetes application to your cluster. - - The Kubernetes manifest here is `ks8-vote.yml` and lives in the system PATH. To use a different manifest, substitute `ks8-vote.yml` with the name of your manifest file. - - ``` - > kubectl create -f k8s-vote.yml - - deployment "db" created - service "db" created - deployment "redis" created - service "redis" created - deployment "vote" created - service "vote" created - deployment "worker" created - service "worker" created - deployment "result" created - service "result" created - ``` - -3. Check the status of the app (both Deployments and Services): - - ``` - > kubectl get deployments - NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE - db 1 1 1 1 43s - redis 1 1 1 1 43s - result 1 1 1 1 43s - vote 5 5 5 5 43s - worker 3 3 3 3 43s - - > kubectl get services - NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE - db ClusterIP None 55555/TCP 48s - kubernetes ClusterIP 10.0.0.1 443/TCP 6h - redis ClusterIP 10.0.168.188 6379/TCP 48s - result LoadBalancer 10.0.76.157 80:31033/TCP 47s - vote LoadBalancer 10.0.244.254 80:31330/TCP 48s - worker ClusterIP None 55555/TCP 48s - ``` - - Both `LoadBalancer` Services are `pending` because it takes a minute or two to provision an Azure load balancer. You can run `kubectl get svc --watch` to see when they are ready. Once provisioned, the output looks like this (with different external IPs): - - ``` - > kubectl get services - - result LoadBalancer 10.0.76.157 52.174.195.232 80:31033/TCP 7m - vote LoadBalancer 10.0.244.254 52.174.196.199 80:31330/TCP 8m - ``` - -4. Test that the application works in your new environment. - - For example, the voting app exposes two web front-ends -- one for casting votes and the other for viewing results: - - - Copy/paste the `EXTERNAL-IP` value for the `vote` service into a browser and cast a vote. - - Copy/paste the `EXTERNAL-IP` value for the `result` service into a browser and ensure your vote registered. - -If you had a CI/CD pipeline with automated tests and deployments for your Docker Cloud stacks, you should build, test, and implement one for each application on AKS. - -> You can extend your Kubernetes manifest file with advanced features to perform rolling updates and simple rollbacks. But you should not do this until you have confirmed your application is working with the simple manifest file. - -## Migrate apps from Docker Cloud - -> Remember to point your application CNAMES to new service endpoints. - -How you migrate your applications is unique to your environment and applications. - -- Plan with all developers and operations teams. -- Plan with customers. -- Plan with owners of other applications that interact with your Docker Cloud app. -- Plan a rollback strategy if problems occur. - -Once your migration is in process, check that the everything is working as expected. Ensure that users are hitting the new application on the Docker CE infrastructure and getting expected results. - -> Think before you terminate stacks and clusters -> -> Do not terminate your Docker Cloud stacks or node clusters until some time after the migration has been signed off as successful. If there are problems, you may need to roll back and try again. -{: .warning} diff --git a/docker-cloud/migration/cloud-to-kube-gke.md b/docker-cloud/migration/cloud-to-kube-gke.md deleted file mode 100644 index 064d648221..0000000000 --- a/docker-cloud/migration/cloud-to-kube-gke.md +++ /dev/null @@ -1,787 +0,0 @@ ---- -description: How to migrate apps from Docker Cloud to GKE -keywords: cloud, migration, kubernetes, google, gke -title: Migrate Docker Cloud stacks to Google Kubernetes Engine ---- - -## GKE Kubernetes - -This page explains how to prepare your applications for migration from Docker Cloud to [Google Kubernetes Engine (GKE)](https://cloud.google.com/free/){: target="_blank" class="_"} clusters. GKE is a hosted Kubernetes service on Google Cloud Platform (GCP). It exposes standard Kubernetes APIs so that standard Kubernetes tools and apps run on it without needing to be reconfigured. - -At a high level, migrating your Docker Cloud applications requires that you: - -- **Build** a target environment (Kubernetes cluster on GKE). -- **Convert** your Docker Cloud YAML stackfiles. -- **Test** the converted YAML stackfiles in the new environment. -- **Point** your application CNAMES to new service endpoints. -- **Migrate** your applications from Docker Cloud to the new environment. - -To demonstrate, we **build** a target environment of GKE nodes, **convert** the Docker Cloud stackfile for [example-voting-app](https://github.com/dockersamples/example-voting-app){: target="_blank" class="_"} to a Kubernetes manifest, and **test** the manifest in the new environment to ensure that it is safe to migrate. - -> The actual process of migrating -- switching customers from your Docker Cloud applications to GKE applications -- will vary by application and environment. - -## Voting-app example - -The Docker Cloud stack of our example voting application is defined in [dockercloud.yml](https://raw.githubusercontent.com/dockersamples/example-voting-app/master/dockercloud.yml){: target="_blank" class="_"}. This document explains how `dockercloud.yml` is converted to a Kubernetes YAML manifest file so that you have the tools to do the same for your applications. - -In the [dockercloud.yml](https://raw.githubusercontent.com/dockersamples/example-voting-app/master/dockercloud.yml){: target="_blank" class="_"}, the voting app is defined as a stack of six microservices: - -- **vote**: Web front-end that displays voting options -- **redis**: In-memory k/v store that collects votes -- **worker**: Stores votes in database -- **db**: Persistent store for votes -- **result**: Web server that pulls and displays results from database -- **lb**: Container-based load balancer - -Votes are accepted with the `vote` service and stored in persistent backend database (`db`) with the help of services, `redis`, `worker`, and `lb`. The vote tally is displayed with the `result` service. - -![image of voting app arch](images/votingapp-arch.png){:width="500px"} - -## Migration prerequisites - -To complete the migration from Docker Cloud to Kubernetes on GKE, you need: - -- An active Google Cloud subscription with billing enabled. - -## Build target environment - -Google Kubernetes Engine (GKE) is a managed Kubernetes service on the Google Cloud Platform (GCP). It takes care of all of the Kubernetes control plane management (the master nodes) -- delivering the control plane APIs, managing control plane HA, managing control plane upgrades, etc. You only need to look after worker nodes -- how many, the size and spec, where to deploy them, etc. - -High-level steps to build a working GKE cluster are: - -1. Create a new GKE project. -2. Create a GKE cluster. -3. Connect to the GKE cluster. - -### Create a new GKE project - -Everything in the Google Cloud Platform has to sit inside of a _project_. Let's create one. - -1. Log in to the [Google Cloud Platform Console](https://console.cloud.google.com){: target="_blank" class="_"}. -2. Create a new project. Either: - - - Select **Create an empty project** from the home screen, or ... - - Open **Select a project** from the top of the screen and click **+**. - -3. Name the project and click **Create**. It may take a minute. - - > The examples in this document assume a project named, `proj-k8s-vote`. - -### Create a GKE cluster - -In this section, we build a three-node cluster; your cluster should probably be based on the configuration of your Docker Cloud node cluster. - -Whereas Docker Cloud deploys work to all nodes in a cluster (managers and workers), _Kubernetes only deploys work to worker nodes_. This affects how you should size your cluster. If your Docker Cloud node cluster was working well with three managers and two workers of a particular size, you should probably size your GKE cluster to have five nodes of a similar size. - -> In Docker Cloud, to see the configuration of each of your clusters, select **Node Clusters** > _your_cluster_. - -Before continuing, ensure you know: - -- **Region and zone** in which you want to deploy your GKE cluster -- **Number, size, and spec** of the worker nodes you want. - -To build: - -1. Log into the [GCP Console](https://console.cloud.google.com){: target="_blank" class="_"}. - -2. Select your project from **Select a project** at the top of the Console screen. - -3. Click **Kubernetes Engine** from the left-hand menu. It may take a minute to start. - -4. Click **Create Cluster**. - -5. Configure the required cluster options: - - - **Name:** An arbitrary name for the cluster. - - **Description:** An arbitrary description for the cluster. - - **Location:** Determines if the Kubernetes control plane nodes (masters) are in a single availability zone or spread across availability zones within a GCP Region. - - **Zone/Region:** The zone or region in which to deploy the cluster. - - **Cluster version:** The Kubernetes version. You should probably use a 1.8.x or 1.9.x version. - - **Machine type:** The type of GKE VM for the worker nodes. This should probably match your Docker Cloud node cluster. - - **Node image:** The OS to run on each Kubernetes worker node. Use Ubuntu if you require NFS, glusterfs, Sysdig, or Debian packages, otherwise use a [COS (container-optimized OS)](https://cloud.google.com/container-optimized-os/). - - **Size:** The number of _worker_ nodes that you want in the GKE cluster. It should probably match the _total_ number of nodes in your existing Docker Cloud node cluster (managers + workers). - - You should carefully consider the other configuration options; but most deployments should be OK with default values. - -6. Click **Create**. It takes a minute or two for the cluster to create. - -Once the cluster is created, you can click its name to see more details. - -### Connect to the GKE cluster - -You can connect to your GKE cluster from the web-based [Google Cloud Shell](https://cloud.google.com/shell/){: target="_blank" class="_"}; but to do so from your laptop, or other local terminal, you must: - -- Install and configure the `gcloud` CLI tool. -- Install the Kubernetes CLI (`kubectl`) -- Configure `kubectl` to connect to your cluster. - -The `gcloud` tool is the command-line tool for interacting with the Google Cloud Platform. It is installed as part of the Google Cloud SDK. - -1. Download and install the [Cloud SDK](https://cloud.google.com/sdk/){: target="_blank" class="_"} for your operating system. - -2. Configure `gcloud` and follow all the prompts: - - ``` - $ gcloud init --console-only - ``` - - > Follow _all_ prompts, including the one to open a web browser and approve the requested authorizations. As part of the procedure you must copy and paste a code into the terminal window to authorize `gcloud`. - -3. Install [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl): - - ``` - $ gcloud components list - $ gcloud components install kubectl - ``` - - You can install `kubectl` with or without `gcloud`. If you have `kubectl` already installed, ensure that the current context is correct: - - ``` - $ kubectl config get-context - $ kubectl config use-context - ``` - -4. Configure `kubectl` to talk to your GKE cluster. - - - In GKE, click the **Connect** button at the end of the line representing your cluster. - - Copy the long command and paste to your local terminal window. Your command may differ. - - ``` - $ gcloud container clusters get-credentials clus-k8s-vote --zone europe-west2-c --project proj-k8s-vote - - Fetching cluster endpoint and auth data. - kubeconfig entry generated for clus-k8s-vote. - ``` - -5. Test the `kubectl` configuration: - - ``` - $ kubectl get nodes - NAME STATUS ROLES AGE VERSION - gke-clus-k8s-vote-default-pool-81bd226c-2jtp Ready 1h v1.9.2-gke.1 - gke-clus-k8s-vote-default-pool-81bd226c-mn4k Ready 1h v1.9.2-gke.1 - gke-clus-k8s-vote-default-pool-81bd226c-qjm2 Ready 1h v1.9.2-gke.1 - ``` - - If the values returned match your GKE cluster (number of nodes, age, and version), then you have successfully configured `kubectl` to manage your GKE cluster. - -You now have a GKE cluster and have configured `kubectl` to manage it. Let's look at how to convert your Docker Cloud app into a Kubernetes app. - -## Convert Docker Cloud stackfile - -**In the following sections, we discuss each service definition separately, but you should group them into one stackfile with the `.yml` extension, for example, [k8s-vote.yml](#combined-manifest-k8s-vote.yml){: target="_blank" class="_"}.** - -To prepare your applications for migration from Docker Cloud to Kubernetes, you must recreate your Docker Cloud stackfiles as Kubernetes _manifests_. Once you have each application converted, you can test and deploy. Like Docker Cloud stackfiles, Kubernetes manifests are YAML files but usually longer and more complex. - -> In Docker Cloud, to find the stackfiles for your existing applications, you can either: (1) Select **Stacks** > _your_stack_ > **Edit**, or (2) Select **Stacks** > _your_stack_ and scroll down. - -In the Docker Cloud stackfile, the six Docker _services_ in our `example-voting-app` stack are defined as **top-level keys**: - -``` -db: -redis: -result: -lb: -vote: -worker: -``` - -Kubernetes applications are built from objects (such as [Pods](https://kubernetes.io/docs/concepts/workloads/pods/pod/){: target="_blank" class="_"}) -and object abstractions (such as [Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/){: target="_blank" class="_"} -and [Services](https://kubernetes.io/docs/concepts/services-networking/service/){: target="_blank" class="_"}). For each _Docker service_ in our voting app stack, we create one Kubernetes Deployment and one _Kubernetes Service_. Each Kubernetes Deployment spawns Pods. A Pod is a set of containers and also the smallest unit of work in Kubernetes. - -> A [Docker service](https://docs.docker.com/engine/swarm/how-swarm-mode-works/services/){: target="_blank" class="_"} is one component of an application that is generated from one image. -> A [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/){: target="_blank" class="_"} is a networking construct that load balances Pods behind a proxy. - -A Kubernetes Deployment defines the application "service" -- which Docker image to use and the runtime instructions (which container ports to map and the container restart policy). The Deployment is also where you define rolling updates, rollbacks, and other advanced features. - -A Kubernetes Service object is an abstraction that provides stable networking for a set of Pods. A Service is where you can register a cluster-wide DNS name and virtual IP (VIP) for accessing the Pods, and also create cloud-native load balancers. - -This diagram shows four Pods deployed as part of a single Deployment. Each Pod is labeled as “app=vote”. The Deployment has a label selector, “app=vote”, and this combination of labels and label selector is what allows the Deployment object to manage Pods (create, terminate, scale, update, roll back, and so on). Likewise, the Service object selects Pods on the same label (“app-vote”) which allows the service to provide a stable network abstraction (IP and DNS name) for the Pods. - -![Voting app vote Kube pods](images/votingapp-kube-pods-vote.png){:width="500px"} - -### db service - -> Consider using a hosted database service for production databases. This is something that, ideally, should not change as part of your migration away from Docker Cloud stacks. - -**Docker Cloud stackfile**: The Docker Cloud stackfile defines an image and a restart policy for the `db` service. - -``` -db: - image: 'postgres:9.4' - restart: always -``` - -**Kubernetes manifest**: The Kubernetes translation defines two object types or "kinds": a _Deployment_ and a _Service_ (separated by three dashes `---`). Each object includes an API version, metadata (labels and name), and a `spec` field for object configuration (that is, the Deployment Pods and the Service). - -``` -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - name: db - labels: - app: db -spec: - selector: - matchLabels: - app: db - template: - metadata: - labels: - app: db - spec: - containers: - - image: postgres:9.4 - name: db - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - name: db -spec: - clusterIP: None - ports: - - port: 55555 - targetPort: 0 - selector: - app: db -``` - -About the Kubernetes fields in general: - -- `apiVersion` sets the schema version for Kubernetes to use when managing the object. -- `kind` defines the object type. In this example, we only define Deployments and Services but there are many others. -- `metadata` assigns a name and set of labels to the object. -- `spec` is where we configure the object. In a Deployment, `spec` defines the Pods to deploy. - -It is important that **Pod labels** (`Deployment.spec.template.metadata.labels`) match both the Deployment label selector (`Deployment.spec.selector.matchLabels`) and the Service label selector (`Service.spec.selector`). This is how the Deployment object knows which Pods to manage and how the Service object knows which Pods to provide networking for. - -> Deployment and Service label selectors have different fields in the YAML file because Deployments use [set-based selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#set-based-requirement){: target="_blank" class="_"} -and Services use [equality-based selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#equality-based-requirement){: target="_blank" class="_"}. - -For the `db` Deployment, we define a container called `db` based on the `postgres:9.4` Docker image, and define a restart policy. All Pods created by this Deployment have the label, `app=db` and the Deployment selects on them. - -The `db` Service is a “headless” service (`clusterIP: None`). Headless services are useful when you want a stable DNS name but do not need the cluster-wide VIP. They create a stable DNS record, but instead of creating a VIP, they map the DNS name to multiple -[A records](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#a-records){: target="_blank" class="_"} -- one for each Pod associated with the Service. - -The Service’s label selector (`Service.spec.selector`) has the value, "app=db". This means the Service provides stable networking and load balancing for all Pods on the cluster labeled as “app=db”. Pods defined in the Deployment section are all labeled as "app-db". It is this mapping between the Service label selector and the Pod labels that tells the Service object which Pods for which to provide networking. - -### redis service - -**Docker Cloud stackfile**: - -``` -redis: - image: 'redis:latest' - restart: always -``` - -**Kubernetes manifest**: - -``` -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: redis - name: redis -spec: - selector: - matchLabels: - app: redis - template: - metadata: - labels: - app: redis - spec: - containers: - - image: redis:alpine - name: redis - ports: - - containerPort: 6379 - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: redis - name: redis -spec: - ports: - - port: 6379 - targetPort: 6379 - selector: - app: redis -``` - -Here, the Deployment object deploys a Pod from the `redis:alpine` image and sets the container port to `6379`. It also sets the `labels` for the Pods to the same value ("app=redis") as the Deployment’s label selector to tie the two together. - -The Service object defines a cluster-wide DNS mapping for the name "redis" on port 6379. This means that traffic for `tcp://redis:6379` is routed to this Service and is load balanced across all Pods on the cluster with the "app=redis" label. The Service is accessed on the cluster-wide `port` and forwards to the Pods on the `targetPort`. Again, the label-selector for the Service and the labels for the Pods are what tie the two together. - -The diagram shows traffic intended for `tcp://redis:6379` being sent to the redis Service and then load balanced across all Pods that match the Service label selector. - -![Voting app redis Kube pods](images/votingapp-kube-pods-redis.png){:width="500px"} - -### lb service - -The Docker Cloud stackfile defines an `lb` service to balance traffic to the vote service. On GKE, this is not necessary because Kubernetes lets you define a Service object with `type=balancer`, which creates a native GCP balancer to do this job. We demonstrate in the `vote` section. - -### vote service - -The Docker Cloud stackfile for the `vote` service defines an image, a restart policy, and a specific number of Pods (replicas: 5). It also enables the Docker Cloud `autoredeploy` feature. We can tell that it listens on port 80 because the Docker Cloud `lb` service forwards traffic to it on port 80; we can also inspect its image. - -> **Autoredeploy options**: Autoredeploy is a Docker Cloud feature that automatically updates running applications every time you push an image. It is not native to Docker CE, AKS or GKE, but you may be able to regain it with Docker Cloud auto-builds, using web-hooks from the Docker Cloud repository for your image back to the CI/CD pipeline in your dev/staging/production environment. - -**Docker Cloud stackfile**: - -``` -vote: - autoredeploy: true - image: 'docker/example-voting-app-vote:latest' - restart: always - target_num_containers: 5 -``` - -**Kubernetes manifest**: - -``` -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: vote - name: vote -spec: - selector: - matchLabels: - app: vote - replicas: 5 - template: - metadata: - labels: - app: vote - spec: - containers: - - image: docker/example-voting-app-vote:latest - name: vote - ports: - - containerPort: 80 - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: vote - name: vote -spec: - type: LoadBalancer - ports: - - port: 80 - selector: - app: vote -``` - -Again, we ensure that both Deployment and Service objects can find the Pods with matching labels ("app=vote"). We also set the number of Pod replicas to five (`Deployment.spec.replicas`) so that it matches the `target_num_containers` from the Docker Cloud stackfile. - -We define the Service as "type=loadbalancer". This creates a native GCP load balancer with a stable, publicly routable IP for the service. It also maps port 80 so that traffic hitting port 80 is load balanced across all five Pod replicas in the cluster. (This is why the `lb` service from the Docker Cloud app is not needed.) - -### worker service - -Like the `vote` service, the `worker` service defines an image, a restart policy, and a specific number of Pods (replicas: 5). It also defines the Docker Cloud `autoredeploy` policy (which is not supported in GKE). - -> **Autoredeploy options**: Autoredeploy is a Docker Cloud feature that automatically updates running applications every time you push an image. It is not native to Docker CE, AKS or GKE, but you may be able to regain it with Docker Cloud auto-builds, using web-hooks from the Docker Cloud repository for your image back to the CI/CD pipeline in your dev/staging/production environment. - -**Docker Cloud stackfile**: - -``` -worker: - autoredeploy: true - image: 'docker/example-voting-app-worker:latest' - restart: always - target_num_containers: 3 -``` - -**Kubernetes manifest**: - -``` -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: worker - name: worker -spec: - selector: - matchLabels: - app: worker - replicas: 3 - template: - metadata: - labels: - app: worker - spec: - containers: - - image: docker/example-voting-app-worker:latest - name: worker - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: worker - name: worker -spec: - clusterIP: None - ports: - - port: 55555 - targetPort: 0 - selector: - app: worker -``` - -Again, we ensure that both Deployment and Service objects can find the Pods with matching labels ("app=worker"). - -The `worker` Service (like `db`) is another ["headless" service](https://kubernetes.io/docs/concepts/services-networking/service/#headless-services){: target="_blank" class="_"} where a DNS name is created and mapped to individual -[A records](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#a-records){: target="_blank" class="_"} for each Pod rather than a cluster-wide VIP. - -### result service - -**Docker Cloud stackfile**: - -``` -result: - autoredeploy: true - image: 'docker/example-voting-app-result:latest' - ports: - - '80:80' - restart: always -``` - -**Kubernetes manifest**: - -``` -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: result - name: result -spec: - selector: - matchLabels: - app: result - template: - metadata: - labels: - app: result - spec: - containers: - - image: docker/example-voting-app-result:latest - name: result - ports: - - containerPort: 80 - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: result - name: result -spec: - type: LoadBalancer - ports: - - port: 80 - selector: - app: result -``` - -The Deployment section defines the usual names, labels and container spec. The `result` Service (like the `vote` Service) defines a GCP-native load balancer to distribute external traffic to the cluster on port 80. - -### Combined manifest k8s-vote.yml - -You can combine all Deployments and Services in a single YAML file, or have individual YAML files per Docker Cloud service. The choice is yours, but it's usually easier to deploy and manage one file. - -> You should manage your Kubernetes manifest files the way you manage your application code -- checking them in and out of version control repositories etc. - -Here, we combine all the Kubernetes definitions explained above into one YAML file that we call, `k8s-vote.yml`. - -``` -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - name: db - labels: - app: db -spec: - selector: - matchLabels: - app: db - template: - metadata: - labels: - app: db - spec: - containers: - - image: postgres:9.4 - name: db - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - name: db -spec: - clusterIP: None - ports: - - port: 55555 - targetPort: 0 - selector: - app: db ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: redis - name: redis -spec: - selector: - matchLabels: - app: redis - template: - metadata: - labels: - app: redis - spec: - containers: - - image: redis:alpine - name: redis - ports: - - containerPort: 6379 - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: redis - name: redis -spec: - ports: - - port: 6379 - targetPort: 6379 - selector: - app: redis ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: vote - name: vote -spec: - selector: - matchLabels: - app: vote - replicas: 5 - template: - metadata: - labels: - app: vote - spec: - containers: - - image: docker/example-voting-app-vote:latest - name: vote - ports: - - containerPort: 80 - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: vote - name: vote -spec: - type: LoadBalancer - ports: - - port: 80 - selector: - app: vote ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: worker - name: worker -spec: - selector: - matchLabels: - app: worker - replicas: 3 - template: - metadata: - labels: - app: worker - spec: - containers: - - image: docker/example-voting-app-worker:latest - name: worker - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: worker - name: worker -spec: - clusterIP: None - ports: - - port: 55555 - targetPort: 0 - selector: - app: worker ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: result - name: result -spec: - selector: - matchLabels: - app: result - template: - metadata: - labels: - app: result - spec: - containers: - - image: docker/example-voting-app-result:latest - name: result - ports: - - containerPort: 80 - restartPolicy: Always ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: result - name: result -spec: - type: LoadBalancer - ports: - - port: 80 - selector: - app: result -``` - -Save the Kubernetes manifest file (as `k8s-vote.yml`) and check it into version control. - -## Test the app on GKE - -Before migrating, you should thoroughly test each new Kubernetes manifest on a GKE cluster. Healthy testing includes _deploying_ the application with the new manifest file, performing _scaling_ operations, increasing _load_, running _failure_ scenarios, and doing _updates_ and _rollbacks_. These tests are specific to each of your applications. You should also manage your manifest files in a version control system. - -The following steps explain how to deploy your app from the Kubernetes manifest file and verify that it is running. The steps are based on the sample application used throughout this guide, but the general commands should work for any app. - -> Run from a [Google Cloud Shell](https://cloud.google.com/shell/){: target="_blank" class="_"} - or local terminal with `kubectl` configured to talk to your GKE cluster. - -1. Verify that your shell/terminal is configured to talk to your GKE cluster. If the output matches your cluster, you're ready to proceed with the next steps. - - ``` - $ kubectl get nodes - NAME STATUS ROLES AGE VERSION - gke-clus-k8s-vote-default-pool-81bd226c-2jtp Ready 1h v1.9.2-gke.1 - gke-clus-k8s-vote-default-pool-81bd226c-mn4k Ready 1h v1.9.2-gke.1 - gke-clus-k8s-vote-default-pool-81bd226c-qjm2 Ready 1h v1.9.2-gke.1 - - ``` - -2. Deploy your Kubernetes application to your cluster. - - The Kubernetes manifest here is `ks8-vote.yml` and lives in the system PATH. To use a different manifest, substitute `ks8-vote.yml` with the name of your manifest file. - - ``` - $ kubectl create -f k8s-vote.yml - - deployment "db" created - service "db" created - deployment "redis" created - service "redis" created - deployment "vote" created - service "vote" created - deployment "worker" created - service "worker" created - deployment "result" created - service "result" created - ``` - -3. Check the status of the app (both Deployments and Services): - - ``` - $ kubectl get deployments - NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE - db 1 1 1 1 43s - redis 1 1 1 1 43s - result 1 1 1 1 43s - vote 5 5 5 5 43s - worker 3 3 3 3 43s - - $ kubectl get services - NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE - db ClusterIP None 55555/TCP 48s - kubernetes ClusterIP 10.0.0.1 443/TCP 6h - redis ClusterIP 10.0.168.188 6379/TCP 48s - result LoadBalancer 10.0.76.157 80:31033/TCP 47s - vote LoadBalancer 10.0.244.254 80:31330/TCP 48s - worker ClusterIP None 55555/TCP 48s - ``` - - Both `LoadBalancer` Services are `pending` because it takes a minute or two to provision a GCP load balancer. You can run `kubectl get svc --watch` to see when they are ready. Once provisioned, the output looks like this (with different external IPs): - - ``` - $ kubectl get services - - result LoadBalancer 10.0.76.157 52.174.195.232 80:31033/TCP 7m - vote LoadBalancer 10.0.244.254 52.174.196.199 80:31330/TCP 8m - ``` - -4. Test that the application works in your new environment. - - For example, the voting app exposes two web front-ends -- one for casting votes and the other for viewing results: - - - Copy/paste the `EXTERNAL-IP` value for the `vote` service into a browser and cast a vote. - - Copy/paste the `EXTERNAL-IP` value for the `result` service into a browser and ensure your vote registered. - -If you had a CI/CD pipeline with automated tests and deployments for your Docker Cloud stacks, you should build, test, and implement one for each application on GKE. - -> You can extend your Kubernetes manifest file with advanced features to perform rolling updates and simple rollbacks. But you should not do this until you have confirmed your application is working with the simple manifest file. - -## Migrate apps from Docker Cloud - -> Remember to point your application CNAMES to new service endpoints. - -How you migrate your applications is unique to your environment and applications. - -- Plan with all developers and operations teams. -- Plan with customers. -- Plan with owners of other applications that interact with your Docker Cloud app. -- Plan a rollback strategy if problems occur. - -Once your migration is in process, check that everything is working as expected. Ensure that users are hitting the new application on the GKE infrastructure and getting expected results. - -> Think before you terminate stacks and clusters -> -> Do not terminate your Docker Cloud stacks or node clusters until some time after the migration has been signed off as successful. If there are problems, you may need to roll back and try again. -{: .warning} diff --git a/docker-cloud/migration/cloud-to-swarm.md b/docker-cloud/migration/cloud-to-swarm.md deleted file mode 100644 index 32411e2e3f..0000000000 --- a/docker-cloud/migration/cloud-to-swarm.md +++ /dev/null @@ -1,504 +0,0 @@ ---- -description: How to migrate apps from Docker Cloud to Docker CE -keywords: cloud, migration, swarm, community -title: Migrate Docker Cloud stacks to Docker CE swarm ---- - -## Docker CE in swarm mode - -This page explains how to prepare your applications for migration from Docker Cloud to applications running as _service stacks_ on clusters of Docker Community Edition (CE) nodes in swarm mode. You can also use [Docker Enterprise Edition](https://www.docker.com/enterprise-edition){: target="_blank" class="_"} (Docker EE) for your target environment. - -At a high level, migrating your Docker Cloud applications requires that you: - -- **Build** a target environment (Docker CE in swarm mode). -- **Convert** your Docker Cloud YAML stackfiles. -- **Test** the converted YAML stackfiles in the new environment. -- **Point** your application CNAMES to new service endpoints. -- **Migrate** your applications from Docker Cloud to the new environment. - -To demonstrate, we **build** a Docker CE swarm cluster, **convert** the Docker Cloud stackfile for [example-voting-app](https://github.com/dockersamples/example-voting-app){: target="_blank" class="_"} to a service stack format, and **test** the service stack file in swarm mode to ensure that it is safe to migrate. - -> The actual process of migrating -- switching customers from your Docker Cloud applications to Docker CE applications -- will vary by application and environment. - -## Voting-app example - -The Docker Cloud stack of our example voting application is defined in [dockercloud.yml](https://raw.githubusercontent.com/dockersamples/example-voting-app/master/dockercloud.yml){: target="_blank" class="_"}. The Docker CE service stack (for our target environment) is defined in -[docker-stack.yml](https://raw.githubusercontent.com/dockersamples/example-voting-app/master/docker-stack.yml){: target="_blank" class="_"}. This document explains how `dockercloud.yml` is converted to `docker-stack.yml` so that you have the tools to do the same for your applications. - -In the [dockercloud.yml](https://raw.githubusercontent.com/dockersamples/example-voting-app/master/dockercloud.yml){: target="_blank" class="_"}, the voting app is defined as a stack of six microservices: - -- **vote**: Web front-end that displays voting options -- **redis**: In-memory k/v store that collects votes -- **worker**: Stores votes in database -- **db**: Persistent store for votes -- **result**: Web server that pulls and displays results from database -- **lb**: Container-based load balancer - -Votes are accepted with the `vote` service and stored in persistent backend database (`db`) with the help of services, `redis`, `worker`, and `lb`. The vote tally is displayed with the `result` service. - -![image of voting app arch](images/votingapp-arch.png){:width="500px"} - -## Migration prerequisites - -To complete the migration from Docker Cloud to Docker CE in swarm mode, you need: - -- **Docker CE nodes** (in a public cloud or on-premises) organized as a swarm cluster -- **SSH access** to the nodes in the swarm cluster - -You _may_ also need the following application-specific things: - -- **Permanent public IP addresses and hostnames** for nodes -- **External load balancers** configured to direct traffic to Docker CE nodes - -## Build target environment - -Our target environment is a cluster of Docker CE nodes configured in swarm mode. A swarm cluster comprises one or more manager and worker nodes. - -To ensure high availability (HA) of the swarm control plane in production, you should include an odd number (3+) of manager nodes, usually no more than seven. They should be spread across availability zones and connected by high-speed reliable networks. For information on building a secure HA swarm cluster for production, see [Swarm mode overview](https://docs.docker.com/engine/swarm/){: target="_blank" class="_"}. - -### Plan Docker CE nodes - -How you plan and build your nodes will depend on your application requirements, but you should expect to: - -- Choose a **platform** (cloud or on-premises) to host your Docker CE nodes. -- Estimate **node size and spec** (your Docker Cloud nodes can be a guide). -- Calculate the **number of nodes** for managers and workers (manager HA requires 3/5/7 managers). -- Decide **node distribution** across availability zones for high availability (HA). -- Ensure **nodes can communicate** over the network and have stable resolvable hostnames. -- Configure **load balancers**. - -Your swarm cluster of Docker CE nodes should probably resemble your existing Docker Cloud node cluster. For example, if you currently have nodes of a particular size and spec, in hosted availability zones, your target swarm cluster should probably match that. - -> In Docker Cloud, to see the configuration of each of your clusters, select **Node Clusters** > _your_cluster_. - -This diagram shows a six-node swarm cluster spread across two availability zones: - -![Swarm cluster](images/swarm-cluster.png){:width="600px"} - -### Configure swarm cluster - -Configuring a swarm cluster of Docker CE nodes involves the following high-level steps: - -1. Deploy nodes and install Docker CE. -2. Initialize swarm mode (which creates one manager). -3. _[optional] Add manager nodes (for HA)._ -4. Add worker nodes. - -In this demo, we build a swarm cluster with six nodes (3 managers/3 workers), but you can use more (or fewer, for example, 1 manager/2 workers). For manager HA, create a minimum of three manager nodes. You can add as many workers as you like. - -1. Deploy six nodes and install the latest version of [Docker CE](https://docs.docker.com/install/){: target="_blank" class="_"} on each. - -2. Initialize a swarm cluster from one node (that automatically becomes the first manager in the swarm): - - ``` - $ docker swarm init - ``` - - > Our swarm cluster uses self-signed certificates. To use an [external CA](https://docs.docker.com/engine/reference/commandline/swarm_init/#--external-ca){: target="_blank" class="_"}, initialize with the option, `--external-ca`. You should also build your nodes in appropriate availability zones. - - > You can use the flag, `--advertise-addr`, to define the IP and port that other nodes should use to connect to this manager. You can even specify an IP that does not exist on the node, such one for a load balancer. See [docker swarm init](https://docs.docker.com/engine/reference/commandline/swarm_init/#--advertise-addr){: target="_blank" class="_"}. - -3. Extract and **safely store** the manager _join-token_ required to add manager nodes. - - ``` - $ docker swarm join-token manager - ``` - -4. Extract and **safely store** the worker _join-token_ required to add worker nodes. - - ``` - $ docker swarm join-token worker - ``` - - > Keep your join tokens safe and secure as bad people can join managers with them! - -5. **[optional]** If you deployed six nodes, you can add two manager nodes with the _manager_ join token. Run the command on each node designated as a manager. The join token and network details will differ in your environment. - - ``` - $ docker swarm join --token - ``` - -6. Add two or more worker nodes with the _worker_ join token. Run the command on each node designated as a worker. The join token and network details will differ in your environment. - - ``` - $ docker swarm join --token - ``` - -7. List the nodes from one of the managers (if you have more than one) to verify the status of the swarm. In the `MANAGER STATUS` column, manager nodes are either "Leader" or "Reachable". Worker nodes are blank. - - ``` - $ docker node ls - ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS - vrx...vr1 * node1 Ready Active Leader - f4b...fbd node2 Ready Active Reachable - f2v...sdo node3 Ready Active Reachable - bvb...l55 node4 Ready Active - hf2...kvc node5 Ready Active - p49...aav node6 Ready Active - ``` - -With your target environment configured, let us look at the application and convert the Docker Cloud stackfile to a service stack. - -## Convert Docker Cloud stackfile - -**In the following sections, we discuss each service definition separately, but you should group them into one stackfile with the `.yml` extension, for example, [docker-stack.yml](https://raw.githubusercontent.com/dockersamples/example-voting-app/master/docker-stack.yml){: target="_blank" class="_"}.** - -To prepare your applications for migration from Docker Cloud to Docker CE in swarm mode, you must recreate your Docker Cloud stackfiles (**source** files) as _service stack_ stackfiles (**target** files). Once you have each application defined as a service stack, you can test and deploy. - -> In Docker Cloud, to find the stackfiles for your existing applications, you can either: (1) Select **Stacks** > _your_stack_ > **Edit**, or (2) Select **Stacks** > _your_stack_ and scroll down. - -In the sections below, we step through each service in [example-voting-app](https://github.com/dockersamples/example-voting-app){: target="_blank" class="_"} and explain how the Docker Cloud source file -([dockercloud.yml](https://raw.githubusercontent.com/dockersamples/example-voting-app/master/dockercloud.yml){: target="_blank" class="_"}) is converted to the service stack target file - ([docker-stack.yml](https://raw.githubusercontent.com/dockersamples/example-voting-app/master/docker-stack.yml){: target="_blank" class="_"}). We provide a simple version of each service definition (one that does a like-for-like conversion with no added bells and whistles), and an extended version that demonstrates more features in swarm mode. - - - **Simple example:** Only includes the necessary features for _this_ migration to work. - - **Extended example:** Includes some advanced features that improves application management. - -> This is not a best practice guide -> -> This document shows you how to convert a Docker Cloud application to a Docker CE application and run it in a swarm. Along the way it introduces some of the advanced features offered by service stacks. It is not intended to be a best practice guide, but more of a "what's possible guide". - -### Top- and sub-level keys - -In the Docker Cloud stackfile, the six services are defined as top-level keys, whereas in the _service stack_ stackfile, they are sub-level keys. - -**Cloud source**: Services are **top-level keys**: - -``` -db: -redis: -result: -lb: -vote: -worker: -``` - -**Swarm target**: Services are **sub-level keys** (below the top-level key, `services`), and the Compose file format version is defined at the top (and is required). - -``` -version: "3.5" -services: - db: - redis: - result: - vote: - worker: -``` - -Notice that we removed the `lb` service -- this is because it is not needed in swarm mode. In Docker Cloud, the `lb` service accepts incoming traffic on port 80 and load balances across all replicas in the `vote` front-end service. In swarm mode, load balancing is built-in with a native transport-layer routing mesh called the [swarm mode service mesh](/../../engine/swarm/ingress/){: target="_blank" class="_"}. - -### db service - -> Consider using a hosted database service for production databases. This is something that, ideally, should not change as part of your migration away from Docker Cloud stacks. - -**Cloud source**: The Docker Cloud `db` service defines an image and a restart policy: - -``` -db: - image: 'postgres:9.4' - restart: always -``` - -**Swarm target**: This can be translated into a service stack service as follows: - -``` -db: - image: postgres:9.4 - deploy: - restart_policy: - condition: any -``` - -**Swarm target (extended)**: You can also add best practices, documentation, and advanced features, to improve application management: - -``` -db: - image: postgres:9.4 - volumes: - - db-data:/var/lib/postgresql/data - networks: - - backend - deploy: - placement: - constraints: [node.role == manager] - restart_policy: - condition: any -``` - -Let's step through some fields: - -- `volumes` places the Postgres database on a named volume called **db-data** and mounts it into the service replica at `/var/lib/postgresql/data`. This ensures that the data written by the application persists in the event that the Postgres container fails. -- `networks` adds security by putting the service on a backend network. -- `deploy.placement.constraints` forces the service to run on manager nodes. In a single-manager swarm, this ensures that the service always starts on the same node and has access to the same volume. -- `deploy.restart_policy.condition` tells Docker to restart any service replica that has stopped (no matter the exit code). - -### redis service - -**Cloud source**: The Docker Cloud `redis` service defines an image and a restart policy. - -``` -redis: - image: 'redis:latest' - restart: always -``` - -**Swarm target**: This can be translated into a service stack service as follows. - -``` -redis: - image: redis:latest - deploy: - restart_policy: - condition: any -``` - -**Swarm target (extended)**: - -``` -redis: - image: redis:alpine - ports: - - "6379" - networks: - - frontend - deploy: - replicas: 1 - restart_policy: - condition: any -``` - -Let's step through each field. - -- `image` defines the exact same image as the Docker Cloud stackfile. -- `ports` defines the network port that the service should operate on -- this can actually be omitted as it's the default port for redis. -- `networks` deploys the service on a network called `frontend`. -- `deploy.replicas` ensures there is always one instance (one replica) of the service running. -- `deploy.restart_policy.condition` tells Docker to restart any service replica that has stopped (no matter the exit code). - -### result service - -**Cloud source**: - -``` -result: - autoredeploy: true - image: 'docker/example-voting-app-result:latest' - ports: - - '80:80' - restart: always -``` - -**Swarm target**: - -``` -result: - image: docker/example-voting-app-result:latest - ports: - - 5001:80 - deploy: - restart_policy: - condition: any -``` - -Notice the different port mappings in the two stackfiles. The Docker Cloud application makes two services available on port 80 (using different nodes). The `result` service is published directly on port 80, and the `vote` service is published indirectly on port 80 using the `lb` service. - -In the _service stack_ stackfile, we publish these two services on different ports -- `vote` on port 5000 and `result` service on port 5001. If this is a problem for your users or application, you may be able to: - -- Publish this service on port 80 and any other service on a different port. -- Use host mode and publish both services on port 80 by using placement constraints to run them on different nodes. -- Use a frontend service, such as HAProxy, and route the traffic based on a virtual host. - -**Swarm target (extended)** - -``` -result: - image: dockersamples/examplevotingapp_result:latest - ports: - - 5001:80 - networks: - - backend - depends_on: - - db - deploy: - replicas: 1 - restart_policy: - condition: any -``` - -The extended version adds the following: - -- `networks` places all service replicas on a network called `backend`. -- `depends_on` tells Docker to start the `db` service before starting this one. -- `deploy.replicas` tells Docker to create a single replica for this service. -- `deploy.restart_policy.condition` tells Docker to restart any service replica that has stopped (no matter the exit code). - -### lb service - -In Docker Cloud, the `lb` service was used to proxy connections on port 80 to the `vote` service. We do not need to migrate the `lb` service because Docker CE in swarm mode has native load balancing built into its service mesh. - -If your applications are running load balancers, such as `dockercloud/haproxy`, you _may_ no longer need them when migrating to stacks on Docker CE. Be sure to test your application and consult with your Docker technical account manager for further details. - -### vote service - -The Docker Cloud `vote` service defines an image, a restart policy, service replicas. It also defines an `autoredeploy` policy which is not supported natively in service stacks. - -> **Autoredeploy options**: Autoredeploy is a Docker Cloud feature that automatically updates running applications every time you push an image. It is not native to Docker CE, AKS or GKE, but you may be able to regain it with Docker Cloud auto-builds, using web-hooks from the Docker Cloud repository for your image back to the CI/CD pipeline in your dev/staging/production environment. - -**Cloud source**: - -``` -vote: - autoredeploy: true - image: 'docker/example-voting-app-vote:latest' - restart: always - target_num_containers: 5 -``` - -**Swarm target**: - -``` -vote: - image: dockersamples/examplevotingapp_vote:latest - ports: - - 5000:80 - deploy: - replicas: 5 - restart_policy: - condition: any -``` - -Again, the Docker Cloud version of the voting application publishes both the `result` and `vote` services on port 80 (where the `vote` service is made available on port 80 with the `lb` service). - -Docker Swarm only allows a single service to be published on a swarm-wide port (because in this example, we are in swarm mode and using the routing mesh option for network configuration). To get around this, we publish the `vote` service on port 5000 (as we did with the `result` service on port 5001). - -> For the difference between swarm mode (with ingress networking) and host mode, see [Use swarm mode routing mesh](/../../engine/swarm/ingress/). - -**Swarm target (extended)**: - -``` -vote: - image: dockersamples/examplevotingapp_vote:latest - ports: - - 5000:80 - networks: - - frontend - depends_on: - - redis - deploy: - replicas: 5 - update_config: - parallelism: 2 - restart_policy: - condition: any -``` - -About some fields: - -- `networks` places all service replicas on a network called `frontend`. -- `depends_on` tells Docker to start the `redis` service before starting the `vote` service. -- `deploy.replicas` tells Docker to create 5 replicas for the `vote` service (and we need at least 3 for the parallelism setting). -- `deploy.update_config` tells Docker how to perform rolling updates on the service. While not strictly needed, `update_config` settings are extremely helpful when doing application updates. Here, `parallelism: 2` tells swarm to update two instances of the service at a time, and wait for 10 seconds in between each set of two. -- `deploy.restart_policy.condition` tells Docker to restart any service replica that has stopped (no matter the exit code). - -### worker service - -**Cloud source**: The Docker Cloud `worker` service defines an image, a restart policy, and a number of service replicas. It also defines an `autoredeploy` policy which is not supported natively in service stacks. - -``` -worker: - autoredeploy: true - image: 'docker/example-voting-app-worker:latest' - restart: always - target_num_containers: 3 -``` - -**Swarm target**: - -``` -worker: - image: dockersamples/examplevotingapp_worker - deploy: - replicas: 3 - restart_policy: - condition: any -``` - -**Swarm target (extended)**: - -``` -worker: - image: dockersamples/examplevotingapp_worker - networks: - - frontend - - backend - deploy: - mode: replicated - replicas: 3 - labels: [APP=VOTING] - restart_policy: - condition: any - delay: 10s - max_attempts: 3 - window: 120s - placement: - constraints: [node.role == manager] -``` - -All of the settings mentioned here are application specific and may not be needed in your application. - -- `networks` tells Docker to attach replicas to two networks (named "frontend" and "backend") allowing them to communicate with services on either one. -- `deploy.placement.constraints` ensures that replicas for this service always start on a manager node. -- `deploy.restart_policy.condition` tells Docker to restart any service replica that has stopped (no matter the exit code). It makes 3 attempts to restart, gives each restart attempt 120 seconds to complete, and waits 10 seconds before trying again. - -## Test converted stackfile - -Before migrating, you should thoroughly test each new stackfile in a Docker CE cluster in swarm mode. Test the simple stackfile first -- that is, the stackfile that most literally mimics what you have in Docker Cloud. Once that works, start testing some of the more robust features in the extended examples. - -Healthy testing includes _deploying_ the application with the new stackfile, performing _scaling_ operations, increasing _load_, running _failure_ scenarios, and doing _updates_ and _rollbacks_. These tests are specific to each of your applications. You should also manage your manifest files in a version control system. - -The following steps explain how to deploy your app from the **target** Docker Swarm stackfile and verify that it is running. Perform the following from a manager node in your swarm cluster. - -1. Deploy the app from the _service stack_ stackfile you created. - - ``` - $ docker stack deploy -c example-stack.yaml example-stack - ``` - - The format of the command is `docker stack deploy -c ` where the name of the stack is arbitrary but should be probably be meaningful. - -2. Test that the stack is running. - - ``` - $ docker stack ls - NAME SERVICES - example-stack 5 - ``` - -3. Get more details about the stack and the services running as part of it. - -4. Test that the application works in your new environment. - - For example, the voting app exposes two web front-ends -- one for casting votes and the other for viewing results. We exposed the `vote` service on port 5000, and the `result` service on port 5001. To connect to either of them, open a web browser and point it to the public IP or public hostname of any swarm node on the required port: - - - Go to :5000 and cast a vote. - - Go to :5001 and view the result of your vote. - -If you had a CI/CD pipeline with automated tests and deployments for your Docker Cloud stacks, you should build, test, and implement one for each application on Docker CE. - -## Migrate apps from Docker Cloud - -> Remember to point your application CNAMES to new service endpoints. - -How you migrate your applications is unique to your environment and applications. - -- Plan with all developers and operations teams. -- Plan with customers. -- Plan with owners of other applications that interact with your Docker Cloud app. -- Plan a rollback strategy if problems occur. - -Once your migration is in process, check that the everything is working as expected. Ensure that users are hitting the new application on the Docker CE infrastructure and getting expected results. - -> Think before you terminate stacks and clusters -> -> Do not terminate your Docker Cloud stacks or node clusters until some time after the migration has been signed off as successful. If there are problems, you may need to roll back and try again. -{: .warning} diff --git a/docker-cloud/migration/deregister-swarms.md b/docker-cloud/migration/deregister-swarms.md deleted file mode 100644 index bc28601da2..0000000000 --- a/docker-cloud/migration/deregister-swarms.md +++ /dev/null @@ -1,131 +0,0 @@ ---- -description: How to deregister swarms on Docker Cloud -keywords: cloud, swarm, migration -title: Deregister Swarms on Docker Cloud ---- - -## Introduction - -This page explains how to deregister a Swarm cluster from Docker Cloud so that it can be managed independently. We explain how to deregister on both Amazon Web Services (AWS) and Microsoft Azure (because Docker Cloud swarms run on either AWS or Azure behind the scenes). - -You do not need to migrate or reconfigure your applications as part of this procedure. The only thing that changes is that your Swarm cluster no longer integrates with Docker services (such as Docker Cloud, Docker for Mac, or Docker for Windows). - -### Prerequisites - -To complete this procedure you need: - -- An AWS or Azure account that lets you inspect resources such as instances. - -### High-level steps - -- Verify that you can SSH to your Swarm nodes (on AWS and Azure). -- Deregister your Swarm from Docker Cloud. -- Clean up old Docker Cloud resources. - -## SSH to your Swarm - -It is vital that you can SSH to your Docker Cloud Swarm before you deregister it from Docker Cloud. - -Your Docker Cloud Swarm runs on either AWS or Azure, so to SSH to your Swarm nodes, you must know the public IP addresses or public DNS names of your nodes. The simplest way to find this information is with the native AWS or Azure tools. - -### How to SSH to AWS nodes - -1. Log on to the AWS console and open the **EC2 Dashboard** for the **region** that hosts your Swarm nodes. - -2. Locate your instances and note their DNS names and IPs. - - By default, AWS labels your Swarm nodes as _swarm-name_-worker or _swarm-name_-manager. For example, a Swarm called "prod-equus" in Docker Cloud, has manager and worker nodes in AWS labelled, "prod-equus-manager" and "prod-equus-worker" respectively. - - You will also have a load balancer (type=classic) that includes the name of the Swarm. It accepts Docker commands on port 2376 and balances them to the manager nodes in the Swarm (as the server proxy is only deployed on the managers). - -3. Open an SSH session to each node in the cluster. - - This example opens an SSH session to a Swarm node with: - - - Private key = “awskey.pem” - - Username = “docker” - - Public DNS name = “ec2-34-244-56-42.eu-west-1.compute.amazonaws.com” - - ``` - $ ssh -i ./awskey.pem docker@ec2-34-244-56-42.eu-west-1.compute.amazonaws.com - ``` - -Once you are certain that you are able to SSH to _all nodes_ in your Swarm, you can [deregister from Docker Cloud](#deregister-swarm-from-docker-cloud). - -> If you do not have the keys required to SSH on to your nodes, you can deploy new public keys to your nodes using [this procedure](https://github.com/docker/dockercloud-authorizedkeys/blob/master/README.md){: target="_blank" class="_"}. You should perform this operation before deregistering your Swarm from Docker Cloud. - -### How to SSH to Azure nodes - -In Azure, you can only SSH to manager nodes because worker nodes do not get public IPs and public DNS names. If you need to log on to worker nodes, you can use your manager nodes as jump hosts. - -1. Log on to the Azure portal and click **Resource groups**. - -2. Click on the resource group that contains your Swarm. The `DEPLOYMENT NAME` should match the name of your Swarm. - -3. Click into the deployment with the name of your Swarm and verify the values. For example, the `DOCKERCLOUDCLUSTERNAME` value under **Inputs** should exactly match the name of your Swarm as shown in Docker Cloud. - -4. Copy the value from `SSH TARGETS` under **Outputs** and paste it into a new browser tab. - - This takes you to the inbound NAT Rules for the external load balancer that provides SSH access to your Swarm. It displays a list of all of the **Swarm managers** (not workers) including public IP address (`DESTINATION`) and port (`SERVICE`) that you can use to gain SSH access. - -5. Open an SSH session to each manager in the cluster. Use public IP and port to connect. - - This example creates an SSH session with user `docker` to a swarm manager at `51.140.229.154` on port `50000` with the `azkey.pem` private key in the current directory. - - ``` - ssh -i ./azkey.pem -p 50000 docker@51.140.229.154 - ``` - - > If you do not know which private key to use, you can see the public key under `SSHPUBLICKEY` in the **Outputs** section of the Deployment. You can compare this value to the contents of public keys you have on file. - -6. Log on to your worker nodes by using your manager nodes as jump hosts. With - [SSH agent forwarding enabled](https://docs.docker.com/docker-for-azure/deploy/#connecting-to-your-linux-worker-nodes-using-ssh), SSH from the manager nodes to the workers nodes over the private network. - -Once you are certain that you are able to SSH to the manager nodes in your Swarm you can [deregister from Docker Cloud](#deregister-swarm-from-docker-cloud). - -> If you do not have the keys required to SSH on to your nodes, you can deploy new public keys to your nodes using [this procedure](https://github.com/docker/dockercloud-authorizedkeys/blob/master/README.md){: target="_blank" class="_"}. You should perform this operation before deregistering your Swarm from Docker Cloud. - -## Deregister swarm from Docker Cloud - -> Proceed with caution -> -> Only deregister if you know the details of your Swarm nodes (cloud provider, public DNS names, public IP address, etc.) and you have verified that you can SSH to each node with your private key. -{: .warning} - -1. Open the Docker Cloud web UI and click **Swarms**. - -2. Click the three dots to the right of the Swarm you want to deregister and select **Unregister**. - -3. Confirm the deregistration process. - -The Swarm is now deregistered from the Docker Cloud web UI and no longer is visible in other products such as Docker for Mac and Docker for Windows. - -## Clean up Docker Cloud resources - -The final step is to clean up old Docker cloud resources such as the service, network and secret. - -Docker Cloud deployed a service on your Swarm called `dockercloud-server-proxy` to proxy and load balance incoming Docker commands on port 2376 across all manager nodes. It has a network called `dockercloud-server-proxy-network` and a secret called `dockercloud-server-proxy-secret`. - -All of these should be removed: - -1. Open an SSH session to a Swarm manager _for the correct swarm!_ - -2. Remove the service: - - ``` - $ docker service rm dockercloud-server-proxy - ``` - -3. Remove the network: - - ``` - $ docker network rm dockercloud-server-proxy-network - ``` - -4. Remove the secret: - - ``` - $ docker secret rm dockercloud-server-proxy-secret - ``` - -Your Docker Swarm cluster is now deregistered from Docker Cloud and you can manage it independently. diff --git a/docker-cloud/migration/images/AWS-migration1.png b/docker-cloud/migration/images/AWS-migration1.png deleted file mode 100644 index 5cb1cf226d..0000000000 Binary files a/docker-cloud/migration/images/AWS-migration1.png and /dev/null differ diff --git a/docker-cloud/migration/images/kube-cluster.png b/docker-cloud/migration/images/kube-cluster.png deleted file mode 100644 index 702f5de5ad..0000000000 Binary files a/docker-cloud/migration/images/kube-cluster.png and /dev/null differ diff --git a/docker-cloud/migration/images/kube-manifest.png b/docker-cloud/migration/images/kube-manifest.png deleted file mode 100644 index 7ac1b4ccb5..0000000000 Binary files a/docker-cloud/migration/images/kube-manifest.png and /dev/null differ diff --git a/docker-cloud/migration/images/swarm-cluster.png b/docker-cloud/migration/images/swarm-cluster.png deleted file mode 100644 index 789a103fd1..0000000000 Binary files a/docker-cloud/migration/images/swarm-cluster.png and /dev/null differ diff --git a/docker-cloud/migration/images/votingapp-arch.png b/docker-cloud/migration/images/votingapp-arch.png deleted file mode 100644 index 51f1519029..0000000000 Binary files a/docker-cloud/migration/images/votingapp-arch.png and /dev/null differ diff --git a/docker-cloud/migration/images/votingapp-architecture.png b/docker-cloud/migration/images/votingapp-architecture.png deleted file mode 100644 index b081369ccc..0000000000 Binary files a/docker-cloud/migration/images/votingapp-architecture.png and /dev/null differ diff --git a/docker-cloud/migration/images/votingapp-kube-pods-redis.png b/docker-cloud/migration/images/votingapp-kube-pods-redis.png deleted file mode 100644 index d846f159f4..0000000000 Binary files a/docker-cloud/migration/images/votingapp-kube-pods-redis.png and /dev/null differ diff --git a/docker-cloud/migration/images/votingapp-kube-pods-vote.png b/docker-cloud/migration/images/votingapp-kube-pods-vote.png deleted file mode 100644 index e7fb3d3c74..0000000000 Binary files a/docker-cloud/migration/images/votingapp-kube-pods-vote.png and /dev/null differ diff --git a/docker-cloud/migration/index.md b/docker-cloud/migration/index.md deleted file mode 100644 index c6a71b5c45..0000000000 --- a/docker-cloud/migration/index.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -description: Migrating from Docker Cloud -keywords: cloud, migration -title: Migration overview ---- - -## Introduction - -Important **Cluster and application management services in Docker Cloud are shutting down on May 21. You must migrate your applications from Docker Cloud to another platform and deregister your Swarms.** - -The Docker Cloud runtime is being discontinued. This means that you will no longer be able to manage your nodes, swarm clusters, and the applications that run on them in Docker Cloud. To protect your applications, you must must migrate them to another platform, and if applicable, deregister your Swarms from Docker Cloud. The documents in this section explain how. - -- [Migrate Docker Cloud stacks to Docker CE swarm](cloud-to-swarm){: target="_blank" class="_"} -- [Migrate Docker Cloud stacks to Azure Container Service](cloud-to-kube-aks){: target="_blank" class="_"} -- [Migrate Docker Cloud stacks to Google Kubernetes Engine](cloud-to-kube-gke){: target="_blank" class="_"} -- [Migrate Docker Cloud stacks to Amazon ECS](cloud-to-aws-ecs){: target="_blank" class="_"} -- [Deregister Swarms on Docker Cloud](deregister-swarms){: target="_blank" class="_"} -- [Kubernetes primer](kube-primer){: target="_blank" class="_"} - -## What stays the same - -**How users and external systems interact with your Docker applications**. Your Docker images, autobuilds, automated tests, and overall application functionality remain the same. For example, if your application uses a Docker image called `myorg/webfe:v3`, and publishes container port `80` to external port `80`, none of this changes. - -Docker Cloud SaaS features stay! We are _not_ removing automated builds and registry storage services. - -## What changes - -**How you manage your applications**. We are removing cluster management and the ability to deploy and manage Docker Cloud stacks. As part of the migration, you will no longer be able to: - -- Manage your nodes and clusters in Docker Cloud. -- Deploy and manage applications from the Docker Cloud web UI. -- Autoredeploy your applications. -- Integrate users with other parts the Docker platform with their Docker ID. - -> **Autoredeploy options**: Autoredeploy is a Docker Cloud feature that automatically updates running applications every time you push an image. It is not native to Docker CE, AKS, ECS or GKE, but you may be able to regain it with Docker Cloud auto-builds, using web-hooks from the Docker Cloud repository for your image back to the CI/CD pipeline in your dev/staging/production environment. diff --git a/docker-cloud/migration/kube-primer.md b/docker-cloud/migration/kube-primer.md deleted file mode 100644 index 055a179419..0000000000 --- a/docker-cloud/migration/kube-primer.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -description: Kubernetes orchestration primer -keywords: cloud, migration, kubernetes, primer -title: Kubernetes primer ---- - -## Introduction - -Like Docker Cloud applications, Kubernetes applications are defined in YAML files and can run on public cloud infrastructure. Important Kubernetes concepts are: - -- The Kubernetes cluster -- The Kubernetes application - -## Kubernetes cluster - -A Kubernetes cluster is made up of _masters_ and _nodes_. These can be cloud instances or VMs in your data center. - -The diagram below shows a Kubernetes cluster with three masters and three nodes. - -![Kubernetes cluster](images/kube-cluster.png){:width="400px"} - -### Masters - -**Masters** run the control plane services and also issue work to nodes. They are the equivalent to _managers_ in a Docker Cloud or Docker Swarm cluster. They handle: - -- Exposing the main Kubernetes API -- The cluster store -- The scheduler -- All of the _controllers_ (such as Deployments) -- Assigning jobs to nodes - -### Nodes - -**Nodes** receive and execute work assigned by masters. They are equivalent to _workers_ in a Docker Cloud or Docker Swarm cluster. - -You should run all of your work on nodes and _not_ on masters. This may differ from Docker Cloud where you may have run some work on manager nodes. - -### Hosted services - -You can run a Kubernetes cluster on-premises where you manage everything yourself -- masters (control plane) and nodes. But Control plane high availability (HA) can be difficult to configure. - -Cloud providers such as [Microsoft Azure](https://azure.microsoft.com/en-us/free/){: target="_blank" class="_"}, -[Google Cloud Platform (GCP)](https://cloud.google.com/free/){: target="_blank" class="_"}, and -[Amazon Web Services (AWS)](https://aws.amazon.com/free/){: target="_blank" class="_"}, provide hosted Kubernetes services: - -- Azure Container Service (AKS) -- Google Kubernetes Engine (GKE) -- Amazon Elastic Container Service for Kubernetes (EKS) - -Each provides the Kubernetes control plane as a managed service, meaning the platform takes care of things such as control plane high availability (HA) and control plane upgrades. In fact, you have no access to the control plane (masters). - - -> The managed control plane service is usually free but worker nodes are not. - -## Kubernetes application - -A Kubernetes app is any containerized application defined in a Kubernetes manifest file. - -### Manifest - -The manifest file (usually written in YAML) tells Kubernetes everything it needs to know about the application, as well as how to deploy and manage it. For example: - -- Images and containers to run -- Network ports to publish -- How to scale the app (up or down as demand requires) -- How to perform rolling updates -- How to perform rollbacks - -### Pods and Services - -In the Docker world, the atomic unit of deployment is the _Docker container_. In the Kubernetes world, it is the _Pod_. If you already understand containers, you can think of a **[Pod](https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/){: target="_blank" class="_"}** as one or more related containers. For the most part, Pods have a single container and are almost analogous to a container. - -A Kubernetes **[Service](https://kubernetes.io/docs/concepts/services-networking/service/){: target="_blank" class="_"}** is an object abstraction that sits in front of a set of Pods and provides a static virtual IP (VIP) address and DNS name. The main purpose of a Kubernetes Service is to provide stable networking for groups of Pods. - -Kubernetes Services can also be used to provision cloud-native load balancers and provide load balancing of requests coming in to the cluster from external sources. Examples include integration with native load balancers on AWS, Azure, and GCP. - -### Deployments - -Docker has a higher level construct called a _Docker service_ (different from a Kubernetes Service) that wraps around a container and adds things such as scalability and rolling updates. Kubernetes also has a higher level construct called a _Deployment_. A Kubernetes **[Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/){: target="_blank" class="_"}** is a "controller" that wraps around a set of Pods and adds things such as scalability, rolling updates, and simple rollbacks. - -The diagram below shows a Service object providing a DNS name and stable IP for a Deployment of 4 Pods. - -![Voting app redis Kube pods](images/votingapp-kube-pods-redis.png){:width="500px"} - -## Managing Kubernetes apps - -Docker apps are usually managed with the `docker` command line utility. Docker Cloud apps can be managed with the Docker Cloud CLI. Kubernetes apps are managed with the `kubectl` command line utility. - -### Common commands - -This command deploys a Docker application, named `test-app`, from a YAML configuration file called `app1.yml`: - -``` -$ docker stack deploy -c app1.yml test-app -``` - -This command deploys a Kubernetes application from a YAML manifest file called `k8s-app1.yml`: - -``` -$ kubectl create -f k8s-app1.yml -``` - -Some other useful `kubectl` commands include: - -- `kubectl get` prints a short description about an object. For Deployments, run: `kubectl get deploy`. -- `kubectl describe` prints detailed information about an object. For a Deployment named "app1", run: `kubectl describe deploy app1` -- `kubectl delete` deletes a resource on the cluster. To delete a Deployment created with the `app1.yml` manifest file, run: `kubectl delete -f app1.yml`. - -### Sample manifest - -Below is a simple Kubernetes manifest file containing a Deployment and a Service. - -- The Deployment lists everything about the app, including how many Pod replicas to deploy, and the spec of the Pods to be deployed. -- The Service defines an external load balancer that listens on port 80 and load-balances traffic across all ports with the "app=vote" label. - -Everything in Kubernetes is loosely connected with labels. The three blue boxes show the **[labels and label selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/){: target="_blank" class="_"}** that connect the service to the Pods, and the Pods to the Deployment. - -> Indentation is important in Kubernetes manifests, and you should indent with two spaces. - -![Kubernetes YAML manifest](images/kube-manifest.png){:width="650px"} diff --git a/docker-cloud/orgs.md b/docker-cloud/orgs.md deleted file mode 100644 index 408771adc7..0000000000 --- a/docker-cloud/orgs.md +++ /dev/null @@ -1,295 +0,0 @@ ---- -description: Docker Cloud for Organizations and Teams -keywords: organizations, teams, Docker Cloud, resources, permissions -title: Organizations and Teams in Docker Cloud ---- - -You can create Organizations in Docker Cloud to share repositories, and infrastructure and applications with coworkers and collaborators. - -Members of an organization can see only the teams to which they belong, and -their membership. Members of the `Owners` team can see and edit -all of the teams and all of the team membership lists. Docker Cloud users -outside an organization cannot see the Organizations or teams another user -belongs to. - -## Create an Organization - -An Organization in Docker Cloud contains Teams, and each Team contains users. -You cannot add users directly to an Organization. Organizations can also have -repositories, applications (services and containers), and infrastructure (nodes -and node clusters) associated with them. Paid features such as private -repositories and extra nodes are paid for using the billing information -associated with the Organization. - -To create an organization: - -1. Log in to Docker Cloud. -2. Select **Create Organization** from the user icon menu at the top right. -2. In the dialog that appears, enter a name for your organization. -3. Enter billing information for the organization. - - This is used for paid features used by the Organization account, including private repositories and additional nodes. - -4. Click **Save**. - - The Docker Cloud interface switches you to the new organization view. You - can return to your individual user account from the menu at the top right - corner. - -When you create an Organization, your user account is automatically added to the -Organization's `Owners` team, which allows you to manage the Organization. This -team must always have at least one member, and you can add other members to it -at any time. - -### Convert a user to an Organization - -Individual user accounts can be converted to organizations if needed. You can -no longer log in to the account; email addresses, linked source -repositories and collaborators are removed. Automated builds are -migrated. **Account conversion cannot be undone.** - -You need another valid Docker ID (not the account you are converting) for -the user who is the first member of the `Owners` team. All existing -automated builds are migrated to this user, and they can configure -the newly converted organization's settings to grant access to other users. - -1. Log in to Docker Cloud using the user account that you want to convert. -2. Click **Settings** in the user account menu in the top right corner. -3. Scroll down and click `Convert to organization`. -4. Read through the list of warnings and actions. -5. Enter the Docker ID of the user to be the first member of the Owners team. -6. Click **Save and Continue**. - -The UI refreshes. Log in from the Docker ID you specified as the first Owner, and then continue on to configure the organization as described below. - -#### What's next? - -Once you've created an organization: - -* Add users to [the Owners team](orgs.md#configure-the-owners-team) to help you manage the organization -* [Create teams](orgs.md#create-teams) -* [Set team permissions](orgs.md#set-team-permissions) -* Set up [linked providers](orgs.md#link-a-service-provider-to-an-organization), and [manage resources](orgs.md#manage-resources-for-an-organization) for the organization - -## Configure the Owners team - -Each organization has an `Owners` team which contains the users who manage the -organization's settings. If you created the organization, you are automatically -added to the `Owners` team. You can add new users to the `Owners` team and then -leave the team if you want to transfer ownership. There must always be at least -one member of the `Owners` team. - -Owners team members can: - -* create, change, and delete teams -* set and change team access permissions -* manage the organization's billing information -* configure the organization's settings (including linked services such as AWS and Github) -* view, change, create and delete repositories, services, and node clusters associated with the organization - -> **Note**: You cannot change the Owners team permission settings. Only add users to the Owners team who you are comfortable granting this level of access. - -1. While logged in to Docker Cloud, use the menu in the top right corner to switch to the organization you want to work on. -2. Click **Teams** in the lower left corner. -3. Click **owners**. -4. Click **Add user**. -5. Enter the Docker ID of a user to add. -6. Click **Create**. -6. Repeat for each user who you want to add. - -To transfer ownership of an organization, add the new owner to the `Owners` -team, then go to your Teams list and click **Leave** on the `Owners` team line. - -> **Note**: At this time, only members of the `Owners` team receive email -notifications for events (such as builds and container redeploys) in the -organization's resources. The email "notification level" setting for the -organization affects only the `Owners` team. - -## Create teams - -You can create Teams within an Organization to add users and manage access to infrastructure, applications, and repositories. - -Every organization contains an `Owners` team for users who manage the team -settings. You should create at least one team separate from the owners team so -that you can add members to your organization without giving them this level of -access. - -1. While logged in to Docker Cloud, switch to the organization you want to work on from the menu in the upper right corner. -2. Click **Teams** in the lower left corner of the navigation bar. -3. Click **Create** to create a new team. -4. Give the new team a name and description, and click **Create**. -4. On the screen that appears, click **Add User**. -5. Enter the Docker ID of the user and click **Create**. -6. Repeat this process for each user you want to add. - -## Set team permissions - -You can give Teams within an organization different levels of access to -resources that the organization owns. You can then assign individual users to a -Team to grant them that level of access. Team permissions are set by members of -the `Owners` team. - -> **Note**: If a user is a member of multiple teams, their access settings are conjunctive (sometimes called inclusive or additive). For example, if a user is a member of Team A that grants them `No access` to repositories, and they're also a member of Team B that grants them `Read and Write` access to repositories, the user has `Read and Write` access. - -To set or edit Team permissions: - -1. From the Team detail view, click **Permissions**. -2. Select an access level for `Runtime` resources. - Runtime resources include both infrastructure and applications. - -3. Optionally, grant the team access to one or more repositories in the **Repositories** section. - 1. Enter the name of the repository. - 2. Select an access level. - 3. Click the plus sign (`+`) icon. The change is saved immediately. - 4. Repeat this for each repository that the team needs access to. - - > **Note**: An organization can have public repositories which are visible to **all** users (including those outside the organization). Team members can view public repositories even if you have not given them `View` permission. You can use team permissions to grant write and admin access to public repositories. - -### Change team permissions for an individual repository - -You can also grant teams access to a repository from the repository's -**Permissions** page rather than from each team's permissions settings. You -might do this if you create repositories after you have already configured your -teams, and want to grant access to several teams at the same time. - -If the organization's repository is private, you must explicitly grant any access that your team members require. If the repository is public, all users are granted read-only access by default. - -Members of the organization's `Owners` team, and members of any team with `admin` access to the repository can change the repository's access permissions. - -To grant a team access to an organization's repository: - -1. Navigate to the organization's repository. -2. Click the **Permissions** tab. -3. Select the name of the team you want to add from the drop down menu. -5. Choose the access level the team should have. -6. Click the **plus sign** to add the selected team and permission setting. - - Your choice is saved immediately. - -7. Repeat this process for each team to which you want to grant access. - -To edit a team's permission level, select a new setting in the **Permission** drop down menu. - -To remove a team's access to the repository, click the **trashcan** icon next to the team's access permission line. - -> **Note**: If the organization's repository is _public_, team members without explicit access permissions still have read-only access to the repository. If the repository is _private_, removing a team's access completely prevents the team members from seeing the repository. - -### Docker Cloud team permission reference - -**General access levels**: - -* **No access**: no access at all. The resource is not visible to members of this team. -* **Read only**: users can view the resource and its configuration, but cannot perform actions on the resource. -* **Read and Write**: users can view *and change* the resource and its configuration. -* **Admin**: users can view, and edit the resource and its configuration, and can create or delete new instances of the resource. - -> **Note**: Only users who are members of the `Owners` team can create _new_ repositories. - -| Permission level | Access | -| ------------- | ------------- | -| **Swarms** (Beta)| | -| Admin | View swarms, manage swarms, add users | -| **Repositories** | | -| Read | Pull | -| Read/Write | Pull, push | -| Admin | All of the above, plus update description, create and delete | -| **Build** | | -| Read | View basic build settings and Timeline | -| Read/write | All of the above plus start, retry, or cancel build | -| Admin | All of the above, plus view and change build configuration, change build source, create and delete | -| **Nodes** | | -| Read | View | -| Read/write | View, scale, check node health | -| Admin | All of the above plus terminate, upgrade daemon, get certificate, create BYON token, update, deploy, and create | -| **Applications** | | -| Read | View, get logs, export stackfile | -| Read/write | All of the above, plus start, stop, redeploy, and scale | -| Admin | All of the above plus, open a terminal window, terminate, update, and create | - -## Machine user accounts in organizations - -Your organization might find it useful to have a dedicated account that is used for programmatic or scripted access to your organization's resources using the [Docker Cloud APIs](/apidocs/docker-cloud/). - -> **Note**: While these accounts are sometimes called "robot" accounts or "bots", these users may not be _created_ using scripts. - -To create a "robot" or machine account for your organization: - -1. Create a new Docker ID for the machine user. Verify the email address associated with the user. -2. If necessary, create a new Team for the machine user, and grant that team access to the required resources. - - This method is recommended because it makes it easier for administrators to - understand the machine user's access, and modify it without affecting other - users' access. - -3. Add the machine user to the new Team. - -## Modify a team - -To modify an existing team, log in to Docker Cloud and switch to your -organization, click **Teams** in the left navigation menu, then click the team -you want to modify. - -You can manage team membership from the first page that appears when you select the team. - -To change the team name or description, click **Settings**. - -To manage team permissions for runtime resources (nodes and applications) and -repositories click **Permissions**. - -## Manage resources for an Organization - -An organization can have its own resources including repositories, nodes and -node clusters, containers, services, and service stacks, just as if it was a -normal user account. - -If you're a member of the `Owners` team, you can create these resources when -logged in as the Organization, and manage which Teams can view, edit, and create -and delete each resource. - -#### Link a service provider to an Organization - -1. Log in to Docker Cloud as a member of the `Owners` team. - -2. Switch to the Organization account by selecting it from the user icon menu at the top right. - -3. Click **Cloud Settings** in the left navigation. - - From the Organization's Cloud settings page, you can [link to the organization's source code repositories](builds/link-source.md), [link to infrastructure hosts](infrastructure/index.md) such as a cloud service providers. - - The steps are the same as when you perform these actions as an individual user. - -#### Create repositories - -When a member of the `Owners` team creates a repository for an organization, -they can configure which teams within the organization can access the -repository. No access controls are configured by default on repository creation. -If the repository is _private_, this leaves it accessible only to members of the -`Owners` team until other teams are granted access. - -> **Tip**: Members of the `Owners` team can configure this default from the **Default privacy** section of the organization's **Cloud Settings** page. - -1. Log in to Docker Cloud as a member of the `Owners` team. - -2. Switch to the Organization account by selecting it from the user icon menu at the top right. - -3. [Create the repository](builds/repos.md#create-a-new-repository-in-docker-cloud) as usual. - -4. Once the repository has been created, navigate to it and click **Permissions**. - -5. [Grant access](#change-team-permissions-for-an-individual-repository) to any teams that require access to the repository. - -#### Manage organization settings - -From the Organization's **Cloud Settings** page you can also manage the -Organization's Plan and billing account information, notifications, and API -keys. - -#### Create organization resources - -To create resources for an Organization such as services and node clusters, log -in to Docker Cloud and switch to the Organization account. Create the -repositories, services, stacks, or node clusters as you would for any other -account. diff --git a/docker-cloud/release-notes.md b/docker-cloud/release-notes.md deleted file mode 100644 index 2a81a522ea..0000000000 --- a/docker-cloud/release-notes.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -description: Docker Cloud -keywords: Docker, cloud, release, notes -title: Docker Cloud release notes ---- - -Did you know we also have a [Release notes category](https://forums.docker.com/c/docker-cloud/release-notes) on the Docker Cloud Product forums? Now you do! - -## Docker Cloud June 2016 release notes - -In the last month we've made many small improvements to the new Docker Cloud UI, made team and organization repos from Hub visible in Docker Cloud, and enabled linking to BitBucket for automated builds. - -We've also added significant new features to the [automated builds](builds/automated-build.md) system, including: - -- Branch and tag selection -- Dynamic build rules (AKA regex build rules) -- Different hosted builder node sizes - -For more details, find the June post in the [release notes category](https://forums.docker.com/c/docker-cloud/release-notes), and as always, we welcome your feedback on the [Docker Cloud Product Forums](https://forums.docker.com/c/docker-cloud). - -## Docker Cloud May 2016 release notes - -In our May 2016 release, we introduced a new user interface for Docker Cloud. Try it out and share your feedback in the [Docker Cloud Product Forums](https://forums.docker.com/c/docker-cloud)! - -### Added - -**Docker Cloud Security Scanning** is now available as a beta add-on service for private repositories. - -### Fixed - -- **API docs now say CLI instead of bash** in the languages tab. You pointed out that this was confusing, so we fixed it. -- **Removed old references to Tutum** in the documentation. - -### Known issues - -- **Documentation screen captures** in some cases still reflect the Docker Cloud 1.0 user interface. This will be updated as soon as possible. - -Additional [Known issues here](docker-errors-faq.md) - -## Docker Cloud 1.0 release notes -**Tutum is now Docker Cloud**. Docker Cloud is a new service by Docker that implements all features previously offered by Tutum plus integration with Docker Hub Registry service and the common Docker ID credentials. - -The following release notes document changes since [Tutum v0.19.5](https://support.tutum.co/support/solutions/articles/5000694910-tutum-0-19-5). - - -### Added - -- **Docker Cloud is Generally Available**: all features of Docker Cloud are Generally Available with the exception of the build features which remain in beta. -- **Docker Hub Registry Integration**: all of your Docker Hub image repositories are available and accessible when you login to Docker Cloud. Changes you make to your repositories are reflected in both Docker Hub and Docker Cloud. -- **Autoredeploy from Docker Hub**: services that use a repository stored in the Docker Hub now have the [**autoredeploy** option](apps/auto-redeploy.md) available, which allows automatic redeployments on push without setting up webhooks. -- **Environment variable substitution on CLI**: the `docker-cloud` CLI now substitutes environment variables in stack files, [the same way Docker Compose does it](/compose/compose-file/#variable-substitution:91de898b5f5cdb090642a917d3dedf68). - - -### Changed - -- **Tutum is now Docker Cloud**: Docker Cloud is a new service by Docker that implements all features previously offered by Tutum. -- **Docker ID**: your Docker ID (formerly known as "Docker Hub account") is used to log into Docker Cloud. -- **Environment variables**: the environment variables that are automatically injected into containers that started with `TUTUM_` now start with `DOCKERCLOUD_`. -- **CLI renaming**: the `tutum` CLI has been deprecated and the new Docker Cloud CLI is now called `docker-cloud`. Login credentials are now shared between the `docker` and `docker-cli` CLIs and stored in `~/.docker/config.json`. -- **API domain**: the API domain is now `https://cloud.docker.com` for REST endpoints, and `wss://ws.cloud.docker.com` for websocket endpoints. -- **API endpoints**: the API endpoints have been relocated to a different URI scheme. [Click here for full documentation about the new endpoints](/apidocs/docker-cloud.md). -- **New Python and Go SDKs**: the new **[python-dockercloud](https://github.com/docker/python-dockercloud)** and **[go-dockercloud](https://github.com/docker/go-dockercloud)** SDKs are available to work with the new Docker Cloud APIs. -- **New HAproxy image**: the new `dockercloud/haproxy` repository can be used as a proxy/load balancer for user's applications and will automatically reconfigure itself if configured with API access via API role. -- **Docker Registry**: the Docker registry at `tutum.co` has been deprecated and replaced by the Docker Hub. It requires Docker Engine 1.6 or higher. Repositories are now shared between Docker Cloud and Docker Hub and will appear in both sites. -- **Agent renamed**: the `tutum-agent` has been renamed to `dockercloud-agent`. The installation script is now at `https://get.cloud.docker.com`. Its configuration file is now at `/etc/dockercloud/agent/` and logs are stored at `/var/log/dockercloud/`. -- **Deploy to Docker Cloud button**: the "Deploy to Tutum" button has been renamed to **Deploy to Docker Cloud**. [Click here to learn more](apps/deploy-to-cloud-btn.md). -- **AWS object names**: the names of the objects created by default in AWS have changed: the VPC is now called `dc-vpc` and has a CIDR of `10.78.0.0/16`, the subnets are called `dc-subnet`, the security group is now called `dc-vpc-default`, the internet gateway is now called `dc-gateway` and the route table is now called `dc-route-table`. -- **User endpoints**: the new domain used by node, service and container endpoints is now `dockerapp.io`. Endpoints now do not include the username and use short UUIDs to ensure uniqueness. -- **Community Forums**: the [Docker Cloud forums](https://forums.docker.com/c/docker-cloud) are now the recommended place to get in touch with the community. - - -### Fixed - -- **Overlay network**: we have fixed a memory limit issue on the overlay network containers that was causing containers to not attach to the overlay network under certain circumstances. -- **Scale up trigger**: we have fixed an issue where sometimes containers created by using a "scale up" trigger didn't inherit the service configuration and marked all other containers in the service with the "redeployment needed" flag. - -### Known issues - -- **Documentation screen captures** in most cases still reflect the Tutum interface and branding. We will update these and refresh the documentation as we go. -- **References to Tutum remain** in the documentation. We will update these and refresh the documentation as we go. diff --git a/docker-cloud/slack-integration.md b/docker-cloud/slack-integration.md deleted file mode 100644 index 9fb3f7b3a0..0000000000 --- a/docker-cloud/slack-integration.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -description: Integrate with Slack -keywords: Slack, integrate, notifications -redirect_from: -- /docker-cloud/tutorials/slack-integration/ -title: Set up Docker Cloud notifications in Slack ---- - -Docker Cloud can integrate with your **Slack** team to provide notifications about stacks, services, containers, and nodes. - -## Set up a Slack integration - -Before you begin, make sure that you are signed into the Slack team that you want to show notifications in. - -1. Log in to the Docker account that owns the builds or nodes that you want to receive notifications about. - - > **Note**: If you are setting up notifications for an organization, log in as a member of the organization's `Owners` team, then switch to the organization account to change the settings. - -2. Click **Cloud Settings** in the left hand navigation, and scroll down to the **Notifications** section. - -3. Click the plug icon next to **Slack**. - - The Docker Cloud page refreshes to show a Slack authorization screen. - -4. On the page that appears, double check that you're signed in to the correct Slack team. (If necessary sign in to the correct one.) -5. Select the channel that should receive notifications. -6. Click **Authorize**. - - Once you click **Authorize**, you should see a message in the Slack channel notifying you of the new integration. - - ![](images/slack-oauth-authorize.png) - - -Once configured, choose a notification level: - -* **Off** Do not receive any notifications. -* **Only failures** Only receive notifications about failed actions, containers that stop with a failed exit code, and nodes that become unreachable. -* **Everything** Receive all of the above, plus notifications about successful actions. - ![](images/slack-notification-updates.png) - -Enjoy your new Slack channel integration! - -## Edit a Slack integration - -* Click **Cloud Settings** in the lower left, scroll down to **Notifications**, and locate the **Slack** section. From here you can choose a new notification level, or remove the integration. - -* From the Slack **Notifications** section you can also change the channel that the integration posts to. Click the reload icon (two arrows) next to the Slack integration to reopen the OAuth channel selector. - -* Alternately, go to the Slack App Management page and search for "Docker Cloud". Click the result to see all of the Docker Cloud notification channels set for the Slack team. diff --git a/docker-cloud/standard/index.md b/docker-cloud/standard/index.md deleted file mode 100644 index f311891566..0000000000 --- a/docker-cloud/standard/index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -description: non-Swarm mode Docker Cloud topics -keywords: Docker, cloud -title: Manage Nodes and Apps (Standard Mode) -notoc: true ---- - -These topics cover the traditional, pre-Swarm model for deploying and managing -nodes, services, and applications in Docker Cloud. - -* [Getting started with Docker Cloud](/docker-cloud/getting-started/index.md) - -* [Applications in Docker Cloud](/docker-cloud/apps/index.md) - -* [Cloud stack file YAML reference](/docker-cloud/apps/stack-yaml-reference.md) - -> **Note**: These workflows and references do not apply -to [Swarm Mode](/docker-cloud/cloud-swarm/index.md) Beta. diff --git a/docker-for-aws/iam-permissions.md b/docker-for-aws/iam-permissions.md index a3605f1f5a..f4b66ad9c7 100644 --- a/docker-for-aws/iam-permissions.md +++ b/docker-for-aws/iam-permissions.md @@ -9,8 +9,6 @@ The following IAM permissions are required to use Docker for AWS. Before you deploy Docker for AWS, your account needs these permissions for the stack to deploy correctly. If you create and use an IAM role with these permissions for creating the stack, CloudFormation uses the role's permissions instead of your own, using the AWS CloudFormation Service Role feature. -For instructions, see [Link Amazon Web Services to Docker Cloud](/docker-cloud/cloud-swarm/link-aws-swarm/). - This feature is called [AWS CloudFormation Service Role](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html?icmpid=docs_cfn_console) follow the link for more information. diff --git a/docker-for-aws/index.md b/docker-for-aws/index.md index 639e5ba8ab..98422711d0 100644 --- a/docker-for-aws/index.md +++ b/docker-for-aws/index.md @@ -18,7 +18,7 @@ Enterprise Edition for AWS. This release is maintained and receives **security and critical bug fixes for one year**. -[Deploy Docker Enterprise Edition (EE) for AWS](https://store.docker.com/editions/enterprise/docker-ee-aws?tab=description){: target="_blank" class="button outline-btn blank_"} +[Deploy Docker Enterprise Edition (EE) for AWS](https://hub.docker.com/editions/enterprise/docker-ee-aws?tab=description){: target="_blank" class="button outline-btn blank_"} ## Docker Community Edition (CE) for AWS diff --git a/docker-for-aws/release-notes.md b/docker-for-aws/release-notes.md index fdc5f7e26e..908d47c134 100644 --- a/docker-for-aws/release-notes.md +++ b/docker-for-aws/release-notes.md @@ -9,7 +9,7 @@ title: Docker for AWS release notes ## Enterprise Edition [Docker Enterprise Edition Lifecycle](https://success.docker.com/Policies/Maintenance_Lifecycle){: target="_blank" class="_"} -[Deploy Docker Enterprise Edition (EE) for AWS](https://store.docker.com/editions/enterprise/docker-ee-aws?tab=description){: target="_blank" class="button outline-btn blank_"} +[Deploy Docker Enterprise Edition (EE) for AWS](https://hub.docker.com/editions/enterprise/docker-ee-aws?tab=description){: target="_blank" class="button outline-btn blank_"} ### 17.06 EE diff --git a/docker-for-azure/index.md b/docker-for-azure/index.md index e4001f9cb8..61c4d28df6 100644 --- a/docker-for-azure/index.md +++ b/docker-for-azure/index.md @@ -12,7 +12,7 @@ redirect_from: ## Docker Enterprise Edition (EE) for Azure This deployment is fully baked and tested, and comes with the latest Enterprise Edition version of Docker.
                  This release is maintained and receives security and critical bugfixes for one year. -[Deploy Docker Enterprise Edition (EE) for Azure](https://store.docker.com/editions/enterprise/docker-ee-azure?tab=description){: target=“_blank” class=“button outline-btn _blank_”} +[Deploy Docker Enterprise Edition (EE) for Azure](https://hub.docker.com/editions/enterprise/docker-ee-azure?tab=description){: target=“_blank” class=“button outline-btn _blank_”} ## Docker Community Edition (CE) for Azure diff --git a/docker-for-azure/release-notes.md b/docker-for-azure/release-notes.md index cd58876151..254b2988d1 100644 --- a/docker-for-azure/release-notes.md +++ b/docker-for-azure/release-notes.md @@ -9,7 +9,7 @@ title: Docker for Azure Release Notes ## Enterprise Edition [Docker Enterprise Edition Lifecycle](https://success.docker.com/Policies/Maintenance_Lifecycle){: target="_blank"} -[Deploy Docker Enterprise Edition (EE) for AWS](https://store.docker.com/editions/enterprise/docker-ee-aws?tab=description){: target="_blank" class="button outline-btn"} +[Deploy Docker Enterprise Edition (EE) for AWS](https://hub.docker.com/editions/enterprise/docker-ee-aws?tab=description){: target="_blank" class="button outline-btn"} ### 17.06 EE diff --git a/docker-for-mac/index.md b/docker-for-mac/index.md index f6791cf5e0..8294dae056 100644 --- a/docker-for-mac/index.md +++ b/docker-for-mac/index.md @@ -483,35 +483,26 @@ and Troubleshooting](troubleshoot.md) for more details. To give us feedback on the documentation or update it yourself, use the Feedback options at the bottom of each docs page. -## Docker Store +## Docker Hub -Choose **Docker Store** from the Docker for Mac menu to get to the Docker app -downloads site. [Docker store](https://store.docker.com/){:target="_blank" class="_"} is a component of the -next-generation Docker Hub, and the best place to find compliant, trusted -commercial and free software distributed as Docker Images. +Choose **Docker Hub** (or on older versions, **Docker Store**) from the Docker for Mac menu to get to the Docker app +downloads site. [Docker hub](https://hub.docker.com/){:target="_blank" class="_"} is the best place to find compliant, trusted software distributed as Docker Images. -![Docker Store](images/docker-store.png){:width="550px"} +## Docker Hub -## Docker Cloud +You can access your [Docker Hub](/docker-hub/index.md){:target="_blank" class="_"} account from within Docker for Mac. -You can access your [Docker Cloud](/docker-cloud/index.md){:target="_blank" class="_"} account from within Docker for Mac. +From the Docker for Mac menu, sign in to Docker Hub with your Docker ID, or create one. -![Docker Cloud](images/docker-cloud.png){:width="550px"} - -From the Docker for Mac menu, sign in to Docker Cloud with your Docker ID, or create one. - -![Docker Cloud sign-in](images/menu/sign-in.png){: .with-border width="250px"} +![Docker Hub sign-in](images/menu/sign-in.png){: .with-border width="250px"} Then use the Docker for Mac menu to create, view, or navigate directly to your Cloud resources, including **organizations**, **repositories**, and **swarms**. -Check out these [Docker Cloud topics](/docker-cloud/index.md){:target="_blank" class="_"} to learn more: +Check out these [Docker Hub topics](/docker-cloud/index.md){:target="_blank" class="_"} to learn more: -* [Organizations and Teams in Docker Cloud](/docker-cloud/orgs/index.md){:target="_blank" class="_"} -* [Builds and Images](/docker-cloud/builds/index.md){:target="_blank" class="_"} -* [Swarms in Docker Cloud](/docker-cloud/cloud-swarm/index.md){:target="_blank" class="_"} - -Need a direct link to Cloud? [Take me to Docker Cloud](https://cloud.docker.com/){: target="_blank" class="_" }. +* [Organizations and Teams in Docker Hub](/docker-hub/orgs.md){:target="_blank" class="_"} +* [Builds and Images](/docker-hub/builds/index.md){:target="_blank" class="_"} ## Where to go next diff --git a/docker-for-mac/install.md b/docker-for-mac/install.md index 2861c2cfe4..c5083a0c6f 100644 --- a/docker-for-mac/install.md +++ b/docker-for-mac/install.md @@ -4,11 +4,9 @@ keywords: mac, beta, alpha, install, download title: Install Docker for Mac --- -Docker for Mac is the -[Community Edition (CE)](https://www.docker.com/community-edition) -of Docker for MacOS. To download Docker for Mac, head to Docker Store. +To download Docker for Mac, head to Docker Hub. -[Download from Docker Store](https://store.docker.com/editions/community/docker-ce-desktop-mac){: .button .outline-btn} +[Download Docker for Mac](https://hub.docker.com/editions/community/docker-ce-desktop-mac){: .button .outline-btn} ## What to know before you install diff --git a/docker-for-windows/index.md b/docker-for-windows/index.md index 4afe09d087..8cefa0bb52 100644 --- a/docker-for-windows/index.md +++ b/docker-for-windows/index.md @@ -224,7 +224,7 @@ you run `docker` commands under a different username than the one configured here, your containers cannot access the mounted volumes. To apply shared drives, you are prompted for your Windows system (domain) -username and password. You can select an option to have Docker Store the +username and password. You can select an option to have Docker store the credentials so that you don't need to enter them every time. > Tips on shared drives, permissions, and volume mounts @@ -541,22 +541,13 @@ See [How do I add custom CA certificates?](faqs.md#how-do-i-add-custom-ca-certif and [How do I add client certificates?](faqs.md#how-do-i-add-client-certificates) in the FAQs. -## Docker Store +## Docker Hub -Select **Docker Store** from the Docker for Windows menu to access the [Docker store](https://store.docker.com/) website. From there, you can log on to Docker Store and download apps. +Select **Sign in /Create Docker ID** from the Docker for Windows menu to access your [Docker Hub](https://hub.docker.com/){: target="_blank" clas="_" } account. Once logged in, you can access your Docker Hub repositories directly from the Docker for Windows menu. -Docker Store is a component of the next-generation [Docker Hub](https://hub.docker.com) and the best place to find compliant, trusted -commercial and free software distributed as Docker Images. +See these [Docker Hub topics](/docker-hub/index.md){: target="_blank" class="_" } to learn more: -Refer to the [Docker Store documentation](/docker-store/index.md){: target="_blank" class="_" } - -## Docker Cloud - -Select **Sign in /Create Docker ID** from the Docker for Windows menu to access your [Docker Cloud](https://cloud.docker.com/){: target="_blank" clas="_" } account. Once logged in, you can access your Docker Cloud repositories directly from the Docker for Windows menu. - -See these [Docker Cloud topics](/docker-cloud/index.md){: target="_blank" class="_" } to learn more: - -* [Organizations and Teams in Docker Cloud](/docker-cloud/orgs/index.md){: target="_blank" class="_" } +* [Organizations and Teams in Docker Hub](/docker-hub/orgs.md){: target="_blank" class="_" } * [Builds and Images](/docker-cloud/builds/index.md){: target="_blank" class="_" } ## Where to go next diff --git a/docker-for-windows/install.md b/docker-for-windows/install.md index a45dae6e84..57d70b5a7c 100644 --- a/docker-for-windows/install.md +++ b/docker-for-windows/install.md @@ -4,12 +4,9 @@ keywords: windows, beta, edge, alpha, install, download title: Install Docker for Windows --- -Docker for Windows is the -[Community Edition (CE)](https://www.docker.com/community-edition) -of Docker for Microsoft Windows. To download Docker for Windows, head to Docker -Store. +To download Docker for Windows, head to Docker Hub. -[Download from Docker Store](https://store.docker.com/editions/community/docker-ce-desktop-windows){: .button .outline-btn} +[Download Docker for Windows](https://hub.docker.com/editions/community/docker-ce-desktop-windows){: .button .outline-btn} ## What to know before you install diff --git a/docker-hub/accounts.md b/docker-hub/accounts.md index 39cbf1a8aa..8493c13e9f 100644 --- a/docker-hub/accounts.md +++ b/docker-hub/accounts.md @@ -4,9 +4,9 @@ keywords: Docker, docker, trusted, sign-up, registry, accounts, plans, Dockerfil title: Use Docker Hub with Docker ID --- -Docker Hub uses your free [Docker ID](../docker-id/) to save your account +Docker Hub uses [Docker ID](../docker-id/) to save your account settings, and as your account namespace. If you don't yet have a Docker ID, you -can [register for one](../docker-id/#/register-for-a-docker-id). +can [register for one](https://hub.docker.com/signup). You can `search` Docker Hub and `pull` images without an account and without signing in. However, to `push` images, leave comments, or to *star* a diff --git a/docker-cloud/builds/advanced.md b/docker-hub/builds/advanced.md similarity index 91% rename from docker-cloud/builds/advanced.md rename to docker-hub/builds/advanced.md index 28f3ecb1fd..2b9bbe2c7a 100644 --- a/docker-cloud/builds/advanced.md +++ b/docker-hub/builds/advanced.md @@ -38,7 +38,7 @@ sut: ## Override build, test or push commands -Docker Cloud allows you to override and customize the `build`, `test` and `push` +Docker Hub allows you to override and customize the `build`, `test` and `push` commands during automated build and test processes using hooks. For example, you might use a build hook to set build arguments used only during the build process. (You can also set up [custom build phase hooks](#custom-build-phase-hooks) to perform actions in between these commands.) @@ -76,9 +76,9 @@ The following hooks are available: #### Override the "build" phase to set variables -Docker Cloud allows you to define build environment variables either in the hook files, or from the automated build UI (which you can then reference in hooks). +Docker Hub allows you to define build environment variables either in the hook files, or from the automated build UI (which you can then reference in hooks). -In the following example, we define a build hook that uses `docker build` arguments to set the variable `CUSTOM` based on the value of variable we defined using the Docker Cloud build settings. `$DOCKERFILE_PATH` is a variable that we provide with the name of the Dockerfile we wish to build, and `$IMAGE_NAME` is the name of the image being built. +In the following example, we define a build hook that uses `docker build` arguments to set the variable `CUSTOM` based on the value of variable we defined using the Docker Hub build settings. `$DOCKERFILE_PATH` is a variable that we provide with the name of the Dockerfile we wish to build, and `$IMAGE_NAME` is the name of the image being built. ```none docker build --build-arg CUSTOM=$VAR -f $DOCKERFILE_PATH -t $IMAGE_NAME . @@ -114,7 +114,7 @@ docker push $DOCKER_REPO:$SOURCE_COMMIT ## Source Repository / Branch Clones -When Docker Cloud pulls a branch from a source code repository, it performs +When Docker Hub pulls a branch from a source code repository, it performs a shallow clone (only the tip of the specified branch). This has the advantage of minimizing the amount of data transfer necessary from the repository and speeding up the build because it pulls only the minimal code necessary. diff --git a/docker-cloud/builds/automated-build.md b/docker-hub/builds/automated-build.md similarity index 84% rename from docker-cloud/builds/automated-build.md rename to docker-hub/builds/automated-build.md index e2fcd023de..90362aaac5 100644 --- a/docker-cloud/builds/automated-build.md +++ b/docker-hub/builds/automated-build.md @@ -6,11 +6,7 @@ redirect_from: title: Automated builds --- -[![Automated Builds with Docker Cloud](images/video-auto-builds-docker-cloud.png)](https://youtu.be/sl2mfyjnkXk "Automated Builds with Docker Cloud"){:target="_blank" class="_"} - -> **Note**: Docker Cloud's Build functionality is in BETA. - -Docker Cloud can automatically build images from source code in an external +Docker Hub can automatically build images from source code in an external repository and automatically push the built image to your Docker repositories. @@ -18,7 +14,7 @@ When you set up automated builds (also called autobuilds), you create a list of branches and tags that you want to build into Docker images. When you push code to a source code branch (for example in Github) for one of those listed image tags, the push uses a webhook to trigger a new build, which produces a Docker -image. The built image is then pushed to the Docker Cloud registry or to an +image. The built image is then pushed to the Docker Hub registry or to an external registry. If you have automated tests configured, these run after building but before @@ -33,7 +29,7 @@ repositories, even if you have automatic builds set up. ## Configure automated build settings -You can configure repositories in Docker Cloud so that they automatically +You can configure repositories in Docker Hub so that they automatically build an image each time you push new code to your source provider. If you have [automated tests](automated-testing.md) configured, the new image is only pushed when the tests succeed. @@ -56,32 +52,12 @@ the code repository service where the image's source code is stored. source code provider. Once you select a namespace, its source code repositories appear in the **Select repository** dropdown list. -5. Choose where to run your build processes. +5. Optionally, enable [autotests](automated-testing.md#enable-automated-tests-on-a-repository). - You can either run the process on your own infrastructure and optionally [set up specific nodes to build on](automated-build.md#set-up-builder-nodes), or select **Build on Docker Cloud’s infrastructure** you can use the hosted build service - offered on Docker Cloud's infrastructure. If you use - Docker's infrastructure, select a builder size to run the build - process on. This hosted build service is free while it is in Beta. - - ![Editing build configurations](images/edit-repository-builds.png) - -6. If in the previous step you selected **Build on Docker - Cloud’s infrastructure**, then you are given the option to select the - **Docker Version** used to build this repository. You can choose between - the **Stable** and **Edge** versions of Docker. - - Selecting **Edge** lets you to take advantage of [multi-stage builds](/engine/userguide/eng-image/multistage-build/). For more information and examples, see the topic on how to [use multi-stage builds](/engine/userguide/eng-image/multistage-build/#use-multi-stage-builds). - - You can learn more about **stable** and **edge** channels in the - [Install Docker overview](/install/) - and the [Docker CE Edge](/edge/) topics. - -7. Optionally, enable [autotests](automated-testing.md#enable-automated-tests-on-a-repository). - -8. Review the default **Build Rules**, and optionally click the +6. Review the default **Build Rules**, and optionally click the **plus sign** to add and configure more build rules. - _Build rules_ control what Docker Cloud builds into images from the contents + _Build rules_ control what Docker Hub builds into images from the contents of the source code repository, and how the resulting images are tagged within the Docker repository. @@ -89,25 +65,25 @@ the code repository service where the image's source code is stored. default set builds from the `Branch` in your source code repository called `master`, and creates a Docker image tagged with `latest`. -9. For each branch or tag, enable or disable the **Autobuild** toggle. +7. For each branch or tag, enable or disable the **Autobuild** toggle. Only branches or tags with autobuild enabled are built, tested, *and* have the resulting image pushed to the repository. Branches with autobuild disabled are built for test purposes (if enabled at the repository level), but the built Docker image is not pushed to the repository. -10. For each branch or tag, enable or disable the **Build Caching** toggle. +8. For each branch or tag, enable or disable the **Build Caching** toggle. [Build caching](/engine/userguide/eng-image/dockerfile_best-practices/#/build-cache) can save time if you are building a large image frequently or have many dependencies. You might want to leave build caching disabled to make sure all of your dependencies are resolved at build time, or if you have a large layer that is quicker to build locally. -11. Click **Save** to save the settings, or click **Save and build** to save and +9. Click **Save** to save the settings, or click **Save and build** to save and run an initial test. A webhook is automatically added to your source code repository to notify - Docker Cloud on every push. Only pushes to branches that are listed as the + Docker Hub on every push. Only pushes to branches that are listed as the source for one or more tags trigger a build. ### Set up build rules @@ -143,7 +119,7 @@ For each source: * Specify the **Dockerfile location** as a path relative to the root of the source code repository. (If the Dockerfile is at the repository root, leave this path set to `/`.) -> **Note:** When Docker Cloud pulls a branch from a source code repository, it performs +> **Note:** When Docker Hub pulls a branch from a source code repository, it performs a shallow clone (only the tip of the specified branch). Refer to [Advanced options for Autobuild and Autotest](advanced.md) for more information. @@ -154,9 +130,9 @@ when you configure an automated build. Add your build environment variables by clicking the plus sign next to the **Build environment variables** section, and then entering a variable name and the value. -When you set variable values from the Docker Cloud UI, they can be used by the +When you set variable values from the Docker Hub UI, they can be used by the commands you set in `hooks` files, but they are stored so that only users who -have `admin` access to the Docker Cloud repository can see their values. This +have `admin` access to the Docker Hub repository can see their values. This means you can use them to safely store access tokens or other information that should remain secret. @@ -312,7 +288,7 @@ tagged Docker images from a single build rule. To create multiple tags from a single build rule, enter a comma-separated list of tags in the **Docker tag** field in the build rule. If an image with that tag -already exists, Docker Cloud overwrites the image when the build completes +already exists, Docker Hub overwrites the image when the build completes successfully. If you have automated tests configured, the build must pass these tests as well before the image is overwritten. You can use both regex references and plain text values in this field simultaneously. @@ -325,23 +301,23 @@ If you need to update a tag _in another repository_, use [a post_build hook](adv ## Build repositories with linked private submodules -Docker Cloud sets up a deploy key in your source code repository that allows it +Docker Hub sets up a deploy key in your source code repository that allows it to clone the repository and build it, however this key only works for a single, specific code repository. If your source code repository uses private Git submodules (or requires that you clone other private repositories to build), -Docker Cloud cannot access these additional repos, your build cannot complete, +Docker Hub cannot access these additional repos, your build cannot complete, and an error is logged in your build timeline. -To work around this, you can set up your automated build using the `SSH_PRIVATE` environment variable to override the deployment key and grant Docker Cloud's build system access to the repositories. +To work around this, you can set up your automated build using the `SSH_PRIVATE` environment variable to override the deployment key and grant Docker Hub's build system access to the repositories. -> **Note**: If you are using autobuild for teams, use [the process below](automated-build.md#service-users-for-team-autobuilds) instead, and configure a service user for your source code provider. You can also do this for an individual account to limit Docker Cloud's access to your source repositories. +> **Note**: If you are using autobuild for teams, use [the process below](automated-build.md#service-users-for-team-autobuilds) instead, and configure a service user for your source code provider. You can also do this for an individual account to limit Docker Hub's access to your source repositories. 1. Generate a SSH keypair that you use for builds only, and add the public key to your source code provider account. This step is optional, but allows you to revoke the build-only keypair without removing other access. 2. Copy the private half of the keypair to your clipboard. -3. In Docker Cloud, navigate to the build page for the repository that has linked private submodules. (If necessary, follow the steps [here](automated-build.md#configure-automated-build-settings) to configure the automated build.) +3. In Docker Hub, navigate to the build page for the repository that has linked private submodules. (If necessary, follow the steps [here](automated-build.md#configure-automated-build-settings) to configure the automated build.) 4. At the bottom of the screen, click the plus sign ( **+** ) next to **Build Environment variables**. 5. Enter `SSH_PRIVATE` as the name for the new environment variable. 6. Paste the private half of the keypair into the **Value** field. @@ -372,9 +348,9 @@ including any testing settings. > **Note**: Only members of the `Owners` team can set up automated builds for teams. -When you set up automated builds for teams, you grant Docker Cloud access to +When you set up automated builds for teams, you grant Docker Hub access to your source code repositories using OAuth tied to a specific user account. This -means that Docker Cloud has access to everything that the linked source provider +means that Docker Hub has access to everything that the linked source provider account can access. For organizations and teams, we recommend creating a dedicated service account @@ -399,7 +375,7 @@ variable to automated builds associated with the account. 4. Add the service user to the "build" team on the source provider. -5. Log in to Docker Cloud as a member of the `Owners` team, switch to the organization, and follow the instructions to [link to source code repository](link-source.md) using the service account. +5. Log in to Docker Hub as a member of the `Owners` team, switch to the organization, and follow the instructions to [link to source code repository](link-source.md) using the service account. > **Note**: You may need to log out of your individual account on the source code provider to create the link to the service account. @@ -432,8 +408,8 @@ succeeds. [Learn more about autoredeploy](../apps/auto-redeploy.md) ### Add automated tests To test your code before the image is pushed, you can use -Docker Cloud's [Autotest](automated-testing.md) feature which +Docker Hub's [Autotest](automated-testing.md) feature which integrates seamlessly with autobuild and autoredeploy. > **Note**: While the Autotest feature builds an image for testing purposes, it -does not push the resulting image to Docker Cloud or the external registry. +does not push the resulting image to Docker Hub or the external registry. diff --git a/docker-cloud/builds/automated-testing.md b/docker-hub/builds/automated-testing.md similarity index 81% rename from docker-cloud/builds/automated-testing.md rename to docker-hub/builds/automated-testing.md index 72bee906fe..d79863edd4 100644 --- a/docker-cloud/builds/automated-testing.md +++ b/docker-hub/builds/automated-testing.md @@ -6,21 +6,18 @@ redirect_from: title: Automated repository tests --- -[![Automated Tests with Docker Cloud](images/video-auto-tests-docker-cloud.png)](https://www.youtube.com/watch?v=KX6PD2MANRI "Automated Tests with Docker Cloud"){:target="_blank" class="_"} - -Docker Cloud can automatically test changes to your source code repositories -using containers. You can enable `Autotest` on [any Docker Cloud repository](repos.md) to run tests on each pull request to the source code +Docker Hub can automatically test changes to your source code repositories +using containers. You can enable `Autotest` on [any Docker Hub repository](repos.md) to run tests on each pull request to the source code repository to create a continuous integration testing service. Enabling `Autotest` builds an image for testing purposes, but does **not** automatically push the built image to the Docker repository. If you want to push -built images to your Docker Cloud repository, enable [Automated Builds](automated-build.md). +built images to your Docker Hub repository, enable [Automated Builds](automated-build.md). ## Set up automated test files To set up your automated tests, create a `docker-compose.test.yml` file which -defines a `sut` service that lists the tests to be run. This file has a structure -similar to the [docker-cloud.yml](/docker-cloud/apps/stack-yaml-reference/). +defines a `sut` service that lists the tests to be run. The `docker-compose.test.yml` file should be located in the same directory that contains the Dockerfile used to build the image. @@ -56,7 +53,7 @@ in the `test.yml` files. ## Enable automated tests on a repository To enable testing on a source code repository, you must first create an -associated build-repository in Docker Cloud. Your `Autotest` settings are +associated build-repository in Docker Hub. Your `Autotest` settings are configured on the same page as [automated builds](automated-build.md), however you do not need to enable Autobuilds to use `Autotest`. Autobuild is enabled per branch or tag, and you do not need to enable it at all. @@ -64,7 +61,7 @@ branch or tag, and you do not need to enable it at all. Only branches that are configured to use **Autobuild** push images to the Docker repository, regardless of the Autotest settings. -1. Log in to Docker Cloud and select **Repositories** in the left navigation. +1. Log in to Docker Hub and select **Repositories** in the top navigation. 3. Select the repository you want to enable `Autotest` on. @@ -97,7 +94,7 @@ Docker repository, regardless of the Autotest settings. > **Note**: For security purposes, autotest on _external pull requests_ is limited on public repositories. Private images are not pulled and - environment variables defined in Docker Cloud ware not + environment variables defined in Docker Hub ware not available. Automated builds continue to work as usual. 9. Click **Save** to save the settings, or click **Save and build** to save and diff --git a/docker-hub/bitbucket.md b/docker-hub/builds/bitbucket.md similarity index 100% rename from docker-hub/bitbucket.md rename to docker-hub/builds/bitbucket.md diff --git a/docker-hub/builds.md b/docker-hub/builds/builds.md similarity index 100% rename from docker-hub/builds.md rename to docker-hub/builds/builds.md diff --git a/docker-hub/github.md b/docker-hub/builds/github.md similarity index 100% rename from docker-hub/github.md rename to docker-hub/builds/github.md diff --git a/docker-cloud/builds/images/build-cancelicon.png b/docker-hub/builds/images/build-cancelicon.png similarity index 100% rename from docker-cloud/builds/images/build-cancelicon.png rename to docker-hub/builds/images/build-cancelicon.png diff --git a/docker-cloud/builds/images/build-dashboard.png b/docker-hub/builds/images/build-dashboard.png similarity index 100% rename from docker-cloud/builds/images/build-dashboard.png rename to docker-hub/builds/images/build-dashboard.png diff --git a/docker-cloud/builds/images/build-report.png b/docker-hub/builds/images/build-report.png similarity index 100% rename from docker-cloud/builds/images/build-report.png rename to docker-hub/builds/images/build-report.png diff --git a/docker-cloud/builds/images/cancel-build.png b/docker-hub/builds/images/cancel-build.png similarity index 100% rename from docker-cloud/builds/images/cancel-build.png rename to docker-hub/builds/images/cancel-build.png diff --git a/docker-cloud/builds/images/create-repository.png b/docker-hub/builds/images/create-repository.png similarity index 100% rename from docker-cloud/builds/images/create-repository.png rename to docker-hub/builds/images/create-repository.png diff --git a/docker-cloud/builds/images/edit-repository-builds.png b/docker-hub/builds/images/edit-repository-builds.png similarity index 100% rename from docker-cloud/builds/images/edit-repository-builds.png rename to docker-hub/builds/images/edit-repository-builds.png diff --git a/docker-cloud/builds/images/edit-repository.png b/docker-hub/builds/images/edit-repository.png similarity index 100% rename from docker-cloud/builds/images/edit-repository.png rename to docker-hub/builds/images/edit-repository.png diff --git a/docker-cloud/builds/images/link-source-github-ind-revoke.png b/docker-hub/builds/images/link-source-github-ind-revoke.png similarity index 100% rename from docker-cloud/builds/images/link-source-github-ind-revoke.png rename to docker-hub/builds/images/link-source-github-ind-revoke.png diff --git a/docker-cloud/builds/images/link-source-github-ind.png b/docker-hub/builds/images/link-source-github-ind.png similarity index 100% rename from docker-cloud/builds/images/link-source-github-ind.png rename to docker-hub/builds/images/link-source-github-ind.png diff --git a/docker-cloud/builds/images/link-source-github-org-lite.png b/docker-hub/builds/images/link-source-github-org-lite.png similarity index 100% rename from docker-cloud/builds/images/link-source-github-org-lite.png rename to docker-hub/builds/images/link-source-github-org-lite.png diff --git a/docker-cloud/builds/images/link-source-github-org-revoke.png b/docker-hub/builds/images/link-source-github-org-revoke.png similarity index 100% rename from docker-cloud/builds/images/link-source-github-org-revoke.png rename to docker-hub/builds/images/link-source-github-org-revoke.png diff --git a/docker-cloud/builds/images/link-source-github-org.png b/docker-hub/builds/images/link-source-github-org.png similarity index 100% rename from docker-cloud/builds/images/link-source-github-org.png rename to docker-hub/builds/images/link-source-github-org.png diff --git a/docker-cloud/builds/images/link-source-unlink-github.png b/docker-hub/builds/images/link-source-unlink-github.png similarity index 100% rename from docker-cloud/builds/images/link-source-unlink-github.png rename to docker-hub/builds/images/link-source-unlink-github.png diff --git a/docker-cloud/builds/images/repo-general.png b/docker-hub/builds/images/repo-general.png similarity index 100% rename from docker-cloud/builds/images/repo-general.png rename to docker-hub/builds/images/repo-general.png diff --git a/docker-cloud/builds/images/retry-build.png b/docker-hub/builds/images/retry-build.png similarity index 100% rename from docker-cloud/builds/images/retry-build.png rename to docker-hub/builds/images/retry-build.png diff --git a/docker-cloud/builds/images/source-providers.png b/docker-hub/builds/images/source-providers.png similarity index 100% rename from docker-cloud/builds/images/source-providers.png rename to docker-hub/builds/images/source-providers.png diff --git a/docker-cloud/builds/images/third-party-images-modal.png b/docker-hub/builds/images/third-party-images-modal.png similarity index 100% rename from docker-cloud/builds/images/third-party-images-modal.png rename to docker-hub/builds/images/third-party-images-modal.png diff --git a/docker-cloud/builds/images/video-auto-builds-docker-cloud.png b/docker-hub/builds/images/video-auto-builds-docker-cloud.png similarity index 100% rename from docker-cloud/builds/images/video-auto-builds-docker-cloud.png rename to docker-hub/builds/images/video-auto-builds-docker-cloud.png diff --git a/docker-cloud/builds/images/video-auto-tests-docker-cloud.png b/docker-hub/builds/images/video-auto-tests-docker-cloud.png similarity index 100% rename from docker-cloud/builds/images/video-auto-tests-docker-cloud.png rename to docker-hub/builds/images/video-auto-tests-docker-cloud.png diff --git a/docker-cloud/builds/index.md b/docker-hub/builds/index.md similarity index 57% rename from docker-cloud/builds/index.md rename to docker-hub/builds/index.md index 97069aaaac..4f91a6e0ba 100644 --- a/docker-cloud/builds/index.md +++ b/docker-hub/builds/index.md @@ -1,25 +1,24 @@ --- -description: Manage Builds and Images in Docker Cloud -keywords: builds, images, Cloud -title: Builds and images overview +description: Getting Started with Builds +keywords: builds, images, Hub +title: Getting Started with Builds notoc: true --- -Docker Cloud provides a hosted registry service where you can create +Docker Hub provides a hosted registry service where you can create repositories to store your Docker images. You can choose to push images to the -repositories, or link to your source code and build them directly in Docker -Cloud. +repositories directly, or link to your source code and build them in Docker +Hub. You can build images manually, or set up automated builds to rebuild your Docker image on each `git push` to the source code. You can also create automated tests, and when the tests pass use autoredeploy to automatically update your running services when a build passes its tests. -* [Repositories in Docker Cloud](repos.md) -* [Push images to Docker Cloud](push-images.md) +* [Repositories in Docker Hub](repos.md) * [Link to a source code repository](link-source.md) * [Automated builds](automated-build.md) * [Automated repository tests](automated-testing.md) * [Advanced options for Autobuild and Autotest](advanced.md) -![Docker Cloud repository General view](images/repo-general.png){:width="650px"} +![Docker Hub repository General view](images/repo-general.png){:width="650px"} diff --git a/docker-cloud/builds/link-source.md b/docker-hub/builds/link-source.md similarity index 69% rename from docker-cloud/builds/link-source.md rename to docker-hub/builds/link-source.md index b7ea024254..e50249cf4f 100644 --- a/docker-cloud/builds/link-source.md +++ b/docker-hub/builds/link-source.md @@ -1,24 +1,24 @@ --- description: Link to your source code repository -keywords: sourcecode, github, bitbucket, Cloud +keywords: sourcecode, github, bitbucket redirect_from: - /docker-cloud/tutorials/link-source/ -title: Link Docker Cloud to a source code provider +title: Link Docker Hub to a source code provider --- -To automate building and testing of your images, you link to your hosted source -code service to Docker Cloud so that it can access your source code +To automate building of your images, you link to your hosted source +code service to your Docker Hub repository so that it can access your source code repositories. You can configure this link for user accounts or organizations. -If you only push pre-built images to Docker Cloud's registry, you do not +If you only push pre-built images to Docker Hub's registry, you do not need to link your source code provider. > **Note**: If you are linking a source code provider to create autobuilds for a team, follow the instructions to [create a service account](automated-build.md#service-users-for-team-autobuilds) for the team before linking the account as described below. ## Link to a GitHub user account -1. Click **Cloud settings** in the left navigation bar. +1. Click **Settings** in the top right dropdown menu. 2. Click or scroll down to **Source providers**. @@ -26,13 +26,13 @@ need to link your source code provider. ![Linking source providers](images/source-providers.png) -4. Review the settings for the **Docker Cloud Builder** OAuth application. +4. Review the settings for the **Docker Hub Builder** OAuth application. ![Granting access to GitHub account](images/link-source-github-ind.png) >**Note**: If you are the owner of any Github organizations, you might see - options to grant Docker Cloud access to them from this screen. You can also + options to grant Docker Hub access to them from this screen. You can also individually edit an organization's Third-party access settings to grant or - revoke Docker Cloud's access. See [Grant access to a GitHub + revoke Docker Hub's access. See [Grant access to a GitHub organization](link-source.md#grant-access-to-a-github-organization) to learn more. 5. Click **Authorize application** to save the link. @@ -41,10 +41,10 @@ You are now ready to create a new image! ### Unlink a GitHub user account -To revoke Docker Cloud's access to your GitHub account, you must unlink it both -from Docker Cloud, *and* from your GitHub account. +To revoke Docker Hub's access to your GitHub account, you must unlink it both +from Docker Hub, *and* from your GitHub account. -1. Click **Cloud settings** in the left navigation, and click or scroll to the +1. Click **Settings** in the top right dropdown menu, and click or scroll to the **Source providers** section. 2. Click the plug icon next to the source provider you want to remove. @@ -58,17 +58,17 @@ from Docker Cloud, *and* from your GitHub account. 5. Click **OAuth applications** in the left navigation bar. ![Revoking access to GitHub account](images/link-source-github-ind-revoke.png) -6. Click **Revoke** next to the Docker Cloud Builder application. +6. Click **Revoke** next to the Docker Hub Builder application. > **Note**: Each repository that is configured as an automated build source -contains a webhook that notifies Docker Cloud of changes in the repository. +contains a webhook that notifies Docker Hub of changes in the repository. This webhook is not automatically removed when you revoke access to a source code provider. ## Grant access to a GitHub organization If you are the owner of a Github organization you can grant or revoke Docker -Cloud's access to the organization's repositories. Depending on the GitHub +Hub's access to the organization's repositories. Depending on the GitHub organization's settings, you may need to be an organization owner. If the organization has not had specific access granted or revoked before, you @@ -79,42 +79,42 @@ manually grant the application's access. ![Granting access to GitHub organization](images/link-source-github-org-lite.png) -To manually grant Docker Cloud access to a GitHub organization: +To manually grant Docker Hub access to a GitHub organization: 1. Link your user account using the instructions above. 2. From your GitHub Account settings, locate the **Organization settings** section at the lower left. -3. Click the organization you want to give Docker Cloud access to. +3. Click the organization you want to give Docker Hub access to. 4. From the Organization Profile menu, click **Third-party access**. The page displays a list of third party applications and their access status. -5. Click the pencil icon next to Docker Cloud Builder. +5. Click the pencil icon next to Docker Hub Builder. 6. Click **Grant access** next to the organization. ![Granting access to GitHub organization manually](images/link-source-github-org.png) ### Revoke access to a GitHub organization -To revoke Docker Cloud's access to an organization's GitHub repositories: +To revoke Docker Hub's access to an organization's GitHub repositories: 1. From your GitHub Account settings, locate the **Organization settings** section at the lower left. -2. Click the organization you want to revoke Docker Cloud's access to. +2. Click the organization you want to revoke Docker Hub's access to. 3. From the Organization Profile menu, click **Third-party access**. The page displays a list of third party applications and their access status. -4. Click the pencil icon next to Docker Cloud Builder. +4. Click the pencil icon next to Docker Hub Builder. ![Revoking access to GitHub organization](images/link-source-github-org-revoke.png) 5. On the next page, click **Deny access**. ## Link to a Bitbucket user account -1. Log in to Docker Cloud using your Docker ID. +1. Log in to Docker Hub using your Docker ID. -2. Click the gear icon in the left navigation to go to your **Cloud settings**. +2. Click the gear icon in the left navigation to go to your **Settings**. 3. Scroll to the **Source providers** section. @@ -128,10 +128,10 @@ To revoke Docker Cloud's access to an organization's GitHub repositories: ### Unlink a Bitbucket user account -To permanently revoke Docker Cloud's access to your Bitbucket account, you must -unlink it both from Docker Cloud, *and* from your Bitbucket account. +To permanently revoke Docker Hub's access to your Bitbucket account, you must +unlink it both from Docker Hub, *and* from your Bitbucket account. -1. From your **Cloud settings** page, click **Source providers** +1. From your **Settings** page, click **Source providers** 2. Click the plug icon next to the source provider you want to remove. @@ -145,9 +145,9 @@ unlink it both from Docker Cloud, *and* from your Bitbucket account. 6. On the page that appears, click **OAuth**. -7. Click **Revoke** next to the Docker Cloud line. +7. Click **Revoke** next to the Docker Hub line. > **Note**: Each repository that is configured as an automated build source -contains a webhook that notifies Docker Cloud of changes in the repository. This +contains a webhook that notifies Docker Hub of changes in the repository. This webhook is not automatically removed when you revoke access to a source code provider. diff --git a/docker-hub/images/getting-started.png b/docker-hub/images/getting-started.png index 3675c7beb1..9851092932 100644 Binary files a/docker-hub/images/getting-started.png and b/docker-hub/images/getting-started.png differ diff --git a/docker-hub/index.md b/docker-hub/index.md index c447623ca0..158b7cd7e9 100644 --- a/docker-hub/index.md +++ b/docker-hub/index.md @@ -1,77 +1,41 @@ --- -description: Docker Hub overview +description: Get Started with Docker Hub keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation, accounts, organizations, repositories, groups, teams redirect_from: - /docker-hub/overview/ -title: Overview of Docker Hub +title: Get Started with Docker Hub --- -[Docker Hub](https://hub.docker.com) is a cloud-based registry service which -allows you to link to code repositories, build your images and test them, stores -manually pushed images, and links to [Docker Cloud](/docker-cloud/) so you can -deploy images to your hosts. It provides a centralized resource for container -image discovery, distribution and change management, -[user and team collaboration](/docker-hub/orgs.md), and workflow automation -throughout the development pipeline. +[Docker Hub](https://hub.docker.com) is a service provided by Docker for finding and sharing container images with your team. -Log in to Docker Hub and Docker Cloud using -[your free Docker ID](/docker-hub/accounts.md). - -![Getting started with Docker Hub](/docker-hub/images/getting-started.png) +![Docker Hub Landing Page](/docker-hub/images/getting-started.png) Docker Hub provides the following major features: -* [Image Repositories](/docker-hub/repos.md): Find and pull images from - community and official libraries, and manage, push to, and pull from private - image libraries to which you have access. -* [Automated Builds](/docker-hub/builds.md): Automatically create new images - when you make changes to a source code repository. -* [Webhooks](/docker-hub/webhooks.md): A feature of Automated Builds, Webhooks - let you trigger actions after a successful push to a repository. -* [Organizations](/docker-hub/orgs.md): Create work groups to manage access to - image repositories. -* GitHub and Bitbucket Integration: Add the Hub and your Docker Images to your - current workflows. +* [Repositories](/docker-hub/repos.md): Push and pull container images. Private + repositories allow you to share container images with your team. Public + repositories allow you to share them with anyone. +* [Teams & Organizations](/docker-hub/orgs.md): Manage access to private repositories. +* [Official Repositories](/docker-hub/official_repos.md): Pull & use high-quality container images provided by Docker. +* [Publisher Images](/docker-hub/publish/customer_faq.md): Pull & use high-quality container + images provided by external vendors. Certified images also include support and guarantee + compatibility with Docker Enterprise. +* [Builds](/docker-hub/builds.md): Automatically build container images and push them to your repositories when you make changes to code in GitHub or BitBucket. +* [Webhooks](/docker-hub/webhooks.md): Trigger actions after a successful push + to a repository to integrate Docker Hub with other services. -## Create a Docker ID +## Sign up for Docker Hub -To explore Docker Hub, you need to create an account by following the -directions in [Your Docker ID](/docker-hub/accounts.md). +Start by creating an [account](/docker-hub/accounts.md) at [https://hub.docker.com](https://hub.docker.com). > **Note**: You can search for and pull Docker images from Hub without logging -> in, however to push images you must log in. +> in, however to push images or share them with your team, you must log in. -Your Docker ID gives you one private Docker Hub repository for free. If you need -more private repositories, you can upgrade from your free account to a paid -plan. To learn more, log in to Docker Hub and go to [Billing & -Plans](https://hub.docker.com/account/billing-plans/), in the Settings menu. - -### Explore repositories - -You can find public repositories and images from Docker Hub in two ways. You can -"Search" from the Docker Hub website, or you can use the Docker command line -tool to run the `docker search` command. For example if you were looking for an -ubuntu image, you might run the following command line search: - -``` - $ docker search ubuntu -``` - -Both methods list the available public repositories on Docker Hub which match -the search term. - -Private repositories do not appear in the repository search results. To see all -the repositories you can access and their status, view your "Dashboard" page on -[Docker Hub](https://hub.docker.com). - -### Use Official Repositories +## Find & Pull an Official Repositories Docker Hub contains a number of [Official -Repositories](http://hub.docker.com/explore/). These are public, certified -repositories from vendors and contributors to Docker. They contain Docker images -from vendors like Canonical, Oracle, and Red Hat that you can use as the basis -to build your applications and services. +Repositories](http://hub.docker.com/explore/). These are curated repositories from vendors and contributors to Docker. They contain Docker images from vendors like Canonical, Oracle, and Elastic that you can use as the basis to build your applications and services. With Official Repositories you know you're using an optimized and up-to-date image that was built by experts to power your applications. @@ -81,25 +45,40 @@ up-to-date image that was built by experts to power your applications. > [Official Repositories on Docker Hub](/docker-hub/official_repos.md) for more > information. +## Create your first repository and push an image to it -## Work with Docker Hub image repositories +To create a repo: +1. Log into [Docker Hub](https://hub.docker.com) +2. Click on Create Repositories on the home page: +3. Name it / -Docker Hub provides a place for you and your team to build and ship Docker -images. +Next, we'll push an images -You can configure Docker Hub repositories in two ways: +1. Download [Docker Desktop](https://docker.com/get-started) +2. `docker pull redis` to pull the Official **redis** image from Docker Hub +3. `docker tag redis /redis` +4. `docker push /redis` -* [Repositories](/docker-hub/repos.md), which allow you to push images from a - local Docker daemon to Docker Hub, and -* [Automated Builds](/docker-hub/builds.md), which link to a source code - repository and trigger an image rebuild process on Docker Hub when changes are - detected in the source code. +(insert pic here) -You can create public repositories which can be accessed by any other Hub user, -or you can create private repositories with limited access you control. +## Upgrading your Plan -### Docker commands and Docker Hub +Your Docker ID includes one private Docker Hub repository for free. If you need +more private repositories, you can upgrade from your free account to a paid +plan. +To upgrade, log in to Docker Hub and click [Upgrade Plan](https://hub.docker.com/account/billing-plans/), in the dropdown menu. + +(insert pic here) + +### Next Steps + +You've successfully create a repo and pushed a Docker image to it. Next: +- Create an [Organization](/docker-hub/orgs.md) to use Docker Hub with your team. +- Automatically build container images from code via [Builds](/docker-hub/builds/index.md). +- [Explore](https://hub.docker.com/explore) Official & Publisher Images + +### Docker Commands to Interact with Docker Hub Docker itself provides access to Docker Hub services via the [`docker search`](/engine/reference/commandline/search.md), [`pull`](/engine/reference/commandline/pull.md), diff --git a/docker-hub/official_repos.md b/docker-hub/official_repos.md index d17ce54b0d..aa8ca99afc 100644 --- a/docker-hub/official_repos.md +++ b/docker-hub/official_repos.md @@ -60,8 +60,7 @@ these efforts. ## How do I know the Official Repositories are secure? -Each of the images in the Official Repositories is scanned using Docker Cloud's -[Security Scanning service](/docker-cloud/builds/image-scan/). The results of +Each of the images in the Official Repositories is scanned for vulnerabilities. The results of these security scans provide valuable information about which images contain security vulnerabilities, and allow you to choose images that align with your security standards. diff --git a/docker-hub/orgs.md b/docker-hub/orgs.md index 4115d78f03..754d078b6a 100644 --- a/docker-hub/orgs.md +++ b/docker-hub/orgs.md @@ -13,14 +13,14 @@ Repository creation is limited to users in the organization owner's group. This allows you to distribute limited access Docker images, and to select which Docker Hub users can publish new images. -### Create and view organizations +### Create an organization You can see which organizations you belong to and add new organizations by clicking **Organizations** in the top nav bar. ![organizations](images/orgs.png) -### Organization teams +### Create a team Users in the "Owners" team of an organization can create and modify the membership of all teams. @@ -29,7 +29,9 @@ Other users can only see teams they belong to. ![teams](images/groups.png) -### Repository team permissions +### Add a member to a team + +### Manage team permissions Use teams to manage who can interact with your repositories. @@ -49,4 +51,5 @@ automatically have Read permissions: > `Read` access to the repository, regardless of the rights their team > membership has given them. + ![Organization repository collaborators](images/org-repo-collaborators.png) diff --git a/docker-store/byol.md b/docker-hub/publish/byol.md similarity index 71% rename from docker-store/byol.md rename to docker-hub/publish/byol.md index 0644b44177..6effb63d6d 100644 --- a/docker-store/byol.md +++ b/docker-hub/publish/byol.md @@ -1,20 +1,20 @@ --- -description: Submit a product to be listed on Docker Store -keywords: Docker, docker, store, purchase images -title: Bring Your Own License (BYOL) products on Store +description: Submit a product to be listed on Docker Hub +keywords: Docker, docker, hub, purchase images +title: Bring Your Own License (BYOL) products on Docker Hub --- ## What is Bring Your Own License (BYOL)? Bring Your Own License (BYOL) allows customers with existing software licenses to easily migrate to the containerized version of the software that you make -available on Docker Store. +available on Docker Hub. To see and access the BYOL product listing of an Independent Softare Vendor (ISV), customers simply subscribe to the product with their Docker ID. We call this **Ungated BYOL**. -ISVs can use the Docker Store/Hub as an entitlement and distribution platform +ISVs can use the Docker Hub as an entitlement and distribution platform for their various audiences, such as: - Existing customers that want their licensed software made available as Docker containers. @@ -25,9 +25,9 @@ for their various audiences, such as: ### Prerequisites and setup To use Docker as your fulfillment service, an ISV must: -- [Apply and be approved as a Docker Store Vendor Partner](https://goto.docker.com/partners) +- [Apply and be approved as a Docker Hub Vendor Partner](https://goto.docker.com/partners) - Apply and be approved to list an Ungated BYOL product -- Create one or more Ungated BYOL product plans, in the Docker Store Publisher center. +- Create one or more Ungated BYOL product plans, in the Docker Hub Publisher center. ## Creating an ungated BYOL plan diff --git a/docker-store/certify-images.md b/docker-hub/publish/certify-images.md similarity index 98% rename from docker-store/certify-images.md rename to docker-hub/publish/certify-images.md index 7614377a53..3659b58c64 100644 --- a/docker-store/certify-images.md +++ b/docker-hub/publish/certify-images.md @@ -8,7 +8,7 @@ title: Certify Docker images Content that qualifies as **Docker Certified** must conform to best practices and pass certain baseline tests. -Docker Store lets you publish certified images as well as plugins for logging, volumes, and networks. You must certify your own _images and logging plugins_ with the `inspect` tools as explained in these docs. Currently, Docker Store certifies your volume and networking plugins for you upon submission. +Docker Hub lets you publish certified images as well as plugins for logging, volumes, and networks. You must certify your own _images and logging plugins_ with the `inspect` tools as explained in these docs. Currently, Docker Hub certifies your volume and networking plugins for you upon submission. This page explains how publishers can successfully test their **Docker images**. Also available: [Certify your Docker logging plugins](certify-plugins-logging). @@ -18,7 +18,7 @@ This page explains how publishers can successfully test their **Docker images**. ## Certify your Docker images -You must use the tool, `inspectDockerImage`, to certify your content for publication on Docker Store by ensuring that your images conform to best practices. Download the tool [here](#syntax). +You must use the tool, `inspectDockerImage`, to certify your content for publication on Docker Hub by ensuring that your images conform to best practices. Download the tool [here](#syntax). The `inspectDockerImage` tool does the following: @@ -42,15 +42,15 @@ The `inspectDockerImage` tool does the following: The `inspectDockerImage` tool will detect issues and output them as **warnings** or **errors**. **Errors** must be fixed in order to certify. Resolving **warnings** is not required to certify, but you should try to resolve them. -If you are publishing and certifying multiple versions for a Docker image, you will need to run the `inspectDockerImage` tool on each Docker image and send each result to Docker Store. +If you are publishing and certifying multiple versions for a Docker image, you will need to run the `inspectDockerImage` tool on each Docker image and send each result to Docker Hub. -If you are publishing and certifying multi-architecture Docker image (e.g. Linux, Power, s390x, windows, etc.) you will need to run the `inspectDockerImage` tool on the Docker EE server running on each architecture and send the results to Docker Store. +If you are publishing and certifying multi-architecture Docker image (e.g. Linux, Power, s390x, windows, etc.) you will need to run the `inspectDockerImage` tool on the Docker EE server running on each architecture and send the results to Docker Hub. -Details on how to run the `inspectDockerImage` tool and send the results to Docker Store are in the sections that follow. +Details on how to run the `inspectDockerImage` tool and send the results to Docker Hub are in the sections that follow. ### Prerequisites -Your Docker EE installation must be running on the server used to verify your submissions. If necessary, request entitlement to a specific [Docker Enterprise Edition](https://store.docker.com/editions/enterprise/docker-ee-trial). +Your Docker EE installation must be running on the server used to verify your submissions. If necessary, request entitlement to a specific [Docker Enterprise Edition](https://hub.docker.com/editions/enterprise/docker-ee-trial). - Docker EE (on the server for verifying submissions) - inspectDockerImage tool @@ -174,7 +174,7 @@ There are two steps: (1) configure credentials, and (2) configure endpoints (or -log-tail int Number of lines to show from the end of the container logs. (default 20) -product-id string - Optional Product identifier from Docker Store for this image. Please include it when you want the output to be sent to docker store. + Optional Product identifier from Docker Hub for this image. Please include it when you want the output to be sent Docker Hub. -start-script string An optional custom script used to start the Docker container. The script will get passed one argument, the name of the Docker image. -start-wait-time int @@ -188,9 +188,9 @@ There are two steps: (1) configure credentials, and (2) configure endpoints (or ## Inspection Output -By default, `inspectDockerImage` displays output locally to `stdout` (the default), JSON, and HTML. You can also upload output to Docker Store, which is recommended for administrator verification. +By default, `inspectDockerImage` displays output locally to `stdout` (the default), JSON, and HTML. You can also upload output to Docker Hub, which is recommended for administrator verification. -- **Upload to Docker Store** (by entering `product-id` at the commandline). +- **Upload to Docker Hub** (by entering `product-id` at the commandline). - **Send message to `stdout`**. This is the default. @@ -233,7 +233,7 @@ docker container run -d \ $1 ``` -#### To inspect the Docker image, `gforghetti/tomcat-wildbook:latest`, with a custom startup script and upload the result to Docker Store (leave out the `-product-id` parameter if you are just testing): +#### To inspect the Docker image, `gforghetti/tomcat-wildbook:latest`, with a custom startup script and upload the result to Docker Hub (leave out the `-product-id` parameter if you are just testing): ``` root:[~/] # ./inspectDockerImage --start-script ./run_my_application.sh -product-id= gforghetti/tomcat-wildbook:latest @@ -447,9 +447,9 @@ The inspection of the Docker image gforghetti/tomcat-wildbook:latest has complet If -product-id is specified on command line: ************************************************************************************************************************************************************************************************** -* Step #16 Upload the test result to Docker Store. +* Step #16 Upload the test result to Docker Hub. ************************************************************************************************************************************************************************************************** -Passed: The test results are uploaded to Docker Store. +Passed: The test results are uploaded to Docker Hub. root:[~/] # ``` diff --git a/docker-store/certify-plugins-logging.md b/docker-hub/publish/certify-plugins-logging.md similarity index 95% rename from docker-store/certify-plugins-logging.md rename to docker-hub/publish/certify-plugins-logging.md index 7d5bfcbf8b..471c210ef1 100644 --- a/docker-store/certify-plugins-logging.md +++ b/docker-hub/publish/certify-plugins-logging.md @@ -1,6 +1,6 @@ --- description: Run certification tests against your images -keywords: Docker, docker, store, certified content, logging +keywords: Docker, docker, hub, certified content, logging title: Certify Docker logging plugins --- @@ -8,7 +8,7 @@ title: Certify Docker logging plugins Content that qualifies as **Docker Certified** must conform to best practices and pass certain baseline tests. -Docker Store lets you publish certified images as well as plugins for logging, volumes, and networks. You must certify your own _images and logging plugins_ with the `inspect` tools as explained in these docs. Currently, Docker Store certifies your volume and networking plugins for you upon submission. +Docker Hub lets you publish certified images as well as plugins for logging, volumes, and networks. You must certify your own _images and logging plugins_ with the `inspect` tools as explained in these docs. Currently, Docker Hub certifies your volume and networking plugins for you upon submission. This page explains how publishers can successfully test their **Docker logging plugins**. Also available: [Certify your Docker images](certify-images). @@ -18,7 +18,7 @@ This page explains how publishers can successfully test their **Docker logging p ## Certify your logging plugins -You must use the tool, `inspectDockerLoggingPlugin`, to certify your content for publication on Docker Store by ensuring that your Docker logging plugins conform to best practices. +You must use the tool, `inspectDockerLoggingPlugin`, to certify your content for publication on Docker Hub by ensuring that your Docker logging plugins conform to best practices. The `inspectDockerLoggingPlugin` command verifies that your Docker logging plugin can be installed and works on Docker Enterprise Edition. It also runs a container from an official Docker image of `alpine:latest` and outputs the contents of a file named `quotes.txt` (available for download). In sum, the `inspectDockerLoggingPlugin` command: @@ -32,7 +32,7 @@ The `inspectDockerLoggingPlugin` command verifies that your Docker logging plugi The `inspectDockerLoggingPlugin` tool will detect issues and output them as **warnings** or **errors**. **Errors** must be fixed in order to certify. Resolving **warnings** is not required to certify, but you should try to resolve them. -If you are publishing and certifying multiple versions of a Docker logging plugin, you will need to run the `inspectDockerLoggingPlugin` tool on each Docker logging plugin and send each result to Docker Store. +If you are publishing and certifying multiple versions of a Docker logging plugin, you will need to run the `inspectDockerLoggingPlugin` tool on each Docker logging plugin and send each result to Docker Hub. The syntax for running a specific logging plugin is `docker container run --log-driver`. @@ -52,7 +52,7 @@ Best practices require Docker logging plugins to support the [ReadLogs API](/eng ### Prerequisites -Your Docker EE installation must be running on the server used to verify your submissions. If necessary, request entitlement to a specific [Docker Enterprise Edition](https://store.docker.com/editions/enterprise/docker-ee-trial). +Your Docker EE installation must be running on the server used to verify your submissions. If necessary, request entitlement to a specific [Docker Enterprise Edition](https://hub.docker.com/editions/enterprise/docker-ee-trial). - Docker EE (on the server for verifying submissions) - git client @@ -132,7 +132,7 @@ There are two steps: (1) configure credentials, and (2) configure endpoints. --docker-registry-auth-endpoint --docker-registry-api-endpoint ``` - + * If more details are needed for debugging problems communicating to the Docker Registry, the following environment variable can be exported which will generate detailed debugging output to a file named `./dockerAPI.go.log` in the directory where the command is run from. * Linux or MacOS @@ -218,7 +218,7 @@ There are two steps: (1) configure credentials, and (2) configure endpoints. -json Generate JSON output. -product-id string - Optional Product identifier from Docker Store for this plugin. Please include it when you want the output sent to docker store for certification. + Optional Product identifier from Docker Hub for this plugin. Please include it when you want the output sent to Docker Hub for certification. -test-script string An optional custom script used to test the Docker logging plugin. The script gets passed 1 parameter - the Docker logging plugin name. -verbose @@ -230,9 +230,9 @@ There are two steps: (1) configure credentials, and (2) configure endpoints. ## Inspection Output -By default, `inspectDockerLoggingPlugin` displays output locally to `stdout` (the default), JSON, and HTML. You can also upload output to Docker Store, which is recommended for admnistrator verification. +By default, `inspectDockerLoggingPlugin` displays output locally to `stdout` (the default), JSON, and HTML. You can also upload output to Docker Hub, which is recommended for admnistrator verification. -- **Upload to Docker Store** (by entering `product-id` at the commandline). +- **Upload to Docker Hub** (by entering `product-id` at the commandline). - **Send message to `stdout`**. This is the default. @@ -251,7 +251,7 @@ By default, `inspectDockerLoggingPlugin` displays output locally to `stdout` (th ### Inspect a Docker logging plugin with messages sent to stdout -#### To inspect the Docker logging plugin "gforghetti/docker-log-driver-test:latest", and upload the result to Docker Store (leave out the `-product-id` parameter if you are just testing): +#### To inspect the Docker logging plugin "gforghetti/docker-log-driver-test:latest", and upload the result to Docker Hub (leave out the `-product-id` parameter if you are just testing): ``` gforghetti:~:$ ./inspectDockerLoggingPlugin -product-id= gforghetti/docker-log-driver-test:latest @@ -344,9 +344,9 @@ The inspection of the Docker logging plugin gforghetti/docker-log-driver-test:la If -product-id is specified on command line: ************************************************************************************************************************************************************************************************** -* Step #9 Upload the test result to Docker Store. +* Step #9 Upload the test result to Docker Hub. ************************************************************************************************************************************************************************************************** -Passed: The test results are uploaded to Docker Store. +Passed: The test results are uploaded to Docker Hub. gforghetti:~/$ ``` @@ -452,7 +452,7 @@ gforghetti:~/$ #### Introduction The **http_api_endpoint** is an HTTP Server that can be used to test docker logging plugins that do not support the read log api and instead send data to an API Endpoint running on an external server. -The [Sumo Logic Logging Plugin](https://store.docker.com/plugins/sumologic-logging-plugin) is one example. +The [Sumo Logic Logging Plugin](https://hub.docker.com/plugins/sumologic-logging-plugin) is one example. You can configure those docker logging plugins to send their logging data to the **http_api_endpoint** HTTP Server for testing the plugin and then code a script to retrieve the logs using a curl command. diff --git a/docker-store/customer_faq.md b/docker-hub/publish/customer_faq.md similarity index 81% rename from docker-store/customer_faq.md rename to docker-hub/publish/customer_faq.md index a3fb58ddeb..a8b7c48570 100644 --- a/docker-store/customer_faq.md +++ b/docker-hub/publish/customer_faq.md @@ -1,20 +1,11 @@ --- -description: Docker Store frequently asked questions +description: Docker Hub frequently asked questions keywords: Docker, docker, store, purchase images -title: Docker Store Customer FAQs +title: Docker Hub Customer FAQs --- ## Customer FAQs -### How do I log in to the Docker Store? - -Log in to the Docker Store using your free Docker ID. Don’t have a Docker ID -yet? Go to [Docker Cloud](https://cloud.docker.com) to sign up. - -### I tried `docker login store.docker.com` via the CLI and it does not seem to work. Am I missing something? - -You should do `docker login` ( *not `docker login store.docker.com`* ) to login successfully, and pull content you might be entitled to. - ## Certification program ### What is the certification program for images and plugins, and what are some benefits? @@ -53,19 +44,19 @@ organization member to pull. Organization owners can view the organization's subscriptions by changing the selected account on the **My Content** page. -### How can I become a Docker Store publisher? +### How can I become a Docker Hub publisher? -You can apply to become a Docker Store publisher by filling out -the form [here](https://store.docker.com/publisher/signup). When you've been +You can apply to become a Docker Hub publisher by filling out +the form [here](https://hub.docker.com/publisher/signup). When you've been accepted to the program, you can set up a publisher profile and submit your images for review. Learn more about the publisher duties and requirements [here](https://success.docker.com/Store). -## Docker Store billing frequently asked questions +## Docker Hub billing frequently asked questions ### What forms of payment do you accept? -The Docker Store accepts Visa, MasterCard, American Express, and Discover credit +The Docker Hub accepts Visa, MasterCard, American Express, and Discover credit cards. We do not accept ACH, EFT, or PIN-based debit card transactions at this time. diff --git a/docker-store/images/FAQ-certified-content.png b/docker-hub/publish/images/FAQ-certified-content.png similarity index 100% rename from docker-store/images/FAQ-certified-content.png rename to docker-hub/publish/images/FAQ-certified-content.png diff --git a/docker-store/images/FAQ-types-of-certified-content.png b/docker-hub/publish/images/FAQ-types-of-certified-content.png similarity index 100% rename from docker-store/images/FAQ-types-of-certified-content.png rename to docker-hub/publish/images/FAQ-types-of-certified-content.png diff --git a/docker-store/images/certified_container.png b/docker-hub/publish/images/certified_container.png similarity index 100% rename from docker-store/images/certified_container.png rename to docker-hub/publish/images/certified_container.png diff --git a/docker-store/images/certified_infrastructure.png b/docker-hub/publish/images/certified_infrastructure.png similarity index 100% rename from docker-store/images/certified_infrastructure.png rename to docker-hub/publish/images/certified_infrastructure.png diff --git a/docker-store/images/certified_plugins.png b/docker-hub/publish/images/certified_plugins.png similarity index 100% rename from docker-store/images/certified_plugins.png rename to docker-hub/publish/images/certified_plugins.png diff --git a/docker-store/images/gforghetti-apache-latest_inspection_report.html-1.png b/docker-hub/publish/images/gforghetti-apache-latest_inspection_report.html-1.png similarity index 100% rename from docker-store/images/gforghetti-apache-latest_inspection_report.html-1.png rename to docker-hub/publish/images/gforghetti-apache-latest_inspection_report.html-1.png diff --git a/docker-store/images/gforghetti-apache-latest_inspection_report.html-2.png b/docker-hub/publish/images/gforghetti-apache-latest_inspection_report.html-2.png similarity index 100% rename from docker-store/images/gforghetti-apache-latest_inspection_report.html-2.png rename to docker-hub/publish/images/gforghetti-apache-latest_inspection_report.html-2.png diff --git a/docker-store/images/gforghetti-apache-latest_inspection_report.html-3.png b/docker-hub/publish/images/gforghetti-apache-latest_inspection_report.html-3.png similarity index 100% rename from docker-store/images/gforghetti-apache-latest_inspection_report.html-3.png rename to docker-hub/publish/images/gforghetti-apache-latest_inspection_report.html-3.png diff --git a/docker-store/images/gforghetti-log-driver-latest_inspection_report.html.png b/docker-hub/publish/images/gforghetti-log-driver-latest_inspection_report.html.png similarity index 100% rename from docker-store/images/gforghetti-log-driver-latest_inspection_report.html.png rename to docker-hub/publish/images/gforghetti-log-driver-latest_inspection_report.html.png diff --git a/docker-store/images/image_0.png b/docker-hub/publish/images/image_0.png similarity index 100% rename from docker-store/images/image_0.png rename to docker-hub/publish/images/image_0.png diff --git a/docker-store/images/publish-diagram.png b/docker-hub/publish/images/publish-diagram.png similarity index 100% rename from docker-store/images/publish-diagram.png rename to docker-hub/publish/images/publish-diagram.png diff --git a/docker-store/images/publish_byol.png b/docker-hub/publish/images/publish_byol.png similarity index 100% rename from docker-store/images/publish_byol.png rename to docker-hub/publish/images/publish_byol.png diff --git a/docker-store/images/scan-full-details.png b/docker-hub/publish/images/scan-full-details.png similarity index 100% rename from docker-store/images/scan-full-details.png rename to docker-hub/publish/images/scan-full-details.png diff --git a/docker-store/images/scan-single.png b/docker-hub/publish/images/scan-single.png similarity index 100% rename from docker-store/images/scan-single.png rename to docker-hub/publish/images/scan-single.png diff --git a/docker-store/images/scan-tags.png b/docker-hub/publish/images/scan-tags.png similarity index 100% rename from docker-store/images/scan-tags.png rename to docker-hub/publish/images/scan-tags.png diff --git a/docker-store/images/scan-view.png b/docker-hub/publish/images/scan-view.png similarity index 100% rename from docker-store/images/scan-view.png rename to docker-hub/publish/images/scan-view.png diff --git a/docker-store/images/store-browse.png b/docker-hub/publish/images/store-browse.png similarity index 100% rename from docker-store/images/store-browse.png rename to docker-hub/publish/images/store-browse.png diff --git a/docker-store/images/store-get.png b/docker-hub/publish/images/store-get.png similarity index 100% rename from docker-store/images/store-get.png rename to docker-hub/publish/images/store-get.png diff --git a/docker-store/images/store-product-id.png b/docker-hub/publish/images/store-product-id.png similarity index 100% rename from docker-store/images/store-product-id.png rename to docker-hub/publish/images/store-product-id.png diff --git a/docker-store/images/store-pullcmd.png b/docker-hub/publish/images/store-pullcmd.png similarity index 100% rename from docker-store/images/store-pullcmd.png rename to docker-hub/publish/images/store-pullcmd.png diff --git a/docker-store/images/store-search.png b/docker-hub/publish/images/store-search.png similarity index 100% rename from docker-store/images/store-search.png rename to docker-hub/publish/images/store-search.png diff --git a/docker-store/images/subscribed.png b/docker-hub/publish/images/subscribed.png similarity index 100% rename from docker-store/images/subscribed.png rename to docker-hub/publish/images/subscribed.png diff --git a/docker-hub/publish/index.md b/docker-hub/publish/index.md new file mode 100644 index 0000000000..d9d1490935 --- /dev/null +++ b/docker-hub/publish/index.md @@ -0,0 +1,71 @@ +--- +description: Docker Hub programs and policies for publishers +keywords: Docker, docker, store, publishers, publish images +title: Docker Hub overview +--- + +Independent Software Vendors (ISVs) can utilize Docker Hub to distribute and +sell their Dockerized content. Publish your software through Docker Hub to +experience the following benefits: + +* **Access to Docker’s large and growing customer-base.** Docker has experienced + rapid adoption, and is popular in dev-ops environments. Docker users have + pulled images over twelve billion times and they are increasingly turning to + Docker Hub as the canonical source for high-quality, curated content. + +* **Customers can try or buy your software**, right from your product listing. + Your content is accessible for installation, trial, and purchase from + Docker Hub and the Docker CLI. + +* **Use of Docker licensing support.** Control who has access to your software: + a) logged-in users, b) users who have purchased a license, or c) all Docker + users. We’ll help you manage and control your distribution. + +* **We handle checkout.** You don’t need to set up your own digital + e-commerce site when you sell your content through Docker Hub. Choose + how much you want to charge for your products and we handle the billing. + +* **Seamless updates and upgrades for your customers.** We tell your customers + when your content has upgrades or updates available. + +* **Become Docker Certified.** Publisher container images and plugins that meet + the quality, security, and support criteria of the program displays a + “Docker Certified” badge within the Docker Hub (which can be used in + external marketing). + +## Distribution models + +Docker Hub welcomes free and open-source content, as well as software sold +directly by publishers. We support the following commercial models: + +### Paid via Docker + +This commercial model allows customers to pay for ISV content via Docker, as +described in the Store Vendor Partner agreement. Paid-via-Docker content +includes both software that can be deployed on a host, as well as software that +runs in the cloud and can be accessed by the customer via an agent +(containerized cloud services, for example). + +### Licensed content via Docker Hub BYOL program + +ISVs can use Docker Hub as an entitlement and distribution platform. Using +APIs provided by Docker, ISVs can entitle users and distribute their Dockerized +content to many different audiences: +* Existing customers that want their licensed software made available as Docker containers. +* New customers that are only interested in consuming their software as Docker containers. +* Trial or beta customers, where the ISV can distribute feature or time limited software. + +Docker provides a fulfillment service so that ISVs can programmatically entitle +users, by creating subscriptions to their content in Docker Hub. For more +information, see [Bring Your Own License (BYOL) products on Store](byol.md). + +### Plugins and agents + +ISVs have the ability to create and distribute [plugin images](https://hub.docker.com/search?certification_status=certified&q=&type=plugin) for their customers to integrate with the ISV's proprietary hardware or cloud infrastructure and Docker Enterprise Edition deployments. + +You can [apply to be a publisher](https://goto.docker.com/partners) and learn more about our [Technology Partner Program](https://www.docker.com/partners/partner-program#/technology_partner). + +## What's next? + +* Learn about submitting products and content to Docker Hub, see the [publishers guide](publish.md) and the [publisher FAQs](publisher_faq.md). +* Learn about using Docker Hub to download content, see the [customer FAQs](customer_faq.md). diff --git a/docker-store/publish.md b/docker-hub/publish/publish.md similarity index 94% rename from docker-store/publish.md rename to docker-hub/publish/publish.md index 6a33a3f1a5..7fa63e5432 100644 --- a/docker-store/publish.md +++ b/docker-hub/publish/publish.md @@ -1,7 +1,7 @@ --- -description: Submit a product for the Docker Store -keywords: Docker, docker, store, purchase images -title: Publish content on Docker Store +description: Submit a product for Docker Hub +keywords: Docker, docker, hub, purchase images +title: Publish content on Docker Hub --- ## Permitted content and support options @@ -27,7 +27,7 @@ title: Publish content on Docker Store ## Onboarding -The Docker Store publishing process begins from the landing page: sign in with +The Docker Hub publishing process begins from the landing page: sign in with your Docker ID and specify a product name and image source from a private repository. Your product images must be stored in private repositories of Docker Cloud and/or Hub as they serve as an internal staging area from which you can @@ -38,7 +38,7 @@ product details page. These items include logos, descriptions, and licensing and support links so that customers can make informed decisions about your image. These items are submitted alongside the image itself for moderation. -The Docker Store team then conducts a comprehensive review of your image and +The Docker Hub team then conducts a comprehensive review of your image and metadata. We use Docker Security Scanning to evaluate the security of your product images, and share results with you as the publisher. During the image-moderation phase, we iterate back and forth with publishers to address @@ -140,7 +140,7 @@ story, and what you do. At the very minimum, we require: ## Prepare your image-manifest materials You must provide the namespace (including repository and tags) of a private -repository on Docker Cloud or Hub that contains the source for your product. +repository on Docker Hub that contains the source for your product. This repository path is not shown to users, but the repositories you choose determine the Product Tiers available for customers to download. @@ -188,7 +188,7 @@ response-time expectations, where applicable. ## Security and audit policies -Docker Store [scans](#docker-security-scanning) your official images for +Docker Hub [scans](#docker-security-scanning) your official images for vulnerabilities with the Docker Security Scanning tool, and [audits](#usage-audit-and-reporting) consumer activity of your images to provide you intelligence about the use of your product. @@ -209,10 +209,10 @@ and are never shared with end customers or other publishers. To interpret the results of a scanned image: -1. Log on to [Docker Store](https://store.docker.com){: target="_blank" class="_"}. +1. Log on to [Docker Hub](https://hub.docker.com){: target="_blank" class="_"}. 2. Navigate to the repository details page (for example, - [Nginx](https://store.docker.com/images/nginx){: target="_blank" class="_"}). + [Nginx](https://hub.docker.com/images/nginx){: target="_blank" class="_"}). 3. Click **View Available Tags** under the pull command in the upper right of the UI. @@ -323,11 +323,11 @@ where applicable, and subscription length for paid customers of the content; and ### Certification -There are three types of certification that appear in Docker Store. +There are three types of certification that appear in Docker Hub. ![certified container badge](images/certified_container.png) -Certifies that a container image on Docker Store has been tested; complies best +Certifies that a container image on Docker Hub has been tested; complies best practices guidelines; runs on a Docker Certified Infrastructure; has proven provenance; been scanned for vulnerabilities; and is supported by Docker and the content publisher @@ -350,33 +350,33 @@ the partner. #### What is the Docker Certified program? Docker Certified Container images and plugins are meant to differentiate high -quality content on Docker Store. Customers can consume Certified Containers with +quality content on Docker Hub. Customers can consume Certified Containers with confidence knowing that both Docker and the publisher stands behind the solution. Further details can be found in the [Docker Partner Program Guide](https://www.docker.com/partnerprogramguide){: target="_blank" class="_"}. #### What are the benefits of Docker Certified? -Docker Store promotes Docker Certified Containers and Plugins running on Docker +Docker Hub promotes Docker Certified Containers and Plugins running on Docker Certified Infrastructure trusted and high quality content. With over 8B image pulls and access to Docker’s large customer base, a publisher can differentiate their content by certifying their images and plugins. With a revenue share agreement, Docker can be a channel for your content. The Docker Certified badge can also be listed alongside external references to your product. -#### How is the Docker Certified Container image listed on Docker Store? +#### How is the Docker Certified Container image listed on Docker Hub? -These images are differentiated from other images on store through a +These images are differentiated from other images through a certification badge. A user can search specifically for CI’s by limiting their search parameters to show only certified content. ![certified content example](images/FAQ-certified-content.png) -#### Is certification optional or required to be listed on Store? +#### Is certification optional or required? Certification is recommended for most commercial and supported container images. Free, community, and other commercial (non-certified) content may also be listed -on Docker Store. +on Docker Hub. ![certified content example](images/FAQ-types-of-certified-content.png) diff --git a/docker-store/publisher_faq.md b/docker-hub/publish/publisher_faq.md similarity index 89% rename from docker-store/publisher_faq.md rename to docker-hub/publish/publisher_faq.md index 4b8af003bd..6392759e94 100644 --- a/docker-store/publisher_faq.md +++ b/docker-hub/publish/publisher_faq.md @@ -1,7 +1,7 @@ --- -description: Docker Store frequently asked questions +description: Docker Hub frequently asked questions keywords: Docker, docker, store, purchase images -title: Docker Store Publisher FAQs +title: Docker Hub Publisher FAQs --- ## Certification program @@ -35,7 +35,7 @@ conducts a best practices review of the image. * Upon completion of Certification criteria, and acceptance by Docker, Publisher’s product page is updated to reflect Certified status. -### What is the Docker Store Publisher Program application timeline? +### What is the Docker Hub Publisher Program application timeline? 1-2 weeks. @@ -70,7 +70,7 @@ Official images and community images have available tags visible because anyone We aim to have product listings published with the concept of versions, allowing publishers to manage which versions of their products they expose to customers for access. (Expected Q3 2018) -### On the page for another vendor’s product on Docker store, I see the following chunks of data: How do these fields map to the following that are required in the publish process? +### On the page for another vendor’s product on Docker Hub, I see the following chunks of data: How do these fields map to the following that are required in the publish process? #### Fields I see @@ -92,8 +92,8 @@ We aim to have product listings published with the concept of versions, allowing *Description* maps to *Product description* in the publish process. *License* maps to *Support Link* in the publish process. *Documentation* maps to *Documentation Link* in the publish process. -*Feedback* is provided via customer reviews. https://store.docker.com/images/node?tab=reviews is an example. -*Tier Description* is what you see once users get entitled to a plan. For instance, in https://store.docker.com/images/openmaptiles-openstreetmap-maps/plans/f1fc533a-76f0-493a-80a1-4e0a2b38a563?tab=instructions `A detailed street map of any place on a planet. Evaluation and non-production use. Production use license available separately` is what this publisher entered in the Tier description +*Feedback* is provided via customer reviews. https://hub.docker.com/images/node?tab=reviews is an example. +*Tier Description* is what you see once users get entitled to a plan. For instance, in https://hub.docker.com/images/openmaptiles-openstreetmap-maps/plans/f1fc533a-76f0-493a-80a1-4e0a2b38a563?tab=instructions `A detailed street map of any place on a planet. Evaluation and non-production use. Production use license available separately` is what this publisher entered in the Tier description *Installation instructions* is documentation on installing your software. In this case the documentation is just `Just launch the container and the map is going to be available on port 80 - ready-to-use - with instructions and list of available styles.` (We recommend more details for any content thats a certification candidate). ### How can I remove a submission? I don’t want to currently have this image published as it is missing several information. @@ -106,7 +106,7 @@ publisher-support@docker.com. Yes. Publishers can provide multiple images and add a compose file in the install instructions to describe how the multi-container app can be used. For now, we recommend asking publishers to look at this example from Microsoft -https://store.docker.com/images/mssql-server-linux where they have Supported +https://hub.docker.com/images/mssql-server-linux where they have Supported Tags listed in the Install instructions (you don't necessarily need to list it in the readme). @@ -121,9 +121,9 @@ to provide additional clarity. ### I have two plans, can I use the same repository but different tags for the two plans? -We expect publishers to use a different repository for each plan. If a user is entitled to a plan in your product, the user is entitled to all tags in the relevant. -For instance, if you have a `Developer` Plan, that is mapped to repositories store/`mynamespace`/`myrepo1`:`mytag1`, another plan (say `Production`) **should** map to a different repository. -**_Any user that is entitled to the `Developer` plan will be able to pull all tags in store/`mynamespace`/`myrepo1`_**. +We expect publishers to use a different repository for each plan. If a user is entitled to a plan in your product, the user is entitled to all tags in the relevant. +For instance, if you have a `Developer` Plan, that is mapped to repositories store/`mynamespace`/`myrepo1`:`mytag1`, another plan (say `Production`) **should** map to a different repository. +**_Any user that is entitled to the `Developer` plan will be able to pull all tags in store/`mynamespace`/`myrepo1`_**. ## Licensing, terms and conditions, and pricing @@ -160,7 +160,7 @@ and stop the container. (_We do not build anything into the container, it is up Publisher can provide two different tokens or let customers use the same token and internally map the customer to a paid plan vs a free trial. -### What are Docker Store pricing plans like? Can I have metered pricing? +### What are Docker Hub pricing plans like? Can I have metered pricing? As a publisher you can charge a subscription fee every month in USD. The amount is determined by you. We are working on other pricing options. If you have @@ -168,7 +168,7 @@ feedback about pricing, send us an email at publisher-support@docker.com ### As a publisher, I have not setup any payment account. How does money get to me if my commercial content gets purchased by customers? -We (Docker) cut you a check post a revenue share. Your Docker Store Vendor +We (Docker) cut you a check post a revenue share. Your Docker Hub Vendor Agreement should cover specifics. ### How does Docker handle Export control? Can individual countries be specified if differing from Docker's list of embargoed countries? @@ -183,7 +183,7 @@ specific groups. Send us an email at publisher-support if you have questions ### Where can I view customer insights? Analytics reports are only available to Publishers with Certified or Commercial -Content. Go to https://store.docker.com/publisher/center and click on "Actions" +Content. Go to https://hub.docker.com/publisher/center and click on "Actions" for the product you'd like to view analytics for. Here is a [screenshot](https://user-images.githubusercontent.com/2453622/32352202-6e87ce6e-bfdd-11e7-8fb0-08fe5a3e8930.png). diff --git a/docker-store/trustchain.md b/docker-hub/publish/trustchain.md similarity index 66% rename from docker-store/trustchain.md rename to docker-hub/publish/trustchain.md index d48cc7c7d4..3b13067ed8 100644 --- a/docker-store/trustchain.md +++ b/docker-hub/publish/trustchain.md @@ -1,5 +1,5 @@ --- -title: Docker Store trust chain +title: Docker Hub Publisher Image Trust Chain keywords: trust, chain, store, security --- @@ -9,18 +9,18 @@ Docker ensures that all content is securely received and verified from original producers, and additionally audits images before adding them to the Docker Store. Docker cryptographically signs the images upon completion of a satisfactory image check, so that you can verify and trust certified content -from the Docker Store. +from the Docker Hub. Here’s the full trust chain in detail, with details on how to cryptographically -verify completion of the process when pulling an image from Docker Store: +verify completion of the process when pulling an image from Docker Hub: -1. Producers sign and push their images using Docker Content Trust to a private staging area. +1. Publishers sign and push their images using Docker Content Trust to a private staging area. 2. Docker pulls the image, verifies the signatures to guarantee authenticity, integrity, and freshness of the image. -3. The Docker Store certification team performs a thorough review of the image, looking for vulnerabilities and verifying best practices for image hygiene, such as ensuring minimal image sizes and working health-checks. +3. The Docker Hub certification team performs a thorough review of the image, looking for vulnerabilities and verifying best practices for image hygiene, such as ensuring minimal image sizes and working health-checks. -4. Upon a successful review, Docker signs the image and makes it officially available on Docker Store. As a consumer, you can confirm that Docker signed the image by pulling and running with Docker Content Trust: +4. Upon a successful review, Docker signs the image and makes it officially available on Docker Hub. As a consumer, you can confirm that Docker signed the image by pulling and running with Docker Content Trust: ```shell DOCKER_CONTENT_TRUST=1 docker pull @@ -30,7 +30,7 @@ verify completion of the process when pulling an image from Docker Store: ## For publishers -The Docker Store has a thorough and well-defined certification process to ensure +The Docker Hub has a thorough and well-defined certification process to ensure top-quality content from producers is delivered to consumers in a trusted manner. As a producer of content, you are required to sign your images so that Docker can verify that your content is not tampered with upon starting the @@ -44,11 +44,11 @@ image certification and publishing process as outlined below: 2. Docker verifies the signatures to guarantee authenticity, integrity, and freshness of the image. All of the individual layers of your image, and the combination thereof, are encompassed as part of this verification check. [Read more detail about Content Trust in Docker's documentation](/engine/security/trust/content_trust/#understand-trust-in-docker). -3. Upon a successful signature verification, Docker pulls the original image to a private, internal staging area only accessible to the Docker Store certification team. +3. Upon a successful signature verification, Docker pulls the original image to a private, internal staging area only accessible to the Docker Hub certification team. -4. The Docker Store certification team performs a thorough review of the image, looking for vulnerabilities and verifying best practices for image hygiene, such as ensuring minimal image sizes and working health-checks. +4. The Docker Hub certification team performs a thorough review of the image, looking for vulnerabilities and verifying best practices for image hygiene, such as ensuring minimal image sizes and working health-checks. -5. Upon a successful review, Docker signs the image and makes it officially available on Docker Store. Similar to artifacts on the Apple Store, this is the final and only signature on the image. Your consumers confirm that the full certification process was completed by checking Docker’s signature by pulling and running with Docker Content Trust: +5. Upon a successful review, Docker signs the image and makes it officially available on Docker Hub. Similar to artifacts on the Apple Store, this is the final and only signature on the image. Your consumers confirm that the full certification process was completed by checking Docker’s signature by pulling and running with Docker Content Trust: ```shell DOCKER_CONTENT_TRUST=1 docker pull diff --git a/docker-hub/repos.md b/docker-hub/repos.md index 4e13fc3769..1dcb4f91bf 100644 --- a/docker-hub/repos.md +++ b/docker-hub/repos.md @@ -103,7 +103,6 @@ Now you can push this repository to the registry designated by its name or tag. The image is then uploaded and available for use by your team-mates and/or the community. - ## Stars Your repositories can be starred and you can star repositories in return. Stars diff --git a/docker-hub/webhooks.md b/docker-hub/webhooks.md index 1b874c21c3..accd83eeea 100644 --- a/docker-hub/webhooks.md +++ b/docker-hub/webhooks.md @@ -48,7 +48,3 @@ with the following payload: } } ``` - ->**Note**: If you want to test your webhook, we recommend using a tool like ->[requestb.in](http://requestb.in/). Also note, the Docker Hub server can't be ->filtered by IP address. diff --git a/docker-id/index.md b/docker-id/index.md index a6ac858675..b96f298758 100644 --- a/docker-id/index.md +++ b/docker-id/index.md @@ -1,13 +1,10 @@ --- description: Sign up for a Docker ID and log in -keywords: accounts, docker ID, billing, paid plans, support, Cloud, Hub, Store, Forums, knowledge base, beta access +keywords: accounts, docker ID, billing, paid plans, support, Hub, Store, Forums, knowledge base, beta access title: Docker ID accounts --- -Your free Docker ID grants you access to Docker services such as the Docker -Store, Docker Cloud, Docker Hub repositories, and some beta programs. Your -Docker ID becomes repository namespace used by hosted services such as Docker -Hub and Docker Cloud. All you need is an email address. +Your free Docker ID grants you access to Docker Hub repositories, and some beta programs. All you need is an email address. This account also allows you to log in to services such as the Docker Support Center, the Docker Forums, and the Docker Success portal. @@ -17,7 +14,7 @@ Center, the Docker Forums, and the Docker Success portal. Your Docker ID becomes your user namespace for hosted Docker services, and becomes your username on the Docker Forums. -1. Go to the [Docker Cloud sign up page](https://cloud.docker.com). +1. Go to the [Docker Hub signup page](https://hub.docker.com/signup/). 2. Enter a username that is also your Docker ID. @@ -39,11 +36,7 @@ Your Docker ID becomes your user namespace for hosted Docker services, and becom ## Log in Once you register and verify your Docker ID email address, you can log in -to Docker services. - -For Docker Cloud, Hub, and Store, log in using the web interface. - -![Login using the web interface](/docker-id/images/login-cloud.png) +to [Docker Hub](https://hub.docker.com) and [Docker Support](https://support.docker.com). You can also log in using the `docker login` command. (You can read more about `docker login` [here](/engine/reference/commandline/login.md).) diff --git a/docker-store/index.md b/docker-store/index.md deleted file mode 100644 index c5ac99ee1c..0000000000 --- a/docker-store/index.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -description: Docker Store programs and policies for publishers -keywords: Docker, docker, store, publishers, publish images -title: Docker Store overview ---- - -For developers and operators, Docker Store is the best way to discover -high-quality Docker content. - -Independent Software Vendors (ISVs) can utilize Docker Store to distribute and -sell their Dockerized content. Publish your software through Docker Store to -experience the following benefits: - -* **Access to Docker’s large and growing customer-base.** Docker has experienced - rapid adoption, and is popular in dev-ops environments. Docker users have - pulled images over twelve billion times and they are increasingly turning to - Docker Store as the canonical source for high-quality, curated content. - -* **Customers can try or buy your software**, right from your product listing. - Your content is accessible for installation, trial, and purchase from the - Docker Store and the Docker CLI. - -* **Use of Docker licensing support.** Control who has access to your software: - a) logged-in users, b) users who have purchased a license, or c) all Docker - users. We’ll help you manage and control your distribution. - -* **We handle checkout.** You don’t need to set up your own digital - e-commerce site when you sell your content through the Docker Store. Choose - how much you want to charge for your products and we handle the billing. - -* **Seamless updates and upgrades for your customers.** We tell your customers - when your content has upgrades or updates available. - -* **Become Docker Certified.** Publisher container images and plugins that meet - the quality, security, and support criteria of the program displays a - “Docker Certified” badge within the Docker Store (which can be used in - external marketing). - -## How is Docker Store different from Docker Hub? What about Official Images? - -Docker Hub contains community content - these are images that have been created -by entities that are not vetted or curated. You can think of the community -content you consume as the "Wild West"--anyone can push new images to the -community and there are no guarantees around the quality or compatibility of -this content. - -Docker Store contains content that has been submitted for approval by qualified -Store Vendor Partners. These products are published and maintained directly by a -commercial entity. In addition, the Docker Certified logo distinguishes content -by providing quality, provenance, and support assurances. - -Official Images are an exception when it comes to community content; these -images are maintained as open source community projects. All official images -adhere to strict guidelines but are not necessarily backed by a commercial -entity. - -> **Note**: Docker Hub and Docker Store leverage the same backend, the Docker -> Public Registry. In general, all publicly available community content should -> be visible via both Docker Hub and Docker Store, and this includes official -> images. Any content that has explicitly been added by a commercial entity and -> has gone through a vetting process with respect to content submission and best -> practices, is only available on Docker Store. - -## Distribution models - -The Docker Store welcomes free and open-source content, as well as software sold -directly by publishers. We support the following commercial models: - -### Paid via Docker - -This commercial model allows customers to pay for ISV content via Docker, as -described in the Store Vendor Partner agreement. Paid-via-Docker content -includes both software that can be deployed on a host, as well as software that -runs in the cloud and can be accessed by the customer via an agent -(containerized cloud services, for example). - -### Licensed content via Docker Store BYOL program - -ISVs can use Docker Store as an entitlement and distribution platform. Using -APIs provided by Docker, ISVs can entitle users and distribute their Dockerized -content to many different audiences: -* Existing customers that want their licensed software made available as Docker containers. -* New customers that are only interested in consuming their software as Docker containers. -* Trial or beta customers, where the ISV can distribute feature or time limited software. - -Docker provides a fulfillment service so that ISVs can programmatically entitle -users, by creating subscriptions to their content in Docker Store. For more -information, see [Bring Your Own License (BYOL) products on Store](byol.md). - -### Plugins and agents - -ISVs have the ability to create and distribute [plugin images](https://store.docker.com/search?certification_status=certified&q=&type=plugin) for their customers to integrate with the ISV's proprietary hardware or cloud infrastructure and Docker Enterprise Edition deployments. - -You can [apply to be a publisher](https://goto.docker.com/partners) and learn more about our [Technology Partner Program](https://www.docker.com/partners/partner-program#/technology_partner). - -## What's next? - -* Learn about submitting products and content to Docker Store, see the [publishers guide](publish.md) and the [publisher FAQs](publisher_faq.md). -* Learn about using Docker Store to download content, see the [customer FAQs](customer_faq.md). diff --git a/ee/dtr/admin/configure/license-your-installation.md b/ee/dtr/admin/configure/license-your-installation.md index fe63a3e39f..03251cfaa2 100644 --- a/ee/dtr/admin/configure/license-your-installation.md +++ b/ee/dtr/admin/configure/license-your-installation.md @@ -17,8 +17,8 @@ DTR installation: ## Download your license -Go to [Docker Store](https://store.docker.com/editions/enterprise/docker-ee-trial) -and download your license. +Go to [Docker Hub](https://Hub.docker.com/editions/enterprise/docker-ee-trial) +to download a trial license. ![](../../images/license-1.png){: .with-border} diff --git a/ee/dtr/admin/configure/set-up-vulnerability-scans.md b/ee/dtr/admin/configure/set-up-vulnerability-scans.md index fdc4254652..f526503c79 100644 --- a/ee/dtr/admin/configure/set-up-vulnerability-scans.md +++ b/ee/dtr/admin/configure/set-up-vulnerability-scans.md @@ -15,7 +15,7 @@ access. Before you begin, make sure that you or your organization has purchased a DTR license that includes Docker Security Scanning, and that your Docker ID can -access and download this license from the Docker Store. +access and download this license from the Docker Hub. If you are using a license associated with an individual account, no additional action is needed. If you are using a license associated with an organization @@ -38,7 +38,7 @@ this step and proceed to [enable DTR Security Scanning](#enable-dtr-security-sca If your current DTR license doesn't include scanning, you must first download the new license. -1. Log in to the Docker Store using a Docker ID with access to the license you need. +1. Log in to the Docker Hub using a Docker ID with access to the license you need. 2. In the top right corner, click your user account icon, and select **My Content**. 3. Locate **Docker Enterprise Edition** in the content list, and click **Setup**. 4. Click **License Key** to download the license. @@ -143,12 +143,12 @@ Your choice is saved automatically. To update the CVE database for your DTR instance when it cannot contact the update server, you download and install a `.tar` file that contains the database updates. To download the file: -1. Log in to the [Docker Store](https://store.docker.com/). +1. Log in to [Docker Hub](https://hub.docker.com/). - If you are a member of an Organization managing licenses using Docker Store, + If you are a member of an Organization managing licenses using Docker Hub, make sure your account is a member of the `Owners` team. Only Owners can - view and manage licenses and other entitlements for Organizations from the - Docker Store. + view and manage licenses and other entitlements for Organizations from + Docker Hub. 2. In the top right corner, click your user account icon, and select **My Content**. 3. If necessary, select an organization account from the **Accounts** menu at the upper right. diff --git a/ee/dtr/user/manage-images/pull-and-push-images.md b/ee/dtr/user/manage-images/pull-and-push-images.md index 69ad6d5af4..fbe78854fc 100644 --- a/ee/dtr/user/manage-images/pull-and-push-images.md +++ b/ee/dtr/user/manage-images/pull-and-push-images.md @@ -82,7 +82,7 @@ pushes the image manifest and all the layers on top of the Windows base layers. The Windows base layers are not pushed to DTR. This means that: * DTR won't be able to scan those images for vulnerabilities since DTR doesn't -have access to the layers (the Windows base layers are scanned by Docker Store, +have access to the layers (the Windows base layers are scanned by Docker Hub, however). * When a user pulls a Windows image from DTR, the Windows base layers are automatically fetched from Microsoft and the other layers are fetched from DTR. diff --git a/ee/dtr/user/manage-images/sign-images/index.md b/ee/dtr/user/manage-images/sign-images/index.md index 3df69be588..c0166a9e76 100644 --- a/ee/dtr/user/manage-images/sign-images/index.md +++ b/ee/dtr/user/manage-images/sign-images/index.md @@ -39,7 +39,7 @@ To sign images in a way that UCP trusts them, you need to: * Initialize trust metadata for the repository * Delegate signing to the keys in your UCP client bundle -In this example we're going to pull an NGINX image from Docker Store, +In this example we're going to pull an NGINX image from Docker Hub, re-tag it as `dtr.example.org/dev/nginx:1`, push the image to DTR and sign it in a way that is trusted by UCP. If you manage multiple repositories, you'll have to do the same procedure for every one of them. @@ -56,11 +56,11 @@ the easiest way to do it is by pushing an image to that repository. Navigate to the **DTR web UI**, and create a repository for your image. In this example we've created the `dev/nginx` repository. -From the Docker CLI client, pull an NGINX image from Docker Store, +From the Docker CLI client, pull an NGINX image from Docker Hub, re-tag it, sign and push it to DTR. ```bash -# Pull NGINX from Docker Store +# Pull NGINX from Docker Hub docker pull nginx:latest # Re-tag NGINX diff --git a/ee/end-to-end-install.md b/ee/end-to-end-install.md index 0f4e54b6f4..4c7379146c 100644 --- a/ee/end-to-end-install.md +++ b/ee/end-to-end-install.md @@ -8,7 +8,7 @@ redirect_from: --- The best way to try Docker Enterprise Edition for yourself is to get the [30-day -trial available at the Docker Store](https://store.docker.com/search?offering=enterprise&type=edition). +trial available at the Docker hub](https://hub.docker.com/editions/enterprise/docker-ee-trial/trial). Once you get your trial license, you can install Docker EE on your Linux servers. Make sure all the hosts you want to manage with Docker @@ -60,7 +60,7 @@ license. ![UCP login page](images/try-ddc-1.png){: .with-border} -[Get a free trial license if you don't have one](https://store.docker.com/editions/enterprise/docker-ee-trial). +[Get a free trial license if you don't have one](https://hub.docker.com/editions/enterprise/docker-ee-trial). ## Step 4: Join more nodes to UCP diff --git a/ee/telemetry.md b/ee/telemetry.md index 1f1b035472..81fe6a3cf0 100644 --- a/ee/telemetry.md +++ b/ee/telemetry.md @@ -14,7 +14,7 @@ and on the rest of the EE-supported Linux distributions starting with version The telemetry plugin sends system information to Docker Inc. Docker uses this information to improve Docker EE. For details about the telemetry plugin and the types of data it collects, see the -[`telemetry` plugin documentation](https://store.docker.com/community/images/docker/telemetry). +[`telemetry` plugin documentation](https://hub.docker.com/community/images/docker/telemetry). If your Docker instance runs in an environment with no internet connectivity, the telemetry plugin does not collect or attempt to send any information to diff --git a/ee/ucp/admin/configure/integrate-with-multiple-registries.md b/ee/ucp/admin/configure/integrate-with-multiple-registries.md index bce6268652..bc6c7e9e49 100644 --- a/ee/ucp/admin/configure/integrate-with-multiple-registries.md +++ b/ee/ucp/admin/configure/integrate-with-multiple-registries.md @@ -7,7 +7,7 @@ redirect_from: --- Universal Control Plane can pull and run images from any image registry, -including Docker Trusted Registry and Docker Store. +including Docker Trusted Registry and Docker Hub. If your registry uses globally-trusted TLS certificates, everything works out of the box, and you don't need to configure anything. But if your registries diff --git a/ee/ucp/admin/configure/license-your-installation.md b/ee/ucp/admin/configure/license-your-installation.md index a94bfd5d1f..a884cced25 100644 --- a/ee/ucp/admin/configure/license-your-installation.md +++ b/ee/ucp/admin/configure/license-your-installation.md @@ -9,15 +9,15 @@ installation. Here's how to do it. ## Download your license -Go to [Docker Store](https://www.docker.com/enterprise-edition) and -download your UCP license, or get a free trial license. +Go to [Docker Hub](https://hub.docker.com/editions/enterprise/docker-ee-trial/trial) +to get a free trial license. ![](../../images/license-ucp-1.png){: .with-border} ## License your installation Once you've downloaded the license file, you can apply it to your UCP -installation. +installation. In the UCP web UI, log in with administrator credentials and navigate to the **Admin Settings** page. diff --git a/ee/ucp/admin/install/index.md b/ee/ucp/admin/install/index.md index cd7fef07ae..a049f3533d 100644 --- a/ee/ucp/admin/install/index.md +++ b/ee/ucp/admin/install/index.md @@ -100,9 +100,8 @@ To install UCP: Now that UCP is installed, you need to license it. To use UCP you are required to have a Docker EE standard or advanced subscription, or you can test the platform with a free trial license. -1. Go to the - [Docker Store](https://www.docker.com/enterprise-edition) - and buy a Docker EE standard or advanced subscription, or get a free trial license. +1. Go to [Docker Hub](https://hub.docker.com/editions/enterprise/docker-ee-trial/trial) + to get a free trial license. 2. In your browser, navigate to the UCP web UI, log in with your administrator credentials and upload your license. Navigate to the diff --git a/engine/docker-overview.md b/engine/docker-overview.md index 6fc66587c0..b929491cdb 100644 --- a/engine/docker-overview.md +++ b/engine/docker-overview.md @@ -124,8 +124,8 @@ Docker API. The Docker client can communicate with more than one daemon. ### Docker registries -A Docker _registry_ stores Docker images. Docker Hub and Docker Cloud are public -registries that anyone can use, and Docker is configured to look for images on +A Docker _registry_ stores Docker images. Docker Hub is a public +registry that anyone can use, and Docker is configured to look for images on Docker Hub by default. You can even run your own private registry. If you use Docker Datacenter (DDC), it includes Docker Trusted Registry (DTR). @@ -133,13 +133,6 @@ When you use the `docker pull` or `docker run` commands, the required images are pulled from your configured registry. When you use the `docker push` command, your image is pushed to your configured registry. -[Docker store](http://store.docker.com) allows you to buy and sell Docker images -or distribute them for free. For instance, you can buy a Docker image containing -an application or service from a software vendor and use the image to deploy -the application into your testing, staging, and production environments. You can -upgrade the application by pulling the new version of the image and redeploying -the containers. - ### Docker objects When you use Docker, you are creating and using images, containers, networks, diff --git a/get-started/index.md b/get-started/index.md index f71eeb1f8e..db952e5d5b 100644 --- a/get-started/index.md +++ b/get-started/index.md @@ -12,7 +12,6 @@ redirect_from: - /engine/getstarted/step_three/ - /engine/getstarted/step_four/ - /engine/getstarted/step_five/ -- /engine/getstarted/step_six/ - /engine/getstarted/last_page/ - /engine/getstarted-voting-app/ - /engine/getstarted-voting-app/node-setup/ @@ -46,9 +45,6 @@ redirect_from: - /mac/last_page/ - /windows/last_page/ - /linux/last_page/ -- /mac/step_six/ -- /windows/step_six/ -- /linux/step_six/ - /engine/tutorials/dockerrepos/ - /userguide/dockerrepos/ - /engine/userguide/containers/dockerimages/ @@ -64,7 +60,6 @@ teaches you how to: 3. [Scale your app to run multiple containers](part3.md) 4. [Distribute your app across a cluster](part4.md) 5. [Stack services by adding a backend database](part5.md) -6. [Deploy your app to production](part6.md) ## Docker concepts @@ -120,7 +115,7 @@ is available in [17.12 Edge (mac45)](/docker-for-mac/edge-release-notes/#docker- [17.12 Stable (mac46)](/docker-for-mac/release-notes/#docker-community-edition-17120-ce-mac46-2018-01-09){: target="_blank" class="_"} and higher. > - [Kubernetes on Docker for Windows](/docker-for-windows/kubernetes/){: target="_blank" class="_"} is available in -[18.02 Edge (win50)](/docker-for-windows/edge-release-notes/#docker-community-edition-18020-ce-rc1-win50-2018-01-26){: target="_blank" class="_"} and higher edge channels only. +[18.02 Edge (win50)](/docker-for-windows/edge-release-notes/#docker-community-edition-18020-ce-rc1-win50-2018-01-26){: target="_blank" class="_"} and higher edge channels only. [Install Docker](/engine/installation/index.md){: class="button outline-btn"}
                  diff --git a/get-started/part5.md b/get-started/part5.md index 2d09223360..63e64f22a4 100644 --- a/get-started/part5.md +++ b/get-started/part5.md @@ -286,8 +286,6 @@ Redis service. Be sure to replace `username/repo:tag` with your image details. ![Visualizer with redis screenshot](images/visualizer-with-redis.png) -[On to Part 6 >>](part6.md){: class="button outline-btn"} - ## Recap (optional) Here's [a terminal recording of what was covered on this page](https://asciinema.org/a/113840): @@ -300,3 +298,24 @@ You learned that to add more services to your stack, you insert them in your Compose file. Finally, you learned that by using a combination of placement constraints and volumes you can create a permanent home for persisting data, so that your app's data survives when the container is torn down and redeployed. + +## Congratulations! + +You've taken a full-stack, dev-to-deploy tour of the entire Docker platform. + +There is much more to the Docker platform than what was covered here, but you +have a good idea of the basics of containers, images, services, swarms, stacks, +scaling, load-balancing, volumes, and placement constraints. + +Want to go deeper? Here are some resources we recommend: + +- [Deploy your app](/ee): Deploy your app in a production environment using Docker Enterprise +- [Samples](/samples/): Our samples include multiple examples of popular software + running in containers, and some good labs that teach best practices. +- [User Guide](/engine/userguide/): The user guide has several examples that + explain networking and storage in greater depth than was covered here. +- [Admin Guide](/engine/admin/): Covers how to manage a Dockerized production + environment. +- [Training](https://training.docker.com/): Official Docker courses that offer + in-person instruction and virtual classroom environments. +- [Blog](https://blog.docker.com): Covers what's going on with Docker lately. diff --git a/get-started/part6.md b/get-started/part6.md deleted file mode 100644 index d09184395f..0000000000 --- a/get-started/part6.md +++ /dev/null @@ -1,347 +0,0 @@ ---- -title: "Get Started, Part 6: Deploy your app" -keywords: deploy, production, datacenter, cloud, aws, azure, provider, admin, enterprise -description: Deploy your app to production using Docker CE or EE. ---- -{% include_relative nav.html selected="6" %} - -## Prerequisites - -- [Install Docker](/install/index.md). -- Get [Docker Compose](/compose/overview.md) as described in [Part 3 prerequisites](/get-started/part3.md#prerequisites). -- Get [Docker Machine](/machine/overview.md) as described in [Part 4 prerequisites](/get-started/part4.md#prerequisites). -- Read the orientation in [Part 1](index.md). -- Learn how to create containers in [Part 2](part2.md). - -- Make sure you have published the `friendlyhello` image you created by -[pushing it to a registry](/get-started/part2.md#share-your-image). We use that -shared image here. - -- Be sure your image works as a deployed container. Run this command, -slotting in your info for `username`, `repo`, and `tag`: `docker run -p 80:80 -username/repo:tag`, then visit `http://localhost/`. - -- Have [the final version of `docker-compose.yml` from Part 5](/get-started/part5.md#persist-the-data) handy. - -## Introduction - -You've been editing the same Compose file for this entire tutorial. Well, we -have good news. That Compose file works just as well in production as it does -on your machine. Here, We go through some options for running your -Dockerized application. - -## Choose an option - -{% capture cloud %} -If you're okay with using Docker Community Edition in -production, you can use Docker Cloud to help manage your app on popular service providers such as Amazon Web Services, DigitalOcean, and Microsoft Azure. - -To set up and deploy: - -- Connect Docker Cloud with your preferred provider, granting Docker Cloud permission - to automatically provision and "Dockerize" VMs for you. -- Use Docker Cloud to create your computing resources and create your swarm. -- Deploy your app. - -> **Note**: We do not link into the Docker Cloud documentation here; be sure - to come back to this page after completing each step. - -### Connect Docker Cloud - -You can run Docker Cloud in [standard -mode](/docker-cloud/infrastructure/index.md) or in [Swarm -mode](/docker-cloud/cloud-swarm/index.md). - -If you are running Docker Cloud in standard mode, follow instructions below to -link your service provider to Docker Cloud. - -* [Amazon Web Services setup guide](/docker-cloud/cloud-swarm/link-aws-swarm.md){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'AWS');"} -* [DigitalOcean setup guide](/docker-cloud/infrastructure/link-do.md){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'DigitalOcean');"} -* [Microsoft Azure setup guide](/docker-cloud/infrastructure/link-azure.md){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'Azure');"} -* [Packet setup guide](/docker-cloud/infrastructure/link-packet.md){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'Packet');"} -* [SoftLayer setup guide](/docker-cloud/infrastructure/link-softlayer.md){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'SoftLayer');"} -* [Use the Docker Cloud Agent to bring your own host](/docker-cloud/infrastructure/byoh.md){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'BYOH');"} - -If you are running in Swarm mode (recommended for Amazon Web Services or -Microsoft Azure), then skip to the next section on how to [create your -swarm](#create-your-swarm). - -### Create your swarm - -Ready to create a swarm? - -* If you're on Amazon Web Services (AWS) you - can [automatically create a - swarm on AWS](/docker-cloud/cloud-swarm/create-cloud-swarm-aws/){: onclick="ga('send', 'event', 'Get Started Referral AWS', 'Cloud', 'Create AWS Swarm');"}. - -* If you are on Microsoft Azure, you can [automatically create a -swarm on Azure](/docker-cloud/cloud-swarm/create-cloud-swarm-azure/){: onclick="ga('send', 'event', 'Get Started Referral Azure', 'Cloud', 'Create Azure Swarm');"}. - -* Otherwise, [create your nodes](/docker-cloud/getting-started/your_first_node/){: onclick="ga('send', 'event', 'Get Started Referral', 'Cloud', 'Create Nodes');"} - in the Docker Cloud UI, and run the `docker swarm init` and `docker swarm join` - commands you learned in [part 4](part4.md) over [SSH via Docker - Cloud](/docker-cloud/infrastructure/ssh-into-a-node/). Finally, [enable Swarm - Mode](/docker-cloud/cloud-swarm/using-swarm-mode/) by clicking the toggle at - the top of the screen, and [register the -  swarm](/docker-cloud/cloud-swarm/register-swarms/) you just created. - -> **Note**: If you are [Using the Docker Cloud Agent to Bring your Own Host](/docker-cloud/infrastructure/byoh.md){: onclick="ga('send', 'event', 'Get -Started Referral', 'Cloud', 'BYOH');"}, this provider does not support swarm -mode. You can [register your own existing -swarms](/docker-cloud/cloud-swarm/register-swarms/) with Docker Cloud. - -### Deploy your app on a cloud provider - -1. [Connect to your swarm via Docker -Cloud](/docker-cloud/cloud-swarm/connect-to-swarm.md). There are a couple of different ways to connect: - - * From the Docker Cloud web interface in Swarm mode, select Swarms at - the top of the page, click the swarm you want to connect to, and copy-paste the given command into a command line terminal. - - ![get swarm connect command from Cloud UI](images/cloud-swarm-connect.png) - - Or ... - - * On Docker for Mac or Docker for Windows, you can [connect to your swarms directly through the desktop app menus](/docker-cloud/cloud-swarm/connect-to-swarm.md#use-docker-for-mac-or-windows-edge-to-connect-to-swarms). - - ![get swarm connect command from Cloud UI](images/cloud-swarm-connect-desktop.png) - - Either way, this opens a terminal whose context is your local machine, - but whose Docker commands are routed up to the swarm running on your - cloud service provider. You directly access both your local file system - and your remote swarm, enabling pure `docker` commands. - -2. Run `docker stack deploy -c docker-compose.yml getstartedlab` to deploy -the app on the cloud hosted swarm. - - ```shell - docker stack deploy -c docker-compose.yml getstartedlab - - Creating network getstartedlab_webnet - Creating service getstartedlab_web - Creating service getstartedlab_visualizer - Creating service getstartedlab_redis - ``` - - Your app is now running on your cloud provider. - -#### Run some swarm commands to verify the deployment - -You can use the swarm command line, as you've done already, to browse and manage -the swarm. Here are some examples that should look familiar by now: - -* Use `docker node ls` to list the nodes. - - ```shell - [getstartedlab] ~ $ docker node ls - ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS - 9442yi1zie2l34lj01frj3lsn ip-172-31-5-208.us-west-1.compute.internal Ready Active - jr02vg153pfx6jr0j66624e8a ip-172-31-6-237.us-west-1.compute.internal Ready Active - thpgwmoz3qefdvfzp7d9wzfvi ip-172-31-18-121.us-west-1.compute.internal Ready Active - n2bsny0r2b8fey6013kwnom3m * ip-172-31-20-217.us-west-1.compute.internal Ready Active Leader - ``` - -* Use `docker service ls` to list services. - - ```shell - [getstartedlab] ~/sandbox/getstart $ docker service ls - ID NAME MODE REPLICAS IMAGE PORTS - x3jyx6uukog9 dockercloud-server-proxy global 1/1 dockercloud/server-proxy *:2376->2376/tcp - ioipby1vcxzm getstartedlab_redis replicated 0/1 redis:latest *:6379->6379/tcp - u5cxv7ppv5o0 getstartedlab_visualizer replicated 0/1 dockersamples/visualizer:stable *:8080->8080/tcp - vy7n2piyqrtr getstartedlab_web replicated 5/5 sam/getstarted:part6 *:80->80/tcp - ``` - -* Use `docker service ps ` to view tasks for a service. - - ```shell - [getstartedlab] ~/sandbox/getstart $ docker service ps vy7n2piyqrtr - ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS - qrcd4a9lvjel getstartedlab_web.1 sam/getstarted:part6 ip-172-31-5-208.us-west-1.compute.internal Running Running 20 seconds ago - sknya8t4m51u getstartedlab_web.2 sam/getstarted:part6 ip-172-31-6-237.us-west-1.compute.internal Running Running 17 seconds ago - ia730lfnrslg getstartedlab_web.3 sam/getstarted:part6 ip-172-31-20-217.us-west-1.compute.internal Running Running 21 seconds ago - 1edaa97h9u4k getstartedlab_web.4 sam/getstarted:part6 ip-172-31-18-121.us-west-1.compute.internal Running Running 21 seconds ago - uh64ez6ahuew getstartedlab_web.5 sam/getstarted:part6 ip-172-31-18-121.us-west-1.compute.internal Running Running 22 seconds ago - ``` - -#### Open ports to services on cloud provider machines - -At this point, your app is deployed as a swarm on your cloud provider servers, -as evidenced by the `docker` commands you just ran. But, you still need to -open ports on your cloud servers in order to: - -* allow communication between the `redis` service and `web` service on -the worker nodes - -* allow inbound traffic to the `web` service on the worker nodes so that -Hello World and Visualizer are accessible from a web browser. - -* allow inbound SSH traffic on the server that is running the `manager` (this may be already set on your cloud provider) - -{: id="table-of-ports"} - -These are the ports you need to expose for each service: - -| Service | Type | Protocol | Port | -| :--- | :--- | :--- | :--- | -| `web` | HTTP | TCP | 80 | -| `visualizer` | HTTP | TCP | 8080 | -| `redis` | TCP | TCP | 6379 | - -Methods for doing this vary depending on your cloud provider. - -We use Amazon Web Services (AWS) as an example. - -> What about the redis service to persist data? -> -> To get the `redis` service working, you need to `ssh` into -the cloud server where the `manager` is running, and make a `data/` -directory in `/home/docker/` before you run `docker stack deploy`. -Another option is to change the data path in the `docker-stack.yml` to -a pre-existing path on the `manager` server. This example does not -include this step, so the `redis` service is not up in the example output. - -#### Example: AWS - -1. Log in to the [AWS Console](https://aws.amazon.com/){: target="_blank" -class="_"}, go to the EC2 Dashboard, and click into your **Running Instances** -to view the nodes. - -2. On the left menu, go to Network & Security > **Security Groups**. - - See the security groups related to your swarm - for `getstartedlab-Manager-`, `getstartedlab-Nodes-`, - and `getstartedlab-SwarmWide-`. - -3. Select the "Node" security group for the swarm. The group name -is something like this: `getstartedlab-NodeVpcSG-9HV9SMHDZT8C`. - -4. Add Inbound rules for the `web`, `visualizer`, and `redis` -services, setting the Type, Protocol and Port for each as shown in the -[table above](#table-of-ports), and click **Save** to apply the rules. - - ![open web service port](images/cloud-aws-web-port-open.png) - - > **Tip**: When you save the new rules, HTTP and TCP - ports are auto-created for both IPv4 and IPv6 style addresses. - - ![security groups rules](images/cloud-aws-web-and-visualizer-ports.png) - -5. Go to the list of **Running Instances**, get the public DNS name for -one of the workers, and paste it into the address bar of your web browser. - - ![running instances](images/cloud-aws-running-instances.png) - - Just as in the previous parts of the tutorial, the Hello World app - displays on port `80`, and the Visualizer displays on port `8080`. - - ![Hello World in browser on cloud server](images/cloud-app-in-browser.png) - - ![Visualizer on cloud server](images/cloud-visualizer.png) - -### Iteration and cleanup - -From here you can do everything you learned about in previous parts of the -tutorial. - -* Scale the app by changing the `docker-compose.yml` file and redeploy -on-the-fly with the `docker stack deploy` command. - -* Change the app behavior by editing code, then rebuild, and push the new image. -(To do this, follow the same steps you took earlier to [build the -app](part2.md#build-the-app) and [publish the -image](part2.md#publish-the-image)). - -* You can tear down the stack with `docker stack rm`. For example: - - ``` - docker stack rm getstartedlab - ``` - -Unlike the scenario where you were running the swarm on local Docker machine -VMs, your swarm and any apps deployed on it continue to run on cloud -servers regardless of whether you shut down your local host. - -{% endcapture %} -{% capture enterpriseboilerplate %} -Customers of Docker Enterprise Edition run a stable, commercially-supported -version of Docker Engine, and as an add-on they get our first-class management -software, Docker Datacenter. You can manage every aspect of your application -via UI using Universal Control Plane, run a private image registry with Docker -Trusted Registry, integrate with your LDAP provider, sign production images with -Docker Content Trust, and many other features. - -[Take a tour of Docker Enterprise Edition](https://www.docker.com/enterprise-edition){: class="button outline-btn" onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'Take tour');"} -{% endcapture %} -{% capture enterprisedeployapp %} -Once you're all set up and Datacenter is running, you can [deploy your Compose -file from directly within the UI](/datacenter/ucp/2.1/guides/user/services/){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'Deploy app in UI');"}. - -![Deploy an app on DDC](/datacenter/ucp/2.1/guides/images/deploy-app-ui-1.png) - -After that, you can see it running, and can change any aspect of the application -you choose, or even edit the Compose file itself. - -![Managing app on DDC](/datacenter/ucp/2.1/guides/images/deployed_visualizer.png) -{% endcapture %} -{% capture enterprisecloud %} -{{ enterpriseboilerplate }} - -The bad news is: the only cloud providers with official Docker -Enterprise editions are Amazon Web Services and Microsoft Azure. - -The good news is: there are one-click templates to quickly deploy Docker -Enterprise on each of these providers: - -* [Docker Enterprise for AWS](https://store.docker.com/editions/enterprise/docker-ee-aws?tab=description){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'EE for AWS');"} -* [Docker Enterprise for Azure](https://store.docker.com/editions/enterprise/docker-ee-azure?tab=description){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'EE for Azure');"} - -> **Note**: Having trouble with these? View [our setup guide for AWS](/datacenter/install/aws/){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'AWS setup guide');"}. -> You can also [view the WIP guide for Microsoft Azure](https://github.com/docker/docker.github.io/pull/2796){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'Azure setup guide');"}. - -{{ enterprisedeployapp }} -{% endcapture %} -{% capture enterpriseonprem %} -{{ enterpriseboilerplate }} - -Bringing your own server to Docker Enterprise and setting up Docker Datacenter -essentially involves two steps: - -1. [Get Docker Enterprise Edition for your server's OS from Docker Store](https://store.docker.com/search?offering=enterprise&type=edition){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'Get Docker EE for your OS');"}. -2. Follow the [instructions to install Datacenter on your own host](/datacenter/install/linux/){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'BYOH setup guide');"}. - -> **Note**: Running Windows containers? View our [Windows Server setup guide](/install/windows/docker-ee.md){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'Windows Server setup guide');"}. - -{{ enterprisedeployapp }} -{% endcapture %} - - -
                  -
                  {{ cloud }}
                  -
                  {{ enterprisecloud }}
                  -
                  {{ enterpriseonprem }}
                  -
                  - -## Congratulations! - -You've taken a full-stack, dev-to-deploy tour of the entire Docker platform. - -There is much more to the Docker platform than what was covered here, but you -have a good idea of the basics of containers, images, services, swarms, stacks, -scaling, load-balancing, volumes, and placement constraints. - -Want to go deeper? Here are some resources we recommend: - -- [Samples](/samples/): Our samples include multiple examples of popular software - running in containers, and some good labs that teach best practices. -- [User Guide](/engine/userguide/): The user guide has several examples that - explain networking and storage in greater depth than was covered here. -- [Admin Guide](/engine/admin/): Covers how to manage a Dockerized production - environment. -- [Training](https://training.docker.com/): Official Docker courses that offer - in-person instruction and virtual classroom environments. -- [Blog](https://blog.docker.com): Covers what's going on with Docker lately. diff --git a/install/index.md b/install/index.md index 23456bc4c3..d9be2836fc 100644 --- a/install/index.md +++ b/install/index.md @@ -48,7 +48,7 @@ place as needed to address bug fixes during its support cycle. Docker CE binaries for a release are available on [download.docker.com](https://download.docker.com/) as packages for the supported operating systems. Docker EE binaries are -available on the [Docker Store](https://store.docker.com/) for the supported operating systems. The +available on the [Docker Hub](https://hub.docker.com/) for the supported operating systems. The release channels are available for each of the year-month releases and allow users to "pin" on a year-month release of choice. The release channel also receives patch releases when they become available. diff --git a/install/linux/docker-ee/centos.md b/install/linux/docker-ee/centos.md index bd4b6050b0..70e2b010d6 100644 --- a/install/linux/docker-ee/centos.md +++ b/install/linux/docker-ee/centos.md @@ -24,7 +24,7 @@ that require action are explained below. - Use {{ linux-dist-cap }} 64-bit 7.1 and higher on `x86_64`. - Use storage driver `overlay2` or `devicemapper` (`direct-lvm` mode in production). -- Find the URL for your Docker EE repo at [Docker Store](https://store.docker.com/my-content){: target="_blank" class="_" }. +- Find the URL for your Docker EE repo at [Docker Hub](https://hub.docker.com/my-content){: target="_blank" class="_" }. - Uninstall old versions of Docker. - Remove old Docker repos from `/etc/yum.repos.d/`. diff --git a/install/linux/docker-ee/oracle.md b/install/linux/docker-ee/oracle.md index 684685638c..1f04060ce1 100644 --- a/install/linux/docker-ee/oracle.md +++ b/install/linux/docker-ee/oracle.md @@ -24,7 +24,7 @@ This section lists what you need to consider before installing Docker EE. Items - Use {{ linux-dist-cap }} 64-bit 7.3 or higher on RHCK 3.10.0-514 or higher. - Use the `devicemapper` storage driver only (`direct-lvm` mode in production). -- Find the URL for your Docker EE repo at [Docker Store](https://store.docker.com/my-content){: target="_blank" class="_" }. +- Find the URL for your Docker EE repo at [Docker Hub](https://hub.docker.com/my-content){: target="_blank" class="_" }. - Uninstall old versions of Docker. - Remove old Docker repos from `/etc/yum.repos.d/`. - Disable SELinux if installing or upgrading Docker EE 17.06.1 or newer. diff --git a/install/linux/docker-ee/rhel.md b/install/linux/docker-ee/rhel.md index c96a9c2e31..c5339cac05 100644 --- a/install/linux/docker-ee/rhel.md +++ b/install/linux/docker-ee/rhel.md @@ -25,7 +25,7 @@ This section lists what you need to consider before installing Docker EE. Items - Use {{ linux-dist-cap }} 64-bit 7.1 and higher on `x86_64`, `s390x`, or `ppc64le` (not ppc64). - Use storage driver `overlay2` or `devicemapper` (`direct-lvm` mode in production). -- Find the URL for your Docker EE repo at [Docker Store](https://store.docker.com/my-content){: target="_blank" class="_" }. +- Find the URL for your Docker EE repo at [Docker Hub](https://hub.docker.com/my-content){: target="_blank" class="_" }. - Uninstall old versions of Docker. - Remove old Docker repos from `/etc/yum.repos.d/`. - Disable SELinux on `s390x` (IBM Z) systems before install/upgrade. diff --git a/install/linux/docker-ee/suse.md b/install/linux/docker-ee/suse.md index ecc08544e9..346b311978 100644 --- a/install/linux/docker-ee/suse.md +++ b/install/linux/docker-ee/suse.md @@ -22,7 +22,7 @@ repository URL associated with your trial or subscription. These instructions work for Docker EE for SLES and for Docker EE for Linux, which includes access to Docker EE for all Linux distributions. To get this information: -- Go to [https://store.docker.com/my-content](https://store.docker.com/my-content). +- Go to [https://hub.docker.com/my-content](https://hub.docker.com/my-content). - Each subscription or trial you have access to is listed. Click the **Setup** button for **Docker Enterprise Edition for SUSE Linux Enterprise Server**. - Copy the URL from the field labeled @@ -181,7 +181,7 @@ Engine, UCP, and DTR). ``` Where: - * `DOCKER-EE-URL` is the URL from your Docker Store subscription. + * `DOCKER-EE-URL` is the URL from your Docker Hub subscription. * `ARCHITECTURE` is `x86_64`, `s390x`, or `ppc64le`. * `VERSION` is `18.03` or `17.06`. diff --git a/install/linux/docker-ee/ubuntu.md b/install/linux/docker-ee/ubuntu.md index ba29e7c1cf..ad66719488 100644 --- a/install/linux/docker-ee/ubuntu.md +++ b/install/linux/docker-ee/ubuntu.md @@ -25,7 +25,7 @@ repository URL associated with your trial or subscription. These instructions work for Docker EE for Ubuntu and for Docker EE for Linux, which includes access to Docker EE for all Linux distributions. To get this information: -- Go to [https://store.docker.com/my-content](https://store.docker.com/my-content). +- Go to [https://hub.docker.com/my-content](https://hub.docker.com/my-content). - Each subscription or trial you have access to is listed. Click the **Setup** button for **Docker Enterprise Edition for Ubuntu**. - Copy the URL from the field labeled diff --git a/js/my_first_tour.js b/js/my_first_tour.js index 9fe29900ca..ad9f292a10 100644 --- a/js/my_first_tour.js +++ b/js/my_first_tour.js @@ -63,7 +63,7 @@ var tour = { }, { title: "Product Manuals", - content: "Learn about Docker products and tools, such as Docker Cloud, UCP, Docker for Mac, or Docker for Windows.", + content: "Learn about Docker products and tools, such as Docker Hub, UCP, Docker for Mac, or Docker for Windows.", target: "top-nav", placement: "bottom", width: "570px", diff --git a/machine/examples/aws.md b/machine/examples/aws.md index 1fb714c4ae..aba7027053 100644 --- a/machine/examples/aws.md +++ b/machine/examples/aws.md @@ -4,23 +4,6 @@ keywords: docker, machine, cloud, aws title: Amazon Web Services (AWS) EC2 example --- -> Try out Docker Cloud! -> -> We suggest using [Docker Cloud](https://cloud.docker.com/) as the -most up-to-date way to run Docker on your cloud providers. To get started, see -[Docker Cloud docs home page](/docker-cloud/index.md), [Docker Cloud Settings -and Docker ID](/docker-cloud/dockerid.md), [Swarms in Docker Cloud -(Beta)](/docker-cloud/cloud-swarm/index.md), and [Link Amazon Web Services to -Docker Cloud](/docker-cloud/cloud-swarm/link-aws-swarm.md). If you are running -Edge channel Docker for Mac or Windows, you can access your Docker Cloud account -from those Docker desktop applications. See Docker Cloud (Edge feature) on -[Mac](/docker-for-mac/index.md#docker-cloud-edge-feature) or -[Windows](/docker-for-windows/index.md#docker-cloud-edge-feature). -> -> Docker Machine still works as described here, but Docker Cloud -supercedes Machine for this purpose. -{: .important} - Follow along with this example to create a Dockerized [Amazon Web Services (AWS)](https://aws.amazon.com/) EC2 instance. ### Step 1. Sign up for AWS and configure credentials diff --git a/machine/examples/index.md b/machine/examples/index.md index 8ba93f3ada..7d54bebcc0 100644 --- a/machine/examples/index.md +++ b/machine/examples/index.md @@ -4,21 +4,5 @@ keywords: docker, machine, amazonec2, azure, digitalocean, google, openstack, ra title: Learn by example --- -> Try out Docker Cloud! -> -> We suggest using [Docker Cloud](https://cloud.docker.com/) as the -most up-to-date way to run Docker on your cloud providers. To get started, see -[Docker Cloud docs home page](/docker-cloud/index.md), [Docker Cloud Settings -and Docker ID](/docker-cloud/dockerid.md) and [Swarms in Docker Cloud -(Beta)](/docker-cloud/cloud-swarm/index.md). If you are running Edge channel -Docker for Mac or Windows, you can access your Docker Cloud account from those -Docker desktop applications. See Docker Cloud (Edge feature) on -[Mac](/docker-for-mac/index.md#docker-cloud-edge-feature) or -[Windows](/docker-for-windows/index.md#docker-cloud-edge-feature). -> -> Docker Machine still works as described here, but Docker Cloud -supercedes Machine for this purpose. -{: .important} - - [Digital Ocean Example](ocean.md) - [AWS Example](aws.md) diff --git a/machine/examples/ocean.md b/machine/examples/ocean.md index 36342cd1e0..1fd0f0663c 100644 --- a/machine/examples/ocean.md +++ b/machine/examples/ocean.md @@ -4,22 +4,6 @@ keywords: docker, machine, cloud, digital ocean title: Digital Ocean example --- -> Try out Docker Cloud! -> -> We suggest using [Docker Cloud](https://cloud.docker.com/) as the -most up-to-date way to run Docker on your cloud providers. To get started, see -[Docker Cloud docs home page](/docker-cloud/index.md), [Docker Cloud Settings -and Docker ID](/docker-cloud/dockerid.md), and [Link a DigitalOcean account to -Docker Cloud](/docker-cloud/infrastructure/link-do.md). If you are running Edge -channel Docker for Mac or Windows, you can access your Docker Cloud account from -those Docker desktop applications. See Docker Cloud (Edge feature) on -[Mac](/docker-for-mac/index.md#docker-cloud-edge-feature) or -[Windows](/docker-for-windows/index.md#docker-cloud-edge-feature). -> -> Docker Machine still works as described below, but Docker Cloud -supercedes Machine for this purpose. -{: .important} - Follow along with this example to create a Dockerized [Digital Ocean](https://digitalocean.com) Droplet (cloud host). ### Step 1. Create a Digital Ocean account diff --git a/machine/get-started-cloud.md b/machine/get-started-cloud.md index c6b4c79d6f..cd6e185e87 100644 --- a/machine/get-started-cloud.md +++ b/machine/get-started-cloud.md @@ -4,21 +4,6 @@ keywords: docker, machine, amazonec2, azure, digitalocean, google, openstack, ra title: Use Docker Machine to provision hosts on cloud providers --- -> Try out Docker Cloud! -> -> We suggest using [Docker Cloud](https://cloud.docker.com/) as the -most up-to-date way to run Docker on your cloud providers. To get started, see -[Docker Cloud docs home page](/docker-cloud/index.md), [Docker Cloud Settings -and Docker ID](/docker-cloud/dockerid.md), and [Swarms in Docker Cloud -(Beta)](/docker-cloud/cloud-swarm/index.md). If you are running Edge channel -Docker for Mac or Windows, you can access your Docker Cloud account from those -Docker desktop applications. See Docker Cloud (Edge feature) on -[Mac](/docker-for-mac/index.md#docker-cloud-edge-feature) or -[Windows](/docker-for-windows/index.md#docker-cloud-edge-feature). -> -> Docker Machine still works as described here, but Docker Cloud supercedes Machine for this purpose. -{: .important} - Docker Machine driver plugins are available for many cloud platforms, so you can use Machine to provision cloud hosts. When you use Docker Machine for provisioning, you create cloud hosts with Docker Engine installed on them. diff --git a/machine/get-started.md b/machine/get-started.md index 4b44047f98..847669b477 100644 --- a/machine/get-started.md +++ b/machine/get-started.md @@ -292,9 +292,7 @@ For machines other than `default`, and commands other than those listed above, y You might want to use the current shell to connect to a different Docker Engine. This would be the case if, for example, you are [running Docker for Mac concurrent with Docker Toolbox](/docker-for-mac/docker-toolbox.md) and want to -talk to two different Docker Engines, or running swarms on Docker Cloud and want -to [switch between managing the swarm and using Docker -hosts](/docker-cloud/cloud-swarm/connect-to-swarm.md#switch-between-your-swarm-and-docker-hosts-in-the-same-shell). +talk to two different Docker Engines. In both scenarios, you have the option to switch the environment for the current shell to talk to different Docker engines. @@ -344,9 +342,6 @@ shell to talk to different Docker engines. If you are running Docker for Mac, you can run Docker commands to talk to the Docker Engine installed with that app. - If you are running swarms on Docker Cloud, you can re-run the `export` - command you used to connect to the swarm. - Since [Docker for Windows is incompatible with Toolbox](/docker-for-windows/install.md#what-to-know-before-you-install), this scenario isn't applicable because Docker for Windows uses the Docker diff --git a/network/index.md b/network/index.md index 9b832c295b..be083b2652 100644 --- a/network/index.md +++ b/network/index.md @@ -75,7 +75,7 @@ exist by default, and provide core networking functionality: - [Network plugins](/engine/extend/plugins_services/): You can install and use third-party network plugins with Docker. These plugins are available from - [Docker Store](https://store.docker.com/search?category=network&q=&type=plugin) + [Docker Hub](https://hub.docker.com/search?category=network&q=&type=plugin) or from third-party vendors. See the vendor's documentation for installing and using a given network plugin. @@ -118,4 +118,3 @@ understanding using the following tutorials: - [Host networking tutorial](network-tutorial-host.md) - [Overlay networking tutorial](network-tutorial-overlay.md) - [Macvlan networking tutorial](network-tutorial-macvlan.md) - diff --git a/reference.md b/reference.md index 09887390db..262229b1a7 100644 --- a/reference.md +++ b/reference.md @@ -12,7 +12,6 @@ various APIs, CLIs, and file formats. |:--------------------------------------------------------------------|:----------------------------------------------------------------| | [Dockerfile](/engine/reference/builder/) | Defines the contents and startup behavior of a single container | | [Compose file](/compose/compose-file/) | Defines a multi-container application | -| [Docker Cloud Stack file](/docker-cloud/apps/stack-yaml-reference/) | Defines a multi-container application for Docker Cloud | ## Command-line interfaces (CLIs) @@ -29,7 +28,6 @@ various APIs, CLIs, and file formats. | API | Description | |:------------------------------------------------------|:---------------------------------------------------------------------------------------| -| [Cloud API](/apidocs/docker-cloud/) | Enables programmatic management of your Docker application running on a cloud provider | | [Engine API](/engine/api/) | The main API for Docker, provides programmatic access to a [daemon](/glossary/#daemon) | | [Registry API](/registry/spec/api/) | Facilitates distribution of images to the engine | | [DTR API](/reference/dtr/{{ site.dtr_version }}/api/) | Provides programmatic access to a Docker Trusted Registry deployment | diff --git a/test.md b/test.md index 99d7ce5840..7953af37a9 100644 --- a/test.md +++ b/test.md @@ -162,7 +162,7 @@ might be interesting. You can use them with Markdown or HTML images. You can add a link to a YouTube video like this: -[![Deploying Swarms on Microsoft Azure with Docker Cloud](/docker-cloud/cloud-swarm/images/video-azure-docker-cloud.png)](https://www.youtube.com/watch?v=LlpyiGAVBVg "Deploying Swarms on Microsoft Azure with Docker Cloud"){:target="_blank" class="_"} +[Docker 101: Introduction to Docker](https://www.youtube.com/watch?v=V9IJj4MzZBc "Docker 101: Introduction to Docker"){:target="_blank" class="_"} To make the `.png` shown above, first take a screen snap of the YouTube video you want to use, then use a graphics app to overlay a play button onto the @@ -479,7 +479,7 @@ To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: - https://cloud.docker.com/ + https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/engine/userguide/ @@ -752,7 +752,7 @@ syntax for comments in JSON! ### Markdown ```md -[![Deploy to Docker Cloud](https://files.cloud.docker.com/images/deploy-to-dockercloud.svg)](https://cloud.docker.com/stack/deploy/?repo=) +# Hello ``` ### ini