diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2bc191cfe1..d9c125d19f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -121,8 +121,5 @@ know. ## Style guide -If you have questions about how to write for Docker's documentation, have a look -at the [style guide](/opensource/doc-style/). The style -guide provides guidance about grammar, syntax, formatting, styling, language, or -tone. If something isn't clear in the guide, submit an issue to let us -know or submit a pull request to help us improve it. +Docker does not currently maintain a style guide. Use your best judgment, and +try to follow the example set by the existing documentation. diff --git a/README.md b/README.md index bf6e17e9cc..0cda197bd6 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,8 @@ 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://docs.docker.com/docker-hub/). + The following examples use the `latest` tag: - Run a single container: @@ -197,7 +198,7 @@ Either way, you can now access the docs at port 4000 on your Docker host. - `/_data/toc.yaml` defines the left-hand navigation for the docs - `/js/menu.js` defines most of the docs-specific JS such as TOC generation and menu syncing -- `/css/documentation.css` defines the docs-specific style rules +- `/css/style.scss` defines the docs-specific style rules - `/_layouts/docs.html` is the HTML template file, which defines the header and footer, and includes all the JS/CSS that serves the docs content ## Relative linking for GitHub viewing @@ -318,7 +319,7 @@ still optimizes the bandwidth 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/_config.yml b/_config.yml index d10163795a..5cd0eb10b6 100644 --- a/_config.yml +++ b/_config.yml @@ -22,8 +22,8 @@ exclude: ["_scripts", "apidocs/layouts", "Gemfile", "hooks"] latest_stable_docker_engine_api_version: "1.39" docker_ce_stable_version: "18.09" docker_ce_edge_version: "18.09" -docker_ee_version: "2.1" -compose_version: "1.23.1" +docker_ee_version: "18.09" +compose_version: "1.23.2" machine_version: "0.16.0" distribution_version: "2.6" dtr_version: "2.6" @@ -95,7 +95,7 @@ defaults: - scope: path: "install" values: - win_latest_build: "docker-17.06.2-ee-17" + win_latest_build: "docker-18.09.0" - scope: path: "datacenter" values: @@ -148,14 +148,14 @@ defaults: values: ucp_org: "docker" ucp_repo: "ucp" - ucp_version: "3.1.0" + ucp_version: "3.1.1" - scope: # This is a bit of a hack for the get-support.md topic. path: "ee" values: ucp_org: "docker" ucp_repo: "ucp" dtr_repo: "dtr" - ucp_version: "3.1.0" + ucp_version: "3.1.1" dtr_version: "2.6.0" dtr_latest_image: "docker/dtr:2.6.0" - scope: @@ -164,7 +164,7 @@ defaults: hide_from_sitemap: true ucp_org: "docker" ucp_repo: "ucp" - ucp_version: "3.0.6" + ucp_version: "3.0.7" - scope: path: "datacenter/ucp/2.2" values: 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/ddc_offline_files_2.yaml b/_data/ddc_offline_files_2.yaml index 8032b1e1ce..dc493531a0 100644 --- a/_data/ddc_offline_files_2.yaml +++ b/_data/ddc_offline_files_2.yaml @@ -6,6 +6,14 @@ - product: "ucp" version: "3.1" tar-files: + - description: "3.1.1 Linux" + url: https://packages.docker.com/caas/ucp_images_3.1.1.tar.gz + - description: "3.1.1 Windows Server 2016 LTSC" + url: https://packages.docker.com/caas/ucp_images_win_2016_3.1.1.tar.gz + - description: "3.1.1 Windows Server 1709" + url: https://packages.docker.com/caas/ucp_images_win_1709_3.1.1.tar.gz + - description: "3.1.1 Windows Server 1803" + url: https://packages.docker.com/caas/ucp_images_win_1803_3.1.1.tar.gz - description: "3.1.0 Linux" url: https://packages.docker.com/caas/ucp_images_3.1.0.tar.gz - description: "3.1.0 Windows Server 2016 LTSC" @@ -17,6 +25,14 @@ - product: "ucp" version: "3.0" tar-files: + - description: "3.0.7 Linux" + url: https://packages.docker.com/caas/ucp_images_3.0.7.tar.gz + - description: "3.0.7 Windows Server 2016 LTSC" + url: https://packages.docker.com/caas/ucp_images_win_2016_3.0.7.tar.gz + - description: "3.0.7 Windows Server 1709" + url: https://packages.docker.com/caas/ucp_images_win_1709_3.0.7.tar.gz + - description: "3.0.7 Windows Server 1803" + url: https://packages.docker.com/caas/ucp_images_win_1803_3.0.7.tar.gz - description: "3.0.6 Linux" url: https://packages.docker.com/caas/ucp_images_3.0.6.tar.gz - description: "3.0.6 IBM Z" 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..3d6af48cf6 100644 --- a/_data/redirects.csv +++ b/_data/redirects.csv @@ -48,8 +48,9 @@ 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 /engine/examples/mongodb/,/samples/library/mongo/ + diff --git a/_data/toc.yaml b/_data/toc.yaml index e1d38cd791..c9d5938598 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -487,6 +487,8 @@ guides: title: NIST SP 800-53 - path: /compliance/nist/800_190/ title: NIST SP 800-190 + - path: /compliance/nist/fips140_2/ + title: FIPS 140-2 - path: /compliance/nist/nistir_8176/ title: NISTIR 8176 - path: /compliance/nist/itl_october2017/ @@ -1413,9 +1415,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: @@ -2660,10 +2659,14 @@ manuals: section: - path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/ title: Overview - - path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/tls/ - title: Deploy caches with TLS - - path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/chaining/ - title: Chain multiple caches + - path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/strategy/ + title: Cache deployment strategy + - path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/simple/ + title: Deploy a DTR cache + - path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/high-availability/ + title: Configure caches for high availability + - path: /datacenter/dtr/2.5/guides/admin/configure/deploy-caches/configuration-reference/ + title: Cache configuration reference - path: /datacenter/dtr/2.5/guides/admin/configure/garbage-collection/ title: Garbage collection - path: /datacenter/dtr/2.5/guides/admin/configure/use-a-web-proxy/ @@ -3376,179 +3379,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/ @@ -3803,48 +3633,50 @@ 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 - - path: /docker-hub/accounts/ - title: Use Docker Hub with Docker ID - - path: /docker-hub/orgs/ - title: Teams & organizations + title: Quickstart - path: /docker-hub/repos/ - title: Repositories on Docker Hub - - path: /docker-hub/builds/ - title: Automated builds + title: Repositories + - path: /docker-hub/official_images/ + title: Official Images + - path: /docker-hub/orgs/ + title: Teams & Organizations - 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 - - path: /docker-hub/official_repos/ - title: Official repositories on Docker Hub + title: Webhooks + - path: /docker-hub/slack_integration/ + title: Slack Integration + - path: /docker-hub/upgrade/ + title: Upgrading your plan + - sectiontitle: Automated Builds + section: + - path: /docker-hub/builds/ + title: Set up Automated builds + - path: /docker-hub/builds/automated-testing/ + title: Testing in Automated Builds + - path: /docker-hub/builds/advanced/ + title: Advanced Automated Builds + - path: /docker-hub/builds/link-source/ + title: Link to GitHub and BitBucket + - path: /docker-hub/builds/classic/ + title: Classic Automated Builds + - sectiontitle: Publisher & Certified Content + section: + - path: /docker-hub/publish/ + title: Overview + - path: /docker-hub/publish/customer_faq/ + title: User FAQs + - path: /docker-hub/publish/publisher_faq/ + title: Publisher FAQs + - 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 @@ -3964,9 +3796,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/api-version-matrix.md b/_includes/api-version-matrix.md index 89adc111a8..28cde9838f 100644 --- a/_includes/api-version-matrix.md +++ b/_includes/api-version-matrix.md @@ -1,6 +1,8 @@ | Docker version | Maximum API version | Change log | |:---------------|:---------------------------|:---------------------------------------------------------| +| 18.09 | [1.39](/engine/api/v1.39/) | [changes](/engine/api/version-history/#v139-api-changes) | +| 18.06 | [1.38](/engine/api/v1.38/) | [changes](/engine/api/version-history/#v138-api-changes) | | 18.05 | [1.37](/engine/api/v1.37/) | [changes](/engine/api/version-history/#v137-api-changes) | | 18.04 | [1.37](/engine/api/v1.37/) | [changes](/engine/api/version-history/#v137-api-changes) | | 18.03 | [1.37](/engine/api/v1.37/) | [changes](/engine/api/version-history/#v137-api-changes) | 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-add-keys-to-agent.md b/_includes/content/ssh/ssh-add-keys-to-agent.md index 82f26bea8a..5837d5906f 100644 --- a/_includes/content/ssh/ssh-add-keys-to-agent.md +++ b/_includes/content/ssh/ssh-add-keys-to-agent.md @@ -55,7 +55,7 @@ passphrases in your keychain. 2. Add your SSH private key to the ssh-agent. ```none - $ ssh-add -K ~/.ssh/id_rsa + $ ssh-add ~/.ssh/id_rsa ``` If you created your key with a different name or have an existing key @@ -81,7 +81,7 @@ passphrases in your keychain. 2. Add your SSH private key to the ssh-agent. ```none - $ ssh-add -K ~/.ssh/id_rsa + $ ssh-add ~/.ssh/id_rsa ``` If you created your key with a different name or have an existing key 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 3603135a98..695196bfc6 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..b6aaf94384 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/_includes/install-script.md b/_includes/install-script.md index 08e24fbf63..80014f274d 100644 --- a/_includes/install-script.md +++ b/_includes/install-script.md @@ -55,8 +55,8 @@ Remember to log out and back in for this to take effect! > **Warning**: > -> Adding a user to the "docker" group grants the ability to run containers -> which can be used to obtain root privileges on the docker host. Refer to +> Adding a user to the "docker" group grants them the ability to run containers +> which can be used to obtain root privileges on the Docker host. Refer to > [Docker Daemon Attack Surface](https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface) > for more information. {:.warning} diff --git a/_includes/kubernetes-mac-win.md b/_includes/kubernetes-mac-win.md index e4b895d95e..90f420dd37 100644 --- a/_includes/kubernetes-mac-win.md +++ b/_includes/kubernetes-mac-win.md @@ -13,7 +13,7 @@ Usage: {% include kubernetes-mac-win.md platform="mac" %} {% assign product = "Docker for Mac" %} {% capture min-version %}{{ product }} **17.12 CE Edge**{% endcapture %} - + {% capture version-caveat %} Kubernetes is available in {{ min-version }} and higher, and **18.06 Stable** and higher {% endcapture%} @@ -88,7 +88,7 @@ Run `kubectl get services -n my-app` to see only the services deployed in the ### Override the default orchestrator While testing Kubernetes, you may want to deploy some workloads in swarm mode. -Use the `DOCKER_ORCHESTRATOR` variable to override the default orchestrator for +Use the `DOCKER_STACK_ORCHESTRATOR` variable to override the default orchestrator for a given terminal session or a single Docker command. This variable can be unset (the default, in which case Kubernetes is the orchestrator) or set to `swarm` or `kubernetes`. The following command overrides the orchestrator for a single @@ -96,17 +96,24 @@ deployment, by setting the variable{% if platform == "mac"" %} at the start of the command itself. ```bash -DOCKER_ORCHESTRATOR=swarm docker stack deploy --compose-file /path/to/docker-compose.yml mystack +DOCKER_STACK_ORCHESTRATOR=swarm docker stack deploy --compose-file /path/to/docker-compose.yml mystack ```{% elsif platform == "windows" %} before running the command. ```shell -set DOCKER_ORCHESTRATOR=swarm +set DOCKER_STACK_ORCHESTRATOR=swarm docker stack deploy --compose-file /path/to/docker-compose.yml mystack ``` {% endif %} +Alternatively, the `--orchestrator` flag may be set to `swarm` or `kubernetes` +when deploying to override the default orchestrator for that deployment. + +```bash +docker stack deploy --orchestrator swarm --compose-file /path/to/docker-compose.yml mystack +``` + > **Note**: Deploying the same app in Kubernetes and swarm mode may lead to > conflicts with ports and service names. 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/_scripts/make-archive-branch.sh b/_scripts/make-archive-branch.sh index 31d666f5b3..7ab787292e 100755 --- a/_scripts/make-archive-branch.sh +++ b/_scripts/make-archive-branch.sh @@ -85,9 +85,7 @@ bash _scripts/fetch-upstream-resources.sh -l # Currently, this is: # /samples/ # /docker-id/ -# /docker-cloud/ # /docker-hub/ -# /docker-store/ # These rely on _layout/archive-redirect.html only_live_contents=("samples" "docker-id" "docker-cloud" "docker-hub" "docker-store") @@ -145,5 +143,3 @@ echo " and get back to master, run the following:" echo echo " git reset --hard; git clean -fd; git checkout master; git branch -D v$version" echo - - diff --git a/_scss/_layout.scss b/_scss/_layout.scss index 5515605c20..b1894da2d6 100755 --- a/_scss/_layout.scss +++ b/_scss/_layout.scss @@ -185,6 +185,12 @@ section.section { padding-top: 20px; padding-bottom: 20px; } +/***Swagger***/ + +.swagger-section { + padding-top: 2rem; +} + /* * * global footer *********************************************************************** diff --git a/_scss/_navigation.scss b/_scss/_navigation.scss index 3047e1a4e1..b2dceace9a 100755 --- a/_scss/_navigation.scss +++ b/_scss/_navigation.scss @@ -155,6 +155,12 @@ padding: 0 20px 20px 0; } +/* pointer for collapsed sidebar list items */ + +.collapsed +{ + cursor:pointer; +} /* * @@ -372,3 +378,5 @@ input:checked+.slider:before { float: left; margin: 2px 0 0; } + + 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/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 0777feb23f..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 assigned 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 9b9d3d8e4c..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 occurrence 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 occurrence 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 037366cbed..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 chainability - 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 chainability - 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 43d26f52a7..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 beginning 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 environments 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 d3476b9135..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 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
          - -
          -
          -
          -
          - - 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 ce7a583627..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 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)
          - -
          -
          -
          -
          - - diff --git a/apidocs/docker-cloud/includes/dockercloud-events.html b/apidocs/docker-cloud/includes/dockercloud-events.html deleted file mode 100644 index a93d950059..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. 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
          - -
          -
          -
          -
          - - 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 cc908bc719..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 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
          - -
          -
          -
          -
          - - 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 10e6f3d483..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 occurrence 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 be239550b4..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 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/compose/aspnet-mssql-compose.md b/compose/aspnet-mssql-compose.md index ce60a4db28..f48afbef82 100644 --- a/compose/aspnet-mssql-compose.md +++ b/compose/aspnet-mssql-compose.md @@ -104,7 +104,7 @@ configure this app to use our SQL Server database, and then create a depends_on: - db db: - image: "microsoft/mssql-server-linux" + image: "mcr.microsoft.com/mssql/server" environment: SA_PASSWORD: "Your_password123" ACCEPT_EULA: "Y" @@ -195,6 +195,6 @@ to try out .NET Framework and more SQL Server tutorials. ## Next steps - [Build your app using SQL Server](https://www.microsoft.com/en-us/sql-server/developer-get-started/?utm_medium=Referral&utm_source=docs.docker.com) -- [SQL Server on Docker Hub](https://hub.docker.com/r/microsoft/mssql-server-linux/) +- [SQL Server on Docker Hub](https://hub.docker.com/r/microsoft/mssql-server/) - [ASP.NET Core](https://www.asp.net/core) - [ASP.NET Core Docker image](https://hub.docker.com/r/microsoft/aspnetcore/) on DockerHub diff --git a/compose/compose-file/compose-file-v2.md b/compose/compose-file/compose-file-v2.md index 4585410da3..cf59a2a446 100644 --- a/compose/compose-file/compose-file-v2.md +++ b/compose/compose-file/compose-file-v2.md @@ -1420,8 +1420,10 @@ If set to `true`, specifies that this volume has been created outside of Compose. `docker-compose up` does not attempt to create it, and raises an error if it doesn't exist. -`external` cannot be used in conjunction with other volume configuration keys -(`driver`, `driver_opts`). +For version 2.0 of the format, `external` cannot be used in +conjunction with other volume configuration keys (`driver`, `driver_opts`, +`labels`). This limitation no longer exists for +[version 2.1](compose-versioning.md#version-21) and above. In the example below, instead of attempting to create a volume called `[projectname]_data`, Compose looks for an existing volume simply @@ -1593,8 +1595,10 @@ If set to `true`, specifies that this network has been created outside of Compose. `docker-compose up` does not attempt to create it, and raises an error if it doesn't exist. -`external` cannot be used in conjunction with other network configuration keys -(`driver`, `driver_opts`, `group_add`, `ipam`, `internal`). +For version 2.0 of the format, `external` cannot be used in conjunction with +other network configuration keys (`driver`, `driver_opts`, `ipam`, `internal`). +This limitation no longer exists for +[version 2.1](compose-versioning.md#version-21) and above. In the example below, `proxy` is the gateway to the outside world. Instead of attempting to create a network called `[projectname]_outside`, Compose diff --git a/compose/compose-file/index.md b/compose/compose-file/index.md index c34bd24b68..91126787fd 100644 --- a/compose/compose-file/index.md +++ b/compose/compose-file/index.md @@ -852,6 +852,9 @@ behaviors: - `docker-compose up SERVICE` automatically includes `SERVICE`'s dependencies. In the following example, `docker-compose up web` also creates and starts `db` and `redis`. + +- `docker-compose stop` stops services in dependency order. In the following + example, `web` is stopped before `db` and `redis`. Simple example: @@ -1727,6 +1730,7 @@ expressed in the short form. created - `tmpfs`: configure additional tmpfs options - `size`: the size for the tmpfs mount in bytes +- `consistency`: the consistency requirements of the mount, one of `consistent` (host and container have identical view), `cached` (read cache, host view is authoritative) or `delegated` (read-write cache, container's view is authoritative) ```none version: "3.2" @@ -1946,9 +1950,12 @@ Specify a list of options as key-value pairs to pass to the driver for this volume. Those options are driver-dependent - consult the driver's documentation for more information. Optional. - driver_opts: - foo: "bar" - baz: 1 + volumes: + example: + driver_opts: + type: "nfs" + o: "addr=10.40.0.199,nolock,soft,rw" + device: ":/docker/example" ### external @@ -1956,14 +1963,16 @@ If set to `true`, specifies that this volume has been created outside of Compose. `docker-compose up` does not attempt to create it, and raises an error if it doesn't exist. -`external` cannot be used in conjunction with other volume configuration keys -(`driver`, `driver_opts`). +For version 3.3 and below of the format, `external` cannot be used in +conjunction with other volume configuration keys (`driver`, `driver_opts`, +`labels`). This limitation no longer exists for +[version 3.4](compose-versioning.md#version-34) and above. In the example below, instead of attempting to create a volume called `[projectname]_data`, Compose looks for an existing volume simply called `data` and mount it into the `db` service's containers. - version: '2' + version: '3' services: db: @@ -2207,15 +2216,17 @@ If set to `true`, specifies that this network has been created outside of Compose. `docker-compose up` does not attempt to create it, and raises an error if it doesn't exist. -`external` cannot be used in conjunction with other network configuration keys -(`driver`, `driver_opts`, `ipam`, `internal`). +For version 3.3 and below of the format, `external` cannot be used in +conjunction with other network configuration keys (`driver`, `driver_opts`, +`ipam`, `internal`). This limitation no longer exists for +[version 3.4](compose-versioning.md#version-34) and above. In the example below, `proxy` is the gateway to the outside world. Instead of attempting to create a network called `[projectname]_outside`, Compose looks for an existing network simply called `outside` and connect the `proxy` service's containers to it. - version: '2' + version: '3' services: proxy: @@ -2328,8 +2339,8 @@ stack. The source of the secret is either `file` or `external`. and will **not** be scoped with the stack name. Introduced in version 3.5 file format. -In this example, `my_first_secret` is created (as -`_my_first_secret)`when the stack is deployed, +In this example, `my_first_secret` is created as +`_my_first_secret `when the stack is deployed, and `my_second_secret` already exists in Docker. ```none @@ -2345,10 +2356,18 @@ is different from the name that exists within the service. The following example modifies the previous one to use the external secret called `redis_secret`. +### Compose File v3.5 and above ```none secrets: my_first_secret: file: ./secret_data + my_second_secret: + external: true + name: redis_secret +``` + +### Compose File v3.4 and under +```none my_second_secret: external: name: redis_secret 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/compose/install.md b/compose/install.md index 2ab151c251..1749eaa73f 100644 --- a/compose/install.md +++ b/compose/install.md @@ -128,6 +128,15 @@ by step instructions are also included below. ```bash sudo chmod +x /usr/local/bin/docker-compose ``` + +> ***Note:*** If the command `docker-compose` fails after installation, check your path. +> You can also create a symbolic link to `/usr/bin` or any other directory in your path. + +For example: + +```bash +sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose +``` 3. Optionally, install [command completion](completion.md) for the `bash` and `zsh` shell. @@ -136,7 +145,7 @@ by step instructions are also included below. ```bash $ docker-compose --version - docker-compose version {{site.compose_version}}, build 1719ceb + docker-compose version {{site.compose_version}}, build 1110ad01 ```
                  diff --git a/compose/rails.md b/compose/rails.md index d3f071f78a..0ebe3bdc43 100644 --- a/compose/rails.md +++ b/compose/rails.md @@ -51,7 +51,7 @@ to link them together and expose the web app's port. - ./tmp/db:/var/lib/postgresql/data web: build: . - command: bundle exec rails s -p 3000 -b '0.0.0.0' + command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'" volumes: - .:/myapp ports: diff --git a/compose/reference/restart.md b/compose/reference/restart.md index bf7b5eddb4..e30094ba7b 100644 --- a/compose/reference/restart.md +++ b/compose/reference/restart.md @@ -17,3 +17,9 @@ Restarts all stopped and running services. If you make changes to your `docker-compose.yml` configuration these changes are not reflected after running this command. For example, changes to environment variables (which are added after a container is built, but before the container's command is executed) are not updated after restarting. + +If you are looking to configure a service's restart policy, please refer to +[restart](/compose/compose-file/index.md#restart) in Compose file v3 and +[restart](/compose/compose-file/compose-file-v2.md#restart) in Compose v2. Note that if +you are [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md), +you should use [restart_policy](/compose/compose-file/index.md#restart), instead. diff --git a/compose/startup-order.md b/compose/startup-order.md index 88477929e2..aef9acfcaf 100644 --- a/compose/startup-order.md +++ b/compose/startup-order.md @@ -1,16 +1,16 @@ --- -description: How to control service startup order in Docker Compose -keywords: documentation, docs, docker, compose, startup, order -title: Control startup order in Compose +description: How to control service startup and shutdown order in Docker Compose +keywords: documentation, docs, docker, compose, startup, shutdown, order +title: Control startup and shutdown order in Compose notoc: true --- -You can control the order of service startup with the -[depends_on](compose-file.md#depends_on) option. Compose always starts +You can control the order of service startup and shutdown with the +[depends_on](compose-file.md#depends-on) option. Compose always starts and stops containers in dependency order, where dependencies are determined by `depends_on`, `links`, `volumes_from`, and `network_mode: "service:..."`. -However, Compose does not wait until a container is "ready" (whatever that means +However, for startup Compose does not wait until a container is "ready" (whatever that means for your particular application) - only until it's running. There's a good reason for this. diff --git a/compose/wordpress.md b/compose/wordpress.md index 0c2113faae..ba427b5edc 100644 --- a/compose/wordpress.md +++ b/compose/wordpress.md @@ -60,7 +60,7 @@ Compose to set up and run WordPress. Before starting, make sure you have WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: wordpress volumes: - db_data: + db_data: {} ``` > **Notes**: @@ -75,7 +75,7 @@ Compose to set up and run WordPress. Before starting, make sure you have Now, run `docker-compose up -d` from your project directory. -This runs [docker-compose up](/compose/reference/up/) in detached mode, pulls +This runs [`docker-compose up`](/compose/reference/up/) in detached mode, pulls the needed Docker images, and starts the wordpress and database containers, as shown in the example below. @@ -130,7 +130,7 @@ browser. ### Shutdown and cleanup -The command [docker-compose down](/compose/reference/down.md) removes the +The command [`docker-compose down`](/compose/reference/down.md) removes the containers and default network, but preserves your WordPress database. The command `docker-compose down --volumes` removes the containers, default diff --git a/config/containers/logging/configure.md b/config/containers/logging/configure.md index 80c24e5cb5..cad9544e08 100644 --- a/config/containers/logging/configure.md +++ b/config/containers/logging/configure.md @@ -18,7 +18,6 @@ unless you configure it to use a different logging driver. In addition to using the logging drivers included with Docker, you can also implement and use [logging driver plugins](/engine/admin/logging/plugins.md). -Logging driver plugins are available in Docker 17.05 and higher. ## Configure the default logging driver @@ -44,25 +43,32 @@ example sets two configurable options on the `json-file` logging driver: { "log-driver": "json-file", "log-opts": { + "max-size": "10m", + "max-file": "3", "labels": "production_status", "env": "os,customer" } } ``` +> **Note**: `log-opt` configuration options in the `daemon.json` configuration +> file must be provided as strings. Boolean and numeric values (such as the value +> for `max-file` in the example above) must therefore be enclosed in quotes (`"`). If you do not specify a logging driver, the default is `json-file`. Thus, the default output for commands such as `docker inspect ` is JSON. To find the current default logging driver for the Docker daemon, run `docker info` and search for `Logging Driver`. You can use the following -command on Linux, macOS, or PowerShell on Windows: +command: +{% raw %} ```bash -$ docker info | grep 'Logging Driver' +$ docker info --format '{{.LoggingDriver}}' -Logging Driver: json-file +json-file ``` +{% endraw %} ## Configure the logging driver for a container diff --git a/config/containers/logging/fluentd.md b/config/containers/logging/fluentd.md index 93c5032a4a..575824e2bc 100644 --- a/config/containers/logging/fluentd.md +++ b/config/containers/logging/fluentd.md @@ -53,7 +53,12 @@ The following example sets the log driver to `fluentd` and sets the } ``` - Restart Docker for the changes to take effect. +Restart Docker for the changes to take effect. + +> **Note**: `log-opt` configuration options in the `daemon.json` configuration +> file must be provided as strings. Boolean and numeric values (such as the value +> for `fluentd-async-connect` or `fluentd-max-retries`) must therefore be enclosed +> in quotes (`"`). To set the logging driver for a specific container, pass the `--log-driver` option to `docker run`: diff --git a/config/containers/logging/gelf.md b/config/containers/logging/gelf.md index 55a7462830..c5be667ae5 100644 --- a/config/containers/logging/gelf.md +++ b/config/containers/logging/gelf.md @@ -60,6 +60,10 @@ To make the configuration permanent, you can configure it in `/etc/docker/daemon } ``` +> **Note**: `log-opt` configuration options in the `daemon.json` configuration +> file must be provided as strings. Boolean and numeric values (such as the value +> for `gelf-tcp-max-reconnect`) must therefore be enclosed in quotes (`"`). + You can set the logging driver for a specific container by setting the `--log-driver` flag when using `docker container create` or `docker run`: diff --git a/config/containers/logging/json-file.md b/config/containers/logging/json-file.md index 79810568b9..6e397885f6 100644 --- a/config/containers/logging/json-file.md +++ b/config/containers/logging/json-file.md @@ -23,17 +23,22 @@ configuring Docker using `daemon.json`, see [daemon.json](/engine/reference/commandline/dockerd.md#daemon-configuration-file). The following example sets the log driver to `json-file` and sets the `max-size` -option. +and `max-file` options. ```json { "log-driver": "json-file", "log-opts": { - "max-size": "10m" + "max-size": "10m", + "max-file": "3" } } ``` +> **Note**: `log-opt` configuration options in the `daemon.json` configuration +> file must be provided as strings. Boolean and numeric values (such as the value +> for `max-file` in the example above) must therefore be enclosed in quotes (`"`). + Restart Docker for the changes to take effect for newly created containers. Existing containers do not use the new logging configuration. You can set the logging driver for a specific container by using the diff --git a/config/containers/logging/plugins.md b/config/containers/logging/plugins.md index ebe799a724..f49e537f7e 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, 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/config/containers/logging/splunk.md b/config/containers/logging/splunk.md index c279c819ff..1e110448ab 100644 --- a/config/containers/logging/splunk.md +++ b/config/containers/logging/splunk.md @@ -36,6 +36,11 @@ The daemon.json file is located in `/etc/docker/` on Linux hosts or configuring Docker using `daemon.json`, see [daemon.json](/engine/reference/commandline/dockerd.md#daemon-configuration-file). +> **Note**: `log-opt` configuration options in the `daemon.json` configuration +> file must be provided as strings. Boolean and numeric values (such as the value +> for `splunk-gzip` or `splunk-gzip-level`) must therefore be enclosed in quotes +> (`"`). + To use the `splunk` driver for a specific container, use the commandline flags `--log-driver` and `log-opt` with `docker run`: diff --git a/config/containers/logging/syslog.md b/config/containers/logging/syslog.md index cc64d627f4..6355ac13c2 100644 --- a/config/containers/logging/syslog.md +++ b/config/containers/logging/syslog.md @@ -41,7 +41,8 @@ configuring Docker using `daemon.json`, see [daemon.json](/engine/reference/commandline/dockerd.md#daemon-configuration-file). The following example sets the log driver to `syslog` and sets the -`syslog-address` option. +`syslog-address` option. The `syslog-address` options supports both UDP and TCP; +this example uses UDP. ```json { @@ -54,7 +55,9 @@ The following example sets the log driver to `syslog` and sets the Restart Docker for the changes to take effect. -> **Note**: The syslog-address supports both UDP and TCP. +> **Note**: `log-opt` configuration options in the `daemon.json` configuration +> file must be provided as strings. Numeric and boolean values (such as the value +> for `syslog-tls-skip-verify`) must therefore be enclosed in quotes (`"`). You can set the logging driver for a specific container by using the `--log-driver` flag to `docker container create` or `docker run`: @@ -75,7 +78,7 @@ starting the container. | Option | Description | Example value | |:-------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `syslog-address` | The address of an external `syslog` server. The URI specifier may be `[tcp | udp|tcp+tls]://host:port`, `unix://path`, or `unixgram://path`. If the transport is `tcp`, `udp`, or `tcp+tls`, the default port is `514`.| `--log-opt syslog-address=tcp+tls://192.168.1.3:514`, `--log-opt syslog-address=unix:///tmp/syslog.sock` | +| `syslog-address` | The address of an external `syslog` server. The URI specifier may be `[tcp|udp|tcp+tls]://host:port`, `unix://path`, or `unixgram://path`. If the transport is `tcp`, `udp`, or `tcp+tls`, the default port is `514`. | `--log-opt syslog-address=tcp+tls://192.168.1.3:514`, `--log-opt syslog-address=unix:///tmp/syslog.sock` | | `syslog-facility` | The `syslog` facility to use. Can be the number or name for any valid `syslog` facility. See the [syslog documentation](https://tools.ietf.org/html/rfc5424#section-6.2.1). | `--log-opt syslog-facility=daemon` | | `syslog-tls-ca-cert` | The absolute path to the trust certificates signed by the CA. **Ignored if the address protocol is not `tcp+tls`.** | `--log-opt syslog-tls-ca-cert=/etc/ca-certificates/custom/ca.pem` | | `syslog-tls-cert` | The absolute path to the TLS certificate file. **Ignored if the address protocol is not `tcp+tls`**. | `--log-opt syslog-tls-cert=/etc/ca-certificates/custom/cert.pem` | diff --git a/config/containers/resource_constraints.md b/config/containers/resource_constraints.md index 849283ed8f..36fab1b785 100644 --- a/config/containers/resource_constraints.md +++ b/config/containers/resource_constraints.md @@ -251,7 +251,7 @@ The following example command sets each of these three flags on a `debian:jessie container. ```bash -$ docker run --it --cpu-rt-runtime=950000 \ +$ docker run -it --cpu-rt-runtime=950000 \ --ulimit rtprio=99 \ --cap-add=sys_nice \ debian:jessie diff --git a/config/containers/runmetrics.md b/config/containers/runmetrics.md index 3e03d453af..b80022dd09 100644 --- a/config/containers/runmetrics.md +++ b/config/containers/runmetrics.md @@ -131,7 +131,7 @@ to the processes within the cgroup, excluding sub-cgroups. The second half (with the `total_` prefix) includes sub-cgroups as well. Some metrics are "gauges", or values that can increase or decrease. For instance, -`swap` isthe amount of swap space used by the members of the cgroup. +`swap` is the amount of swap space used by the members of the cgroup. Some others are "counters", or values that can only go up, because they represent occurrences of a specific event. For instance, `pgfault` indicates the number of page faults since the creation of the cgroup. diff --git a/config/formatting.md b/config/formatting.md index d869250112..e916e845ba 100644 --- a/config/formatting.md +++ b/config/formatting.md @@ -87,3 +87,13 @@ docker inspect --format "{{upper .Name}}" container docker inspect --format='{{range .NetworkSettings.Networks}}{{println .IPAddress}}{{end}}' container ``` {% endraw %} + +# Hint + +To find out what data can be printed, show all content as json: + +{% raw %} +``` +docker container ls --format='{{json .}}' +``` +{% endraw %} 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..24df9264bd 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 **My 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,24 +141,23 @@ 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. 4. Locate your Docker EE Advanced subscription or trial. -5. Click **Setup** button. +5. Click **Setup**. ![](../../images/cve-file-1.png){: .with-border} 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/access-dtr/configure-your-notary-client.md b/datacenter/dtr/2.2/guides/user/access-dtr/configure-your-notary-client.md index 59bcb2e0e3..765b1fad6a 100644 --- a/datacenter/dtr/2.2/guides/user/access-dtr/configure-your-notary-client.md +++ b/datacenter/dtr/2.2/guides/user/access-dtr/configure-your-notary-client.md @@ -33,8 +33,8 @@ curl -L -o notary # Make it executable chmod +x notary -# Move it to a location in your path -sudo mv notary /usr/bin/ +# Move it to a location in your path. Use the -Z option if you're using SELinux. +sudo mv -Z notary /usr/bin/ ``` ## Configure the Notary CLI client 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/admin/install/install-offline.md b/datacenter/dtr/2.3/guides/admin/install/install-offline.md index 66937637da..f36241cab3 100644 --- a/datacenter/dtr/2.3/guides/admin/install/install-offline.md +++ b/datacenter/dtr/2.3/guides/admin/install/install-offline.md @@ -25,6 +25,13 @@ Use a computer with internet access to download a package with all DTR images: $ wget -O dtr.tar.gz ``` +### Download a specific version + +``` +$ wget https://packages.docker.com/caas/dtr_images_2.3.9.tar.gz -O dtr_2.3.9.tar.gz + +``` + Now that you have the package in your local machine, you can transfer it to the machines where you want to install DTR. diff --git a/datacenter/dtr/2.3/guides/user/access-dtr/configure-your-notary-client.md b/datacenter/dtr/2.3/guides/user/access-dtr/configure-your-notary-client.md index 2142a73f7e..a1261ac696 100644 --- a/datacenter/dtr/2.3/guides/user/access-dtr/configure-your-notary-client.md +++ b/datacenter/dtr/2.3/guides/user/access-dtr/configure-your-notary-client.md @@ -33,8 +33,8 @@ curl -L -o notary # Make it executable chmod +x notary -# Move it to a location in your path -sudo mv notary /usr/bin/ +# Move it to a location in your path. Use the -Z option if you're using SELinux. +sudo mv -Z notary /usr/bin/ ``` ## Configure the Notary CLI client 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 cef1a76464..2b72a73769 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.3/reference/cli/install.md b/datacenter/dtr/2.3/reference/cli/install.md index 8dac003191..af70dd5652 100644 --- a/datacenter/dtr/2.3/reference/cli/install.md +++ b/datacenter/dtr/2.3/reference/cli/install.md @@ -35,10 +35,10 @@ Note: Use --ucp-ca "$(cat ca.pem)" instead of --ucp-insecure-tls for a productio | Option | Environment Variable | Description | |:------------------------------|:--------------------------|:-------------------------------------------------------------------------------------| | `--debug` | $DEBUG | Enable debug mode for additional logs. | -| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR.By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS CA certificate with --dtr-ca "$(cat ca.pem)". | -| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR.By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS certificate with --dtr-cert "$(cat ca.pem)". | +| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own root CA public certificate with `--dtr-ca "$(cat ca.pem)"`. | +| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own public key certificate with `--dtr-cert "$(cat cert.pem)"`. If the certificate has been signed by an intermediate certificate authority, append its public key certificate at the end of the file to establish a chain of trust. | | `--dtr-external-url` | $DTR_EXTERNAL_URL | URL of the host or load balancer clients use to reach DTR.When you use this flag, users are redirected to UCP for logging in. Once authenticated they are redirected to the url you specify in this flag. If you don't use this flag, DTR is deployed without single sign-on with UCP. Users and teams are shared but users login separately into the two applications. You can enable and disable single sign-on in the DTR settings. Format https://host[:port], where port is the value you used with --replica-https-port. | -| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR.By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with --dtr-key "$(cat ca.pem)". | +| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with `--dtr-key "$(cat key.pem)"`. | | `--dtr-storage-volume` | $DTR_STORAGE_VOLUME | Customize the volume to store Docker images.By default DTR creates a volume to store the Docker images in the local filesystem of the node where DTR is running, without high-availability. Use this flag to specify a full path or volume name for DTR to store images. For high-availability, make sure all DTR replicas can read and write data on this volume. If you're using NFS, use --nfs-storage-url instead. | | `--enable-pprof` | $DTR_PPROF | Enables pprof profiling of the server.Once DTR is deployed with this flag, you can access the pprof endpoint for the api server at /debug/pprof, and the registry endpoint at /registry_debug_pprof/debug/pprof. | | `--enzi-ca` | $ENZI_TLS_CA | Use a PEM-encoded TLS CA certificate for Enzi. | diff --git a/datacenter/dtr/2.3/reference/cli/reconfigure.md b/datacenter/dtr/2.3/reference/cli/reconfigure.md index e14b24dc8e..6150472cea 100644 --- a/datacenter/dtr/2.3/reference/cli/reconfigure.md +++ b/datacenter/dtr/2.3/reference/cli/reconfigure.md @@ -27,10 +27,10 @@ time, configure your DTR for high-availability. | Option | Environment Variable | Description | |:------------------------------|:--------------------------|:-------------------------------------------------------------------------------------| | `--debug` | $DEBUG | Enable debug mode for additional logs. | -| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS CA certificate with --dtr-ca "$(cat ca.pem)". | -| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS certificate with --dtr-cert "$(cat ca.pem)". | +| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own root CA public certificate with `--dtr-ca "$(cat ca.pem)"`. | +| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own public key certificate with `--dtr-cert "$(cat cert.pem)"`. If the certificate has been signed by an intermediate certificate authority, append its public key certificate at the end of the file to establish a chain of trust. | | `--dtr-external-url` | $DTR_EXTERNAL_URL | URL of the host or load balancer clients use to reach DTR. When you use this flag, users are redirected to UCP for logging in. Once authenticated they are redirected to the URL you specify in this flag. If you don't use this flag, DTR is deployed without single sign-on with UCP. Users and teams are shared but users log separately into the two applications. You can enable and disable single sign-on in the DTR settings. Format https://host[:port], where port is the value you used with `--replica-https-port`. | -| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with --dtr-key "$(cat ca.pem)". | +| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with `--dtr-key "$(cat key.pem)"`. | | `--dtr-storage-volume` | $DTR_STORAGE_VOLUME | Customize the volume to store Docker images. By default DTR creates a volume to store the Docker images in the local filesystem of the node where DTR is running, without high-availability. Use this flag to specify a full path or volume name for DTR to store images. For high-availability, make sure all DTR replicas can read and write data on this volume. If you're using NFS, use `--nfs-storage-url` instead. | | `--enable-pprof` | $DTR_PPROF | Enables pprof profiling of the server. Once DTR is deployed with this flag, you can access the pprof endpoint for the api server at /debug/pprof, and the registry endpoint at /registry_debug_pprof/debug/pprof. | | `--enzi-ca` | $ENZI_TLS_CA | Use a PEM-encoded TLS CA certificate for Enzi. | 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/access-dtr/configure-your-notary-client.md b/datacenter/dtr/2.4/guides/user/access-dtr/configure-your-notary-client.md index aee56a291b..47bd692634 100644 --- a/datacenter/dtr/2.4/guides/user/access-dtr/configure-your-notary-client.md +++ b/datacenter/dtr/2.4/guides/user/access-dtr/configure-your-notary-client.md @@ -41,8 +41,8 @@ curl -L -o notary # Make it executable chmod +x notary -# Move it to a location in your path -sudo mv notary /usr/bin/ +# Move it to a location in your path. Use the -Z option if you're using SELinux. +sudo mv -Z notary /usr/bin/ ``` ## Configure the Notary CLI client 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/dtr/2.4/reference/cli/install.md b/datacenter/dtr/2.4/reference/cli/install.md index b7699e1e52..8769054686 100644 --- a/datacenter/dtr/2.4/reference/cli/install.md +++ b/datacenter/dtr/2.4/reference/cli/install.md @@ -35,10 +35,10 @@ Note: Use --ucp-ca "$(cat ca.pem)" instead of --ucp-insecure-tls for a productio | Option | Environment Variable | Description | |:------------------------------|:--------------------------|:-------------------------------------------------------------------------------------| | `--debug` | $DEBUG | Enable debug mode for additional logs. | -| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR.By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS CA certificate with --dtr-ca "$(cat ca.pem)". | -| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR.By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS certificate with --dtr-cert "$(cat ca.pem)". | +| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own root CA public certificate with `--dtr-ca "$(cat ca.pem)"`. | +| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own public key certificate with `--dtr-cert "$(cat cert.pem)"`. If the certificate has been signed by an intermediate certificate authority, append its public key certificate at the end of the file to establish a chain of trust. | | `--dtr-external-url` | $DTR_EXTERNAL_URL | URL of the host or load balancer clients use to reach DTR.When you use this flag, users are redirected to UCP for logging in. Once authenticated they are redirected to the url you specify in this flag. If you don't use this flag, DTR is deployed without single sign-on with UCP. Users and teams are shared but users login separately into the two applications. You can enable and disable single sign-on in the DTR settings. Format https://host[:port], where port is the value you used with --replica-https-port. | -| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR.By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with --dtr-key "$(cat ca.pem)". | +| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with `--dtr-key "$(cat key.pem)"`. | | `--dtr-storage-volume` | $DTR_STORAGE_VOLUME | Customize the volume to store Docker images.By default DTR creates a volume to store the Docker images in the local filesystem of the node where DTR is running, without high-availability. Use this flag to specify a full path or volume name for DTR to store images. For high-availability, make sure all DTR replicas can read and write data on this volume. If you're using NFS, use --nfs-storage-url instead. | | `--enable-pprof` | $DTR_PPROF | Enables pprof profiling of the server.Once DTR is deployed with this flag, you can access the pprof endpoint for the api server at /debug/pprof, and the registry endpoint at /registry_debug_pprof/debug/pprof. | | `--help-extended` | $DTR_EXTENDED_HELP | Display extended help text for a given command. | diff --git a/datacenter/dtr/2.4/reference/cli/reconfigure.md b/datacenter/dtr/2.4/reference/cli/reconfigure.md index 0605098068..b722be502c 100644 --- a/datacenter/dtr/2.4/reference/cli/reconfigure.md +++ b/datacenter/dtr/2.4/reference/cli/reconfigure.md @@ -27,13 +27,13 @@ time, configure your DTR for high-availability. | Option | Environment Variable | Description | |:------------------------------|:--------------------------|:-------------------------------------------------------------------------------------| | `--debug` | $DEBUG | Enable debug mode for additional logs. | -| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR.By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS CA certificate with --dtr-ca "$(cat ca.pem)". | -| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR.By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS certificate with --dtr-cert "$(cat ca.pem)". | +| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own root CA public certificate with `--dtr-ca "$(cat ca.pem)"`. | +| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own public key certificate with `--dtr-cert "$(cat cert.pem)"`. If the certificate has been signed by an intermediate certificate authority, append its public key certificate at the end of the file to establish a chain of trust. | | `--dtr-external-url` | $DTR_EXTERNAL_URL | URL of the host or load balancer clients use to reach DTR.When you use this flag, users are redirected to UCP for logging in. Once authenticated they are redirected to the url you specify in this flag. If you don't use this flag, DTR is deployed without single sign-on with UCP. Users and teams are shared but users login separately into the two applications. You can enable and disable single sign-on in the DTR settings. Format https://host[:port], where port is the value you used with --replica-https-port. | -| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR.By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with --dtr-key "$(cat ca.pem)". | +| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with `--dtr-key "$(cat key.pem)"`. | | `--dtr-storage-volume` | $DTR_STORAGE_VOLUME | Customize the volume to store Docker images.By default DTR creates a volume to store the Docker images in the local filesystem of the node where DTR is running, without high-availability. Use this flag to specify a full path or volume name for DTR to store images. For high-availability, make sure all DTR replicas can read and write data on this volume. If you're using NFS, use --nfs-storage-url instead. | | `--enable-pprof` | $DTR_PPROF | Enables pprof profiling of the server.Once DTR is deployed with this flag, you can access the pprof endpoint for the api server at /debug/pprof, and the registry endpoint at /registry_debug_pprof/debug/pprof. | -| `--existing-replica-id` | $DTR_REPLICA_ID | The ID of an existing DTR replica.To add, remove or modify DTR, you must connect to an existing healthy replica's database.. | +| `--existing-replica-id` | $DTR_REPLICA_ID | The ID of an existing DTR replica. To add, remove or modify DTR, you must connect to an existing healthy replica's database. | | `--help-extended` | $DTR_EXTENDED_HELP | Display extended help text for a given command. | | `--http-proxy` | $DTR_HTTP_PROXY | The HTTP proxy used for outgoing requests. | | `--https-proxy` | $DTR_HTTPS_PROXY | The HTTPS proxy used for outgoing requests. | diff --git a/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/chaining.md b/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/chaining.md deleted file mode 100644 index a4bdcf7a42..0000000000 --- a/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/chaining.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: Chain multiple caches -description: Learn how to deploy and chain multiple caches for Docker Trusted Registry, to cover multiple regions or offices -keywords: dtr, tls ---- - -If your users are distributed geographically, consider chaining multiple DTR -caches together for faster pulls. - -![cache chaining](../../../images/chaining-1.svg) - -Too many levels of chaining might slow down pulls, so you should try different -configurations and benchmark them, to find out the right configuration. - -This example shows how to configure two caches. A dedicated cache for -the Asia region that pulls images directly from DTR, and a cache for China, that -pulls images from the Asia cache. - -## Cache for the Asia region - -This cache has TLS, and pulls images directly from DTR: - -``` -version: 0.1 -storage: - delete: - enabled: true - filesystem: - rootdirectory: /var/lib/registry -http: - addr: :5000 - tls: - certificate: /certs/asia-ca.pem - key: /certs/asia-key.pem -middleware: - registry: - - name: downstream - options: - blobttl: 24h - upstreams: - - https:// - cas: - - /certs/dtr-ca.pem -``` - -## Cache for the China region - -This cache has TLS, and pulls images from the Asia cache: - -``` -version: 0.1 -storage: - delete: - enabled: true - filesystem: - rootdirectory: /var/lib/registry -http: - addr: :5000 - tls: - certificate: /certs/china-ca.pem - key: /certs/china-key.pem -middleware: - registry: - - name: downstream - options: - blobttl: 24h - upstreams: - - https:// - cas: - - /certs/asia-cache-ca.pem -``` - -Since the China cache doesn't need to communicate directly with DTR, -it only needs to trust the CA certificates for the next hop, in this case -the CA certificate used by the Asia cache. diff --git a/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/configuration-reference.md b/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/configuration-reference.md new file mode 100644 index 0000000000..988cc65b1f --- /dev/null +++ b/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/configuration-reference.md @@ -0,0 +1,80 @@ +--- +title: DTR cache configuration reference +description: Learn about the different configuration options for DTR caches. +keywords: DTR, cache +--- + +DTR caches are based on Docker Registry, and use the same configuration +file format. +[Learn more about the configuration options](/registry/configuration.md). + +The DTR cache extends the Docker Registry configuration file format by +introducing a new middleware called `downstream` that has three configuration +options: `blobttl`, `upstreams`, and `cas`: + +```none +# Settings that you would include in a +# Docker Registry configuration file followed by + +middleware: + registry: + - name: downstream + options: + blobttl: 24h + upstreams: + - + cas: + - +``` + +Below you can find the description for each parameter, specific to DTR caches. + + + + + + + + + + + + + + + + + + + + + + +
                  ParameterRequiredDescription
                  + blobttl + + no + +A positive integer and an optional unit of time suffix to determine the TTL (Time to Live) value for blobs in the cache. If blobttl is configured, storage.delete.enabled must be set to true. Acceptable units of time are: +
                    +
                  • ns (nanoseconds)
                  • +
                  • us (microseconds)
                  • +
                  • ms (milliseconds)
                  • +
                  • s (seconds)
                  • +
                  • m (minutes)
                  • +
                  • h (hours)
                  • +
                  + If you omit the suffix, the system interprets the value as nanoseconds. +
                  + cas + + no + + An optional list of absolute paths to PEM-encoded CA certificates of upstream registries or content caches. +
                  + upstreams + + yes + + A list of externally-reachable addresses for upstream registries of content caches. If more than one host is specified, it will pull from registries in round-robin order. +
                  diff --git a/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/high-availability.md b/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/high-availability.md new file mode 100644 index 0000000000..02358e9dc2 --- /dev/null +++ b/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/high-availability.md @@ -0,0 +1,76 @@ +--- +title: Configure caches for high availability +description: Learn how to deploy a DTR cache with fault tolerance and high + availability. +keywords: DTR, cache +--- + +If you're deploying a DTR cache in a zone with few users and with no uptime +SLAs, a [single cache service is enough for you](simple.md). + +But if you want to make sure your DTR cache is always available to users +and is highly performant, you should configure your cache deployment for +high availability. + +![Highly-available cache](../../../images/deploy-caches-ha-1.svg) + +## System requirements + +* Multiple nodes, one for each cache replica. +* A load balancer. +* Shared storage system that has read-after-write consistency. + +The way you deploy a DTR cache is the same, whether you're deploying a single +replica or multiple ones. The difference is that you should configure the +replicas to store data using a shared storage system. + +When using a shared storage system, once an image layer is cached, any replica +is able to serve it to users without having to fetch a new copy from DTR. + +DTR caches support the following storage systems: +* Alibaba Cloud Object Storage Service +* Amazon S3 +* Azure Blob Storage +* Google Cloud Storage +* NFS +* Openstack Swift + +If you're using NFS as a shared storage system, make sure the shared +directory is configured with: + +``` +/dtr-cache *(rw,root_squash,no_wdelay) +``` + +This ensures read-after-write consistency for NFS. + +You should also mount the NFS directory on each node where you'll deploy a +DTR cache replica. + +## Label the DTR cache nodes + +Use SSH to log in to a manager node of the swarm where you want to deploy +the DTR cache. + +If you're using UCP to manage that swarm you can also use a client bundle to +configure your Docker CLI client to connect to that swarm. + +Label each node that is going to run the cache replica, by running: + +``` +docker node update --label-add dtr.cache=true +``` + +## Configure and deploy the cache + +Create the cache configuration files by following the +[instructions for deploying a single cache replica](simple.md#prepare-the-cache-deployment). + +Make sure you adapt the `storage` object, using the +[configuration options for the shared storage](/registry/configuration.md#storage) +of your choice. + +## Configure your load balancer + +The last step is to deploy a load balancer of your choice to load-balance +requests across the multiple replicas you deployed. diff --git a/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/index.md b/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/index.md index 3c4bc06611..e8eb56fd7d 100644 --- a/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/index.md +++ b/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/index.md @@ -1,224 +1,74 @@ --- -title: Deploy DTR caches -description: Learn how to deploy and configure DTR caches, so that users can pull images faster. -keywords: registry, dtr, cache +title: DTR cache overview +description: Deploy DTR caches in different geographical locations for users to + pull images faster. +keywords: DTR, cache --- +The further away you are from the geographical location where DTR is deployed, +the longer it will take the pull and push images. +This happens because the files being transferred from DTR to your machine +need to travel a longer distance, across multiple networks. -You can configure DTR to have multiple caches. Once you've deployed caches, -users can configure their DTR user account to specify which cache to pull from. +![Slow pull](../../../images/deploy-caches-1.svg) -Then, when users pull from DTR, they are redirected to pull from the cache -configured on their user account. By deploying caches geographically closer to remote -offices and low connectivity areas, users can pull images faster. +To decrease the time to pull an image, you can deploy DTR caches geographically +closer to users. -User requests are authenticated when pulling from a cache. Users can only pull -images from a cache if they have access. And if the image has changed in DTR, -users will pull the latest version, not an outdated one. +Caches are transparent to users, since users still login and pull images using +the DTR url address. +DTR checks if users are authorized to pull the image, and redirects the +request to the cache. -## How caches work +![Pull with cache](../../../images/deploy-caches-2.svg) -After you've deployed the caches, users can configure which cache to -pull from on their DTR user settings page. +In this example, DTR is deployed on a datacenter in the United States, and +a cache is deployed in the Asia office. -![](../../../images/cache-docker-images-1.svg) - -When users try to pull an image by running -`docker pull //`, the following happens: - -1. The Docker client makes a request to DTR which in turn authenticates the -request -2. The Docker client requests the image manifest to DTR. This ensures that -users will always pull the correct image, and not an outdated version -3. The Docker client requests the layer blobs to DTR, which becomes signed -and redirected to the cache configured by the user -4. If the blob exists on the cache it is sent to the user. Otherwise, the cache -pulls it from DTR and sends it to the user - -When a user pushes an image, that image is pushed directly to DTR. A cache -will only store the image when a user tries to pull the image using that cache. - -## Configure the cache - -DTR caches are based on Docker Registry, and use the same configuration -file format. -[Learn more about the configuration options](/registry/configuration.md). - -The DTR cache extends the Docker Registry configuration file format by -introducing a new middleware called `downstream` that has three configuration -options: `blobttl`, `upstreams`, and `cas`: - -```none -# Settings that you would include in a -# Docker Registry configuration file followed by - -middleware: - registry: - - name: downstream - options: - blobttl: 24h - upstreams: - - - cas: - - -``` - -Below you can find the description for each parameter, specific to DTR caches. - - - - - - - - - - - - - - - - - - - - - - -
                  ParameterRequiredDescription
                  - blobttl - - no - -The TTL for blobs in the cache. This field takes a positive integer and an optional suffix indicating the unit of time. If -this field is configured, "storage.delete.enabled" must be configured to true. Possible units are: -
                    -
                  • ns (nanoseconds)
                  • -
                  • us (microseconds)
                  • -
                  • ms (milliseconds)
                  • -
                  • s (seconds)
                  • -
                  • m (minutes)
                  • -
                  • h (hours)
                  • -
                  - If you omit the suffix, the system interprets the value as nanoseconds. -
                  - cas - - no - - An optional list of absolute paths to PEM-encoded CA certificates of upstream registries or content caches. -
                  - upstreams - - yes - - A list of externally-reachable addresses for upstream registries of content caches. If more than one host is specified, it will pull from registries in round-robin order. -
                  - -## Deploy a simple cache - -You can deploy a Docker Content Cache on any host that has Docker installed. -The only requirements are that: - -* Users need to have access to both DTR and the cache -* The cache needs access to DTR - -![](../../../images/cache-docker-images-2.svg) - -On the host where the cache will be deployed, create a `config.yml` file with -the following content: +Users in the Asia office updated their user profile in DTR to fetch from +the cache in their office. They pull an image using: ``` -version: 0.1 -storage: - delete: - enabled: true - filesystem: - rootdirectory: /var/lib/registry -http: - addr: :5000 -middleware: - registry: - - name: downstream - options: - blobttl: 24h - upstreams: - - https:// - cas: - - /certs/dtr-ca.pem +# Log in to DTR +docker login dtr.example.org + +# Pull image +docker image pull dtr.example.org/website/ui:3-stable ``` -This configures the cache to store the images in the directory -`/var/lib/registry`, exposes the cache service on port 5000, and configures the -cache to delete images that are not pulled in the last 24 hours. It also -defines where DTR can be reached, and which CA certificates should be trusted. +DTR authenticates the request and checks if the user has permission to pull the +image they're requesting. If they have permissions, they'll get an image +manifest containing the list of image layers to pull and redirecting them +to pull them from the Asia cache. -Now we need to download the CA certificate used by DTR. For this, run: +When users request those images layers from the Asia cache, the cache pulls +them from DTR and keeps a copy that can be used to serve to other users without +having to pull the image layers from DTR again. -``` -curl -k https:///ca > dtr-ca.pem -``` +## Caches or mirroring policies -Now that we've got the cache configuration file and DTR CA certificate, we can -deploy the cache by running: +Use caches if you: -```none -docker run --detach --restart always \ - --name dtr-cache \ - --publish 5000:5000 \ - --volume $(pwd)/dtr-ca.pem:/certs/dtr-ca.pem \ - --volume $(pwd)/config.yml:/config.yml \ - {{ page.dtr_org }}/dtr-content-cache:{{ page.dtr_version }} /config.yml -``` +* Want to make image pulls faster for users in different geographical regions. +* Want to manage user permissions from a central place. -You can also run the command in interactive mode instead of detached by -replacing `--detached` with `--interactive`. This allows you to -see the logs generated by the container and troubleshoot misconfigurations. +If you need users to be able to push images faster, or you want to implement +RBAC policies based on different regions, don't use caches. +Instead, deploy multiple DTR clusters and implement mirroring policies between +them. -Now that you've deployed a cache, you need to configure DTR to know about it. -This is done using the `POST /api/v0/content_caches` API. You can use the -DTR interactive API documentation to use this API. +![Mirroring policies](../../../images/deploy-caches-3.svg) -In the DTR web UI, click the top-right menu, and choose **API docs**. +With mirroring policies you can set up a development pipeline where images +are automatically pushed between different DTR repositories, or across +DTR deployments. -![](../../../images/cache-docker-images-2.png){: .with-border} +As an example you can set up a development pipeline with three different stages. +Developers can push and pull images from the development environment, +only pull from QA, and have no access to Production. -Navigate to the `POST /api/v0/content_caches` line and click it to expand. -In the **body** field include: +With multiple DTR deployments you can control the permissions developers have +for each deployment, and you can create policies to automatically push images +from one deployment to the next. +[Learn more about deployment policies](../../../user/promotion-policies/index.md). -``` -{ - "name": "region-us", - "host": "http://:5000" -} -``` - -Click the **Try it out!** button to make the API call. - -![](../../../images/cache-docker-images-3.png){: .with-border} - -Now that DTR knows about the cache we've created, we just need to configure -our DTR user settings to start using that cache. - -In the DTR web UI, navigate to your **user profile**, click the **Settings** -tab, and change the **Content Cache** settings to use the **region-us** cache. - -![](../../../images/cache-docker-images-4.png){: .with-border} - -You can also automate this through the `/api/v0/accounts/{username}/settings` -API. - -Now when you pull images, you use the cache. To test this, try pulling -an image from DTR. You can inspect the logs of the cache service, to validate -that the cache is being used, and troubleshoot problems. - -In the host where you've deployed the `region-us` cache, run: - -``` -docker container logs dtr-cache -``` - -## Where to go next - -* [Deploy caches with TLS](tls.md) diff --git a/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/simple.md b/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/simple.md new file mode 100644 index 0000000000..b2565f09dd --- /dev/null +++ b/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/simple.md @@ -0,0 +1,272 @@ +--- +title: Deploy a DTR cache +description: Deploy a DTR cache to make users in remove geographical locations + pull images faster. +keywords: DTR, cache +--- + +This example guides you in deploying a DTR cache, assuming that you've got +a DTR deployment up and running. It also assumes that you've provisioned +[multiple nodes and joined them into a swarm](strategy.md#system-requirements). + +![Cache for Asia](../../../images/deploy-caches-simple-1.svg) + +The DTR cache is going to be deployed as a Docker service, so that Docker +automatically takes care of scheduling and restarting the service if +something goes wrong. + +We'll manage the cache configuration using a Docker configuration, and the TLS +certificates using Docker secrets. This allows you to manage the configurations +securely and independently of the node where the cache is actually running. + +## Dedicate a node for the cache + +To make sure the DTR cache is performant, it should be deployed on a node +dedicated just for it. Start by labelling the node where you want +to deploy the cache, so that you target the deployment to that node. + +Use SSH to log in to a manager node of the swarm where you want to deploy +the DTR cache. If you're using UCP to manage that swarm, use a client bundle to +configure your Docker CLI client to connect to the swarm. + +``` +docker node update --label-add dtr.cache=true +``` + +[Learn more about labelling nodes](/engine/swarm/manage-nodes.md#add-or-remove-label-metadata). + + +## Prepare the cache deployment + +Create a file structure that looks like this: + +``` +├── docker-stack.yml # Stack file to deploy cache with a single command +├── config.yml # The cache configuration file +└── certs + ├── cache.cert.pem # The cache public key certificate + ├── cache.key.pem # The cache private key + └── dtr.cert.pem # DTR CA certificate +``` + +Then add the following content to each of the files: + + +
                  +
                  +
                  +      
                  +version: "3.3"
                  +services:
                  +  cache:
                  +    image: {{ page.dtr_org }}/{{ page.dtr_repo }}-content-cache:{{ page.dtr_version }}
                  +    entrypoint:
                  +      - /start.sh
                  +      - "/config.yml"
                  +    ports:
                  +      - 443:443
                  +    deploy:
                  +      replicas: 1
                  +      placement:
                  +        constraints: [node.labels.dtr.cache == true]
                  +      restart_policy:
                  +        condition: on-failure
                  +    configs:
                  +      - config.yml
                  +    secrets:
                  +      - dtr.cert.pem
                  +      - cache.cert.pem
                  +      - cache.key.pem
                  +configs:
                  +  config.yml:
                  +    file: ./config.yml
                  +secrets:
                  +  dtr.cert.pem:
                  +    file: ./certs/dtr.cert.pem
                  +  cache.cert.pem:
                  +    file: ./certs/cache.cert.pem
                  +  cache.key.pem:
                  +    file: ./certs/cache.key.pem
                  +    
                  +  
                  +
                  +
                  + +
                  +
                  +      
                  +version: 0.1
                  +log:
                  +  level: info
                  +storage:
                  +  delete:
                  +    enabled: true
                  +  filesystem:
                  +    rootdirectory: /var/lib/registry
                  +http:
                  +  addr: 0.0.0.0:443
                  +  secret: generate-random-secret
                  +  host: https://<cache-url>
                  +  tls:
                  +    certificate: /run/secrets/cache.cert.pem
                  +    key: /run/secrets/cache.key.pem
                  +middleware:
                  +  registry:
                  +      - name: downstream
                  +        options:
                  +          blobttl: 24h
                  +          upstreams:
                  +            - https://<dtr-url>:<dtr-port>
                  +          cas:
                  +            - /run/secrets/dtr.cert.pem
                  +    
                  +  
                  +
                  +
                  +
                  + +Add the public key certificate for the cache here. If the certificate has been +signed by an intermediate certificate authority, append it's public key +certificate at the end of the file. + +
                  +
                  + +
                  + +Add the unencrypted private key for the cache here. + +
                  +
                  + +
                  + +The cache communicates with DTR using TLS. If you've customized DTR +to use TLS certificates issued by a globally trusted certificate authority, +the cache automatically trusts DTR. + +But if you're using the default DTR configuration, or DTR is using TLS +certificates signed by your own certificate authority, you need to configure +the cache to trust DTR. + +Add the DTR CA certificate to the `certs/dtr.cert.pem` file. You can +do this by running: + +``` +curl -sk https:///ca > certs/dtr.cert.pem +``` + +
                  +
                  +
                  + +With this configuration, the cache fetches image layers from DTR and keeps +a local copy for 24 hours. After that, if a user requests that image layer, +the cache fetches it again from DTR. + +The cache is configured to persist data inside its container. +If something goes wrong with the cache service, Docker automatically redeploys a +new container, but previously cached data is not persisted. +You can [customize the storage parameters](/registry/configuration.md#storage), +if you want to store the image layers using a persistent storage backend. + +Also, the cache is configured to use port 443. If you're already using that +port in the swarm, update the deployment and configuration files to use another +port. Don't forget to create firewall rules for the port you choose. + +## Deploy the cache + +Now that everything is set up, you can deploy the cache by running: + +``` +docker stack deploy --compose-file docker-stack.yml dtr-cache +``` + +You can check if the cache has been successfully deployed by running: + +``` +docker stack ps dtr-cache +``` + +Docker should show the dtr-cache stack is running. + +## Register the cache with DTR + +Now that you've deployed a cache, you need to configure DTR to know about it. +This is done using the `POST /api/v0/content_caches` API. You can use the +DTR interactive API documentation to use this API. + +In the DTR web UI, click the top-right menu, and choose **API docs**. + +![](../../../images/deploy-caches-simple-2.png){: .with-border} + +Navigate to the `POST /api/v0/content_caches` line and click it to expand. +In the **body** field include: + +``` +{ + "name": "region-asia", + "host": "https://:" +} +``` + +Click the **Try it out!** button to make the API call. + +![](../../../images/deploy-caches-simple-3.png){: .with-border} + +## Configure your user account + +Now that you've registered the cache with DTR, users can configure +their user profile to pull images from DTR or the cache. + +In the DTR web UI, navigate to your **Account**, click the **Settings** +tab, and change the **Content Cache** settings to use the cache you deployed. + +![](../../../images/deploy-caches-simple-4.png){: .with-border} + +If you need to set this for multiple users at the same time, use the +`/api/v0/accounts/{username}/settings` API endpoint. + +Now when you pull images, you'll be using the cache. + +## Test that the cache is working + +To validate that the cache is working as expected: + +1. [Push an image to DTR](../../../user/manage-images/pull-and-push-images.md). +2. Make sure your user account is configured to use the cache. +3. Delete the image from your local system. +4. Pull the image from DTR. + + +To validate that the cache is actually serving your request, and to +troubleshoot misconfigurations, check the logs for the cache service +by running: + +``` +docker service logs --follow dtr-cache_cache +``` + +The most common causes of configuration are due to TLS authentication: +* DTR not trusting the cache TLS certificates. +* The cache not trusting DTR TLS certificates. +* Your machine not trusting DTR or the cache. + +When this happens, check the cache logs to troubleshoot the +misconfiguration. + +## Clean up sensitive files + +The certificates and private keys are now managed by Docker in a secure way. +Don't forget to delete sensitive files you've created on disk, like the +private keys for the cache: + +``` +rm -rf certs +``` diff --git a/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/strategy.md b/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/strategy.md new file mode 100644 index 0000000000..70453349af --- /dev/null +++ b/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/strategy.md @@ -0,0 +1,59 @@ +--- +title: Cache deployment strategy +description: Learn how to deploy DTR caches across multiple datacenters to make + image pulls faster. +keywords: DTR, cache +--- + +The main reason to use a DTR cache is so that users can pull images from +a service that's geographically closer to them. + +In this example a company has developers spread across three locations: United +States, Asia, and Europe. Developers working in the US office can pull their +images from DTR without problem, but developers in the Asia and Europe offices +complain that it takes them a long time to pulls images. + +![Offices](../../../images/deploy-caches-strategy-1.svg) + +To address that, you can deploy DTR caches in the Asia and Europe offices, so +that developers working from there can pull images much faster. + +## Deployment overview + +To deploy the DTR caches for this scenario, you need three datacenters: +* The US datacenter runs DTR configured for high availability. +* The Asia datacenter runs a DTR cache. +* The Europe datacenter runs another DTR cache. + +![Offices](../../../images/deploy-caches-strategy-2.svg) + +Both caches are configured to fetch images from DTR. + +## System requirements + +Before deploying a DTR cache in a datacenter, make sure you: + +* Provision multiple nodes and install Docker on them. +* Join the nodes into a Swarm. +* Have one or more dedicated worker nodes just for running the DTR cache. +* Have TLS certificates to use for securing the cache. +* Have a shared storage system, if you want the cache to be highly available. + +If you only plan on running a DTR cache on this datacenter, you just need +[Docker EE Basic](https://www.docker.com/pricing), which only includes the +Docker Engine. + +If you plan on running other workloads on this datacenter, consider deploying +[Docker EE Standard or Advanced](https://www.docker.com/pricing). +This way you can enforce fine-grain control over cluster resources, and makes it +easier to monitor and manage your applications. + +## Ports used + +You can customize the port used by the DTR cache, so you'll have to configure +your firewall rules to make sure users can access the cache using the port +you chose. + +By default the documentation guides you in deploying caches that are exposed +on port 443/TCP using the swarm routing mesh. + diff --git a/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/tls.md b/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/tls.md deleted file mode 100644 index 1087dc6186..0000000000 --- a/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/tls.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Deploy caches with TLS -description: Learn how to deploy and secure caches for Docker Trusted Registry, leveraging TLS -keywords: dtr, tls ---- - -When running DTR caches on a production environment, you should secure them -with TLS. In this example we're going to deploy a DTR cache that uses TLS. - -DTR caches use the same configuration file format used by Docker Registry. -You can learn more about the supported configuration in the -[Docker Registry documentation](/registry/configuration.md#tls). - - -## Get the TLS certificate and keys - -Before deploying a DTR cache with TLS you need to obtain a public key -certificate for the domain name where you deploy the cache, as well as -the public and private key files for that certificate. - -Once you have then, transfer those file to the host where you plan to deploy -the DTR cache. - - -## Create the cache configuration - -Use SSH to log into the host where you plan to deploy the DTR cache, and navigate to -the directory where you've stored the TLS certificate and keys. - -Create the `config.yml` file with the following content: - -``` -version: 0.1 -storage: - delete: - enabled: true - filesystem: - rootdirectory: /var/lib/registry -http: - addr: :5000 - tls: - certificate: /certs/dtr-cache-ca.pem - key: /certs/dtr-cache-key.pem -middleware: - registry: - - name: downstream - options: - blobttl: 24h - upstreams: - - https:// - cas: - - /certs/dtr-ca.pem -``` - -The configuration file mentions: - -* /certs/dtr-cache-ca.pem: this is the public key certificate the cache will use -* /certs/dtr-cache-key.pem: this is the TLS private key -* /certs/dtr-ca.pem is the CA certificate used by DTR - -Run this command to download the CA certificate used by DTR: - -``` -curl -k https:///ca > dtr-ca.pem -``` - -Now that we've got the cache configuration file and TLS certificates, we can -deploy the cache by running: - -```none -docker run --detach --restart always \ - --name dtr-cache \ - --publish 5000:5000 \ - --volume $(pwd)/dtr-cache-ca.pem:/certs/dtr-cache-ca.pem \ - --volume $(pwd)/dtr-cache-key.pem:/certs/dtr-cache-key.pem \ - --volume $(pwd)/dtr-ca.pem:/certs/dtr-ca.pem \ - --volume $(pwd)/config.yml:/config.yml \ - docker/dtr-content-cache:{{ page.dtr_version }} /config.yml -``` - -## Use Let's Encrypt - -You can also use Let's Encrypt to automatically generate TLS certificates that -are trusted by most clients. - -Learn more [about Let's Encrypt](https://letsencrypt.org/how-it-works/), and -how to -[create a configuration file that leverages it](/registry/configuration.md#letsencrypt). - - -## Where to go next - -* [Chain multiple caches](chaining.md) diff --git a/datacenter/dtr/2.5/guides/admin/configure/garbage-collection.md b/datacenter/dtr/2.5/guides/admin/configure/garbage-collection.md index 4c384d7d8c..7e7ebea8de 100644 --- a/datacenter/dtr/2.5/guides/admin/configure/garbage-collection.md +++ b/datacenter/dtr/2.5/guides/admin/configure/garbage-collection.md @@ -11,14 +11,42 @@ layers, thus saving you disk space. This process is also known as garbage collec ## How DTR deletes unused layers First you configure DTR to run a garbage collection job on a fixed schedule. At -the scheduled time: +the scheduled time DTR: -1. DTR becomes read-only. Images can be pulled, but pushes are not allowed. -2. DTR identifies and marks all unused image layers. -3. DTR deletes the marked image layers. +1. Identifies and marks unused image layers. +2. Deletes the marked image layers. -Since this process puts DTR in read-only mode and is CPU-intensive, you should -run garbage collection jobs outside business peak hours. +When garbage collection starts, DTR is put into read-only mode by default. + +## Improved garbage collection (Experimental) + +Starting in DTR 2.5, you can configure DTR to run garbage collection jobs +without putting DTR in read-only. This feature is still experimental. + +To enable this, navigate to the **DTR web interface**. Select **Settings > Garbage collection**. + +![upgrade garbage collection](../../images/garbage-collection-0.png){: .with-border} + +Once enabled, this setting can't be changed back. The upgrade process might +take a while depending on the amount of Docker images that you have stored. Garbage collection is temporarily +disabled during the upgrade to the experimental version. + +![upgrade garbage collection](../../images/garbage-collection-upgrade.png){: .with-border} + +### Metadata Store Migration + +After a successful upgrade, the system will run a `metadatastoremigration` job which is necessary for online garbage collection. If the migration fails, the system will retry twice. If all three attempts fail, you will have to retrigger the `metadatastoremigration` job manually via the API. To check for the status of the `metadatastoremigration` job: + +1. Select **API** from the bottom left navigation pane of the DTR web interface. + +2. Scroll down to the **Jobs** resource and use the `GET /api/v0/jobs` endpoint. + +3. Filter by action `metadatastoremigration` and click "Execute". You should see the resulting `curl` request and the job status in the **Server response**. + +```bash +curl -X GET "https:///api/v0/jobs?action=metadatastoremigration&worker=any&running=any" -H "accept: application/json" +``` +To retrigger the job manually, see [2.5 to 2.6 upgrade](../upgrade#25-to-26-upgrade). To learn more about troubleshooting jobs using the API, see [Audit Jobs via the API](/ee/dtr/admin/manage-jobs/audit-jobs-via-api/). ## Schedule garbage collection @@ -39,12 +67,13 @@ configure its schedule (in UTC time) using the cron format. Once everything is configured you can chose to **Save & start** to immediately run the garbage collection job, or just **Save** to run the job on the next -scheduled interval. +scheduled interval. If you've upgraded to [the experimental version](#improved-garbage-collection), you +should be able to push and pull images while garbage collection is running. ## Stop the garbage collection job Once the garbage collection job starts running, a banner is displayed on the -web UI explaining that users can't push images. If you're an administrator, you can click the banner to stop the garbage +web interface explaining that users can't push images. If you're an administrator, you can click the banner to stop the garbage collection job. ![](../../images/garbage-collection-3.png){: .with-border} @@ -73,7 +102,7 @@ files of that image tag since it's possible that there are other tags that also use the same files. To delete unused image layers, DTR: -1. Becomes read-only to make sure that no one can push an image, thus +1. Becomes read-only to make sure that no one is able to push an image, thus changing the underlying files in the filesystem. 2. Check all the manifest files and keep a record of the files that are referenced. @@ -82,4 +111,5 @@ can be safely deleted. ## Where to go next -* [Deploy DTR caches](deploy-caches/index.md) +- [Deploy DTR caches](deploy-caches/index.md) +- [Upgrade DTR](../upgrade/) diff --git a/datacenter/dtr/2.5/guides/admin/configure/license-your-installation.md b/datacenter/dtr/2.5/guides/admin/configure/license-your-installation.md index 3c14e283a5..a976e7e827 100644 --- a/datacenter/dtr/2.5/guides/admin/configure/license-your-installation.md +++ b/datacenter/dtr/2.5/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.5/guides/admin/configure/set-up-vulnerability-scans.md b/datacenter/dtr/2.5/guides/admin/configure/set-up-vulnerability-scans.md index 7f8c754b8f..43063ab033 100644 --- a/datacenter/dtr/2.5/guides/admin/configure/set-up-vulnerability-scans.md +++ b/datacenter/dtr/2.5/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 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 @@ -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 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. @@ -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.5/guides/admin/install/index.md b/datacenter/dtr/2.5/guides/admin/install/index.md index c09d036e3f..c8c308d515 100644 --- a/datacenter/dtr/2.5/guides/admin/install/index.md +++ b/datacenter/dtr/2.5/guides/admin/install/index.md @@ -29,7 +29,7 @@ You can't install DTR on a standalone Docker Engine. ## Step 3. Install DTR -Once UCP is installed, navigate to the **UCP web UI**. In the **Admin Settings**, +Once UCP is installed, navigate to the **UCP web interface**. In the **Admin Settings**, choose **Docker Trusted Registry**. ![](../../images/install-dtr-2.png){: .with-border} @@ -52,17 +52,17 @@ You can run that snippet on any node where Docker is installed. As an example you can SSH into a UCP node and run the DTR installer from there. By default the installer runs in interactive mode and prompts you for any additional information that is necessary. -[Learn more about the installer](../../../reference/cli/install.md). +[Learn more about the installer](/datacenter/dtr/2.5/reference/cli/install). ## Step 4. Check that DTR is running In your browser, navigate to the Docker **Universal Control Plane** -web UI, and navigate to the **Applications** screen. DTR should be listed +web interface, and navigate to the **Applications** screen. DTR should be listed as an application. ![](../../images/install-dtr-3.png){: .with-border} -You can also access the **DTR web UI**, to make sure it is working. In your +You can also access the **DTR web interface** to make sure it is working. In your browser, navigate to the address where you installed DTR. ![](../../images/install-dtr-4.png){: .with-border} @@ -120,7 +120,7 @@ To add replicas to a DTR cluster, use the `docker/dtr join` command: 3. Check that all replicas are running. In your browser, navigate to the Docker **Universal Control Plane** - web UI, and navigate to the **Applications** screen. All replicas should + web interface, and navigate to the **Applications** screen. All replicas should be displayed. ![](../../images/install-dtr-6.png){: .with-border} diff --git a/datacenter/dtr/2.5/guides/admin/upgrade.md b/datacenter/dtr/2.5/guides/admin/upgrade.md index 4e0aa8c667..824e09b687 100644 --- a/datacenter/dtr/2.5/guides/admin/upgrade.md +++ b/datacenter/dtr/2.5/guides/admin/upgrade.md @@ -43,12 +43,12 @@ Before starting your upgrade, make sure that: * The version of UCP you are using is supported by the version of DTR you are trying to upgrade to. [Check the compatibility matrix](https://success.docker.com/Policies/Compatibility_Matrix). * You have a recent [DTR backup](backups-and-disaster-recovery.md). -* You [disable Docker content trust in UCP](/datacenter/ucp/2.2/guides/admin/configure/run-only-the-images-you-trust.md). +* You [disable Docker content trust in UCP](/datacenter/ucp/3.0/guides/admin/configure/run-only-the-images-you-trust). ### Step 1. Upgrade DTR to {{ previous_version }} if necessary Make sure you're running DTR {{ previous_version }}. If that's not the case, -[upgrade your installation to the {{ previous_version }} version](/datacenter/dtr/{{ previous_version }}/guides/admin/upgrade.md). +[upgrade your installation to the {{ previous_version }} version](/datacenter/dtr/{{ previous_version }}/guides/admin/upgrade/#step-2-upgrade-dtr). ### Step 2. Upgrade DTR @@ -85,6 +85,15 @@ command and it will resume from where it left off. A patch upgrade changes only the DTR containers and it's always safer than a minor upgrade. The command is the same as for a minor upgrade. +## DTR cache upgrade + +If you have previously [deployed a cache](/datacenter/dtr/2.5/guides/admin/configure/deploy-caches/), make sure to [upgrade the node dedicated for your cache](/v18.03/ee/upgrade/) to keep it in sync with your upstream DTR replicas. This prevents authentication errors and other weird behaviors. + +## Download the vulnerability database + +After upgrading DTR, you need to re-download the vulnerability database. +[Learn how to update your vulnerability database](configure/set-up-vulnerability-scans.md#update-the-cve-scanning-database). + ## Where to go next * [Release notes](../release-notes.md) diff --git a/datacenter/dtr/2.5/guides/images/deploy-caches-1.svg b/datacenter/dtr/2.5/guides/images/deploy-caches-1.svg new file mode 100644 index 0000000000..12b7b6962f --- /dev/null +++ b/datacenter/dtr/2.5/guides/images/deploy-caches-1.svg @@ -0,0 +1,70 @@ + + + + cache-overview-1 + Created with Sketch. + + + + + + + Asia office + + + + + + + + + + + + > docker pull + + dtr.example.org/ + website/ui:3-stable + + + localhost + + + + + + + + + + + ! + + + slow + + + + + DTR cluster (US) + + + + + 1 + 2 + 3-stable + + + + website/ui + + + + + + + + + + diff --git a/datacenter/dtr/2.5/guides/images/deploy-caches-2.svg b/datacenter/dtr/2.5/guides/images/deploy-caches-2.svg new file mode 100644 index 0000000000..83257670a9 --- /dev/null +++ b/datacenter/dtr/2.5/guides/images/deploy-caches-2.svg @@ -0,0 +1,90 @@ + + + + cache-overview-2 + Created with Sketch. + + + + + + + Asia office + + + + + + + + 3. pull image + layers + + + + + + + + + + cache-asia + + + + + + + + + + + + + + + + + + + + + + + + + 2. redirect + + + + + + + 1. authenticate + + + + + + DTR cluster (US) - dtr.example.org + + + + + 1 + 2 + 3-stable + + + + website/ui + + + + + + + + + + diff --git a/datacenter/dtr/2.5/guides/images/deploy-caches-3.svg b/datacenter/dtr/2.5/guides/images/deploy-caches-3.svg new file mode 100644 index 0000000000..a2ad09255a --- /dev/null +++ b/datacenter/dtr/2.5/guides/images/deploy-caches-3.svg @@ -0,0 +1,78 @@ + + + + cache-overview-3 + Created with Sketch. + + + + + + + DTR at prod.example.org + + + + + + + + + + dev team + + + + + + + DTR at qa.example.org + + + + + + + + + + dev team + + + + + + + + + promote + + + + + DTR at dev.example.org + + + + + + + + + + dev team + + + + + + + + + promote + + + + + + diff --git a/datacenter/dtr/2.5/guides/images/deploy-caches-ha-1.svg b/datacenter/dtr/2.5/guides/images/deploy-caches-ha-1.svg new file mode 100644 index 0000000000..7ad79799fd --- /dev/null +++ b/datacenter/dtr/2.5/guides/images/deploy-caches-ha-1.svg @@ -0,0 +1,347 @@ + + + + deploy-caches-ha-1 + Created with Sketch. + + + + + + + + + + + + + + + + + + + + Asia datacenter + + + + + shared storage + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + DTR cache + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + DTR cache + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + DTR cache + + + + + + + + + + your load balancer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + US datacenter + + + + + + shared storage + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + UCP agent + + + + + + DTR replica + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + UCP agent + + + + + + DTR replica + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + UCP agent + + + + + + DTR replica + + + + + + + + + + your load balancer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UI + + + + + + CLI + + + + + + + + + + pull from + upstream + + + + + + Europe datacenter + + + + + + + + + diff --git a/datacenter/dtr/2.5/guides/images/deploy-caches-simple-1.svg b/datacenter/dtr/2.5/guides/images/deploy-caches-simple-1.svg new file mode 100644 index 0000000000..e82c6f241e --- /dev/null +++ b/datacenter/dtr/2.5/guides/images/deploy-caches-simple-1.svg @@ -0,0 +1,274 @@ + + + + deploy-cache-simple-3 + Created with Sketch. + + + + + + + + + + + + + + + Europe datacenter + + + + + + + + + + Asia datacenter + + + dtr.cache=true + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + DTR cache + + + + + + + + + + pull from + upstream + + + + + US datacenter - dtr.example.org + + + + + + shared storage + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + UCP agent + + + + + + DTR replica + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + UCP agent + + + + + + DTR replica + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + UCP agent + + + + + + DTR replica + + + + + + + + + + your load balancer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UI + + + + + + CLI + + + + + + + + + diff --git a/datacenter/dtr/2.5/guides/images/deploy-caches-simple-2.png b/datacenter/dtr/2.5/guides/images/deploy-caches-simple-2.png new file mode 100644 index 0000000000..f8afa83519 Binary files /dev/null and b/datacenter/dtr/2.5/guides/images/deploy-caches-simple-2.png differ diff --git a/datacenter/dtr/2.5/guides/images/deploy-caches-simple-3.png b/datacenter/dtr/2.5/guides/images/deploy-caches-simple-3.png new file mode 100644 index 0000000000..cb187852e3 Binary files /dev/null and b/datacenter/dtr/2.5/guides/images/deploy-caches-simple-3.png differ diff --git a/datacenter/dtr/2.5/guides/images/deploy-caches-simple-4.png b/datacenter/dtr/2.5/guides/images/deploy-caches-simple-4.png new file mode 100644 index 0000000000..29a574598a Binary files /dev/null and b/datacenter/dtr/2.5/guides/images/deploy-caches-simple-4.png differ diff --git a/datacenter/dtr/2.5/guides/images/deploy-caches-strategy-1.svg b/datacenter/dtr/2.5/guides/images/deploy-caches-strategy-1.svg new file mode 100644 index 0000000000..535366d350 --- /dev/null +++ b/datacenter/dtr/2.5/guides/images/deploy-caches-strategy-1.svg @@ -0,0 +1,38 @@ + + + + deploy-cache-simple-1 + Created with Sketch. + + + + + + + + + + + + DTR cache + (Europe) + + + + + + DTR cache + (Asia) + + + + + + DTR cluster + (US) + + + + + + diff --git a/datacenter/dtr/2.5/guides/images/deploy-caches-strategy-2.svg b/datacenter/dtr/2.5/guides/images/deploy-caches-strategy-2.svg new file mode 100644 index 0000000000..6774f9524d --- /dev/null +++ b/datacenter/dtr/2.5/guides/images/deploy-caches-strategy-2.svg @@ -0,0 +1,341 @@ + + + + deploy-cache-simple-2 + Created with Sketch. + + + + + + + + + + + + + + + Europe datacenter + + + dtr.cache=true + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + DTR cache + + + + + + + + + Asia datacenter + + + dtr.cache=true + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + DTR cache + + + + + + + + + + pull from + upstream + + + + + + + pull from + upstream + + + + + US datacenter - dtr.example.org + + + + + + shared storage + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + UCP agent + + + + + + DTR replica + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + UCP agent + + + + + + DTR replica + + + + + + + + + + worker node + + + + + + + Docker EE Engine + + + + + + UCP agent + + + + + + DTR replica + + + + + + + + + + your load balancer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UI + + + + + + CLI + + + + + + + + + diff --git a/datacenter/dtr/2.5/guides/images/garbage-collection-0.png b/datacenter/dtr/2.5/guides/images/garbage-collection-0.png new file mode 100644 index 0000000000..eb404c0469 Binary files /dev/null and b/datacenter/dtr/2.5/guides/images/garbage-collection-0.png differ diff --git a/datacenter/dtr/2.5/guides/images/garbage-collection-upgrade.png b/datacenter/dtr/2.5/guides/images/garbage-collection-upgrade.png new file mode 100644 index 0000000000..0d2e747ce4 Binary files /dev/null and b/datacenter/dtr/2.5/guides/images/garbage-collection-upgrade.png differ diff --git a/datacenter/dtr/2.5/guides/user/manage-images/sign-images/index.md b/datacenter/dtr/2.5/guides/user/manage-images/sign-images/index.md index cef1a76464..2b72a73769 100644 --- a/datacenter/dtr/2.5/guides/user/manage-images/sign-images/index.md +++ b/datacenter/dtr/2.5/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.5/reference/cli/backup.md b/datacenter/dtr/2.5/reference/cli/backup.md index 96a95e17d7..e262f67c31 100644 --- a/datacenter/dtr/2.5/reference/cli/backup.md +++ b/datacenter/dtr/2.5/reference/cli/backup.md @@ -2,6 +2,8 @@ title: docker/dtr backup description: Create a backup of DTR keywords: dtr, cli, backup +redirect_from: + - /reference/dtr/2.5/cli/backup/ --- Create a backup of DTR diff --git a/datacenter/dtr/2.5/reference/cli/destroy.md b/datacenter/dtr/2.5/reference/cli/destroy.md index b24252fb94..e6219aba0b 100644 --- a/datacenter/dtr/2.5/reference/cli/destroy.md +++ b/datacenter/dtr/2.5/reference/cli/destroy.md @@ -2,6 +2,8 @@ title: docker/dtr destroy description: Destroy a DTR replica's data keywords: dtr, cli, destroy +redirect_from: + - /reference/dtr/2.5/cli/destroy/ --- Destroy a DTR replica's data diff --git a/datacenter/dtr/2.5/reference/cli/emergency-repair.md b/datacenter/dtr/2.5/reference/cli/emergency-repair.md index be8b936349..d8a5c15f02 100644 --- a/datacenter/dtr/2.5/reference/cli/emergency-repair.md +++ b/datacenter/dtr/2.5/reference/cli/emergency-repair.md @@ -2,6 +2,8 @@ title: docker/dtr emergency-repair description: Recover DTR from loss of quorum keywords: dtr, cli, emergency-repair +redirect_from: + - /reference/dtr/2.5/cli/emergency-repair/ --- Recover DTR from loss of quorum diff --git a/datacenter/dtr/2.5/reference/cli/images.md b/datacenter/dtr/2.5/reference/cli/images.md index 3d1a8cd306..77714a77ed 100644 --- a/datacenter/dtr/2.5/reference/cli/images.md +++ b/datacenter/dtr/2.5/reference/cli/images.md @@ -2,6 +2,8 @@ title: docker/dtr images description: List all the images necessary to install DTR keywords: dtr, cli, images +redirect_from: + - /reference/dtr/2.5/cli/images/ --- List all the images necessary to install DTR diff --git a/datacenter/dtr/2.5/reference/cli/index.md b/datacenter/dtr/2.5/reference/cli/index.md index 0a40303483..b4393aa2ca 100644 --- a/datacenter/dtr/2.5/reference/cli/index.md +++ b/datacenter/dtr/2.5/reference/cli/index.md @@ -2,6 +2,8 @@ title: docker/dtr overview description: Learn about the commands available in the docker/dtr image. keywords: dtr, install, uninstall, configure +redirect_from: + - /reference/dtr/2.5/cli/ --- This tool has commands to install, configure, and backup Docker diff --git a/datacenter/dtr/2.5/reference/cli/install.md b/datacenter/dtr/2.5/reference/cli/install.md index 4db1f660bf..df72bbfe2a 100644 --- a/datacenter/dtr/2.5/reference/cli/install.md +++ b/datacenter/dtr/2.5/reference/cli/install.md @@ -2,6 +2,8 @@ title: docker/dtr install description: Install Docker Trusted Registry keywords: dtr, cli, install +redirect_from: + - /reference/dtr/2.5/cli/install/ --- Install Docker Trusted Registry @@ -23,9 +25,11 @@ After installing DTR, you can join additional DTR replicas using `docker/dtr joi ### Example Usage -$ docker run -it --rm docker/dtr install \ - --ucp-node \ - --ucp-insecure-tls +```bash +docker run -it --rm docker/dtr install \ +--ucp-node \ +--ucp-insecure-tls +``` Note: Use `--ucp-ca "$(cat ca.pem)"` instead of `--ucp-insecure-tls` for a production deployment. @@ -34,10 +38,10 @@ Note: Use `--ucp-ca "$(cat ca.pem)"` instead of `--ucp-insecure-tls` for a produ | Option | Environment Variable | Description | |:------------------------------|:--------------------------|:-------------------------------------------------------------------------------------| | `--debug` | $DEBUG | Enable debug mode for additional logs. | -| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS CA certificate with `--dtr-ca "$(cat ca.pem)"`. | -| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS certificate with `--dtr-cert "$(cat ca.pem)"`. | +| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own root CA public certificate with `--dtr-ca "$(cat ca.pem)"`. | +| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own public key certificate with `--dtr-cert "$(cat cert.pem)"`. If the certificate has been signed by an intermediate certificate authority, append its public key certificate at the end of the file to establish a chain of trust. | | `--dtr-external-url` | $DTR_EXTERNAL_URL | URL of the host or load balancer clients use to reach DTR. When you use this flag, users are redirected to UCP for logging in. Once authenticated they are redirected to the URL you specify in this flag. If you don't use this flag, DTR is deployed without single sign-on with UCP. Users and teams are shared but users log in separately into the two applications. You can enable and disable single sign-on within your DTR system settings. Format `https://host[:port]`, where port is the value you used with `--replica-https-port`. | -| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with `--dtr-key "$(cat ca.pem)"`. | +| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with `--dtr-key "$(cat key.pem)"`. | | `--dtr-storage-volume` | $DTR_STORAGE_VOLUME | Customize the volume to store Docker images. By default DTR creates a volume to store the Docker images in the local filesystem of the node where DTR is running, without high-availability. Use this flag to specify a full path or volume name for DTR to store images. For high-availability, make sure all DTR replicas can read and write data on this volume. If you're using NFS, use `--nfs-storage-url` instead. | | `--enable-pprof` | $DTR_PPROF | Enables pprof profiling of the server. Use `--enable-pprof=false` to disable it. Once DTR is deployed with this flag, you can access the `pprof` endpoint for the api server at `/debug/pprof`, and the registry endpoint at `/registry_debug_pprof/debug/pprof`. | | `--help-extended` | $DTR_EXTENDED_HELP | Display extended help text for a given command. | diff --git a/datacenter/dtr/2.5/reference/cli/join.md b/datacenter/dtr/2.5/reference/cli/join.md index 80373de3e2..d4ee946fd1 100644 --- a/datacenter/dtr/2.5/reference/cli/join.md +++ b/datacenter/dtr/2.5/reference/cli/join.md @@ -2,9 +2,20 @@ title: docker/dtr join description: Add a new replica to an existing DTR cluster keywords: dtr, cli, join +redirect_from: + - /reference/dtr/2.5/cli/join/ --- -Add a new replica to an existing DTR cluster +Add a new replica to an existing DTR cluster. Use SSH to log into any node that is already part of UCP. + +## Usage + +```bash +docker run -it --rm \ + docker/dtr:2.5.6 join \ + --ucp-node \ + --ucp-insecure-tls +``` diff --git a/datacenter/dtr/2.5/reference/cli/reconfigure.md b/datacenter/dtr/2.5/reference/cli/reconfigure.md index d576f1c4c0..e10f9b9634 100644 --- a/datacenter/dtr/2.5/reference/cli/reconfigure.md +++ b/datacenter/dtr/2.5/reference/cli/reconfigure.md @@ -2,6 +2,8 @@ title: docker/dtr reconfigure description: Change DTR configurations keywords: dtr, cli, reconfigure +redirect_from: + - /reference/dtr/2.5/cli/reconfigure/ --- Change DTR configurations @@ -27,10 +29,11 @@ time, configure your DTR for high availability. | Option | Environment Variable | Description | |:------------------------------|:--------------------------|:-------------------------------------------------------------------------------------| | `--debug` | $DEBUG | Enable debug mode for additional logs. | -| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR.By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS CA certificate with --dtr-ca "$(cat ca.pem)". | -| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR.By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS certificate with --dtr-cert "$(cat ca.pem)". | +| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own root CA public certificate with `--dtr-ca "$(cat ca.pem)"`. | +| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own public key certificate with `--dtr-cert "$(cat cert.pem)"`. If the certificate has been signed by an intermediate certificate authority, append its public key certificate at the end of the file to establish a chain of trust. | | `--dtr-external-url` | $DTR_EXTERNAL_URL | URL of the host or load balancer clients use to reach DTR. When you use this flag, users are redirected to UCP for logging in. Once authenticated they are redirected to the url you specify in this flag. If you don't use this flag, DTR is deployed without single sign-on with UCP. Users and teams are shared but users login separately into the two applications. You can enable and disable single sign-on in the DTR settings. Format `https://host[:port]`, where port is the value you used with `--replica-https-port`. | | `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with `--dtr-key "$(cat ca.pem)"`. | +| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with `--dtr-key "$(cat key.pem)"`. | | `--dtr-storage-volume` | $DTR_STORAGE_VOLUME | Customize the volume to store Docker images. By default DTR creates a volume to store the Docker images in the local filesystem of the node where DTR is running, without high-availability. Use this flag to specify a full path or volume name for DTR to store images. For high-availability, make sure all DTR replicas can read and write data on this volume. If you're using NFS, use `--nfs-storage-url` instead. | | `--enable-pprof` | $DTR_PPROF | Enables pprof profiling of the server. Use `--enable-pprof=false` to disable it. Once DTR is deployed with this flag, you can access the pprof endpoint for the api server at `/debug/pprof`, and the registry endpoint at `/registry_debug_pprof/debug/pprof`. | | `--existing-replica-id` | $DTR_REPLICA_ID | The ID of an existing DTR replica. To add, remove or modify DTR, you must connect to an existing healthy replica's database. | diff --git a/datacenter/dtr/2.5/reference/cli/remove.md b/datacenter/dtr/2.5/reference/cli/remove.md index cc8720cb1e..32bb7105cb 100644 --- a/datacenter/dtr/2.5/reference/cli/remove.md +++ b/datacenter/dtr/2.5/reference/cli/remove.md @@ -2,6 +2,8 @@ title: docker/dtr remove description: Remove a DTR replica from a cluster keywords: dtr, cli, remove +redirect_from: + - /reference/dtr/2.5/cli/remove/ --- Remove a DTR replica from a cluster diff --git a/datacenter/dtr/2.5/reference/cli/restore.md b/datacenter/dtr/2.5/reference/cli/restore.md index 94a6071668..1a2308964a 100644 --- a/datacenter/dtr/2.5/reference/cli/restore.md +++ b/datacenter/dtr/2.5/reference/cli/restore.md @@ -2,6 +2,8 @@ title: docker/dtr restore description: Install and restore DTR from an existing backup keywords: dtr, cli, restore +redirect_from: + - /reference/dtr/2.5/cli/restore/ --- Install and restore DTR from an existing backup diff --git a/datacenter/dtr/2.5/reference/cli/upgrade.md b/datacenter/dtr/2.5/reference/cli/upgrade.md index 122f925ee7..566fc9bc41 100644 --- a/datacenter/dtr/2.5/reference/cli/upgrade.md +++ b/datacenter/dtr/2.5/reference/cli/upgrade.md @@ -2,6 +2,8 @@ title: docker/dtr upgrade description: Upgrade DTR 2.4.x cluster to this version keywords: dtr, cli, upgrade +redirect_from: + - /reference/dtr/2.5/cli/upgrade/ --- Upgrade DTR 2.4.x cluster to this version 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..de80ce824a 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://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/datacenter/ucp/2.2/guides/admin/install/install-offline.md b/datacenter/ucp/2.2/guides/admin/install/install-offline.md index c917cae8ff..964744d514 100644 --- a/datacenter/ucp/2.2/guides/admin/install/install-offline.md +++ b/datacenter/ucp/2.2/guides/admin/install/install-offline.md @@ -38,6 +38,15 @@ line: $ wget -O ucp.tar.gz ``` +### Download a specific version + +> ***Note***: Offline packages for UCP 2.2.x are available for different OS distributions. +> Copy the URL of your specific OS and version to work with the example below. + +``` +$ wget https://packages.docker.com/caas/ucp_images_2.2.14.tar.gz -O ucp_2.2.14.tar.gz +``` + Now that you have the package in your local machine, you can transfer it to the machines where you want to install UCP. diff --git a/datacenter/ucp/2.2/guides/admin/monitor-and-troubleshoot/troubleshoot-configurations.md b/datacenter/ucp/2.2/guides/admin/monitor-and-troubleshoot/troubleshoot-configurations.md index 7cbd05d5e6..0b71cd12b4 100644 --- a/datacenter/ucp/2.2/guides/admin/monitor-and-troubleshoot/troubleshoot-configurations.md +++ b/datacenter/ucp/2.2/guides/admin/monitor-and-troubleshoot/troubleshoot-configurations.md @@ -132,7 +132,7 @@ NUM_MANAGERS=$(docker node ls --filter role=manager -q | wc -l) VERSION=$(docker image ls --format '{{.Tag}}' docker/ucp-auth | head -n 1) # This reconfigure-db command will repair the RethinkDB cluster to have a # number of replicas equal to the number of manager nodes in the cluster. -docker container run --rm -v ucp-auth-store-certs:/tls docker/ucp-auth:${VERSION} --db-addr=${NODE_ADDRESS}:12383 --debug reconfigure-db --num-replicas ${NUM_MANAGERS} --emergency-repair +docker container run --rm -v ucp-auth-store-certs:/tls docker/ucp-auth:${VERSION} --db-addr=${NODE_ADDRESS}:12383 --debug reconfigure-db --num-replicas ${NUM_MANAGERS} time="2017-07-14T20:46:09Z" level=debug msg="Connecting to db ..." time="2017-07-14T20:46:09Z" level=debug msg="connecting to DB Addrs: [192.168.1.25:12383]" @@ -143,6 +143,11 @@ time="2017-07-14T20:46:09Z" level=debug msg="(01/16) Emergency Repaired Table \" ``` {% endraw %} +> #### Loss of Quorum in RethinkDB Tables +> +> When there is loss of quorum in any of the RethinkDB tables, run the `reconfigure-db` command +> with the `--emergency-repair` flag. + ## Where to go next * [Get support](../../get-support.md) diff --git a/datacenter/ucp/3.0/guides/access-control/deploy-view-only-service.md b/datacenter/ucp/3.0/guides/access-control/deploy-view-only-service.md index 6336ed7f30..2fe06fcce6 100644 --- a/datacenter/ucp/3.0/guides/access-control/deploy-view-only-service.md +++ b/datacenter/ucp/3.0/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 the 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/3.0/guides/admin/configure/integrate-with-dtr.md b/datacenter/ucp/3.0/guides/admin/configure/integrate-with-dtr.md index 99ce3844de..36a5ac5df1 100644 --- a/datacenter/ucp/3.0/guides/admin/configure/integrate-with-dtr.md +++ b/datacenter/ucp/3.0/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/3.0/guides/admin/configure/license-your-installation.md b/datacenter/ucp/3.0/guides/admin/configure/license-your-installation.md index 8f0956a682..fecaea8d06 100644 --- a/datacenter/ucp/3.0/guides/admin/configure/license-your-installation.md +++ b/datacenter/ucp/3.0/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,9 +17,9 @@ 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 +In the UCP web interface, log in with administrator credentials and navigate to the **Admin Settings** page. In the left pane, click **License** and click **Upload License**. The diff --git a/datacenter/ucp/3.0/guides/admin/install/index.md b/datacenter/ucp/3.0/guides/admin/install/index.md index 6800f815ca..1e280c4e0b 100644 --- a/datacenter/ucp/3.0/guides/admin/install/index.md +++ b/datacenter/ucp/3.0/guides/admin/install/index.md @@ -79,7 +79,7 @@ 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) + [Docker Hub](https://www.docker.com/enterprise-edition) and buy a Docker EE subscription, or get a free trial license. 2. In your browser, navigate to the UCP web UI, log in with your @@ -103,7 +103,7 @@ for worker nodes to execute. To join manager nodes to the swarm, -1. In the UCP web UI, navigate to the **Nodes** page, and click the +1. In the UCP web interface, navigate to the **Nodes** page, and click the **Add Node** button to add a new node. ![](../../images/nodes-page-ucp.png){: .with-border} @@ -131,7 +131,7 @@ To join manager nodes to the swarm, 5. For each manager node that you want to join to the swarm, log in using ssh and run the join command that you copied. After the join command - completes, the node appears on the **Nodes** page in the UCP web UI. + completes, the node appears on the **Nodes** page in the UCP web interface. ## Step 7: Join worker nodes diff --git a/datacenter/ucp/3.0/guides/admin/install/install-offline.md b/datacenter/ucp/3.0/guides/admin/install/install-offline.md index c917cae8ff..40bdf4971c 100644 --- a/datacenter/ucp/3.0/guides/admin/install/install-offline.md +++ b/datacenter/ucp/3.0/guides/admin/install/install-offline.md @@ -27,7 +27,7 @@ installation will fail. Use a computer with internet access to download the UCP package from the following links. -{% include components/ddc_url_list_2.html product="ucp" version="2.2" %} +{% include components/ddc_url_list_2.html product="ucp" version="3.0" %} ## Download the offline package diff --git a/datacenter/ucp/3.0/guides/admin/install/install-on-azure.md b/datacenter/ucp/3.0/guides/admin/install/install-on-azure.md new file mode 100644 index 0000000000..1d256bf6c8 --- /dev/null +++ b/datacenter/ucp/3.0/guides/admin/install/install-on-azure.md @@ -0,0 +1,290 @@ +--- +title: Install UCP on Azure +description: Learn how to install Docker Universal Control Plane in a Microsoft Azure environment. +keywords: Universal Control Plane, UCP, install, Docker EE, Azure, Kubernetes +--- + +Docker UCP closely integrates into Microsoft Azure for its Kubernetes Networking +and Persistent Storage feature set. UCP deploys the Calico CNI provider, in Azure +the Calico CNI leverages the Azure networking infrastructure for data path +networking and the Azure IPAM for IP address management. There are +infrastructure prerequisites that are required prior to UCP installation for the +Calico / Azure integration. + +## Docker UCP Networking + +Docker UCP configures the Azure IPAM module for Kubernetes to allocate +IP addresses to Kubernetes pods. The Azure IPAM module requires each Azure +VM that's part of the Kubernetes cluster to be configured with a pool of +IP addresses. + +You have two options for deploying the VMs for the Kubernetes cluster on Azure: +- Install the cluster on Azure stand-alone virtual machines. Docker UCP provides + an [automated mechanism](#configure-ip-pools-for-azure-stand-alone-vms) + to configure and maintain IP pools for stand-alone Azure VMs. +- Install the cluster on an Azure virtual machine scale set. Configure the + IP pools by using an ARM template like + [this one](#set-up-ip-configurations-on-an-azure-virtual-machine-scale-set). + +The steps for setting up IP address management are different in the two +environments. If you're using a scale set, you set up `ipConfigurations` +in an ARM template. If you're using stand-alone VMs, you set up IP pools +for each VM by using a utility container that's configured to run as a +global Swarm service, which Docker provides. + +## Azure Prerequisites + +The following list of infrastructure prerequisites need to be met in order +to successfully deploy Docker UCP on Azure. + +- All UCP Nodes (Managers and Workers) need to be deployed into the same +Azure Resource Group. The Azure Networking (Vnets, Subnets, Security Groups) +components could be deployed in a second Azure Resource Group. +- All UCP Nodes (Managers and Workers) need to be attached to the same +Azure Subnet. +- All UCP (Managers and Workers) need to be tagged in Azure with the +`Orchestrator` tag. Note the value for this tag is the Kubernetes version number +in the format `Orchestrator=Kubernetes:x.y.z`. This value may change in each +UCP release. To find the relevant version please see the UCP +[Release Notes](../../release-notes). For example for UCP 3.0.6 the tag +would be `Orchestrator=Kubernetes:1.8.15`. +- The Azure Computer Name needs to match the Node Operating System's Hostname. +Note this applies to the FQDN of the host including domain names. +- An Azure Service Principal with `Contributor` access to the Azure Resource +Group hosting the UCP Nodes. Note, if using a separate networking Resource +Group the same Service Principal will need `Network Contributor` access to this +Resource Group. + +The following information will be required for the installation: + +- `subscriptionId` - The Azure Subscription ID in which the UCP +objects are being deployed. +- `tenantId` - The Azure Active Directory Tenant ID in which the UCP +objects are being deployed. +- `aadClientId` - The Azure Service Principal ID +- `aadClientSecret` - The Azure Service Principal Secret Key + +### Azure Configuration File + +For Docker UCP to integrate in to Microsoft Azure, an Azure configuration file +will need to be placed within each UCP node in your cluster. This file +will need to be placed at `/etc/kubernetes/azure.json`. + +See the template below. Note entries that do not contain `****` should not be +changed. + +``` +{ + "cloud":"AzurePublicCloud", + "tenantId": "***", + "subscriptionId": "***", + "aadClientId": "***", + "aadClientSecret": "***", + "resourceGroup": "***", + "location": "****", + "subnetName": "/****", + "securityGroupName": "****", + "vnetName": "****", + "cloudProviderBackoff": false, + "cloudProviderBackoffRetries": 0, + "cloudProviderBackoffExponent": 0, + "cloudProviderBackoffDuration": 0, + "cloudProviderBackoffJitter": 0, + "cloudProviderRatelimit": false, + "cloudProviderRateLimitQPS": 0, + "cloudProviderRateLimitBucket": 0, + "useManagedIdentityExtension": false, + "useInstanceMetadata": true +} +``` + +There are some optional values for Azure deployments: + +- `"primaryAvailabilitySetName": "****",` - The Worker Nodes availability set. +- `"vnetResourceGroup": "****",` - If your Azure Network objects live in a +seperate resource group. +- `"routeTableName": "****",` - If you have defined multiple Route tables within +an Azure subnet. + +More details on this configuration file can be found +[here](https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/azure/azure.go). + + + +## Considerations for IPAM Configuration + +The subnet and the virtual network associated with the primary interface of +the Azure VMs need to be configured with a large enough address prefix/range. +The number of required IP addresses depends on the number of pods running +on each node and the number of nodes in the cluster. + +For example, in a cluster of 256 nodes, to run a maximum of 128 pods +concurrently on a node, make sure that the address space of the subnet and the +virtual network can allocate at least 128 * 256 IP addresses, _in addition to_ +initial IP allocations to VM NICs during Azure resource creation. + +Accounting for IP addresses that are allocated to NICs during VM bring-up, set +the address space of the subnet and virtual network to 10.0.0.0/16. This +ensures that the network can dynamically allocate at least 32768 addresses, +plus a buffer for initial allocations for primary IP addresses. + +> Azure IPAM, UCP, and Kubernetes +> +> The Azure IPAM module queries an Azure virtual machine's metadata to obtain +> a list of IP addresses that are assigned to the virtual machine's NICs. The +> IPAM module allocates these IP addresses to Kubernetes pods. You configure the +> IP addresses as `ipConfigurations` in the NICs associated with a virtual machine +> or scale set member, so that Azure IPAM can provide them to Kubernetes when +> requested. +{: .important} + +#### Additional Notes + +- The `IP_COUNT` variable defines the subnet size for each node's pod IPs. This subnet size is the same for all hosts. +- The Kubernetes `pod-cidr` must match the Azure Vnet of the hosts. + +## Configure IP pools for Azure stand-alone VMs + +Follow these steps once the underlying infrastructure has been provisioned. + +### Configure multiple IP addresses per VM NIC + +Follow the steps below to configure multiple IP addresses per VM NIC. + +1. Initialize a swarm cluster comprising the virtual machines you created + earlier. On one of the nodes of the cluster, run: + + ```bash + docker swarm init + ``` + +2. Note the tokens for managers and workers. You may retrieve the join tokens + at any time by running `$ docker swarm join-token manager` or `$ docker swarm + join-token worker` on the manager node. +3. Join two other nodes on the cluster as manager (recommended for HA) by running: + + ```bash + docker swarm join --token + ``` + +4. Join remaining nodes on the cluster as workers: + + ```bash + docker swarm join --token + ``` + +5. Create a file named "azure_ucp_admin.toml" that contains contents from + creating the Service Principal. + + ``` + $ cat > azure_ucp_admin.toml < \ + --interactive \ + --swarm-port 3376 \ + --pod-cidr \ + --cloud-provider Azure +``` \ No newline at end of file diff --git a/datacenter/ucp/3.0/guides/admin/install/upgrade-offline.md b/datacenter/ucp/3.0/guides/admin/install/upgrade-offline.md index cc30953ec4..7f4920d0db 100644 --- a/datacenter/ucp/3.0/guides/admin/install/upgrade-offline.md +++ b/datacenter/ucp/3.0/guides/admin/install/upgrade-offline.md @@ -17,7 +17,7 @@ copy this package to the host where you upgrade UCP. Use a computer with internet access to download the UCP package from the following links. -{% include components/ddc_url_list_2.html product="ucp" version="2.2" %} +{% include components/ddc_url_list_2.html product="ucp" version="3.0" %} ## Download the offline package diff --git a/datacenter/ucp/3.0/guides/admin/install/upgrade.md b/datacenter/ucp/3.0/guides/admin/install/upgrade.md index 459f2604e6..243c401039 100644 --- a/datacenter/ucp/3.0/guides/admin/install/upgrade.md +++ b/datacenter/ucp/3.0/guides/admin/install/upgrade.md @@ -19,9 +19,13 @@ in each node of the swarm to version 17.06 Enterprise Edition. Plan for the upgrade to take place outside of business hours, to ensure there's minimal impact to your users. -Also, don't make changes to UCP configurations while you're upgrading it. +Don't make changes to UCP configurations while you're upgrading. This can lead to misconfigurations that are difficult to troubleshoot. +> Note: If you are upgrading a cluster to UCP 3.0.2 or higher on Microsoft +> Azure then please ensure all of the Azure [prerequisities](install-on-azure.md/#azure-prerequisites) +> are met. + ## Back up your swarm Before starting an upgrade, make sure that your swarm is healthy. If a problem @@ -48,7 +52,7 @@ Starting with the manager nodes, and then worker nodes: 2. Upgrade the Docker Engine to version 17.06 or higher. 3. Make sure the node is healthy. - In your browser, navigate to the **Nodes** page in the UCP web UI, + In your browser, navigate to the **Nodes** page in the UCP web interface, and check that the node is healthy and is part of the swarm. > Swarm mode @@ -58,9 +62,9 @@ Starting with the manager nodes, and then worker nodes: ## Upgrade UCP -You can upgrade UCP from the web UI or the CLI. +You can upgrade UCP from the web interface or the CLI. -### Use the UI to perform an upgrade +### Use the web interface to perform an upgrade When an upgrade is available for a UCP installation, a banner appears. @@ -76,13 +80,13 @@ Select a version to upgrade to using the **Available UCP Versions** dropdown, then click to upgrade. Before the upgrade happens, a confirmation dialog along with important -information regarding swarm and UI availability is displayed. +information regarding swarm and interface availability is displayed. ![](../../images/upgrade-ucp-3.png){: .with-border} -During the upgrade, the UI is unavailable, so wait until the upgrade is complete -before trying to use the UI. When the upgrade completes, a notification alerts -you that a newer version of the UI is available, and you can see the new UI +During the upgrade, the interface is unavailable, so wait until the upgrade is complete +before trying to use the interface. When the upgrade completes, a notification alerts +you that a newer version of the interface is available, and you can see the new interface after you refresh your browser. ### Use the CLI to perform an upgrade @@ -103,7 +107,7 @@ $ docker container run --rm -it \ This runs the upgrade command in interactive mode, so that you are prompted for any necessary configuration values. -Once the upgrade finishes, navigate to the UCP web UI and make sure that +Once the upgrade finishes, navigate to the UCP web interface and make sure that all the nodes managed by UCP are healthy. ## Recommended upgrade paths diff --git a/datacenter/ucp/3.0/guides/admin/monitor-and-troubleshoot/troubleshoot-configurations.md b/datacenter/ucp/3.0/guides/admin/monitor-and-troubleshoot/troubleshoot-configurations.md index 7cbd05d5e6..345d306a0d 100644 --- a/datacenter/ucp/3.0/guides/admin/monitor-and-troubleshoot/troubleshoot-configurations.md +++ b/datacenter/ucp/3.0/guides/admin/monitor-and-troubleshoot/troubleshoot-configurations.md @@ -132,7 +132,7 @@ NUM_MANAGERS=$(docker node ls --filter role=manager -q | wc -l) VERSION=$(docker image ls --format '{{.Tag}}' docker/ucp-auth | head -n 1) # This reconfigure-db command will repair the RethinkDB cluster to have a # number of replicas equal to the number of manager nodes in the cluster. -docker container run --rm -v ucp-auth-store-certs:/tls docker/ucp-auth:${VERSION} --db-addr=${NODE_ADDRESS}:12383 --debug reconfigure-db --num-replicas ${NUM_MANAGERS} --emergency-repair +docker container run --rm -v ucp-auth-store-certs:/tls docker/ucp-auth:${VERSION} --db-addr=${NODE_ADDRESS}:12383 --debug reconfigure-db --num-replicas ${NUM_MANAGERS} time="2017-07-14T20:46:09Z" level=debug msg="Connecting to db ..." time="2017-07-14T20:46:09Z" level=debug msg="connecting to DB Addrs: [192.168.1.25:12383]" @@ -143,6 +143,11 @@ time="2017-07-14T20:46:09Z" level=debug msg="(01/16) Emergency Repaired Table \" ``` {% endraw %} +> #### Loss of Quorum in RethinkDB Tables +> +> When there is loss of quorum in any of the RethinkDB tables, run the `reconfigure-db` command +> with the `--emergency-repair` flag. + ## Where to go next * [Get support](../../get-support.md) diff --git a/datacenter/ucp/3.0/reference/api/index.md b/datacenter/ucp/3.0/reference/api/index.md index 6db4fe4dbe..629223ac13 100644 --- a/datacenter/ucp/3.0/reference/api/index.md +++ b/datacenter/ucp/3.0/reference/api/index.md @@ -2,6 +2,8 @@ description: Learn how to use the Universal Control Plane REST API keywords: ucp, api, reference title: Universal Control Plane 3.0 API +redirect_from: +- /reference/ucp/3.0/api/ ---
                  diff --git a/datacenter/ucp/3.0/reference/cli/backup.md b/datacenter/ucp/3.0/reference/cli/backup.md index f8c0252ece..7d2724a5e0 100644 --- a/datacenter/ucp/3.0/reference/cli/backup.md +++ b/datacenter/ucp/3.0/reference/cli/backup.md @@ -2,6 +2,8 @@ title: docker/ucp backup description: Create a backup of a UCP manager node keywords: ucp, cli, backup +redirect_from: + - /reference/ucp/3.0/cli/backup/ --- Create a backup of a UCP manager node diff --git a/datacenter/ucp/3.0/reference/cli/dump-certs.md b/datacenter/ucp/3.0/reference/cli/dump-certs.md index 928bbbba1c..016aa0eea2 100644 --- a/datacenter/ucp/3.0/reference/cli/dump-certs.md +++ b/datacenter/ucp/3.0/reference/cli/dump-certs.md @@ -2,6 +2,8 @@ title: docker/ucp dump-certs description: Print the public certificates used by this UCP web server keywords: ucp, cli, dump-certs +redirect_from: + - /reference/ucp/3.0/cli/dump-certs/ --- Print the public certificates used by this UCP web server diff --git a/datacenter/ucp/3.0/reference/cli/example-config.md b/datacenter/ucp/3.0/reference/cli/example-config.md index 4756d724ad..d98ff5436c 100644 --- a/datacenter/ucp/3.0/reference/cli/example-config.md +++ b/datacenter/ucp/3.0/reference/cli/example-config.md @@ -2,6 +2,8 @@ title: docker/ucp example-config description: Display an example configuration file for UCP keywords: ucp, cli, config, configuration +redirect_from: + - /reference/ucp/3.0/cli/example-config/ --- Display an example configuration file for UCP diff --git a/datacenter/ucp/3.0/reference/cli/id.md b/datacenter/ucp/3.0/reference/cli/id.md index 068e7614d0..d6b5390000 100644 --- a/datacenter/ucp/3.0/reference/cli/id.md +++ b/datacenter/ucp/3.0/reference/cli/id.md @@ -2,6 +2,8 @@ title: docker/ucp id description: Print the ID of UCP running on this node keywords: ucp, cli, id +redirect_from: + - /reference/ucp/3.0/cli/id/ --- Print the ID of UCP running on this node diff --git a/datacenter/ucp/3.0/reference/cli/images.md b/datacenter/ucp/3.0/reference/cli/images.md index 2980128ae0..c670ee58df 100644 --- a/datacenter/ucp/3.0/reference/cli/images.md +++ b/datacenter/ucp/3.0/reference/cli/images.md @@ -2,6 +2,8 @@ title: docker/ucp images description: Verify the UCP images on this node keywords: ucp, cli, images +redirect_from: + - /reference/ucp/3.0/cli/images/ --- Verify the UCP images on this node diff --git a/datacenter/ucp/3.0/reference/cli/index.md b/datacenter/ucp/3.0/reference/cli/index.md index 12e71bdcc2..68f36c966b 100644 --- a/datacenter/ucp/3.0/reference/cli/index.md +++ b/datacenter/ucp/3.0/reference/cli/index.md @@ -2,6 +2,8 @@ title: docker/ucp overview description: Learn about the commands available in the docker/ucp image. keywords: ucp, cli, ucp +redirect_from: + - /reference/ucp/3.0/cli/ --- This image has commands to install and manage diff --git a/datacenter/ucp/3.0/reference/cli/install.md b/datacenter/ucp/3.0/reference/cli/install.md index 54661d0f34..79ee12a366 100644 --- a/datacenter/ucp/3.0/reference/cli/install.md +++ b/datacenter/ucp/3.0/reference/cli/install.md @@ -2,6 +2,8 @@ title: docker/ucp install description: Install UCP on this node keywords: ucp, cli, install +redirect_from: + - /reference/ucp/3.0/cli/install/ --- Install UCP on this node diff --git a/datacenter/ucp/3.0/reference/cli/restart.md b/datacenter/ucp/3.0/reference/cli/restart.md index f1824f28ed..3489048d62 100644 --- a/datacenter/ucp/3.0/reference/cli/restart.md +++ b/datacenter/ucp/3.0/reference/cli/restart.md @@ -2,6 +2,8 @@ title: docker/ucp restart description: Start or restart UCP components running on this node keywords: ucp, cli, restart +redirect_from: + - /reference/ucp/3.0/cli/restart/ --- Start or restart UCP components running on this node diff --git a/datacenter/ucp/3.0/reference/cli/restore.md b/datacenter/ucp/3.0/reference/cli/restore.md index 6552c6b4f9..7e06ea2d41 100644 --- a/datacenter/ucp/3.0/reference/cli/restore.md +++ b/datacenter/ucp/3.0/reference/cli/restore.md @@ -2,6 +2,8 @@ title: docker/ucp restore description: Restore a UCP cluster from a backup keywords: ucp, cli, restore +redirect_from: + - /reference/ucp/3.0/cli/restore/ --- Restore a UCP cluster from a backup diff --git a/datacenter/ucp/3.0/reference/cli/stop.md b/datacenter/ucp/3.0/reference/cli/stop.md index a246cb9fdf..7247926b18 100644 --- a/datacenter/ucp/3.0/reference/cli/stop.md +++ b/datacenter/ucp/3.0/reference/cli/stop.md @@ -2,6 +2,8 @@ title: docker/ucp stop description: Stop UCP components running on this node keywords: ucp, cli, stop +redirect_from: + - /reference/ucp/3.0/cli/stop/ --- Stop UCP components running on this node diff --git a/datacenter/ucp/3.0/reference/cli/support.md b/datacenter/ucp/3.0/reference/cli/support.md index f46cdc7c29..77cc743779 100644 --- a/datacenter/ucp/3.0/reference/cli/support.md +++ b/datacenter/ucp/3.0/reference/cli/support.md @@ -2,6 +2,8 @@ title: docker/ucp support description: Create a support dump for UCP nodes keywords: ucp, cli, support, support dump, troubleshooting +redirect_from: + - /reference/ucp/3.0/cli/support/ --- Create a support dump for specified UCP nodes. You create a support dump to help [Docker Support](http://success.docker.com/support) understand your environment and more effectively troubleshoot issues in resolving your support case. diff --git a/datacenter/ucp/3.0/reference/cli/uninstall-ucp.md b/datacenter/ucp/3.0/reference/cli/uninstall-ucp.md index a1277e692c..c8ca9635fa 100644 --- a/datacenter/ucp/3.0/reference/cli/uninstall-ucp.md +++ b/datacenter/ucp/3.0/reference/cli/uninstall-ucp.md @@ -2,6 +2,8 @@ title: docker/ucp uninstall-ucp description: Uninstall UCP from this swarm keywords: ucp, cli, uninstall-ucp +redirect_from: + - /reference/ucp/3.0/cli/uninstall-ucp/ --- Uninstall UCP from this swarm diff --git a/datacenter/ucp/3.0/reference/cli/upgrade.md b/datacenter/ucp/3.0/reference/cli/upgrade.md index 9206d2b608..4d6e6e05f3 100644 --- a/datacenter/ucp/3.0/reference/cli/upgrade.md +++ b/datacenter/ucp/3.0/reference/cli/upgrade.md @@ -2,6 +2,8 @@ title: docker/ucp upgrade description: Upgrade the UCP components on this node keywords: ucp, cli, upgrade +redirect_from: + - /reference/ucp/3.0/cli/upgrade/ --- Upgrade the UCP cluster 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/baseimages.md b/develop/develop-images/baseimages.md index f76300360b..1a1d6d41ae 100644 --- a/develop/develop-images/baseimages.md +++ b/develop/develop-images/baseimages.md @@ -119,4 +119,4 @@ There are lots more resources available to help you write your `Dockerfile`. * There's a [complete guide to all the instructions](/engine/reference/builder.md) available for use in a `Dockerfile` in the reference section. * To help you write a clear, readable, maintainable `Dockerfile`, we've also written a [`Dockerfile` best practices guide](dockerfile_best-practices.md). -* If your goal is to create a new Official Repository, be sure to read up on Docker's [Official Repositories](/docker-hub/official_repos/). +* If your goal is to create a new Official Image, be sure to read up on Docker's [Official Images](/docker-hub/official_images/). diff --git a/develop/develop-images/build_enhancements.md b/develop/develop-images/build_enhancements.md index 545344212e..ed3f903b53 100644 --- a/develop/develop-images/build_enhancements.md +++ b/develop/develop-images/build_enhancements.md @@ -10,7 +10,7 @@ Docker Build enhancements for 18.09 release introduces a much-needed overhaul of * Docker images created with buildkit can be pushed to Docker Hub and DTR just like Docker images created with legacy build * the Dockerfile format that works on legacy build will also work with buildkit builds -* The new `--secret` conmmand line option allows the user to pass secret information for building new images with a specified Dockerfile +* The new `--secret` command line option allows the user to pass secret information for building new images with a specified Dockerfile For more information on build options, see the reference guide on the [command line build options](../../engine/reference/commandline/build/). @@ -99,7 +99,8 @@ $ docker build --progress=plain . ## Overriding default frontends -To override the default frontend, set the first line of the Dockerfile as a comment with a specific frontend image: +The new syntax features in `Dockerfile` are available if you override the default frontend. To override +the default frontend, set the first line of the `Dockerfile` as a comment with a specific frontend image: ``` # syntax = , e.g. # syntax = docker/dockerfile:1.0-experimental ``` @@ -151,3 +152,40 @@ $ docker build --no-cache --progress=plain --secret id=mysecret,src=mysecret.txt #9 duration: 1.470401133s ... ``` + +## Using SSH to access private data in builds + +> **Acknowledgment**: +> Please see [Build secrets and SSH forwarding in Docker 18.09](https://medium.com/@tonistiigi/build-secrets-and-ssh-forwarding-in-docker-18-09-ae8161d066) +> for more information and examples. + +The `docker build` has a `--ssh` option to allow the Docker Engine to forward SSH agent connections. For more information +on SSH agent, see the [OpenSSH man page](https://man.openbsd.org/ssh-agent). + +Only the commands in the `Dockerfile` that have explicitly requested the SSH access by defining `type=ssh` mount have +access to SSH agent connections. The other commands have no knowledge of any SSH agent being available. + +To request SSH access for a `RUN` command in the `Dockerfile`, define a mount with type `ssh`. This will set up the +`SSH_AUTH_SOCK` environment variable to make programs relying on SSH automatically use that socket. + +Here is an example Dockerfile using SSH in the container: + +```Dockerfile +# syntax=docker/dockerfile:experimental +FROM alpine + +# Install ssh client and git +RUN apk add --no-cache openssh-client git + +# Download public key for github.com +RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts + +# Clone private repository +RUN --mount=type=ssh git clone git@github.com:myorg/myproject.git myproject +``` + +Once the `Dockerfile` is created, use the `--ssh` option for connectivity with the SSH agent. + +```bash +$ docker build --ssh default . +``` diff --git a/develop/develop-images/dockerfile_best-practices.md b/develop/develop-images/dockerfile_best-practices.md index 57c513cdf0..f0142e2f0b 100644 --- a/develop/develop-images/dockerfile_best-practices.md +++ b/develop/develop-images/dockerfile_best-practices.md @@ -1,6 +1,6 @@ --- description: Hints, tips and guidelines for writing clean, reliable Dockerfiles -keywords: parent image, images, dockerfile, best practices, hub, official repo +keywords: parent image, images, dockerfile, best practices, hub, official image redirect_from: - /articles/dockerfile_best-practices/ - /engine/articles/dockerfile_best-practices/ @@ -49,7 +49,7 @@ For more on image layers (and how Docker builds and stores images), see ### Create ephemeral containers The image defined by your `Dockerfile` should generate containers that are as -ephemeral as possible. By “ephemeral,” we mean that the container can be stopped +ephemeral as possible. By "ephemeral", we mean that the container can be stopped and destroyed, then rebuilt and replaced with an absolute minimum set up and configuration. @@ -129,7 +129,7 @@ EOF ``` docker build -t foo https://github.com/thajeztah/pgadmin4-docker.git -f-< /number The `CMD` instruction should be used to run the software contained by your image, along with any arguments. `CMD` should almost always be used in the form -of `CMD [“executable”, “param1”, “param2”…]`. Thus, if the image is for a +of `CMD ["executable", "param1", "param2"…]`. Thus, if the image is for a service, such as Apache and Rails, you would run something like `CMD ["apache2","-DFOREGROUND"]`. Indeed, this form of the instruction is recommended for any service-based image. In most other cases, `CMD` should be given an interactive shell, such as bash, python and perl. For example, `CMD ["perl", "-de0"]`, `CMD ["python"]`, or `CMD -[“php”, “-a”]`. Using this form means that when you execute something like +["php", "-a"]`. Using this form means that when you execute something like `docker run -it python`, you’ll get dropped into a usable shell, ready to go. -`CMD` should rarely be used in the manner of `CMD [“param”, “param”]` in +`CMD` should rarely be used in the manner of `CMD ["param", "param"]` in conjunction with [`ENTRYPOINT`](/engine/reference/builder.md#entrypoint), unless you and your expected users are already quite familiar with how `ENTRYPOINT` works. @@ -512,7 +512,7 @@ the recipient container back to the source (ie, `MYSQL_PORT_3306_TCP`). To make new software easier to run, you can use `ENV` to update the `PATH` environment variable for the software your container installs. For -example, `ENV PATH /usr/local/nginx/bin:$PATH` ensures that `CMD [“nginx”]` +example, `ENV PATH /usr/local/nginx/bin:$PATH` ensures that `CMD ["nginx"]` just works. The `ENV` instruction is also useful for providing required environment @@ -714,7 +714,7 @@ like `RUN groupadd -r postgres && useradd --no-log-init -r -g postgres postgres` > Consider an explicit UID/GID > > Users and groups in an image are assigned a non-deterministic UID/GID in that -> the “next” UID/GID is assigned regardless of image rebuilds. So, if it’s +> the "next" UID/GID is assigned regardless of image rebuilds. So, if it’s > critical, you should assign an explicit UID/GID. > Due to an [unresolved bug](https://github.com/golang/go/issues/13548) in the @@ -727,7 +727,7 @@ like `RUN groupadd -r postgres && useradd --no-log-init -r -g postgres postgres` Avoid installing or using `sudo` as it has unpredictable TTY and signal-forwarding behavior that can cause problems. If you absolutely need functionality similar to `sudo`, such as initializing the daemon as `root` but -running it as non-`root`), consider using [“gosu”](https://github.com/tianon/gosu). +running it as non-`root`), consider using ["gosu"](https://github.com/tianon/gosu). Lastly, to reduce layers and complexity, avoid switching `USER` back and forth frequently. @@ -761,14 +761,14 @@ builds arbitrary user software written in that language within the Images built from `ONBUILD` should get a separate tag, for example: `ruby:1.9-onbuild` or `ruby:2.0-onbuild`. -Be careful when putting `ADD` or `COPY` in `ONBUILD`. The “onbuild” image +Be careful when putting `ADD` or `COPY` in `ONBUILD`. The "onbuild" image fails catastrophically if the new build's context is missing the resource being added. Adding a separate tag, as recommended above, helps mitigate this by allowing the `Dockerfile` author to make a choice. -## Examples for Official Repositories +## Examples for Official Images -These Official Repositories have exemplary `Dockerfile`s: +These Official Images have exemplary `Dockerfile`s: * [Go](https://hub.docker.com/_/golang/) * [Perl](https://hub.docker.com/_/perl/) @@ -780,4 +780,5 @@ These Official Repositories have exemplary `Dockerfile`s: * [Dockerfile Reference](/engine/reference/builder.md) * [More about Base Images](baseimages.md) * [More about Automated Builds](/docker-hub/builds/) -* [Guidelines for Creating Official Repositories](/docker-hub/official_repos/) +* [Guidelines for Creating Official Images](/docker-hub/official_images/) + 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/develop/sdk/index.md b/develop/sdk/index.md index 3890b94748..d2a409d7c3 100644 --- a/develop/sdk/index.md +++ b/develop/sdk/index.md @@ -29,6 +29,9 @@ installed and coexist together. ```bash go get github.com/docker/docker/client ``` +The client requires a recent version of Go. Run `go version` and ensure that you +are running at least version 1.9.4 of Go + [Read the full Docker Engine Go SDK reference](https://godoc.org/github.com/docker/docker/client). @@ -177,23 +180,22 @@ Docker API directly, or using the Python or Go SDK. package main import ( - "io" + "context" "os" "github.com/docker/docker/client" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/pkg/stdcopy" - - "golang.org/x/net/context" ) func main() { ctx := context.Background() - cli, err := client.NewEnvClient() + cli, err := client.NewClientWithOpts(client.FromEnv) if err != nil { panic(err) } + cli.NegotiateAPIVersion(ctx) _, err = cli.ImagePull(ctx, "docker.io/library/alpine", types.ImagePullOptions{}) if err != nil { 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/images/build-dashboard.png b/docker-cloud/builds/images/build-dashboard.png deleted file mode 100644 index 6fba720120..0000000000 Binary files a/docker-cloud/builds/images/build-dashboard.png and /dev/null differ diff --git a/docker-cloud/builds/images/build-report.png b/docker-cloud/builds/images/build-report.png deleted file mode 100644 index e5b271fc2a..0000000000 Binary files a/docker-cloud/builds/images/build-report.png and /dev/null differ diff --git a/docker-cloud/builds/images/cancel-build.png b/docker-cloud/builds/images/cancel-build.png deleted file mode 100644 index 35f3b6918a..0000000000 Binary files a/docker-cloud/builds/images/cancel-build.png and /dev/null differ diff --git a/docker-cloud/builds/images/create-repository.png b/docker-cloud/builds/images/create-repository.png deleted file mode 100644 index 501c949b15..0000000000 Binary files a/docker-cloud/builds/images/create-repository.png and /dev/null differ diff --git a/docker-cloud/builds/images/edit-repository-builds.png b/docker-cloud/builds/images/edit-repository-builds.png deleted file mode 100644 index eeff989cb1..0000000000 Binary files a/docker-cloud/builds/images/edit-repository-builds.png and /dev/null differ diff --git a/docker-cloud/builds/images/edit-repository.png b/docker-cloud/builds/images/edit-repository.png deleted file mode 100644 index 0202076fa4..0000000000 Binary files a/docker-cloud/builds/images/edit-repository.png and /dev/null differ diff --git a/docker-cloud/builds/images/link-source-github-ind-revoke.png b/docker-cloud/builds/images/link-source-github-ind-revoke.png deleted file mode 100644 index f20cb81d07..0000000000 Binary files a/docker-cloud/builds/images/link-source-github-ind-revoke.png and /dev/null differ diff --git a/docker-cloud/builds/images/link-source-github-ind.png b/docker-cloud/builds/images/link-source-github-ind.png deleted file mode 100644 index 811de546d6..0000000000 Binary files a/docker-cloud/builds/images/link-source-github-ind.png and /dev/null differ diff --git a/docker-cloud/builds/images/link-source-github-org-lite.png b/docker-cloud/builds/images/link-source-github-org-lite.png deleted file mode 100644 index aa96087b8f..0000000000 Binary files a/docker-cloud/builds/images/link-source-github-org-lite.png and /dev/null differ diff --git a/docker-cloud/builds/images/link-source-github-org.png b/docker-cloud/builds/images/link-source-github-org.png deleted file mode 100644 index d1c1ebf0f5..0000000000 Binary files a/docker-cloud/builds/images/link-source-github-org.png and /dev/null differ diff --git a/docker-cloud/builds/images/link-source-unlink-github.png b/docker-cloud/builds/images/link-source-unlink-github.png deleted file mode 100644 index 096fb05d6d..0000000000 Binary files a/docker-cloud/builds/images/link-source-unlink-github.png and /dev/null differ diff --git a/docker-cloud/builds/images/third-party-images-modal.png b/docker-cloud/builds/images/third-party-images-modal.png deleted file mode 100644 index 5417dd0922..0000000000 Binary files a/docker-cloud/builds/images/third-party-images-modal.png and /dev/null differ diff --git a/docker-cloud/builds/images/video-auto-builds-docker-cloud.png b/docker-cloud/builds/images/video-auto-builds-docker-cloud.png deleted file mode 100644 index 5f8c588950..0000000000 Binary files a/docker-cloud/builds/images/video-auto-builds-docker-cloud.png and /dev/null differ diff --git a/docker-cloud/builds/images/video-auto-tests-docker-cloud.png b/docker-cloud/builds/images/video-auto-tests-docker-cloud.png deleted file mode 100644 index e694f53dcf..0000000000 Binary files a/docker-cloud/builds/images/video-auto-tests-docker-cloud.png and /dev/null differ diff --git a/docker-cloud/builds/index.md b/docker-cloud/builds/index.md deleted file mode 100644 index 97069aaaac..0000000000 --- a/docker-cloud/builds/index.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -description: Manage Builds and Images in Docker Cloud -keywords: builds, images, Cloud -title: Builds and images overview -notoc: true ---- - -Docker Cloud 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. - -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) -* [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"} diff --git a/docker-cloud/builds/push-images.md b/docker-cloud/builds/push-images.md deleted file mode 100644 index a0f5d7cdd7..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 enabled, 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 bbb2fd8c48..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 overview 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 86f0519490..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 overview 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 198e3af24e..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 overview 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 47e6c229f4..0000000000 --- a/docker-cloud/dockerid.md +++ /dev/null @@ -1,59 +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. -You may select an email address to become the primary email for the account. -The primary email is used by Docker to send password reset notifications -and 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 34df16f337..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 an 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 an 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 ab7fd65239..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 an 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 b1b73aaa72..0000000000 --- a/docker-cloud/orgs.md +++ /dev/null @@ -1,291 +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 teams and memberships to which they belong. Members of the `Owners` team can see and edit all teams and team membership lists. Docker Cloud users cannot view another user’s organizations or teams if they do not share an organization. - -## 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/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..b88d8ac21a 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 @@ -246,3 +246,8 @@ Console](https://aws.amazon.com/){: target="_blank" class="_"}, navigate to the Docker stack you want to remove. ![uninstall](img/aws-delete-stack.png) + +Stack removal does not remove EBS and EFS volumes created by the cloudstor +volume plugin or the S3 bucket associated with DTR. Those resources must be +removed manually. See the [cloudstor](/docker-for-aws/persistent-data-volumes/#list-or-remove-volumes-created-by-cloudstor) +docs for instructions on removing volumes. diff --git a/docker-for-aws/release-notes.md b/docker-for-aws/release-notes.md index fdc5f7e26e..2ebd3dfb14 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 @@ -29,11 +29,16 @@ title: Docker for AWS release notes ## Stable channel - -### 18.03 CE +### 18.06.1 CE {{aws_blue_latest}} +Release date: 8/24/2018 + +- Docker Engine upgraded to [Docker 18.06.1 CE](https://github.com/docker/docker-ce/releases/tag/v18.06.1-ce){: target="_blank" class="_"} + +### 18.03 CE + Release date: 3/21/2018 - Docker Engine upgraded to [Docker 18.03.0 CE](https://github.com/docker/docker-ce/releases/tag/v18.03.0-ce){: target="_blank" class="_"} 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 7cb1a2cd0a..a6dbe43590 100644 --- a/docker-for-azure/release-notes.md +++ b/docker-for-azure/release-notes.md @@ -9,8 +9,6 @@ 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 Azure](https://store.docker.com/editions/enterprise/docker-ee-azure?tab=description){: target="_blank" class="button outline-btn"} - ### 17.06 EE - Docker engine 17.06 EE @@ -26,10 +24,16 @@ title: Docker for Azure Release Notes ## Stable channel -### 18.03 CE +### 18.06.1 CE {{azure_blue_latest}} +Release date: 8/24/2018 + +- Docker Engine upgraded to [Docker 18.06.1 CE](https://github.com/docker/docker-ce/releases/tag/v18.06.1-ce){: target="_blank" class="_"} + +### 18.03 CE + Release date: 3/21/2018 - Docker Engine upgraded to [Docker 18.03.0 CE](https://github.com/docker/docker-ce/releases/tag/v18.03.0-ce){: target="_blank" class="_"} @@ -128,7 +132,7 @@ Release date: 01/18/2017 ### 18.01 CE -{{aws_blue_edge}} +{{azure_blue_edge}} **New** diff --git a/docker-for-mac/docker-toolbox.md b/docker-for-mac/docker-toolbox.md index 8c846363a3..7d900c8611 100644 --- a/docker-for-mac/docker-toolbox.md +++ b/docker-for-mac/docker-toolbox.md @@ -62,6 +62,9 @@ With Docker for Mac, you only get (and only usually need) one VM, managed by Doc for Mac. Docker for Mac automatically upgrades the Docker client and daemon when updates are available. +Also note that Docker for Mac can’t route traffic to containers, so you can't +directly access an exposed port on a running container from the hosting machine. + If you do need multiple VMs, such as when testing multi-node swarms, you can continue to use Docker Machine, which operates outside the scope of Docker for Mac. See [Docker Toolbox and Docker for Mac diff --git a/docker-for-mac/edge-release-notes.md b/docker-for-mac/edge-release-notes.md index d69c194d77..38c298a28a 100644 --- a/docker-for-mac/edge-release-notes.md +++ b/docker-for-mac/edge-release-notes.md @@ -18,6 +18,14 @@ for Mac](install.md#download-docker-for-mac). ## Edge Releases of 2018 +### Docker Community Edition 2.0.0.0-mac82 2018-12-07 + +[Download](https://download.docker.com/mac/edge/29268/Docker.dmg) + +* Upgrades + - [Docker compose 1.23.2](https://github.com/docker/compose/releases/tag/1.23.2) + - [Docker Machine 0.16.0](https://github.com/docker/machine/releases/tag/v0.16.0) + ### Docker Community Edition 2.0.0.0-mac77 2018-11-14 [Download](https://download.docker.com/mac/edge/28700/Docker.dmg) @@ -1242,7 +1250,7 @@ events or unexpected unmounts. * osxfs: fixed an issue causing `inotify` creation events to fail * osxfs: increased the `fs.inotify.max_user_watches` limit in Moby to 524288 * The UI shows documentation link for sharing volumes -* Clearer error message when running with outdated Virtualbox version +* Clearer error message when running with outdated VirtualBox version * Added link to sources for qemu-img **Known issues** @@ -1662,7 +1670,7 @@ lead to `Docker.app` not starting on reboot - Fixed RAM amount error message - Fixed wording of CPU error dialog - Removed status from Preferences -- Check for incompatible versions of Virtualbox +- Check for incompatible versions of VirtualBox ### Beta 4 Release (2016-03-22 1.10.3-beta4) diff --git a/docker-for-mac/faqs.md b/docker-for-mac/faqs.md index cb8f94edcd..0ffb5a9a5d 100644 --- a/docker-for-mac/faqs.md +++ b/docker-for-mac/faqs.md @@ -334,7 +334,7 @@ HyperKit is a hypervisor built on top of the Hypervisor.framework in macOS. It r dependencies. We use HyperKit to eliminate the need for other VM products, such as Oracle -Virtualbox or VMWare Fusion. +VirtualBox or VMWare Fusion. ### What is the benefit of HyperKit? diff --git a/docker-for-mac/index.md b/docker-for-mac/index.md index 9dfe698cfd..bcba8d9fcf 100644 --- a/docker-for-mac/index.md +++ b/docker-for-mac/index.md @@ -59,11 +59,11 @@ docker-machine version {{ site.machine_version }}, build 9ba6da9 ... ``` -2. Start a Dockerized web server. Like the hello-world image above, if the +2. Start a Dockerized web server. Like the `hello-world` image above, if the image is not found locally, Docker pulls it from Docker Hub. ```bash - $ docker run -d -p 80:80 --name webserver nginx + $ docker run --detach --publish=80:80 --name=webserver nginx ``` 3. In a web browser, go to `http://localhost/` to view the nginx homepage. @@ -532,42 +532,27 @@ 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. - -![Docker Store](images/docker-store.png){:width="550px"} - -## Docker Cloud - -You can access your [Docker Cloud](/docker-cloud/index.md){:target="_blank" +You can access your [Docker ID](/docker-id/index.md){:target="_blank" class="_"} account from within Docker for Mac. -![Docker Cloud](images/docker-cloud.png){:width="550px"} +![Docker ID](images/docker-cloud.png){:width="550px"} -From the Docker for Mac menu, sign in to Docker Cloud with your Docker ID, or +From the Docker for Mac menu, sign in to Docker Hub with your Docker ID, or create one. -![Docker Cloud sign-in](images/menu/sign-in.png){: .with-border width="250px"} +![Docker ID 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" +Check out these [Docker Hub topics](/docker-hub/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="_" }. + Hub](/docker-cloud/orgs/index.md){:target="_blank" class="_"} +* [Builds](/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..984d434f27 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 from Docker Hub](https://hub.docker.com/editions/community/docker-ce-desktop-mac){: .button .outline-btn} ## What to know before you install diff --git a/docker-for-mac/release-notes.md b/docker-for-mac/release-notes.md index 75a3043c89..633b024085 100644 --- a/docker-for-mac/release-notes.md +++ b/docker-for-mac/release-notes.md @@ -20,6 +20,13 @@ for Mac](install.md#download-docker-for-mac). ## Stable Releases of 2018 +### Docker Community Edition 2.0.0.0-mac81 2018-12-07 + +[Download](https://download.docker.com/mac/stable/29211/Docker.dmg) + +* Upgrades + - [Docker compose 1.23.2](https://github.com/docker/compose/releases/tag/1.23.2) + ### Docker Community Edition 2.0.0.0-mac78 2018-11-19 [Download](https://download.docker.com/mac/stable/28905/Docker.dmg) diff --git a/docker-for-windows/edge-release-notes.md b/docker-for-windows/edge-release-notes.md index daa32c04a9..fd234c5f34 100644 --- a/docker-for-windows/edge-release-notes.md +++ b/docker-for-windows/edge-release-notes.md @@ -18,6 +18,16 @@ for Windows](install.md#download-docker-for-windows). ## Edge Releases of 2018 +### Docker Community Edition 2.0.0.0-win82 2018-12-07 + +[Download](https://download.docker.com/win/edge/29268/Docker%20for%20Windows%20Installer.exe) + +* Upgrades + - [Docker compose 1.23.2](https://github.com/docker/compose/releases/tag/1.23.2) + +* Bug fixes and minor changes + - Compose: Fixed a bug where build context URLs would fail to build on Windows. Fixes [docker/for-win#2918](https://github.com/docker/for-win/issues/2918) + ### Docker Community Edition 2.0.0.0-win77 2018-11-14 [Download](https://download.docker.com/win/edge/28777/Docker%20for%20Windows%20Installer.exe) diff --git a/docker-for-windows/index.md b/docker-for-windows/index.md index 6485c0daae..06341b846d 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 @@ -443,7 +443,7 @@ to change context so that `kubectl` is pointing to `docker-for-desktop`: > kubectl config use-context docker-for-desktop ``` -You can also change it through the Docker for Windows menu: +You can also change it through the Docker for Windows menu: ![Change Kubernetes Context](images/docker-menu-context-switch.png){:width="600px"} @@ -487,7 +487,7 @@ Visit our [Logs and Troubleshooting](troubleshoot.md) guide for more details. Log on to our [Docker for Windows forum](https://forums.docker.com/c/docker-for-windows) to get help from the community, review current user topics, or join a discussion. -Log on to [Docker for Windows issues on GitHub](https://github.com/docker/for-win/issues) to report bugs or problems and review community reported issues. +Log on to [Docker for Windows issues on GitHub](https://github.com/docker/for-win/issues) to report bugs or problems and review community reported issues. To give feedback on the documentation or update it yourself, use the Feedback options at the bottom of each docs page. @@ -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 e9d1572d1b..cf612c569b 100644 --- a/docker-for-windows/install.md +++ b/docker-for-windows/install.md @@ -6,10 +6,10 @@ 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){: +Hub](https://hub.docker.com/editions/community/docker-ce-desktop-windows){: .button .outline-btn} ## What to know before you install @@ -72,7 +72,7 @@ Looking for information on using Windows containers? If you haven't already downloaded the installer (`Docker for Windows Installer.exe`), you can get it from [**download.docker.com**](https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe). - It typically downloads to your `Downloads folder`, or you can run it from + It typically downloads to your `Downloads` folder, or you can run it from the recent downloads bar at the bottom of your web browser. 2. Follow the install wizard to accept the license, authorize the installer, and diff --git a/docker-for-windows/release-notes.md b/docker-for-windows/release-notes.md index 5ed7ea6a3d..4bae94eab3 100644 --- a/docker-for-windows/release-notes.md +++ b/docker-for-windows/release-notes.md @@ -20,6 +20,16 @@ for Windows](install.md#download-docker-for-windows). ## Stable Releases of 2018 +### Docker Community Edition 2.0.0.0-win81 2018-12-07 + +[Download](https://download.docker.com/win/stable/29211/Docker%20for%20Windows%20Installer.exe) + +* Upgrades + - [Docker compose 1.23.2](https://github.com/docker/compose/releases/tag/1.23.2) + +* Bug fixes and minor changes + - Compose: Fixed a bug where build context URLs would fail to build on Windows. Fixes [docker/for-win#2918](https://github.com/docker/for-win/issues/2918) + ### Docker Community Edition 2.0.0.0-win78 2018-11-19 [Download](https://download.docker.com/win/stable/28905/Docker%20for%20Windows%20Installer.exe) diff --git a/docker-hub/accounts.md b/docker-hub/accounts.md deleted file mode 100644 index 7e1858c824..0000000000 --- a/docker-hub/accounts.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -description: Using Docker Hub with your Docker ID account -keywords: Docker, docker, trusted, sign-up, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation -title: Use Docker Hub with Docker ID ---- - -Docker Hub uses your free [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). - -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 -repository, you need to log in using a Docker ID. - -Once you have a personal Docker ID, you can also create or join -Docker Hub [Organizations and Teams](orgs.md). - -## Upgrade your account - -Free Docker Hub accounts include one private registry. If you need more private -registries, you can [upgrade your account](https://hub.docker.com/account/billing-plans/) to a paid plan directly -from the Hub. - -## Password reset process - -If you forget your password, or can't access your account, you -can reset your password from the [*Password Reset*](https://hub.docker.com/reset-password/) page. diff --git a/docker-hub/bitbucket.md b/docker-hub/bitbucket.md deleted file mode 100644 index af76d41e55..0000000000 --- a/docker-hub/bitbucket.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -description: Docker Hub Automated Builds using Bitbucket -keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation, trusted, builds, trusted builds, automated builds, bitbucket -title: Configure automated builds with Bitbucket ---- - -If you've previously linked Docker Hub to your Bitbucket account, skip to -[Creating an Automated Build](bitbucket.md#creating-an-automated-build). - -## Link to your Bitbucket account - -To set up an Automated Build of a repository on Bitbucket, you need to -link your [Docker Hub](https://hub.docker.com/account/authorized-services/) -account to a Bitbucket account. This allows the registry to see your -Bitbucket repositories. - -To add, remove, or view your linked account, go to the **Linked Accounts & -Services** section of your Hub profile **Settings**. - -![authorized-services](images/authorized-services.png) - -Then follow the onscreen instructions to authorize and link your Bitbucket -account to Docker Hub. Once it is linked, you can create a Docker Hub -repository from which to create the Automatic Build. - -## Create an Automated Build - -You can [create an Automated Build]( -https://hub.docker.com/add/automated-build/bitbucket/) from any of your public -or private Bitbucket repositories with a `Dockerfile`. - -To get started, log in to Docker Hub and click the "Create ▼" menu item -at the top right of the screen. Then select [Create Automated -Build](https://hub.docker.com/add/automated-build/bitbucket/). - -Select the linked Bitbucket account, and then choose a repository to set up -an Automated Build for. - -## The Bitbucket webhook - -When you create an Automated Build in Docker Hub, a webhook is added to your -Bitbucket repository automatically. - -You can also manually add a webhook from your repository's **Settings** page. -Set the URL to `https://registry.hub.docker.com/hooks/bitbucket`, to be -triggered for repository pushes. - -![bitbucket-hooks](images/bitbucket-hook.png) diff --git a/docker-hub/builds.md b/docker-hub/builds.md deleted file mode 100644 index 73cdcf6d8e..0000000000 --- a/docker-hub/builds.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -description: Docker Hub Automated Builds -keywords: Dockerfile, Hub, builds, trusted builds, automated builds -title: Configure automated builds on Docker Hub ---- - -You can build your images automatically from a build context stored in a -repository. A *build context* is a Dockerfile and any files at a specific -location. For an automated build, the build context is a repository containing a -Dockerfile. - -Automated Builds have several advantages: - - * Images built in this way are built exactly as specified. - * The `Dockerfile` is available to anyone with access to your Docker Hub repository. - * Your repository is kept up-to-date with code changes automatically. - -Automated Builds are supported for both public and private repositories on both -[GitHub](http://github.com) and [Bitbucket](https://bitbucket.org/). This -document guides you through the process of working with automated builds. - -## Prerequisites - -To use automated builds, you must have an [account on Docker Hub](accounts.md) -and on the hosted repository provider (GitHub or Bitbucket). If you have -previously linked your Github or Bitbucket account, you must have chosen the -Public and Private connection type. - -To view your current connection settings, log in to Docker Hub and choose -**Profile > Settings > Linked Accounts & Services**. - -## Limitations - -- Currently Docker Hub does not support Git LFS (Large File Storage). If you have - binaries in your build context that are managed by Git LFS, only the pointer - file is present in the clone made during the automated build, which is not - what you want. - - Subscribe to the [GitHub issue](https://github.com/docker/hub-feedback/issues/500) - tracking this limitation. - -- Building Windows containers is not supported. - -## Link to a hosted repository service - -1. Log into Docker Hub. - -2. Navigate to **Profile > Settings > Linked Accounts & Services**. - -3. Click the service you want to link. - - The system prompts you to choose between Public and Private and Limited Access. The Public and Private connection type is required if you want to use the Automated Builds. - -4. Press **Select** under Public and Private connection type. - - The system prompts you to enter your service credentials (Bitbucket or GitHub) to login. For example, Bitbucket's prompt looks like this: - - ![Bitbucket](images/bitbucket_creds.png) - - After you grant access to your code repository, the system returns you to Docker Hub and the link is complete. - - ![Linked account](images/linked-acct.png) - -## Create an automated build - -Automated build repositories rely on the integration with your code repository -To build. However, you can also push already-built images to these -repositories using the `docker push` command. - -1. Select **Create** > **Create Automated Build** (from the drop down, upper right) on [Docker Hub](https://hub.docker.com/). - - The system prompts you with a list of User/Organizations and code repositories. - -2. Select from the User/Organizations. - -3. Optionally, type to filter the repository list. - -4. Pick the project to build. - - The system displays the **Create Automated Build** dialog. - - ![Create dialog](images/create-dialog1.png) - - The dialog assumes some defaults which you can customize. By default, Docker - builds images for each branch in your repository. It assumes the Dockerfile - lives at the root of your source. When it builds an image, Docker tags it with - the branch name. - -6. Customize the automated build by pressing the **Click here to customize** this behavior link. - - ![Create dialog](images/create-dialog.png) - - Specify which code branches or tags to build from. You can add new - configurations by clicking the + (plus sign). The dialog accepts regular - expressions. - - ![Create dialog](images/regex-help.png) - -9. Click **Create**. - - The system displays the home page for your AUTOMATED BUILD. - - ![Home page](images/home-page.png) - - Within GitHub, a Docker integration appears in your repositories Settings > Webhooks & services page. - - ![GitHub](images/docker-integration.png) - - A similar page appears in Bitbucket if you use that code repository. Be - careful to leave the Docker integration in place. Removing it causes your - automated builds to stop. - -### Understand the build process - -The first time you create a new automated build, Docker Hub builds your image. -In a few minutes, you should see your new build on the image dashboard. The -Build Details page shows a log of your build systems: - -![Pending](images/first_pending.png) - -During the build process, Docker copies the contents of your `Dockerfile` to -Docker Hub. The Docker community (for public repositories) or approved team -members/orgs (for private repositories) can then view the Dockerfile on your -repository page. - -The build process looks for a `README.md` in the same directory as your -`Dockerfile`. If you have a `README.md` file in your repository, it is used in -the repository as the full description. If you change the full description after -a build, it's overwritten the next time the Automated Build runs. To make -changes, modify the `README.md` in your Git repository. - -You can only trigger one build at a time and no more than one every five -minutes. If you already have a build pending, or if you recently submitted a -build request, Docker ignores new requests. - -### Build statuses explained - -You can view the status of the builds for a specific repository by looking at -the Build Details screen. If you have builds that are queued or in progress, you -can click **Cancel** to end them. - -![Build statuses](images/build-states-ex.png) - -The statuses are: - -* **Queued**: You're in line for your image to be built. Queue time varies depending on number of concurrent builds available to you. -* **Building**: The image is building. -* **Success**: The image has been built with no issues. -* **Error**: There was an issue with your image. Click the row to go to the Builds Details screen. The banner at the top of the page displays the last sentence of the log file, which indicates what the error was. If you need more information, scroll to the bottom of the screen to the logs section. - -## Use the Build Settings page - -The Build Settings page allows you to manage your existing automated build -configurations and add new ones. By default, when new code is merged into your -source repository, it triggers a build of your DockerHub image. - -![Default checkbox](images/merge_builds.png) - -Clear the checkbox to turn this behavior off. You can use the other settings on -the page to configure and build images. - -## Add and run a new build - -At the top of the Build Dialog is a list of configured builds. You can build -from a code branch or by build tag. - -![Build or tag](images/build-by.png) - -Docker builds everything listed whenever a push is made to the code repository. -If you specify a branch or tag, you can manually build that image by -pressing the Trigger. If you use a regular expression syntax (regex) to define -your build branch or tag, Docker does not give you the option to manually build. -To add a new build: - -1. Press the + (plus sign). - -2. Choose the Type. - - You can build by a code branch or by an image tag. - -3. Enter the Name of the branch or tag. - - You can enter a specific value or use a regex to select multiple values. To - see examples of regex, press the Show More link on the right of the page. - - ![Regexhelp](images/regex-help.png) - -4. Enter a Dockerfile location. - -5. Specify a Tag Name. - -6. Press **Save Changes**. - -If you make a mistake or want to delete a build, press the - (minus sign) and then **Save Changes**. - -## Repository links - -Repository links let you link one Automated Build with another. If one Automated -Build gets updated, Docker triggers a build of the other. This makes it easy to -ensure that related images are kept in sync. You can link more than one image -repository. You only need to link one side of two related builds. Linking both -sides causes an endless build loop. - -To add a link: - -1. Go to the Build Settings for an automated build repository. - -2. In the Repository Links section, enter an image repository name. - - A remote repository name should be either an official repository name such as `ubuntu` or a public repository name `namespace/repoName`. - -3. Press **Add**. - - ![Links](images/repo_links.png) - - -## Remote Build triggers - -To trigger Automated Builds programmatically, you can set up a remote build -trigger in another application such as GitHub or Bitbucket. When you Activate -the build trigger for an Automated Build, it supplies you with a Token and a -URL. - -![Build trigger screen](images/build-trigger.png) - -You can use `curl` to trigger a build: - -```bash -$ curl --data build=true -X POST https://registry.hub.docker.com/u/svendowideit/testhook/trigger/be579c -82-7c0e-11e4-81c4-0242ac110020/ -OK -``` - -To verify everything is working correctly, check the **Last 10 Trigger Logs** on -the page. diff --git a/docker-cloud/builds/advanced.md b/docker-hub/builds/advanced.md similarity index 89% rename from docker-cloud/builds/advanced.md rename to docker-hub/builds/advanced.md index 28f3ecb1fd..81e57207b9 100644 --- a/docker-cloud/builds/advanced.md +++ b/docker-hub/builds/advanced.md @@ -2,6 +2,8 @@ description: Automated builds keywords: automated, build, images title: Advanced options for Autobuild and Autotest +redirect_from: +- /docker-cloud/builds/advanced/ --- The following options allow you to customize your automated build and automated test processes. @@ -38,7 +40,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.) @@ -69,16 +71,16 @@ The following hooks are available: * `hooks/post_build` * `hooks/pre_test` * `hooks/post_test` -* `hooks/pre_push` (only used when executing a build rule or [automated build](automated-build.md) ) -* `hooks/post_push` (only used when executing a build rule or [automated build](automated-build.md) ) +* `hooks/pre_push` (only used when executing a build rule or [automated build](index.md) ) +* `hooks/post_push` (only used when executing a build rule or [automated build](index.md) ) ### Build hook examples #### 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 interface (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 +116,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-testing.md b/docker-hub/builds/automated-testing.md similarity index 78% rename from docker-cloud/builds/automated-testing.md rename to docker-hub/builds/automated-testing.md index 72bee906fe..8f1813ccc2 100644 --- a/docker-cloud/builds/automated-testing.md +++ b/docker-hub/builds/automated-testing.md @@ -3,24 +3,22 @@ description: Automated tests keywords: Automated, testing, repository redirect_from: - /docker-cloud/feature-reference/automated-testing/ +- /docker-cloud/builds/automated-testing/ 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](index.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,15 +54,15 @@ 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 -configured on the same page as [automated builds](automated-build.md), however +associated build-repository in Docker Hub. Your `Autotest` settings are +configured on the same page as [automated builds](index.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. 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. @@ -72,7 +70,7 @@ Docker repository, regardless of the Autotest settings. 4. Click **Configure automated builds**. -5. Configure the automated build settings as explained in [Automated Builds](automated-build.md). +5. Configure the automated build settings as explained in [Automated Builds](index.md). At minimum you must configure: @@ -97,7 +95,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/builds/classic.md b/docker-hub/builds/classic.md new file mode 100644 index 0000000000..994578f0aa --- /dev/null +++ b/docker-hub/builds/classic.md @@ -0,0 +1,90 @@ +--- +description: Explains the difference between Classic and new Automated Builds +keywords: automated, build, images +title: Classic Automated Builds +--- + +With the launch of the new Docker Hub, we are introducing an improved Automated Build experience. + +Automated Builds created using an older version of Docker Hub are now labelled "Classic". +If you were using Docker Cloud to manage builds, your builds are already the latest version of Automated Builds. + +All automated builds created going forward will get the new experience. If you are creating a new +Automated Build for the first time, see [docs](/docker-hub/builds.md#configure-automated-build-settings). + +In the coming months, we will gradually convert Classic Automated Builds into new Automated Builds. This should +be a seamless process for most users. + + +## Managing Classic Automated Builds + +You can manage both Classic and new Automated Builds from the **Builds** tab + +Repository with Classic Automated Build: + +![A Classic Automated Build dashboard](images/classic-vs-new-classic-only.png) + + Build settings can be configured similarly to those on the old Docker Hub. + +If you have previously created an automated build in both the old Docker Hub and Docker Cloud, you can switch between +Classic and new Automated Builds. + +New Automated Build is displayed by default. You can switch to Classic Automated Build by clicking on this link at the top + +![Switching to Classic Automated Build](images/classic-vs-new-switch-to-classic.png) + +Likewise, you can switch back to new Automated Build by clicking on this link at the top + +![Switching to new Automated Build](images/classic-vs-new-switch-to-new.png) + + + +## Adding Github webhook manually + +A GitHub webhook allows GitHub to notify Docker Hub when something has +been committed to a given Git repository. + +When you create a Classic Automated Build, a webhook should get automatically added to your GitHub +repository. + +To add, confirm, or modify the webhook, log in to GitHub, then navigate to +the repository. Within the repository, select **Settings > Webhooks**. +You must have admin privileges on the repository to view or modify +this setting. Click **Add webhook**, and use the following settings: + + +| Field | Value | +| ------|------ | +| Payload URL | https://registry.hub.docker.com/hooks/github | +| Content type | application/json | +| Which events would you like to trigger this webhook? | Just the push event | +| Active | checked | + +The image below shows the **Webhooks/Add webhook** form with the above settings reflected: + +![github-webhook-add](/docker-hub/images/github-webhook-add.png) + +If configured correctly, you'll see this in the **Webhooks** view +![github-webhook](/docker-hub/images/github-webhook.png) + + + +## Frequently Asked Questions + + +**Q: I've previously linked my GitHub/Bitbucket account in the old Docker Hub. Why do I need to re-link it?** + +A: The new Docker Hub uses a different permissions model. [Linking is only a few clicks by going to account settings](link-source.md). +with the new Docker Hub. + + > **Note**: If you are linking a source code provider to create autobuilds for a team, follow the instructions to [create a service account](/docker-hub/builds.md#service-users-for-team-autobuilds) for the team before linking the account as described below. + +**Q: What happens to automated builds I created in the old Docker Hub?** + +A: They are now Classic Automated Builds. There are no functional differences with the old automated builds and everything +(build triggers, existing build rules) should continue to work seamlessly. + +**Q: Is it possible to convert an existing Classic Automated Build?** + +A: This is currently unsupported. However, we are working to transition all builds into new experience in +the coming months. 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-hub/builds/images/classic-vs-new-classic-only.png b/docker-hub/builds/images/classic-vs-new-classic-only.png new file mode 100644 index 0000000000..2e7a64dab4 Binary files /dev/null and b/docker-hub/builds/images/classic-vs-new-classic-only.png differ diff --git a/docker-hub/builds/images/classic-vs-new-switch-to-classic.png b/docker-hub/builds/images/classic-vs-new-switch-to-classic.png new file mode 100644 index 0000000000..c9d7e52885 Binary files /dev/null and b/docker-hub/builds/images/classic-vs-new-switch-to-classic.png differ diff --git a/docker-hub/builds/images/classic-vs-new-switch-to-new.png b/docker-hub/builds/images/classic-vs-new-switch-to-new.png new file mode 100644 index 0000000000..7e546f869b Binary files /dev/null and b/docker-hub/builds/images/classic-vs-new-switch-to-new.png differ diff --git a/docker-hub/builds/images/index-active.png b/docker-hub/builds/images/index-active.png new file mode 100644 index 0000000000..bd516a89e8 Binary files /dev/null and b/docker-hub/builds/images/index-active.png differ diff --git a/docker-hub/builds/images/index-dashboard.png b/docker-hub/builds/images/index-dashboard.png new file mode 100644 index 0000000000..6ed32f34fc Binary files /dev/null and b/docker-hub/builds/images/index-dashboard.png differ diff --git a/docker-hub/builds/images/index-report.png b/docker-hub/builds/images/index-report.png new file mode 100644 index 0000000000..be60eda263 Binary files /dev/null and b/docker-hub/builds/images/index-report.png differ diff --git a/docker-hub/builds/images/link-source-github-ind.png b/docker-hub/builds/images/link-source-github-ind.png new file mode 100644 index 0000000000..813b4bb699 Binary files /dev/null and b/docker-hub/builds/images/link-source-github-ind.png differ diff --git a/docker-hub/builds/images/link-source-github-org-lite.png b/docker-hub/builds/images/link-source-github-org-lite.png new file mode 100644 index 0000000000..2e8fcae5da Binary files /dev/null and b/docker-hub/builds/images/link-source-github-org-lite.png differ 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-hub/builds/images/link-source-github-org.png b/docker-hub/builds/images/link-source-github-org.png new file mode 100644 index 0000000000..6eb68d0ee7 Binary files /dev/null and b/docker-hub/builds/images/link-source-github-org.png differ diff --git a/docker-hub/builds/images/linking-connect-providers.png b/docker-hub/builds/images/linking-connect-providers.png new file mode 100644 index 0000000000..1d5dc499f0 Binary files /dev/null and b/docker-hub/builds/images/linking-connect-providers.png differ 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/automated-build.md b/docker-hub/builds/index.md similarity index 74% rename from docker-cloud/builds/automated-build.md rename to docker-hub/builds/index.md index e36f84253e..e97886ae99 100644 --- a/docker-cloud/builds/automated-build.md +++ b/docker-hub/builds/index.md @@ -1,51 +1,57 @@ --- -description: Automated builds +description: Set up Automated builds keywords: automated, build, images redirect_from: +- /docker-hub/builds/automated-build/ - /docker-cloud/feature-reference/automated-build/ -title: Automated builds +- /docker-cloud/builds/automated-build/ +- /docker-cloud/builds/ +title: Set up 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. +## How Automated Builds work -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. 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 +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 -external registry. +image. The built image is then pushed to the Docker Hub registry. + +> **Note**: You can still use `docker push` to push pre-built images to +repositories with Automated Builds configured. If you have automated tests configured, these run after building but before pushing to the registry. You can use these tests to create a continuous integration workflow where a build that fails its tests does not push the built image. Automated tests do not push images to the registry on their own. [Learn more about automated image testing here.](automated-testing.md) -You can also just use `docker push` to push pre-built images to these -repositories, even if you have automatic builds set up. -![An automated build dashboard](images/build-dashboard.png) +![An automated build dashboard](images/index-dashboard.png) ## Configure automated build settings -You can configure repositories in Docker Cloud so that they automatically +> **Note**: Automated builds created with the old Docker Hub are +now Classic Automated Builds. [Learn more](classic.md) + +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. -Before you set up automated builds you need to [create a repository](repos.md) to build, and [link to your source code provider](link-source.md). +Builds can be added to existing repositories, or added when you create a repository. 1. From the **Repositories** section, click into a repository to view its details. 2. Click the **Builds** tab. 3. If you are setting up automated builds for the first time, select -the code repository service where the image's source code is stored. +the code repository service (GitHub or Bitbucket) where the image's source code is stored. +You might redirected to the settings page to [link](link-source.md) the code repository service. Otherwise, if you are editing the build settings for an existing automated build, click **Configure automated builds**. @@ -56,32 +62,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,30 +75,30 @@ 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 -By default when you set up autobuilds, a basic build rule is created for you. +By default when you set up automated builds, a basic build rule is created for you. This default rule watches for changes to the `master` branch in your source code repository, and builds the `master` branch into a Docker image tagged with `latest`. You @@ -133,17 +119,17 @@ For each source: You can also use a regex to select which source branches or tags to build. To learn more, see - [regexes](automated-build.md#regexes-and-automated-builds). + [regexes](index.md#regexes-and-automated-builds). * Enter the tag to apply to Docker images built from this source. If you configured a regex to select the source, you can reference the capture groups and use its result as part of the tag. To learn more, see - [regexes](automated-build.md#regexes-and-automated-builds). + [regexes](index.md#regexes-and-automated-builds). * 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 +140,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. @@ -172,12 +158,14 @@ bar chart of the build queue times and durations. Both views display the pending, in progress, successful, and failed builds for any tag of the repository. +![Active Builds](images/index-active.png) + From either location, you can click a build job to view its build report. The build report shows information about the build job including the source repository and branch (or tag), the build duration, creation time and location, and the user namespace the build occurred in. -![screen showing a build report](images/build-report.png) +![Build Report](images/index-report.png) ## Cancel or retry a build @@ -249,13 +237,13 @@ You can configure your automated builds so that pushes to specific branches or t You can enter a name, or use a regex to match which source branch or tag names to build. To learn more, see - [regexes](automated-build.md#regexes-and-automated-builds). + [regexes](index.md#regexes-and-automated-builds). 4. Enter the tag to apply to Docker images built from this source. If you configured a regex to select the source, you can reference the capture groups and use its result as part of the tag. To learn more, see - [regexes](automated-build.md#regexes-and-automated-builds). + [regexes](index.md#regexes-and-automated-builds). 5. Repeat steps 2 through 4 for each new build rule you set up. @@ -312,7 +300,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 +313,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 -to clone the repository and build it, however this key only works for a single, +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](index.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](index.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. @@ -355,7 +343,7 @@ When you create an automated build repository in your own account namespace, you These same actions are also available for team repositories from Docker Hub if you are a member of the Organization's `Owners` team. If you are a member of a -team with `write` permissions you can start, cancel and retry builds in your +team with `write` permissions you can start, cancel, and retry builds in your team's repositories, but you cannot edit the team repository settings or delete the team repositories. If your user account has `read` permission, or if you're a member of a team with `read` permission, you can view the build configuration @@ -372,9 +360,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 @@ -395,15 +383,15 @@ variable to automated builds associated with the account. 2. Create a "build" team in your organization. 3. Ensure that the new "build" team has access to each repository and submodule you need to build. - Go to the repository's **Settings** page. On Github, add the new "build" team to the list of **Collaborators and Teams**. On Bitbucket, add the "build" team to the list of approved users on the **Access management** screen. + Go to the repository's **Settings** page. On GitHub, add the new "build" team to the list of **Collaborators and Teams**. On Bitbucket, add the "build" team to the list of approved users on the **Access management** screen. 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. -6. Optionally, use the SSH keys you generated to set up any builds with private submodules, using the service account and [the instructions above](automated-build.md#build-repositories-with-linked-private-submodules). +6. Optionally, use the SSH keys you generated to set up any builds with private submodules, using the service account and [the instructions above](index.md#build-repositories-with-linked-private-submodules). ## What's Next? @@ -413,27 +401,11 @@ Additional advanced options are available for customizing your automated builds, including utility environment variables, hooks, and build phase overrides. To learn more see [Advanced options for Autobuild and Autotest](advanced.md). -### Set up builder nodes - -If you are building on your own infrastructure, you can run the build process on -specific nodes by adding the `builder` label to them. If no builder nodes are -specified, the build containers are deployed using an "emptiest node" strategy. - -You can also limit the number of concurrent builds (including `autotest` builds) -on a specific node by using a `builder=n` tag, where the `n` is the number of -builds to allow. For example a node tagged with `builder=5` only allows up to -five concurrent builds or autotest-builds at the same time. - -### Autoredeploy services on successful build - -You can configure your services to automatically redeploy once the build -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. diff --git a/docker-cloud/builds/link-source.md b/docker-hub/builds/link-source.md similarity index 57% rename from docker-cloud/builds/link-source.md rename to docker-hub/builds/link-source.md index b7ea024254..0fcd0f1e0e 100644 --- a/docker-cloud/builds/link-source.md +++ b/docker-hub/builds/link-source.md @@ -1,51 +1,65 @@ --- -description: Link to your source code repository -keywords: sourcecode, github, bitbucket, Cloud +description: Link to GitHub and BitBucket +keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation, trusted, builds, trusted builds, automated builds, GitHub +title: Configure Automated Builds from GitHub and BitBucket redirect_from: -- /docker-cloud/tutorials/link-source/ -title: Link Docker Cloud to a source code provider +- /docker-hub/github/ +- /docker-hub/bitbucket/ +- /docker-cloud/builds/link-source/ --- 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 +code service to Docker Hub 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 -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. +> **Note**: If you are linking a source code provider to create autobuilds for a team, follow the instructions to [create a service account](/docker-hub/builds.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 navigation. -2. Click or scroll down to **Source providers**. +2. Click or scroll down to **Linked Accounts**. 3. Click the plug icon for the source provider you want to link. - ![Linking source providers](images/source-providers.png) + ![Linking source providers](images/linking-connect-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 + >**Note**: If you are the owner of any GitHub organizations, you might see + 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. -You are now ready to create a new image! +## Link to a Bitbucket user account + +1. Log in to Docker Hub using your Docker ID. + +2. Click **Settings** in the top-right dropdown navigation. + +3. Scroll to the **Linked Accounts** section. + +4. Click the plug icon for the source provider you want to link. + + ![Linking Bitbucket](images/source-providers.png) + +5. If necessary, log in to Bitbucket. + +6. On the page that appears, click **Grant access**. ### 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 -**Source providers** section. +1. Click **Settings** in the top-right dropdown navigation, and click or scroll to the +**Linked Accounts** section. 2. Click the plug icon next to the source provider you want to remove. @@ -56,19 +70,18 @@ from Docker Cloud, *and* from your GitHub account. 4. Go to your GitHub account's **Settings** page. 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 +If you are the owner of a GitHub organization, you can grant or revoke Docker +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,59 +92,44 @@ 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. - ![Revoking access to GitHub organization](images/link-source-github-org-revoke.png) +4. Click the pencil icon next to Docker Hub Builder. 5. On the next page, click **Deny access**. -## Link to a Bitbucket user account - -1. Log in to Docker Cloud using your Docker ID. - -2. Click the gear icon in the left navigation to go to your **Cloud settings**. - -3. Scroll to the **Source providers** section. - -4. Click the plug icon for the source provider you want to link. - - ![Linking Bitbucket](images/source-providers.png) - -5. If necessary, log in to Bitbucket. - -6. On the page that appears, click **Grant access**. ### 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. Find **Settings** in the top-right dropdown navigation, and scroll to **Linked Accounts** 2. Click the plug icon next to the source provider you want to remove. @@ -139,15 +137,15 @@ unlink it both from Docker Cloud, *and* from your Bitbucket account. however access may not have been revoked. You can use this to _temporarily_ disable a linked source code provider account. -4. Go to your Bitbucket account and click the user menu icon in the top right corner. +4. Go to your Bitbucket account and click the user menu icon in the top-right corner. 5. Click **Bitbucket settings**. 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/github.md b/docker-hub/github.md deleted file mode 100644 index 26c2f2ebd8..0000000000 --- a/docker-hub/github.md +++ /dev/null @@ -1,185 +0,0 @@ ---- -description: Docker Hub Automated Builds with GitHub -keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation, trusted, builds, trusted builds, automated builds, GitHub -title: Configure automated builds from GitHub ---- - -If you've previously linked Docker Hub to your GitHub account, -skip to [Creating an Automated Build](github.md#creating-an-automated-build). - -## Linking Docker Hub to a GitHub account - -> Automated Build Permissions - -> Automated Builds currently require *read* and *write* access since -> [Docker Hub](https://hub.docker.com) needs to set up a GitHub webhook. -> We have no choice here – this is how GitHub manages permissions. -> We do guarantee nothing else is touched in your account. - -To set up an Automated Build of a repository on GitHub, you need to -link [Docker Hub](https://hub.docker.com/account/authorized-services/) to your -GitHub account. This allows the registry to see your GitHub repositories. - -To add, remove or view your linked account, log in to your Docker Hub account. Select **Settings > Linked Accounts & Services**. - -Linking to Github grants Docker Hub access to all of your repositories. Follow the -onscreen instructions to authorize and link your GitHub account to Docker Hub. -Once it is linked, you can choose a source repository from which to create the Automatic Build. - -You can review and revoke Docker Hub's access by visiting the -[GitHub User's Applications settings](https://github.com/settings/applications). - -> **Note**: If you delete the connection to the GitHub account that is used for one of your -> automated build repositories, previously built images are still available. -> If you re-link to that GitHub account later, the automated build can be started -> using the **Start Build** button on the Hub, or if the webhook on the GitHub repository -> still exists, it is triggered by any subsequent commits. - -## Changing the GitHub user link - -If you want to remove, or change the level of linking between your GitHub -account and Docker Hub, you need to make the change in two places. - -First, remove the **Linked Account** from your Docker Hub **Settings**. Then go to -your GitHub account's Personal settings, and in the **Applications** section, -***Revoke access***. - -You can now re-link your account at any time. - -## GitHub organizations - -GitHub organizations and private repositories forked from organizations are -made available for autobuilds using the "Docker Hub Registry" application, which -needs to be added to the organization - and then applied to all users. - -To verify or request access, go to your GitHub **Settings** page. Select the -**Applications** section from the left side bar, then click the **View** button for -"Docker Hub Registry". - -![Check User access to GitHub](images/gh-check-user-org-dh-app-access.png) - -The organization's administrators may need to go to the Organization's **Third -party access** screen in **Settings** to grant or deny access to Docker Hub -Registry application. This change applies to all organization members. - -![Check Docker Hub application access to Organization](images/gh-check-admin-org-dh-app-access.png) - -More detailed access controls to specific users and GitHub repositories can be -managed using the GitHub **People and Teams** interfaces. - -## Creating an Automated Build - -You can [create an Automated Build]( -https://hub.docker.com/add/automated-build/github/) from any of your -public or private GitHub repositories that have a `Dockerfile`. - -Once you've selected the source repository, you can then configure: - -- The Hub user/org namespace the repository is built to - either your Docker ID name, or the name of any Hub organizations your account is in -- The Docker repository name the image is built to -- The description of the repository -- If the visibility of the Docker repository is "Public" or "Private", - you can change the accessibility options after the repository has been created. - If you add a Private repository to a Hub user namespace, then you can only add other users - as collaborators, and those users can view and pull all images in that - repository. To configure more granular access permissions, such as using teams of - users or allow different users access to different image tags, then you need - to add the Private repository to a Hub organization for which your user has Administrator - privileges. -- Enable or disable rebuilding the Docker image when a commit is pushed to the - GitHub repository - -You can also select one or more: -- The git branch/tag -- A repository sub-directory to use as the context -- The Docker image tag name - -You can modify the description for the repository by clicking the "Description" section -of the repository view. -The "Full Description" is overwritten by the **README.md** file when the -next build is triggered. - -## GitHub private submodules - -If your GitHub repository contains links to private submodules, your build fails. - -Normally, Docker Hub sets up a deploy key in your GitHub repository. -Unfortunately, GitHub only allows a repository deploy key to access a single -repository. - -To work around this, you can create a dedicated user account in GitHub and -attach the automated build's deploy key that account. This dedicated build -account can be limited to read-only access to just the repositories required to -build. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  StepScreenshotDescription
                  1.First, create the new account in GitHub. It should be given read-only - access to the main repository and all submodules that are needed.
                  2.This can be accomplished by adding the account to a read-only team in - the organization(s) where the main GitHub repository and all submodule - repositories are kept.
                  3.Next, remove the deploy key from the main GitHub repository. This can be done in the GitHub repository's "Deploy keys" Settings section.
                  4.Your automated build's deploy key is in the "Build Details" menu - under "Deploy keys".
                  5.In your dedicated GitHub User account, add the deploy key from your - Docker Hub Automated Build.
                  - -## GitHub webhook - -A GitHub webhook allows GitHub to notify Docker Hub when something has -been committed to a given Git repository. - -When you create an Automated Build, a webhook should get automatically added to your GitHub -repository. - -To add, confirm, or modify the webhook, log in to GitHub, then navigate to -the repository. Within the repository, select **Settings > Webhooks**. -You must have admin privileges on the repository to view or modify -this setting. Click **Add webhook**, and use the following settings: - - -| Field | Value | -| ------|------ | -| Payload URL | https://registry.hub.docker.com/hooks/github | -| Content type | application/json | -| Which events would you like to trigger this webhook? | Just the push event | -| Active | checked | - -The image below shows the **Webhooks/Add webhook** form with the above settings reflected: - -![github-webhook-add](images/github-webhook-add.png) - -If configured correctly, you'll see this in the **Webhooks** view -![github-webhook](images/github-webhook.png) - - diff --git a/docker-hub/images/add-authorized-github-service.png b/docker-hub/images/add-authorized-github-service.png deleted file mode 100644 index 581ab8fb1e..0000000000 Binary files a/docker-hub/images/add-authorized-github-service.png and /dev/null differ diff --git a/docker-hub/images/authorized-services.png b/docker-hub/images/authorized-services.png deleted file mode 100644 index 4e2df0b454..0000000000 Binary files a/docker-hub/images/authorized-services.png and /dev/null differ diff --git a/docker-hub/images/build-by.png b/docker-hub/images/build-by.png deleted file mode 100644 index d2d7f43f02..0000000000 Binary files a/docker-hub/images/build-by.png and /dev/null differ diff --git a/docker-hub/images/build-states-ex.png b/docker-hub/images/build-states-ex.png deleted file mode 100644 index 3d1eea2b6f..0000000000 Binary files a/docker-hub/images/build-states-ex.png and /dev/null differ diff --git a/docker-hub/images/build-trigger.png b/docker-hub/images/build-trigger.png deleted file mode 100644 index 7e6a2cf747..0000000000 Binary files a/docker-hub/images/build-trigger.png and /dev/null differ diff --git a/docker-hub/images/busybox-image-tags.png b/docker-hub/images/busybox-image-tags.png deleted file mode 100644 index c70c17ccd1..0000000000 Binary files a/docker-hub/images/busybox-image-tags.png and /dev/null differ diff --git a/docker-hub/images/create-dialog.png b/docker-hub/images/create-dialog.png deleted file mode 100644 index b565af0b56..0000000000 Binary files a/docker-hub/images/create-dialog.png and /dev/null differ diff --git a/docker-hub/images/create-dialog1.png b/docker-hub/images/create-dialog1.png deleted file mode 100644 index 551e1085ce..0000000000 Binary files a/docker-hub/images/create-dialog1.png and /dev/null differ diff --git a/docker-hub/images/dashboard.png b/docker-hub/images/dashboard.png deleted file mode 100644 index eb7fdc6661..0000000000 Binary files a/docker-hub/images/dashboard.png and /dev/null differ diff --git a/docker-hub/images/first_pending.png b/docker-hub/images/first_pending.png deleted file mode 100644 index e85e933292..0000000000 Binary files a/docker-hub/images/first_pending.png and /dev/null differ 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/images/groups.png b/docker-hub/images/groups.png deleted file mode 100644 index 066703f84b..0000000000 Binary files a/docker-hub/images/groups.png and /dev/null differ diff --git a/docker-hub/images/home-page.png b/docker-hub/images/home-page.png deleted file mode 100644 index 3ead3a8bf2..0000000000 Binary files a/docker-hub/images/home-page.png and /dev/null differ diff --git a/docker-hub/images/hub.png b/docker-hub/images/hub.png deleted file mode 100644 index da50dcf51a..0000000000 Binary files a/docker-hub/images/hub.png and /dev/null differ diff --git a/docker-hub/images/index-create-repo.png b/docker-hub/images/index-create-repo.png new file mode 100644 index 0000000000..283694a804 Binary files /dev/null and b/docker-hub/images/index-create-repo.png differ diff --git a/docker-hub/images/index-repo-created.png b/docker-hub/images/index-repo-created.png new file mode 100644 index 0000000000..19783a7166 Binary files /dev/null and b/docker-hub/images/index-repo-created.png differ diff --git a/docker-hub/images/index-tag.png b/docker-hub/images/index-tag.png new file mode 100644 index 0000000000..d7e12ac440 Binary files /dev/null and b/docker-hub/images/index-tag.png differ diff --git a/docker-hub/images/index-terminal.png b/docker-hub/images/index-terminal.png new file mode 100644 index 0000000000..e55d6d6a0c Binary files /dev/null and b/docker-hub/images/index-terminal.png differ diff --git a/docker-hub/images/index-upgrade-plan.png b/docker-hub/images/index-upgrade-plan.png new file mode 100644 index 0000000000..fcfc5a4893 Binary files /dev/null and b/docker-hub/images/index-upgrade-plan.png differ diff --git a/docker-hub/images/index-welcome.png b/docker-hub/images/index-welcome.png new file mode 100644 index 0000000000..d088a7f969 Binary files /dev/null and b/docker-hub/images/index-welcome.png differ diff --git a/docker-hub/images/invite.png b/docker-hub/images/invite.png deleted file mode 100644 index 1438bddb1f..0000000000 Binary files a/docker-hub/images/invite.png and /dev/null differ diff --git a/docker-hub/images/linked-acct.png b/docker-hub/images/linked-acct.png deleted file mode 100644 index 2cffac3430..0000000000 Binary files a/docker-hub/images/linked-acct.png and /dev/null differ diff --git a/docker-hub/images/login-web.png b/docker-hub/images/login-web.png deleted file mode 100644 index 518a9bbb9a..0000000000 Binary files a/docker-hub/images/login-web.png and /dev/null differ diff --git a/docker-hub/images/merge_builds.png b/docker-hub/images/merge_builds.png deleted file mode 100644 index e4e98dcbd4..0000000000 Binary files a/docker-hub/images/merge_builds.png and /dev/null differ diff --git a/docker-hub/images/official_images-tags.png b/docker-hub/images/official_images-tags.png new file mode 100644 index 0000000000..79bd8fd8c3 Binary files /dev/null and b/docker-hub/images/official_images-tags.png differ diff --git a/docker-hub/images/org-repo-collaborators.png b/docker-hub/images/org-repo-collaborators.png deleted file mode 100644 index 2dc8b82b8d..0000000000 Binary files a/docker-hub/images/org-repo-collaborators.png and /dev/null differ diff --git a/docker-hub/images/orgs-add-team-permissions.png b/docker-hub/images/orgs-add-team-permissions.png new file mode 100644 index 0000000000..06a4e89b14 Binary files /dev/null and b/docker-hub/images/orgs-add-team-permissions.png differ diff --git a/docker-hub/images/orgs-audit-permissions.png b/docker-hub/images/orgs-audit-permissions.png new file mode 100644 index 0000000000..b88330cb88 Binary files /dev/null and b/docker-hub/images/orgs-audit-permissions.png differ diff --git a/docker-hub/images/orgs-create.png b/docker-hub/images/orgs-create.png new file mode 100644 index 0000000000..e9f0979871 Binary files /dev/null and b/docker-hub/images/orgs-create.png differ diff --git a/docker-hub/images/orgs-list-repos.png b/docker-hub/images/orgs-list-repos.png new file mode 100644 index 0000000000..b515ca95bf Binary files /dev/null and b/docker-hub/images/orgs-list-repos.png differ diff --git a/docker-hub/images/orgs-team-add-to-repo.png b/docker-hub/images/orgs-team-add-to-repo.png new file mode 100644 index 0000000000..cc6079af60 Binary files /dev/null and b/docker-hub/images/orgs-team-add-to-repo.png differ diff --git a/docker-hub/images/orgs-team-add-user.png b/docker-hub/images/orgs-team-add-user.png new file mode 100644 index 0000000000..1be3eea022 Binary files /dev/null and b/docker-hub/images/orgs-team-add-user.png differ diff --git a/docker-hub/images/orgs-team-create-submit.png b/docker-hub/images/orgs-team-create-submit.png new file mode 100644 index 0000000000..3d5a178a17 Binary files /dev/null and b/docker-hub/images/orgs-team-create-submit.png differ diff --git a/docker-hub/images/orgs-team-create.png b/docker-hub/images/orgs-team-create.png new file mode 100644 index 0000000000..1e29fc77a4 Binary files /dev/null and b/docker-hub/images/orgs-team-create.png differ diff --git a/docker-hub/images/orgs-team-remove-user.png b/docker-hub/images/orgs-team-remove-user.png new file mode 100644 index 0000000000..1d3c3e016a Binary files /dev/null and b/docker-hub/images/orgs-team-remove-user.png differ diff --git a/docker-hub/images/orgs.png b/docker-hub/images/orgs.png deleted file mode 100644 index ab6c6b00a7..0000000000 Binary files a/docker-hub/images/orgs.png and /dev/null differ diff --git a/docker-hub/images/plus-carrot.png b/docker-hub/images/plus-carrot.png deleted file mode 100644 index c78cd06e93..0000000000 Binary files a/docker-hub/images/plus-carrot.png and /dev/null differ diff --git a/docker-hub/images/prompt.png b/docker-hub/images/prompt.png deleted file mode 100644 index 63ed7d7c9f..0000000000 Binary files a/docker-hub/images/prompt.png and /dev/null differ diff --git a/docker-hub/images/regex-help.png b/docker-hub/images/regex-help.png deleted file mode 100644 index cf005e85d2..0000000000 Binary files a/docker-hub/images/regex-help.png and /dev/null differ diff --git a/docker-hub/images/register-web.png b/docker-hub/images/register-web.png deleted file mode 100644 index 1a4022f1df..0000000000 Binary files a/docker-hub/images/register-web.png and /dev/null differ diff --git a/docker-hub/images/repo-create-private.png b/docker-hub/images/repo-create-private.png new file mode 100644 index 0000000000..74e32b5388 Binary files /dev/null and b/docker-hub/images/repo-create-private.png differ diff --git a/docker-hub/images/repo-make-private.png b/docker-hub/images/repo-make-private.png new file mode 100644 index 0000000000..00f58b9521 Binary files /dev/null and b/docker-hub/images/repo-make-private.png differ diff --git a/docker-hub/images/repo_links.png b/docker-hub/images/repo_links.png deleted file mode 100644 index 7f14de06e4..0000000000 Binary files a/docker-hub/images/repo_links.png and /dev/null differ diff --git a/docker-hub/images/repos-create.png b/docker-hub/images/repos-create.png new file mode 100644 index 0000000000..3586fad217 Binary files /dev/null and b/docker-hub/images/repos-create.png differ diff --git a/docker-hub/images/repos-tags-manage.png b/docker-hub/images/repos-tags-manage.png new file mode 100644 index 0000000000..5087ef7c96 Binary files /dev/null and b/docker-hub/images/repos-tags-manage.png differ diff --git a/docker-hub/images/repos-tags-view.png b/docker-hub/images/repos-tags-view.png new file mode 100644 index 0000000000..20f7ed6ed3 Binary files /dev/null and b/docker-hub/images/repos-tags-view.png differ diff --git a/docker-hub/images/repos.png b/docker-hub/images/repos.png deleted file mode 100644 index da50dcf51a..0000000000 Binary files a/docker-hub/images/repos.png and /dev/null differ diff --git a/docker-hub/images/scan-drilldown.gif b/docker-hub/images/scan-drilldown.gif deleted file mode 100644 index e74acc162e..0000000000 Binary files a/docker-hub/images/scan-drilldown.gif and /dev/null differ diff --git a/docker-hub/images/scan-results.png b/docker-hub/images/scan-results.png deleted file mode 100644 index db4825da8b..0000000000 Binary files a/docker-hub/images/scan-results.png and /dev/null differ diff --git a/docker-hub/images/scan-tags.png b/docker-hub/images/scan-tags.png deleted file mode 100644 index 175ff194c6..0000000000 Binary files a/docker-hub/images/scan-tags.png and /dev/null differ diff --git a/docker-hub/images/slack-notification-updates.png b/docker-hub/images/slack-notification-updates.png new file mode 100644 index 0000000000..8d00567703 Binary files /dev/null and b/docker-hub/images/slack-notification-updates.png differ diff --git a/docker-hub/images/upgrade-change-account.png b/docker-hub/images/upgrade-change-account.png new file mode 100644 index 0000000000..081cc57498 Binary files /dev/null and b/docker-hub/images/upgrade-change-account.png differ diff --git a/docker-hub/images/upgrade-change-plan.png b/docker-hub/images/upgrade-change-plan.png new file mode 100644 index 0000000000..4a5e7fc867 Binary files /dev/null and b/docker-hub/images/upgrade-change-plan.png differ diff --git a/docker-hub/images/webhooks-create.png b/docker-hub/images/webhooks-create.png new file mode 100644 index 0000000000..1165cb919f Binary files /dev/null and b/docker-hub/images/webhooks-create.png differ diff --git a/docker-hub/images/webhooks-empty.png b/docker-hub/images/webhooks-empty.png new file mode 100644 index 0000000000..bb0e04adee Binary files /dev/null and b/docker-hub/images/webhooks-empty.png differ diff --git a/docker-hub/images/webhooks-history.png b/docker-hub/images/webhooks-history.png new file mode 100644 index 0000000000..62f4de4191 Binary files /dev/null and b/docker-hub/images/webhooks-history.png differ diff --git a/docker-hub/images/webhooks-submenu.png b/docker-hub/images/webhooks-submenu.png new file mode 100644 index 0000000000..76ab1cde21 Binary files /dev/null and b/docker-hub/images/webhooks-submenu.png differ diff --git a/docker-hub/images/webhooks.png b/docker-hub/images/webhooks.png deleted file mode 100644 index 50cd2f76a9..0000000000 Binary files a/docker-hub/images/webhooks.png and /dev/null differ diff --git a/docker-hub/index.md b/docker-hub/index.md index c447623ca0..8fbd175b98 100644 --- a/docker-hub/index.md +++ b/docker-hub/index.md @@ -1,107 +1,147 @@ --- -description: Docker Hub overview +description: Docker Hub Quickstart keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation, accounts, organizations, repositories, groups, teams +title: Docker Hub Quickstart redirect_from: - /docker-hub/overview/ -title: Overview of Docker Hub +- /apidocs/docker-cloud/ +- /docker-cloud/ +- /docker-cloud/migration/ +- /docker-cloud/migration/cloud-to-swarm/ +- /docker-cloud/migration/cloud-to-kube-aks/ +- /docker-cloud/migration/cloud-to-kube-gke/ +- /docker-cloud/migration/cloud-to-aws-ecs/ +- /docker-cloud/migration/deregister-swarms/ +- /docker-cloud/migration/kube-primer/ +- /docker-cloud/cloud-swarm/ +- /docker-cloud/cloud-swarm/using-swarm-mode/ +- /docker-cloud/cloud-swarm/register-swarms/ +- /docker-cloud/cloud-swarm/register-swarms/ +- /docker-cloud/cloud-swarm/create-cloud-swarm-aws/ +- /docker-cloud/cloud-swarm/create-cloud-swarm-azure/ +- /docker-cloud/cloud-swarm/connect-to-swarm/ +- /docker-cloud/cloud-swarm/link-aws-swarm/ +- /docker-cloud/cloud-swarm/link-azure-swarm/ +- /docker-cloud/cloud-swarm/ssh-key-setup/ +- /docker-cloud/infrastructure/ +- /docker-cloud/infrastructure/deployment-strategies/ +- /docker-cloud/infrastructure/link-aws/ +- /docker-cloud/infrastructure/link-do/ +- /docker-cloud/infrastructure/link-azure/ +- /docker-cloud/infrastructure/link-packet/ +- /docker-cloud/infrastructure/link-softlayer/ +- /docker-cloud/infrastructure/ssh-into-a-node/ +- /docker-cloud/infrastructure/docker-upgrade/ +- /docker-cloud/infrastructure/byoh/ +- /docker-cloud/infrastructure/cloud-on-packet.net-faq/ +- /docker-cloud/infrastructure/cloud-on-aws-faq/ +- /docker-cloud/standard/ +- /docker-cloud/getting-started/ +- /docker-cloud/getting-started/intro_cloud/ +- /docker-cloud/getting-started/connect-infra/ +- /docker-cloud/getting-started/your_first_node/ +- /docker-cloud/getting-started/your_first_service/ +- /docker-cloud/getting-started/deploy-app/1_introduction/ +- /docker-cloud/getting-started/deploy-app/2_set_up/ +- /docker-cloud/getting-started/deploy-app/3_prepare_the_app/ +- /docker-cloud/getting-started/deploy-app/4_push_to_cloud_registry/ +- /docker-cloud/getting-started/deploy-app/5_deploy_the_app_as_a_service/ +- /docker-cloud/getting-started/deploy-app/6_define_environment_variables/ +- /docker-cloud/getting-started/deploy-app/7_scale_the_service/ +- /docker-cloud/getting-started/deploy-app/8_view_logs/ +- /docker-cloud/getting-started/deploy-app/9_load-balance_the_service/ +- /docker-cloud/getting-started/deploy-app/10_provision_a_data_backend_for_your_service/ +- /docker-cloud/getting-started/deploy-app/11_service_stacks/ +- /docker-cloud/getting-started/deploy-app/12_data_management_with_volumes/ +- /docker-cloud/apps/ +- /docker-cloud/apps/deploy-to-cloud-btn/ +- /docker-cloud/apps/auto-destroy/ +- /docker-cloud/apps/autorestart/ +- /docker-cloud/apps/auto-redeploy/ +- /docker-cloud/apps/load-balance-hello-world/ +- /docker-cloud/apps/deploy-tags/ +- /docker-cloud/apps/stacks/ +- /docker-cloud/apps/ports/ +- /docker-cloud/apps/service-redeploy/ +- /docker-cloud/apps/service-scaling/ +- /docker-cloud/apps/api-roles/ +- /docker-cloud/apps/service-links/ +- /docker-cloud/apps/triggers/ +- /docker-cloud/apps/volumes/ +- /docker-cloud/apps/stack-yaml-reference/ +- /docker-cloud/installing-cli/ +- /docker-cloud/docker-errors-faq/ +- /docker-cloud/release-notes/ +- /docker-store/ --- -[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. - -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 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. +[Docker Hub](https://hub.docker.com) is a service provided by Docker for finding and sharing container images with your team. It provides the following major features: +* [Repositories](/docker-hub/repos.md): Push and pull container images. +* [Teams & Organizations](/docker-hub/orgs.md): Manage access to private repositories of container images. +* [Official Images](/docker-hub/official_images.md): Pull and use high-quality container images provided by Docker. +* [Publisher Images](/docker-hub/publish/customer_faq.md): Pull and 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 from GitHub and Bitbucket and push them to Docker Hub +* [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 -To explore Docker Hub, you need to create an account by following the -directions in [Your Docker ID](/docker-hub/accounts.md). +### Step 1: Sign up for Docker Hub -> **Note**: You can search for and pull Docker images from Hub without logging -> in, however to push images you must log in. +Start by [creating an account](https://hub.docker.com/signup). -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. +### Step 2: Create your first repository -### Explore repositories +To create a repo: +1. Sign in to [Docker Hub](https://hub.docker.com) +2. Click on Create Repository on the Docker Hub welcome page: ![Welcome](images/index-welcome.png) +3. Name it **/my-first-repo** as shown below. Select **Private**: -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: +![Create Repository](images/index-create-repo.png) +You've created your first repo. You should see: + +![Repository Created](images/index-repo-created.png) + +### Step 3: Download and install Docker Desktop + +We'll need to download Docker Desktop to build and push a container image to Docker Hub. + +1. Download and install [Docker Desktop](https://docker.com/get-started). If on Linux, download [Docker Engine - Community](https://hub.docker.com/search?type=edition&offering=community) +2. Open the terminal and sign in to Docker Hub on your computer by running `docker login` + +### Step 4: Build and push a container image to Docker Hub from your computer + +Start by creating a Dockerfile to specify your application as shown below. (More on Dockerfiles [here](https://docs.docker.com/engine/reference/builder/)) +```shell +cat > Dockerfile </my-first-repo .` to build your Docker image +3. Test your docker image locally by running `docker run /my-first-repo` +4. Run `docker push /my-first-repo` to push your Docker image to Docker Hub -Both methods list the available public repositories on Docker Hub which match -the search term. +You should see output similar to: -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). +![Terminal](images/index-terminal.png) -### Use Official Repositories +And in Docker Hub, your repository should have a new `latest` tag available under **Tags**: -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. +![Tag Created](images/index-tag.png) -With Official Repositories you know you're using an optimized and -up-to-date image that was built by experts to power your applications. +Congratulations! You've successfully: +- Signed up for Docker Hub +- Created your first repository +- Built a Docker container image on your computer +- Pushed it to Docker Hub -> **Note**: If you would like to contribute an Official Repository for your -> organization or product, see the documentation on -> [Official Repositories on Docker Hub](/docker-hub/official_repos.md) for more -> information. +### Next Steps - -## Work with Docker Hub image repositories - -Docker Hub provides a place for you and your team to build and ship Docker -images. - -You can configure Docker Hub repositories in two ways: - -* [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. - -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. - -### Docker commands and 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), -[`login`](/engine/reference/commandline/login.md), and -[`push`](/engine/reference/commandline/push.md) commands. +- Create an [Organization](orgs.md) to use Docker Hub with your team. +- Automatically build container images from code through [Builds](builds/index.md). +- [Explore](https://hub.docker.com/explore) Official & Publisher Images +- [Upgrade your plan](upgrade.md) to push additional private Docker images to Docker Hub diff --git a/docker-hub/official_repos.md b/docker-hub/official_images.md similarity index 69% rename from docker-hub/official_repos.md rename to docker-hub/official_images.md index d17ce54b0d..d924313c56 100644 --- a/docker-hub/official_repos.md +++ b/docker-hub/official_images.md @@ -1,10 +1,12 @@ --- -description: Guidelines for Official Repositories on Docker Hub +description: Guidelines for Official Images on Docker Hub keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, official,image, documentation -title: Official repositories on Docker Hub +title: Official Images on Docker Hub +redirect_from: +- /docker-hub/official_repos/ --- -The Docker [Official Repositories](https://hub.docker.com/official/) are a +The Docker [Official Images](https://hub.docker.com/search?q=&type=image&image_filter=official) are a curated set of Docker repositories hosted on Docker Hub. They are designed to: @@ -22,29 +24,29 @@ designed to: authors. * Ensure that security updates are applied in a timely manner. This is - particularly important as many Official Repositories are some of the most + particularly important as many Official Images are some of the most popular on Docker Hub. Docker, Inc. sponsors a dedicated team that is responsible for reviewing and -publishing all content in the official repositories. This team works in +publishing all content in the Official Images. This team works in collaboration with upstream software maintainers, security experts, and the broader Docker community. While it is preferable to have upstream software authors maintaining their -corresponding Official Repositories, this is not a strict requirement. Creating -and maintaining images for Official Repositories is a public process. It takes +corresponding Official Images, this is not a strict requirement. Creating +and maintaining images for Official Images is a public process. It takes place openly on GitHub where participation is encouraged. Anyone can provide feedback, contribute code, suggest process changes, or even propose a new -Official Repository. +Official Image. -## Should I use Official Repositories? +## When to use Official Images -New Docker users are encouraged to use the Official Repositories in their -projects. These repositories have clear documentation, promote best practices, +New Docker users are encouraged to use the Official Images in their +projects. These images have clear documentation, promote best practices, and are designed for the most common use cases. Advanced users are encouraged to -review the Official Repositories as part of their `Dockerfile` learning process. +review the Official Images as part of their `Dockerfile` learning process. -A common rationale for diverging from Official Repositories is to optimize for +A common rationale for diverging from Official Images is to optimize for image size. For instance, many of the programming language stack images contain a complete build toolchain to support installation of modules that depend on optimized code. An advanced user could build a custom image with just the @@ -54,14 +56,13 @@ A number of language stacks such as [python](https://hub.docker.com/_/python/) and [ruby](https://hub.docker.com/_/ruby/) have `-slim` tag variants designed to fill the need for optimization. Even when these "slim" variants are -insufficient, it is still recommended to inherit from an Official Repository +insufficient, it is still recommended to inherit from an Official Image base OS image to leverage the ongoing maintenance work, rather than duplicating these efforts. -## How do I know the Official Repositories are secure? +## Official Image Vulnerability Scanning -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 Images 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. @@ -70,26 +71,27 @@ To view the Docker Security Scanning results: 1. Make sure you're logged in to Docker Hub. You can view Official Images even while logged out, however the scan results are only available once you log in. -2. Navigate to the official repository whose security scan you want to view. +2. Navigate to the repository of the Official Image whose security scan you want to view. 3. Click the `Tags` tab to see a list of tags and their security scan summaries. - ![Viewing CVEs from Docker images](images/scan-drilldown.gif) + +![Official Image Tags](images/official_images-tags.png) You can click into a tag's detail page to see more information about which layers in the image and which components within the layer are vulnerable. Details including a link to the official CVE report for the vulnerability appear when you click an individual vulnerable component. -## How can I get involved? +## Submitting Feedback for Official Images -All Official Repositories contain a **User Feedback** section in their +All Official Images contain a **User Feedback** section in their documentation which covers the details for that specific repository. In most cases, the GitHub repository which contains the Dockerfiles for an Official Repository also has an active issue tracker. General feedback and support questions should be directed to `#docker-library` on Freenode IRC. -## How do I create a new Official Repository? +## Creating an Official Image -From a high level, an Official Repository starts out as a proposal in the form +From a high level, an Official Image starts out as a proposal in the form of a set of GitHub pull requests. Detailed and objective proposal requirements are documented in the following GitHub repositories: @@ -97,21 +99,21 @@ requirements are documented in the following GitHub repositories: * [docker-library/docs](https://github.com/docker-library/docs) -The Official Repositories team, with help from community contributors, formally +The Official Images team, with help from community contributors, formally review each proposal and provide feedback to the author. This initial review -process may require a bit of back and forth before the proposal is accepted. +process may require a bit of back-and-forth before the proposal is accepted. There are also subjective considerations during the review process. These subjective concerns boil down to the basic question: "is this image generally useful?" For example, the [python](https://hub.docker.com/_/python/) -Official Repository is "generally useful" to the large Python developer +Official Image is "generally useful" to the larger Python developer community, whereas an obscure text adventure game written in Python last week is not. Once a new proposal is accepted, the author is responsible for keeping their images up-to-date and responding to user feedback. The Official Repositories team becomes responsible for publishing the images and -documentation on Docker Hub. Updates to the Official Repository follow the same -pull request process, though with less review. The Official Repositories team +documentation on Docker Hub. Updates to the Official Image follow the same +pull request process, though with less review. The Official Images team ultimately acts as a gatekeeper for all changes, which helps mitigate the risk of quality and security issues from being introduced. diff --git a/docker-hub/orgs.md b/docker-hub/orgs.md index 4115d78f03..1244af347f 100644 --- a/docker-hub/orgs.md +++ b/docker-hub/orgs.md @@ -1,52 +1,88 @@ --- -description: Docker Hub Teams and Organizations +description: Docker Hub Teams & Organizations keywords: Docker, docker, registry, teams, organizations, plans, Dockerfile, Docker Hub, docs, documentation -title: Organizations and teams in Docker Hub +title: Teams & Organizations +redirect_from: +- /docker-cloud/orgs/ --- -Docker Hub [organizations](https://hub.docker.com/organizations/) let you create -teams so you can give colleagues access to shared image repositories. A Docker -Hub organization can contain public and private repositories just like a user -account. Access to push or pull for these repositories is allocated by defining -teams of users and then assigning team rights to specific repositories. -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. +Docker Hub Organizations let you create teams so you can give your team access to shared image repositories. -### Create and view organizations +### How Organizations & Teams Work -You can see which organizations you belong to and add new organizations by -clicking **Organizations** in the top nav bar. +- **Organizations** are a collection of teams and repositories that can be managed together. +- **Teams** are groups of Docker Hub users that belong to your organization. -![organizations](images/orgs.png) +**Note:** in Docker Hub, users cannot be associated directly to an organization. They below only to teams within an the organization. -### Organization teams +### Creating an organization -Users in the "Owners" team of an organization can create and modify the -membership of all teams. +1. Start by clicking on [Organizations](https://cloud.docker.com/orgs) in Docker Hub +2. Click on "Create Organization" +3. Provide information about your organization: -Other users can only see teams they belong to. +![Create Organization](images/orgs-create.png) -![teams](images/groups.png) +You've created an organization. You'll see you have a team, the **owners** team with a single member (you!) -### Repository team permissions +### The owners team -Use teams to manage who can interact with your repositories. +The **owners** team is a special team that has full access to all repositories in the Organization. -You need to be a member of the organization's "Owners" team to create a new -team, Hub repository, or automated build. As an "Owner", you then delegate the -following repository access rights to a team using the "Collaborators" section -of the repository view. +Members of this team can: +- Manage Organization settings and billing +- Create a team and modify the membership of any team +- Access and modify any repository belonging to the Organization + +### Creating a team + +To create a team: + +1. Go to your organization by clicking on **Organizations** in Docker Hub, and select your organization. +2. Click **Create Team** ![Create Team](images/orgs-team-create.png) +3. Fill out your team's information and click **Create** ![Create Modal](images/orgs-team-create-submit.png) + +### Adding a member to a team + +1. Visit your team's page in Docker Hub. Click on **Organizations** > **_Your Organization_** > **_Your Team Name_** +2. Click on **Add User** +3. Provide the user's Docker ID username _or_ email to add them to the team ![Add User to Team](images/orgs-team-add-user.png) + +**Note:** you are not automatically added to teams created by your. + +### Removing team members + +To remove a member from a team, click the **x** next to their name: + +![Add User to Team](images/orgs-team-remove-user.png) + +### Giving a team access to a repository + +To provide a team to access a repository: + +1. Visit the repository list on Docker Hub by clicking on **Repositories** +2. Select your organization in the namespace dropdown list +3. Click the repository you'd like to edit ![Org Repos](images/orgs-list-repos.png) +4. Click the **Permissions** tab +5. Select the team, permissions level (more on this below) and click **+** +6. Click the **+** button to add ![Add Repo Permissions for Team](images/orgs-add-team-permissions.png) + +### Viewing a team's permissions for all repositories + +To view a team's permissions over all repos: +1. Click on **Organizations**, then select your organization and team. +2. Click on the **Permissions** tab where you can view which repositories this team has access to ![Team Audit Permissions](images/orgs-audit-permissions.png) + + +### Permissions Reference Permissions are cumulative. For example, if you have Write permissions, you automatically have Read permissions: - `Read` access allows users to view, search, and pull a private repository in the same way as they can a public repository. -- `Write` access allows users to push to non-automated repositories on the Docker Hub. +- `Write` access allows users to push to repositories on Docker Hub. - `Admin` access allows users to modify the repositories "Description", "Collaborators" rights, "Public/Private" visibility and "Delete". > **Note**: A User who has not yet verified their email address only has > `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 70% rename from docker-store/byol.md rename to docker-hub/publish/byol.md index 0644b44177..6bc7f40fe7 100644 --- a/docker-store/byol.md +++ b/docker-hub/publish/byol.md @@ -1,20 +1,22 @@ --- -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 +redirect_from: +- /docker-store/byol/ --- ## 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 +27,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 97% rename from docker-store/certify-images.md rename to docker-hub/publish/certify-images.md index 7614377a53..ab96a2045a 100644 --- a/docker-store/certify-images.md +++ b/docker-hub/publish/certify-images.md @@ -2,13 +2,15 @@ description: Run certification tests against your images keywords: Docker, docker, store, certified content, images title: Certify Docker images +redirect_from: +- /docker-store/certify-images/ --- ## Introduction 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,11 +20,11 @@ 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: -- Verifies that the Docker image was built from an image in the [Docker Official Repository](https://github.com/docker-library/repo-info/tree/master/repos) +- Verifies that the Docker image was built from an image in the [Docker Official Image](https://github.com/docker-library/repo-info/tree/master/repos) - Inspects the Docker image for a Health Check. Although a Health Check is not required, it is recommended. @@ -42,15 +44,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 a multi-architecture Docker image (for example, Linux, Power, s390x, Windows) 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 +176,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 to 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 +190,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 +235,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 +449,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 2f52fd7b1d..fd806ae7bd 100644 --- a/docker-store/certify-plugins-logging.md +++ b/docker-hub/publish/certify-plugins-logging.md @@ -1,14 +1,17 @@ --- 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 +redirect_from: +- /docker-store/certify-plugins-logging/ + --- ## Introduction 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 +21,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 +35,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 +55,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 +135,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 +221,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 +233,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 +254,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 +347,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 +455,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..ee2f3cf94a 100644 --- a/docker-store/customer_faq.md +++ b/docker-hub/publish/customer_faq.md @@ -1,20 +1,13 @@ --- -description: Docker Store frequently asked questions +description: Publisher & Certified Content FAQs keywords: Docker, docker, store, purchase images -title: Docker Store Customer FAQs +title: Docker Hub Publisher & Certified Content FAQs +redirect_from: +- /docker-store/customer_faq/ --- ## 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 +46,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..868d9965ba --- /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: Publisher & Certified Content 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 through Docker + +This commercial model allows customers to pay for ISV content through Docker, as +described in the Store Vendor Partner agreement. Paid-through-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 through an agent +(containerized cloud services, for example). + +### Licensed content through 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 93% rename from docker-store/publish.md rename to docker-hub/publish/publish.md index 6a33a3f1a5..eb1003fa24 100644 --- a/docker-store/publish.md +++ b/docker-hub/publish/publish.md @@ -1,7 +1,9 @@ --- -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 +redirect_from: +- /docker-store/publish/ --- ## Permitted content and support options @@ -27,7 +29,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 +40,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 @@ -62,7 +64,7 @@ and guidelines listed below to build and deliver great content: * [Best practices for writing Dockerfiles](/engine/userguide/eng-image/dockerfile_best-practices/) -* [Official repositories on Docker Hub](/docker-hub/official_repos/) +* [Official Images on Docker Hub](/docker-hub/official_images/) * [Docker Bench for Security](https://github.com/docker/docker-bench-security){: target="_blank" class="_"} @@ -140,7 +142,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 +190,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 +211,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 +325,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 +352,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 81% rename from docker-store/publisher_faq.md rename to docker-hub/publish/publisher_faq.md index 6bb13204a5..5f3003c395 100644 --- a/docker-store/publisher_faq.md +++ b/docker-hub/publish/publisher_faq.md @@ -1,7 +1,10 @@ --- -description: Docker Store frequently asked questions -keywords: Docker, docker, store, purchase images -title: Docker Store Publisher FAQs +description: Docker Hub frequently asked questions for publishers +keywords: Docker, docker, hub, purchase images +title: Docker Hub Publisher FAQs +redirect_from: +- /docker-store/publisher_faq/ + --- ## Certification program @@ -25,7 +28,7 @@ Infrastructure, Images, and Plugins in more detail. Start by applying to be a Docker Technology Partner at https://goto.docker.com/partner and click on "Publisher". * Requires acceptance of partnership agreement for completion -* Identify content that can be listed on Store and includes a support offering +* Identify content that can be listed on Hub and includes a support offering * Test your image against Docker Certified Infrastructure version 17.03 and above (Plugins must run on 17.03 and above). * Submit your image for Certification through the publisher portal. Docker @@ -35,11 +38,11 @@ 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. -### Can we have a group of people work on the same product and publish to Store? (This replicates our internal workflow where more than one person is working on Dockerizing our product.) +### Can we have a group of people work on the same product and publish to Docker Hub? (This replicates our internal workflow where more than one person is working on Dockerizing our product.) Yes. You can submit your content as a team. @@ -70,7 +73,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 +95,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 through 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 that's 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,13 +109,13 @@ 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). ### Regarding source repo tags: it says not to use “latest”. However, if we want users to be able to download the images without specifying a tag, then presumably an image tagged “latest” is required. So how do we go about that? -You can not submit "latest" tags via the certification/store publish workflow. +You can not submit "latest" tags through the certification/hub publish workflow. The reason we do this is so that users are aware of the exact version they download. To make the user experience easy we have a copy widget that users can use to copy the pull command and paste in their command line. Here is a @@ -121,9 +124,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 @@ -138,29 +141,29 @@ Here is a [screenshot](https://user-images.githubusercontent.com/2453622/3206729 ### If something is published as a free tier, for subscribed users only, does a user need to explicitly click Accept on the license terms for which we provide the link before they can download the image? Yes -### Do you have a license enforcement system for docker images sold on store? How are they protected, once they have been downloaded? What happens if a customer stop paying for the image I am selling after, let's say, 2 months? +### Do you have a license enforcement system for docker images sold on Docker Hub? How are they protected, once they have been downloaded? What happens if a customer stop paying for the image I am selling after, let's say, 2 months? We provide the following licensing option to customers: * Bring your own License or BYOL. The expectation is that the publisher would take care of License Keys within the -container. The License Key itself can be presented to the customer via Docker -Store. We expect the Publisher to build short circuits into the container, so +container. The License Key itself can be presented to the customer through Docker +Hub. We expect the Publisher to build short circuits into the container, so the container stops running once the License Key expires. Once a customer cancels, or if the customer subscription expires - the customer cannot -download updates from the Store. +download updates from Docker Hub. If a user cancels their subscription, they cannot download updates -from the Store. The container may continue running. If you have a licensing +from Docker Hub. The container may continue running. If you have a licensing scheme built into the container, the licensing scheme can be a forcing function and stop the container. (_We do not build anything into the container, it is up to the publisher_). -### How does a customer transition from a Trial to a Paid subscription? Question assumes these are two separate pulls from Store, or can they just drop in a license via Store? +### How does a customer transition from a Trial to a Paid subscription? Question assumes these are two separate pulls from Docker Hub, or can they just drop in a license through Docker Hub? 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,12 +171,12 @@ 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? -We provide export control via blacklisting several countries, IPs and users +We provide export control through blacklisting several countries, IPs and users based on the national export compliance database. Any export control we do is across all products, we do not selectively blacklist versions and products for specific groups. Send us an email at publisher-support if you have questions @@ -183,7 +186,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 60% rename from docker-store/trustchain.md rename to docker-hub/publish/trustchain.md index d48cc7c7d4..14993831a3 100644 --- a/docker-store/trustchain.md +++ b/docker-hub/publish/trustchain.md @@ -1,26 +1,28 @@ --- -title: Docker Store trust chain +title: Docker Hub Publisher Image Trust Chain keywords: trust, chain, store, security +redirect_from: +- /docker-store/trustchain/ --- ## For consumers -Docker ensures that all content is securely received and verified from original +Docker can ensure 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 +Hub. 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 +32,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 +46,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 63bbf9c9d8..ba2e6718d1 100644 --- a/docker-hub/repos.md +++ b/docker-hub/repos.md @@ -1,74 +1,22 @@ --- -description: Your Repositories on Docker Hub +description: Using repositories on Docker Hub keywords: Docker, docker, trusted, registry, accounts, plans, Dockerfile, Docker Hub, webhooks, docs, documentation -title: Repositories on Docker Hub +title: Repositories --- -Docker Hub repositories let you share images with co-workers, customers, or the -Docker community at large. If you're building your images internally, either on -your own Docker daemon, or using your own Continuous integration services, you -can push them to a Docker Hub repository that you add to your Docker Hub user or -organization account. +Docker Hub repositories allow you share container images with your team, +customers, or the Docker community at large. -Alternatively, if the source code for your Docker image is on GitHub or -Bitbucket, you can use an "Automated build" repository, which is built by the -Docker Hub services. See the [automated builds documentation](/docker-hub/builds.md) to read -about the extra functionality provided by those services. +Docker images are pushed to Docker Hub through the [`docker push`](https://docs.docker.com/engine/reference/commandline/push/) command. A single Docker Hub repository can hold many Docker images (stored as **tags**). -![repositories](/docker-hub/images/repos.png) +## Creating Repositories -## Searching for images +To create a repository, sign into Docker Hub, click on **Repositories** then **Create Repo**: -You can search the [Docker Hub](https://hub.docker.com) registry via its search -interface or by using the command line interface. Searching can find images by -image name, user name, or description: - - $ docker search centos - NAME DESCRIPTION STARS OFFICIAL AUTOMATED - centos The official build of CentOS. 1034 [OK] - ansible/centos7-ansible Ansible on Centos7 43 [OK] - tutum/centos Centos image with SSH access. For the root... 13 [OK] - ... - -There you can see two example results: `centos` and `ansible/centos7-ansible`. -The second result shows that it comes from the public repository of a user, -named `ansible/`, while the first result, `centos`, doesn't explicitly list a -repository which means that it comes from the top-level namespace for [Official -Repositories](official_repos.md). The `/` character separates a user's -repository from the image name. - -Once you've found the image you want, you can download it with `docker pull `: - - $ docker pull centos - latest: Pulling from centos - 6941bfcbbfca: Pull complete - 41459f052977: Pull complete - fd44297e2ddb: Already exists - centos:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security. - Digest: sha256:d601d3b928eb2954653c59e65862aabb31edefa868bd5148a41fa45004c12288 - Status: Downloaded newer image for centos:latest - -You now have an image from which you can run containers. - -## Viewing repository tags - -Docker Hub's repository "Tags" view shows you the available tags and the size -of the associated image. - -Image sizes are the cumulative space taken up by the image and all its parent -images. This is also the disk space used by the contents of the Tar file created -when you `docker save` an image. - -![images/busybox-image-tags.png](/docker-hub/images/busybox-image-tags.png) - -## Creating a new repository on Docker Hub - -When you first create a Docker Hub user, you see a "Get started with -Docker Hub." screen, from which you can click directly into "Create Repository". -You can also use the "Create ▼" menu to "Create Repository". +![Create repo](images/repos-create.png) When creating a new repository, you can choose to put it in your Docker ID -namespace, or that of any [organization](/docker-hub/orgs.md) that you are in the "Owners" +namespace, or that of any [Organization](/docker-hub/orgs.md) that you are in the "Owners" team. The Repository Name needs to be unique in that namespace, can be two to 255 characters, and can only contain lowercase letters, numbers or `-` and `_`. @@ -80,20 +28,20 @@ can use Markdown to add simple formatting. After you hit the "Create" button, you then need to `docker push` images to that Hub based repository. - +## Pushing a Docker container image to Docker Hub -## Pushing a repository image to Docker Hub - -To push a repository to the Docker Hub, you need to +To push a repository to the Docker Hub, you must name your local image using your Docker Hub username, and the -repository name that you created in the previous step. +repository name that you created through Docker Hub on the web. + You can add multiple images to a repository, by adding a specific `:` to it (for example `docs/base:testing`). If it's not specified, the tag defaults to `latest`. + You can name your local images either when you build it, using `docker build -t /[:]`, by re-tagging an existing local image `docker tag /[:]`, -or by using `docker commit /[:]` to commit +or by using `docker commit /[:]` to commit changes. Now you can push this repository to the registry designated by its name or tag. @@ -103,18 +51,37 @@ 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 teammates and/or the community. +## Private Repositories -## Stars +Private repositories allow you keep container images private, either to your own account or within an organization or +team. -Your repositories can be starred and you can star repositories in return. Stars -are a way to show that you like a repository. They are also an easy way of -bookmarking your favorites. +To create a private repo select **Private** when creating a private repo: -## Comments +![Create Private Repo](images/repo-create-private.png) -You can interact with other members of the Docker community and maintainers by -leaving comments on repositories. If you find any comments that are not -appropriate, you can flag them for review. +You can also make an existing repository private by going to the repo's **Settings** tab: + +![Convert Repo to Private](images/repo-make-private.png) + +You get one private repository for free with your Docker Hub user account (not usable for +organizations you're a member of). If you need more private repositories for your user account, upgrade +your Docker Hub plan from your [Billing Information](https://hub.docker.com/account/billing-plans/) page. + +Once the private repository is created, you can `push` and `pull` images to and +from it using Docker. + +> **Note**: You need to be signed in and have access to work with a +> private repository. + +> **Note**: Private repositories are not currently available to search through the +top-level search or `docker search` + +You can designate collaborators and manage their access to a private +repository from that repository's *Settings* page. You can also toggle the +repository's status between public and private, if you have an available +repository slot open. Otherwise, you can upgrade your +[Docker Hub](https://hub.docker.com/account/billing-plans/) plan. ## Collaborators and their role @@ -131,130 +98,58 @@ You can also assign more granular collaborator rights ("Read", "Write", or "Admin") on Docker Hub by using organizations and teams. For more information see the [organizations documentation](/docker-hub/orgs.md). -## Private repositories -Private repositories allow you to have repositories that contain images that you -want to keep private, either to your own account or within an organization or -team. +## Viewing repository tags -To work with a private repository on [Docker Hub](https://hub.docker.com), you -need to add one using the [Add Repository](https://hub.docker.com/add/repository/) button. You get one private -repository for free with your Docker Hub user account (not usable for -organizations you're a member of). If you need more private repositories for your user account, upgrade -your Docker Hub plan from your [Billing Information](https://hub.docker.com/account/billing-plans/) page. +Docker Hub's repository "Tags" view shows you the available tags and the size +of the associated image. -User and organization accounts maintain separate billing profiles. For more information on managing billing for your account, you may refer to the [Where can I change my billing details?](https://success.docker.com/article/where-can-i-change-my-billing-details) kbase article. +![View Repo Tags](images/repos-tags-view.png) -Once the private repository is created, you can `push` and `pull` images to and -from it using Docker. +Image sizes are the cumulative space taken up by the image and all its parent +images. This is also the disk space used by the contents of the .tar file created +when you `docker save` an image. -> **Note**: You need to be signed in and have access to work with a -> private repository. +To edit tags, click on Manage Repository or find your repository under *Repositories*: -Private repositories are just like public ones. However, it isn't possible to -browse them or search their content on the public registry. They do not get -cached the same way as a public repository either. +![Manage Repo Tags](images/repos-tags-manage.png) -You can designate collaborators and manage their access to a private -repository from that repository's *Settings* page. You can also toggle the -repository's status between public and private, if you have an available -repository slot open. Otherwise, you can upgrade your -[Docker Hub](https://hub.docker.com/account/billing-plans/) plan. +## Searching for Repositories -## Webhooks +You can search the [Docker Hub](https://hub.docker.com) registry through its search +interface or by using the command line interface. Searching can find images by +image name, user name, or description: -A webhook is an HTTP call-back triggered by a specific event. You can use a Hub -repository webhook to notify people, services, and other applications after a -new image is pushed to your repository (this also happens for Automated builds). -For example, you can trigger an automated test or deployment to happen as soon -as the image is available. + $ docker search centos + NAME DESCRIPTION STARS OFFICIAL AUTOMATED + centos The official build of CentOS. 1034 [OK] + ansible/centos7-ansible Ansible on Centos7 43 [OK] + tutum/centos Centos image with SSH access. For the root... 13 [OK] + ... -To get started adding webhooks, go to the desired repository in the Hub, and -click "Webhooks" under the "Settings" box. A webhook is called only after a -successful `push` is made. The webhook calls are HTTP POST requests with a JSON -payload similar to the example shown below. +There you can see two example results: `centos` and `ansible/centos7-ansible`. +The second result shows that it comes from the public repository of a user, +named `ansible/`, while the first result, `centos`, doesn't explicitly list a +repository which means that it comes from the top-level namespace for [Official +Images](/docker-hub/official_images.md). The `/` character separates a user's +repository from the image name. -*Example webhook JSON payload:* +Once you've found the image you want, you can download it with `docker pull `: -```json -{ - "callback_url": "https://registry.hub.docker.com/u/svendowideit/busybox/hook/2141bc0cdec4hebec411i4c1g40242eg110020/", - "push_data": { - "images": [ - "27d47432a69bca5f2700e4dff7de0388ed65f9d3fb1ec645e2bc24c223dc1cc3", - "51a9c7c1f8bb2fa19bcd09789a34e63f35abb80044bc10196e304f6634cc582c", - "..." - ], - "pushed_at": 1.417566822e+09, - "pusher": "svendowideit" - }, - "repository": { - "comment_count": 0, - "date_created": 1.417566665e+09, - "description": "", - "full_description": "webhook triggered from a 'docker push'", - "is_official": false, - "is_private": false, - "is_trusted": false, - "name": "busybox", - "namespace": "svendowideit", - "owner": "svendowideit", - "repo_name": "svendowideit/busybox", - "repo_url": "https://registry.hub.docker.com/u/svendowideit/busybox/", - "star_count": 0, - "status": "Active" - } -} -``` + $ docker pull centos + latest: Pulling from centos + 6941bfcbbfca: Pull complete + 41459f052977: Pull complete + fd44297e2ddb: Already exists + centos:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security. + Digest: sha256:d601d3b928eb2954653c59e65862aabb31edefa868bd5148a41fa45004c12288 + Status: Downloaded newer image for centos:latest - +You now have an image from which you can run containers. ->**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. -### Webhook chains +## Starring Repositories -Webhook chains allow you to chain calls to multiple services. For example, you -can use this to trigger a deployment of your container only after it has been -successfully tested, then update a separate Changelog once the deployment is -complete. After clicking the "Add webhook" button, simply add as many URLs as -necessary in your chain. - -The first webhook in a chain is called after a successful push. Subsequent -URLs are contacted after the callback has been validated. - -### Validating a callback - -To validate a callback in a webhook chain, you need to - -1. Retrieve the `callback_url` value in the request's JSON payload. -1. Send a POST request to this URL containing a valid JSON body. - -> **Note**: A chain request is only considered complete once the last -> callback has been validated. - -To help you debug or simply view the results of your webhook(s), view the -"History" of the webhook available on its settings page. - -#### Callback JSON data - -The following parameters are recognized in callback data: - -* `state` (required): Accepted values are `success`, `failure`, and `error`. - If the state isn't `success`, the webhook chain is interrupted. -* `description`: A string containing miscellaneous information that is - available on Docker Hub. Maximum 255 characters. -* `context`: A string containing the context of the operation. Can be retrieved - from the Docker Hub. Maximum 100 characters. -* `target_url`: The URL where the results of the operation can be found. Can be - retrieved on the Docker Hub. - -*Example callback payload:* - - { - "state": "success", - "description": "387 tests PASSED", - "context": "Continuous integration by Acme CI", - "target_url": "http://ci.acme.com/results/afd339c1c3d27" - } +Your repositories can be starred and you can star repositories in return. Stars +are a way to show that you like a repository. They are also an easy way of +bookmarking your favorites. diff --git a/docker-cloud/slack-integration.md b/docker-hub/slack_integration.md similarity index 56% rename from docker-cloud/slack-integration.md rename to docker-hub/slack_integration.md index 9fb3f7b3a0..719790af2e 100644 --- a/docker-cloud/slack-integration.md +++ b/docker-hub/slack_integration.md @@ -1,26 +1,27 @@ --- -description: Integrate with Slack +description: Integrate Docker Hub with Slack keywords: Slack, integrate, notifications redirect_from: - /docker-cloud/tutorials/slack-integration/ -title: Set up Docker Cloud notifications in Slack +- /docker-cloud/slack-integration/ +title: Set up Docker Hub notifications in Slack --- -Docker Cloud can integrate with your **Slack** team to provide notifications about stacks, services, containers, and nodes. +Docker Hub can integrate with your **Slack** team to provide notifications about builds. ## 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. +1. Log in to the Docker account that owns the builds 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. +2. Click **Account 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. + The Docker Hub 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. @@ -28,22 +29,19 @@ Before you begin, make sure that you are signed into the Slack team that you wan 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. +* **Only failures** Only receive notifications about failed builds. +* **Everything** Receive notifications for both failed and successful builds. ![](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. +* Click **Account 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. +* Alternately, go to the Slack App Management page and search for "Docker Hub". Click the result to see all of the Docker Hub notification channels set for the Slack team. diff --git a/docker-hub/upgrade.md b/docker-hub/upgrade.md new file mode 100644 index 0000000000..54a133e39e --- /dev/null +++ b/docker-hub/upgrade.md @@ -0,0 +1,27 @@ +--- +description: Upgrading your Docker Hub Plan +keywords: Docker, docker, trusted, registry, accounts, plans, Dockerfile, Docker Hub, webhooks, docs, documentation +title: Upgrading your Plan +--- + +User and organization accounts maintain separate Docker Hub billing profiles. + +### Upgrading your personal plan + +Docker Hub 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: +1. Visit the [Plans Page](https://hub.docker.com/account/billing-plans/) +2. Click Change Plan +3. Select your plan and provide your payment information to upgrade ![Upgrade Plan](images/index-upgrade-plan.png) + +### Upgrading your organization's plan + +To upgrade an Organization's plan: + +1. Visit the [Plans Page](https://hub.docker.com/account/billing-plans/) +2. Change the selected account to your Organization whose plan you'd like to upgrade ![Change Account](images/upgrade-change-account.png) + +3. Click Change Plan ![Change Plan](images/upgrade-change-plan.png) diff --git a/docker-hub/webhooks.md b/docker-hub/webhooks.md index 1b874c21c3..4ac2efe334 100644 --- a/docker-hub/webhooks.md +++ b/docker-hub/webhooks.md @@ -1,20 +1,36 @@ --- -description: Docker Hub Automated Builds +description: Docker Hub Webhooks keywords: Docker, webhookds, hub, builds -title: Webhooks for automated builds +title: Docker Hub Webhooks --- -If you have an automated build repository in Docker Hub, you can use Webhooks to -cause an action in another application in response to an event in the -repository. Webhook is a POST request sent to a defined URL which provides the service. Docker Hub webhooks fire when an image is built in, or a new tag -is added to, your automated build repository. +You can use webhooks to cause an action in another service in response to a push event in the repository. Webhooks are POST requests sent to a URL you define in Docker Hub. -Configure webhooks on `https://hub.docker.com/r///~/settings/webhooks/`. +Configure webhooks through the "Webhooks" tab on your Docker Hub repository: -![Create Webhook](/docker-hub/images/webhooks.png) +![Webhooks Page](images/webhooks-empty.png) -With your webhook, you specify a target URL to POST to. Docker Hub POSTs the URL -with the following payload: +### Creating Webhooks + +To create a webhook, visit the webhooks tab for your repository. Then: +1. Provide a name for the webhooks +2. Provide a destination webhook URL. This is where webhook POST requests will be delivered: + +![Webhooks Create](images/webhooks-create.png) + +### Viewing Webhook Delivery History + +You can view Webhook Delivery History by clicking on the submenu of the webhook and then clicking "View History" + +![Webhooks View History](images/webhooks-submenu.png) + +You can then view the delivery history, and whether delivering the POST request was successful or failed: + +![Webhooks History](images/webhooks-history.png) + +### Example Webhook Payload + +Docker Hub Webhook payloads have the following payload JSON format: ```json { @@ -33,7 +49,7 @@ with the following payload: "comment_count": 0, "date_created": 1.417494799e+09, "description": "", - "dockerfile": "#\n# BUILD\u0009\u0009docker build -t svendowideit/apt-cacher .\n# RUN\u0009\u0009docker run -d -p 3142:3142 -name apt-cacher-run apt-cacher\n#\n# and then you can run containers with:\n# \u0009\u0009docker run -t -i -rm -e http_proxy http://192.168.1.2:3142/ debian bash\n#\nFROM\u0009\u0009ubuntu\n\n\nVOLUME\u0009\u0009[\/var/cache/apt-cacher-ng\]\nRUN\u0009\u0009apt-get update ; apt-get install -yq apt-cacher-ng\n\nEXPOSE \u0009\u00093142\nCMD\u0009\u0009chmod 777 /var/cache/apt-cacher-ng ; /etc/init.d/apt-cacher-ng start ; tail -f /var/log/apt-cacher-ng/*\n", + "dockerfile": "#\n# BUILD\u0009\u0009docker build -t svendowideit/apt-cacher .\n# RUN\u0009\u0009docker run -d -p 3142:3142 -name apt-cacher-run apt-cacher\n#\n# and then you can run containers with:\n# \u0009\u0009docker run -t -i -rm -e http_proxy http://192.168.1.2:3142/ debian bash\n#\nFROM\u0009\u0009ubuntu\n\n\nVOLUME\u0009\u0009[/var/cache/apt-cacher-ng]\nRUN\u0009\u0009apt-get update ; apt-get install -yq apt-cacher-ng\n\nEXPOSE \u0009\u00093142\nCMD\u0009\u0009chmod 777 /var/cache/apt-cacher-ng ; /etc/init.d/apt-cacher-ng start ; tail -f /var/log/apt-cacher-ng/*\n", "full_description": "Docker Hub based automated build from a GitHub repo", "is_official": false, "is_private": true, @@ -49,6 +65,35 @@ 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. +### Validating a webhook callback + +To validate a callback in a webhook chain, you need to + +1. Retrieve the `callback_url` value in the request's JSON payload. +1. Send a POST request to this URL containing a valid JSON body. + +> **Note**: A chain request is only considered complete once the last +> callback has been validated. + + +#### Callback JSON data + +The following parameters are recognized in callback data: + +* `state` (required): Accepted values are `success`, `failure`, and `error`. + If the state isn't `success`, the Webhook chain is interrupted. +* `description`: A string containing miscellaneous information that is + available on Docker Hub. Maximum 255 characters. +* `context`: A string containing the context of the operation. Can be retrieved + from the Docker Hub. Maximum 100 characters. +* `target_url`: The URL where the results of the operation can be found. Can be + retrieved on the Docker Hub. + +*Example callback payload:* + + { + "state": "success", + "description": "387 tests PASSED", + "context": "Continuous integration by Acme CI", + "target_url": "http://ci.acme.com/results/afd339c1c3d27" + } diff --git a/docker-id/images/login-cloud.png b/docker-id/images/login-cloud.png deleted file mode 100644 index 591609e882..0000000000 Binary files a/docker-id/images/login-cloud.png and /dev/null differ diff --git a/docker-id/images/login.png b/docker-id/images/login.png new file mode 100644 index 0000000000..2533848b9c Binary files /dev/null and b/docker-id/images/login.png differ diff --git a/docker-id/index.md b/docker-id/index.md index a6ac858675..cf83aa998a 100644 --- a/docker-id/index.md +++ b/docker-id/index.md @@ -1,13 +1,13 @@ --- 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 +redirect_from: +- /docker-cloud/dockerid/ +- /docker-hub/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 +17,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 +39,9 @@ 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. +to [Docker Hub](https://hub.docker.com) and [Docker Support](https://support.docker.com). -For Docker Cloud, Hub, and Store, log in using the web interface. - -![Login using the web interface](/docker-id/images/login-cloud.png) +![Login](images/login.png) 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 7c5f96b957..0000000000 --- a/docker-store/index.md +++ /dev/null @@ -1,96 +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 is experiencing rapid adoption. Images have been pulled by Docker users over twelve billion times. More Docker users are 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/auto-delete-repo-events.md b/ee/dtr/admin/configure/auto-delete-repo-events.md index 733f8e3136..8e7c2d6366 100644 --- a/ee/dtr/admin/configure/auto-delete-repo-events.md +++ b/ee/dtr/admin/configure/auto-delete-repo-events.md @@ -39,5 +39,5 @@ If you check and specify both, events in your repositories will be removed durin ## Where to go next -- [Manage job logs](../admin/configure/manage-job-logs.md) +- [Manage job logs](/ee/dtr/admin/manage-jobs/audit-jobs-via-ui/) diff --git a/ee/dtr/admin/configure/deploy-caches/configuration-reference.md b/ee/dtr/admin/configure/deploy-caches/configuration-reference.md index 713a2997e7..988cc65b1f 100644 --- a/ee/dtr/admin/configure/deploy-caches/configuration-reference.md +++ b/ee/dtr/admin/configure/deploy-caches/configuration-reference.md @@ -43,8 +43,7 @@ Below you can find the description for each parameter, specific to DTR caches. no -The TTL for blobs in the cache. This field takes a positive integer and an optional suffix indicating the unit of time. If -this field is configured, "storage.delete.enabled" must be configured to true. Possible units are: +A positive integer and an optional unit of time suffix to determine the TTL (Time to Live) value for blobs in the cache. If blobttl is configured, storage.delete.enabled must be set to true. Acceptable units of time are:
                  • ns (nanoseconds)
                  • us (microseconds)
                  • diff --git a/ee/dtr/admin/configure/deploy-caches/index.md b/ee/dtr/admin/configure/deploy-caches/index.md index 08c3fe2c10..1c5f35974c 100644 --- a/ee/dtr/admin/configure/deploy-caches/index.md +++ b/ee/dtr/admin/configure/deploy-caches/index.md @@ -6,7 +6,7 @@ keywords: DTR, cache --- The further away you are from the geographical location where DTR is deployed, -the longer it will take the pull and push images. +the longer it will take to pull and push images. This happens because the files being transferred from DTR to your machine need to travel a longer distance, across multiple networks. @@ -15,9 +15,8 @@ need to travel a longer distance, across multiple networks. To decrease the time to pull an image, you can deploy DTR caches geographically closer to users. -Caches are transparent to users, since users still login and pull images using -the DTR url address. -DTR checks if users are authorized to pull the image, and redirects the +Caches are transparent to users, since users still log in and pull images using +the DTR URL address. DTR checks if users are authorized to pull the image, and redirects the request to the cache. ![Pull with cache](../../../images/deploy-caches-2.svg) @@ -25,7 +24,7 @@ request to the cache. In this example, DTR is deployed on a datacenter in the United States, and a cache is deployed in the Asia office. -Users in the Asia office updated their user profile in DTR to fetch from +Users in the Asia office update their user profile within DTR to fetch from the cache in their office. They pull an image using: ``` @@ -37,11 +36,11 @@ docker image pull dtr.example.org/website/ui:3-stable ``` DTR authenticates the request and checks if the user has permission to pull the -image they're requesting. If they have permissions, they'll get an image +image they are requesting. If they have permissions, they get an image manifest containing the list of image layers to pull and redirecting them -to pull them from the Asia cache. +to pull the images from the Asia cache. -When users request those images layers from the Asia cache, the cache pulls +When users request those image layers from the Asia cache, the cache pulls them from DTR and keeps a copy that can be used to serve to other users without having to pull the image layers from DTR again. @@ -53,7 +52,7 @@ Use caches if you: * Want to manage user permissions from a central place. If you need users to be able to push images faster, or you want to implement -RBAC policies based on different regions, don't use caches. +RBAC policies based on different regions, do not use caches. Instead, deploy multiple DTR clusters and implement mirroring policies between them. diff --git a/ee/dtr/admin/configure/license-your-installation.md b/ee/dtr/admin/configure/license-your-installation.md index fe63a3e39f..8a148c1f0e 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/admin/disaster-recovery/create-a-backup.md b/ee/dtr/admin/disaster-recovery/create-a-backup.md index 0d50be597d..90e03e4e9a 100644 --- a/ee/dtr/admin/disaster-recovery/create-a-backup.md +++ b/ee/dtr/admin/disaster-recovery/create-a-backup.md @@ -63,7 +63,7 @@ and creating a tar archive of the [dtr-registry volume](../../architecture.md): {% raw %} ```none sudo tar -cf {{ image_backup_file }} \ -$(dirname $(docker volume inspect --format '{{.Mountpoint}}' dtr-registry-)) +-C /var/lib/docker/volumes/ dtr-registry- ``` {% endraw %} diff --git a/ee/dtr/admin/install/index.md b/ee/dtr/admin/install/index.md index f5265e1fba..67c77ad5e7 100644 --- a/ee/dtr/admin/install/index.md +++ b/ee/dtr/admin/install/index.md @@ -2,9 +2,6 @@ title: Install Docker Trusted Registry description: Learn how to install Docker Trusted Registry for production. keywords: dtr, registry, install -redirect_from: - - /datacenter/dtr/2.3/guides/admin/install/ - - /datacenter/dtr/2.5/guides/admin/install/ --- Docker Trusted Registry (DTR) is a containerized application that runs on a @@ -19,7 +16,7 @@ infrastructure meets the [system requirements](./system-requirements) that DTR n ## Step 2. Install UCP Since DTR requires Docker Universal Control Plane (UCP) -to run, you need to [install UCP](../ucp/admin/install/) on all the nodes where you plan to install DTR. +to run, you need to [install UCP](/ee/ucp/admin/install/) on all the nodes where you plan to install DTR. DTR needs to be installed on a worker node that is being managed by UCP. You cannot install DTR on a standalone Docker Engine. @@ -52,7 +49,7 @@ You can run that snippet on any node where Docker is installed. As an example you can SSH into a UCP node and run the DTR installer from there. By default the installer runs in interactive mode and prompts you for any additional information that is necessary. -[Learn more about the installer](/reference/dtr/2.5/cli/install.md). +[Learn more about the installer](/reference/dtr/2.6/cli/install/). By default DTR is deployed with self-signed certificates, so your UCP deployment might not be able to pull images from DTR. @@ -62,15 +59,16 @@ DTR, so that UCP is automatically reconfigured to trust DTR. ## Step 4. Check that DTR is running In your browser, navigate to the Docker **Universal Control Plane** -web interface, and navigate to the **Applications** screen. DTR should be listed +web interface, and navigate to **Shared Resources > Stacks**. DTR should be listed as an application. -![](../../images/create-repository-1.png){: .with-border} + +![](../../images/install-dtr-3.png){: .with-border} You can also access the **DTR web interface**, to make sure it is working. In your browser, navigate to the address where you installed DTR. -![](../../images/install-dtr-4.png){: .with-border} +![](../../images/create-repository-1.png){: .with-border} ## Step 5. Configure DTR @@ -82,7 +80,7 @@ After installing DTR, you should configure: To perform these configurations, navigate to the **Settings** page of DTR. - ![](../../images/install-dtr-5.png){: .with-border} + ![](../../images/auto-delete-job-logs-1.png){: .with-border} ## Step 6. Test pushing and pulling @@ -108,13 +106,13 @@ you're going to install these replicas also need to be managed by UCP. To add replicas to a DTR cluster, use the `docker/dtr join` command: -1. Load your UCP user bundle. +1. Load your [UCP user bundle](/ee/ucp/user-access/cli/#use-client-certificates). 2. Run the join command. When you join a replica to a DTR cluster, you need to specify the ID of a replica that is already part of the cluster. You can find an - existing replica ID by going to the **Applications** page on UCP. + existing replica ID by going to the **Shared Resources > Stacks** page on UCP. Then run: @@ -124,11 +122,17 @@ To add replicas to a DTR cluster, use the `docker/dtr join` command: --ucp-node \ --ucp-insecure-tls ``` - + + > --ucp-node + > + > The following the --ucp-node flag is the target node to + > install the DTR replica. This is NOT the UCP Manager URL. + {: .important} + 3. Check that all replicas are running. In your browser, navigate to the Docker **Universal Control Plane** - web interface, and navigate to the **Applications** screen. All replicas should + web interface, and navigate to **Shared Resources > Stacks**. All replicas should be displayed. ![](../../images/install-dtr-6.png){: .with-border} diff --git a/ee/dtr/admin/install/system-requirements.md b/ee/dtr/admin/install/system-requirements.md index 1a44e44b8e..e4f88f17fa 100644 --- a/ee/dtr/admin/install/system-requirements.md +++ b/ee/dtr/admin/install/system-requirements.md @@ -11,7 +11,7 @@ Before installing, be sure your infrastructure has these requirements. You can install DTR on-premises or on a cloud provider. To install DTR, all nodes must: -* Be a worker node managed by Universal Control Plane. +* Be a worker node managed by UCP (Universal Control Plane). See [Compatibility Matrix](https://success.docker.com/article/compatibility-matrix) for version compatibility. * Have a fixed hostname. ### Minimum requirements diff --git a/ee/dtr/admin/manage-jobs/job-queue.md b/ee/dtr/admin/manage-jobs/job-queue.md index 176996d586..da078bb90b 100644 --- a/ee/dtr/admin/manage-jobs/job-queue.md +++ b/ee/dtr/admin/manage-jobs/job-queue.md @@ -31,7 +31,7 @@ so that other replicas can claim the job. ## Job Types -DTR runs periodic and long-running jobs. The following is a complete list of jobs you can filter for via [the user interface](view-job-logs.md) or [the API](../troubleshoot-batch-jobs.md). +DTR runs periodic and long-running jobs. The following is a complete list of jobs you can filter for via [the user interface](../manage-jobs/audit-jobs-via-ui.md) or [the API](../manage-jobs/audit-jobs-via-api.md). | Job | Description | |:------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| diff --git a/ee/dtr/admin/upgrade.md b/ee/dtr/admin/upgrade.md index c71196595f..f053ff15d9 100644 --- a/ee/dtr/admin/upgrade.md +++ b/ee/dtr/admin/upgrade.md @@ -36,6 +36,12 @@ There may be at most a few seconds of interruption during the upgrade of a DTR cluster. Schedule the upgrade to take place outside of peak hours to avoid any business impacts. +## 2.5 to 2.6 upgrade + +> Upgrade Best Practices +> +> There are [important changes to the upgrade process](/ee/upgrade) that, if not correctly followed, can have impact on the availability of applications running on the Swarm during upgrades. These constraints impact any upgrades coming from any version before `18.09` to version `18.09` or greater. See [Cluster Upgrade Best Practices](/ee/upgrade.md#cluster-upgrade-best-practices) for more details. Additionally, to ensure high availability during the DTR upgrade, you can also drain the DTR replicas and move their workloads to updated workers. To do this, you can join new workers as DTR replicas to your existing cluster and then remove the old replicas. See [docker/dtr join](/reference/dtr/2.6/cli/join) and [docker/dtr remove](/reference/dtr/2.6/cli/remove) for command options and details. + ## Minor upgrade Before starting your upgrade, make sure that: @@ -80,16 +86,8 @@ one replica at a time. It will also perform certain data migrations. If anything fails or the upgrade is interrupted for any reason, you can rerun the upgrade command and it will resume from where it left off. -## Patch upgrade -A patch upgrade changes only the DTR containers and is always safer than a minor version -upgrade. The command is the same as for a minor upgrade. - -## 2.5 to 2.6 upgrade - -> Upgrade Best Practices -> -> There are [important changes to the upgrade process](/ee/upgrade) that, if not correctly followed, can have impact on the availability of applications running on the Swarm during upgrades. These constraints impact any upgrades coming from any version before `18.09` to version `18.09` or greater. See [Cluster Upgrade Best Practices](/ee/upgrade.md#cluster-upgrade-best-practices) for more details. Additionally, to ensure high availability during the DTR upgrade, you can also drain the DTR replicas and move their workloads to updated workers. To do this, you can join new workers as DTR replicas to your existing cluster and then remove the old replicas. See [docker/dtr join](/reference/dtr/2.6/cli/join) and [docker/dtr remove](/reference/dtr/2.6/cli/remove) for command options and details. +#### Metadata Store Migration When upgrading from `2.5` to `2.6`, the system will run a `metadatastoremigration` job after a successful upgrade. This involves migrating the blob links for your images which is necessary for online garbage collection. With `2.6`, you can log in to the DTR web interface and navigate to **System > Job Logs** to check the status of the `metadatastoremigration` job. See [Audit Jobs via the Web Interface](/ee/dtr/admin/manage-jobs/audit-jobs-via-ui/) for more details. @@ -108,6 +106,15 @@ curl https:///api/v0/jobs -X POST \ ``` Alternatively, select **API** from the bottom left navigation pane of the DTR web interface and use the Swagger UI to send your API request. +## Patch upgrade + +A patch upgrade changes only the DTR containers and is always safer than a minor version +upgrade. The command is the same as for a minor upgrade. + +## DTR cache upgrade + +If you have previously [deployed a cache](/ee/dtr/admin/configure/deploy-caches/), make sure to [upgrade the node dedicated for your cache](/ee/upgrade) to keep it in sync with your upstream DTR replicas. This prevents authentication errors and other weird behaviors. + ## Download the vulnerability database After upgrading DTR, you need to redownload the vulnerability database. @@ -116,4 +123,4 @@ After upgrading DTR, you need to redownload the vulnerability database. ## Where to go next - [Release notes](../release-notes) -- [Garbage collection in v2.5](../../../v18.03/ee/dtr/admin/configure/garbage-collection) +- [Garbage collection in v2.5](/datacenter/dtr/2.5/guides/admin/configure/garbage-collection/) diff --git a/ee/dtr/images/delete-images-1.png b/ee/dtr/images/delete-images-1.png index 97203ec17e..292557a4e6 100644 Binary files a/ee/dtr/images/delete-images-1.png and b/ee/dtr/images/delete-images-1.png differ diff --git a/ee/dtr/images/delete-images-2.png b/ee/dtr/images/delete-images-2.png index 366ac465a5..4770be2178 100644 Binary files a/ee/dtr/images/delete-images-2.png and b/ee/dtr/images/delete-images-2.png differ diff --git a/ee/dtr/images/install-dtr-2.png b/ee/dtr/images/install-dtr-2.png index 33471adfcd..3c8234b214 100644 Binary files a/ee/dtr/images/install-dtr-2.png and b/ee/dtr/images/install-dtr-2.png differ diff --git a/ee/dtr/images/install-dtr-3.png b/ee/dtr/images/install-dtr-3.png index e7ccce57d9..c0412a748f 100644 Binary files a/ee/dtr/images/install-dtr-3.png and b/ee/dtr/images/install-dtr-3.png differ diff --git a/ee/dtr/images/install-dtr-6.png b/ee/dtr/images/install-dtr-6.png index d87014cfee..340a4615c4 100644 Binary files a/ee/dtr/images/install-dtr-6.png and b/ee/dtr/images/install-dtr-6.png differ diff --git a/ee/dtr/images/override-vulnerability-2.png b/ee/dtr/images/override-vulnerability-2.png index e45a808b21..326d272eca 100644 Binary files a/ee/dtr/images/override-vulnerability-2.png and b/ee/dtr/images/override-vulnerability-2.png differ diff --git a/ee/dtr/images/pull-push-images-1.png b/ee/dtr/images/pull-push-images-1.png index 9a031b29a4..87a11cab0d 100644 Binary files a/ee/dtr/images/pull-push-images-1.png and b/ee/dtr/images/pull-push-images-1.png differ diff --git a/ee/dtr/images/pull-push-images-2.png b/ee/dtr/images/pull-push-images-2.png index 2caf2ca2ca..0ce08c6ec0 100644 Binary files a/ee/dtr/images/pull-push-images-2.png and b/ee/dtr/images/pull-push-images-2.png differ diff --git a/ee/dtr/images/pull-push-images-3.png b/ee/dtr/images/pull-push-images-3.png index 11c65d496e..7b4fad6d1d 100644 Binary files a/ee/dtr/images/pull-push-images-3.png and b/ee/dtr/images/pull-push-images-3.png differ diff --git a/ee/dtr/images/scan-images-for-vulns-1.png b/ee/dtr/images/scan-images-for-vulns-1.png index b515d4c452..796a0bcb32 100644 Binary files a/ee/dtr/images/scan-images-for-vulns-1.png and b/ee/dtr/images/scan-images-for-vulns-1.png differ diff --git a/ee/dtr/images/scan-images-for-vulns-2.png b/ee/dtr/images/scan-images-for-vulns-2.png index 9748dbfa81..68d4bd0cd9 100644 Binary files a/ee/dtr/images/scan-images-for-vulns-2.png and b/ee/dtr/images/scan-images-for-vulns-2.png differ diff --git a/ee/dtr/images/scan-images-for-vulns-3.png b/ee/dtr/images/scan-images-for-vulns-3.png index 6d2d4f1e11..2413e6c7f7 100644 Binary files a/ee/dtr/images/scan-images-for-vulns-3.png and b/ee/dtr/images/scan-images-for-vulns-3.png differ diff --git a/ee/dtr/images/scan-images-for-vulns-4.png b/ee/dtr/images/scan-images-for-vulns-4.png index fe0a5d513c..6a273dd6d5 100644 Binary files a/ee/dtr/images/scan-images-for-vulns-4.png and b/ee/dtr/images/scan-images-for-vulns-4.png differ diff --git a/ee/dtr/images/scan-images-for-vulns-5.png b/ee/dtr/images/scan-images-for-vulns-5.png index 294889667e..50e43a4338 100644 Binary files a/ee/dtr/images/scan-images-for-vulns-5.png and b/ee/dtr/images/scan-images-for-vulns-5.png differ diff --git a/ee/dtr/images/security-scanning-setup-1.png b/ee/dtr/images/security-scanning-setup-1.png index 7db7a312c5..f2afa4a162 100644 Binary files a/ee/dtr/images/security-scanning-setup-1.png and b/ee/dtr/images/security-scanning-setup-1.png differ diff --git a/ee/dtr/release-notes.md b/ee/dtr/release-notes.md index 9e03c9c447..ce88c733cb 100644 --- a/ee/dtr/release-notes.md +++ b/ee/dtr/release-notes.md @@ -47,7 +47,7 @@ to upgrade your installation to the latest release. * Users can now mirror images from another Docker Trusted or Docker Hub registry using the web interface. [Learn about pull mirroring](/ee/dtr/user/promotion-policies/pull-mirror). * CLI - * To support NFS v4, users can now pass additional options such as `--async-nfs` and `--nfs-options` when installing or reconfiguring NFS for external storage. See [docker/dtr install](/reference/dtr/2.6/cli/install) and [docker/dtr reconfigure](../../reference/dtr/2.6/cli/reconfigure) for more details. + * To support NFS v4, users can now pass additional options such as `--async-nfs` and `--nfs-options` when installing or reconfiguring NFS for external storage. See [docker/dtr install](/reference/dtr/2.6/cli/install) and [docker/dtr reconfigure](/reference/dtr/2.6/cli/reconfigure) for more details. * When installing and restoring DTR from an existing backup, users are now required to specify a storage flag: `--dtr-use-default-storage`, `--dtr-storage-volume`, or `--nfs-storage-url`. This ensures recovery of the configured storage setting when the backup was created. See [docker/dtr restore](/reference/dtr/2.6/cli/restore) for more details. * API @@ -123,7 +123,7 @@ to upgrade your installation to the latest release. * Fixed bug where repository tag list UI was not loading after a tag migration. * Fixed bug to enable poll mirroring with Windows images. -* The RethinkDB image has been patched to remove unused components with known vulnerabilities including the rethinkcli. To get an equivalent interface run rethinkcli from a separate image using `docker run -it --rm --net dtr-ol -v dtr-ca-$REPLICA_ID:/ca dockerhubenterprise/rethinkcli $REPLICA_ID`. +* The RethinkDB image has been patched to remove unused components with known vulnerabilities including the RethinkCLI. To get an equivalent interface, run RethinkCLI from a separate image using `docker run -it --rm --net dtr-ol -v dtr-ca-$REPLICA_ID:/ca dockerhubenterprise/rethinkcli:v2.3.0 $REPLICA_ID`. ## 2.5.3 diff --git a/ee/dtr/user/access-dtr/configure-your-notary-client.md b/ee/dtr/user/access-dtr/configure-your-notary-client.md index 780221be88..b2a16e64b5 100644 --- a/ee/dtr/user/access-dtr/configure-your-notary-client.md +++ b/ee/dtr/user/access-dtr/configure-your-notary-client.md @@ -41,8 +41,8 @@ curl -L -o notary # Make it executable chmod +x notary -# Move it to a location in your path -sudo mv notary /usr/bin/ +# Move it to a location in your path. Use the -Z option if you're using SELinux. +sudo mv -Z notary /usr/bin/ ``` ## Configure the Notary CLI client diff --git a/ee/dtr/user/manage-images/delete-images.md b/ee/dtr/user/manage-images/delete-images.md index 463270e3a5..0a9701da5b 100644 --- a/ee/dtr/user/manage-images/delete-images.md +++ b/ee/dtr/user/manage-images/delete-images.md @@ -4,21 +4,18 @@ description: Learn how to delete images from Docker Trusted Registry. keywords: registry, delete --- -To delete an image, go to the **DTR web UI**, and navigate to the image -**repository** you want to delete. In the **Tags** tab, select all the image +To delete an image, navigate to the **Tags** tab of the repository page on the DTR web interface. +In the **Tags** tab, select all the image tags you want to delete, and click the **Delete** button. ![](../../images/delete-images-1.png){: .with-border} -You can also delete all image versions, by deleting the repository. For that, -in the image **repository**, navigate to the **Settings** tab, and click the -**Delete** button. +You can also delete all image versions by deleting the repository. To delete a repository, navigate to **Settings** and click **Delete** under "Delete Repository". ## Delete signed images -DTR only allows deleting images if that image hasn't been signed. You first -need to delete all the trust data associated with the image. Then you'll -be able to delete it. +DTR only allows deleting images if the image has not been signed. You first +need to delete all the trust data associated with the image before you are able to delete the image. ![](../../images/delete-images-2.png){: .with-border} @@ -33,11 +30,11 @@ There are three steps to delete a signed image: To find which roles signed an image, you first need to learn which roles are trusted to sign the image. -[Set up your Notary client](../../access-dtr/configure-your-notary-client.md), +[Set up your Notary client](/ee/dtr/user/manage-images/sign-images/#configure-your-notary-client), and run: ``` -notary delegation list dtr.example.org/library/wordpress +notary delegation list dtr-example.com/library/wordpress ``` In this example, the repository owner delegated trust to the @@ -55,10 +52,10 @@ you can learn which roles actually signed it: ``` # Check if the image was signed by the "targets" role -notary list dtr.example.org/library/wordpress +notary list dtr-example.com/library/wordpress # Check if the image was signed by a specific role -notary list dtr.example.org/library/wordpress --roles +notary list dtr-example.com/library/wordpress --roles ``` In this example the image was signed by three roles: `targets`, @@ -73,7 +70,7 @@ to do this operation. For each role that signed the image, run: ``` -notary remove dtr.example.org/library/wordpress \ +notary remove dtr-example.com/library/wordpress \ --roles --publish ``` diff --git a/ee/dtr/user/manage-images/index.md b/ee/dtr/user/manage-images/index.md index a8cdc66321..9da818f30c 100644 --- a/ee/dtr/user/manage-images/index.md +++ b/ee/dtr/user/manage-images/index.md @@ -44,7 +44,7 @@ name of our repository will be `dtr-example.com/test-user-1/wordpress`. > Immutable Tags and Tag Limit > -> Starting in DTR 2.6, repository admins can enable tag pruning by [setting a tag limit](tag-pruning/#set-a-tag-limit). This can only be set if you turn off **Immutability** and allow your repository tags to be overwritten. +> Starting in DTR 2.6, repository admins can enable tag pruning by [setting a tag limit](../tag-pruning/#set-a-tag-limit). This can only be set if you turn off **Immutability** and allow your repository tags to be overwritten. > Image name size for DTR > diff --git a/ee/dtr/user/manage-images/override-a-vulnerability.md b/ee/dtr/user/manage-images/override-a-vulnerability.md index 917a420fb6..33f75674f9 100644 --- a/ee/dtr/user/manage-images/override-a-vulnerability.md +++ b/ee/dtr/user/manage-images/override-a-vulnerability.md @@ -9,11 +9,11 @@ DTR scans your images for vulnerabilities but sometimes it can report that your image has vulnerabilities you know have been fixed. If that happens you can dismiss the warning. -In the **DTR web UI**, navigate to the repository that has been scanned. +In the **DTR web interface**, navigate to the repository that has been scanned. -![Tag list](../../images/override-vulnerability-1.png){: .with-border} +![](../../images/scan-images-for-vulns-3.png){: .with-border} -Click **View details** for the image you want to see the scan results, and +Click **View details** to review the image scan results, and choose **Components** to see the vulnerabilities for each component packaged in the image. @@ -23,7 +23,7 @@ vulnerability, and click **hide**. ![Vulnerability list](../../images/override-vulnerability-2.png){: .with-border} The vulnerability is hidden system-wide and will no longer be reported as a vulnerability -on other affected images with the same layer IDs or digests. +on affected images with the same layer IDs or digests. After dismissing a vulnerability, DTR will not reevaluate the promotion policies you have set up for the repository. 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..43fc5f8b09 100644 --- a/ee/dtr/user/manage-images/pull-and-push-images.md +++ b/ee/dtr/user/manage-images/pull-and-push-images.md @@ -6,7 +6,7 @@ redirect_from: - /datacenter/dtr/2.5/guides/user/manage-images/pull-and-push-images/ --- -{% assign domain="dtr.example.org" %} +{% assign domain="dtr-example.com" %} {% assign org="library" %} {% assign repo="wordpress" %} {% assign tag="latest" %} @@ -25,11 +25,11 @@ from Docker Hub or any other registry. Since DTR is secure by default, you always need to authenticate before pulling images. In this example, DTR can be accessed at {{ domain }}, and the user -was granted permissions to access the NGINX, and Wordpress repositories. +was granted permissions to access the `nginx` and `wordpress` repositories in the `library` organization. ![](../../images/pull-push-images-1.png){: .with-border} -Click on the repository to see its details. +Click on the repository name to see its details. ![](../../images/pull-push-images-2.png){: .with-border} @@ -70,7 +70,7 @@ docker login {{ domain }} docker push {{ domain }}/{{ org }}/{{ repo }}:{{ tag }} ``` -Go back to the **DTR web UI** to validate that the tag was successfully pushed. +On the web interface, navigate to the **Tags** tab on the repository page to confirm that the tag was successfully pushed. ![](../../images/pull-push-images-3.png){: .with-border} @@ -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/scan-images-for-vulnerabilities.md b/ee/dtr/user/manage-images/scan-images-for-vulnerabilities.md index 8d12d60f3e..70fa9253f8 100644 --- a/ee/dtr/user/manage-images/scan-images-for-vulnerabilities.md +++ b/ee/dtr/user/manage-images/scan-images-for-vulnerabilities.md @@ -8,7 +8,7 @@ keywords: registry, scan, vulnerability Docker Trusted Registry can scan images in your repositories to verify that they are free from known security vulnerabilities or exposures, using Docker Security -Scanning. The results of these scans are reported for each image tag. +Scanning. The results of these scans are reported for each image tag in a repository. Docker Security Scanning is available as an add-on to Docker Trusted Registry, and an administrator configures it for your DTR instance. If you do not see @@ -22,7 +22,7 @@ a new scan. ## The Docker Security Scan process -Scans run either on demand when a user clicks the **Start a Scan** links or +Scans run either on demand when you click the **Start a Scan** link or **Scan** button (see [Manual scanning](#manual-scanning) below), or automatically on any `docker push` to the repository. @@ -30,7 +30,7 @@ First the scanner performs a binary scan on each layer of the image, identifies the software components in each layer, and indexes the SHA of each component in a bill-of-materials. A binary scan evaluates the components on a bit-by-bit level, so vulnerable components are discovered even if they are -statically-linked or under a different name. +statically linked or under a different name. The scan then compares the SHA of each component against the US National Vulnerability Database that is installed on your DTR instance. When @@ -49,15 +49,15 @@ image repository. If your DTR instance is configured in this way, you do not need to do anything once your `docker push` completes. The scan runs automatically, and the results -are reported in the repository's **Images** tab after the scan finishes. +are reported in the repository's **Tags** tab after the scan finishes. ## Manual scanning If your repository owner enabled Docker Security Scanning but disabled automatic -scanning, you can manually start a scan for images in repositories to which you -have `write` access. +scanning, you can manually start a scan for images in repositories you +have `write` access to. -To start a security scan, navigate to the **tag details**, and click the **Scan** button. +To start a security scan, navigate to the repository **Tags** tab on the web interface, click "View details" next to the relevant tag, and click **Scan**. ![](../../images/scan-images-for-vulns-1.png){: .with-border} @@ -85,33 +85,33 @@ To change the repository scanning mode: Once DTR has run a security scan for an image, you can view the results. -The **Images** tab for each repository includes a summary of the most recent +The **Tags** tab for each repository includes a summary of the most recent scan results for each image. ![](../../images/scan-images-for-vulns-3.png){: .with-border} -- A green shield icon with a check mark indicates that the scan did not find +- The text "Clean" in green indicates that the scan did not find any vulnerabilities. -- A red or orange shield icon indicates that vulnerabilities were found, and -the number of vulnerabilities is included on that same line. +- A red or orange text indicates that vulnerabilities were found, and +the number of vulnerabilities is included on that same line according to severity: ***Critical***, ***Major***, ***Minor***. -If the vulnerability scan can't detect the version of a component, it reports +If the vulnerability scan could not detect the version of a component, it reports the vulnerabilities for all versions of that component. -From the **Images** tab you can click **View details** for a specific tag to see +From the repository **Tags** tab, you can click **View details** for a specific tag to see the full scan results. The top of the page also includes metadata about the -image, including the SHA, image size, date last pushed and user who last pushed, +image, including the SHA, image size, last push date, user who initiated the push, the security scan summary, and the security scan progress. The scan results for each image include two different modes so you can quickly view details about the image, its components, and any vulnerabilities found. -- The **Layers** view lists the layers of the image in order as they are built -by the Dockerfile. +- The **Layers** view lists the layers of the image in the order that they are built +by Dockerfile. This view can help you find exactly which command in the build introduced the vulnerabilities, and which components are associated with that single command. Click a layer to see a summary of its components. You can then - click on a component to switch to the Component view and get more details + click on a component to switch to the **Component** view and get more details about the specific item. > **Tip**: The layers view can be long, so be sure @@ -120,8 +120,7 @@ by the Dockerfile. ![](../../images/scan-images-for-vulns-4.png){: .with-border} - The **Components** view lists the individual component libraries indexed by -the scanning system, in order of severity and number of vulnerabilities found, -most vulnerable first. +the scanning system, in order of severity and number of vulnerabilities found, with the most vulnerable library listed first. Click on an individual component to view details about the vulnerability it introduces, including a short summary and a link to the official CVE @@ -139,18 +138,17 @@ vulnerability and decide what to do. If you discover vulnerable components, you should check if there is an updated version available where the security vulnerability has been addressed. If -necessary, you might contact the component's maintainers to ensure that the -vulnerability is being addressed in a future version or patch update. +necessary, you can contact the component's maintainers to ensure that the +vulnerability is being addressed in a future version or a patch update. If the vulnerability is in a `base layer` (such as an operating system) you -might not be able to correct the issue in the image. In this case, you might -switch to a different version of the base layer, or you might find an -equivalent, less vulnerable base layer. You might also decide that the -vulnerability or exposure is acceptable. +might not be able to correct the issue in the image. In this case, you can +switch to a different version of the base layer, or you can find an +equivalent, less vulnerable base layer. Address vulnerabilities in your repositories by updating the images to use updated and corrected versions of vulnerable components, or by using a different -components that provide the same functionality. When you have updated the source +component offering the same functionality. When you have updated the source code, run a build to create a new image, tag the image, and push the updated image to your DTR instance. You can then re-scan the image to confirm that you have addressed the vulnerabilities. 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/supported-platforms.md b/ee/supported-platforms.md index 605cbf3b20..50bcfc1c2d 100644 --- a/ee/supported-platforms.md +++ b/ee/supported-platforms.md @@ -25,14 +25,14 @@ options, see [Docker Enterprise](https://www.docker.com/enterprise-edition/). > Note > -> Starting with Docker Enterprise 2.1, Docker Enterprise - Basic, Docker Enterprise - Standard, -> and Docker Enterprise - Advanced are all now called Docker Enterprise. +> Starting with Docker Enterprise 2.1, Docker Enterprise --- Basic, Docker Enterprise --- Standard, +> and Docker Enterprise --- Advanced are all now called Docker Enterprise. ### Docker Enterprise -With Docker Enterprise, you can deploy Docker Engine - Enterprise +With Docker Enterprise, you can deploy Docker Engine --- Enterprise to manage your container workloads in a flexible way. You can manage workloads -on Windows, Linux, on-premise or on the cloud. +on Windows, Linux, on site, or on the cloud. Docker Enterprise has private image management, integrated image signing policies, and cluster management with support for Kubernetes and Swarm orchestrators. It allows you to implement @@ -40,6 +40,23 @@ node-based RBAC policies, image promotion policies, image mirroring, and scan your images for vulnerabilities. It also has support with defined SLAs and extended maintenance cycles for patches for up to 24 months. +### New Licensing for Docker Enterprise + +In version 18.09, the Docker Enterprise --- Engine is aware of the license applied on the system. The +license summary is available in the `docker info` output on standalone or manager nodes. + +For EE platform customers, when you license UCP, this same license is applied to the underlying +engines in the cluster. Docker recommends platform customers use UCP to manage their license. + +Standalone EE engines can be licensed using `docker engine activate`. + +Offline activation of standalone EE engines can be performed by downloading the license and +using the command `docker engine activate --license filename.lic`. + +Additionally, Docker is now distributing the CLI as a separate installation package. +This gives Enterprise users the ability to install as many CLI packages as needed +without using the Engine node licenses for client-only systems. + [Learn more about Docker Enterprise](/ee/index.md). 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/collect-cluster-metrics.md b/ee/ucp/admin/configure/collect-cluster-metrics.md index 760ac9f74c..7d14cf7433 100644 --- a/ee/ucp/admin/configure/collect-cluster-metrics.md +++ b/ee/ucp/admin/configure/collect-cluster-metrics.md @@ -27,7 +27,7 @@ These are high-level aggregate metrics that typically combine technical, financi - Company or division-level application downtime - Aggregate resource utilization - Application resource demand growth -  + ## Application metrics ## These are metrics about domain of APM tools like AppDynamics or DynaTrace and provide metrics about the state or performance of the application itself. @@ -35,7 +35,9 @@ These are metrics about domain of APM tools like AppDynamics or DynaTrace and pr - Container platform metrics - Host infrastructure metrics -Docker EE 2.1 does not collect or expose application level metrics. The following are metrics Docker EE 2.1 collects, aggregates, and exposes: +Docker EE 2.1 does not collect or expose application level metrics. + +The following are metrics Docker EE 2.1 collects, aggregates, and exposes: ## Service state metrics ## @@ -44,7 +46,6 @@ These are metrics about the state of services running on the container platform. - Convergence of K8s deployments and Swarm services - Cluster load by number of services or containers or pods - ## Host infrastructure metrics ## These are metrics taken from te software & hardware infrastructure. @@ -54,7 +55,6 @@ These are metrics taken from te software & hardware infrastructure. - Storage I/O - disk I/O, IOPs, capacity - Operating System – file descriptors, open network connections, number of processes/threads - ## Container infrastructure system metrics ## These are application-level metrics derived from the container platform itself. @@ -84,8 +84,12 @@ To deploy Prometheus on worker nodes in a cluster: $ kubectl label node 3a724a-1 ucp-metrics= node "test-3a724a-1" labeled ``` + + > **SELinux Prometheus Deployment for UCP 3.1.0, 3.1.1, and 3.1.2** + > + > If you are using SELinux, you must label your `ucp-node-certs` directories properly on your worker nodes before you move the ucp-metrics workload to them. To run ucp-metrics on a worker node, update the `ucp-node-certs` label by running `sudo chcon -R system_u:object_r:container_file_t:s0 /var/lib/docker/volumes/ucp-node-certs/_data`. -4. Patch the ucp-metrics DaemonSet's nodeSelector using the same key and value used for the node label. This example shows the key “ucp-metrics” and the value “”. +4. Patch the ucp-metrics DaemonSet's nodeSelector using the same key and value used for the node label. This example shows the key "ucp-metrics" and the value "". ``` $ kubectl -n kube-system patch daemonset ucp-metrics --type json -p '[{"op": "replace", "path": "/spec/template/spec/nodeSelector", "value": {"ucp-metrics": ""}}]' @@ -144,7 +148,7 @@ To configure your external Prometheus server to scrape metrics from Prometheus i metadata: name: prometheus spec: - replicas: 2 + replicas: 2 selector: matchLabels: app: prometheus diff --git a/ee/ucp/admin/configure/integrate-with-multiple-registries.md b/ee/ucp/admin/configure/integrate-with-multiple-registries.md index 8768a45ccf..fdf19a4281 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/join-nodes/join-linux-nodes-to-cluster.md b/ee/ucp/admin/configure/join-nodes/join-linux-nodes-to-cluster.md index 5924cfaf55..fd9bf08834 100644 --- a/ee/ucp/admin/configure/join-nodes/join-linux-nodes-to-cluster.md +++ b/ee/ucp/admin/configure/join-nodes/join-linux-nodes-to-cluster.md @@ -107,9 +107,10 @@ you demote them to workers. You can remove worker nodes from the cluster at any time: -1. Navigate to the **Nodes** page and select the node. -2. In the details pane, click **Actions** and select **Remove**. -3. Click **Confirm** when you're prompted. +1. Confirm the node has been shut down or has left the swarm (i.e. `docker swarm leave`). +2. Navigate to the **Nodes** page, and select the node. +3. In the details pane, click **Actions** and select **Remove**. +4. Click **Confirm** when prompted. Since manager nodes are important to the cluster overall health, you need to be careful when removing one from the cluster. 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/configure/store-logs-in-an-external-system.md b/ee/ucp/admin/configure/store-logs-in-an-external-system.md index 95175442f3..a6acf0cd9b 100644 --- a/ee/ucp/admin/configure/store-logs-in-an-external-system.md +++ b/ee/ucp/admin/configure/store-logs-in-an-external-system.md @@ -1,11 +1,11 @@ --- title: Configure UCP logging description: Learn how to configure Docker Universal Control Plane to store your logs - on an external log system. + on an external log system and configure appropriate log levels. keywords: ucp, integrate, logs --- -You can configure UCP for sending logs to a remote logging service: +You can configure UCP's log level and destination for sending logs to a remote logging service: 1. Log in to UCP with an administrator account. 2. Navigate to the **Admin Settings** page. @@ -19,7 +19,7 @@ You can configure UCP for sending logs to a remote logging service: > Administrators should configure Docker EE to store logs using an external > system. By default, the Docker daemon doesn't delete logs, which means that > in a production system with intense usage, your logs can consume a -> significant amount of disk space. +> significant amount of disk space, especially when configured at DEBUG level. {: .important} ## Example: Setting up an ELK stack diff --git a/ee/ucp/admin/configure/ucp-configuration-file.md b/ee/ucp/admin/configure/ucp-configuration-file.md index da80635884..02f5bf16e1 100644 --- a/ee/ucp/admin/configure/ucp-configuration-file.md +++ b/ee/ucp/admin/configure/ucp-configuration-file.md @@ -176,7 +176,7 @@ components. Assigning these values overrides the settings in a container's | `profiling_enabled` | no | Set to `true` to enable specialized debugging endpoints for profiling UCP performance. The default is `false`. | | `kv_timeout` | no | Sets the key-value store timeout setting, in milliseconds. The default is `5000`. | | `kv_snapshot_count` | no | Sets the key-value store snapshot count setting. The default is `20000`. | -| `external_service_lb` | no | Specifies an optional external load balancer for default links to services with exposed ports in the web interface. | +| `external_service_lb` | no | Specifies an optional external load balancer for default links to services with exposed ports in the web interface. | | `cni_installer_url` | no | Specifies the URL of a Kubernetes YAML file to be used for installing a CNI plugin. Applies only during initial installation. If empty, the default CNI plugin is used. | | `metrics_retention_time` | no | Adjusts the metrics retention time. | | `metrics_scrape_interval` | no | Sets the interval for how frequently managers gather metrics from nodes in the cluster. | @@ -184,11 +184,14 @@ components. Assigning these values overrides the settings in a container's | `rethinkdb_cache_size` | no | Sets the size of the cache used by UCP's RethinkDB servers. The default is 512MB, but leaving this field empty or specifying `auto` instructs RethinkDB to determine a cache size automatically. | | `cloud_provider` | no | Set the cloud provider for the kubernetes cluster. | | `pod_cidr` | yes | Sets the subnet pool from which the IP for the Pod should be allocated from the CNI ipam plugin. Default is `192.168.0.0/16`. | +| `calico_mtu` | no | Set the MTU (maximum transmission unit) size for the Calico plugin. | +| `ipip_mtu` | no | Set the IPIP MTU size for the calico IPIP tunnel interface. | +| `azure_ip_count` | no | Set the IP count for azure allocator to allocate IPs per Azure virtual machine. | | `nodeport_range` | yes | Set the port range that for Kubernetes services of type NodePort can be exposed in. Default is `32768-35535`. | | `custom_kube_api_server_flags` | no | Set the configuration options for the Kubernetes API server. | -| `custom_kube_controller_manager_flags` | no | Set the configuration options for the Kubernetes controller manager | -| `custom_kubelet_flags` | no | Set the configuration options for Kubelets | -| `custom_kube_scheduler_flags` | no | Set the configuration options for the Kubernetes scheduler | +| `custom_kube_controller_manager_flags` | no | Set the configuration options for the Kubernetes controller manager. | +| `custom_kubelet_flags` | no | Set the configuration options for Kubelets. | +| `custom_kube_scheduler_flags` | no | Set the configuration options for the Kubernetes scheduler. | | `local_volume_collection_mapping` | no | Store data about collections for volumes in UCP's local KV store instead of on the volume labels. This is used for enforcing access control on volumes. | | `manager_kube_reserved_resources` | no | Reserve resources for Docker UCP and Kubernetes components which are running on manager nodes. | | `worker_kube_reserved_resources` | no | Reserve resources for Docker UCP and Kubernetes components which are running on worker nodes. | diff --git a/ee/ucp/admin/install/index.md b/ee/ucp/admin/install/index.md index cd7fef07ae..e754fea706 100644 --- a/ee/ucp/admin/install/index.md +++ b/ee/ucp/admin/install/index.md @@ -86,7 +86,7 @@ To install UCP: This runs the install command in interactive mode, so that you're prompted for any necessary configuration values. To find what other options are available in the install command, check the - [reference documentation](/reference/ucp/3.0/cli/install.md). + [reference documentation](/reference/ucp/3.1/cli/install.md). > Custom CNI plugins > @@ -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/ee/ucp/admin/install/install-on-azure.md b/ee/ucp/admin/install/install-on-azure.md index 568eda70e8..eefa0a4531 100644 --- a/ee/ucp/admin/install/install-on-azure.md +++ b/ee/ucp/admin/install/install-on-azure.md @@ -4,37 +4,125 @@ description: Learn how to install Docker Universal Control Plane in a Microsoft keywords: Universal Control Plane, UCP, install, Docker EE, Azure, Kubernetes --- +Docker UCP closely integrates into Microsoft Azure for its Kubernetes Networking +and Persistent Storage feature set. UCP deploys the Calico CNI provider. In Azure +the Calico CNI leverages the Azure networking infrastructure for data path +networking and the Azure IPAM for IP address management. There are +infrastructure prerequisites that are required prior to UCP installation for the +Calico / Azure integration. + +## Docker UCP Networking + Docker UCP configures the Azure IPAM module for Kubernetes to allocate -IP addresses to Kubernetes pods. The Azure IPAM module requires each Azure -VM that's part of the Kubernetes cluster to be configured with a pool of +IP addresses to Kubernetes pods. The Azure IPAM module requires each Azure +virtual machine that's part of the Kubernetes cluster to be configured with a pool of IP addresses. -You have two options for deploying the VMs for the Kubernetes cluster on Azure: -- Install the cluster on Azure stand-alone virtual machines. Docker UCP provides - an [automated mechanism](#configure-ip-pools-for-azure-stand-alone-vms) - to configure and maintain IP pools for stand-alone Azure VMs. -- Install the cluster on an Azure virtual machine scale set. Configure the - IP pools by using an ARM template like [this one](#set-up-ip-configurations-on-an-azure-virtual-machine-scale-set). +There are two options for provisoning IPs for the Kubernetes cluster on Azure +- Docker UCP provides an automated mechanism to configure and maintain IP pools + for standalone Azure virtual machines. This service runs within the calico-node daemonset + and by default will provision 128 IP address for each node. This value can be + configured through the `azure_ip_count`in the UCP + [configuration file](../configure/ucp-configuration-file) before or after the + UCP installation. Note that if this value is reduced post-installation, existing + virtual machines will not be reconciled, and you will have to manually edit the IP count + in Azure. +- Manually provision additional IP address for each Azure virtual machine. This could be done + as part of an Azure Virtual Machine Scale Set through an ARM template. You can find an example [here](#set-up-ip-configurations-on-an-azure-virtual-machine-scale-set). + Note that the `azure_ip_count` value in the UCP + [configuration file](../configure/ucp-configuration-file) will need to be set + to 0, otherwise UCP's IP Allocator service will provision the IP Address on top of + those you have already provisioned. -The steps for setting up IP address management are different in the two -environments. If you're using a scale set, you set up `ipConfigurations` -in an ARM template. If you're using stand-alone VMs, you set up IP pools -for each VM by using a utility container that's configured to run as a -global Swarm service, which Docker provides. +## Azure Prerequisites -## Considerations for size of IP pools +You must meet these infrastructure prerequisites in order +to successfully deploy Docker UCP on Azure + +- All UCP Nodes (Managers and Workers) need to be deployed into the same +Azure Resource Group. The Azure Networking (Vnets, Subnets, Security Groups) +components could be deployed in a second Azure Resource Group. +- All UCP Nodes (Managers and Workers) need to be attached to the same +Azure Subnet. +- All UCP (Managers and Workers) need to be tagged in Azure with the +`Orchestrator` tag. Note the value for this tag is the Kubernetes version number +in the format `Orchestrator=Kubernetes:x.y.z`. This value may change in each +UCP release. To find the relevant version please see the UCP +[Release Notes](../../release-notes). For example for UCP 3.1.0 the tag +would be `Orchestrator=Kubernetes:1.11.2`. +- The Azure Computer Name needs to match the Node Operating System's Hostname. +Note this applies to the FQDN of the host including domain names. +- An Azure Service Principal with `Contributor` access to the Azure Resource +Group hosting the UCP Nodes. Note, if using a separate networking Resource +Group the same Service Principal will need `Network Contributor` access to this +Resource Group. + +UCP requires the following information for the installation: + +- `subscriptionId` - The Azure Subscription ID in which the UCP +objects are being deployed. +- `tenantId` - The Azure Active Directory Tenant ID in which the UCP +objects are being deployed. +- `aadClientId` - The Azure Service Principal ID +- `aadClientSecret` - The Azure Service Principal Secret Key + +### Azure Configuration File + +For Docker UCP to integrate into Microsoft Azure, you need to place an Azure configuration file +within each UCP node in your cluster, at `/etc/kubernetes/azure.json`. + +See the template below. Note entries that do not contain `****` should not be +changed. + +``` +{ + "cloud":"AzurePublicCloud", + "tenantId": "***", + "subscriptionId": "***", + "aadClientId": "***", + "aadClientSecret": "***", + "resourceGroup": "***", + "location": "****", + "subnetName": "/****", + "securityGroupName": "****", + "vnetName": "****", + "cloudProviderBackoff": false, + "cloudProviderBackoffRetries": 0, + "cloudProviderBackoffExponent": 0, + "cloudProviderBackoffDuration": 0, + "cloudProviderBackoffJitter": 0, + "cloudProviderRatelimit": false, + "cloudProviderRateLimitQPS": 0, + "cloudProviderRateLimitBucket": 0, + "useManagedIdentityExtension": false, + "useInstanceMetadata": true +} +``` + +There are some optional values for Azure deployments: + +- `"primaryAvailabilitySetName": "****",` - The Worker Nodes availability set. +- `"vnetResourceGroup": "****",` - If your Azure Network objects live in a +seperate resource group. +- `"routeTableName": "****",` - If you have defined multiple Route tables within +an Azure subnet. + +More details on this configuration file can be found +[here](https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/azure/azure.go). + +## Considerations for IPAM Configuration The subnet and the virtual network associated with the primary interface of -the Azure VMs need to be configured with a large enough address prefix/range. +the Azure virtual machines need to be configured with a large enough address prefix/range. The number of required IP addresses depends on the number of pods running on each node and the number of nodes in the cluster. For example, in a cluster of 256 nodes, to run a maximum of 128 pods concurrently on a node, make sure that the address space of the subnet and the virtual network can allocate at least 128 * 256 IP addresses, _in addition to_ -initial IP allocations to VM NICs during Azure resource creation. +initial IP allocations to virtual machine NICs during Azure resource creation. -Accounting for IP addresses that are allocated to NICs during VM bring-up, set +Accounting for IP addresses that are allocated to NICs during virtual machine bring-up, set the address space of the subnet and virtual network to 10.0.0.0/16. This ensures that the network can dynamically allocate at least 32768 addresses, plus a buffer for initial allocations for primary IP addresses. @@ -49,98 +137,13 @@ plus a buffer for initial allocations for primary IP addresses. > requested. {: .important} -## Configure IP pools for Azure stand-alone VMs +## Manually provision IP address as part of an Azure virtual machine scale set -Follow these steps when the cluster is deployed using stand-alone Azure VMs. - -### Create an Azure resource group - -Create an Azure resource group with VMs representing the nodes of the cluster -by using the Azure Portal, CLI, or ARM template. - -### Configure multiple IP addresses per VM NIC - -Follow the steps below to configure multiple IP addresses per VM NIC. - -1. Create a Service Principal with “contributor” level access to the above - resource group you just created. You can do this by using the Azure Portal - or CLI. Also, you can also use a utility container from Docker to create a - Service Principal. If you have the Docker Engine installed, run the - `docker4x/create-sp-azure`. image. The output of `create-sp-azure` contains - the following fields near the end. - - ``` - AD App ID: <...> - AD App Secret: <...> - AD Tenant ID: <...> - ``` - - You'll use these field values in a later step, so make a note of them. - Also, make note of your Azure subscription ID. - -2. Initialize a swarm cluster comprising the virtual machines you created - earlier. On one of the nodes of the cluster, run: - - ```bash - docker swarm init - ``` - -3. Note the tokens for managers and workers. -4. Join two other nodes on the cluster as manager (recommended for HA) by running: - - ```bash - docker swarm join --token - ``` - -5. Join remaining nodes on the cluster as workers: - - ```bash - docker swarm join --token - ``` - -6. Create a file named "azure_ucp_admin.toml" that contains contents from - creating the Service Principal. - - ``` - AZURE_CLIENT_ID = "" - AZURE_TENANT_ID = "" - AZURE_SUBSCRIPTION_ID = "" - AZURE_CLIENT_SECRET = "" - ``` - -7. Create a Docker Swarm secret based on the "azure_ucp_admin.toml" file. - - ```bash - docker secret create azure_ucp_admin.toml azure_ucp_admin.toml - ``` - -8. Create a global swarm service using the [docker4x/az-nic-ips](https://hub.docker.com/r/docker4x/az-nic-ips/) - image on Docker Hub. Use the Swarm secret to prepopulate the virtual machines - with the desired number of IP addresses per VM from the VNET pool. Set the - number of IPs to allocate to each VM through the IPCOUNT environment variable. - For example, to configure 128 IP addresses per VM, run the following command: - - ```bash - docker service create \ - --mode=global \ - --secret=azure_ucp_admin.toml \ - --log-driver json-file \ - --log-opt max-size=1m \ - --env IP_COUNT=128 \ - --name ipallocator \ - --constraint "node.platform.os == linux" \ - docker4x/az-nic-ips - ``` - -[Install UCP on the cluster](#install-ucp-on-the-cluster). - -## Set up IP configurations on an Azure virtual machine scale set - -Configure IP Pools for each member of the VM scale set during provisioning by +Configure IP Pools for each member of the virtual machine scale set during provisioning by associating multiple `ipConfigurations` with the scale set’s `networkInterfaceConfigurations`. Here's an example `networkProfile` configuration for an ARM template that configures pools of 32 IP addresses -for each VM in the VM scale set. +for each virtual machine in the virtual machine scale set. ```json "networkProfile": { @@ -195,7 +198,7 @@ for each VM in the VM scale set. } ``` -## Install UCP on the cluster +## Install UCP Use the following command to install UCP on the manager node. The `--pod-cidr` option maps to the IP address range that you configured for @@ -208,8 +211,11 @@ docker container run --rm -it \ -v /var/run/docker.sock:/var/run/docker.sock \ {{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }} install \ --host-address \ - --interactive \ - --swarm-port 3376 \ --pod-cidr \ - --cloud-provider Azure + --cloud-provider Azure \ + --interactive ``` + +#### Additional Notes + +- The Kubernetes `pod-cidr` must match the Azure Vnet of the hosts. diff --git a/ee/ucp/admin/install/upgrade.md b/ee/ucp/admin/install/upgrade.md index 61800c0be0..9db38153ac 100644 --- a/ee/ucp/admin/install/upgrade.md +++ b/ee/ucp/admin/install/upgrade.md @@ -23,12 +23,15 @@ Also, don't make changes to UCP configurations while you're upgrading it. This can lead to misconfigurations that are difficult to troubleshoot. Ensure that your cluster nodes meet the minimum requirements for memory and -disk space. In particular, manager nodes must have at least 4GB of memory. +disk space. In particular, manager nodes must have at least 8GB of memory. Learn about [UCP system requirements](system-requirements.md). Ensure that your cluster nodes meet the minimum requirements for port openings. [Ports used](system-requirements.md/#ports-used) are documented in the UCP system requirements. +> Note: If you are upgrading a cluster to UCP 3.0.2 or higher on Microsoft +> Azure then please ensure all of the Azure [prequisities](install-on-azure.md/#azure-prerequisites) +> are met. ## Back up your cluster diff --git a/ee/ucp/admin/monitor-and-troubleshoot/troubleshoot-configurations.md b/ee/ucp/admin/monitor-and-troubleshoot/troubleshoot-configurations.md index 866500110c..957abe239c 100644 --- a/ee/ucp/admin/monitor-and-troubleshoot/troubleshoot-configurations.md +++ b/ee/ucp/admin/monitor-and-troubleshoot/troubleshoot-configurations.md @@ -132,7 +132,7 @@ NUM_MANAGERS=$(docker node ls --filter role=manager -q | wc -l) VERSION=$(docker image ls --format '{{.Tag}}' docker/ucp-auth | head -n 1) # This reconfigure-db command will repair the RethinkDB cluster to have a # number of replicas equal to the number of manager nodes in the cluster. -docker container run --rm -v ucp-auth-store-certs:/tls docker/ucp-auth:${VERSION} --db-addr=${NODE_ADDRESS}:12383 --debug reconfigure-db --num-replicas ${NUM_MANAGERS} --emergency-repair +docker container run --rm -v ucp-auth-store-certs:/tls docker/ucp-auth:${VERSION} --db-addr=${NODE_ADDRESS}:12383 --debug reconfigure-db --num-replicas ${NUM_MANAGERS} time="2017-07-14T20:46:09Z" level=debug msg="Connecting to db ..." time="2017-07-14T20:46:09Z" level=debug msg="connecting to DB Addrs: [192.168.1.25:12383]" @@ -143,6 +143,11 @@ time="2017-07-14T20:46:09Z" level=debug msg="(01/16) Emergency Repaired Table \" {% endraw %} ``` +> #### Loss of Quorum in RethinkDB Tables +> +> When there is loss of quorum in any of the RethinkDB tables, run the `reconfigure-db` command +> with the `--emergency-repair` flag. + ## Where to go next - [Get support](../../../get-support.md) diff --git a/ee/ucp/interlock/usage/default-service.md b/ee/ucp/interlock/usage/default-service.md index 0602d8c1c9..b4d78ae9c5 100644 --- a/ee/ucp/interlock/usage/default-service.md +++ b/ee/ucp/interlock/usage/default-service.md @@ -12,7 +12,7 @@ see the default NGINX 404 page. ![Default NGINX page](../../images/interlock-default-service-1.png){: .with-border} You can customize this by labelling a service with -`com.docker.lb.defaul_backend=true`. When users try to access a route that's +`com.docker.lb.default_backend=true`. When users try to access a route that's not configured, they are redirected to this service. As an example, create a `docker-compose.yml` file with: diff --git a/ee/ucp/interlock/usage/index.md b/ee/ucp/interlock/usage/index.md index 4895b67160..a6080512b4 100644 --- a/ee/ucp/interlock/usage/index.md +++ b/ee/ucp/interlock/usage/index.md @@ -10,7 +10,7 @@ start using it in your swarm services. In this example we'll deploy a simple service which: * Has a JSON endpoint that returns the ID of the task serving the request. -* Has a web UI that shows how many tasks the service is running. +* Has a web interface that shows how many tasks the service is running. * Can be reached at `http://app.example.org`. ## Deploy the service @@ -27,7 +27,7 @@ services: replicas: 1 labels: com.docker.lb.hosts: app.example.org - com.docker.lb.network: demo-network + com.docker.lb.network: demo_demo-network com.docker.lb.port: 8080 networks: - demo-network @@ -46,7 +46,9 @@ the host header, that request is forwarded to the demo service. should attach to in order to be able to communicate with the demo service. To use layer 7 routing, your services need to be attached to at least one network. If your service is only attached to a single network, you don't need to add -a label to specify which network to use for routing. +a label to specify which network to use for routing. When using a common stack file for multiple deployments leveraging UCP Interlock / Layer 7 Routing, prefix `com.docker.lb.network` with the stack name to ensure traffic will be directed to the correct overlay network. + + * The `com.docker.lb.port` label specifies which port the `ucp-interlock-proxy` service should use to communicate with this demo service. * Your service doesn't need to expose a port in the swarm routing mesh. All diff --git a/ee/ucp/interlock/usage/tls.md b/ee/ucp/interlock/usage/tls.md index 32f7e9910e..7c52129323 100644 --- a/ee/ucp/interlock/usage/tls.md +++ b/ee/ucp/interlock/usage/tls.md @@ -139,10 +139,12 @@ If everything is properly configured you should get a JSON payload: ``` Since the proxy uses SNI to decide where to route traffic, make sure you're -using a version of curl that includes the SNI header with insecure requests. -If this doesn't happen, curl displays an error saying that the SSL handshake +using a version of `curl` that includes the SNI header with insecure requests. +If this doesn't happen, `curl` displays an error saying that the SSL handshake was aborterd. +> ***NOTE:*** Currently there is no way to update expired certificates using this method. +> The proper way is to create a new secret then update the corresponding service. ## Let your service handle TLS diff --git a/ee/ucp/kubernetes/index.md b/ee/ucp/kubernetes/index.md index 3daebde71d..d9081a790e 100644 --- a/ee/ucp/kubernetes/index.md +++ b/ee/ucp/kubernetes/index.md @@ -102,7 +102,8 @@ The service connects the cluster's internal port 80 to the external port The YAML definition connects the service to the NGINX server by using the app label `nginx` and a corresponding label selector. -[Learn about using a service to expose your app](https://v1-8.docs.kubernetes.io/docs/tutorials/kubernetes-basics/expose-intro/). +[Learn about using a service to expose your app](https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/ +). ## Update the deployment diff --git a/ee/ucp/kubernetes/layer-7-routing.md b/ee/ucp/kubernetes/layer-7-routing.md index 60b4691ecf..d12a15a961 100644 --- a/ee/ucp/kubernetes/layer-7-routing.md +++ b/ee/ucp/kubernetes/layer-7-routing.md @@ -183,7 +183,7 @@ spec: privileged: true containers: - name: nginx-ingress-controller - image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.17.1 + image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.20.0 args: - /nginx-ingress-controller - --default-backend-service=$(POD_NAMESPACE)/default-http-backend @@ -191,6 +191,7 @@ spec: - --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services - --udp-services-configmap=$(POD_NAMESPACE)/udp-services - --annotations-prefix=nginx.ingress.kubernetes.io + - --enable-ssl-passthrough env: - name: POD_NAME valueFrom: diff --git a/ee/ucp/kubernetes/ucp-secureoverlay.yml b/ee/ucp/kubernetes/ucp-secureoverlay.yml index 429bd21304..c73eea3f40 100644 --- a/ee/ucp/kubernetes/ucp-secureoverlay.yml +++ b/ee/ucp/kubernetes/ucp-secureoverlay.yml @@ -120,7 +120,7 @@ spec: serviceAccountName: ucp-secureoverlay-agent containers: - name: ucp-secureoverlay-agent - image: ucp-secureoverlay-agent:3.1.0 + image: docker/ucp-secureoverlay-agent:3.1.0 securityContext: capabilities: add: ["NET_ADMIN"] @@ -162,4 +162,4 @@ spec: restartPolicy: Always containers: - name: ucp-secureoverlay-mgr - image: ucp-secureoverlay-mgr:3.1.0 + image: docker/ucp-secureoverlay-mgr:3.1.0 diff --git a/ee/ucp/ucp-architecture.md b/ee/ucp/ucp-architecture.md index 52f855a5fc..2d4f981269 100644 --- a/ee/ucp/ucp-architecture.md +++ b/ee/ucp/ucp-architecture.md @@ -69,7 +69,7 @@ on a node depend on whether the node is a manager or a worker. Internally, UCP uses the following components: * Calico 3.0.8 -* Kubernetes 1.11 +* Kubernetes 1.8.15 ### UCP components in manager nodes diff --git a/ee/ucp/user-access/kubectl.md b/ee/ucp/user-access/kubectl.md index f7d73a825f..9b452a5397 100644 --- a/ee/ucp/user-access/kubectl.md +++ b/ee/ucp/user-access/kubectl.md @@ -29,7 +29,7 @@ To use kubectl, install the binary on a workstation which has access to your UCP {: .important} First, find which version of Kubernetes is running in your cluster. This can be found -within the Universal Control Plane dashboard or at the UCP API endpoint [version](/reference/ucp/3.0/api/). +within the Universal Control Plane dashboard or at the UCP API endpoint [version](/reference/ucp/3.1/api/). From the UCP dashboard, click on **About Docker EE** within the **Admin** menu in the top left corner of the dashboard. Then navigate to **Kubernetes**. @@ -48,7 +48,7 @@ operating system.
                    ``` # Set the Kubernetes version as found in the UCP Dashboard or API -k8sversion=v1.8.11 +k8sversion=v1.11.5 # Get the kubectl binary. curl -LO https://storage.googleapis.com/kubernetes-release/release/$k8sversion/bin/darwin/amd64/kubectl @@ -64,7 +64,7 @@ sudo mv ./kubectl /usr/local/bin/kubectl
                    ``` # Set the Kubernetes version as found in the UCP Dashboard or API -k8sversion=v1.8.11 +k8sversion=v1.11.5 # Get the kubectl binary. curl -LO https://storage.googleapis.com/kubernetes-release/release/$k8sversion/bin/linux/amd64/kubectl diff --git a/engine/ce-ee-node-activate.md b/engine/ce-ee-node-activate.md index ce938f8d32..ec6ecafda9 100644 --- a/engine/ce-ee-node-activate.md +++ b/engine/ce-ee-node-activate.md @@ -28,20 +28,21 @@ The activation can be performed either online with connection to Docker Hub, or ``` $ docker version Client: - Version: 18.09.0-ce + Version: 18.09.0 API version: 1.39 - Go version: go1.10.3 - Git commit: ca36ebe - Built: Thu Aug 23 18:21:56 2018 + Go version: go1.10.4 + Git commit: 4d60db4 + Built: Wed Nov 7 00:48:22 2018 OS/Arch: linux/amd64 Experimental: false -Server: + +Server: Docker Engine - Community Engine: - Version: 18.09.0-ce + Version: 18.09.0 API version: 1.39 (minimum version 1.12) - Go version: go1.10.3 - Git commit: ca36ebe - Built: + Go version: go1.10.4 + Git commit: 4d60db4 + Built: Wed Nov 7 00:19:08 2018 OS/Arch: linux/amd64 Experimental: false ``` @@ -98,24 +99,25 @@ Restart docker with 'systemctl restart docker' to complete the activation. ``` 5. Check the Docker Engine version. The engine server will become EE, and the engine client will stay CE. -``` +``` $ docker version Client: - Version: 18.09.0-ce + Version: 18.09.0 API version: 1.39 - Go version: go1.10.3 - Git commit: ca36ebe - Built: Thu Aug 23 18:21:56 2018 + Go version: go1.10.4 + Git commit: 4d60db4 + Built: Wed Nov 7 00:48:22 2018 OS/Arch: linux/amd64 Experimental: false -Server: + +Server: Docker Engine - Enterprise Engine: - Version: 18.09.0-ee-1 + Version: 18.09.0 API version: 1.39 (minimum version 1.12) - Go version: go1.10.3 - Git commit: b9e7996 - Built: + Go version: go1.10.4 + Git commit: 33a45cd + Built: Wed Nov 7 00:19:46 2018 OS/Arch: linux/amd64 Experimental: false ``` 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/engine/examples/running_ssh_service.md b/engine/examples/running_ssh_service.md index 2d4d8e568a..7cb4c50d86 100644 --- a/engine/examples/running_ssh_service.md +++ b/engine/examples/running_ssh_service.md @@ -52,6 +52,8 @@ Docker daemon host: ```bash $ ssh root@192.168.1.2 -p 49154 +# or +$ ssh root@localhost -p 49154 # The password is ``screencast``. root@f38c87f2a42d:/# ``` diff --git a/engine/faq.md b/engine/faq.md index ddbb78dc88..f5c717a521 100644 --- a/engine/faq.md +++ b/engine/faq.md @@ -116,6 +116,7 @@ Linux: - Any distribution running version 3.10+ of the Linux kernel - Specific instructions are available for most Linux distributions, including [RHEL](installation/linux/rhel.md), [Ubuntu](installation/linux/ubuntulinux.md), + [Oracle Linux](installation/linux/oracle.md), [SuSE](installation/linux/suse.md), and many others. Microsoft Windows: @@ -129,6 +130,7 @@ Cloud: - Google Compute Engine - Microsoft Azure - Rackspace + - Oracle Cloud Infrastructure ### How do I report a security issue with Docker? diff --git a/engine/release-notes.md b/engine/release-notes.md index 0403504e39..dca7f4afa0 100644 --- a/engine/release-notes.md +++ b/engine/release-notes.md @@ -16,6 +16,11 @@ Docker EE is a superset of all the features in Docker CE. It incorporates defect that you can use in environments where new features cannot be adopted as quickly for consistency and compatibility reasons. +> ***NOTE:*** +> New in 18.09 is an aligned release model for Docker Engine - Community and Docker +> Engine - Enterprise. The new versioning scheme is YY.MM.x where x is an incrementing +> patch version. The enterprise engine is a superset of the community engine. They +> will ship concurrently with the same x patch version based on the same code base. ## 18.09.1 2019-XX-XX @@ -58,6 +63,7 @@ consistency and compatibility reasons. * Add docker.socket requirement for docker.service. [docker/docker-ce-packaging#276](https://github.com/docker/docker-ce-packaging/pull/276) * Add socket activation for RHEL-based distributions. [docker/docker-ce-packaging#274](https://github.com/docker/docker-ce-packaging/pull/274) * Add libseccomp requirement for RPM packages. [docker/docker-ce-packaging#266](https://github.com/docker/docker-ce-packaging/pull/266) +======= ## 18.09 2018-11-08 @@ -187,9 +193,9 @@ Ubuntu 14.04 "Trusty Tahr" [docker-ce-packaging#255](https://github.com/docker/d ### 18.03.1-ee-2 2018-07-10 -> Important notes about this release +> #### Important notes about this release > -> If you're deploying UCP or DTR, use Docker EE Engine 17.06. +> If you're deploying UCP or DTR, use Docker Engine EE `17.06` or `18.09`. See [Docker Compatibility Matrix](https://success.docker.com/article/compatibility-matrix) for more information. {: .important} #### Runtime @@ -200,9 +206,9 @@ Ubuntu 14.04 "Trusty Tahr" [docker-ce-packaging#255](https://github.com/docker/d ### 18.03.1-ee-1 2018-06-27 -> Important notes about this release +> #### Important notes about this release > -> If you're deploying UCP or DTR, use Docker EE Engine 17.06. +> If you're deploying UCP or DTR, use Docker Engine EE `17.06` or `18.09`. See [Docker Compatibility Matrix](https://success.docker.com/article/compatibility-matrix) for more information. {: .important} #### Client @@ -219,7 +225,7 @@ Ubuntu 14.04 "Trusty Tahr" [docker-ce-packaging#255](https://github.com/docker/d + Add support for Ubuntu 18.04. + Windows opt-out telemetry stream. + Support for `--chown` with `COPY` and `ADD` in `Dockerfile`. -+ Add support for multiple logging drivers for `docker logs`. ++ Added functionality for the `docker logs` command to include the output of multiple logging drivers. ### 17.06.2-ee-17 2018-10-25 diff --git a/engine/security/https.md b/engine/security/https.md index 5e23fb18d9..18376b4a93 100644 --- a/engine/security/https.md +++ b/engine/security/https.md @@ -7,10 +7,10 @@ redirect_from: title: Protect the Docker daemon socket --- -By default, Docker runs via a non-networked Unix socket. It can also +By default, Docker runs through a non-networked UNIX socket. It can also optionally communicate using an HTTP socket. -If you need Docker to be reachable via the network in a safe manner, you can +If you need Docker to be reachable through the network in a safe manner, you can enable TLS by specifying the `tlsverify` flag and pointing Docker's `tlscacert` flag to a trusted CA certificate. @@ -73,7 +73,7 @@ to connect to Docker: Next, we're going to sign the public key with our CA: -Since TLS connections can be made via IP address as well as DNS name, the IP addresses +Since TLS connections can be made through IP address as well as DNS name, the IP addresses need to be specified when creating the certificate. For example, to allow connections using `10.10.10.20` and `127.0.0.1`: @@ -113,24 +113,24 @@ request: $ openssl req -subj '/CN=client' -new -key key.pem -out client.csr -To make the key suitable for client authentication, create an extensions +To make the key suitable for client authentication, create a new extensions config file: - $ echo extendedKeyUsage = clientAuth >> extfile.cnf + $ echo extendedKeyUsage = clientAuth > extfile-client.cnf Now, generate the signed certificate: $ openssl x509 -req -days 365 -sha256 -in client.csr -CA ca.pem -CAkey ca-key.pem \ - -CAcreateserial -out cert.pem -extfile extfile.cnf + -CAcreateserial -out cert.pem -extfile extfile-client.cnf Signature ok subject=/CN=client Getting CA Private Key Enter pass phrase for ca-key.pem: After generating `cert.pem` and `server-cert.pem` you can safely remove the -two certificate signing requests: +two certificate signing requests and extensions config files: - $ rm -v client.csr server.csr + $ rm -v client.csr server.csr extfile.cnf extfile-client.cnf With a default `umask` of 022, your secret keys are *world-readable* and writable for you and your group. @@ -180,7 +180,7 @@ certificates and trusted CA: ## Secure by default If you want to secure your Docker client connections by default, you can move -the files to the `.docker` directory in your home directory -- and set the +the files to the `.docker` directory in your home directory --- and set the `DOCKER_HOST` and `DOCKER_TLS_VERIFY` variables as well (instead of passing `-H=tcp://$HOST:2376` and `--tlsverify` on every call). diff --git a/engine/security/seccomp.md b/engine/security/seccomp.md index a343094564..01e677c18f 100644 --- a/engine/security/seccomp.md +++ b/engine/security/seccomp.md @@ -86,7 +86,7 @@ the reason each syscall is blocked rather than white-listed. | `mbind` | Syscall that modifies kernel memory and NUMA settings. Already gated by `CAP_SYS_NICE`. | | `mount` | Deny mounting, already gated by `CAP_SYS_ADMIN`. | | `move_pages` | Syscall that modifies kernel memory and NUMA settings. | -| `name_to_handle_at` | Sister syscall to `open_by_handle_at`. Already gated by `CAP_SYS_NICE`. | +| `name_to_handle_at` | Sister syscall to `open_by_handle_at`. Already gated by `CAP_DAC_READ_SEARCH`. | | `nfsservctl` | Deny interaction with the kernel nfs daemon. Obsolete since Linux 3.1. | | `open_by_handle_at` | Cause of an old container breakout. Also gated by `CAP_DAC_READ_SEARCH`. | | `perf_event_open` | Tracing/profiling syscall, which could leak a lot of information on the host. | diff --git a/engine/swarm/configs.md b/engine/swarm/configs.md index f78c1c4616..23163a220f 100644 --- a/engine/swarm/configs.md +++ b/engine/swarm/configs.md @@ -63,7 +63,7 @@ You can set the ownership (`uid` and `gid`) or the config, using either the numerical ID or the name of the user or group. You can also specify the file permissions (`mode`). These settings are ignored for Windows containers. -- If not set, the config is owned by the user and that running the container +- If not set, the config is owned by the user running the container command (often `root`) and that user's default group (also often `root`). - If not set, the config has world-readable permissions (mode `0444`), unless a `umask` is set within the container, in which case the mode is impacted by @@ -586,7 +586,7 @@ configuration file. ``` 4. Verify that the `nginx` service is fully re-deployed, using - `docker service ls nginx`. When it is, you can remove the old `site.conf` + `docker service ps nginx`. When it is, you can remove the old `site.conf` config. ```bash diff --git a/engine/swarm/index.md b/engine/swarm/index.md index f34c2a362d..17cd7fe86d 100644 --- a/engine/swarm/index.md +++ b/engine/swarm/index.md @@ -11,9 +11,6 @@ Current versions of Docker include *swarm mode* for natively managing a cluster of Docker Engines called a *swarm*. Use the Docker CLI to create a swarm, deploy application services to a swarm, and manage swarm behavior. -If you are using a Docker version prior to `1.12.0`, you can use [standalone -swarm](/swarm/index.md), but we recommend updating. - ## Feature highlights * **Cluster management integrated with Docker Engine:** Use the Docker Engine diff --git a/engine/swarm/swarm-tutorial/create-swarm.md b/engine/swarm/swarm-tutorial/create-swarm.md index 1c5904e35b..75675454e5 100644 --- a/engine/swarm/swarm-tutorial/create-swarm.md +++ b/engine/swarm/swarm-tutorial/create-swarm.md @@ -20,7 +20,7 @@ machines. 2. Run the following command to create a new swarm: ```bash - docker swarm init --advertise-addr + $ docker swarm init --advertise-addr ``` >**Note**: If you are using Docker for Mac or Docker for Windows to test diff --git a/get-started/index.md b/get-started/index.md index 4573c71246..36328a270f 100644 --- a/get-started/index.md +++ b/get-started/index.md @@ -120,7 +120,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/part2.md b/get-started/part2.md index b85e7c74e2..23f9652b25 100644 --- a/get-started/part2.md +++ b/get-started/part2.md @@ -147,7 +147,8 @@ you have. ## Build the app -We are ready to build the app. Make sure you are still at the top level of your new directory. Here's what `ls` should show: +We are ready to build the app. Make sure you are still at the top level of your +new directory. Here's what `ls` should show: ```shell $ ls @@ -155,10 +156,10 @@ Dockerfile app.py requirements.txt ``` Now run the build command. This creates a Docker image, which we're going to -tag using `-t` so it has a friendly name. +name using the `--tag` option. Use `-t` if you want to use the a shorter option. ```shell -docker build -t friendlyhello . +docker build --tag=friendlyhello . ``` Where is your built image? It's in your machine's local Docker image registry: @@ -170,6 +171,11 @@ REPOSITORY TAG IMAGE ID friendlyhello latest 326387cea398 ``` + +Note how the tag defaulted to `latest`. The full syntax for the tag option would +be something like `--tag=friendlyhello:v0.0.1`. + + > Troubleshooting for Linux users > > _Proxy server settings_ diff --git a/get-started/part3.md b/get-started/part3.md index 9a1436f571..4d1c85ec40 100644 --- a/get-started/part3.md +++ b/get-started/part3.md @@ -41,7 +41,7 @@ must go one level up in the hierarchy of a distributed application: the ## About services -In a distributed application, different pieces of the app are called "services." +In a distributed application, different pieces of the app are called "services". For example, if you imagine a video sharing site, it probably includes a service for storing application data in a database, a service for video transcoding in the background after a user uploads something, a service for the front-end, and diff --git a/get-started/part6.md b/get-started/part6.md index d04c3c2151..f33c3b46a8 100644 --- a/get-started/part6.md +++ b/get-started/part6.md @@ -27,142 +27,71 @@ username/repo:tag`, then visit `http://localhost/`. 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 +on your machine. In this section, we will 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. +{% capture community %} -To set up and deploy: +### Install Docker Engine --- Community -- 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). +Find the [install instructions](/install/#supported-platforms) for Docker Engine --- Community on the platform of your choice. ### Create your swarm -Ready to create a swarm? +Run `docker swarm init` to create a swarm on the node. -* 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');"}. +### Deploy your app -* 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 +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 +```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 - ``` +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. +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. +* Use `docker node ls` to list the nodes in your swarm. - ```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 - ``` +```shell +[getstartedlab] ~ $ docker node ls +ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS +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 - ``` +```shell +[getstartedlab] ~/sandbox/getstart $ docker service ls +ID NAME MODE REPLICAS IMAGE PORTS +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 - ``` +```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-20-217.us-west-1.compute.internal Running Running 20 seconds ago +sknya8t4m51u getstartedlab_web.2 sam/getstarted:part6 ip-172-31-20-217.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-20-217.us-west-1.compute.internal Running Running 21 seconds ago +uh64ez6ahuew getstartedlab_web.5 sam/getstarted:part6 ip-172-31-20-217.us-west-1.compute.internal Running Running 22 seconds ago +``` #### Open ports to services on cloud provider machines @@ -170,10 +99,9 @@ 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 +* if using many nodes, allow communication between the `redis` service and `web` service -* allow inbound traffic to the `web` service on the worker nodes so that +* allow inbound traffic to the `web` service on any 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) @@ -201,44 +129,6 @@ 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 @@ -267,48 +157,30 @@ servers regardless of whether you shut down your local host. 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 +through the interface 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');"}. +Once you're all set up and Docker Enterprise is running, you can [deploy your Compose +file from directly within the UI](/ee/ucp/swarm/deploy-multi-service-app/){: 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) +![Deploy an app on Docker Enterprise](/ee/ucp/images/deploy-multi-service-app-2.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) +![Managing app on Docker Enterprise](/ee/ucp/images/deploy-multi-service-app-4.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 %} +{% capture enterprise %} {{ 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');"}. +1. [Get Docker Enterprise for your server's OS from Docker Hub](https://hub.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 Docker Enterprise 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');"}. @@ -316,14 +188,12 @@ essentially involves two steps: {% endcapture %}
                    -
                    {{ cloud }}
                    -
                    {{ enterprisecloud }}
                    -
                    {{ enterpriseonprem }}
                    +
                    {{ enterprise }}
                    +
                    {{ community }}
                    ## Congratulations! diff --git a/install/index.md b/install/index.md index 23456bc4c3..72cea8fa51 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. @@ -152,8 +152,8 @@ to choose the best installation path for you. | Platform | x86_64 | |:----------------------------------------------------------------------------|:-----------------:| -| [Docker for Mac (macOS)](/docker-for-mac/install.md) | {{ green-check }} | -| [Docker for Windows (Microsoft Windows 10)](/docker-for-windows/install.md) | {{ green-check }} | +| [Docker for Mac (macOS)](/docker-for-mac/install/) | {{ green-check }} | +| [Docker for Windows (Microsoft Windows 10)](/docker-for-windows/install/) | {{ green-check }} | #### Server @@ -162,10 +162,10 @@ to choose the best installation path for you. | Platform | x86_64 / amd64 | ARM | ARM64 / AARCH64 | IBM Power (ppc64le) | IBM Z (s390x) | |:--------------------------------------------|:-------------------------------------------------------|:-------------------------------------------------------|:-------------------------------------------------------|:-------------------------------------------------------|:-------------------------------------------------------| -| [CentOS]({{ install-prefix-ce }}/centos.md) | [{{ green-check }}]({{ install-prefix-ce }}/centos.md) | | [{{ green-check }}]({{ install-prefix-ce }}/centos.md) | | | -| [Debian]({{ install-prefix-ce }}/debian.md) | [{{ green-check }}]({{ install-prefix-ce }}/debian.md) | [{{ green-check }}]({{ install-prefix-ce }}/debian.md) | [{{ green-check }}]({{ install-prefix-ce }}/debian.md) | | | -| [Fedora]({{ install-prefix-ce }}/fedora.md) | [{{ green-check }}]({{ install-prefix-ce }}/fedora.md) | | | | | -| [Ubuntu]({{ install-prefix-ce }}/ubuntu.md) | [{{ green-check }}]({{ install-prefix-ce }}/ubuntu.md) | [{{ green-check }}]({{ install-prefix-ce }}/ubuntu.md) | [{{ green-check }}]({{ install-prefix-ce }}/ubuntu.md) | [{{ green-check }}]({{ install-prefix-ce }}/ubuntu.md) | [{{ green-check }}]({{ install-prefix-ce }}/ubuntu.md) | +| [CentOS]({{ install-prefix-ce }}/centos/) | [{{ green-check }}]({{ install-prefix-ce }}/centos/) | | [{{ green-check }}]({{ install-prefix-ce }}/centos/) | | | +| [Debian]({{ install-prefix-ce }}/debian/) | [{{ green-check }}]({{ install-prefix-ce }}/debian/) | [{{ green-check }}]({{ install-prefix-ce }}/debian/) | [{{ green-check }}]({{ install-prefix-ce }}/debian/) | | | +| [Fedora]({{ install-prefix-ce }}/fedora/) | [{{ green-check }}]({{ install-prefix-ce }}/fedora/) | | [{{ green-check }}]({{ install-prefix-ce }}/fedora/) | | | +| [Ubuntu]({{ install-prefix-ce }}/ubuntu/) | [{{ green-check }}]({{ install-prefix-ce }}/ubuntu/) | [{{ green-check }}]({{ install-prefix-ce }}/ubuntu/) | [{{ green-check }}]({{ install-prefix-ce }}/ubuntu/) | [{{ green-check }}]({{ install-prefix-ce }}/ubuntu/) | [{{ green-check }}]({{ install-prefix-ce }}/ubuntu/) | ### Backporting diff --git a/install/linux/docker-ce/debian.md b/install/linux/docker-ce/debian.md index 9ee5ac470c..231fa7b199 100644 --- a/install/linux/docker-ce/debian.md +++ b/install/linux/docker-ce/debian.md @@ -41,7 +41,7 @@ Older versions of Docker were called `docker` or `docker-engine`. If these are installed, uninstall them: ```bash -$ sudo apt-get remove docker docker-engine docker.io +$ sudo apt-get remove docker docker-engine docker.io containerd runc ``` It's OK if `apt-get` reports that none of these packages are installed. diff --git a/install/linux/docker-ce/ubuntu.md b/install/linux/docker-ce/ubuntu.md index 522bff5161..91dd04c671 100644 --- a/install/linux/docker-ce/ubuntu.md +++ b/install/linux/docker-ce/ubuntu.md @@ -46,7 +46,7 @@ Older versions of Docker were called `docker` or `docker-engine`. If these are installed, uninstall them: ```bash -$ sudo apt-get remove docker docker-engine docker.io +$ sudo apt-get remove docker docker-engine docker.io containerd runc ``` It's OK if `apt-get` reports that none of these packages are installed. @@ -176,6 +176,7 @@ the repository. @@ -199,6 +200,16 @@ the repository. stable" ``` +
                    +
                    + + ```bash + $ sudo add-apt-repository \ + "deb [arch=arm64] {{ download-url-base }} \ + $(lsb_release -cs) \ + stable" + ``` +
                    @@ -273,7 +284,7 @@ the repository. image. ```bash - $ sudo docker run hello-world + $ sudo docker container run hello-world ``` This command downloads a test image and runs it in a container. When the @@ -319,7 +330,7 @@ a new file each time you want to upgrade Docker CE. image. ```bash - $ sudo docker run hello-world + $ sudo docker container run hello-world ``` This command downloads a test image and runs it in a container. When the diff --git a/install/linux/docker-ee/centos.md b/install/linux/docker-ee/centos.md index bd4b6050b0..9af2f7ea0f 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/`. @@ -56,8 +56,7 @@ $ sudo yum remove docker \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ - docker-engine \ - docker-ce + docker-engine ``` ## Repo install and upgrade diff --git a/install/linux/docker-ee/oracle.md b/install/linux/docker-ee/oracle.md index 7147ff08ce..b4866b5593 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 da7ac668e9..c182de5aaf 100644 --- a/install/linux/docker-ee/rhel.md +++ b/install/linux/docker-ee/rhel.md @@ -23,20 +23,20 @@ title: Get Docker EE for Red Hat Enterprise Linux This section lists what you need to consider before installing Docker EE. Items that require action are explained below. -- Use {{ linux-dist-cap }} 64-bit 7.1 and higher on `x86_64`, `s390x`, or `ppc64le` (not ppc64). +- Use {{ linux-dist-cap }} 64-bit 7.4 and higher on `x86_64`, or `s390x`. - 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. ### Architectures and storage drivers -Docker EE supports {{ linux-dist-long }} 64-bit, versions 7.1 and higher (7.1, 7.2, 7.3, 7.4, 7.5), running on one of the following architectures: `x86_64`, `s390x` (IBM Z), or `ppc64le` (IBM Power, little endian format). To ensure you have `ppc64le` (and not `ppc64`), run the command, `uname -m`. +Docker EE supports {{ linux-dist-long }} 64-bit, versions 7.4 and higher running on one of the following architectures: `x86_64`, or `s390x` (IBM Z). See [Compatability Matrix](https://success.docker.com/article/compatibility-matrix){: target="_blank" class="_" }) for specific details. -> Little endian format only +> Little-endian format only > -> On IBM Power systems, Docker EE only supports little endian format, `ppc64le`, even though {{ linux-dist-cap }} 7 ships both big and little endian versions. +> On IBM Power systems, Docker EE only supports little-endian format, `ppc64le`, even though {{ linux-dist-cap }} 7 ships both big and little-endian versions. On {{ linux-dist-long }}, Docker EE supports storage drivers, `overlay2` and `devicemapper`. In Docker EE 17.06.2-ee-5 and higher, `overlay2` is the recommended storage driver. The following limitations apply: @@ -57,7 +57,7 @@ $ cat /proc/sys/crypto/fips_enabled 1 ``` -**NOTE:** FIPS is only supported in the Docker EE engine. UCP and DTR currently do not have support for FIPS-140-2. +> ***NOTE:*** FIPS is only supported in the Docker Engine EE. UCP and DTR currently do not have support for FIPS-140-2. To enable FIPS 140-2 compliance on a system that is not in FIPS 140-2 mode, do the following: @@ -119,8 +119,7 @@ $ sudo yum remove docker \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ - docker-engine \ - docker-ce + docker-engine ``` diff --git a/install/linux/docker-ee/suse.md b/install/linux/docker-ee/suse.md index 87c1140e3b..e32f691424 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 @@ -180,7 +180,7 @@ from the repository. ``` 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.09` diff --git a/install/linux/docker-ee/ubuntu.md b/install/linux/docker-ee/ubuntu.md index 2277d11b40..825b7468db 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 @@ -185,7 +185,8 @@ from the repository. $ sudo add-apt-repository \ "deb [arch=amd64] $DOCKER_EE_URL/ubuntu \ $(lsb_release -cs) \ - stable-18.09" + $DOCKER_EE_VERSION" + ```
                    @@ -195,7 +196,8 @@ from the repository. $ sudo add-apt-repository \ "deb [arch=s390x] $DOCKER_EE_URL/ubuntu \ $(lsb_release -cs) \ - stable-18.09" + $DOCKER_EE_VERSION" + ```
                    @@ -205,7 +207,8 @@ from the repository. $ sudo add-apt-repository \ "deb [arch=ppc64el] $DOCKER_EE_URL/ubuntu \ $(lsb_release -cs) \ - stable-18.09" + $DOCKER_EE_VERSION" + ```
                  diff --git a/install/linux/linux-postinstall.md b/install/linux/linux-postinstall.md index 3f1bf92d11..5f6b1102dc 100644 --- a/install/linux/linux-postinstall.md +++ b/install/linux/linux-postinstall.md @@ -479,7 +479,7 @@ and a 10% overall performance degradation, even if Docker is not running. ``` If your GRUB configuration file has incorrect syntax, an error occurs. - In this case, repeat steps 3 and 4. + In this case, repeat steps 2 and 3. The changes take effect when the system is rebooted. diff --git a/install/windows/docker-ee.md b/install/windows/docker-ee.md index df05f577d8..a024625eb7 100644 --- a/install/windows/docker-ee.md +++ b/install/windows/docker-ee.md @@ -5,6 +5,7 @@ title: Install Docker Engine - Enterprise on Windows Servers redirect_from: - /docker-ee-for-windows/install/ - /engine/installation/windows/docker-ee/ +- /install/windows/ee-preview/ --- {% capture filename %}{{ page.win_latest_build }}.zip{% endcapture %} {% capture download_url %}https://download.docker.com/components/engine/windows-server/{{ site.docker_ee_version }}/{{ filename }}{% endcapture %} @@ -124,9 +125,12 @@ installs, or install on air-gapped systems. ```PowerShell # On an online machine, download the zip file. - invoke-webrequest -UseBasicparsing -Outfile {{ filename }} {{ download_url }} + Invoke-WebRequest -UseBasicParsing -OutFile {{ filename }} {{ download_url }} ``` + If you need to download a specific Docker EE Engine release, all URLs can be + found on this [JSON index](https://download.docker.com/components/engine/windows-server/index.json) + 2. Copy the zip file to the machine where you want to install Docker. In a PowerShell command prompt, use the following commands to extract the archive, register, and start the Docker service. @@ -173,14 +177,15 @@ installs, or install on air-gapped systems. To install a specific version, use the `RequiredVersion` flag: ```PowerShell -Install-Package -Name docker -ProviderName DockerMsftProvider -Force -RequiredVersion 18.09 +Install-Package -Name docker -ProviderName DockerMsftProvider -Force -RequiredVersion {{ site.docker_ee_version }} ... Name Version Source Summary ---- ------- ------ ------- -Docker 18.09.0 Docker Contains Docker Engine - Enterprise for use with Windows Server... +Docker {{ site.docker_ee_version }} Docker Contains Docker Engine - Enterprise for use with Windows Server... ``` ### Updating the DockerMsftProvider + Installing specific Docker EE versions may require an update to previously installed DockerMsftProvider modules. To update: ```PowerShell @@ -194,10 +199,41 @@ Then open a new Powershell session for the update to take effect. To update Docker Engine - Enterprise to the most recent release, specify the `-RequiredVersion` and `-Update` flags: ```PowerShell -Install-Package -Name docker -ProviderName DockerMsftProvider -RequiredVersion 18.09 -Update -Force +Install-Package -Name docker -ProviderName DockerMsftProvider -RequiredVersion {{ site.docker_ee_version }} -Update -Force ``` The required version must match any of the versions available in this json file: https://dockermsft.blob.core.windows.net/dockercontainer/DockerMsftIndex.json +## Uninstall Docker EE + + Use the following commands to completely remove the Docker Engine - Enterprise from a Windows Server: + +1. Leave any active Docker Swarm + ```PowerShell + docker swarm leave --force + ``` + +1. Remove all running and stopped containers + + ```PowerShell + docker rm -f $(docker ps --all --quiet) + ``` + +1. Prune container data + ```PowerShell + docker system prune --all --volumes + ``` + +1. Uninstall Docker PowerShell Package and Module + ```PowerShell + Uninstall-Package -Name docker -ProviderName DockerMsftProvider + Uninstall-Module -Name DockerMsftProvider + ``` + +1. Clean up Windows Networking and file system + ```PowerShell + Get-HNSNetwork | Remove-HNSNetwork + Remove-Item -Path "C:\ProgramData\Docker" -Recurse -Force + ``` ## Preparing a Docker EE Engine for use with UCP diff --git a/install/windows/ee-preview.md b/install/windows/ee-preview.md deleted file mode 100644 index 876b1c0ece..0000000000 --- a/install/windows/ee-preview.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -description: How to install Docker on Windows Server 1709 and Windows 10 Fall Creators Update -keywords: Windows, Windows Server, install, download, Docker EE, preview, Windows 1709 -title: Preview Docker for Windows Server 1709 and Windows 10 Fall Creators Update -redirect_from: -- /engine/installation/windows/ee-preview/ ---- - -Windows versions released in the fall of 2017 (Windows Server 1709 and Windows -10 Fall Creators Update for server and client respectively) contain improvements -that improve the experience of running Docker on Windows. Enhancements include: - - * Docker ingress mode service publishing and virtual-IP based service discovery - * Mounting container-host named pipes into Windows containers - * Smaller Windows container base images - * Linux containers on Windows - -Check out the -[blog post announcement for details](https://blog.docker.com/2017/09/docker-windows-server-1709/) -on use-cases for these new features. - -## Windows 10 Fall Creators Update - -Windows 10 users can take advantage of the new Windows features by -[installing Docker CE _Edge_ for Windows 10](/docker-for-windows/install/). Edge -comes with the latest Docker platform builds that support the new Windows features. - -## Windows Server 1709 - -The latest version of Docker Enterprise Edition Basic is 17.06 and Docker EE -17.06 is the recommended way to run Docker containers on Windows Server 1709 in -production. Unfortunately, Docker Universal Control plane does not support -managing Windows Server 1709 workers yet. Only Docker EE Basic is supported on -Windows Server 1709. - -Docker EE 17.06 does not support improved networking (ingress and virtual-IP -based service discovery), named pipe mounting nor Linux containers on Windows -Server 1709 (it does benefit from the smaller base images). For users that want -to test these new Windows features with Docker, Docker Inc. makes available -preview builds of Docker EE. These can be installed from the `preview` channel -using the standard PowerShell installation method: - - Install-Module DockerProvider - Install-Package Docker -ProviderName DockerProvider -RequiredVersion preview - -Again, Docker Universal Control Plane does not work on Windows Server 1709 -whether running Docker EE 17.06 or Docker EE preview. - -## FAQ - -### Image compatibility - -Windows container base images are not compatible between Windows Server 2016 and -Windows Server 1709 (except that Windows Server 1709 can run Windows Server 2016 -based images when using Hyper-V isolation - but not the other way around). Check -the following Microsoft compatibility docs for details. - -- [Version compatibility](https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility) -- [System requirements](https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/system-requirements) 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/drivers/hyper-v.md b/machine/drivers/hyper-v.md index 25477f76f9..939b3d337b 100644 --- a/machine/drivers/hyper-v.md +++ b/machine/drivers/hyper-v.md @@ -57,7 +57,7 @@ Hyper-V](https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/quick #### 1. Make sure Hyper-V is enabled. - Hyper-V is automatically enabled on a Docker for Windows installation. To enable it manually, see [instructions on how to manually enable Hyper-V](https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/quick_start/walkthrough_install) on the Microsoft developer network. +Hyper-V is automatically enabled on a Docker for Windows installation. To enable it manually, see [instructions on how to manually enable Hyper-V](https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/quick_start/walkthrough_install) on the Microsoft developer network. #### 2. Set up a new external network switch (Optional) @@ -79,9 +79,9 @@ For this example, we created a virtual switch called `Primary Virtual Switch`. #### 3. Reboot - See this issue on virtualbox: [Hangs on Waiting for VM to start #986](https://github.com/docker/machine/issues/986). +See this issue on virtualbox: [Hangs on Waiting for VM to start #986](https://github.com/docker/machine/issues/986). - Reboot your desktop system to clear out any routing table problems. Without a reboot first, `docker-machine create ...` might get hung up on `Waiting for VM to start`. +Reboot your desktop system to clear out any routing table problems. Without a reboot first, `docker-machine create ...` might get hung up on `Waiting for host to start...`. If you are still hung on "Waiting for host to start..." after you reboot, make sure you selected the correct network in the Virtual Switch Manager. #### 4. Create the nodes with Docker Machine and the Microsoft Hyper-V driver diff --git a/machine/drivers/index.md b/machine/drivers/index.md index 6d9bdd41f8..be0aafad10 100644 --- a/machine/drivers/index.md +++ b/machine/drivers/index.md @@ -20,3 +20,4 @@ title: Machine drivers - [VMware vSphere](vsphere.md) - [VMware Workstation](https://github.com/pecigonzalo/docker-machine-vmwareworkstation) (unofficial plugin, not supported by Docker) - [Grid 5000](https://github.com/Spirals-Team/docker-machine-driver-g5k) (unofficial plugin, not supported by Docker) +- [Scaleway](https://github.com/scaleway/docker-machine-driver-scaleway) (unofficial plugin, not supported by Docker) diff --git a/machine/drivers/virtualbox.md b/machine/drivers/virtualbox.md index 49d24c2102..4a31f21e58 100644 --- a/machine/drivers/virtualbox.md +++ b/machine/drivers/virtualbox.md @@ -39,7 +39,7 @@ The size of the VM's disk can be configured this way: - `--virtualbox-no-dns-proxy`: Disable proxying all DNS requests to the host (Boolean value, default to false) - `--virtualbox-no-share`: Disable the mount of your home directory - `--virtualbox-no-vtx-check`: Disable checking for the availability of hardware virtualization before the vm is started -- `--virtualbox-share-folder`: Mount the specified directory instead of the default home location. Format: dir:name +- `--virtualbox-share-folder`: Mount the specified directory instead of the default home location. - `--virtualbox-ui-type`: Specify the UI Type: (gui|sdl|headless|separate) The `--virtualbox-boot2docker-url` flag takes a few different forms. By @@ -68,6 +68,12 @@ to `.254`. For example, a specified CIDR of `192.168.24.1/24` would have a DHCP server between `192.168.24.2-25`, a lower bound of `192.168.24.100` and upper bound of `192.168.24.254`. +With the flag `--virtualbox-share-folder`, you can specify which folder the host +shares with the created machine. The format is `local-folder:machine-folder`. +For example, `\\?\C:\docker-share:\home\users\`. if you specify the flag with the +docker-toolbox using docker-machine from a Windows cmd, it looks like +`C:\docker-share\\:/home/users`. The `:` sign needs to be escaped. + #### Environment variables and default values | CLI option | Environment variable | Default | diff --git a/machine/examples/aws.md b/machine/examples/aws.md index 96af995a3d..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 -supersedes 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 7f99adb4db..c11cf5dc27 100644 --- a/machine/examples/index.md +++ b/machine/examples/index.md @@ -3,22 +3,5 @@ description: Examples of cloud installs keywords: docker, machine, amazonec2, azure, digitalocean, google, openstack, rackspace, softlayer, virtualbox, vmwarefusion, vmwarevcloudair, vmwarevsphere, exoscale 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 -supersedes 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 bae3fa788a..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 -supersedes 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 eb32e2c9b9..dc9d3e8b05 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 supersedes 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/machine/install-machine.md b/machine/install-machine.md index 6d9a9e5740..1b2a3bd3e6 100644 --- a/machine/install-machine.md +++ b/machine/install-machine.md @@ -21,26 +21,26 @@ on GitHub. 2. Download the Docker Machine binary and extract it to your PATH. - If you are running on **macOS**: + If you are running **macOS**: ```console - $ base=https://github.com/docker/machine/releases/download/v{{site.machine_version}} && + $ base=https://github.com/docker/machine/releases/tag/v{{site.machine_version}} && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/usr/local/bin/docker-machine && chmod +x /usr/local/bin/docker-machine ``` - If you are running on **Linux**: + If you are running **Linux**: ```console - $ base=https://github.com/docker/machine/releases/download/v{{site.machine_version}} && + $ base=https://github.com/docker/machine/releases/tag/v{{site.machine_version}} && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine && sudo install /tmp/docker-machine /usr/local/bin/docker-machine ``` - If you are running with **Windows** with [Git BASH](https://git-for-windows.github.io/){: target="_blank" class="_"}: + If you are running **Windows** with [Git BASH](https://git-for-windows.github.io/){: target="_blank" class="_"}: ```console - $ base=https://github.com/docker/machine/releases/download/v{{site.machine_version}} && + $ base=https://github.com/docker/machine/releases/tag/v{{site.machine_version}} && mkdir -p "$HOME/bin" && curl -L $base/docker-machine-Windows-x86_64.exe > "$HOME/bin/docker-machine.exe" && chmod +x "$HOME/bin/docker-machine.exe" diff --git a/machine/reference/create.md b/machine/reference/create.md index c0155db49a..9cbba0d10b 100644 --- a/machine/reference/create.md +++ b/machine/reference/create.md @@ -156,7 +156,7 @@ $ docker-machine create -d virtualbox \ foobarmachine ``` -This creates a virtual machine running locally in Virtualbox which uses the +This creates a virtual machine running locally in VirtualBox which uses the `overlay` storage backend, has the key-value pairs `foo=bar` and `spam=eggs` as labels on the engine, and allows pushing / pulling from the insecure registry located at `registry.myco.com`. You can verify much of this by inspecting the 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/network/macvlan.md b/network/macvlan.md index 7e9a23810c..e0f6c4013d 100644 --- a/network/macvlan.md +++ b/network/macvlan.md @@ -17,7 +17,7 @@ the Macvlan, as well as the subnet and gateway of the Macvlan. You can even isolate your Macvlan networks using different physical network interfaces. Keep the following things in mind: -- It is very easy to unintentionally damage your network due IP address +- It is very easy to unintentionally damage your network due to IP address exhaustion or to "VLAN spread", which is a situation in which you have an inappropriately large number of unique MAC addresses in your network. - Your networking equipment needs to be able to handle "promiscuous mode", diff --git a/network/network-tutorial-macvlan.md b/network/network-tutorial-macvlan.md index 79280842bc..31000e99b7 100644 --- a/network/network-tutorial-macvlan.md +++ b/network/network-tutorial-macvlan.md @@ -47,7 +47,7 @@ on your network, your container appears to be physically attached to the network my-macvlan-net ``` - You can use `docker network ls` and `docker network inspect pub_net` + You can use `docker network ls` and `docker network inspect my-macvlan-net` commands to verify that the network exists and is a `macvlan` network. 2. Start an `alpine` container and attach it to the `my-macvlan-net` network. The @@ -138,7 +138,7 @@ be physically attached to the network. my-8021q-macvlan-net ``` - You can use `docker network ls` and `docker network inspect pub_net` + You can use `docker network ls` and `docker network inspect my-8021q-macvlan-net` commands to verify that the network exists, is a `macvlan` network, and has parent `eth0.10`. You can use `ip addr show` on the Docker host to verify that the interface `eth0.10` exists and has a separate IP address diff --git a/network/network-tutorial-overlay.md b/network/network-tutorial-overlay.md index 164476f6c8..fd7dfb9751 100644 --- a/network/network-tutorial-overlay.md +++ b/network/network-tutorial-overlay.md @@ -88,7 +88,7 @@ and will be connected together using an overlay network called `ingress`. the `--advertise-addr` flag is optional. ```bash - $ docker swarm --join --token \ + $ docker swarm join --token \ --advertise-addr \ :2377 ``` @@ -97,7 +97,7 @@ and will be connected together using an overlay network called `ingress`. the `--advertise-addr` flag is optional. ```bash - $ docker swarm --join --token \ + $ docker swarm join --token \ --advertise-addr \ :2377 ``` @@ -623,7 +623,7 @@ need to have Docker installed and running. ping: bad address 'alpine2' ``` -7. Detach from `alpine2` without stopping it by using the detach sequence, +7. Detach from `alpine1` without stopping it by using the detach sequence, `CTRL` + `p` `CTRL` + `q` (hold down `CTRL` and type `p` followed by `q`). If you wish, attach to `alpine2` and repeat steps 4, 5, and 6 there, substituting `alpine1` for `alpine2`. diff --git a/notary/getting_started.md b/notary/getting_started.md index ddf08f0d79..3ec28f5170 100644 --- a/notary/getting_started.md +++ b/notary/getting_started.md @@ -35,7 +35,7 @@ enable Notary to run in a multi-tenant fashion, you must use this format when interacting with Docker Hub through the Notary client. When specifying Docker image names for the Notary client, the GUN format is: -- For official images (identifiable by the "Official Repository" moniker), the +- For official images (identifiable by the "Official Image" moniker), the image name as displayed on Docker Hub, prefixed with `docker.io/library/`. For example, if you would normally type `docker pull ubuntu` you must enter `notary {cmd} docker.io/library/ubuntu`. 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/reference/dtr/2.5/api/index.html b/reference/dtr/2.5/api/index.html new file mode 100644 index 0000000000..91abd52d94 --- /dev/null +++ b/reference/dtr/2.5/api/index.html @@ -0,0 +1,16 @@ + + + + + Docker Trusted Registry API Documentation + + + + +
                  + + + + + + diff --git a/reference/dtr/2.5/api/main.js b/reference/dtr/2.5/api/main.js new file mode 100644 index 0000000000..3bb1091a50 --- /dev/null +++ b/reference/dtr/2.5/api/main.js @@ -0,0 +1,21 @@ +window.onload = function() { + + // Build a system + const ui = SwaggerUIBundle({ + spec: +{"swagger":"2.0","info":{"description":"Docker Trusted Registry has an experimental API that you can use to manage\nDTR repositories, permissions, and settings.\n\n**This API is experimental and subject to change, which could affect future\nbackwards compatibility.**\n\nYou can authenticate your requests by using an authentication token. In the\nDTR web UI, navigate to your user profile and choose **Access tokens** to\ncreate a new token. The authentication token issued will have the same\npermissions your user has.\n\nTo authenticate your requests, use HTTP basic authentication to pass the\nauthentication token to the DTR API. Here's an example:\n\n```\ncurl -sL -u {user}:{token} /api/v0/repositories\n```\n","title":"Docker Trusted Registry","version":"2.5.0"},"paths":{"/api/v0/accounts/language":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["accounts"],"summary":"Get the chosen language","operationId":"GetLanguage","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.Language"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.Language"}}}}},"/api/v0/accounts/{namespace}":{"delete":{"description":"\n\t*Authorization:* Client must be authenticated as a system admin.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["accounts"],"summary":"Removes a user or organization along with all repositories","operationId":"DeleteNamespace","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true}],"responses":{"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_ACCOUNT: An account with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/accounts/{namespace}/repositories":{"delete":{"description":"\n\t*Authorization:* Client must be authenticated as a system admin, organization admin or user in question\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["accounts"],"summary":"Removes all of a user or organization's repositories","operationId":"DeleteNamespaceRepositories","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true}],"responses":{"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_ACCOUNT: An account with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/accounts/{namespace}/webhooks":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["accounts"],"summary":"List the webhook subscriptions for a namespace","operationId":"ListNamespaceWebhooks","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Webhook"}}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_ACCOUNT: An account with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Webhook"}}}}}},"/api/v0/accounts/{orgname}/teams/{teamname}/repositoryAccess":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who owns the organization the team is in or be a member of that team.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["accounts"],"summary":"List repository access grants for a team","operationId":"ListTeamRepoAccess","parameters":[{"type":"string","description":"organization account name","name":"orgname","in":"path","required":true},{"type":"string","description":"team name","name":"teamname","in":"path","required":true},{"type":"string","description":"The ID of the first record on the page","name":"pageStart","in":"query"},{"type":"integer","default":10,"description":"Maximum number of results to return","name":"pageSize","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the resource count in the response header","name":"count","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.ListTeamRepoAccess"}},"400":{"description":"the team does not belong to the organization"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_TEAM: A team with the given name does not exist in the organization."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.ListTeamRepoAccess"}}}}},"/api/v0/accounts/{username}/repositoryAccess/{namespace}/{reponame}":{"get":{"description":"\n\t*Authorization:* Client must be authenticated either as the user in question or be a system admin.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["accounts"],"summary":"Check a user's access to a repository","operationId":"GetUserRepoAccess","parameters":[{"type":"string","description":"user account name","name":"username","in":"path","required":true},{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.RepoUserAccess"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_REPOSITORY: A repository with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.RepoUserAccess"}}}}},"/api/v0/accounts/{username}/settings":{"get":{"description":"\n*Authorization:* Client must be authenticated either as the user in question or be a system admin.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["accounts"],"summary":"Check a user's settings","operationId":"GetUserSettings","parameters":[{"type":"string","description":"user account name","name":"username","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.UserSettings"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_USER: A user with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.UserSettings"}}}},"patch":{"description":"\n*Authorization:* Client must be authenticated either as the user in question or be a system admin.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["accounts"],"summary":"Update a user's settings","operationId":"UpdateUserSettings","parameters":[{"type":"string","description":"user account name","name":"username","in":"path","required":true},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.UserSettings"}}],"responses":{"200":{"description":"Successfully updated user settings."},"400":{"description":"INVALID_USER_SETTINGS: The submitted user settings change request contains invalid values."},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_USER: A user with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully updated user settings."}}}},"/api/v0/action_configs":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["action_configs"],"summary":"List all action configs","operationId":"ListActionConfigs","responses":{"200":{"description":"Success, list of action configs returned.","schema":{"$ref":"#/definitions/tmpresponses.ActionConfigs"}},"default":{"description":"Success, list of action configs returned.","schema":{"$ref":"#/definitions/tmpresponses.ActionConfigs"}}}},"post":{"consumes":["application/json"],"produces":["application/json"],"tags":["action_configs"],"summary":"Configure actions","operationId":"UpdateActionConfig","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/tmpforms.ActionConfigCreate"}}],"responses":{"202":{"description":"Success.","schema":{"$ref":"#/definitions/tmpresponses.ActionConfig"}}}}},"/api/v0/action_configs/{action}":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["action_configs"],"summary":"Get info about the actionConfig with the given action","operationId":"GetActionConfig","parameters":[{"type":"string","description":"name of action to fetch the config for","name":"action","in":"path","required":true}],"responses":{"200":{"description":"Success, action config info returned.","schema":{"$ref":"#/definitions/tmpresponses.ActionConfig"}},"default":{"description":"Success, action config info returned.","schema":{"$ref":"#/definitions/tmpresponses.ActionConfig"}}}},"delete":{"consumes":["application/json"],"produces":["application/json"],"tags":["action_configs"],"summary":"Delete the action config. The defaults will be used.","operationId":"DeleteActionConfig","parameters":[{"type":"string","description":"the name of the action to delete the config for","name":"action","in":"path","required":true}],"responses":{"204":{"description":"Success, action config has been deleted."}}}},"/api/v0/api_tokens":{"get":{"description":"listUserAPITokensHandler","consumes":["application/json"],"produces":["application/json"],"tags":["API_tokens"],"summary":"Get all API tokens associated with user. Get all tokens if no user is not specified","operationId":"GetAllAPITokensByUser","parameters":[{"type":"string","description":"The ID of the first record on the page","name":"pageStart","in":"query"},{"type":"integer","default":10,"description":"Maximum number of results to return","name":"pageSize","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the resource count in the response header","name":"count","in":"query"},{"type":"string","description":"Limit the API token results to a specific user","name":"username","in":"query"}],"responses":{"200":{"description":"Successfully retrieved API tokens","schema":{"type":"array","items":{"$ref":"#/definitions/responses.APIToken"}}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_USER: A user with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully retrieved API tokens","schema":{"type":"array","items":{"$ref":"#/definitions/responses.APIToken"}}}}},"post":{"description":"createAPITokenHandler","consumes":["application/json"],"produces":["application/json"],"tags":["API_tokens"],"summary":"Create a new API token","operationId":"CreateAnAPIToken","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.CreateAPIToken"}},{"type":"string","description":"Limit the API token results to a specific user","name":"username","in":"query"}],"responses":{"200":{"description":"Successfully created API token","schema":{"$ref":"#/definitions/responses.NewAPIToken"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully created API token","schema":{"$ref":"#/definitions/responses.NewAPIToken"}}}},"delete":{"description":"cleanupAPITokenHleanupHandler","consumes":["application/json"],"produces":["application/json"],"tags":["API_tokens"],"summary":"Mass deletion of API tokens from database based on user, time created, and/or generation method","operationId":"APITokenCleanup","parameters":[{"type":"string","description":"Limit the API token results to a specific user","name":"username","in":"query"},{"type":"string","description":"The date on which the token was last used","name":"usedbefore","in":"query"},{"type":"string","default":"auto","description":"The method by which the token was created","name":"generatedby","in":"query"}],"responses":{"200":{"description":"Successfully cleaned up API tokens"},"400":{"description":"INVALID_PARAMETERS: Unable to parse query parameters"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_USER: A user with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully cleaned up API tokens"}}}},"/api/v0/api_tokens/{hashedtoken}":{"get":{"description":"getAPITokenHandler","consumes":["application/json"],"produces":["application/json"],"tags":["API_tokens"],"summary":"Get an API token's information based on it's token id","operationId":"GetAnAPIToken","parameters":[{"type":"string","description":"API token id","name":"hashedtoken","in":"path","required":true}],"responses":{"200":{"description":"Successfully retrieved API token","schema":{"$ref":"#/definitions/responses.APIToken"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_API_TOKEN: An API token with the id name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully retrieved API token","schema":{"$ref":"#/definitions/responses.APIToken"}}}},"delete":{"description":"deleteAPITokenHandler","consumes":["application/json"],"produces":["application/json"],"tags":["API_tokens"],"summary":"Delete a specific API token","operationId":"DeleteAnAPIToken","parameters":[{"type":"string","description":"API token id","name":"hashedtoken","in":"path","required":true}],"responses":{"200":{"description":"Successfully deleted API token"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_API_TOKEN: An API token with the id name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully deleted API token"}}},"patch":{"description":"updateAPITokenHandler","consumes":["application/json"],"produces":["application/json"],"tags":["API_tokens"],"summary":"Update information about a specific API token","operationId":"UpdateAnAPIToken","parameters":[{"type":"string","description":"API token id","name":"hashedtoken","in":"path","required":true},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.UpdateAPIToken"}}],"responses":{"200":{"description":"Successfully updated API tokens","schema":{"$ref":"#/definitions/responses.APIToken"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_API_TOKEN: An API token with the id name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully updated API tokens","schema":{"$ref":"#/definitions/responses.APIToken"}}}}},"/api/v0/content_caches":{"get":{"description":"\n*Authorization:* Client must be authenticated as any active user in the system.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["content_caches"],"summary":"List all content caches","operationId":"ListContentCaches","responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.ContentCache"}}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.ContentCache"}}}}},"post":{"description":"\n*Authorization:* Client must be authenticated an admin.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["content_caches"],"summary":"Create content cache","operationId":"CreateContentCache","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.CreateContentCache"}}],"responses":{"201":{"description":"success","schema":{"$ref":"#/definitions/responses.ContentCache"}},"400":{"description":"invalid content cache details"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/content_caches/{contentcacheuuid}":{"get":{"description":"\n*Authorization:* Client must be authenticated as any active user in the system.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["content_caches"],"summary":"View details of a content cache","operationId":"GetContentCache","parameters":[{"type":"string","description":"uuid of content cache","name":"contentcacheuuid","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.ContentCache"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_CONTENT_CACHE: A content cache with the given uuid does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.ContentCache"}}}},"delete":{"description":"\n*Authorization:* Client must be authenticated an admin.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["content_caches"],"summary":"Remove a content cache","operationId":"DeleteContentCache","parameters":[{"type":"string","description":"uuid of content cache","name":"contentcacheuuid","in":"path","required":true}],"responses":{"204":{"description":"success or content cache does not exist"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_CONTENT_CACHE: A content cache with the given uuid does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/crons":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["crons"],"summary":"List all crons","operationId":"ListCrons","responses":{"200":{"description":"Success, list of crons returned.","schema":{"$ref":"#/definitions/tmpresponses.Crons"}},"default":{"description":"Success, list of crons returned.","schema":{"$ref":"#/definitions/tmpresponses.Crons"}}}},"post":{"consumes":["application/json"],"produces":["application/json"],"tags":["crons"],"summary":"Create / update a periodic task","operationId":"UpdateCron","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/tmpforms.CronCreate"}}],"responses":{"202":{"description":"Success.","schema":{"$ref":"#/definitions/tmpresponses.Cron"}}}}},"/api/v0/crons/{action}":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["crons"],"summary":"Get info about the cron with the given action","operationId":"GetCron","parameters":[{"type":"string","description":"action of the cron to fetch","name":"action","in":"path","required":true}],"responses":{"200":{"description":"Success, cron info returned.","schema":{"$ref":"#/definitions/tmpresponses.Cron"}},"default":{"description":"Success, cron info returned.","schema":{"$ref":"#/definitions/tmpresponses.Cron"}}}},"delete":{"consumes":["application/json"],"produces":["application/json"],"tags":["crons"],"summary":"Delete the cron. Jobs created from it will not be canceled.","operationId":"DeleteCron","parameters":[{"type":"string","description":"action of cron to delete","name":"action","in":"path","required":true}],"responses":{"204":{"description":"Success, cron has been deleted."}}}},"/api/v0/events":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["events"],"summary":"Get Events","operationId":"GetEvents","parameters":[{"type":"string","description":"The ID of the first record on the page","name":"pageStart","in":"query"},{"type":"integer","default":10,"description":"Maximum number of results to return","name":"pageSize","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the resource count in the response header","name":"count","in":"query"},{"type":"string","name":"publishedBefore","in":"query"},{"type":"string","name":"publishedAfter","in":"query"},{"type":"string","description":"UUID of the user or organization that performed the event","name":"actorId","in":"query"},{"type":"string","description":"Type of events to filter by","name":"eventType","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.Events"}},"400":{"description":"INVALID_PARAMETERS: Unable to parse query parameters"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.Events"}}}}},"/api/v0/imagescan/layeroverride":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["imagescan"],"summary":"Gets a list of all the available overrides","operationId":"GetLayerVulnOverrides","responses":{"200":{"description":"Successfully set vulnerability override","schema":{"type":"array","items":{"$ref":"#/definitions/responses.LayerVulnOverride"}}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"500":{"description":"INTERNAL_ERROR: An internal server error occurred. Contact a system administrator for more information."},"default":{"description":"Successfully set vulnerability override","schema":{"type":"array","items":{"$ref":"#/definitions/responses.LayerVulnOverride"}}}}}},"/api/v0/imagescan/layeroverride/{layerid}":{"post":{"consumes":["application/json"],"produces":["application/json"],"tags":["imagescan"],"summary":"Sets a vulnerability override for the given layer","operationId":"SetLayerVulnOverride","parameters":[{"type":"string","description":"layer id","name":"layerid","in":"path","required":true},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.VulnOverrideOption"}}],"responses":{"200":{"description":"Successfully set vulnerability override"},"400":{"description":"INVALID_SETTINGS: The submitted settings change request contains invalid values."},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"404":{"description":"NO_SUCH_LAYER: A layer with the given sha does not exist in the repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"500":{"description":"INTERNAL_ERROR: An internal server error occurred. Contact a system administrator for more information."},"default":{"description":"Successfully set vulnerability override"}}}},"/api/v0/imagescan/layeroverride/{vulnerabilityid}":{"delete":{"consumes":["application/json"],"produces":["application/json"],"tags":["imagescan"],"summary":"Deletes a layer vulnerability override","operationId":"DeleteLayerVulnOverride","parameters":[{"type":"string","description":"vulnerability id","name":"vulnerabilityid","in":"path","required":true}],"responses":{"200":{"description":"OK"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"404":{"description":"NO_SUCH_LAYER: A layer with the given sha does not exist in the repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK"}}}},"/api/v0/imagescan/repositories/{namespace}/{reponame}/{tag}":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["imagescan"],"summary":"Get the summary info on a namespace/repo:tag","operationId":"GetSummaryByManifestDigest","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"tag name","name":"tag","in":"path","required":true},{"type":"boolean","default":true,"description":"Whether to include detailed summary results","name":"detailed","in":"query"},{"type":"string","description":"Operating system of the tag","name":"os","in":"query"},{"type":"string","description":"Architecture of the tag","name":"arch","in":"query"}],"responses":{"200":{"description":"Successfully retrieved summary.","schema":{"type":"array","items":{"$ref":"#/definitions/responses.OldScanSummary"}}},"400":{"description":"SCANNING_NOT_ENABLED: Scanning is not enabled"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"404":{"description":"NO_SUCH_TAG: A tag with the given name does not exist for the given repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully retrieved summary.","schema":{"type":"array","items":{"$ref":"#/definitions/responses.OldScanSummary"}}}}}},"/api/v0/imagescan/scan":{"post":{"consumes":["application/json"],"produces":["application/json"],"tags":["imagescan"],"summary":"Do a scan or a scan/check of all layers","operationId":"ScanAllLayers","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.ScanOptions"}}],"responses":{"200":{"description":"Successfully submitted all layers to jobrunner for scan/check."},"400":{"description":"SCANNING_NOT_ENABLED: Scanning is not enabled"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully submitted all layers to jobrunner for scan/check."}}}},"/api/v0/imagescan/scan/update":{"put":{"consumes":["multipart/form-data","application/json"],"produces":["application/json"],"tags":["imagescan"],"summary":"Update the vulnerability database for security scanning","operationId":"UpdateVulnDB","parameters":[{"type":"file","description":"Upload file to init database","name":"file","in":"formData"},{"type":"boolean","default":false,"description":"Init or update vuln db in online mode.","name":"online","in":"query"}],"responses":{"200":{"description":"Successfully started to updated vulnerability DB."},"400":{"description":"SCANNING_DB_NOT_READY: Scanning DB is not ready"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully started to updated vulnerability DB."}}}},"/api/v0/imagescan/scan/{namespace}/{reponame}/{tag}/{os}/{arch}":{"post":{"consumes":["application/json"],"produces":["application/json"],"tags":["imagescan"],"summary":"Do a scan or a scan/check of given image","operationId":"ScanImage","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"tag name","name":"tag","in":"path","required":true},{"type":"string","description":"operating system of the tag","name":"os","in":"path","required":true},{"type":"string","description":"architecture of the tag","name":"arch","in":"path","required":true}],"responses":{"200":{"description":"Successfully submitted image to jobrunner for scan/check."},"400":{"description":"SCANNING_NOT_ENABLED: Scanning is not enabled"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"404":{"description":"NO_SUCH_TAG: A tag with the given name does not exist for the given repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully submitted image to jobrunner for scan/check."}}}},"/api/v0/imagescan/scansummary/component/{component}":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["imagescan"],"summary":"Get the image by component","operationId":"GetScannedImageByComponent","parameters":[{"type":"string","description":"component","name":"component","in":"path","required":true},{"type":"string","description":"The ID of the first record on the page","name":"pageStart","in":"query"},{"type":"integer","default":10,"description":"Maximum number of results to return","name":"pageSize","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the resource count in the response header","name":"count","in":"query"},{"type":"boolean","default":true,"description":"Whether to include scan status summary results","name":"scanstatus","in":"query"}],"responses":{"200":{"description":"Successfully retrieved images","schema":{"type":"array","items":{"$ref":"#/definitions/responses.ScanSummary"}}},"400":{"description":"SCANNING_NOT_ENABLED: Scanning is not enabled"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"404":{"description":"NO_SUCH_TAG: A tag with the given name does not exist for the given repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully retrieved images","schema":{"type":"array","items":{"$ref":"#/definitions/responses.ScanSummary"}}}}}},"/api/v0/imagescan/scansummary/cve/{cve}":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["imagescan"],"summary":"Get the image by CVE","operationId":"GetScannedImageByCVE","parameters":[{"type":"string","description":"cve","name":"cve","in":"path","required":true},{"type":"string","description":"The ID of the first record on the page","name":"pageStart","in":"query"},{"type":"integer","default":10,"description":"Maximum number of results to return","name":"pageSize","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the resource count in the response header","name":"count","in":"query"},{"type":"boolean","default":true,"description":"Whether to include scan status summary results","name":"scanstatus","in":"query"}],"responses":{"200":{"description":"Successfully retrieved images","schema":{"type":"array","items":{"$ref":"#/definitions/responses.ScanSummary"}}},"400":{"description":"SCANNING_NOT_ENABLED: Scanning is not enabled"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"404":{"description":"NO_SUCH_TAG: A tag with the given name does not exist for the given repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully retrieved images","schema":{"type":"array","items":{"$ref":"#/definitions/responses.ScanSummary"}}}}}},"/api/v0/imagescan/scansummary/layer/{layerid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["imagescan"],"summary":"Get the image by layer sha","operationId":"GetScannedImageByLayer","parameters":[{"type":"string","description":"layer id","name":"layerid","in":"path","required":true},{"type":"string","description":"The ID of the first record on the page","name":"pageStart","in":"query"},{"type":"integer","default":10,"description":"Maximum number of results to return","name":"pageSize","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the resource count in the response header","name":"count","in":"query"},{"type":"boolean","default":true,"description":"Whether to include scan status summary results","name":"scanstatus","in":"query"}],"responses":{"200":{"description":"Successfully retrieved images","schema":{"type":"array","items":{"$ref":"#/definitions/responses.ScanSummary"}}},"400":{"description":"SCANNING_NOT_ENABLED: Scanning is not enabled"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"404":{"description":"NO_SUCH_LAYER: A layer with the given sha does not exist in the repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully retrieved images","schema":{"type":"array","items":{"$ref":"#/definitions/responses.ScanSummary"}}}}}},"/api/v0/imagescan/scansummary/license/{license}":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["imagescan"],"summary":"Get the image by license","operationId":"GetScannedImageByLicense","parameters":[{"type":"string","description":"license","name":"license","in":"path","required":true},{"type":"string","description":"The ID of the first record on the page","name":"pageStart","in":"query"},{"type":"integer","default":10,"description":"Maximum number of results to return","name":"pageSize","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the resource count in the response header","name":"count","in":"query"},{"type":"boolean","default":true,"description":"Whether to include scan status summary results","name":"scanstatus","in":"query"}],"responses":{"200":{"description":"Successfully retrieved images","schema":{"type":"array","items":{"$ref":"#/definitions/responses.ScanSummary"}}},"400":{"description":"SCANNING_NOT_ENABLED: Scanning is not enabled"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"404":{"description":"NO_SUCH_TAG: A tag with the given name does not exist for the given repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully retrieved images","schema":{"type":"array","items":{"$ref":"#/definitions/responses.ScanSummary"}}}}}},"/api/v0/imagescan/scansummary/repositories/{namespace}/{reponame}/{tag}":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["imagescan"],"summary":"Get the scan summary info on a namespace/repo:tag","operationId":"GetScanSummary","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"tag name","name":"tag","in":"path","required":true},{"type":"boolean","default":true,"description":"Whether to include scan status summary results","name":"scanstatus","in":"query"},{"type":"string","description":"Operating system of the tag","name":"os","in":"query"},{"type":"string","description":"Architecture of the tag","name":"arch","in":"query"}],"responses":{"200":{"description":"Successfully retrieved summary.","schema":{"type":"array","items":{"$ref":"#/definitions/responses.ScanSummary"}}},"400":{"description":"SCANNING_NOT_ENABLED: Scanning is not enabled"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"404":{"description":"NO_SUCH_TAG: A tag with the given name does not exist for the given repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully retrieved summary.","schema":{"type":"array","items":{"$ref":"#/definitions/responses.ScanSummary"}}}}}},"/api/v0/imagescan/status":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["imagescan"],"summary":"Get the status and version of scanning service","operationId":"GetNautilusDBStatus","responses":{"200":{"description":"Successfully retrieved DB status","schema":{"$ref":"#/definitions/responses.NautilusStatus"}},"400":{"description":"SCANNING_NOT_ENABLED: Scanning is not enabled"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully retrieved DB status","schema":{"$ref":"#/definitions/responses.NautilusStatus"}}}}},"/api/v0/index/autocomplete":{"get":{"description":"\nRepository results will be filtered to only those repositories visible to the client. Account results will not be filtered.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["index"],"summary":"Autocompletion for repositories and/or accounts","operationId":"Autocomplete","parameters":[{"type":"string","description":"Autocomplete query","name":"query","in":"query","required":true},{"type":"boolean","default":true,"description":"Whether to include repositories in the response","name":"includeRepositories","in":"query"},{"type":"boolean","default":true,"description":"Whether to include accounts in the response","name":"includeAccounts","in":"query"},{"type":"string","description":"Exact repository namespace to limit results to.","name":"namespace","in":"query"},{"type":"number","default":25,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.Autocomplete"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.Autocomplete"}}}}},"/api/v0/index/dockersearch":{"get":{"description":"\nThis is used for the Docker CLI's docker search command. Repository results will be filtered to only those repositories visible to the client.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["index"],"summary":"Search Docker repositories","operationId":"Docker Search","parameters":[{"type":"string","description":"Search query","name":"q","in":"query","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.DockerSearch"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.DockerSearch"}}}}},"/api/v0/jobs":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["jobs"],"summary":"List all jobs ordered by most recently scheduled","operationId":"ListJobs","parameters":[{"type":"string","default":"any","description":"Filter jobs by action.","name":"action","in":"query"},{"type":"string","default":"any","description":"Filter jobs by worker ID.","name":"worker","in":"query"},{"type":"string","default":"any","description":"Show only jobs that are running.","name":"running","in":"query"},{"type":"integer","default":0,"description":"Return most recently scheduled jobs starting from this offset index.","name":"start","in":"query"},{"type":"integer","default":10,"description":"Maximum number of jobs per page of results.","name":"limit","in":"query"}],"responses":{"200":{"description":"Success, list of jobs returned.","schema":{"$ref":"#/definitions/tmpresponses.Jobs"}},"default":{"description":"Success, list of jobs returned.","schema":{"$ref":"#/definitions/tmpresponses.Jobs"}}}},"post":{"consumes":["application/json"],"produces":["application/json"],"tags":["jobs"],"summary":"Schedule a job to be run immediately","operationId":"CreateJob","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/tmpforms.JobSubmission"}}],"responses":{"202":{"description":"Success, job waiting to be claimed.","schema":{"$ref":"#/definitions/tmpresponses.Job"}}}}},"/api/v0/jobs/{jobID}":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["jobs"],"summary":"Get info about the job with the given ID","operationId":"GetJob","parameters":[{"type":"string","description":"ID of job to fetch","name":"jobID","in":"path","required":true}],"responses":{"200":{"description":"Success, job info returned.","schema":{"$ref":"#/definitions/tmpresponses.Job"}},"default":{"description":"Success, job info returned.","schema":{"$ref":"#/definitions/tmpresponses.Job"}}}},"delete":{"consumes":["application/json"],"produces":["application/json"],"tags":["jobs"],"summary":"Signal this job's worker to cancel and delete the job","operationId":"DeleteJobs","parameters":[{"type":"string","description":"ID of job to delete","name":"jobID","in":"path","required":true}],"responses":{"204":{"description":"Success, job has been deleted."}}}},"/api/v0/jobs/{jobID}/cancel":{"post":{"consumes":["application/json"],"produces":["application/json"],"tags":["jobs"],"summary":"Signal this job's worker to cancel the job","operationId":"CancelJob","parameters":[{"type":"string","description":"ID of job to cancel","name":"jobID","in":"path","required":true}],"responses":{"204":{"description":"Success, job has been canceled."}}}},"/api/v0/jobs/{jobID}/logs":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["jobs"],"summary":"Retrieve logs for this job from its worker","operationId":"GetJobLogs","parameters":[{"type":"string","description":"ID of job whose logs to retrieve","name":"jobID","in":"path","required":true},{"type":"boolean","default":false,"description":"t/f: stream new logs","name":"stream","in":"query"},{"type":"integer","default":0,"description":"Line number to start from","name":"offset","in":"query"},{"type":"integer","default":0,"description":"Number of lines to return if not streaming","name":"limit","in":"query"}],"responses":{"200":{"description":"Success, job's logs returned.","schema":{"type":"array","items":{"$ref":"#/definitions/tmpresponses.JobLog"}}},"default":{"description":"Success, job's logs returned.","schema":{"type":"array","items":{"$ref":"#/definitions/tmpresponses.JobLog"}}}}}},"/api/v0/meta/cluster_status":{"get":{"description":"\n*Authorization:* Client must be authenticated an admin.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["meta"],"summary":"Get cluster status","operationId":"GetClusterStatus","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.ClusterStatus"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.ClusterStatus"}}}}},"/api/v0/meta/features":{"get":{"description":"\n*Authorization:* Client must be authenticated as any active user in the system\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["meta"],"summary":"Get features","operationId":"GetFeatures","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.Features"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.Features"}}}}},"/api/v0/meta/settings":{"get":{"description":"\n*Authorization:* Client must be authenticated an admin.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["meta"],"summary":"Get settings","operationId":"GetSettings","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.Settings"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.Settings"}}}},"post":{"description":"\n*Authorization:* Client must be authenticated an admin.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["meta"],"summary":"Update settings","operationId":"UpdateSettings","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.Settings"}}],"responses":{"202":{"description":"success"},"400":{"description":"INVALID_SETTINGS: The submitted settings change request contains invalid values."},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/remote/registry":{"post":{"description":"\n*Authorization:* Client must be authenticated as any active user in the system. Credentials provided in the request body must be for an active user in the remote system.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["remote"],"summary":"Create a check for connection status of remote registry","operationId":"CreateRemoteRegistryCheck","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.CreateRemoteRegistryCheck"}}],"responses":{"201":{"description":"success","schema":{"$ref":"#/definitions/responses.RemoteRegistryCheck"}},"400":{"description":"REMOTE_REGISTRY_INVALID_PERMISSIONS: Remote user not authorized to access the requested resource."},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/repositories":{"get":{"description":"\n*Authorization:* Client must be authenticated as any active user in the system. Results will be filtered to only those repositories visible to the client.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"List all repositories","operationId":"ListRepositories","parameters":[{"type":"string","description":"The ID of the first record on the page","name":"pageStart","in":"query"},{"type":"integer","default":10,"description":"Maximum number of results to return","name":"pageSize","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the resource count in the response header","name":"count","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.Repositories"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.Repositories"}}}}},"/api/v0/repositories/scan/toggle":{"post":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" access to the repository\n(i.e., user owns the repo or is a member of a team with \"admin\" level access to the organization\"s repository).\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Toggles scan on push for all repositories","operationId":"ToggleAllRepositoriesScanOnPush","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.ToggleScanOnPush"}}],"responses":{"200":{"description":"Successfully toggled scan on push for all repositories."},"400":{"description":"INVALID_JSON: Unable to parse JSON"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"Successfully toggled scan on push for all repositories."}}}},"/api/v0/repositories/{namespace}":{"get":{"description":"\n*Authorization:* Client must be authenticated as any active user in the system. Results will be filtered to only those repositories visible to the client.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"List repositories in a namespace","operationId":"ListNamespaceRepositories","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"The ID of the first record on the page","name":"pageStart","in":"query"},{"type":"integer","default":10,"description":"Maximum number of results to return","name":"pageSize","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the resource count in the response header","name":"count","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.Repositories"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"404":{"description":"NO_SUCH_ACCOUNT: An account with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.Repositories"}}}},"post":{"description":"\n*Authorization:* Client must be authenticated as a user who has admin access to the\nrepository namespace (i.e., user owns the repo or is a member of a team with\n\"admin\" level access to the organization's namespace of repositories).\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Create repository","operationId":"CreateRepository","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.CreateRepo"}}],"responses":{"201":{"description":"success","schema":{"$ref":"#/definitions/responses.Repository"}},"400":{"description":"REPOSITORY_EXISTS: A repository with the same name already exists."},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_ACCOUNT: An account with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/repositories/{namespace}/{reponame}":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has visibility to the repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"View details of a repository","operationId":"GetRepository","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.Repository"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"404":{"description":"NO_SUCH_REPOSITORY: A repository with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.Repository"}}}},"delete":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" access to the repository\n(i.e., user owns the repo or is a member of a team with \"admin\" level access to the organization\"s repository).\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Remove a repository","operationId":"DeleteRepository","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"The domain used to push tags to DTR. Must be set to obtain/manipulate Notary related information","name":"domain","in":"query"}],"responses":{"204":{"description":"success or repository does not exist"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_REPOSITORY: A repository with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}},"patch":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" access to the repository\n(i.e., user owns the repo or is a member of a team with \"admin\" level access to the organization\"s repository).\n\nNote that a repository cannot be renamed this way.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Update details of a repository","operationId":"PatchRepository","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.UpdateRepo"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.Repository"}},"400":{"description":"INVALID_REPOSITORY_VISIBILITY: The visibility value of the repository is invalid."},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_REPOSITORY: A repository with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.Repository"}}}}},"/api/v0/repositories/{namespace}/{reponame}/manifests":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has visibility to the repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"List the available manifests for a repository","operationId":"ListRepoManifests","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"The ID of the first record on the page","name":"pageStart","in":"query"},{"type":"integer","default":10,"description":"Maximum number of results to return","name":"pageSize","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the resource count in the response header","name":"count","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Manifest"}}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"404":{"description":"NO_SUCH_REPOSITORY: A repository with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Manifest"}}}}}},"/api/v0/repositories/{namespace}/{reponame}/manifests/{reference}":{"delete":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"write\" level access to the repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Delete a manifest for a repository","operationId":"DeleteRepoManifest","deprecated":true,"parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"digest or tag for an image manifest","name":"reference","in":"path","required":true}],"responses":{"204":{"description":"success"},"400":{"description":"INVALID_DIGEST: The given digest is invalid."},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_MANIFEST: A manifest with the given reference does not exist for the given repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/repositories/{namespace}/{reponame}/pollMirroringPolicies":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has visibility to local repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"List the poll mirroring policies for a repository","operationId":"ListRepoPollMirroringPolicies","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.PollMirroringPolicy"}}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_REPOSITORY: A repository with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.PollMirroringPolicy"}}}}},"post":{"description":"*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the local repository and credentials to the remote repository.","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Create a poll mirroring policy for a repository","operationId":"CreateRepoPollMirroringPolicy","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"boolean","default":true,"description":"Whether to evaluate the policy on creation","name":"initialEvaluation","in":"query"},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.CreatePollMirroringPolicy"}}],"responses":{"201":{"description":"success","schema":{"$ref":"#/definitions/responses.PollMirroringPolicy"}},"400":{"description":"REMOTE_REGISTRY_INVALID_PERMISSIONS: Remote user not authorized to access the requested resource."},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"INVALID_POLL_MIRRORING_POLICY: The given poll mirroring policy is invalid."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/repositories/{namespace}/{reponame}/pollMirroringPolicies/{pollmirroringpolicyid}":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has visibility to the local repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Retrieve a specific poll mirroring policy for a repository","operationId":"GetRepoPollMirroringPolicy","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"poll mirroring policy id","name":"pollmirroringpolicyid","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.PollMirroringPolicy"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_POLL_MIRRORING_POLICY: A poll mirroring policy with the given id does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.PollMirroringPolicy"}}}},"put":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the local repository and credentials to the remote repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Updates a specific poll mirroring policy for a repository","operationId":"UpdateRepoPollMirroringPolicy","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"poll mirroring policy id","name":"pollmirroringpolicyid","in":"path","required":true},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.UpdatePollMirroringPolicy"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.PollMirroringPolicy"}},"400":{"description":"REMOTE_REGISTRY_INVALID_PERMISSIONS: Remote user not authorized to access the requested resource."},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"INVALID_POLL_MIRRORING_POLICY: The given poll mirroring policy is invalid."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.PollMirroringPolicy"}}}},"delete":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the local repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Deletes a specific poll mirroring policy for a repository","operationId":"DeleteRepoPollMirroringPolicy","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"poll mirroring policy id","name":"pollmirroringpolicyid","in":"path","required":true}],"responses":{"204":{"description":"success or poll mirroring policy does not exist"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_POLL_MIRRORING_POLICY: A poll mirroring policy with the given id does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/repositories/{namespace}/{reponame}/promotionPolicies":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has visibility to the source or target repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"List the promotion policies for a repository","operationId":"ListRepoPromotionPolicies","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"boolean","default":true,"description":"Whether to list promotion policies for a repository as a source or destination.","name":"source","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.PromotionPolicy"}}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_REPOSITORY: A repository with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.PromotionPolicy"}}}}},"post":{"description":"*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the source and target repository.\nRules for the policy can be on the following fields and their respective operators:\n- \"tag\"\n\t- \"eq\": equals\n\t- \"sw\": starts with\n\t- \"ew\": ends with\n\t- \"c\": contains\n\t- \"oo\": one of\n\t- \"noo\": not one of\n- \"license.name\"\n\t- \"oo\": one of\n\t- \"noo\": not one of\n- \"package.name\"\n\t- \"oo\": one of\n\t- \"noo\": not one of\n- \"vulnerability_all\"\n\t- \"gte\": greater than or equals\n\t- \"gt\": greater than\n\t- \"eq\": equals\n\t- \"neq\": not equals\n\t- \"lte\": less than or equals\n\t- \"lt\": less than\n- \"vulnerability_critical\"\n\t- \"gte\": greater than or equals\n\t- \"gt\": greater than\n\t- \"eq\": equals\n\t- \"neq\": not equals\n\t- \"lte\": less than or equals\n\t- \"lt\": less than\n- \"vulnerability_major\"\n\t- \"gte\": greater than or equals\n\t- \"gt\": greater than\n\t- \"eq\": equals\n\t- \"neq\": not equals\n\t- \"lte\": less than or equals\n\t- \"lt\": less than\n- \"vulnerability_minor\"\n\t- \"gte\": greater than or equals\n\t- \"gt\": greater than\n\t- \"eq\": equals\n\t- \"neq\": not equals\n\t- \"lte\": less than or equals\n\t- \"lt\": less than\n\nThe tag template is used to rename the tag in the target repository. The\nfollowing symbols are allowed:\n- \"%n\": The tag to promote (e.g. 1, 4.5, latest)\n- \"%A\": Day of the week (e.g. Sunday, Monday)\n- \"%a\": Day of the week, abbreviated (e.g. Sun, Mon , Tue)\n- \"%w\": Day of the week, as a number (e.g. 0, 1, 6)\n- \"%d\": Number for the day of the month (e.g. 01, 15, 31)\n- \"%B\": Month (e.g. January, December)\n- \"%b\": Month, abbreviated (e.g. Jan, Jun, Dec)\n- \"%m\": Month, as a number (e.g. 01, 06, 12)\n- \"%Y\": Year (e.g. 1999, 2015, 2048)\n- \"%y\": Year, two digits (e.g. 99, 15, 48)\n- \"%H\": Hour, in 24 hour format (e.g. 00, 12, 23)\n- \"%I\": Hour, in 12 hour format (e.g. 01, 10, 10)\n- \"%p\": Period of the day (e.g. AM, PM)\n- \"%M\": Minute (e.g. 00, 10, 59)\n- \"%S\": Second (e.g. 00, 10, 59)\n- \"%f\": Microsecond (e.g. 000000, 999999)\n- \"%Z\": Name for the timezone (e.g. UTC, PST, EST)\n- \"%j\": Day of the year (e.g. 001, 200, 366)\n- \"%W\": Week of the year (e.g. 00, 10 , 53)\n","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Create a promotion policy for a repository","operationId":"CreateRepoPromotionPolicy","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"boolean","default":true,"description":"Whether to evaluate the policy on creation","name":"initialEvaluation","in":"query"},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.CreatePromotionPolicy"}}],"responses":{"201":{"description":"success","schema":{"$ref":"#/definitions/responses.PromotionPolicy"}},"400":{"description":"REQUIRES_ADVANCED_LICENSE: This feature requires Enterprise Edition Advanced"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"INVALID_PROMOTION_POLICY: The given promotion policy is invalid."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/repositories/{namespace}/{reponame}/promotionPolicies/{promotionpolicyid}":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has visibility to the source or target repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Retrieve a specific promotion policy for a repository","operationId":"GetRepoPromotionPolicy","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"promotion policy id","name":"promotionpolicyid","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.PromotionPolicy"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_PROMOTION_POLICY: A promotion policy with the given id does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.PromotionPolicy"}}}},"put":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the source and target repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Updates a specific promotion policy for a repository","operationId":"UpdateRepoPromotionPolicy","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"promotion policy id","name":"promotionpolicyid","in":"path","required":true},{"type":"boolean","default":true,"description":"Whether to evaluate the policy on creation","name":"initialEvaluation","in":"query"},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.UpdatePromotionPolicy"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.PromotionPolicy"}},"400":{"description":"REQUIRES_ADVANCED_LICENSE: This feature requires Enterprise Edition Advanced"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"INVALID_PROMOTION_POLICY: The given promotion policy is invalid."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.PromotionPolicy"}}}},"delete":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the source or target repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Deletes a specific promotion policy for a repository","operationId":"DeleteRepoPromotionPolicy","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"promotion policy id","name":"promotionpolicyid","in":"path","required":true}],"responses":{"204":{"description":"success or promotion policy does not exist"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_PROMOTION_POLICY: A promotion policy with the given id does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/repositories/{namespace}/{reponame}/pushMirroringPolicies":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has visibility to local repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"List the push mirroring policies for a repository","operationId":"ListRepoPushMirroringPolicies","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.PushMirroringPolicy"}}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_REPOSITORY: A repository with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.PushMirroringPolicy"}}}}},"post":{"description":"*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the local repository and credentials to the remote repository.\nRules for the policy can be on the following fields and their respective operators:\n- \"tag\"\n\t- \"eq\": equals\n\t- \"sw\": starts with\n\t- \"ew\": ends with\n\t- \"c\": contains\n\t- \"oo\": one of\n\t- \"noo\": not one of\n- \"license.name\"\n\t- \"oo\": one of\n\t- \"noo\": not one of\n- \"package.name\"\n\t- \"oo\": one of\n\t- \"noo\": not one of\n- \"vulnerability_all\"\n\t- \"gte\": greater than or equals\n\t- \"gt\": greater than\n\t- \"eq\": equals\n\t- \"neq\": not equals\n\t- \"lte\": less than or equals\n\t- \"lt\": less than\n- \"vulnerability_critical\"\n\t- \"gte\": greater than or equals\n\t- \"gt\": greater than\n\t- \"eq\": equals\n\t- \"neq\": not equals\n\t- \"lte\": less than or equals\n\t- \"lt\": less than\n- \"vulnerability_major\"\n\t- \"gte\": greater than or equals\n\t- \"gt\": greater than\n\t- \"eq\": equals\n\t- \"neq\": not equals\n\t- \"lte\": less than or equals\n\t- \"lt\": less than\n- \"vulnerability_minor\"\n\t- \"gte\": greater than or equals\n\t- \"gt\": greater than\n\t- \"eq\": equals\n\t- \"neq\": not equals\n\t- \"lte\": less than or equals\n\t- \"lt\": less than\n\nThe tag template is used to rename the tag in the target repository. The\nfollowing symbols are allowed:\n- \"%n\": The tag to promote (e.g. 1, 4.5, latest)\n- \"%A\": Day of the week (e.g. Sunday, Monday)\n- \"%a\": Day of the week, abbreviated (e.g. Sun, Mon , Tue)\n- \"%w\": Day of the week, as a number (e.g. 0, 1, 6)\n- \"%d\": Number for the day of the month (e.g. 01, 15, 31)\n- \"%B\": Month (e.g. January, December)\n- \"%b\": Month, abbreviated (e.g. Jan, Jun, Dec)\n- \"%m\": Month, as a number (e.g. 01, 06, 12)\n- \"%Y\": Year (e.g. 1999, 2015, 2048)\n- \"%y\": Year, two digits (e.g. 99, 15, 48)\n- \"%H\": Hour, in 24 hour format (e.g. 00, 12, 23)\n- \"%I\": Hour, in 12 hour format (e.g. 01, 10, 10)\n- \"%p\": Period of the day (e.g. AM, PM)\n- \"%M\": Minute (e.g. 00, 10, 59)\n- \"%S\": Second (e.g. 00, 10, 59)\n- \"%f\": Microsecond (e.g. 000000, 999999)\n- \"%Z\": Name for the timezone (e.g. UTC, PST, EST)\n- \"%j\": Day of the year (e.g. 001, 200, 366)\n- \"%W\": Week of the year (e.g. 00, 10 , 53)\n","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Create a push mirroring policy for a repository","operationId":"CreateRepoPushMirroringPolicy","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"boolean","default":true,"description":"Whether to evaluate the policy on creation","name":"initialEvaluation","in":"query"},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.CreatePushMirroringPolicy"}}],"responses":{"201":{"description":"success","schema":{"$ref":"#/definitions/responses.PushMirroringPolicy"}},"400":{"description":"REMOTE_REGISTRY_INVALID_PERMISSIONS: Remote user not authorized to access the requested resource."},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"INVALID_PUSH_MIRRORING_POLICY: The given push mirroring policy is invalid."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/repositories/{namespace}/{reponame}/pushMirroringPolicies/{pushmirroringpolicyid}":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has visibility to the local repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Retrieve a specific push mirroring policy for a repository","operationId":"GetRepoPushMirroringPolicy","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"push mirroring policy id","name":"pushmirroringpolicyid","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.PushMirroringPolicy"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_PUSH_MIRRORING_POLICY: A push mirroring policy with the given id does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.PushMirroringPolicy"}}}},"put":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the local repository and credentials to the remote repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Updates a specific push mirroring policy for a repository","operationId":"UpdateRepoPushMirroringPolicy","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"push mirroring policy id","name":"pushmirroringpolicyid","in":"path","required":true},{"type":"boolean","default":true,"description":"Whether to evaluate the policy on creation","name":"initialEvaluation","in":"query"},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.UpdatePushMirroringPolicy"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.PushMirroringPolicy"}},"400":{"description":"REMOTE_REGISTRY_INVALID_PERMISSIONS: Remote user not authorized to access the requested resource."},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"INVALID_PUSH_MIRRORING_POLICY: The given push mirroring policy is invalid."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.PushMirroringPolicy"}}}},"delete":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the local repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Deletes a specific push mirroring policy for a repository","operationId":"DeleteRepoPushMirroringPolicy","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"push mirroring policy id","name":"pushmirroringpolicyid","in":"path","required":true}],"responses":{"204":{"description":"success or push mirroring policy does not exist"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_PUSH_MIRRORING_POLICY: A push mirroring policy with the given id does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/repositories/{namespace}/{reponame}/tags":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has visibility to the repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"List the available tags for a repository","operationId":"ListRepoTags","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"The ID of the first record on the page","name":"pageStart","in":"query"},{"type":"integer","default":10,"description":"Maximum number of results to return","name":"pageSize","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the resource count in the response header","name":"count","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the manifest for each tag","name":"includeManifests","in":"query"},{"type":"string","description":"The domain used to push tags to DTR. Must be set to obtain/manipulate Notary related information","name":"domain","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Tag"}}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_REPOSITORY: A repository with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Tag"}}}}}},"/api/v0/repositories/{namespace}/{reponame}/tags/{tag}":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has visibility to the repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Retrieve a specific tag for a repository","operationId":"ListRepoTag","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"tag name","name":"tag","in":"path","required":true},{"type":"string","description":"The domain used to push tags to DTR. Must be set to obtain/manipulate Notary related information","name":"domain","in":"query"},{"type":"string","description":"Operating system of the tag","name":"os","in":"query"},{"type":"string","description":"Architecture of the tag","name":"arch","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Tag"}}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_TAG: A tag with the given name does not exist for the given repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Tag"}}}}},"delete":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"write\" level access to the repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Delete a tag for a repository","operationId":"DeleteRepoTag","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"tag name","name":"tag","in":"path","required":true},{"type":"string","description":"The domain used to push tags to DTR. Must be set to obtain/manipulate Notary related information","name":"domain","in":"query"}],"responses":{"204":{"description":"success"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_TAG: A tag with the given name does not exist for the given repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"409":{"description":"TAG_IN_NOTARY: This tag is in notary and can't be deleted until it is removed from notary"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/repositories/{namespace}/{reponame}/tags/{tag}/promotion":{"post":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"read\" level access to the source repository and \"write\" level access to the target repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Promotes a specific tag for a repository","operationId":"CreateRepoTagPromotion","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"tag name","name":"tag","in":"path","required":true},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.CreatePromotion"}}],"responses":{"201":{"description":"success","schema":{"$ref":"#/definitions/responses.Promotion"}},"400":{"description":"INVALID_TAG_NAME: The given tag name is either too long or contains illegal characters."},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_TAG: A tag with the given name does not exist for the given repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/repositories/{namespace}/{reponame}/tags/{tag}/pushMirroring":{"post":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"read\" level access to the local repository and \"write\" level access to the remote repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Mirrors a local tag by pushing to a remote repository","operationId":"CreateRepoTagPushMirroring","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"tag name","name":"tag","in":"path","required":true},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.CreateMirroring"}}],"responses":{"201":{"description":"success","schema":{"$ref":"#/definitions/responses.Mirroring"}},"400":{"description":"INVALID_TAG_NAME: The given tag name is either too long or contains illegal characters."},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_TAG: A tag with the given name does not exist for the given repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/repositories/{namespace}/{reponame}/teamAccess":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"List teams granted access to an organization-owned repository","operationId":"ListRepoTeamAccess","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"The ID of the first record on the page","name":"pageStart","in":"query"},{"type":"integer","default":10,"description":"Maximum number of results to return","name":"pageSize","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the resource count in the response header","name":"count","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.ListRepoTeamAccess"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_REPOSITORY: A repository with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.ListRepoTeamAccess"}}}}},"/api/v0/repositories/{namespace}/{reponame}/teamAccess/{teamname}":{"put":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Set a team's access to an orgnization-owned repository","operationId":"GrantRepoTeamAccess","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"team name","name":"teamname","in":"path","required":true},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.Access"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.ListRepoTeamAccess"}},"400":{"description":"the team does not belong to the organization"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_TEAM: A team with the given name does not exist in the organization."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.ListRepoTeamAccess"}}}},"delete":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"Revoke a team's acccess to an organization-owned repository","operationId":"RevokeRepoTeamAccess","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true},{"type":"string","description":"team name","name":"teamname","in":"path","required":true}],"responses":{"204":{"description":"success or the team is not in the access list or there is no such team in the organization"},"400":{"description":"the repository is not owned by an organization"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_TEAM: A team with the given name does not exist in the organization."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/repositories/{namespace}/{reponame}/webhooks":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the repository.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositories"],"summary":"List the webhook subscriptions for a repository","operationId":"ListRepoWebhooks","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"name of repository","name":"reponame","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Webhook"}}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_REPOSITORY: A repository with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Webhook"}}}}}},"/api/v0/repositoryNamespaces/{namespace}/teamAccess":{"get":{"description":"\n*Authorization:* Client must be authenticated as an admin or a member of the organization.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositoryNamespaces"],"summary":"List teams granted access to an organization-owned namespace of repositories","operationId":"ListRepoNamespaceTeamAccess","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"The ID of the first record on the page","name":"pageStart","in":"query"},{"type":"integer","default":10,"description":"Maximum number of results to return","name":"pageSize","in":"query"},{"type":"boolean","default":false,"description":"Whether to include the resource count in the response header","name":"count","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.ListRepoNamespaceTeamAccess"}},"400":{"description":"the namespace is not owned by an organization"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_ACCOUNT: An account with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.ListRepoNamespaceTeamAccess"}}}}},"/api/v0/repositoryNamespaces/{namespace}/teamAccess/{teamname}":{"get":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level\naccess to the namespace or is a member of the team.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositoryNamespaces"],"summary":"Get a team's granted access to an organization-owned namespace of repositories","operationId":"GetRepoNamespaceTeamAccess","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"team name","name":"teamname","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.NamespaceTeamAccess"}},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_NAMESPACE_TEAM_ACCESS: An access grant for the given team in the given namespace does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.NamespaceTeamAccess"}}}},"put":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the namespace.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositoryNamespaces"],"summary":"Set a team's access to an organization-owned namespace of repositories","operationId":"GrantRepoNamespaceTeamAccess","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"team name","name":"teamname","in":"path","required":true},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.Access"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/responses.NamespaceTeamAccess"}},"400":{"description":"the team does not belong to the owning organization"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_TEAM: A team with the given name does not exist in the organization."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"$ref":"#/definitions/responses.NamespaceTeamAccess"}}}},"delete":{"description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the namespace.\n\t\t","consumes":["application/json"],"produces":["application/json"],"tags":["repositoryNamespaces"],"summary":"Revoke a team's access to an organization-owned namespace of repositories","operationId":"RevokeRepoNamespaceTeamAccess","parameters":[{"type":"string","description":"namespace/owner of repository","name":"namespace","in":"path","required":true},{"type":"string","description":"team name","name":"teamname","in":"path","required":true}],"responses":{"204":{"description":"success or the team does not exist in the access list or there is no such team in the organization"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_TEAM: A team with the given name does not exist in the organization."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"}}}},"/api/v0/webhooks":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["webhooks"],"summary":"List Webhooks","operationId":"ListWebhooks","parameters":[{"type":"string","default":"any","description":"The type of webhook to list","name":"webhookType","in":"query"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Webhook"}}},"400":{"description":"INVALID_JSON: Unable to parse JSON"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Webhook"}}}}},"post":{"consumes":["application/json"],"produces":["application/json"],"tags":["webhooks"],"summary":"Create Webhook","operationId":"CreateWebhook","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.Webhook"}}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Webhook"}}},"400":{"description":"INVALID_JSON: Unable to parse JSON"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_ACCOUNT: An account with the given name does not exist."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Webhook"}}}}}},"/api/v0/webhooks/test":{"post":{"consumes":["application/json"],"produces":["application/json"],"tags":["webhooks"],"summary":"Test Webhook","operationId":"TestWebhook","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.WebhookTestPayload"}}],"responses":{"200":{"description":"OK"},"400":{"description":"INVALID_JSON: Unable to parse JSON"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK"}}}},"/api/v0/webhooks/update":{"post":{"consumes":["application/json"],"produces":["application/json"],"tags":["webhooks"],"summary":"Update Webhook","operationId":"UpdateWebhook","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/forms.WebhookUpdate"}}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Webhook"}}},"400":{"description":"INVALID_JSON: Unable to parse JSON"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Webhook"}}}}}},"/api/v0/webhooks/{webhook}":{"delete":{"consumes":["application/json"],"produces":["application/json"],"tags":["webhooks"],"summary":"Delete Webhook","operationId":"DeleteWebhook","parameters":[{"type":"string","description":"webhook subscription ID","name":"webhook","in":"path","required":true}],"responses":{"200":{"description":"OK"},"401":{"description":"NOT_AUTHENTICATED: The client is not authenticated."},"403":{"description":"NOT_AUTHORIZED: The client is not authorized."},"404":{"description":"NO_SUCH_WEBHOOK: A webhook subscription with the given name does not exist for the given repository."},"405":{"description":"NOT_ALLOWED: Method Not Allowed"},"406":{"description":"NOT_ACCEPTABLE: Not Acceptable"},"415":{"description":"UNSUPPORTED_MEDIA_TYPE: Unsupported Media Type"},"default":{"description":"OK"}}}},"/api/v0/workers":{"get":{"consumes":["application/json"],"produces":["application/json"],"tags":["workers"],"summary":"List all workers","operationId":"ListWorkers","responses":{"200":{"description":"Success, list of workers returned.","schema":{"$ref":"#/definitions/tmpresponses.Workers"}},"default":{"description":"Success, list of workers returned.","schema":{"$ref":"#/definitions/tmpresponses.Workers"}}}}},"/api/v0/workers/{id}/capacity":{"post":{"consumes":["application/json"],"produces":["application/json"],"tags":["workers"],"summary":"Update the capacity for a worker","operationId":"UpdateWorkerCapacity","parameters":[{"type":"string","description":"ID of worker to update","name":"id","in":"path","required":true},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/tmpforms.UpdateWorkerCapacity"}}],"responses":{"202":{"description":"Success."}}}}},"definitions":{"forms.Access":{"required":["accessLevel"],"properties":{"accessLevel":{"type":"string","enum":["read-only","read-write","admin"]}}},"forms.CreateAPIToken":{"properties":{"tokenLabel":{"type":"string"}}},"forms.CreateContentCache":{"required":["name","host"],"properties":{"host":{"type":"string"},"name":{"type":"string"}}},"forms.CreateMirroring":{"required":["remoteHost","remoteRepository","remoteCA","skipTLSVerification","remoteTag","username","password","authToken"],"properties":{"authToken":{"type":"string"},"password":{"type":"string"},"remoteCA":{"type":"string"},"remoteHost":{"type":"string"},"remoteRepository":{"type":"string"},"remoteTag":{"type":"string"},"skipTLSVerification":{"type":"boolean"},"username":{"type":"string"}}},"forms.CreatePollMirroringPolicy":{"required":["remoteHost","remoteRepository","remoteCA","skipTLSVerification","enabled","username","password","authToken"],"properties":{"authToken":{"type":"string"},"enabled":{"type":"boolean"},"password":{"type":"string"},"remoteCA":{"type":"string"},"remoteHost":{"type":"string"},"remoteRepository":{"type":"string"},"skipTLSVerification":{"type":"boolean"},"username":{"type":"string"}}},"forms.CreatePromotion":{"required":["targetRepository","targetTag"],"properties":{"targetRepository":{"type":"string"},"targetTag":{"type":"string"}}},"forms.CreatePromotionPolicy":{"required":["rules","targetRepository","tagTemplate","enabled"],"properties":{"enabled":{"type":"boolean"},"rules":{"type":"array","items":{"$ref":"#/definitions/ruleengine.Rule"}},"tagTemplate":{"type":"string"},"targetRepository":{"type":"string"}}},"forms.CreatePushMirroringPolicy":{"required":["rules","remoteHost","remoteRepository","remoteCA","skipTLSVerification","tagTemplate","enabled","username","password","authToken"],"properties":{"authToken":{"type":"string"},"enabled":{"type":"boolean"},"password":{"type":"string"},"remoteCA":{"type":"string"},"remoteHost":{"type":"string"},"remoteRepository":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/definitions/ruleengine.Rule"}},"skipTLSVerification":{"type":"boolean"},"tagTemplate":{"type":"string"},"username":{"type":"string"}}},"forms.CreateRemoteRegistryCheck":{"required":["remoteHost","remoteRepository","remoteCA","skipTLSVerification","username","password","authToken"],"properties":{"authToken":{"type":"string"},"password":{"type":"string"},"remoteCA":{"type":"string"},"remoteHost":{"type":"string"},"remoteRepository":{"type":"string"},"skipTLSVerification":{"type":"boolean"},"username":{"type":"string"}}},"forms.CreateRepo":{"required":["name","shortDescription","longDescription","scanOnPush","immutableTags","enableManifestLists"],"properties":{"enableManifestLists":{"type":"boolean"},"immutableTags":{"type":"boolean"},"longDescription":{"type":"string"},"name":{"type":"string"},"scanOnPush":{"type":"boolean"},"shortDescription":{"type":"string"},"visibility":{"type":"string","enum":["public","private"]}}},"forms.EmptyForm":{},"forms.ScanOptions":{"required":["scan","check"],"properties":{"check":{"type":"boolean"},"scan":{"type":"boolean"}}},"forms.Settings":{"required":["dtrHost","sso","createRepositoryOnPush","reportAnalytics","anonymizeAnalytics","disableBackupWarning","webTLSCert","webTLSKey","webTLSCA","scanningEnabled","scanningSyncOnline","scanningEnableAutoRecheck","jobHistoryToKeep"],"properties":{"anonymizeAnalytics":{"type":"boolean"},"createRepositoryOnPush":{"type":"boolean"},"disableBackupWarning":{"type":"boolean"},"dtrHost":{"type":"string"},"jobHistoryToKeep":{"type":"integer"},"reportAnalytics":{"type":"boolean"},"scanningEnableAutoRecheck":{"type":"boolean"},"scanningEnabled":{"type":"boolean"},"scanningSyncOnline":{"type":"boolean"},"sso":{"type":"boolean"},"webTLSCA":{"type":"string"},"webTLSCert":{"type":"string"},"webTLSKey":{"type":"string"}}},"forms.ToggleScanOnPush":{"required":["scanOnPush"],"properties":{"scanOnPush":{"type":"boolean"}}},"forms.UpdateAPIToken":{"properties":{"isActive":{"type":"boolean"},"tokenLabel":{"type":"string"}}},"forms.UpdatePollMirroringPolicy":{"properties":{"authToken":{"type":"string"},"enabled":{"type":"boolean"},"password":{"type":"string"},"remoteCA":{"type":"string"},"remoteHost":{"type":"string"},"remoteRepository":{"type":"string"},"skipTLSVerification":{"type":"boolean"},"username":{"type":"string"}}},"forms.UpdatePromotionPolicy":{"properties":{"enabled":{"type":"boolean"},"rules":{"type":"array","items":{"$ref":"#/definitions/ruleengine.Rule"}},"tagTemplate":{"type":"string"},"targetRepository":{"type":"string"}}},"forms.UpdatePushMirroringPolicy":{"properties":{"authToken":{"type":"string"},"enabled":{"type":"boolean"},"password":{"type":"string"},"remoteCA":{"type":"string"},"remoteHost":{"type":"string"},"remoteRepository":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/definitions/ruleengine.Rule"}},"skipTLSVerification":{"type":"boolean"},"tagTemplate":{"type":"string"},"username":{"type":"string"}}},"forms.UpdateRepo":{"required":["immutableTags"],"properties":{"enableManifestLists":{"type":"boolean"},"immutableTags":{"type":"boolean"},"longDescription":{"type":"string"},"scanOnPush":{"type":"boolean"},"shortDescription":{"type":"string"},"visibility":{"type":"string","enum":["public","private"]}}},"forms.UserSettings":{"properties":{"contentCacheUUID":{"type":"string"}}},"forms.VulnOverrideOption":{"required":["component","componentVersion","cve","notes"],"properties":{"component":{"type":"string"},"componentVersion":{"type":"string"},"cve":{"type":"string"},"notes":{"type":"string"}}},"forms.Webhook":{"required":["endpoint"],"properties":{"endpoint":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["TAG_PUSH","TAG_DELETE","PROMOTION","PUSH_MIRRORING","POLL_MIRRORING","MANIFEST_PUSH","MANIFEST_DELETE","REPO_EVENT","SCAN_COMPLETED","SCAN_FAILED","SCANNER_UPDATE_COMPLETED"]}}},"forms.WebhookTestPayload":{"required":["type","endpoint"],"properties":{"endpoint":{"type":"string"},"type":{"type":"string"}}},"forms.WebhookUpdate":{"required":["id","inactive"],"properties":{"id":{"type":"string"},"inactive":{"type":"boolean"}}},"responses.APIToken":{"required":["hashedToken","tokenLabel","isActive","lastUsed","createdAt","generatedBy","creatorUa"],"properties":{"createdAt":{"type":"string","format":"date-time"},"creatorUa":{"type":"string"},"generatedBy":{"type":"string"},"hashedToken":{"type":"string"},"isActive":{"type":"boolean"},"lastUsed":{"type":"string","format":"date-time"},"tokenLabel":{"type":"string"}}},"responses.Account":{"required":["name","id","fullName","isOrg","isImported"],"properties":{"fullName":{"description":"Full Name of the account","type":"string"},"id":{"description":"ID of the account","type":"string"},"isActive":{"description":"Whether the user is active and can login (users only)","type":"boolean"},"isAdmin":{"description":"Whether the user is a system admin (users only)","type":"boolean"},"isImported":{"type":"boolean"},"isOrg":{"description":"Whether the account is an organization (or user)","type":"boolean"},"membersCount":{"description":"The number of members of the organization","type":"integer","format":"int32"},"name":{"description":"Name of the account","type":"string"}}},"responses.Autocomplete":{"properties":{"accountResults":{"type":"array","items":{"$ref":"#/definitions/responses.Account"}},"repositoryResults":{"type":"array","items":{"$ref":"#/definitions/responses.Repository"}}}},"responses.ClusterStatus":{"required":["rethink_system_tables","replica_health","replica_timestamp","replica_readonly","gc_lock_holder"],"properties":{"gc_lock_holder":{"type":"string"},"replica_health":{"type":"object"},"replica_readonly":{"type":"object"},"replica_timestamp":{"type":"object"},"rethink_system_tables":{"type":"object"}}},"responses.Component":{"required":["component","version","vulns","fullpath"],"properties":{"component":{"type":"string"},"fullpath":{"type":"array","items":{"type":"string"}},"license":{"$ref":"#/definitions/responses.License"},"version":{"type":"string"},"vulns":{"type":"array","items":{"$ref":"#/definitions/responses.VulnerabilityDetails"}}}},"responses.ContentCache":{"required":["id","name","host"],"properties":{"host":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}}},"responses.DetailedSummary":{"required":["sha256sum"],"properties":{"components":{"type":"array","items":{"$ref":"#/definitions/responses.Component"}},"sha256sum":{"type":"string"}}},"responses.DockerRepository":{"required":["description","is_official","is_trusted","name","star_count"],"properties":{"description":{"type":"string"},"is_official":{"type":"boolean"},"is_trusted":{"type":"boolean"},"name":{"type":"string"},"star_count":{"type":"integer","format":"int32"}}},"responses.DockerSearch":{"required":["num_results","query","results"],"properties":{"num_results":{"type":"integer","format":"int32"},"query":{"type":"string"},"results":{"type":"array","items":{"$ref":"#/definitions/responses.DockerRepository"}}}},"responses.DockerfileLine":{"required":["line","layerDigest","size","isEmpty"],"properties":{"isEmpty":{"type":"boolean"},"layerDigest":{"type":"string"},"line":{"type":"string"},"mediaType":{"type":"string"},"size":{"type":"integer","format":"int64"},"urls":{"type":"array","items":{"type":"string"}}}},"responses.Events":{"required":["events"],"properties":{"events":{"type":"array","items":{"$ref":"#/definitions/schema.Event"}}}},"responses.Features":{"required":["scanningEnabled","scanningLicensed","promotionLicensed","mirroringLicensed","metadataStoreOptedIn","onlineGCEnabled","db_version","ucpHost"],"properties":{"db_version":{"type":"integer","format":"int32"},"metadataStoreOptedIn":{"type":"boolean"},"mirroringLicensed":{"type":"boolean"},"onlineGCEnabled":{"type":"boolean"},"promotionLicensed":{"type":"boolean"},"scanningEnabled":{"type":"boolean"},"scanningLicensed":{"type":"boolean"},"ucpHost":{"type":"string"}}},"responses.Language":{"required":["language"],"properties":{"language":{"type":"string"}}},"responses.LayerVulnOverride":{"required":["pk","digest","component","componentVersion","cve","notes"],"properties":{"component":{"type":"string"},"componentVersion":{"type":"string"},"cve":{"type":"string"},"digest":{"type":"string"},"notes":{"type":"string"},"pk":{"type":"string"}}},"responses.License":{"required":["name","type","url"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"responses.ListRepoNamespaceTeamAccess":{"required":["namespace","teamAccessList"],"properties":{"namespace":{"type":"string"},"teamAccessList":{"type":"array","items":{"$ref":"#/definitions/responses.TeamAccess"}}}},"responses.ListRepoTeamAccess":{"required":["repository","teamAccessList"],"properties":{"repository":{"$ref":"#/definitions/responses.Repository"},"teamAccessList":{"type":"array","items":{"$ref":"#/definitions/responses.TeamAccess"}}}},"responses.ListTeamRepoAccess":{"required":["team","repositoryAccessList"],"properties":{"repositoryAccessList":{"type":"array","items":{"$ref":"#/definitions/responses.RepoAccess"}},"team":{"$ref":"#/definitions/responses.Team"}}},"responses.Manifest":{"required":["digest"],"properties":{"architecture":{"type":"string"},"author":{"type":"string"},"configDigest":{"type":"string"},"configMediaType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"digest":{"type":"string"},"dockerfile":{"type":"array","items":{"$ref":"#/definitions/responses.DockerfileLine"}},"mediaType":{"type":"string"},"os":{"type":"string"},"osVersion":{"type":"string"},"size":{"type":"integer","format":"int64"}}},"responses.Mirroring":{"required":["mirroringPolicyID","digest","remoteRepository","remoteTag"],"properties":{"digest":{"type":"string"},"mirroringPolicyID":{"type":"string"},"remoteRepository":{"type":"string"},"remoteTag":{"type":"string"}}},"responses.NamespaceTeamAccess":{"required":["accessLevel","team","namespace"],"properties":{"accessLevel":{"type":"string","enum":["read-only","read-write","admin"]},"namespace":{"type":"string"},"team":{"$ref":"#/definitions/responses.Team"}}},"responses.NautilusStatus":{"required":["state","scanner_version","scannerUpdatedAt","db_version","db_updated_at","lastDBUpdateFailed","lastVulnOverridesDBUpdateFailed"],"properties":{"db_updated_at":{"type":"string","format":"date-time"},"db_version":{"type":"integer","format":"int32"},"lastDBUpdateFailed":{"type":"boolean"},"lastVulnOverridesDBUpdateFailed":{"type":"boolean"},"replicas":{"type":"object"},"scannerUpdatedAt":{"type":"string","format":"date-time"},"scanner_version":{"type":"integer","format":"int32"},"state":{"type":"integer","format":"int32"}}},"responses.NewAPIToken":{"required":["token","hashedToken","tokenLabel","isActive","lastUsed","createdAt","generatedBy","creatorUa"],"properties":{"createdAt":{"type":"string","format":"date-time"},"creatorUa":{"type":"string"},"generatedBy":{"type":"string"},"hashedToken":{"type":"string"},"isActive":{"type":"boolean"},"lastUsed":{"type":"string","format":"date-time"},"token":{"type":"string"},"tokenLabel":{"type":"string"}}},"responses.Note":{"required":["reason","type"],"properties":{"reason":{"type":"string"},"type":{"type":"string"}}},"responses.OldScanSummary":{"required":["namespace","reponame","tag","critical","major","minor","last_scan_status","check_completed_at","should_rescan","has_foreign_layers"],"properties":{"check_completed_at":{"type":"string","format":"date-time"},"critical":{"type":"integer","format":"int32"},"has_foreign_layers":{"type":"boolean"},"last_scan_status":{"type":"integer","format":"int32"},"layer_details":{"type":"array","items":{"$ref":"#/definitions/responses.DetailedSummary"}},"major":{"type":"integer","format":"int32"},"minor":{"type":"integer","format":"int32"},"namespace":{"type":"string"},"reponame":{"type":"string"},"should_rescan":{"type":"boolean"},"tag":{"type":"string"}}},"responses.PollMirroringPolicy":{"required":["id","username","localRepository","remoteHost","remoteRepository","remoteCA","skipTLSVerification","enabled","lastMirroredAt","lastStatus"],"properties":{"enabled":{"type":"boolean"},"id":{"type":"string"},"lastMirroredAt":{"type":"string"},"lastStatus":{"$ref":"#/definitions/schema.MirroringStatus"},"localRepository":{"type":"string"},"remoteCA":{"type":"string"},"remoteHost":{"type":"string"},"remoteRepository":{"type":"string"},"skipTLSVerification":{"type":"boolean"},"username":{"type":"string"}}},"responses.Promotion":{"required":["promotionPolicyID","string","sourceRepository","sourceTag"],"properties":{"promotionPolicyID":{"type":"string"},"sourceRepository":{"type":"string"},"sourceTag":{"type":"string"},"string":{"type":"string"}}},"responses.PromotionPolicy":{"required":["id","rules","sourceRepository","targetRepository","tagTemplate","enabled","lastPromotedAt"],"properties":{"enabled":{"type":"boolean"},"id":{"type":"string"},"lastPromotedAt":{"type":"string","format":"date-time"},"rules":{"type":"array","items":{"$ref":"#/definitions/ruleengine.Rule"}},"sourceRepository":{"type":"string"},"tagTemplate":{"type":"string"},"targetRepository":{"type":"string"}}},"responses.PushMirroringPolicy":{"required":["id","rules","username","localRepository","remoteHost","remoteRepository","remoteCA","skipTLSVerification","tagTemplate","enabled","lastMirroredAt","lastStatus"],"properties":{"enabled":{"type":"boolean"},"id":{"type":"string"},"lastMirroredAt":{"type":"string"},"lastStatus":{"$ref":"#/definitions/schema.MirroringStatus"},"localRepository":{"type":"string"},"remoteCA":{"type":"string"},"remoteHost":{"type":"string"},"remoteRepository":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/definitions/ruleengine.Rule"}},"skipTLSVerification":{"type":"boolean"},"tagTemplate":{"type":"string"},"username":{"type":"string"}}},"responses.RemoteRegistryCheck":{"required":["registryType","accessLevel"],"properties":{"accessLevel":{"type":"string"},"registryType":{"type":"string"}}},"responses.RepoAccess":{"required":["accessLevel","repository"],"properties":{"accessLevel":{"type":"string","enum":["read-only","read-write","admin"]},"repository":{"$ref":"#/definitions/responses.Repository"}}},"responses.RepoUserAccess":{"required":["accessLevel","user","repository"],"properties":{"accessLevel":{"type":"string","enum":["read-only","read-write","admin"]},"repository":{"$ref":"#/definitions/responses.Repository"},"user":{"$ref":"#/definitions/responses.Account"}}},"responses.Repositories":{"required":["repositories"],"properties":{"repositories":{"type":"array","items":{"$ref":"#/definitions/responses.Repository"}}}},"responses.Repository":{"required":["id","namespace","namespaceType","name","shortDescription","visibility","scanOnPush","immutableTags","enableManifestLists","pulls","pushes"],"properties":{"enableManifestLists":{"type":"boolean"},"id":{"type":"string"},"immutableTags":{"type":"boolean"},"longDescription":{"type":"string"},"name":{"type":"string"},"namespace":{"type":"string"},"namespaceType":{"type":"string","enum":["user","organization"]},"pulls":{"type":"integer","format":"integer"},"pushes":{"type":"integer","format":"integer"},"scanOnPush":{"type":"boolean"},"shortDescription":{"type":"string"},"visibility":{"type":"string","enum":["public","private"]}}},"responses.ScanSummary":{"required":["scannedImage","shouldRescan"],"properties":{"scanStatus":{"type":"integer","format":"int32"},"scannedImage":{"$ref":"#/definitions/schema.ScannedImage"},"shouldRescan":{"type":"boolean"}}},"responses.Settings":{"required":["dtrHost","sso","createRepositoryOnPush","replicaSettings","httpProxy","httpsProxy","noProxy","reportAnalytics","anonymizeAnalytics","disableBackupWarning","logProtocol","logHost","logLevel","webTLSCert","webTLSCA","replicaID","scanningEnabled","scanningSyncOnline","scanningEnableAutoRecheck","jobHistoryToKeep","storageVolume","nfsHost","nfsPath"],"properties":{"anonymizeAnalytics":{"type":"boolean"},"createRepositoryOnPush":{"type":"boolean"},"disableBackupWarning":{"type":"boolean"},"dtrHost":{"type":"string"},"httpProxy":{"type":"string"},"httpsProxy":{"type":"string"},"jobHistoryToKeep":{"type":"integer"},"logHost":{"type":"string"},"logLevel":{"type":"string"},"logProtocol":{"type":"string"},"nfsHost":{"type":"string"},"nfsPath":{"type":"string"},"noProxy":{"type":"string"},"replicaID":{"type":"string"},"replicaSettings":{"type":"object"},"reportAnalytics":{"type":"boolean"},"scanningEnableAutoRecheck":{"type":"boolean"},"scanningEnabled":{"type":"boolean"},"scanningSyncOnline":{"type":"boolean"},"sso":{"type":"boolean"},"storageVolume":{"type":"string"},"webTLSCA":{"type":"string"},"webTLSCert":{"type":"string"}}},"responses.Tag":{"required":["name","digest","author","updatedAt","createdAt","hashMismatch","inNotary","manifest","licenses","components"],"properties":{"author":{"type":"string"},"components":{"type":"array","items":{"$ref":"#/definitions/schema.ScannerComponent"}},"createdAt":{"type":"string","format":"date-time"},"digest":{"type":"string"},"hashMismatch":{"description":"true if the hashes from notary and registry don't match","type":"boolean"},"inNotary":{"description":"true if the tag exists in Notary","type":"boolean"},"licenses":{"type":"array","items":{"$ref":"#/definitions/schema.ScannerLicense"}},"manifest":{"$ref":"#/definitions/responses.Manifest"},"mirroring":{"$ref":"#/definitions/responses.Mirroring"},"name":{"type":"string"},"promotion":{"$ref":"#/definitions/responses.Promotion"},"updatedAt":{"type":"string","format":"date-time"},"vuln_summary":{"$ref":"#/definitions/responses.OldScanSummary"}}},"responses.Team":{"required":["id","clientUserIsMember"],"properties":{"clientUserIsMember":{"type":"boolean"},"id":{"type":"string"}}},"responses.TeamAccess":{"required":["accessLevel","team"],"properties":{"accessLevel":{"type":"string","enum":["read-only","read-write","admin"]},"team":{"$ref":"#/definitions/responses.Team"}}},"responses.UserSettings":{"required":["ContentCacheUUID"],"properties":{"ContentCacheUUID":{"type":"string"}}},"responses.Vulnerability":{"required":["cve","cvss","summary"],"properties":{"cve":{"type":"string"},"cvss":{"type":"number","format":"float"},"summary":{"type":"string"}}},"responses.VulnerabilityDetails":{"required":["vuln","exact","notes"],"properties":{"exact":{"type":"boolean"},"notes":{"type":"array","items":{"$ref":"#/definitions/responses.Note"}},"vuln":{"$ref":"#/definitions/responses.Vulnerability"}}},"responses.Webhook":{"required":["id","type","key","endpoint","authorID","createdAt","inactive"],"properties":{"authorID":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"endpoint":{"type":"string"},"id":{"type":"string"},"inactive":{"type":"boolean"},"key":{"type":"string"},"lastSuccessfulAt":{"type":"string","format":"date-time"},"type":{"type":"string"}}},"ruleengine.Rule":{"properties":{"field":{"type":"string"},"operator":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}}},"schema.Event":{"required":["id","publishedAt","actor","type","object"],"properties":{"actor":{"type":"string"},"id":{"type":"string"},"object":{"$ref":"#/definitions/schema.Object"},"publishedAt":{"type":"string","format":"date-time"},"target":{"$ref":"#/definitions/schema.Object"},"type":{"type":"string"}}},"schema.LayerVulnOverride":{"required":["pk","digest","component","componentVersion","cve","notes"],"properties":{"component":{"type":"string"},"componentVersion":{"type":"string"},"cve":{"type":"string"},"digest":{"type":"string"},"notes":{"type":"string"},"pk":{"type":"string"}}},"schema.MirroringStatus":{"required":["code","detail","timestamp"],"properties":{"code":{"type":"string"},"detail":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"schema.Object":{"required":["id","type"],"properties":{"content":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}}},"schema.ScannedImage":{"required":["pk","namespace","repository","tag","manifestDigest","totalVulnCount","licenses","layers","components","cves","maxCVSSValue","scannerFingerprint","vulnOverrides"],"properties":{"components":{"type":"array","items":{"$ref":"#/definitions/schema.ScannerComponent"}},"cves":{"type":"array","items":{"$ref":"#/definitions/schema.ScannerCVE"}},"layers":{"type":"array","items":{"$ref":"#/definitions/schema.ScannerLayer"}},"licenses":{"type":"array","items":{"$ref":"#/definitions/schema.ScannerLicense"}},"manifestDigest":{"type":"string"},"maxCVSSValue":{"type":"number","format":"float"},"namespace":{"type":"string"},"pk":{"type":"string"},"repository":{"type":"string"},"scannerFingerprint":{"$ref":"#/definitions/schema.ScannerFingerprint"},"tag":{"type":"string"},"totalVulnCount":{"$ref":"#/definitions/schema.ScannerVulnCount"},"vulnOverrides":{"type":"array","items":{"$ref":"#/definitions/schema.LayerVulnOverride"}}}},"schema.ScannerCVE":{"required":["cvePK","summary","cvss","notes"],"properties":{"cvePK":{"type":"string"},"cvss":{"type":"number","format":"float"},"notes":{"type":"string"},"summary":{"type":"string"}}},"schema.ScannerComponent":{"required":["componentPK","vulnCount","name","version","filepaths","cves","licenses"],"properties":{"componentPK":{"type":"string"},"cves":{"type":"array","items":{"type":"string"}},"filepaths":{"type":"array","items":{"type":"string"}},"licenses":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"version":{"type":"string"},"vulnCount":{"$ref":"#/definitions/schema.ScannerVulnCount"}}},"schema.ScannerFingerprint":{"required":["scannerType","version"],"properties":{"scannerType":{"type":"integer","format":"int32"},"version":{"type":"array","items":{"type":"string"}}}},"schema.ScannerLayer":{"required":["digest","mediaType","author","size","components"],"properties":{"author":{"type":"string"},"components":{"type":"array","items":{"type":"string"}},"digest":{"type":"string"},"mediaType":{"type":"string"},"size":{"type":"integer","format":"int64"}}},"schema.ScannerLicense":{"required":["name","url","type"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"schema.ScannerVulnCount":{"required":["critical","major","minor"],"properties":{"critical":{"type":"integer","format":"int32"},"major":{"type":"integer","format":"int32"},"minor":{"type":"integer","format":"int32"}}},"tmpforms.ActionConfigCreate":{"required":["action","parameters"],"properties":{"action":{"description":"The action to modify the config for","type":"string"},"parameters":{"description":"Extra parameters to pass to the job. The available parameters depend on the job. These are overwritten by any corresponding parameters set in the job itself.","type":"object"}}},"tmpforms.CronCreate":{"required":["action","schedule","retries","capacityMap","parameters","deadline","stopTimeout"],"properties":{"action":{"description":"The action which the cron will perform","type":"string"},"capacityMap":{"description":"The map of required capacity","type":"object"},"deadline":{"description":"After this amount of time has passed, a SIGTERM will be sent","type":"string"},"parameters":{"description":"Extra parameters to pass to the job. The available parameters depend on the job.","type":"object"},"retries":{"description":"The number of times to retry a job if it fails","type":"integer","format":"int32"},"schedule":{"description":"The for the cron as a cronspec string: (seconds) (minutes) (hours) (day of month) (month) (day of week) or @hourly, @weekly, etc.","type":"string"},"stopTimeout":{"description":"This long after SIGTERM is sent, SIGKILL will be sent if the proccess is still alive","type":"string"}}},"tmpforms.EmptyForm":{},"tmpforms.JobSubmission":{"required":["action","parameters","retries","capacityMap","deadline","stopTimeout","scheduledAt"],"properties":{"action":{"description":"The action which the job will perform","type":"string"},"capacityMap":{"description":"The map of required capacity","type":"object"},"deadline":{"description":"After this amount of time has passed, a SIGTERM will be sent","type":"string"},"parameters":{"description":"Parameters to start the job with","type":"object"},"retries":{"description":"The number of times to retry a job if it fails","type":"integer","format":"int32"},"scheduledAt":{"description":"The time at which to run the job. Empty string or no value means now. Format: RFC3339","type":"string"},"stopTimeout":{"description":"This long after SIGTERM is sent, SIGKILL will be sent if the proccess is still alive","type":"string"}}},"tmpforms.UpdateWorkerCapacity":{"required":["capacityMap"],"properties":{"capacityMap":{"description":"The new capacity for the worker, representing roughly the amount of RAM to use","type":"object"}}},"tmpresponses.ActionConfig":{"required":["id","action","parameters"],"properties":{"action":{"description":"The action this config refers to.","type":"string"},"id":{"description":"Randomly generated UUID for foreign references.","type":"string"},"parameters":{"description":"Extra parameters to pass to the job. The available parameters depend on the job.","type":"object"}}},"tmpresponses.ActionConfigs":{"required":["actionConfigs"],"properties":{"actionConfigs":{"type":"array","items":{"$ref":"#/definitions/tmpresponses.ActionConfig"}}}},"tmpresponses.Cron":{"required":["id","action","schedule","retries","capacityMap","parameters","deadline","stopTimeout","nextRun"],"properties":{"action":{"description":"The action to be performed by jobs spawned from this cron.","type":"string"},"capacityMap":{"description":"The map of required capacity","type":"object"},"deadline":{"type":"string"},"id":{"description":"Randomly generated UUID for foreign references.","type":"string"},"nextRun":{"description":"The next time the job will run.","type":"string","format":"date-time"},"parameters":{"description":"Extra parameters to pass to the job. The available parameters depend on the job.","type":"object"},"retries":{"description":"The number of times to retry the job if it fails","type":"integer","format":"int32"},"schedule":{"description":"The schedule for this cron as a cronspec string: (seconds) (minutes) (hours) (day of month) (month) (day of week) or @hourly, @weekly, etc.","type":"string"},"stopTimeout":{"description":"This long after SIGTERM is sent, SIGKILL will be sent if the proccess is still alive","type":"string"}}},"tmpresponses.Crons":{"required":["crons"],"properties":{"crons":{"type":"array","items":{"$ref":"#/definitions/tmpresponses.Cron"}}}},"tmpresponses.Job":{"required":["id","retryFromID","workerID","status","scheduledAt","lastUpdated","action","retriesLeft","retriesTotal","capacityMap","parameters","deadline","stopTimeout"],"properties":{"action":{"description":"The action this job performs","type":"string"},"capacityMap":{"description":"The map of required capacity","type":"object"},"deadline":{"type":"string"},"id":{"description":"The ID of the job","type":"string"},"lastUpdated":{"description":"The last time at which the status of this job was updated","type":"string","format":"date-time"},"parameters":{"description":"Extra parameters to pass to the job. The available parameters depend on the job.","type":"object"},"retriesLeft":{"description":"The number of times to retry the job if it fails","type":"integer","format":"int32"},"retriesTotal":{"description":"The total number of times to retry the original job if it fails","type":"integer","format":"int32"},"retryFromID":{"description":"The ID of the job this job retried from","type":"string"},"scheduledAt":{"description":"The time at which this job was scheduled","type":"string","format":"date-time"},"status":{"description":"The current status of the job","type":"string","enum":["waiting","running","done","canceled","errored"]},"stopTimeout":{"description":"This long after SIGTERM is sent, SIGKILL will be sent if the proccess is still alive","type":"string"},"workerID":{"description":"The ID of the worker which performed the job, unclaimed by a worker if empty","type":"string"}}},"tmpresponses.JobLog":{"required":["data","lineNum"],"properties":{"data":{"type":"string"},"lineNum":{"type":"integer","format":"int32"}}},"tmpresponses.Jobs":{"required":["jobs"],"properties":{"jobs":{"type":"array","items":{"$ref":"#/definitions/tmpresponses.Job"}}}},"tmpresponses.Worker":{"required":["id","status","capacityMap","heartbeatExpiration"],"properties":{"capacityMap":{"description":"A map used to represent now much load the worker should be allocated. Only security scanning jobs use this and the value is roughly equivalent to expected memory usage in bytes.","type":"object"},"heartbeatExpiration":{"description":"Time after which the worker should be considered dead.","type":"string"},"id":{"description":"Randomly generated UUID for foreign references.","type":"string"},"status":{"description":"Status of the worker","type":"string"}}},"tmpresponses.Workers":{"required":["workers"],"properties":{"workers":{"type":"array","items":{"$ref":"#/definitions/tmpresponses.Worker"}}}}},"tags":[{"description":"Accounts","name":"accounts"},{"description":"Admin","name":"meta"},{"description":"Content Caches","name":"content_caches"},{"description":"Repositories","name":"repositories"},{"description":"Repository Namespaces","name":"repositoryNamespaces"},{"description":"Events","name":"events"},{"description":"Docker Security Scanner","name":"imagescan"},{"description":"Webhooks","name":"webhooks"},{"description":"Jobs","name":"jobs"},{"description":"Crons","name":"crons"},{"description":"Workers","name":"workers"},{"description":"Action Configs","name":"action_configs"}]} +, + dom_id: '#swagger-ui', + validatorUrl: null, + presets: [ + SwaggerUIBundle.presets.apis, + SwaggerUIStandalonePreset + ], + plugins: [ + SwaggerUIBundle.plugins.DownloadUrl + ], + layout: "StandaloneLayout" + }) + + window.ui = ui +} diff --git a/reference/dtr/2.5/api/swagger-ui-bundle.js b/reference/dtr/2.5/api/swagger-ui-bundle.js new file mode 100644 index 0000000000..4ec510a936 --- /dev/null +++ b/reference/dtr/2.5/api/swagger-ui-bundle.js @@ -0,0 +1,105 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUIBundle=t():e.SwaggerUIBundle=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="/dist",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,i){r.apply(this,[e,t,i].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){n(1),e.exports=n(56)},function(e,t,n){"use strict";n(2)},function(e,t,n){n(3),n(17),n(30),n(36),e.exports=n(16).Promise},function(e,t,n){"use strict";var r=n(4),i={};i[n(6)("toStringTag")]="z",i+""!="[object z]"&&n(10)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(e,t,n){var r=n(5),i=n(6)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=(t=Object(e))[i])?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(7)("wks"),i=n(9),o=n(8).Symbol;e.exports=function(e){return r[e]||(r[e]=o&&o[e]||(o||i)("Symbol."+e))}},function(e,t,n){var r=n(8),i="__core-js_shared__",o=r[i]||(r[i]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(8),i=n(11),o=n(9)("src"),a="toString",s=Function[a],u=(""+s).split(a);n(16).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,a){"function"==typeof n&&(n.hasOwnProperty(o)||i(n,o,e[t]?""+e[t]:u.join(String(t))),n.hasOwnProperty("name")||i(n,"name",t)),e===r?e[t]=n:(a||delete e[t],i(e,t,n))})(Function.prototype,a,function(){return"function"==typeof this&&this[o]||s.call(this)})},function(e,t,n){var r=n(12),i=n(13);e.exports=n(14)?function(e,t,n){return r.setDesc(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){e.exports=!n(15)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";var r=n(18)(!0);n(21)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(19),i=n(20);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(o=s.charCodeAt(u),o<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):(o-55296<<10)+(a-56320)+65536)}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(22),i=n(23),o=n(10),a=n(11),s=n(26),u=n(27),c=n(28),l=n(29),p=n(12).getProto,f=n(6)("iterator"),h=!([].keys&&"next"in[].keys()),d="@@iterator",m="keys",v="values",y=function(){return this};e.exports=function(e,t,n,g,_,b,x){c(n,t,g);var w,k,S=function(e){if(!h&&e in T)return T[e];switch(e){case m:return function(){return new n(this,e)};case v:return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",C=_==v,A=!1,T=e.prototype,D=T[f]||T[d]||_&&T[_],M=D||S(_);if(D){var O=p(M.call(new e));l(O,E,!0),!r&&s(T,d)&&a(O,f,y),C&&D.name!==v&&(A=!0,M=function(){return D.call(this)})}if(r&&!x||!h&&!A&&T[f]||a(T,f,M),u[t]=M,u[E]=y,_)if(w={values:C?M:S(v),keys:b?M:S(m),entries:C?S("entries"):M},x)for(k in w)k in T||o(T,k,w[k]);else i(i.P+i.F*(h||A),t,w);return w}},function(e,t){e.exports=!1},function(e,t,n){var r=n(8),i=n(16),o=n(11),a=n(10),s=n(24),u="prototype",c=function(e,t,n){var l,p,f,h,d=e&c.F,m=e&c.G,v=e&c.S,y=e&c.P,g=e&c.B,_=m?r:v?r[t]||(r[t]={}):(r[t]||{})[u],b=m?i:i[t]||(i[t]={}),x=b[u]||(b[u]={});m&&(n=t);for(l in n)p=!d&&_&&l in _,f=(p?_:n)[l],h=g&&p?s(f,r):y&&"function"==typeof f?s(Function.call,f):f,_&&!p&&a(_,l,f),b[l]!=f&&o(b,l,h),y&&x[l]!=f&&(x[l]=f)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,e.exports=c},function(e,t,n){var r=n(25);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(12),i=n(13),o=n(29),a={};n(11)(a,n(6)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r.create(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(12).setDesc,i=n(26),o=n(6)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){n(31);var r=n(8),i=n(11),o=n(27),a=n(6)("iterator"),s=r.NodeList,u=r.HTMLCollection,c=s&&s.prototype,l=u&&u.prototype,p=o.NodeList=o.HTMLCollection=o.Array;c&&!c[a]&&i(c,a,p),l&&!l[a]&&i(l,a,p)},function(e,t,n){"use strict";var r=n(32),i=n(33),o=n(27),a=n(34);e.exports=n(21)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var r=n(6)("unscopables"),i=Array.prototype;void 0==i[r]&&n(11)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(35),i=n(20);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(5);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){"use strict";var r,i=n(12),o=n(22),a=n(8),s=n(24),u=n(4),c=n(23),l=n(37),p=n(38),f=n(25),h=n(39),d=n(40),m=n(45).set,v=n(46),y=n(6)("species"),g=n(47),_=n(48),b="Promise",x=a.process,w="process"==u(x),k=a[b],S=function(){},E=function(e){var t,n=new k(S);return e&&(n.constructor=function(e){e(S,S)}),(t=k.resolve(n)).catch(S),t===n},C=function(){function e(t){var n=new k(t);return m(n,e.prototype),n}var t=!1;try{if(t=k&&k.resolve&&E(),m(e,k),e.prototype=i.create(k.prototype,{constructor:{value:e}}),e.resolve(5).then(function(){})instanceof e||(t=!1),t&&n(14)){var r=!1;k.resolve(i.setDesc({},"then",{get:function(){r=!0}})),t=r}}catch(e){t=!1}return t}(),A=function(e,t){return!(!o||e!==k||t!==r)||v(e,t)},T=function(e){var t=p(e)[y];return void 0!=t?t:e},D=function(e){var t;return!(!l(e)||"function"!=typeof(t=e.then))&&t},M=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=f(t),this.reject=f(n)},O=function(e){try{e()}catch(e){return{error:e}}},P=function(e,t){if(!e.n){e.n=!0;var n=e.c;_(function(){for(var r=e.v,i=1==e.s,o=0,s=function(t){var n,o,a=i?t.ok:t.fail,s=t.resolve,u=t.reject;try{a?(i||(e.h=!0),n=a===!0?r:a(r),n===t.promise?u(TypeError("Promise-chain cycle")):(o=D(n))?o.call(n,s,u):s(n)):u(r)}catch(e){u(e)}};n.length>o;)s(n[o++]);n.length=0,e.n=!1,t&&setTimeout(function(){var t,n,i=e.p;I(i)&&(w?x.emit("unhandledRejection",r,i):(t=a.onunhandledrejection)?t({promise:i,reason:r}):(n=a.console)&&n.error&&n.error("Unhandled promise rejection",r)),e.a=void 0},1)})}},I=function(e){var t,n=e._d,r=n.a||n.c,i=0;if(n.h)return!1;for(;r.length>i;)if(t=r[i++],t.fail||!I(t.promise))return!1;return!0},N=function(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,t.a=t.c.slice(),P(t,!0))},R=function(e){var t,n=this;if(!n.d){n.d=!0,n=n.r||n;try{if(n.p===e)throw TypeError("Promise can't be resolved itself");(t=D(e))?_(function(){var r={r:n,d:!1};try{t.call(e,s(R,r,1),s(N,r,1))}catch(e){N.call(r,e)}}):(n.v=e,n.s=1,P(n,!1))}catch(e){N.call({r:n,d:!1},e)}}};C||(k=function(e){f(e);var t=this._d={p:h(this,k,b),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};try{e(s(R,t,1),s(N,t,1))}catch(e){N.call(t,e)}},n(53)(k.prototype,{then:function(e,t){var n=new M(g(this,k)),r=n.promise,i=this._d;return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,i.c.push(n),i.a&&i.a.push(n),i.s&&P(i,!1),r},catch:function(e){return this.then(void 0,e)}})),c(c.G+c.W+c.F*!C,{Promise:k}),n(29)(k,b),n(54)(b),r=n(16)[b],c(c.S+c.F*!C,b,{reject:function(e){var t=new M(this),n=t.reject;return n(e),t.promise}}),c(c.S+c.F*(!C||E(!0)),b,{resolve:function(e){if(e instanceof k&&A(e.constructor,this))return e;var t=new M(this),n=t.resolve;return n(e),t.promise}}),c(c.S+c.F*!(C&&n(55)(function(e){k.all(e).catch(function(){})})),b,{all:function(e){var t=T(this),n=new M(t),r=n.resolve,o=n.reject,a=[],s=O(function(){d(e,!1,a.push,a);var n=a.length,s=Array(n);n?i.each.call(a,function(e,i){var a=!1;t.resolve(e).then(function(e){a||(a=!0,s[i]=e,--n||r(s))},o)}):r(s)});return s&&o(s.error),n.promise},race:function(e){var t=T(this),n=new M(t),r=n.reject,i=O(function(){d(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(37);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError(n+": use the 'new' operator!");return e}},function(e,t,n){var r=n(24),i=n(41),o=n(42),a=n(38),s=n(43),u=n(44);e.exports=function(e,t,n,c){var l,p,f,h=u(e),d=r(n,c,t?2:1),m=0;if("function"!=typeof h)throw TypeError(e+" is not iterable!");if(o(h))for(l=s(e.length);l>m;m++)t?d(a(p=e[m])[0],p[1]):d(e[m]);else for(f=h.call(e);!(p=f.next()).done;)i(f,d,p.value,t)}},function(e,t,n){var r=n(38);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(27),i=n(6)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){var r=n(19),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(4),i=n(6)("iterator"),o=n(27);e.exports=n(16).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(12).getDesc,i=n(37),o=n(38),a=function(e,t){if(o(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){try{i=n(24)(Function.call,r(Object.prototype,"__proto__").set,2),i(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:a}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(38),i=n(25),o=n(6)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r,i,o,a=n(8),s=n(49).set,u=a.MutationObserver||a.WebKitMutationObserver,c=a.process,l=a.Promise,p="process"==n(5)(c),f=function(){var e,t,n;for(p&&(e=c.domain)&&(c.domain=null,e.exit());r;)t=r.domain,n=r.fn,t&&t.enter(),n(),t&&t.exit(),r=r.next;i=void 0,e&&e.enter()};if(p)o=function(){c.nextTick(f)};else if(u){var h=1,d=document.createTextNode("");new u(f).observe(d,{characterData:!0}),o=function(){d.data=h=-h}}else o=l&&l.resolve?function(){l.resolve().then(f)}:function(){s.call(a,f)};e.exports=function(e){var t={fn:e,next:void 0,domain:p&&c.domain};i&&(i.next=t),r||(r=t,o()),i=t}},function(e,t,n){var r,i,o,a=n(24),s=n(50),u=n(51),c=n(52),l=n(8),p=l.process,f=l.setImmediate,h=l.clearImmediate,d=l.MessageChannel,m=0,v={},y="onreadystatechange",g=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},_=function(e){g.call(e.data)};f&&h||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},h=function(e){delete v[e]},"process"==n(5)(p)?r=function(e){p.nextTick(a(g,e,1))}:d?(i=new d,o=i.port2,i.port1.onmessage=_,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",_,!1)):r=y in c("script")?function(e){u.appendChild(c("script"))[y]=function(){u.removeChild(this),g.call(e)}}:function(e){setTimeout(a(g,e,1),0)}),e.exports={set:f,clear:h}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){e.exports=n(8).document&&document.documentElement},function(e,t,n){var r=n(37),i=n(8).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(10);e.exports=function(e,t){for(var n in t)r(e,n,t[n]);return e}},function(e,t,n){"use strict";var r=n(8),i=n(12),o=n(14),a=n(6)("species");e.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.setDesc(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(6)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}var o=n(57),a=i(o),s=n(60),u=i(s),c=n(94),l=i(c),p=n(131),f=i(p),h=n(136),d=i(h),m=n(177),v=i(m),y=n(414),g=i(y),_=n(1175),b=r(_),x=n(183),w=["url","spec","validatorUrl","onComplete","onFailure","authorizations","docExpansion","apisSorter","operationsSorter","supportedSubmitMethods","dom_id","defaultModelRendering","oauth2RedirectUrl","showRequestHeaders","custom","modelPropertyMacro","parameterMacro","displayOperationId"],k={PACKAGE_VERSION:"3.0.17",GIT_COMMIT:"gf3c3c5c",GIT_DIRTY:!0},S=k.GIT_DIRTY,E=k.GIT_COMMIT,C=k.PACKAGE_VERSION;e.exports=function(e){v.default.versions=v.default.versions||{},v.default.versions.swaggerUi=C+"/"+(E||"unknown")+(S?"-dirty":"");var t={dom_id:null,spec:{},url:"",layout:"BaseLayout",docExpansion:"list",validatorUrl:"https://online.swagger.io/validator",configs:{},custom:{},displayOperationId:!1,presets:[],plugins:[],fn:{},components:{},state:{},store:{}},n=(0,f.default)({},t,e),r=(0,f.default)({},n.store,{system:{configs:n.configs},plugins:n.presets,state:{layout:{layout:n.layout},spec:{spec:"",url:n.url}}}),i=function(){return{fn:n.fn,components:n.components,state:n.state}},o=new d.default(r);o.register([n.plugins,i]);var s=o.getSystem(),c=(0,x.parseSeach)();s.initOAuth=s.authActions.configureAuth;var p=function(e){if("object"!==("undefined"==typeof n?"undefined":(0,l.default)(n)))return s;var t=s.specSelectors.getLocalConfig?s.specSelectors.getLocalConfig():{},r=(0,f.default)({},t,n,e||{},c);return o.setConfigs((0,x.filterConfigs)(r,w)),null!==e&&(!c.url&&"object"===(0,l.default)(r.spec)&&(0,u.default)(r.spec).length?(s.specActions.updateUrl(""),s.specActions.updateLoadingStatus("success"),s.specActions.updateSpec((0,a.default)(r.spec))):s.specActions.download&&r.url&&(s.specActions.updateUrl(r.url),s.specActions.download(r.url))),r.dom_id?s.render(r.dom_id,"App"):console.error("Skipped rendering: no `dom_id` was specified"),s},h=c.config||n.configUrl;return!h||!s.specActions.getConfigByUrl||s.specActions.getConfigByUrl&&!s.specActions.getConfigByUrl(h,p)?p():s},e.exports.presets={apis:g.default},e.exports.plugins=b},function(e,t,n){e.exports={default:n(58),__esModule:!0}},function(e,t,n){var r=n(59),i=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(e){return i.stringify.apply(i,arguments)}},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports={default:n(61),__esModule:!0}},function(e,t,n){n(62),e.exports=n(59).Object.keys},function(e,t,n){var r=n(63),i=n(65);n(80)("keys",function(){return function(e){return i(r(e))}})},function(e,t,n){var r=n(64);e.exports=function(e){return Object(r(e))}},20,function(e,t,n){var r=n(66),i=n(79);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(67),i=n(68),o=n(71)(!1),a=n(75)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},26,function(e,t,n){var r=n(69),i=n(64);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(70);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},5,function(e,t,n){var r=n(68),i=n(72),o=n(74);e.exports=function(e){return function(t,n,a){var s,u=r(t),c=i(u.length),l=o(a,c);if(e&&n!=n){for(;c>l;)if(s=u[l++],s!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n){var r=n(73),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},19,function(e,t,n){var r=n(73),i=Math.max,o=Math.min;e.exports=function(e,t){return e=r(e),e<0?i(e+t,0):o(e,t)}},function(e,t,n){var r=n(76)("keys"),i=n(78);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(77),i="__core-js_shared__",o=r[i]||(r[i]={});e.exports=function(e){return o[e]||(o[e]={})}},8,9,function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(81),i=n(59),o=n(90);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(e,t,n){var r=n(77),i=n(59),o=n(82),a=n(84),s="prototype",u=function(e,t,n){var c,l,p,f=e&u.F,h=e&u.G,d=e&u.S,m=e&u.P,v=e&u.B,y=e&u.W,g=h?i:i[t]||(i[t]={}),_=g[s],b=h?r:d?r[t]:(r[t]||{})[s];h&&(n=t);for(c in n)l=!f&&b&&void 0!==b[c],l&&c in g||(p=l?b[c]:n[c],g[c]=h&&"function"!=typeof b[c]?n[c]:v&&l?o(p,r):y&&b[c]==p?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[s]=e[s],t}(p):m&&"function"==typeof p?o(Function.call,p):p,m&&((g.virtual||(g.virtual={}))[c]=p,e&u.R&&_&&!_[c]&&a(_,c,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){var r=n(83);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},25,function(e,t,n){var r=n(85),i=n(93);e.exports=n(89)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(86),i=n(88),o=n(92),a=Object.defineProperty;t.f=n(89)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(87);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},37,function(e,t,n){e.exports=!n(89)&&!n(90)(function(){return 7!=Object.defineProperty(n(91)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){e.exports=!n(90)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},15,function(e,t,n){var r=n(87),i=n(77).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(87);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},13,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(95),o=r(i),a=n(115),s=r(a),u="function"==typeof s.default&&"symbol"==typeof o.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};t.default="function"==typeof s.default&&"symbol"===u(o.default)?function(e){return"undefined"==typeof e?"undefined":u(e)}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":"undefined"==typeof e?"undefined":u(e)}},function(e,t,n){e.exports={default:n(96),__esModule:!0}},function(e,t,n){n(97),n(110),e.exports=n(114).f("iterator")},function(e,t,n){"use strict";var r=n(98)(!0);n(99)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(73),i=n(64);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(o=s.charCodeAt(u),o<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):(o-55296<<10)+(a-56320)+65536)}}},function(e,t,n){"use strict";var r=n(100),i=n(81),o=n(101),a=n(84),s=n(67),u=n(102),c=n(103),l=n(107),p=n(109),f=n(108)("iterator"),h=!([].keys&&"next"in[].keys()),d="@@iterator",m="keys",v="values",y=function(){return this};e.exports=function(e,t,n,g,_,b,x){c(n,t,g);var w,k,S,E=function(e){if(!h&&e in D)return D[e];switch(e){case m:return function(){return new n(this,e)};case v:return function(){return new n(this,e)}}return function(){return new n(this,e)}},C=t+" Iterator",A=_==v,T=!1,D=e.prototype,M=D[f]||D[d]||_&&D[_],O=M||E(_),P=_?A?E("entries"):O:void 0,I="Array"==t?D.entries||M:M;if(I&&(S=p(I.call(new e)),S!==Object.prototype&&(l(S,C,!0),r||s(S,f)||a(S,f,y))),A&&M&&M.name!==v&&(T=!0,O=function(){return M.call(this)}),r&&!x||!h&&!T&&D[f]||a(D,f,O),u[t]=O,u[C]=y,_)if(w={values:A?O:E(v),keys:b?O:E(m),entries:P},x)for(k in w)k in D||o(D,k,w[k]);else i(i.P+i.F*(h||T),t,w);return w}},function(e,t){e.exports=!0},function(e,t,n){e.exports=n(84)},27,function(e,t,n){"use strict";var r=n(104),i=n(93),o=n(107),a={};n(84)(a,n(108)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(86),i=n(105),o=n(79),a=n(75)("IE_PROTO"),s=function(){},u="prototype",c=function(){var e,t=n(91)("iframe"),r=o.length,i="<",a=">";for(t.style.display="none",n(106).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(i+"script"+a+"document.F=Object"+i+"/script"+a),e.close(),c=e.F;r--;)delete c[u][o[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[u]=r(e),n=new s,s[u]=null,n[a]=e):n=c(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(85),i=n(86),o=n(65);e.exports=n(89)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,u=0;s>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){e.exports=n(77).document&&document.documentElement},function(e,t,n){var r=n(85).f,i=n(67),o=n(108)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(76)("wks"),i=n(78),o=n(77).Symbol,a="function"==typeof o,s=e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))};s.store=r},function(e,t,n){var r=n(67),i=n(63),o=n(75)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){n(111);for(var r=n(77),i=n(84),o=n(102),a=n(108)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=s[u],l=r[c],p=l&&l.prototype;p&&!p[a]&&i(p,a,c),o[c]=o.Array}},function(e,t,n){"use strict";var r=n(112),i=n(113),o=n(102),a=n(68);e.exports=n(99)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},33,function(e,t,n){t.f=n(108)},function(e,t,n){e.exports={default:n(116),__esModule:!0}},function(e,t,n){n(117),n(128),n(129),n(130),e.exports=n(59).Symbol},function(e,t,n){"use strict";var r=n(77),i=n(67),o=n(89),a=n(81),s=n(101),u=n(118).KEY,c=n(90),l=n(76),p=n(107),f=n(78),h=n(108),d=n(114),m=n(119),v=n(120),y=n(121),g=n(124),_=n(86),b=n(68),x=n(92),w=n(93),k=n(104),S=n(125),E=n(127),C=n(85),A=n(65),T=E.f,D=C.f,M=S.f,O=r.Symbol,P=r.JSON,I=P&&P.stringify,N="prototype",R=h("_hidden"),j=h("toPrimitive"),F={}.propertyIsEnumerable,B=l("symbol-registry"),L=l("symbols"),z=l("op-symbols"),q=Object[N],U="function"==typeof O,W=r.QObject,K=!W||!W[N]||!W[N].findChild,V=o&&c(function(){return 7!=k(D({},"a",{get:function(){return D(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=T(q,t);r&&delete q[t],D(e,t,n),r&&e!==q&&D(q,t,r)}:D,H=function(e){var t=L[e]=k(O[N]);return t._k=e,t},J=U&&"symbol"==typeof O.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof O},G=function(e,t,n){return e===q&&G(z,t,n),_(e),t=x(t,!0),_(n),i(L,t)?(n.enumerable?(i(e,R)&&e[R][t]&&(e[R][t]=!1),n=k(n,{enumerable:w(0,!1)})):(i(e,R)||D(e,R,w(1,{})),e[R][t]=!0),V(e,t,n)):D(e,t,n)},X=function(e,t){_(e);for(var n,r=y(t=b(t)),i=0,o=r.length;o>i;)G(e,n=r[i++],t[n]);return e},Y=function(e,t){return void 0===t?k(e):X(k(e),t)},$=function(e){var t=F.call(this,e=x(e,!0));return!(this===q&&i(L,e)&&!i(z,e))&&(!(t||!i(this,e)||!i(L,e)||i(this,R)&&this[R][e])||t)},Z=function(e,t){if(e=b(e),t=x(t,!0),e!==q||!i(L,t)||i(z,t)){var n=T(e,t);return!n||!i(L,t)||i(e,R)&&e[R][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=M(b(e)),r=[],o=0;n.length>o;)i(L,t=n[o++])||t==R||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===q,r=M(n?z:b(e)),o=[],a=0;r.length>a;)!i(L,t=r[a++])||n&&!i(q,t)||o.push(L[t]);return o};U||(O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===q&&t.call(z,n),i(this,R)&&i(this[R],e)&&(this[R][e]=!1),V(this,e,w(1,n))};return o&&K&&V(q,e,{configurable:!0,set:t}),H(e)},s(O[N],"toString",function(){return this._k}),E.f=Z,C.f=G,n(126).f=S.f=Q,n(123).f=$,n(122).f=ee,o&&!n(100)&&s(q,"propertyIsEnumerable",$,!0),d.f=function(e){return H(h(e))}),a(a.G+a.W+a.F*!U,{Symbol:O});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)h(te[ne++]);for(var te=A(h.store),ne=0;te.length>ne;)m(te[ne++]);a(a.S+a.F*!U,"Symbol",{for:function(e){return i(B,e+="")?B[e]:B[e]=O(e)},keyFor:function(e){if(J(e))return v(B,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){K=!0},useSimple:function(){K=!1}}),a(a.S+a.F*!U,"Object",{create:Y,defineProperty:G,defineProperties:X,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:ee}),P&&a(a.S+a.F*(!U||c(function(){var e=O();return"[null]"!=I([e])||"{}"!=I({a:e})||"{}"!=I(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!J(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return t=r[1],"function"==typeof t&&(n=t),!n&&g(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!J(t))return t}),r[1]=t,I.apply(P,r)}}}),O[N][j]||n(84)(O[N],j,O[N].valueOf),p(O,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(e,t,n){var r=n(78)("meta"),i=n(87),o=n(67),a=n(85).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(90)(function(){return u(Object.preventExtensions({}))}),l=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},p=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[r].i},f=function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[r].w},h=function(e){return c&&d.NEED&&u(e)&&!o(e,r)&&l(e),e},d=e.exports={KEY:r,NEED:!1,fastKey:p,getWeak:f,onFreeze:h}},function(e,t,n){var r=n(77),i=n(59),o=n(100),a=n(114),s=n(85).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){var r=n(65),i=n(68);e.exports=function(e,t){for(var n,o=i(e),a=r(o),s=a.length,u=0;s>u;)if(o[n=a[u++]]===t)return n}},function(e,t,n){var r=n(65),i=n(122),o=n(123);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),u=o.f,c=0;s.length>c;)u.call(e,a=s[c++])&&t.push(a);return t}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(70);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(68),i=n(126).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return i(e)}catch(e){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?s(e):i(r(e))}},function(e,t,n){var r=n(66),i=n(79).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(123),i=n(93),o=n(68),a=n(92),s=n(67),u=n(88),c=Object.getOwnPropertyDescriptor;t.f=n(89)?c:function(e,t){if(e=o(e),t=a(t,!0),u)try{return c(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t){},function(e,t,n){n(119)("asyncIterator")},function(e,t,n){n(119)("observable")},function(e,t,n){(function(t){/*! + * @description Recursive object extending + * @author Viacheslav Lotsmanov + * @license MIT + * + * The MIT License (MIT) + * + * Copyright (c) 2013-2015 Viacheslav Lotsmanov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +"use strict";function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function i(e){var t=[];return e.forEach(function(e,a){"object"==typeof e&&null!==e?Array.isArray(e)?t[a]=i(e):n(e)?t[a]=r(e):t[a]=o({},e):t[a]=e}),t}var o=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,a=arguments[0],s=Array.prototype.slice.call(arguments,1);return s.forEach(function(s){"object"!=typeof s||Array.isArray(s)||Object.keys(s).forEach(function(u){return t=a[u],e=s[u],e===a?void 0:"object"!=typeof e||null===e?void(a[u]=e):Array.isArray(e)?void(a[u]=i(e)):n(e)?void(a[u]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(a[u]=o({},e)):void(a[u]=o(t,e))})}),a}}).call(t,n(132).Buffer)},function(e,t,n){(function(e){/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),a.alloc(+e)}function y(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return V(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return D(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:x(e,t,n,r,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):x(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function x(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;cs&&(n=s-u),c=n;c>=0;c--){for(var p=!0,f=0;fi&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=n){var u,c,l,p;switch(s){case 1:o<128&&(a=o);break;case 2:u=e[i+1],128===(192&u)&&(p=(31&o)<<6|63&u,p>127&&(a=p));break;case 3:u=e[i+1],c=e[i+2],128===(192&u)&&128===(192&c)&&(p=(15&o)<<12|(63&u)<<6|63&c,p>2047&&(p<55296||p>57343)&&(a=p));break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(p=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l,p>65535&&p<1114112&&(a=p))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return M(r)}function M(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function F(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function B(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function L(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,r,i){return i||L(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,n,r,23,4),n+4}function q(e,t,n,r,i){return i||L(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,n,r,52,8),n+8}function U(e){if(e=W(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function W(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function G(e){return $.toByteArray(U(e))}function X(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e){return e!==e}var $=n(133),Z=n(134),Q=n(135);t.Buffer=a,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),t.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return s(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return c(null,e,t,n)},a.allocUnsafe=function(e){return l(null,e)},a.allocUnsafeSlow=function(e){return l(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,u=Math.min(o,s),c=this.slice(r,i),l=e.slice(t,n),p=0;pi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return S(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},a.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;j(this,e,t,n,i,0)}var o=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+o]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return q(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return q(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-n(e)}function i(e){var t,r,i,o,a,s=e.length;o=n(e),a=new l(3*s/4-o),r=o>0?s-4:s;var u=0;for(t=0;t>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,a[u++]=255&i):1===o&&(i=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function a(e,t,n){for(var r,i=[],a=t;al?l:c+s));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),o.push(i),o.join("")}t.byteLength=r,t.toByteArray=i,t.fromByteArray=s;for(var u=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,h=p.length;f>1,l=-7,p=n?i-1:0,f=n?-1:1,h=e[t+p];for(p+=f,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+p],p+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+p],p+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+p>=1?f/u:f*Math.pow(2,1-p),t*u>=2&&(a++,u/=2),a+p>=l?(s=0,a=l):a+p>=1?(s=(t*u-1)*Math.pow(2,i),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=d,a/=256,c-=8);e[n+h-d]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){var r=[(0,P.systemThunkMiddleware)(n)],i=O.default.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||x.compose;return(0,x.createStore)(e,t,i(x.applyMiddleware.apply(void 0,r)))}function o(e,t){return(0,P.isObject)(e)&&!(0,P.isArray)(e)?e:(0,P.isFunc)(e)?o(e(t),t):(0,P.isArray)(e)?e.map(function(e){return o(e,t)}).reduce(a,{}):{}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,P.isObject)(e))return{};if(!(0,P.isObject)(t))return e;var n=e.statePlugins;if((0,P.isObject)(n))for(var r in n){var i=n[r];if((0,P.isObject)(i)&&(0,P.isObject)(i.wrapActions)){var o=i.wrapActions;for(var a in o){var s=o[a];Array.isArray(s)||(s=[s],o[a]=s),t&&t.statePlugins&&t.statePlugins[r]&&t.statePlugins[r].wrapActions&&t.statePlugins[r].wrapActions[a]&&(t.statePlugins[r].wrapActions[a]=o[a].concat(t.statePlugins[r].wrapActions[a]))}}}return(0,E.default)(e,t)}function s(e){var t=(0,P.objMap)(e,function(e){return e.reducers});return u(t)}function u(e){var t=(0,f.default)(e).reduce(function(t,n){return t[n]=c(e[n]),t},{});return(0,f.default)(t).length?(0,C.combineReducers)(t):I}function c(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new w.Map,n=arguments[1];if(!e)return t;var r=e[n.type];return r?r(t,n):t}}function l(e,t,n){var r=i(e,t,n);return r}Object.defineProperty(t,"__esModule",{value:!0});var p=n(60),f=r(p),h=n(137),d=r(h),m=n(141),v=r(m),y=n(145),g=r(y),_=n(146),b=r(_),x=n(147),w=n(168),k=r(w),S=n(131),E=r(S),C=n(169),A=n(175),T=r(A),D=n(176),M=n(177),O=r(M),P=n(183),I=function(e){return e},N=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,g.default)(this,e),(0,E.default)(this,{state:{},plugins:[],system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},t),this.getSystem=this._getSystem.bind(this),this.store=l(I,(0,w.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}return(0,b.default)(e,[{key:"getStore",value:function(){return this.store}},{key:"register",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o(e,this.getSystem());a(this.system,n),t&&this.buildSystem()}},{key:"buildSystem",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getStore().dispatch,n=this.getStore().getState;this.boundSystem=(0,v.default)({},this.getRootInjects(),this.getWrappedAndBoundActions(t),this.getBoundSelectors(n,this.getSystem),this.getStateThunks(n),this.getFn(),this.getConfigs()),e&&this.rebuildReducer()}},{key:"_getSystem",value:function(){return this.boundSystem}},{key:"getRootInjects",value:function(){return(0,v.default)({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:k.default},this.system.rootInjects||{})}},{key:"_getConfigs",value:function(){return this.system.configs}},{key:"getConfigs",value:function(){return{configs:this.system.configs}}},{key:"setConfigs",value:function(e){this.system.configs=e}},{key:"rebuildReducer",value:function(){this.store.replaceReducer(s(this.system.statePlugins))}},{key:"getType",value:function(e){var t=e[0].toUpperCase()+e.slice(1);return(0,P.objReduce)(this.system.statePlugins,function(n,r){var i=n[e];if(i)return(0,d.default)({},r+t,i)})}},{key:"getSelectors",value:function(){return this.getType("selectors")}},{key:"getActions",value:function(){var e=this.getType("actions");return(0,P.objMap)(e,function(e){return(0,P.objReduce)(e,function(e,t){if((0,P.isFn)(e))return(0,d.default)({},t,e)})})}},{key:"getWrappedAndBoundActions",value:function(e){var t=this,n=this.getBoundActions(e);return(0,P.objMap)(n,function(e,n){var r=t.system.statePlugins[n.slice(0,-7)].wrapActions;return r?(0,P.objMap)(e,function(e,n){var i=r[n];return i?(Array.isArray(i)||(i=[i]),i.reduce(function(e,n){var r=function(){return n(e,t.getSystem()).apply(void 0,arguments)};if(!(0,P.isFn)(r))throw new TypeError("wrapActions needs to return a function that returns a new function (ie the wrapped action)");return r},e||Function.prototype)):e}):e})}},{key:"getStates",value:function(e){return(0,f.default)(this.system.statePlugins).reduce(function(t,n){return t[n]=e.get(n),t},{})}},{key:"getStateThunks",value:function(e){return(0,f.default)(this.system.statePlugins).reduce(function(t,n){return t[n]=function(){return e().get(n)},t},{})}},{key:"getFn",value:function(){return{fn:this.system.fn}}},{key:"getComponents",value:function(e){return"undefined"!=typeof e?this.system.components[e]:this.system.components}},{key:"getBoundSelectors",value:function(e,t){return(0,P.objMap)(this.getSelectors(),function(n,r){var i=[r.slice(0,-9)],o=function(){return e().getIn(i)};return(0,P.objMap)(n,function(e){return function(){for(var n=arguments.length,r=Array(n),i=0;ic;)for(var f,h=s(arguments[c++]),d=l?r(h).concat(l(h)):r(h),m=d.length,v=0;m>v;)p.call(h,f=d[v++])&&(n[f]=h[f]);return n}:u},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(138),o=r(i);t.default=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(u)throw u;for(var r=!1,o={},a=0;a>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?d(e)+t:t}function v(){return!0}function y(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function g(e,t){return b(e,t,0)}function _(e,t){return b(e,t,t)}function b(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function x(e){this.next=e}function w(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function k(){return{value:void 0,done:!0}}function S(e){return!!A(e)}function E(e){return e&&"function"==typeof e.next}function C(e){var t=A(e);return t&&t.call(e)}function A(e){var t=e&&(kn&&e[kn]||e[Sn]);if("function"==typeof t)return t}function T(e){return e&&"number"==typeof e.length}function D(e){return null===e||void 0===e?B():o(e)?e.toSeq():q(e)}function M(e){return null===e||void 0===e?B().toKeyedSeq():o(e)?a(e)?e.toSeq():e.fromEntrySeq():L(e)}function O(e){return null===e||void 0===e?B():o(e)?a(e)?e.entrySeq():e.toIndexedSeq():z(e)}function P(e){return(null===e||void 0===e?B():o(e)?a(e)?e.entrySeq():e:z(e)).toSetSeq()}function I(e){this._array=e,this.size=e.length}function N(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function R(e){this._iterable=e,this.size=e.length||e.size}function j(e){this._iterator=e,this._iteratorCache=[]}function F(e){return!(!e||!e[Cn])}function B(){return An||(An=new I([]))}function L(e){var t=Array.isArray(e)?new I(e).fromEntrySeq():E(e)?new j(e).fromEntrySeq():S(e)?new R(e).fromEntrySeq():"object"==typeof e?new N(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function z(e){var t=U(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function q(e){var t=U(e)||"object"==typeof e&&new N(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function U(e){return T(e)?new I(e):E(e)?new j(e):S(e)?new R(e):void 0}function W(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(t(s[1],r?s[0]:a,e)===!1)return a+1}return a}return e.__iterateUncached(t,n)}function K(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new x(function(){var e=i[n?o-a:a];return a++>o?k():w(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function V(e,t){return t?H(t,e,"",{"":e}):J(e)}function H(e,t,n,r){return Array.isArray(t)?e.call(r,n,O(t).map(function(n,r){return H(e,n,r,t)})):G(t)?e.call(r,n,M(t).map(function(n,r){return H(e,n,r,t)})):t}function J(e){return Array.isArray(e)?O(e).map(J).toList():G(e)?M(e).map(J).toMap():e}function G(e){return e&&(e.constructor===Object||void 0===e.constructor)}function X(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function Y(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||a(e)!==a(t)||s(e)!==s(t)||c(e)!==c(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!u(e);if(c(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&X(i[1],e)&&(n||X(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var l=e;e=t,t=l}var p=!0,f=t.__iterate(function(t,r){if(n?!e.has(t):i?!X(t,e.get(r,yn)):!X(e.get(r,yn),t))return p=!1,!1});return p&&e.size===f}function $(e,t){if(!(this instanceof $))return new $(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Tn)return Tn;Tn=this}}function Z(e,t){if(!e)throw new Error(t)}function Q(e,t,n){if(!(this instanceof Q))return new Q(e,t,n);if(Z(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t>>1&1073741824|3221225471&e}function oe(e){if(e===!1||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(e=e.valueOf(),e===!1||null===e||void 0===e))return 0;if(e===!0)return 1;var t=typeof e;if("number"===t){if(e!==e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return ie(n)}if("string"===t)return e.length>Fn?ae(e):se(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return ue(e);if("function"==typeof e.toString)return se(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ae(e){var t=zn[e];return void 0===t&&(t=se(e),Ln===Bn&&(Ln=0,zn={}),Ln++,zn[e]=t),t}function se(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function le(e){Z(e!==1/0,"Cannot perform this action with an infinite size.")}function pe(e){return null===e||void 0===e?we():fe(e)&&!c(e)?e:we().withMutations(function(t){var r=n(e);le(r.size),r.forEach(function(e,n){return t.set(n,e)})})}function fe(e){return!(!e||!e[qn])}function he(e,t){this.ownerID=e,this.entries=t}function de(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function me(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function ve(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function ye(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function ge(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&be(e._root)}function _e(e,t){return w(e,t[0],t[1])}function be(e,t){return{node:e,index:0,__prev:t}}function xe(e,t,n,r){var i=Object.create(Un);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function we(){return Wn||(Wn=xe(0))}function ke(e,t,n){var r,i;if(e._root){var o=l(gn),a=l(_n);if(r=Se(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===yn?-1:1:0)}else{if(n===yn)return e;i=1,r=new he(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?xe(i,r):we()}function Se(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===yn?e:(p(s),p(a),new ye(t,r,[i,o]))}function Ee(e){return e.constructor===ye||e.constructor===ve}function Ce(e,t,n,r,i){if(e.keyHash===r)return new ve(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&vn,s=(0===n?r:r>>>n)&vn,u=a===s?[Ce(e,t,n+dn,r,i)]:(o=new ye(t,r,i),a>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new me(e,o+1,a)}function Me(e,t,r){for(var i=[],a=0;a>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,127&e}function je(e,t,n,r){var i=r?e:h(e);return i[t]=n,i}function Fe(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;s0&&io?0:o-n,c=a-n;return c>mn&&(c=mn),function(){if(i===c)return Yn;var e=t?--c:i++;return r&&r[e]}}function i(e,r,i){var s,u=e&&e.array,c=i>o?0:o-i>>r,l=(a-i>>r)+1;return l>mn&&(l=mn),function(){for(;;){if(s){var e=s();if(e!==Yn)return e;s=null}if(c===l)return Yn;var o=t?--l:c++;s=n(u&&u[o],r-dn,i+(o<=e.size||t<0)return e.withMutations(function(e){t<0?Xe(e,t).set(0,n):Xe(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=l(_n);return t>=$e(e._capacity)?r=He(r,e.__ownerID,0,t,n,o):i=He(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):We(e._origin,e._capacity,e._level,i,r):e}function He(e,t,n,r,i,o){var a=r>>>n&vn,s=e&&a0){var c=e&&e.array[a],l=He(c,t,n-dn,r,i,o);return l===c?e:(u=Je(e,t),u.array[a]=l,u)}return s&&e.array[a]===i?e:(p(o),u=Je(e,t),void 0===i&&a===u.array.length-1?u.array.pop():u.array[a]=i,u)}function Je(e,t){return t&&e&&t===e.ownerID?e:new qe(e?e.array.slice():[],t)}function Ge(e,t){if(t>=$e(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&vn],r-=dn;return n}}function Xe(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new f,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var u=e._level,c=e._root,l=0;a+l<0;)c=new qe(c&&c.array.length?[void 0,c]:[],r),u+=dn,l+=1<=1<p?new qe([],r):d;if(d&&h>p&&adn;y-=dn){var g=p>>>y&vn;v=v.array[g]=Je(v.array[g],r)}v.array[p>>>dn&vn]=d}if(s=h)a-=h,s-=h,u=dn,c=null,m=m&&m.removeBefore(r,0,a);else if(a>i||h>>u&vn;if(_!==h>>>u&vn)break;_&&(l+=(1<i&&(c=c.removeBefore(r,u,a-l)),c&&ha&&(a=c.size),o(u)||(c=c.map(function(e){return V(e)})),i.push(c)}return a>e.size&&(e=e.setSize(a)),Ie(e,t,i)}function $e(e){return e>>dn<=mn&&a.size>=2*o.size?(i=a.filter(function(e,t){return void 0!==e&&s!==t}),r=i.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):et(r,i)}function rt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function it(e){this._iter=e,this.size=e.size}function ot(e){this._iter=e,this.size=e.size}function at(e){this._iter=e,this.size=e.size}function st(e){var t=Tt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Dt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return t(n,e,r)!==!1},n)},t.__iteratorUncached=function(t,n){if(t===wn){var r=e.__iterator(t,n);return new x(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===xn?bn:xn,n)},t}function ut(e,t,n){var r=Tt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,yn);return o===yn?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return r(t.call(n,e,i,a),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(wn,i);return new x(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return w(r,s,t.call(n,a[1],s,e),i)})},r}function ct(e,t){var n=Tt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=st(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Dt,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function lt(e,t,n,r){var i=Tt(e);return r&&(i.has=function(r){var i=e.get(r,yn);return i!==yn&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,yn);return o!==yn&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate(function(e,o,u){if(t.call(n,e,o,u))return s++,i(e,r?o:s-1,a)},o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(wn,o),s=0;return new x(function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return w(i,r?c:s++,l,o)}})},i}function pt(e,t,n){var r=pe().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function ft(e,t,n){var r=a(e),i=(c(e)?Ze():pe()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return e=e||[],e.push(r?[a,o]:o),e})});var o=At(e);return i.map(function(t){return St(e,o(t))})}function ht(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),y(t,n,i))return e;var o=g(t,i),a=_(n,i);if(o!==o||a!==a)return ht(e.toSeq().cacheResult(),t,n,r);var s,u=a-o;u===u&&(s=u<0?0:u);var c=Tt(e);return c.size=0===s?s:e.size&&s||void 0,!r&&F(e)&&s>=0&&(c.get=function(t,n){return t=m(this,t),t>=0&&ts)return k();var e=i.next();return r||t===xn?e:t===bn?w(t,u-1,void 0,e):w(t,u-1,e.value[1],e)})},c}function dt(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(wn,i),s=!0;return new x(function(){if(!s)return k();var e=a.next();if(e.done)return e;var i=e.value,u=i[0],c=i[1];return t.call(n,c,u,o)?r===wn?e:w(r,u,c,e):(s=!1,k())})},r}function mt(e,t,n,r){var i=Tt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return e.__iterate(function(e,o,c){if(!s||!(s=t.call(n,e,o,c)))return u++,i(e,r?o:u-1,a)}),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(wn,o),u=!0,c=0;return new x(function(){var e,o,l;do{if(e=s.next(),e.done)return r||i===xn?e:i===bn?w(i,c++,void 0,e):w(i,c++,e.value[1],e);var p=e.value;o=p[0],l=p[1],u&&(u=t.call(n,l,o,a))}while(u);return i===wn?e:w(i,o,l,e)})},i}function vt(e,t){var r=a(e),i=[e].concat(t).map(function(e){return o(e)?r&&(e=n(e)):e=r?L(e):z(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var u=i[0];if(u===e||r&&a(u)||s(e)&&s(u))return u}var c=new I(i);return r?c=c.toKeyedSeq():s(e)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function yt(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){function a(e,c){var l=this;e.__iterate(function(e,i){return(!t||c0}function kt(e,n,r){var i=Tt(e);return i.size=new I(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(xn,t),i=0;!(n=r.next()).done&&e(n.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=t(e),C(i?e.reverse():e)}),a=0,s=!1;return new x(function(){var t;return s||(t=o.map(function(e){return e.next()}),s=t.some(function(e){return e.done})),s?k():w(e,a++,n.apply(null,t.map(function(e){return e.value})))})},i}function St(e,t){return F(e)?t:e.constructor(t)}function Et(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ct(e){return le(e.size),d(e)}function At(e){return a(e)?n:s(e)?r:i}function Tt(e){return Object.create((a(e)?M:s(e)?O:P).prototype)}function Dt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):D.prototype.cacheResult.call(this)}function Mt(e,t){return e>t?1:et?-1:0}function on(e){if(e.size===1/0)return 0;var t=c(e),n=a(e),r=t?1:0,i=e.__iterate(n?t?function(e,t){r=31*r+sn(oe(e),oe(t))|0}:function(e,t){r=r+sn(oe(e),oe(t))|0}:t?function(e){r=31*r+oe(e)|0}:function(e){r=r+oe(e)|0});return an(i,r)}function an(e,t){return t=On(t,3432918353),t=On(t<<15|t>>>-15,461845907),t=On(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=On(t^t>>>16,2246822507),t=On(t^t>>>13,3266489909),t=ie(t^t>>>16)}function sn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var un=Array.prototype.slice;e(n,t),e(r,t),e(i,t),t.isIterable=o,t.isKeyed=a,t.isIndexed=s,t.isAssociative=u,t.isOrdered=c,t.Keyed=n,t.Indexed=r,t.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",ln="@@__IMMUTABLE_KEYED__@@",pn="@@__IMMUTABLE_INDEXED__@@",fn="@@__IMMUTABLE_ORDERED__@@",hn="delete",dn=5,mn=1<r?k():w(e,i,n[t?r-i++:i++])})},e(N,M),N.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},N.prototype.has=function(e){return this._object.hasOwnProperty(e)},N.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(e(n[a],a,this)===!1)return o+1}return o},N.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new x(function(){var a=r[t?i-o:o];return o++>i?k():w(e,a,n[a])})},N.prototype[fn]=!0, +e(R,O),R.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=C(n),i=0;if(E(r))for(var o;!(o=r.next()).done&&e(o.value,i++,this)!==!1;);return i},R.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=C(n);if(!E(r))return new x(k);var i=0;return new x(function(){var t=r.next();return t.done?t:w(e,i++,t.value)})},e(j,O),j.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return w(e,i,r[i++])})};var An;e($,O),$.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},$.prototype.get=function(e,t){return this.has(e)?this._value:t},$.prototype.includes=function(e){return X(this._value,e)},$.prototype.slice=function(e,t){var n=this.size;return y(e,t,n)?this:new $(this._value,_(t,n)-g(e,n))},$.prototype.reverse=function(){return this},$.prototype.indexOf=function(e){return X(this._value,e)?0:-1},$.prototype.lastIndexOf=function(e){return X(this._value,e)?this.size:-1},$.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?k():w(e,o++,a)})},Q.prototype.equals=function(e){return e instanceof Q?this._start===e._start&&this._end===e._end&&this._step===e._step:Y(this,e)};var Dn;e(ee,t),e(te,ee),e(ne,ee),e(re,ee),ee.Keyed=te,ee.Indexed=ne,ee.Set=re;var Mn,On="function"==typeof Math.imul&&Math.imul(4294967295,2)===-2?Math.imul:function(e,t){e|=0,t|=0;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},Pn=Object.isExtensible,In=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),Nn="function"==typeof WeakMap;Nn&&(Mn=new WeakMap);var Rn=0,jn="__immutablehash__";"function"==typeof Symbol&&(jn=Symbol(jn));var Fn=16,Bn=255,Ln=0,zn={};e(pe,te),pe.of=function(){var e=un.call(arguments,0);return we().withMutations(function(t){for(var n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},pe.prototype.toString=function(){return this.__toString("Map {","}")},pe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},pe.prototype.set=function(e,t){return ke(this,e,t)},pe.prototype.setIn=function(e,t){return this.updateIn(e,yn,function(){return t})},pe.prototype.remove=function(e){return ke(this,e,yn)},pe.prototype.deleteIn=function(e){return this.updateIn(e,function(){return yn})},pe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},pe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=Ne(this,Ot(e),t,n);return r===yn?void 0:r},pe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):we()},pe.prototype.merge=function(){return Me(this,void 0,arguments)},pe.prototype.mergeWith=function(e){var t=un.call(arguments,1);return Me(this,e,t)},pe.prototype.mergeIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,we(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},pe.prototype.mergeDeep=function(){return Me(this,Oe,arguments)},pe.prototype.mergeDeepWith=function(e){var t=un.call(arguments,1);return Me(this,Pe(e),t)},pe.prototype.mergeDeepIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,we(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},pe.prototype.sort=function(e){return Ze(bt(this,e))},pe.prototype.sortBy=function(e,t){return Ze(bt(this,t,e))},pe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},pe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new f)},pe.prototype.asImmutable=function(){return this.__ensureOwner()},pe.prototype.wasAltered=function(){return this.__altered},pe.prototype.__iterator=function(e,t){return new ge(this,e,t)},pe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},pe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?xe(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},pe.isMap=fe;var qn="@@__IMMUTABLE_MAP__@@",Un=pe.prototype;Un[qn]=!0,Un[hn]=Un.remove,Un.removeIn=Un.deleteIn,he.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=Kn)return Ae(e,u,r,i);var d=e&&e===this.ownerID,m=d?u:h(u);return f?s?c===l-1?m.pop():m[c]=m.pop():m[c]=[r,i]:m.push([r,i]),d?(this.entries=m,this):new he(e,m)}},de.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=1<<((0===e?t:t>>>e)&vn),o=this.bitmap;return 0===(o&i)?r:this.nodes[Re(o&i-1)].get(e+dn,t,n,r)},de.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&vn,u=1<=Vn)return De(e,f,c,s,d);if(l&&!d&&2===f.length&&Ee(f[1^p]))return f[1^p];if(l&&d&&1===f.length&&Ee(d))return d;var m=e&&e===this.ownerID,v=l?d?c:c^u:c|u,y=l?d?je(f,p,d,m):Be(f,p,m):Fe(f,p,d,m);return m?(this.bitmap=v,this.nodes=y,this):new de(e,v,y)},me.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=(0===e?t:t>>>e)&vn,o=this.nodes[i];return o?o.get(e+dn,t,n,r):r},me.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&vn,u=i===yn,c=this.nodes,l=c[s];if(u&&!l)return this;var p=Se(l,e,t+dn,n,r,i,o,a);if(p===l)return this;var f=this.count;if(l){if(!p&&(f--,f=0&&e>>t&vn;if(r>=this.array.length)return new qe([],e);var i,o=0===r;if(t>0){var a=this.array[r];if(i=a&&a.removeBefore(e,t-dn,n),i===a&&o)return this}if(o&&!i)return this;var s=Je(this,e);if(!o)for(var u=0;u>>t&vn;if(r>=this.array.length)return this;var i;if(t>0){var o=this.array[r];if(i=o&&o.removeAfter(e,t-dn,n),i===o&&r===this.array.length-1)return this}var a=Je(this,e);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Xn,Yn={};e(Ze,pe),Ze.of=function(){return this(arguments)},Ze.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ze.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Ze.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):tt()},Ze.prototype.set=function(e,t){return nt(this,e,t)},Ze.prototype.remove=function(e){return nt(this,e,yn)},Ze.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ze.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Ze.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Ze.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?et(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Ze.isOrderedMap=Qe,Ze.prototype[fn]=!0,Ze.prototype[hn]=Ze.prototype.remove;var $n;e(rt,M),rt.prototype.get=function(e,t){return this._iter.get(e,t)},rt.prototype.has=function(e){return this._iter.has(e)},rt.prototype.valueSeq=function(){return this._iter.valueSeq()},rt.prototype.reverse=function(){var e=this,t=ct(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},rt.prototype.map=function(e,t){var n=this,r=ut(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},rt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Ct(this):0,function(i){return e(i,t?--n:n++,r)}),t)},rt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(xn,t),r=t?Ct(this):0;return new x(function(){var i=n.next();return i.done?i:w(e,t?--r:r++,i.value,i)})},rt.prototype[fn]=!0,e(it,O),it.prototype.includes=function(e){return this._iter.includes(e)},it.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},it.prototype.__iterator=function(e,t){var n=this._iter.__iterator(xn,t),r=0;return new x(function(){var t=n.next();return t.done?t:w(e,r++,t.value,t)})},e(ot,P),ot.prototype.has=function(e){return this._iter.includes(e)},ot.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},ot.prototype.__iterator=function(e,t){var n=this._iter.__iterator(xn,t);return new x(function(){var t=n.next();return t.done?t:w(e,t.value,t.value,t)})},e(at,M),at.prototype.entrySeq=function(){return this._iter.toSeq()},at.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){Et(t);var r=o(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},at.prototype.__iterator=function(e,t){var n=this._iter.__iterator(xn,t);return new x(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){Et(r);var i=o(r);return w(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},it.prototype.cacheResult=rt.prototype.cacheResult=ot.prototype.cacheResult=at.prototype.cacheResult=Dt,e(Pt,te),Pt.prototype.toString=function(){return this.__toString(Nt(this)+" {","}")},Pt.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Pt.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Pt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=It(this,we()))},Pt.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Nt(this));if(this._map&&!this._map.has(e)){var n=this._defaultValues[e];if(t===n)return this}var r=this._map&&this._map.set(e,t);return this.__ownerID||r===this._map?this:It(this,r)},Pt.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:It(this,t)},Pt.prototype.wasAltered=function(){return this._map.wasAltered()},Pt.prototype.__iterator=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterator(e,t)},Pt.prototype.__iterate=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterate(e,t)},Pt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?It(this,t,e):(this.__ownerID=e,this._map=t,this)};var Zn=Pt.prototype;Zn[hn]=Zn.remove,Zn.deleteIn=Zn.removeIn=Un.removeIn,Zn.merge=Un.merge,Zn.mergeWith=Un.mergeWith,Zn.mergeIn=Un.mergeIn,Zn.mergeDeep=Un.mergeDeep,Zn.mergeDeepWith=Un.mergeDeepWith,Zn.mergeDeepIn=Un.mergeDeepIn,Zn.setIn=Un.setIn,Zn.update=Un.update,Zn.updateIn=Un.updateIn,Zn.withMutations=Un.withMutations,Zn.asMutable=Un.asMutable,Zn.asImmutable=Un.asImmutable,e(Ft,re),Ft.of=function(){return this(arguments)},Ft.fromKeys=function(e){return this(n(e).keySeq())},Ft.prototype.toString=function(){return this.__toString("Set {","}")},Ft.prototype.has=function(e){return this._map.has(e)},Ft.prototype.add=function(e){return Lt(this,this._map.set(e,!0))},Ft.prototype.remove=function(e){return Lt(this,this._map.remove(e))},Ft.prototype.clear=function(){return Lt(this,this._map.clear())},Ft.prototype.union=function(){var e=un.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Gt(e,t)},Ht.prototype.pushAll=function(e){if(e=r(e),0===e.size)return this;le(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Gt(t,n)},Ht.prototype.pop=function(){return this.slice(1)},Ht.prototype.unshift=function(){return this.push.apply(this,arguments)},Ht.prototype.unshiftAll=function(e){return this.pushAll(e)},Ht.prototype.shift=function(){return this.pop.apply(this,arguments)},Ht.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Xt()},Ht.prototype.slice=function(e,t){if(y(e,t,this.size))return this;var n=g(e,this.size),r=_(t,this.size);if(r!==this.size)return ne.prototype.slice.call(this,e,t);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Gt(i,o)},Ht.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Gt(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ht.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&e(r.value,n++,this)!==!1;)r=r.next;return n},Ht.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new x(function(){if(r){var t=r.value;return r=r.next,w(e,n++,t)}return k()})},Ht.isStack=Jt;var ir="@@__IMMUTABLE_STACK__@@",or=Ht.prototype;or[ir]=!0,or.withMutations=Un.withMutations,or.asMutable=Un.asMutable,or.asImmutable=Un.asImmutable,or.wasAltered=Un.wasAltered;var ar;t.Iterator=x,Yt(t,{toArray:function(){le(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new it(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new rt(this,!0)},toMap:function(){return pe(this.toKeyedSeq())},toObject:function(){le(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Ze(this.toKeyedSeq())},toOrderedSet:function(){return Ut(a(this)?this.valueSeq():this)},toSet:function(){return Ft(a(this)?this.valueSeq():this)},toSetSeq:function(){return new ot(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ht(a(this)?this.valueSeq():this)},toList:function(){return Le(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var e=un.call(arguments,0);return St(this,vt(this,e))},includes:function(e){return this.some(function(t){return X(t,e)})},entries:function(){return this.__iterator(wn)},every:function(e,t){le(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return St(this,lt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return le(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){le(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(bn)},map:function(e,t){return St(this,ut(this,e,t))},reduce:function(e,t,n){le(this.size);var r,i;return arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return St(this,ct(this,!0))},slice:function(e,t){return St(this,ht(this,e,t,!0))},some:function(e,t){return!this.every(Qt(e),t)},sort:function(e){return St(this,bt(this,e))},values:function(){return this.__iterator(xn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return d(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return pt(this,e,t)},equals:function(e){return Y(this,e)},entrySeq:function(){var e=this;if(e._cache)return new I(e._cache);var t=e.toSeq().map(Zt).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Qt(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(v)},flatMap:function(e,t){return St(this,gt(this,e,t))},flatten:function(e){return St(this,yt(this,e,!0))},fromEntrySeq:function(){return new at(this)},get:function(e,t){return this.find(function(t,n){return X(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=Ot(e);!(n=i.next()).done;){var o=n.value;if(r=r&&r.get?r.get(o,yn):yn,r===yn)return t}return r},groupBy:function(e,t){return ft(this,e,t)},has:function(e){return this.get(e,yn)!==yn},hasIn:function(e){return this.getIn(e,yn)!==yn},isSubset:function(e){return e="function"==typeof e.includes?e:t(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e="function"==typeof e.isSubset?e:t(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return X(t,e)})},keySeq:function(){return this.toSeq().map($t).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return xt(this,e)},maxBy:function(e,t){return xt(this,t,e)},min:function(e){return xt(this,e?en(e):rn)},minBy:function(e,t){return xt(this,t?en(t):rn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return St(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return St(this,mt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Qt(e),t)},sortBy:function(e,t){return St(this,bt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return St(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return St(this,dt(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Qt(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var sr=t.prototype;sr[cn]=!0,sr[En]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=tn,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,Yt(n,{flip:function(){return St(this,st(this))},mapEntries:function(e,t){var n=this,r=0;return St(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return St(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var ur=n.prototype;ur[ln]=!0,ur[En]=sr.entries,ur.__toJS=sr.toObject,ur.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+tn(e)},Yt(r,{toKeyedSeq:function(){return new rt(this,!1)},filter:function(e,t){return St(this,lt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return St(this,ct(this,!1))},slice:function(e,t){return St(this,ht(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=g(e,e<0?this.count():this.size);var r=this.slice(0,e);return St(this,1===n?r:r.concat(h(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return St(this,yt(this,e,!1))},get:function(e,t){return e=m(this,e),e<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return e=m(this,e),e>=0&&(void 0!==this.size?this.size===1/0||e0?"Unexpected "+(1===a.length?"property":"properties")+' "'+a.join('", "')+'" found in '+i+'. Expected to find one of the known reducer property names instead: "'+r.join('", "')+'". Unexpected properties will be ignored.':null; +},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(void 0===e)throw new Error('Reducer "'+t+'" returned undefined when handling "'+n.type+'" action. To ignore an action, you must explicitly return the previous state.');return null},e.exports=t.default},function(e,t){"use strict";function n(e,t){var r;return r=Array.isArray(e)?[]:{},t.push(e),Object.keys(e).forEach(function(i){var o=e[i];if("function"!=typeof o)return o&&"object"==typeof o?t.indexOf(e[i])===-1?void(r[i]=n(e[i],t.slice(0))):void(r[i]="[Circular]"):void(r[i]=o)}),r}e.exports=function(e){if("object"==typeof e){var t=n(e,[]);return"string"==typeof e.name&&(t.name=e.name),"string"==typeof e.message&&(t.message=e.message),"string"==typeof e.stack&&(t.stack=e.stack),t}return"function"==typeof e?"[Function: "+(e.name||"anonymous")+"]":e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return{type:p,payload:{action:t,error:(0,l.default)(e)}}}function o(e){return{type:f,payload:e}}function a(e){return{type:h,payload:e}}function s(e){return{type:d,payload:e}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:m,payload:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CLEAR=t.NEW_AUTH_ERR=t.NEW_SPEC_ERR=t.NEW_THROWN_ERR_BATCH=t.NEW_THROWN_ERR=void 0,t.newThrownErr=i,t.newThrownErrBatch=o,t.newSpecErr=a,t.newAuthErr=s,t.clear=u;var c=n(175),l=r(c),p=t.NEW_THROWN_ERR="err_new_thrown_err",f=t.NEW_THROWN_ERR_BATCH="err_new_thrown_err_batch",h=t.NEW_SPEC_ERR="err_new_spec_err",d=t.NEW_AUTH_ERR="err_new_auth_err",m=t.CLEAR="err_clear"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e={location:{},history:{},open:function(){},close:function(){},File:function(){}};if("undefined"==typeof window)return e;try{e=window;var t=["File","Blob","FormData"],n=!0,r=!1,i=void 0;try{for(var o,s=(0,a.default)(t);!(n=(o=s.next()).done);n=!0){var u=o.value;u in window&&(e[u]=window[u])}}catch(e){r=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw i}}}catch(e){console.error(e)}return e}var o=n(178),a=r(o);e.exports=i()},function(e,t,n){e.exports={default:n(179),__esModule:!0}},function(e,t,n){n(110),n(97),e.exports=n(180)},function(e,t,n){var r=n(86),i=n(181);e.exports=n(59).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){var r=n(182),i=n(108)("iterator"),o=n(102);e.exports=n(59).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(70),i=n(108)("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=a(t=Object(e),i))?n:o?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return l(e)?Q(e)?e.toObject():e:{}}function o(e){return e?e.toArray?e.toArray():u(e):[]}function a(e){return Q(e)?e:e instanceof $.default.File?e:l(e)?Array.isArray(e)?j.default.Seq(e).map(a).toList():j.default.Seq(e).map(a).toOrderedMap():e}function s(e,t){var n={};return(0,N.default)(e).filter(function(t){return"function"==typeof e[t]}).forEach(function(r){return n[r]=e[r].bind(null,t)}),n}function u(e){return Array.isArray(e)?e:[e]}function c(e){return"function"==typeof e}function l(e){return!!e&&"object"===("undefined"==typeof e?"undefined":(0,P.default)(e))}function p(e){return"function"==typeof e}function f(e){return Array.isArray(e)}function h(e,t){return(0,N.default)(e).reduce(function(n,r){return n[r]=t(e[r],r),n},{})}function d(e,t){return(0,N.default)(e).reduce(function(n,r){var i=t(e[r],r);return i&&"object"===("undefined"==typeof i?"undefined":(0,P.default)(i))&&(0,M.default)(n,i),n},{})}function m(e){return function(t){t.dispatch,t.getState;return function(t){return function(n){return"function"==typeof n?n(e()):t(n)}}}}function v(e){var t=e.keySeq();return t.contains(Z)?Z:t.filter(function(e){return"2"===(e+"")[0]}).sort().first()}function y(e,t){if(!j.default.Iterable.isIterable(e))return j.default.List();var n=e.getIn(Array.isArray(t)?t:[t]);return j.default.List.isList(n)?n:j.default.List()}function g(e){var t,n,r,i,o,a,s,u,c,l,p,f;for(l=/(>)(<)(\/*)/g,f=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(/\r\n/g,"\n").replace(l,"$1\n$2$3").replace(f,"$1\n").replace(t,"$1\n$2"),r="",u=e.split("\n"),i=0,a="other",p={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},n=function(e){var t,n,o,s,u,c;u={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},s=function(){var e;e=[];for(n in u)c=u[n],c&&e.push(n);return e}()[0],s=void 0===s?"other":s,t=a+"->"+s,a=s,o="",i+=p[t],o=function(){var e,t,n,r;for(n=[],r=e=0,t=i;0<=t?et;r=0<=t?++e:--e)n.push(" ");return n}().join(""),"opening->closing"===t?r=r.substr(0,r.length-1)+e+"\n":r+=o+e+"\n"},o=0,s=u.length;ot)return e.textContent;var o=function(e){for(var t,o,a,s,u,c=e.textContent,l=0,p=c[0],f=1,h=e.innerHTML="",d=0;o=t,t=d<7&&"\\"==t?1:f;){if(f=p,p=c[++l],s=h.length>1,!f||d>8&&"\n"==f||[/\S/[i](f),1,1,!/[$\w]/[i](f),("/"==t||"\n"==t)&&s,'"'==t&&s,"'"==t&&s,c[l-4]+o+t=="-->",o+t=="*/"][d])for(h&&(e[r](u=n.createElement("span")).setAttribute("style",["color: #555; font-weight: bold;","","","color: #555;",""][d?d<3?2:d>6?4:d>3?3:+/^(a(bstract|lias|nd|rguments|rray|s(m|sert)?|uto)|b(ase|egin|ool(ean)?|reak|yte)|c(ase|atch|har|hecked|lass|lone|ompl|onst|ontinue)|de(bugger|cimal|clare|f(ault|er)?|init|l(egate|ete)?)|do|double|e(cho|ls?if|lse(if)?|nd|nsure|num|vent|x(cept|ec|p(licit|ort)|te(nds|nsion|rn)))|f(allthrough|alse|inal(ly)?|ixed|loat|or(each)?|riend|rom|unc(tion)?)|global|goto|guard|i(f|mp(lements|licit|ort)|n(it|clude(_once)?|line|out|stanceof|t(erface|ernal)?)?|s)|l(ambda|et|ock|ong)|m(icrolight|odule|utable)|NaN|n(amespace|ative|ext|ew|il|ot|ull)|o(bject|perator|r|ut|verride)|p(ackage|arams|rivate|rotected|rotocol|ublic)|r(aise|e(adonly|do|f|gister|peat|quire(_once)?|scue|strict|try|turn))|s(byte|ealed|elf|hort|igned|izeof|tatic|tring|truct|ubscript|uper|ynchronized|witch)|t(emplate|hen|his|hrows?|ransient|rue|ry|ype(alias|def|id|name|of))|u(n(checked|def(ined)?|ion|less|signed|til)|se|sing)|v(ar|irtual|oid|olatile)|w(char_t|hen|here|hile|ith)|xor|yield)$/[i](h):0]),u[r](n.createTextNode(h))),a=d&&d<7?d:a,h="",d=11;![1,/[\/{}[(\-+*=<>:;|\\.,?!&@~]/[i](f),/[\])]/[i](f),/[$\w]/[i](f),"/"==f&&a<2&&"<"!=t,'"'==f,"'"==f,f+p+c[l+1]+c[l+2]=="':null;var r=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=r[1]}return(0,X.memoizedCreateXMLExample)(e,n)}return(0,S.default)((0,X.memoizedSampleFromSchema)(e,n),null,2)},t.parseSeach=function(){var e={},t=window.location.search;if(""!=t){var n=t.substr(1).split("&");for(var r in n)r=n[r].split("="),e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e},t.btoa=function(t){var n=void 0;return n=t instanceof e?t:new e(t.toString(),"utf-8"),n.toString("base64")},t.sorters={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}}},t.buildFormData=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},t.filterConfigs=function(e,t){var n=void 0,r={};for(n in e)t.indexOf(n)!==-1&&(r[n]=e[n]);return r},t.shallowEqualKeys=function(e,t,n){return!!(0,K.default)(n,function(n){return(0,G.default)(e[n],t[n])})}}).call(t,n(132).Buffer)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(185),o=r(i),a=n(178),s=r(a);t.default=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=(0,s.default)(e);!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,o.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){e.exports={default:n(186),__esModule:!0}},function(e,t,n){n(110),n(97),e.exports=n(187)},function(e,t,n){var r=n(182),i=n(108)("iterator"),o=n(102);e.exports=n(59).isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},function(e,t,n){var r=n(189),i=n(203),o=i(function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)});e.exports=o},function(e,t,n){function r(e){return o(i(e).toLowerCase())}var i=n(190),o=n(195);e.exports=r},function(e,t,n){function r(e){return null==e?"":i(e)}var i=n(191);e.exports=r},function(e,t,n){function r(e){if("string"==typeof e)return e;if(a(e))return o(e,r)+"";if(s(e))return l?l.call(e):"";var t=e+"";return"0"==t&&1/e==-u?"-0":t}var i=n(151),o=n(192),a=n(193),s=n(194),u=1/0,c=i?i.prototype:void 0,l=c?c.toString:void 0;e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n=r?e:i(e,t,n)}var i=n(198);e.exports=r},function(e,t){function n(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++rf))return!1;var d=l.get(e);if(d&&l.get(t))return d==t;var m=-1,v=!0,y=n&u?new i:void 0;for(l.set(e,t),l.set(t,e);++m-1&&e%1==0&&e-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=n},function(e,t){function n(e){return function(t){return e(t)}}e.exports=n},function(e,t,n){(function(e){var r=n(153),i="object"==typeof t&&t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a&&r.process,u=function(){try{return s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=u}).call(t,n(161)(e))},[1211,283,284],function(e,t){function n(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||r;return e===n}var r=Object.prototype;e.exports=n},[1212,157],[1213,220,279],function(e,t,n){var r=n(287),i=n(238),o=n(288),a=n(289),s=n(290),u=n(150),c=n(224),l="[object Map]",p="[object Object]",f="[object Promise]",h="[object Set]",d="[object WeakMap]",m="[object DataView]",v=c(r),y=c(i),g=c(o),_=c(a),b=c(s),x=u;(r&&x(new r(new ArrayBuffer(1)))!=m||i&&x(new i)!=l||o&&x(o.resolve())!=f||a&&x(new a)!=h||s&&x(new s)!=d)&&(x=function(e){var t=u(e),n=t==p?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return m;case y:return l;case g:return f;case _:return h;case b:return d}return t}),e.exports=x},[1214,218,152],[1215,218,152],[1216,218,152],[1217,218,152],[1218,292,269],[1219,221],function(e,t){function n(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}e.exports=n},function(e,t,n){function r(e,t){return s(e)&&u(t)?c(l(e),t):function(n){var r=o(n,e);return void 0===r&&r===t?a(n,e):i(t,r,p|f)}}var i=n(256),o=n(295),a=n(302),s=n(298),u=n(292),c=n(293),l=n(301),p=1,f=2;e.exports=r},[1220,296],function(e,t,n){function r(e,t){t=i(t,e);for(var n=0,r=t.length;null!=e&&n1&&void 0!==arguments[1]?arguments[1]:{},r=(0, +o.objectify)(t),i=r.type,a=r.example,s=r.properties,u=r.additionalProperties,c=r.items,l=n.includeReadOnly;if(void 0!==a)return a;if(!i)if(s)i="object";else{if(!c)return;i="array"}if("object"===i){var f=(0,o.objectify)(s),h={};for(var d in f)f[d].readOnly&&!l||(h[d]=e(f[d],{includeReadOnly:l}));if(u===!0)h.additionalProp1={};else if(u)for(var m=(0,o.objectify)(u),v=e(m,{includeReadOnly:l}),y=1;y<4;y++)h["additionalProp"+y]=v;return h}return"array"===i?[e(c,{includeReadOnly:l})]:t.enum?t.default?t.default:(0,o.normalizeArray)(t.enum)[0]:p(t)},h=(t.inferSchema=function(e){return e.schema&&(e=e.schema),e.properties&&(e.type="object"),e},t.sampleXmlFromSchema=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,o.objectify)(t),i=r.type,a=r.properties,s=r.additionalProperties,u=r.items,c=r.example,l=n.includeReadOnly,f=r.default,h={},d={},m=t.xml,v=m.name,y=m.prefix,g=m.namespace,_=r.enum,b=void 0,x=void 0;if(!i)if(a||s)i="object";else{if(!u)return;i="array"}if(v=v||"notagname",b=(y?y+":":"")+v,g){var w=y?"xmlns:"+y:"xmlns";d[w]=g}if("array"===i&&u){if(u.xml=u.xml||m||{},u.xml.name=u.xml.name||m.name,m.wrapped)return h[b]=[],Array.isArray(c)?c.forEach(function(t){u.example=t,h[b].push(e(u,n))}):Array.isArray(f)?f.forEach(function(t){u.default=t,h[b].push(e(u,n))}):h[b]=[e(u,n)],d&&h[b].push({_attr:d}),h;var k=[];return Array.isArray(c)?(c.forEach(function(t){u.example=t,k.push(e(u,n))}),k):Array.isArray(f)?(f.forEach(function(t){u.default=t,k.push(e(u,n))}),k):e(u,n)}if("object"===i){var S=(0,o.objectify)(a);h[b]=[],c=c||{};for(var E in S)if(!S[E].readOnly||l)if(S[E].xml=S[E].xml||{},S[E].xml.attribute){var C=Array.isArray(S[E].enum)&&S[E].enum[0],A=S[E].example,T=S[E].default;d[S[E].xml.name||E]=void 0!==A&&A||void 0!==c[E]&&c[E]||void 0!==T&&T||C||p(S[E])}else{S[E].xml.name=S[E].xml.name||E,S[E].example=void 0!==S[E].example?S[E].example:c[E];var D=e(S[E]);Array.isArray(D)?h[b]=h[b].concat(D):h[b].push(D)}return s===!0?h[b].push({additionalProp:"Anything can be here"}):s&&h[b].push({additionalProp:p(s)}),d&&h[b].push({_attr:d}),h}return x=void 0!==c?c:void 0!==f?f:Array.isArray(_)?_[0]:p(t),h[b]=d?[{_attr:d},x]:x,h});t.memoizedCreateXMLExample=(0,c.default)(i),t.memoizedSampleFromSchema=(0,c.default)(f)},function(e,t,n){(function(t){function r(e,n){function r(e){v?t.nextTick(e):e()}function i(e,t){if(void 0!==t&&(h+=t),e&&!d&&(f=f||new l,d=!0),e&&d){var n=h;r(function(){f.emit("data",n)}),h=""}}function o(e,t){s(i,a(e,m,m?1:0),t)}function u(){if(f){var e=h;r(function(){f.emit("data",e),f.emit("end"),f.readable=!1,f.emit("close")})}}function c(e){var t=e.encoding||"UTF-8",n={version:"1.0",encoding:t};e.standalone&&(n.standalone=e.standalone),o({"?xml":{_attr:n}}),h=h.replace("/>","?>")}"object"!=typeof n&&(n={indent:n});var f=n.stream?new l:null,h="",d=!1,m=n.indent?n.indent===!0?p:n.indent:"",v=!0;return r(function(){v=!1}),n.declaration&&c(n.declaration),e&&e.forEach?e.forEach(function(t,n){var r;n+1===e.length&&(r=u),o(t,r)}):o(e,u),f?(f.readable=!0,f):h}function i(){var e=Array.prototype.slice.call(arguments),t={_elem:a(e)};return t.push=function(e){if(!this.append)throw new Error("not assigned to a parent!");var t=this,n=this._elem.indent;s(this.append,a(e,n,this._elem.icount+(n?1:0)),function(){t.append(!0)})},t.close=function(e){void 0!==e&&this.push(e),this.end&&this.end()},t}function o(e,t){return new Array(t||0).join(e||"")}function a(e,t,n){function r(e){var t=Object.keys(e);t.forEach(function(t){d.push(u(t,e[t]))})}n=n||0;var i,s=o(t,n),l=e,p=!1;if("object"==typeof e){var f=Object.keys(e);if(i=f[0],l=e[i],l&&l._elem)return l._elem.name=i,l._elem.icount=n,l._elem.indent=t,l._elem.indents=s,l._elem.interrupt=l,l._elem}var h,d=[],m=[];switch(typeof l){case"object":if(null===l)break;l._attr&&r(l._attr),l._cdata&&m.push(("/g,"]]]]>")+"]]>"),l.forEach&&(h=!1,m.push(""),l.forEach(function(e){if("object"==typeof e){var i=Object.keys(e)[0];"_attr"==i?r(e._attr):m.push(a(e,t,n+1))}else m.pop(),h=!0,m.push(c(e))}),h||m.push(""));break;default:m.push(c(l))}return{name:i,interrupt:p,attributes:d,content:m,icount:n,indents:s,indent:t}}function s(e,t,n){function r(){for(;t.content.length;){var r=t.content.shift();if(void 0!==r){if(i(r))return;s(e,r)}}e(!1,(o>1?t.indents:"")+(t.name?"":"")+(t.indent&&!n?"\n":"")),n&&n()}function i(t){return!!t.interrupt&&(t.interrupt.append=e,t.interrupt.end=r,t.interrupt=!1,e(!0),!0)}if("object"!=typeof t)return e(!1,t);var o=t.interrupt?1:t.content.length;return e(!1,t.indents+(t.name?"<"+t.name:"")+(t.attributes.length?" "+t.attributes.join(" "):"")+(o?t.name?">":"":t.name?"/>":"")+(t.indent&&o>1?"\n":"")),o?void(i(t)||r()):e(!1,t.indent?"\n":"")}function u(e,t){return e+'="'+c(t)+'"'}var c=n(325),l=n(326).Stream,p=" ";e.exports=r,e.exports.element=e.exports.Element=i}).call(t,n(324))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){m&&h&&(m=!1,h.length?d=h.concat(d):v=-1,d.length&&s())}function s(){if(!m){var e=i(a);m=!0;for(var t=d.length;t;){for(h=d,d=[];++v1)for(var n=1;n'])/g,function(e,t){return r[t]}):e}var r={"&":"&",'"':""","'":"'","<":"<",">":">"};e.exports=n},function(e,t,n){function r(){i.call(this)}e.exports=r;var i=n(327).EventEmitter,o=n(328);o(r,i),r.Readable=n(329),r.Writable=n(346),r.Duplex=n(347),r.Transform=n(348),r.PassThrough=n(349),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function r(){c.readable&&c.resume&&c.resume()}function o(){l||(l=!0,e.end())}function a(){l||(l=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){c.removeListener("data",n),e.removeListener("drain",r),c.removeListener("end",o),c.removeListener("close",a),c.removeListener("error",s),e.removeListener("error",s),c.removeListener("end",u),c.removeListener("close",u),e.removeListener("close",u)}var c=this;c.on("data",n),e.on("drain",r),e._isStdio||t&&t.end===!1||(c.on("end",o),c.on("close",a));var l=!1;return c.on("error",s),e.on("error",s),c.on("end",u),c.on("close",u),e.on("close",u),e.emit("pipe",c),e}},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(n=this._events[e],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),c=n.slice(),i=c.length,u=0;u0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){t=e.exports=n(330),t.Stream=t,t.Readable=t,t.Writable=n(339),t.Duplex=n(338),t.Transform=n(344),t.PassThrough=n(345)},function(e,t,n){(function(t){"use strict";function r(e){return j.from(e)}function i(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)||j.isBuffer(e)}function o(e,t,n){return"function"==typeof e.prependListener?e.prependListener(t,n):void(e._events&&e._events[t]?I(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n))}function a(e,t){P=P||n(338),e=e||{},this.objectMode=!!e.objectMode,t instanceof P&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new q,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(z||(z=n(343).StringDecoder),this.decoder=new z(e.encoding),this.encoding=e.encoding)}function s(e){return P=P||n(338),this instanceof s?(this._readableState=new a(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),void R.call(this)):new s(e)}function u(e,t,n,i,o){var a=e._readableState;if(null===t)a.reading=!1,d(e,a);else{var s;o||(s=l(a,t)),s?e.emit("error",s):a.objectMode||t&&t.length>0?("string"==typeof t||Object.getPrototypeOf(t)===j.prototype||a.objectMode||(t=r(t)),i?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):c(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?c(e,a,t,!1):y(e,a)):c(e,a,t,!1))):i||(a.reading=!1)}return p(a)}function c(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&m(e)),y(e,t)}function l(e,t){var n;return i(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function p(e){return!e.ended&&(e.needReadable||e.length=K?e=K:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function h(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=f(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function d(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,m(e)}}function m(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(L("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?O(v,e):v(e))}function v(e){L("emit readable"),e.emit("readable"),k(e)}function y(e,t){t.readingMore||(t.readingMore=!0,O(g,e,t))}function g(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=E(e,t.buffer,t.decoder),n}function E(e,t,n){var r;return eo.length?o.length:e;if(i+=a===o.length?o:o.slice(0,e),e-=a,0===e){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}function A(e,t){var n=j.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),e-=a,0===e){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}function T(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,O(D,t,e))}function D(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return L("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):m(this),null;if(e=h(e,t),0===e&&t.ended)return 0===t.length&&T(this),null;var r=t.needReadable;L("need readable",r),(0===t.length||t.length-e0?S(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&T(this)),null!==i&&this.emit("data",i),i},s.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},s.prototype.pipe=function(e,n){function r(e,t){L("onunpipe"),e===f&&t&&t.hasUnpiped===!1&&(t.hasUnpiped=!0,a())}function i(){L("onend"),e.end()}function a(){L("cleanup"),e.removeListener("close",c),e.removeListener("finish",l),e.removeListener("drain",v),e.removeListener("error",u),e.removeListener("unpipe",r),f.removeListener("end",i),f.removeListener("end",p),f.removeListener("data",s),y=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||v()}function s(t){L("ondata"),g=!1;var n=e.write(t);!1!==n||g||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&M(h.pipes,e)!==-1)&&!y&&(L("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,g=!0),f.pause())}function u(t){L("onerror",t),p(),e.removeListener("error",u),0===N(e,"error")&&e.emit("error",t)}function c(){e.removeListener("finish",l),p()}function l(){L("onfinish"),e.removeListener("close",c),p()}function p(){L("unpipe"),f.unpipe(e)}var f=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,L("pipe count=%d opts=%j",h.pipesCount,n);var d=(!n||n.end!==!1)&&e!==t.stdout&&e!==t.stderr,m=d?i:p;h.endEmitted?O(m):f.once("end",m),e.on("unpipe",r);var v=_(f);e.on("drain",v);var y=!1,g=!1;return f.on("data",s),o(e,"error",u),e.once("close",c),e.once("finish",l),e.emit("pipe",f),h.flowing||(L("pipe resume"),f.resume()),e},s.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return o.alloc(0);if(1===this.length)return this.head.data;for(var t=o.allocUnsafe(e>>>0),n=this.head,r=0;n;)i(n.data,t,r),r+=n.data.length,n=n.next;return t},e}()},function(e,t,n){"use strict";function r(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?void(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||a(o,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),void this._destroy(e||null,function(e){!t&&e?(a(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}))}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(e,t){e.emit("error",t)}var a=n(331);e.exports={destroy:r,undestroy:i}},function(e,t,n){"use strict";function r(e){return this instanceof r?(c.call(this,e),l.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new r(e)}function i(){this.allowHalfOpen||this._writableState.ended||a(o,this)}function o(e){e.end()}var a=n(331),s=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=r;var u=n(334);u.inherits=n(328);var c=n(330),l=n(339);u.inherits(r,c);for(var p=s(l.prototype),f=0;f-1?r:A; +c.WritableState=u;var M=n(334);M.inherits=n(328);var O={deprecate:n(342)},P=n(332),I=n(333).Buffer,N=n(337);M.inherits(c,P),u.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(u.prototype,"buffer",{get:O.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}();var R;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(R=Function.prototype[Symbol.hasInstance],Object.defineProperty(c,Symbol.hasInstance,{value:function(e){return!!R.call(this,e)||e&&e._writableState instanceof u}})):R=function(e){return e instanceof this},c.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},c.prototype.write=function(e,t,n){var r=this._writableState,i=!1,u=a(e)&&!r.objectMode;return u&&!I.isBuffer(e)&&(e=o(e)),"function"==typeof t&&(n=t,t=null),u?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=s),r.ended?l(this,n):(u||p(this,r,e,n))&&(r.pendingcb++,i=h(this,r,u,e,t,n)),i},c.prototype.cork=function(){var e=this._writableState;e.corked++},c.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||b(this,e))},c.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},c.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},c.prototype._writev=null,c.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||E(this,r,n)},Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),c.prototype.destroy=N.destroy,c.prototype._undestroy=N.undestroy,c.prototype._destroy=function(e,t){this.end(),t(e)}}).call(t,n(324),n(340).setImmediate)},function(e,t,n){function r(e,t){this._id=e,this._clearFn=t}var i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(341),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n>5===6?2:e>>4===14?3:e>>3===30?4:-1}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0))}function u(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"�".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"�".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"�".repeat(n+2)}}function c(e){var t=this.lastTotal-this.lastNeed,n=u(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t}function f(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function h(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function d(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function v(e){return e.toString(this.encoding)}function y(e){return e&&e.length?this.write(e):""}var g=n(333).Buffer,_=g.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n1&&(a.normalizer=n(397)(t)):t===!1?a.normalizer=n(398)():1===t?a.normalizer=n(400)():a.normalizer=n(401)(t))),a.async&&n(402),a.promise&&n(405),a.dispose&&n(407),a.maxAge&&n(408),a.max&&n(411),a.refCounter&&n(413),o(e,a)}},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=r(null);return n.call(arguments,function(e){null!=e&&i(Object(e),t)}),t}},function(e,t,n){"use strict";var r=n(353);e.exports=function(e,t,n){var i;return isNaN(e)?(i=t,i>=0?n&&i?i-1:i:1):e!==!1&&r(e)}},function(e,t,n){"use strict";var r=n(354),i=Math.max;e.exports=function(e){return i(0,r(e))}},function(e,t,n){"use strict";var r=n(355),i=Math.abs,o=Math.floor;e.exports=function(e){return isNaN(e)?0:(e=Number(e),0!==e&&isFinite(e)?r(e)*o(i(e)):e)}},function(e,t,n){"use strict";e.exports=n(356)()?Math.sign:n(357)},function(e,t){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&(1===e(10)&&e(-20)===-1)}},function(e,t){"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,n){"use strict";var r=n(359),i=n(360),o=n(363),a=n(364),s=n(352),u=Object.prototype.hasOwnProperty;e.exports=function e(t){var n,c,l;if(r(t),n=Object(arguments[1]),n.async&&n.promise)throw new Error("Options 'async' and 'promise' cannot be used together");return u.call(t,"__memoized__")&&!n.force?t:(c=s(n.length,t.length,n.async&&o.async),l=a(t,c,n),i(o,function(e,t){n[t]&&e(n[t],l,n)}),e.__profiler__&&e.__profiler__(l),l.updateEnv(),l.memoized)}},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";e.exports=n(361)("forEach")},function(e,t,n){"use strict";var r=n(359),i=n(362),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,u=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(n,c){var l,p=arguments[2],f=arguments[3];return n=Object(i(n)),r(c),l=s(n),f&&l.sort("function"==typeof f?o.call(f,n):void 0),"function"!=typeof e&&(e=l[e]),a.call(e,l,function(e,r){return u.call(n,e)?a.call(c,p,n[e],e,n,r):t})}}},function(e,t){"use strict";e.exports=function(e){if(null==e)throw new TypeError("Cannot use null or undefined");return e}},function(e,t){"use strict"},function(e,t,n){"use strict";var r=n(365),i=n(373),o=n(375),a=n(380).methods,s=n(381),u=n(395),c=Function.prototype.apply,l=Function.prototype.call,p=Object.create,f=Object.prototype.hasOwnProperty,h=Object.defineProperties,d=a.on,m=a.emit;e.exports=function(e,t,n){var a,v,y,g,_,b,x,w,k,S,E,C,A,T=p(null);return v=t!==!1?t:isNaN(e.length)?1:e.length,n.normalizer&&(w=u(n.normalizer),y=w.get,g=w.set,_=w.delete,b=w.clear),null!=n.resolvers&&(A=s(n.resolvers)),C=y?i(function(t){var n,i,o=arguments;if(A&&(o=A(o)),n=y(o),null!==n&&f.call(T,n))return k&&a.emit("get",n,o,this),T[n];if(i=1===o.length?l.call(e,this,o[0]):c.call(e,this,o),null===n){if(n=y(o),null!==n)throw r("Circular invocation","CIRCULAR_INVOCATION");n=g(o)}else if(f.call(T,n))throw r("Circular invocation","CIRCULAR_INVOCATION");return T[n]=i,S&&a.emit("set",n,null,i),i},v):0===t?function(){var t;if(f.call(T,"data"))return k&&a.emit("get","data",arguments,this),T.data;if(t=arguments.length?c.call(e,this,arguments):l.call(e,this),f.call(T,"data"))throw r("Circular invocation","CIRCULAR_INVOCATION");return T.data=t,S&&a.emit("set","data",null,t),t}:function(t){var n,i,o=arguments;if(A&&(o=A(arguments)),i=String(o[0]),f.call(T,i))return k&&a.emit("get",i,o,this),T[i];if(n=1===o.length?l.call(e,this,o[0]):c.call(e,this,o),f.call(T,i))throw r("Circular invocation","CIRCULAR_INVOCATION");return T[i]=n,S&&a.emit("set",i,null,n),n},a={original:e,memoized:C,get:function(e){return A&&(e=A(e)),y?y(e):String(e[0])},has:function(e){return f.call(T,e)},delete:function(e){var t;f.call(T,e)&&(_&&_(e),t=T[e],delete T[e],E&&a.emit("delete",e,t))},clear:function(){var e=T;b&&b(),T=p(null),a.emit("clear",e)},on:function(e,t){return"get"===e?k=!0:"set"===e?S=!0:"delete"===e&&(E=!0),d.call(this,e,t)},emit:m,updateEnv:function(){e=a.original}},x=y?i(function(e){var t,n=arguments;A&&(n=A(n)),t=y(n),null!==t&&a.delete(t)},v):0===t?function(){return a.delete("data")}:function(e){return A&&(e=A(arguments)[0]),a.delete(e)},h(C,{__memoized__:o(!0),delete:o(x),clear:o(a.clear)}),a}},function(e,t,n){"use strict";var r=n(366),i=n(372),o=Error.captureStackTrace;t=e.exports=function(e){var n=new Error(e),a=arguments[1],s=arguments[2];return null==s&&i(a)&&(s=a,a=null),null!=s&&r(n,s),null!=a&&(n.code=a),o&&o(n,t),n}},function(e,t,n){"use strict";e.exports=n(367)()?Object.assign:n(368)},function(e,t){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(e={foo:"raz"},t(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(369),i=n(362),o=Math.max;e.exports=function(e,t){var n,a,s,u=o(arguments.length,2);for(e=Object(i(e)),s=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},a=1;a-1}},function(e,t,n){"use strict";var r,i,o,a,s,u,c,l=n(375),p=n(359),f=Function.prototype.apply,h=Function.prototype.call,d=Object.create,m=Object.defineProperty,v=Object.defineProperties,y=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var n;return p(t),y.call(this,"__ee__")?n=this.__ee__:(n=g.value=d(null),m(this,"__ee__",g),g.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},i=function(e,t){var n,i;return p(t),i=this,r.call(this,e,n=function(){o.call(i,e,n),f.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e,t){var n,r,i,o;if(p(t),!y.call(this,"__ee__"))return this;if(n=this.__ee__,!n[e])return this;if(r=n[e],"object"==typeof r)for(o=0;i=r[o];++o)i!==t&&i.__eeOnceListener__!==t||(2===r.length?n[e]=r[o?0:1]:r.splice(o,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},a=function(e){var t,n,r,i,o;if(y.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(n=arguments.length,o=new Array(n-1),t=1;t=55296&&y<=56319&&(x+=e[++n])),x=w?p.call(w,k,x,d):x,t?(f.value=x,h(m,d,f)):m[d]=x,++d;v=d}if(void 0===v)for(v=a(e.length),t&&(m=new t(v)),n=0;n=0?u(c):r(this.length)-u(s(c)),t=c;ti)throw new TypeError(e+" exceeds maximum possible timeout");return e}},function(e,t){"use strict";e.exports=2147483647},function(e,t,n){"use strict";var r=n(353),i=n(412),o=n(363);o.max=function(e,t,n){var a,s,u;e=r(e),e&&(s=i(e),a=n.async&&o.async||n.promise&&o.promise?"async":"",t.on("set"+a,u=function(e){e=s.hit(e),void 0!==e&&t.delete(e)}),t.on("get"+a,u),t.on("delete"+a,s.delete),t.on("clear"+a,s.clear))}},function(e,t,n){"use strict";var r=n(353),i=Object.create,o=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=0,a=1,s=i(null),u=i(null),c=0;return e=r(e),{hit:function(r){var i=u[r],l=++c;if(s[l]=r,u[r]=l,!i){if(++n,n<=e)return;return r=s[a],t(r),r}if(delete s[i],a===i)for(;!o.call(s,++a);)continue},delete:t=function(e){var t=u[e];if(t&&(delete s[t],delete u[e],--n,a===t)){if(!n)return c=0,void(a=1);for(;!o.call(s,++a);)continue}},clear:function(){n=0,a=1,s=i(null),u=i(null),c=0}}}},function(e,t,n){"use strict";var r=n(375),i=n(363),o=Object.create,a=Object.defineProperties;i.refCounter=function(e,t,n){var s,u;s=o(null),u=n.async&&i.async||n.promise&&i.promise?"async":"",t.on("set"+u,function(e,t){s[e]=t||1}),t.on("get"+u,function(e){++s[e]}),t.on("delete"+u,function(e){delete s[e]}),t.on("clear"+u,function(){s={}}),a(t.memoized,{deleteRef:r(function(){var e=t.get(arguments);return null===e?null:s[e]?!--s[e]&&(t.delete(e),!0):null}),getRefCount:r(function(){var e=t.get(arguments);return null===e?0:s[e]?s[e]:0})})}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return[a.default]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(415),a=r(o)},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e={components:{App:M.default,authorizationPopup:P.default,authorizeBtn:N.default,authorizeOperationBtn:j.default,auths:B.default,authError:z.default,oauth2:H.default,apiKeyAuth:U.default,basicAuth:K.default,clear:G.default,liveResponse:Y.default,info:Ce.default,onlineValidatorBadge:Z.default,operations:ee.default,operation:ne.default,highlightCode:ie.default,responses:ae.default,response:ue.default,responseBody:le.default,parameters:fe.default,parameterRow:de.default,execute:ve.default,headers:ge.default,errors:be.default,contentType:we.default,overview:Se.default,footer:Te.default,ParamBody:Me.default,curl:Pe.default,schemes:Ne.default,modelExample:je.default,model:Be.default,models:ze.default,TryItOutButton:Ue.default,Markdown:Ke.default,BaseLayout:He.default}},t={components:Ge},n={components:Ye};return[S.default,v.default,f.default,l.default,a.default,u.default,d.default,e,t,b.default,n,w.default,g.default,C.default,T.default]};var o=n(416),a=i(o),s=n(431),u=i(s),c=n(443),l=i(c),p=n(484),f=i(p),h=n(726),d=i(h),m=n(727),v=i(m),y=n(728),g=i(y),_=n(762),b=i(_),x=n(954),w=i(x),k=n(959),S=i(k),E=n(961),C=i(E),A=n(1010),T=i(A),D=n(1011),M=i(D),O=n(1012),P=i(O),I=n(1013),N=i(I),R=n(1014),j=i(R),F=n(1016),B=i(F),L=n(1017),z=i(L),q=n(1018),U=i(q),W=n(1019),K=i(W),V=n(1020),H=i(V),J=n(1022),G=i(J),X=n(1023),Y=i(X),$=n(1024),Z=i($),Q=n(1025),ee=i(Q),te=n(1026),ne=i(te),re=n(1030),ie=i(re),oe=n(1031),ae=i(oe),se=n(1032),ue=i(se),ce=n(1033),le=i(ce),pe=n(1035),fe=i(pe),he=n(1036),de=i(he),me=n(1037),ve=i(me),ye=n(1038),ge=i(ye),_e=n(1039),be=i(_e),xe=n(1064),we=i(xe),ke=n(1065),Se=i(ke),Ee=n(1067),Ce=i(Ee),Ae=n(1068),Te=i(Ae),De=n(1069),Me=i(De),Oe=n(1070),Pe=i(Oe),Ie=n(1072),Ne=i(Ie),Re=n(1073),je=i(Re),Fe=n(1074),Be=i(Fe),Le=n(1075),ze=i(Le),qe=n(1076),Ue=i(qe),We=n(1077),Ke=i(We),Ve=n(1173),He=i(Ve),Je=n(1066),Ge=r(Je),Xe=n(1174),Ye=r(Xe)},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{statePlugins:{err:{reducers:(0,a.default)(e),actions:u,selectors:l}}}};var o=n(417),a=i(o),s=n(176),u=r(s),c=n(429),l=r(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(137),o=r(i),a=n(141),s=r(a);t.default=function(e){var t;return t={},(0,o.default)(t,u.NEW_THROWN_ERR,function(t,n){var r=n.payload,i=(0,s.default)(m,r,{type:"thrown"});return t.update("errors",function(e){return(e||(0,p.List)()).push((0,p.fromJS)(i))}).update("errors",function(t){return(0,d.default)(t,e.getSystem())})}),(0,o.default)(t,u.NEW_THROWN_ERR_BATCH,function(t,n){var r=n.payload;return r=r.map(function(e){return(0,p.fromJS)((0,s.default)(m,e,{type:"thrown"}))}),t.update("errors",function(e){return(e||(0,p.List)()).concat((0,p.fromJS)(r))}).update("errors",function(t){return(0,d.default)(t,e.getSystem())})}),(0,o.default)(t,u.NEW_SPEC_ERR,function(t,n){var r=n.payload,i=(0,p.fromJS)(r);return i=i.set("type","spec"),t.update("errors",function(e){return(e||(0,p.List)()).push((0,p.fromJS)(i)).sortBy(function(e){return e.get("line")})}).update("errors",function(t){return(0,d.default)(t,e.getSystem())})}),(0,o.default)(t,u.NEW_AUTH_ERR,function(t,n){var r=n.payload,i=(0,p.fromJS)((0,s.default)({},r));return i=i.set("type","auth"),t.update("errors",function(e){return(e||(0,p.List)()).push((0,p.fromJS)(i))}).update("errors",function(t){return(0,d.default)(t,e.getSystem())})}),(0,o.default)(t,u.CLEAR,function(e,t){var n=t.payload;if(n){var r=f.default.fromJS((0,l.default)((e.get("errors")||(0,p.List)()).toJS(),n));return e.merge({errors:r})}}),t};var u=n(176),c=n(418),l=r(c),p=n(168),f=r(p),h=n(422),d=r(h),m={line:0,level:"error",message:"Unknown error"}},function(e,t,n){function r(e,t){var n=s(e)?i:o;return n(e,u(a(t,3)))}var i=n(419),o=n(420),a=n(247),s=n(193),u=n(421);e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n-1||c.push({name:o(e).replace(".js","").replace("./",""),transform:u(e).transform}))})},function(e,t,n){function r(e,t,n){var r=u(e)?i:s,c=arguments.length<3;return r(e,a(t,4),n,c,o)}var i=n(204),o=n(316),a=n(247),s=n(424),u=n(193);e.exports=r},function(e,t){function n(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}e.exports=n},function(e,t,n){function r(e){return n(i(e))}function i(e){return o[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var o={"./not-of-type.js":426,"./parameter-oneof.js":427,"./strip-instance.js":428};r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=425},function(e,t){"use strict";function n(e){return e.map(function(e){var t="is not of a type(s)",n=e.get("message").indexOf(t);if(n>-1){var i=e.get("message").slice(n+t.length).split(",");return e.set("message",e.get("message").slice(0,n)+r(i))}return e})}function r(e){return e.reduce(function(e,t,n,r){return n===r.length-1&&r.length>1?e+"or "+t:r[n+1]&&r.length>2?e+t+", ":r[n+1]?e+t+" ":e+t},"should be a")}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){t.jsSpec;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=i;var o=n(295);r(o),n(168)},function(e,t){"use strict";function n(e){return e.map(function(e){return e.set("message",r(e.get("message"),"instance."))})}function r(e,t){return e.replace(new RegExp(t,"g"),"")}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastError=t.allErrors=void 0;var r=n(168),i=n(430),o=function(e){return e},a=t.allErrors=(0,i.createSelector)(o,function(e){return e.get("errors",(0,r.List)())});t.lastError=(0,i.createSelector)(a,function(e){return e.last()})},function(e,t){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?t-1:0),i=1;i2?r-2:0),o=2;o1&&void 0!==arguments[1])||arguments[1];return e=(0,a.normalizeArray)(e),{type:c,payload:{thing:e,shown:t}}}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=(0,a.normalizeArray)(e),{type:u,payload:{thing:e,mode:t}}}Object.defineProperty(t,"__esModule",{value:!0}),t.SHOW=t.UPDATE_MODE=t.UPDATE_LAYOUT=void 0,t.updateLayout=r,t.show=i,t.changeMode=o;var a=n(183),s=t.UPDATE_LAYOUT="layout_update_layout",u=t.UPDATE_MODE="layout_update_mode",c=t.SHOW="layout_show"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.showSummary=t.whatMode=t.isShown=t.current=void 0;var i=n(435),o=r(i),a=n(430),s=n(183),u=function(e){return e},c=(t.current=function(e){return e.get("layout")},t.isShown=function(e,t,n){return t=(0,s.normalizeArray)(t),Boolean(e.getIn(["shown"].concat((0,o.default)(t)),n))});t.whatMode=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t=(0,s.normalizeArray)(t),e.getIn(["modes"].concat((0,o.default)(t)),n)},t.showSummary=(0,a.createSelector)(u,function(e){return!c(e,"editor")})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(436),o=r(i);t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?arguments[1]:void 0,v=void 0!==m,y=0,g=l(f);if(v&&(m=r(m,d>2?arguments[2]:void 0,2)),void 0==g||h==Array&&s(g))for(t=u(f.length),n=new h(t);t>y;y++)c(n,y,v?m(f[y],y):f[y]);else for(p=g.call(f),n=new h;!(i=p.next()).done;y++)c(n,y,v?a(p,m,[i.value,y],!0):i.value);return n.length=y,n}})},function(e,t,n){var r=n(86);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(102),i=n(108)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){"use strict";var r=n(85),i=n(93);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(108)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{statePlugins:{spec:{wrapActions:f,reducers:a.default,actions:u,selectors:l}}}};var o=n(444),a=i(o),s=n(445),u=r(s),c=n(482),l=r(c),p=n(483),f=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(137),a=r(o),s=n(141),u=r(s),c=n(435),l=r(c),p=n(168),f=n(183),h=n(177),d=r(h),m=n(445);t.default=(i={},(0,a.default)(i,m.UPDATE_SPEC,function(e,t){return"string"==typeof t.payload?e.set("spec",t.payload):e}),(0,a.default)(i,m.UPDATE_URL,function(e,t){return e.set("url",t.payload+"")}),(0,a.default)(i,m.UPDATE_JSON,function(e,t){return e.set("json",(0,f.fromJSOrdered)(t.payload))}),(0,a.default)(i,m.UPDATE_RESOLVED,function(e,t){return e.setIn(["resolved"],(0,f.fromJSOrdered)(t.payload))}),(0,a.default)(i,m.UPDATE_PARAM,function(e,t){var n=t.payload,r=n.path,i=n.paramName,o=n.value,a=n.isXml;return e.updateIn(["resolved","paths"].concat((0,l.default)(r),["parameters"]),(0,p.fromJS)([]),function(e){var t=e.findIndex(function(e){return e.get("name")===i});return o instanceof d.default.File||(o=(0,f.fromJSOrdered)(o)),e.setIn([t,a?"value_xml":"value"],o)})}),(0,a.default)(i,m.VALIDATE_PARAMS,function(e,t){var n=t.payload.pathMethod,r=e.getIn(["resolved","paths"].concat((0,l.default)(n))),i=/xml/i.test(r.get("consumes_value"));return e.updateIn(["resolved","paths"].concat((0,l.default)(n),["parameters"]),(0,p.fromJS)([]),function(e){return e.withMutations(function(e){for(var t=0,n=e.count();t0){var i=n.map(function(e){return console.error(e),e.line=e.fullPath?d(m,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",Object.defineProperty(e,"message",{enumerable:!0,value:e.message}),e});o.newThrownErrBatch(i)}return r.updateResolved(t)})}},t.formatIntoYaml=function(){return function(e){var t=e.specActions,n=e.specSelectors,r=n.specStr,i=t.updateSpec;try{var o=E.default.safeDump(E.default.safeLoad(r()),{indent:2});i(o)}catch(e){i(e)}}},t.setResponse=function(e,t,n){return{payload:{path:e,method:t,res:n},type:R}},t.setRequest=function(e,t,n){return{payload:{path:e,method:t,req:n},type:j}},t.logRequest=function(e){return{payload:e,type:F}},t.executeRequest=function(e){return function(t){var n=t.fn,r=t.specActions,i=t.specSelectors,o=e.pathName,a=e.method,s=e.operation,u=s.toJS();e.contextUrl=(0,A.default)(i.url()).toString(),u&&u.operationId?e.operationId=u.operationId:u&&o&&a&&(e.operationId=n.opId(u,o,a));var c=(0,x.default)({},e);return c=n.buildRequest(c),r.setRequest(e.pathName,e.method,c),n.execute(e).then(function(t){return r.setResponse(e.pathName,e.method,t)}).catch(function(t){return r.setResponse(e.pathName,e.method,{error:!0,err:(0,D.default)(t)})})}},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=e.method,r=(0,_.default)(e,["path","method"]);return function(e){var i=e.fn.fetch,o=e.specSelectors,a=e.specActions,s=o.spec().toJS(),u=o.operationScheme(t,n),c=o.contentTypeValues([t,n]).toJS(),l=c.requestContentType,p=c.responseContentType,f=/xml/i.test(l),h=o.parameterValues([t,n],f).toJS();return a.executeRequest((0,y.default)({fetch:i,spec:s,pathName:t,method:n,parameters:h,requestContentType:l,scheme:u,responseContentType:p},r))}});t.execute=K},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(141),o=r(i);t.default=o.default||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";var r=n(449);e.exports=r},function(e,t,n){"use strict";function r(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var i=n(450),o=n(478);e.exports.Type=n(456),e.exports.Schema=n(455),e.exports.FAILSAFE_SCHEMA=n(459),e.exports.JSON_SCHEMA=n(458),e.exports.CORE_SCHEMA=n(457),e.exports.DEFAULT_SAFE_SCHEMA=n(454),e.exports.DEFAULT_FULL_SCHEMA=n(473),e.exports.load=i.load,e.exports.loadAll=i.loadAll,e.exports.safeLoad=i.safeLoad,e.exports.safeLoadAll=i.safeLoadAll,e.exports.dump=o.dump,e.exports.safeDump=o.safeDump,e.exports.YAMLException=n(452),e.exports.MINIMAL_SCHEMA=n(459),e.exports.SAFE_SCHEMA=n(454),e.exports.DEFAULT_SCHEMA=n(473),e.exports.scan=r("scan"),e.exports.parse=r("parse"),e.exports.compose=r("compose"),e.exports.addConstructor=r("addConstructor")},function(e,t,n){"use strict";function r(e){return 10===e||13===e}function i(e){return 9===e||32===e}function o(e){return 9===e||32===e||10===e||13===e}function a(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return 48<=e&&e<=57?e-48:(t=32|e,97<=t&&t<=102?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function c(e){return 48<=e&&e<=57?e-48:-1}function l(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function p(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function f(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||K,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function h(e,t){return new q(t,new U(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function d(e,t){throw h(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,h(e,t))}function v(e,t,n,r){var i,o,a,s;if(t1&&(e.result+=z.repeat("\n",t-1))}function k(e,t,n){var s,u,c,l,p,f,h,d,m,y=e.kind,g=e.result;if(m=e.input.charCodeAt(e.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=e.input.charCodeAt(e.position+1),o(u)||n&&a(u)))return!1;for(e.kind="scalar",e.result="",c=l=e.position,p=!1;0!==m;){if(58===m){if(u=e.input.charCodeAt(e.position+1),o(u)||n&&a(u))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),o(s))break}else{if(e.position===e.lineStart&&x(e)||n&&a(m))break;if(r(m)){if(f=e.line,h=e.lineStart,d=e.lineIndent,b(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=h,e.lineIndent=d;break}}p&&(v(e,c,l,!1),w(e,e.line-f),c=l=e.position,p=!1),i(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return v(e,c,l,!1),!!e.result||(e.kind=y,e.result=g,!1)}function S(e,t){var n,i,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(v(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;i=e.position,e.position++,o=e.position}else r(n)?(v(e,i,o,!0),w(e,b(e,!1,t)),i=o=e.position):e.position===e.lineStart&&x(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function E(e,t){var n,i,o,a,c,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return v(e,n,e.position,!0),e.position++,!0;if(92===l){if(v(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),r(l))b(e,!1,t);else if(l<256&&ie[l])e.result+=oe[l],e.position++;else if((c=u(l))>0){for(o=c,a=0;o>0;o--)l=e.input.charCodeAt(++e.position),(c=s(l))>=0?a=(a<<4)+c:d(e,"expected hexadecimal character");e.result+=p(a),e.position++}else d(e,"unknown escape sequence");n=i=e.position}else r(l)?(v(e,n,i,!0),w(e,b(e,!1,t)),n=i=e.position):e.position===e.lineStart&&x(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function C(e,t){var n,r,i,a,s,u,c,l,p,f,h,m=!0,v=e.tag,y=e.anchor,_={};if(h=e.input.charCodeAt(e.position),91===h)a=93,c=!1,r=[];else{if(123!==h)return!1;a=125,c=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),h=e.input.charCodeAt(++e.position);0!==h;){if(b(e,!0,t),h=e.input.charCodeAt(e.position),h===a)return e.position++,e.tag=v,e.anchor=y,e.kind=c?"mapping":"sequence",e.result=r,!0;m||d(e,"missed comma between flow collection entries"),p=l=f=null,s=u=!1,63===h&&(i=e.input.charCodeAt(e.position+1),o(i)&&(s=u=!0,e.position++,b(e,!0,t))),n=e.line,I(e,t,H,!1,!0),p=e.tag,l=e.result, +b(e,!0,t),h=e.input.charCodeAt(e.position),!u&&e.line!==n||58!==h||(s=!0,h=e.input.charCodeAt(++e.position),b(e,!0,t),I(e,t,H,!1,!0),f=e.result),c?g(e,r,_,p,l,f):s?r.push(g(e,null,_,p,l,f)):r.push(l),b(e,!0,t),h=e.input.charCodeAt(e.position),44===h?(m=!0,h=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function A(e,t){var n,o,a,s,u=Y,l=!1,p=!1,f=t,h=0,m=!1;if(s=e.input.charCodeAt(e.position),124===s)o=!1;else{if(62!==s)return!1;o=!0}for(e.kind="scalar",e.result="";0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)Y===u?u=43===s?Z:$:d(e,"repeat of a chomping mode identifier");else{if(!((a=c(s))>=0))break;0===a?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?d(e,"repeat of an indentation width identifier"):(f=t+a-1,p=!0)}if(i(s)){do s=e.input.charCodeAt(++e.position);while(i(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!r(s)&&0!==s)}for(;0!==s;){for(_(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!p||e.lineIndentf&&(f=e.lineIndent),r(s))h++;else{if(e.lineIndentt)&&0!==i)d(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(I(e,t,X,!0,a)&&(_?v=e.result:y=e.result),_||(g(e,f,h,m,v,y,s,u),m=v=y=null),b(e,!0,-1),c=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==c)d(e,"bad indentation of a mapping entry");else if(e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndent tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):d(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||v}function N(e){var t,n,a,s,u=e.position,c=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(b(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(c=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),a=[],n.length<1&&d(e,"directive name must not be less than one character in length");0!==s;){for(;i(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!r(s));break}if(r(s))break;for(t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}0!==s&&_(e),V.call(se,n)?se[n](e,n,a):m(e,'unknown document directive "'+n+'"')}return b(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,b(e,!0,-1)):c&&d(e,"directives end mark is expected"),I(e,e.lineIndent-1,X,!1,!0),b(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(u,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&x(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,b(e,!0,-1))):void(e.position0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(r-1))===-1;)if(r-=1,this.position-r>t/2-1){n=" ... ",r+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(r,a),i.repeat(" ",e)+n+s+o+"\n"+i.repeat(" ",e+this.position-r+n.length)+"^"},r.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},e.exports=r},function(e,t,n){"use strict";var r=n(455);e.exports=new r({include:[n(457)],implicit:[n(467),n(468)],explicit:[n(469),n(470),n(471),n(472)]})},function(e,t,n){"use strict";function r(e,t,n){var i=[];return e.include.forEach(function(e){n=r(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&t.kind===e.kind&&i.push(n)}),n.push(e)}),n.filter(function(e,t){return i.indexOf(t)===-1})}function i(){function e(e){r[e.kind][e.tag]=r.fallback[e.tag]=e}var t,n,r={scalar:{},sequence:{},mapping:{},fallback:{}};for(t=0,n=arguments.length;t=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){i.unshift(parseFloat(e,10))}),t=0,r=1,i.forEach(function(e){t+=e*r,r*=60}),n*t):n*parseFloat(t,10)}function o(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(e))return"-0.0";return n=e.toString(10),l.test(n)?n.replace("e",".e"):n}function a(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||s.isNegativeZero(e))}var s=n(451),u=n(456),c=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;e.exports=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o,defaultStyle:"lowercase"})},function(e,t,n){"use strict";function r(e){return null!==e&&(null!==s.exec(e)||null!==u.exec(e))}function i(e){var t,n,r,i,o,a,c,l,p,f,h=0,d=null;if(t=s.exec(e),null===t&&(t=u.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],a=+t[5],c=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(l=+t[10],p=+(t[11]||0),d=6e4*(60*l+p),"-"===t[9]&&(d=-d)),f=new Date(Date.UTC(n,r,i,o,a,c,h)),d&&f.setTime(f.getTime()-d),f}function o(e){return e.toISOString()}var a=n(456),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),u=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:o})},function(e,t,n){"use strict";function r(e){return"<<"===e||null===e}var i=n(456);e.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})},function(e,t,n){function r(e){if(null===e)return!1;var t,n,r=0,i=e.length,o=c;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8===0}function i(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=c,a=0,u=[];for(t=0;t>16&255),u.push(a>>8&255),u.push(255&a)),a=a<<6|o.indexOf(r.charAt(t));return n=i%4*6,0===n?(u.push(a>>16&255),u.push(a>>8&255),u.push(255&a)):18===n?(u.push(a>>10&255),u.push(a>>2&255)):12===n&&u.push(a>>4&255),s?s.from?s.from(u):new s(u):u}function o(e){var t,n,r="",i=0,o=e.length,a=c;for(t=0;t>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]),i=(i<<8)+e[t];return n=o%3,0===n?(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]):2===n?(r+=a[i>>10&63],r+=a[i>>4&63],r+=a[i<<2&63],r+=a[64]):1===n&&(r+=a[i>>2&63],r+=a[i<<4&63],r+=a[64],r+=a[64]),r}function a(e){return s&&s.isBuffer(e)}var s;try{s=n(132).Buffer}catch(e){}var u=n(456),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})},function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,o,u=[],c=e;for(t=0,n=c.length;t3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0}function i(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function o(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function a(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=n(456);e.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})},function(e,t,n){function r(e){if(null===e)return!1;try{var t="("+e+")",n=s.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&"FunctionExpression"===n.body[0].expression.type}catch(e){return!1}}function i(e){var t,n="("+e+")",r=s.parse(n,{range:!0}),i=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(e){i.push(e.name)}),t=r.body[0].expression.body.range,new Function(i,n.slice(t[0]+1,t[1]-1))}function o(e){return e.toString()}function a(e){return"[object Function]"===Object.prototype.toString.call(e)}var s;try{s=n(477)}catch(e){"undefined"!=typeof window&&(s=window.esprima)}var u=n(456);e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})},function(e,t,n){!function(t,n){e.exports=n()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e,t,n){var r=null,i=function(e,t){n&&n(e,t),r&&r.visit(e,t)},u="function"==typeof n?i:null,c=!1;if(t){c="boolean"==typeof t.comment&&t.comment;var l="boolean"==typeof t.attachComment&&t.attachComment;(c||l)&&(r=new o.CommentHandler,r.attach=l,t.comment=!0,u=i)}var p;p=t&&"boolean"==typeof t.jsx&&t.jsx?new s.JSXParser(e,t,u):new a.Parser(e,t,u);var f=p.parseProgram();return c&&(f.comments=r.comments),p.config.tokens&&(f.tokens=p.tokens),p.config.tolerant&&(f.errors=p.errorHandler.errors),f}function i(e,t,n){var r,i=new u.Tokenizer(e,t);r=[];try{for(;;){var o=i.getNextToken();if(!o)break;n&&(o=n(o)),r.push(o)}}catch(e){i.errorHandler.tolerate(e)}return i.errorHandler.tolerant&&(r.errors=i.errors()),r}var o=n(1),a=n(3),s=n(11),u=n(15);t.parse=r,t.tokenize=i;var c=n(2);t.Syntax=c.Syntax,t.version="3.1.3"},function(e,t,n){"use strict";var r=n(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===r.Syntax.BlockStatement&&0===e.body.length){for(var n=[],i=this.leading.length-1;i>=0;--i){var o=this.leading[i];t.end.offset>=o.start&&(n.unshift(o.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e,t){var n=[];if(this.trailing.length>0){for(var r=this.trailing.length-1;r>=0;--r){var i=this.trailing[r];i.start>=t.end.offset&&n.unshift(i.comment)}return this.trailing.length=0,n}var o=this.stack[this.stack.length-1];if(o&&o.node.trailingComments){var a=o.node.trailingComments[0];a&&a.range[0]>=t.end.offset&&(n=o.node.trailingComments,delete o.node.trailingComments)}return n},e.prototype.findLeadingComments=function(e,t){for(var n,r=[];this.stack.length>0;){var i=this.stack[this.stack.length-1];if(!(i&&i.start>=t.start.offset))break;n=this.stack.pop().node}if(n){for(var o=n.leadingComments?n.leadingComments.length:0,a=o-1;a>=0;--a){var s=n.leadingComments[a];s.range[1]<=t.start.offset&&(r.unshift(s),n.leadingComments.splice(a,1))}return n.leadingComments&&0===n.leadingComments.length&&delete n.leadingComments,r}for(var a=this.leading.length-1;a>=0;--a){var i=this.leading[a];i.start<=t.start.offset&&(r.unshift(i.comment),this.leading.splice(a,1))}return r},e.prototype.visitNode=function(e,t){if(!(e.type===r.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(e,t),i=this.findLeadingComments(e,t);i.length>0&&(e.leadingComments=i),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=n,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type?this.visitComment(e,t):"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var r=n(4),i=n(5),o=n(6),a=n(7),s=n(8),u=n(2),c=n(10),l="ArrowParameterPlaceHolder",p=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new o.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.sourceType=t&&"module"===t.sourceType?"module":"script",this.lookahead=null,this.hasLineTerminator=!1,this.context={allowIn:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:"module"===this.sourceType},this.tokens=[],this.startMarker={index:0,lineNumber:this.scanner.lineNumber, +lineStart:0},this.lastMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.nextToken(),this.lastMarker={index:this.scanner.index,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type===a.Token.EOF||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.lineNumber=this.startMarker.lineNumber,this.lastMarker.lineStart=this.startMarker.lineStart)},e.prototype.parsePrimaryExpression=function(){var e,t,n,r,o=this.createNode();switch(this.lookahead.type){case a.Token.Identifier:"module"===this.sourceType&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.finalize(o,new c.Identifier(this.nextToken().value));break;case a.Token.NumericLiteral:case a.Token.StringLiteral:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),r=this.getTokenRaw(n),e=this.finalize(o,new c.Literal(n.value,r));break;case a.Token.BooleanLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),n.value="true"===n.value,r=this.getTokenRaw(n),e=this.finalize(o,new c.Literal(n.value,r));break;case a.Token.NullLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),n.value=null,r=this.getTokenRaw(n),e=this.finalize(o,new c.Literal(n.value,r));break;case a.Token.Template:e=this.parseTemplateLiteral();break;case a.Token.Punctuator:switch(t=this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,n=this.nextRegexToken(),r=this.getTokenRaw(n),e=this.finalize(o,new c.RegexLiteral(n.value,r,n.regex));break;default:this.throwUnexpectedToken(this.nextToken())}break;case a.Token.Keyword:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(o,new c.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(o,new c.ThisExpression)):this.matchKeyword("class")?e=this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new c.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new c.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,n},e.prototype.parsePropertyMethodFunction=function(){var e=!1,t=this.createNode(),n=this.context.allowYield;this.context.allowYield=!1;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=n,this.finalize(t,new c.FunctionExpression(null,r.params,i,e))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),n=null;switch(t.type){case a.Token.StringLiteral:case a.Token.NumericLiteral:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,i.Messages.StrictOctalLiteral);var r=this.getTokenRaw(t);n=this.finalize(e,new c.Literal(t.value,r));break;case a.Token.Identifier:case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.Keyword:n=this.finalize(e,new c.Identifier(t.value));break;case a.Token.Punctuator:"["===t.value?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):this.throwUnexpectedToken(t);break;default:this.throwUnexpectedToken(t)}return n},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n,r,o=this.createNode(),s=this.lookahead,u=!1,l=!1,p=!1;s.type===a.Token.Identifier?(this.nextToken(),n=this.finalize(o,new c.Identifier(s.value))):this.match("*")?this.nextToken():(u=this.match("["),n=this.parseObjectPropertyKey());var f=this.qualifiedPropertyName(this.lookahead);if(s.type===a.Token.Identifier&&"get"===s.value&&f)t="get",u=this.match("["),n=this.parseObjectPropertyKey(),this.context.allowYield=!1,r=this.parseGetterMethod();else if(s.type===a.Token.Identifier&&"set"===s.value&&f)t="set",u=this.match("["),n=this.parseObjectPropertyKey(),r=this.parseSetterMethod();else if(s.type===a.Token.Punctuator&&"*"===s.value&&f)t="init",u=this.match("["),n=this.parseObjectPropertyKey(),r=this.parseGeneratorMethod(),l=!0;else if(n||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":"))!u&&this.isPropertyKey(n,"__proto__")&&(e.value&&this.tolerateError(i.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),r=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))r=this.parsePropertyMethodFunction(),l=!0;else if(s.type===a.Token.Identifier){var h=this.finalize(o,new c.Identifier(s.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),p=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);r=this.finalize(o,new c.AssignmentPattern(h,d))}else p=!0,r=h}else this.throwUnexpectedToken(this.nextToken());return this.finalize(o,new c.Property(t,n,u,r,l,p))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new c.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new c.TemplateElement(n,t.tail))},e.prototype.parseTemplateElement=function(){this.lookahead.type!==a.Token.Template&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new c.TemplateElement(n,t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],r=this.parseTemplateHead();for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize(e,new c.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:l,params:[]};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:l,params:[e]};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);this.startMarker.index")||this.expect("=>"),this.context.isBindingElement=!1;for(var o=0;o")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(r=!0,e={type:l,params:[e]}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(var o=0;o0){this.nextToken(),n.prec=r,this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],o=t,a=this.isolateCoverGrammar(this.parseExponentiationExpression),s=[o,n,a];;){if(r=this.binaryPrecedence(this.lookahead),r<=0)break;for(;s.length>2&&r<=s[s.length-2].prec;){a=s.pop();var u=s.pop().value;o=s.pop(),i.pop();var l=this.startNode(i[i.length-1]);s.push(this.finalize(l,new c.BinaryExpression(u,o,a)))}n=this.nextToken(),n.prec=r,s.push(n),i.push(this.lookahead),s.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=s.length-1;for(t=s[p],i.pop();p>1;){var l=this.startNode(i.pop());t=this.finalize(l,new c.BinaryExpression(s[p-1].value,s[p-2],t)),p-=2}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new c.ConditionalExpression(t,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=this.reinterpretAsCoverFormalsList(e);if(r){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var o=this.context.strict,a=this.context.allowYield;this.context.allowYield=!0;var s=this.startNode(t);this.expect("=>");var p=this.match("{")?this.parseFunctionSourceElements():this.isolateCoverGrammar(this.parseAssignmentExpression),f=p.type!==u.Syntax.BlockStatement;this.context.strict&&r.firstRestricted&&this.throwUnexpectedToken(r.firstRestricted,r.message),this.context.strict&&r.stricted&&this.tolerateUnexpectedToken(r.stricted,r.message),e=this.finalize(s,new c.ArrowFunctionExpression(r.params,p,f)),this.context.strict=o,this.context.allowYield=a}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var h=e;this.scanner.isRestrictedWord(h.name)&&this.tolerateUnexpectedToken(n,i.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(h.name)&&this.tolerateUnexpectedToken(n,i.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),n=this.nextToken();var d=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new c.AssignmentExpression(n.value,e,d)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);this.startMarker.index",t.TokenName[n.Identifier]="Identifier",t.TokenName[n.Keyword]="Keyword",t.TokenName[n.NullLiteral]="Null",t.TokenName[n.NumericLiteral]="Numeric", +t.TokenName[n.Punctuator]="Punctuator",t.TokenName[n.StringLiteral]="String",t.TokenName[n.RegularExpression]="RegularExpression",t.TokenName[n.Template]="Template"},function(e,t,n){"use strict";function r(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function i(e){return"01234567".indexOf(e)}var o=n(4),a=n(5),s=n(9),u=n(7),c=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){void 0===e&&(e=a.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,a.Messages.UnexpectedTokenIllegal)},e.prototype.skipSingleLineComment=function(e){var t,n,r;for(this.trackComment&&(t=[],n=this.index-e,r={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,s.Character.isLineTerminator(i)){if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[n+e,this.index-1],range:[n,this.index-1],loc:r};t.push(o)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!1,slice:[n+e,this.index],range:[n,this.index],loc:r};t.push(o)}return t},e.prototype.skipMultiLineComment=function(){var e,t,n;for(this.trackComment&&(e=[],t=this.index-2,n={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(s.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:n};e.push(i)}return e}++this.index}else++this.index}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:n};e.push(i)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(s.Character.isWhiteSpace(n))++this.index;else if(s.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(n=this.source.charCodeAt(this.index+1),47===n){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==n)break;this.index+=2;var r=this.skipMultiLineComment();this.trackComment&&(e=e.concat(r))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;var r=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(r))}else{if(60!==n)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;var r=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);if(n>=56320&&n<=57343){var r=t;t=1024*(r-55296)+n-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,i=0;i1114111||"}"!==e)&&this.throwUnexpectedToken(),s.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!s.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=s.Character.fromCodePoint(e);this.index+=t.length;var n;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),e=n.charCodeAt(0),n&&"\\"!==n&&s.Character.isIdentifierStart(e)||this.throwUnexpectedToken()),t=n);!this.eof()&&(e=this.codePointAt(this.index),s.Character.isIdentifierPart(e));)n=s.Character.fromCodePoint(e),t+=n,this.index+=n.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),e=n.charCodeAt(0),n&&"\\"!==n&&s.Character.isIdentifierPart(e)||this.throwUnexpectedToken()),t+=n);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=i(e);return!this.eof()&&s.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+i(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&s.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+i(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();return e=1===n.length?u.Token.Identifier:this.isKeyword(n)?u.Token.Keyword:"null"===n?u.Token.NullLiteral:"true"===n||"false"===n?u.Token.BooleanLiteral:u.Token.Identifier,{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e={type:u.Token.Punctuator,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index},t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)))}return this.index===e.start&&this.throwUnexpectedToken(),e.end=this.index,e.value=t,e},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&s.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),s.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&(t=this.source[this.index],"0"===t||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(s.Character.isIdentifierStart(t)||s.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:u.Token.NumericLiteral,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(s.Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&s.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(s.Character.isIdentifierStart(this.source.charCodeAt(this.index))||s.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,r){var o=parseInt(t||r,16);return o>1114111&&i.throwUnexpectedToken(a.Messages.InvalidRegExp),o<=65535?String.fromCharCode(o):n}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,n));try{RegExp(r)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];o.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,r=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],s.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),t+=e;else if(s.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){r=!0;break}"["===e&&(n=!0)}r||this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);var i=t.substr(1,t.length-2);return{value:i,literal:t}},e.prototype.scanRegExpFlags=function(){for(var e="",t="";!this.eof();){var n=this.source[this.index];if(!s.Character.isIdentifierPart(n.charCodeAt(0)))break;if(++this.index,"\\"!==n||this.eof())t+=n,e+=n;else if(n=this.source[this.index],"u"===n){++this.index;var r=this.index;if(n=this.scanHexEscape("u"))for(t+=n,e+="\\u";r=55296&&e<57343&&s.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=c},function(e,t){"use strict";var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){ +return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";var r=n(2),i=function(){function e(e){this.type=r.Syntax.ArrayExpression,this.elements=e}return e}();t.ArrayExpression=i;var o=function(){function e(e){this.type=r.Syntax.ArrayPattern,this.elements=e}return e}();t.ArrayPattern=o;var a=function(){function e(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n}return e}();t.ArrowFunctionExpression=a;var s=function(){function e(e,t,n){this.type=r.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n}return e}();t.AssignmentExpression=s;var u=function(){function e(e,t){this.type=r.Syntax.AssignmentPattern,this.left=e,this.right=t}return e}();t.AssignmentPattern=u;var c=function(){function e(e,t,n){var i="||"===e||"&&"===e;this.type=i?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n}return e}();t.BinaryExpression=c;var l=function(){function e(e){this.type=r.Syntax.BlockStatement,this.body=e}return e}();t.BlockStatement=l;var p=function(){function e(e){this.type=r.Syntax.BreakStatement,this.label=e}return e}();t.BreakStatement=p;var f=function(){function e(e,t){this.type=r.Syntax.CallExpression,this.callee=e,this.arguments=t}return e}();t.CallExpression=f;var h=function(){function e(e,t){this.type=r.Syntax.CatchClause,this.param=e,this.body=t}return e}();t.CatchClause=h;var d=function(){function e(e){this.type=r.Syntax.ClassBody,this.body=e}return e}();t.ClassBody=d;var m=function(){function e(e,t,n){this.type=r.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n}return e}();t.ClassDeclaration=m;var v=function(){function e(e,t,n){this.type=r.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n}return e}();t.ClassExpression=v;var y=function(){function e(e,t){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}return e}();t.ComputedMemberExpression=y;var g=function(){function e(e,t,n){this.type=r.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n}return e}();t.ConditionalExpression=g;var _=function(){function e(e){this.type=r.Syntax.ContinueStatement,this.label=e}return e}();t.ContinueStatement=_;var b=function(){function e(){this.type=r.Syntax.DebuggerStatement}return e}();t.DebuggerStatement=b;var x=function(){function e(e,t){this.type=r.Syntax.ExpressionStatement,this.expression=e,this.directive=t}return e}();t.Directive=x;var w=function(){function e(e,t){this.type=r.Syntax.DoWhileStatement,this.body=e,this.test=t}return e}();t.DoWhileStatement=w;var k=function(){function e(){this.type=r.Syntax.EmptyStatement}return e}();t.EmptyStatement=k;var S=function(){function e(e){this.type=r.Syntax.ExportAllDeclaration,this.source=e}return e}();t.ExportAllDeclaration=S;var E=function(){function e(e){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=e}return e}();t.ExportDefaultDeclaration=E;var C=function(){function e(e,t,n){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n}return e}();t.ExportNamedDeclaration=C;var A=function(){function e(e,t){this.type=r.Syntax.ExportSpecifier,this.exported=t,this.local=e}return e}();t.ExportSpecifier=A;var T=function(){function e(e){this.type=r.Syntax.ExpressionStatement,this.expression=e}return e}();t.ExpressionStatement=T;var D=function(){function e(e,t,n){this.type=r.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1}return e}();t.ForInStatement=D;var M=function(){function e(e,t,n){this.type=r.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n}return e}();t.ForOfStatement=M;var O=function(){function e(e,t,n,i){this.type=r.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=i}return e}();t.ForStatement=O;var P=function(){function e(e,t,n,i){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1}return e}();t.FunctionDeclaration=P;var I=function(){function e(e,t,n,i){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1}return e}();t.FunctionExpression=I;var N=function(){function e(e){this.type=r.Syntax.Identifier,this.name=e}return e}();t.Identifier=N;var R=function(){function e(e,t,n){this.type=r.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n}return e}();t.IfStatement=R;var j=function(){function e(e,t){this.type=r.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}return e}();t.ImportDeclaration=j;var F=function(){function e(e){this.type=r.Syntax.ImportDefaultSpecifier,this.local=e}return e}();t.ImportDefaultSpecifier=F;var B=function(){function e(e){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=e}return e}();t.ImportNamespaceSpecifier=B;var L=function(){function e(e,t){this.type=r.Syntax.ImportSpecifier,this.local=e,this.imported=t}return e}();t.ImportSpecifier=L;var z=function(){function e(e,t){this.type=r.Syntax.LabeledStatement,this.label=e,this.body=t}return e}();t.LabeledStatement=z;var q=function(){function e(e,t){this.type=r.Syntax.Literal,this.value=e,this.raw=t}return e}();t.Literal=q;var U=function(){function e(e,t){this.type=r.Syntax.MetaProperty,this.meta=e,this.property=t}return e}();t.MetaProperty=U;var W=function(){function e(e,t,n,i,o){this.type=r.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=i,this.static=o}return e}();t.MethodDefinition=W;var K=function(){function e(e,t){this.type=r.Syntax.NewExpression,this.callee=e,this.arguments=t}return e}();t.NewExpression=K;var V=function(){function e(e){this.type=r.Syntax.ObjectExpression,this.properties=e}return e}();t.ObjectExpression=V;var H=function(){function e(e){this.type=r.Syntax.ObjectPattern,this.properties=e}return e}();t.ObjectPattern=H;var J=function(){function e(e,t){this.type=r.Syntax.Program,this.body=e,this.sourceType=t}return e}();t.Program=J;var G=function(){function e(e,t,n,i,o,a){this.type=r.Syntax.Property,this.key=t,this.computed=n,this.value=i,this.kind=e,this.method=o,this.shorthand=a}return e}();t.Property=G;var X=function(){function e(e,t,n){this.type=r.Syntax.Literal,this.value=e,this.raw=t,this.regex=n}return e}();t.RegexLiteral=X;var Y=function(){function e(e){this.type=r.Syntax.RestElement,this.argument=e}return e}();t.RestElement=Y;var $=function(){function e(e){this.type=r.Syntax.ReturnStatement,this.argument=e}return e}();t.ReturnStatement=$;var Z=function(){function e(e){this.type=r.Syntax.SequenceExpression,this.expressions=e}return e}();t.SequenceExpression=Z;var Q=function(){function e(e){this.type=r.Syntax.SpreadElement,this.argument=e}return e}();t.SpreadElement=Q;var ee=function(){function e(e,t){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}return e}();t.StaticMemberExpression=ee;var te=function(){function e(){this.type=r.Syntax.Super}return e}();t.Super=te;var ne=function(){function e(e,t){this.type=r.Syntax.SwitchCase,this.test=e,this.consequent=t}return e}();t.SwitchCase=ne;var re=function(){function e(e,t){this.type=r.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}return e}();t.SwitchStatement=re;var ie=function(){function e(e,t){this.type=r.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}return e}();t.TaggedTemplateExpression=ie;var oe=function(){function e(e,t){this.type=r.Syntax.TemplateElement,this.value=e,this.tail=t}return e}();t.TemplateElement=oe;var ae=function(){function e(e,t){this.type=r.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}return e}();t.TemplateLiteral=ae;var se=function(){function e(){this.type=r.Syntax.ThisExpression}return e}();t.ThisExpression=se;var ue=function(){function e(e){this.type=r.Syntax.ThrowStatement,this.argument=e}return e}();t.ThrowStatement=ue;var ce=function(){function e(e,t,n){this.type=r.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n}return e}();t.TryStatement=ce;var le=function(){function e(e,t){this.type=r.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}return e}();t.UnaryExpression=le;var pe=function(){function e(e,t,n){this.type=r.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n}return e}();t.UpdateExpression=pe;var fe=function(){function e(e,t){this.type=r.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}return e}();t.VariableDeclaration=fe;var he=function(){function e(e,t){this.type=r.Syntax.VariableDeclarator,this.id=e,this.init=t}return e}();t.VariableDeclarator=he;var de=function(){function e(e,t){this.type=r.Syntax.WhileStatement,this.test=e,this.body=t}return e}();t.WhileStatement=de;var me=function(){function e(e,t){this.type=r.Syntax.WithStatement,this.object=e,this.body=t}return e}();t.WithStatement=me;var ve=function(){function e(e,t){this.type=r.Syntax.YieldExpression,this.argument=e,this.delegate=t}return e}();t.YieldExpression=ve},function(e,t,n){"use strict";function r(e){var t;switch(e.type){case l.JSXSyntax.JSXIdentifier:var n=e;t=n.name;break;case l.JSXSyntax.JSXNamespacedName:var i=e;t=r(i.namespace)+":"+r(i.name);break;case l.JSXSyntax.JSXMemberExpression:var o=e;t=r(o.object)+"."+r(o.property)}return t}var i,o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},a=n(9),s=n(7),u=n(3),c=n(12),l=n(13),p=n(10),f=n(14);!function(e){e[e.Identifier=100]="Identifier",e[e.Text=101]="Text"}(i||(i={})),s.TokenName[i.Identifier]="JSXIdentifier",s.TokenName[i.Text]="JSXText";var h=function(e){function t(t,n,r){e.call(this,t,n,r)}return o(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.lineNumber,this.scanner.lineStart=this.startMarker.lineStart},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,r=!1,i=!1,o=!1;!this.scanner.eof()&&n&&!r;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(r=";"===s,t+=s,++this.scanner.index,!r)switch(t.length){case 2:i="#"===s;break;case 3:i&&(o="x"===s,n=o||a.Character.isDecimalDigit(s.charCodeAt(0)),i=i&&!o);break;default:n=n&&!(i&&!a.Character.isDecimalDigit(s.charCodeAt(0))),n=n&&!(o&&!a.Character.isHexDigit(s.charCodeAt(0)))}}if(n&&r&&t.length>2){var u=t.substr(1,t.length-2);i&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):o&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):i||o||!c.XHTMLEntities[u]||(t=c.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e){var t=this.scanner.source[this.scanner.index++];return{type:s.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===e||39===e){for(var n=this.scanner.index,r=this.scanner.source[this.scanner.index++],o="";!this.scanner.eof();){var u=this.scanner.source[this.scanner.index++];if(u===r)break;o+="&"===u?this.scanXHTMLEntity(r):u}return{type:s.Token.StringLiteral,value:o,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}if(46===e){var c=this.scanner.source.charCodeAt(this.scanner.index+1),l=this.scanner.source.charCodeAt(this.scanner.index+2),t=46===c&&46===l?"...":".",n=this.scanner.index;return this.scanner.index+=t.length,{type:s.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}if(96===e)return{type:s.Token.Template,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(a.Character.isIdentifierStart(e)&&92!==e){var n=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(a.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}var p=this.scanner.source.slice(n,this.scanner.index);return{type:i.Identifier,value:p,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}this.scanner.throwUnexpectedToken()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,a.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart;var r={type:i.Text,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(r)),r},t.prototype.peekJSXToken=function(){var e=this.scanner.index,t=this.scanner.lineNumber,n=this.scanner.lineStart;this.scanner.scanComments();var r=this.lexJSX();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=n,r},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();t.type===s.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===s.Token.Punctuator&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return t.type!==i.Identifier&&this.throwUnexpectedToken(t),this.finalize(e,new f.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new f.JSXNamespacedName(n,r))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var o=this.parseJSXIdentifier();t=this.finalize(e,new f.JSXMemberExpression(i,o))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=n;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new f.JSXNamespacedName(r,i))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();t.type!==s.Token.StringLiteral&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new p.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new f.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new f.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new f.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new f.JSXOpeningElement(t,r,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new f.JSXClosingElement(t))}var n=this.parseJSXElementName(),r=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new f.JSXOpeningElement(n,i,r))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.finalize(e,new f.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new f.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;var a=this.finalize(e.node,new f.JSXElement(e.opening,e.children,e.closing));e=t.pop(),e.children.push(a)}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],r=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:r,children:n});n=i.children,r=i.closing}return this.finalize(e,new f.JSXElement(t,n,r))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t}(u.Parser);t.JSXParser=h},function(e,t){"use strict";t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t){"use strict";t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";var r=n(13),i=function(){function e(e){this.type=r.JSXSyntax.JSXClosingElement,this.name=e}return e}();t.JSXClosingElement=i;var o=function(){function e(e,t,n){this.type=r.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n}return e}();t.JSXElement=o;var a=function(){function e(){this.type=r.JSXSyntax.JSXEmptyExpression}return e}();t.JSXEmptyExpression=a;var s=function(){function e(e){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=e}return e}();t.JSXExpressionContainer=s;var u=function(){function e(e){this.type=r.JSXSyntax.JSXIdentifier,this.name=e}return e}();t.JSXIdentifier=u;var c=function(){function e(e,t){this.type=r.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}return e}();t.JSXMemberExpression=c;var l=function(){function e(e,t){this.type=r.JSXSyntax.JSXAttribute,this.name=e,this.value=t}return e}();t.JSXAttribute=l;var p=function(){function e(e,t){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}return e}();t.JSXNamespacedName=p;var f=function(){function e(e,t,n){this.type=r.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n}return e}();t.JSXOpeningElement=f;var h=function(){function e(e){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=e}return e}();t.JSXSpreadAttribute=h;var d=function(){function e(e,t){this.type=r.JSXSyntax.JSXText,this.value=e,this.raw=t}return e}();t.JSXText=d},function(e,t,n){"use strict";var r=n(8),i=n(6),o=n(7),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var r=this.values[this.curly-4];t=!!r&&!this.beforeFunctionExpression(r)}else if("function"===this.values[this.curly-4]){var i=this.values[this.curly-5];t=!i||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){e.type===o.Token.Punctuator||e.type===o.Token.Keyword?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;tr&&" "!==e[d+1],d=o);else if(!l(a))return le;m=m&&p(a)}u=u||h&&o-d-1>r&&" "!==e[d+1]}return s||u?" "===e[0]&&n>9?le:u?ce:ue:m&&!i(e)?ae:se}function d(e,t,n,r){e.dump=function(){function i(t){return u(e,t)}if(0===t.length)return"''";if(!e.noCompatMode&&oe.indexOf(t)!==-1)return"'"+t+"'";var o=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),c=r||e.flowLevel>-1&&n>=e.flowLevel;switch(h(t,c,e.indent,s,i)){case ae:return t;case se:return"'"+t.replace(/'/g,"''")+"'";case ue:return"|"+m(t,e.indent)+v(a(t,o));case ce:return">"+m(t,e.indent)+v(a(y(t,s),o));case le:return'"'+_(t,s)+'"';default:throw new O("impossible error: invalid scalar style")}}()}function m(e,t){var n=" "===e[0]?String(t):"",r="\n"===e[e.length-1],i=r&&("\n"===e[e.length-2]||"\n"===e),o=i?"+":r?"":"-";return n+o+"\n"}function v(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function y(e,t){for(var n,r,i=/(\n+)([^\n]*)/g,o=function(){var n=e.indexOf("\n");return n=n!==-1?n:e.length,i.lastIndex=n,g(e.slice(0,n),t)}(),a="\n"===e[0]||" "===e[0];r=i.exec(e);){var s=r[1],u=r[2];n=" "===u[0],o+=s+(a||n||""===u?"":"\n")+g(u,t),a=n}return o}function g(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,a=0,s=0,u="";n=i.exec(e);)s=n.index,s-o>t&&(r=a>o?a:s,u+="\n"+e.slice(o,r),o=r+1),a=s;return u+="\n",u+=e.length-o>t&&a>o?e.slice(o,a)+"\n"+e.slice(a+1):e.slice(o),u.slice(1)}function _(e){for(var t,n,r="",o=0;o1024&&(s+="? "),s+=e.dump+": ",E(e,t,a,!1,!1)&&(s+=e.dump,u+=s));e.tag=c,e.dump="{"+u+"}"}function k(e,t,n,r){var i,o,a,u,c,l,p="",f=e.tag,h=Object.keys(n);if(e.sortKeys===!0)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new O("sortKeys must be a boolean or a function");for(i=0,o=h.length;i1024,c&&(l+=e.dump&&F===e.dump.charCodeAt(0)?"?":"? "),l+=e.dump,c&&(l+=s(e,t)),E(e,t+1,u,!0,c)&&(l+=e.dump&&F===e.dump.charCodeAt(0)?":":": ",l+=e.dump,p+=l));e.tag=f, +e.dump=p||"{}"}function S(e,t,n){var r,i,o,a,s,u;for(i=n?e.explicitTypes:e.implicitTypes,o=0,a=i.length;o tag resolver accepts not "'+u+'" style');r=s.represent[u](t,u)}e.dump=r}return!0}return!1}function E(e,t,n,r,i,o){e.tag=null,e.dump=n,S(e,n,!1)||S(e,n,!0);var a=N.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var s,u,c="[object Object]"===a||"[object Array]"===a;if(c&&(s=e.duplicates.indexOf(n),u=s!==-1),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(i=!1),u&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(c&&u&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)r&&0!==Object.keys(e.dump).length?(k(e,t,e.dump,i),u&&(e.dump="&ref_"+s+e.dump)):(w(e,t,e.dump),u&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a)r&&0!==e.dump.length?(x(e,t,e.dump,i),u&&(e.dump="&ref_"+s+e.dump)):(b(e,t,e.dump),u&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new O("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&d(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function C(e,t){var n,r,i=[],o=[];for(A(e,i,o),n=0,r=o.length;n1&&void 0!==arguments[1]?arguments[1]:"";if(m.List.isList(e))return e.some(function(e){return m.Map.isMap(e)&&e.get("in")===t})}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(m.List.isList(e))return e.some(function(e){return m.Map.isMap(e)&&e.get("type")===t})}function u(e,t){var n=b(e).getIn(["paths"].concat((0,f.default)(t)),(0,m.fromJS)({})),r=n.get("parameters")||new m.List,i=s(r,"file")?"multipart/form-data":a(r,"formData")?"application/x-www-form-urlencoded":n.get("consumes_value");return(0,m.fromJS)({requestContentType:i,responseContentType:n.get("produces_value")})}function c(e,t){return b(e).getIn(["paths"].concat((0,f.default)(t),["consumes"]),(0,m.fromJS)({}))}function l(e){return m.Map.isMap(e)?e:new m.Map}Object.defineProperty(t,"__esModule",{value:!0}),t.validateBeforeExecute=t.canExecuteScheme=t.operationScheme=t.hasHost=t.allowTryItOutFor=t.requestFor=t.responseFor=t.requests=t.responses=t.taggedOperations=t.operationsWithTags=t.tagDetails=t.tags=t.operationsWithRootInherited=t.schemes=t.host=t.basePath=t.definitions=t.findDefinition=t.securityDefinitions=t.security=t.produces=t.consumes=t.operations=t.paths=t.semver=t.version=t.externalDocs=t.info=t.spec=t.specResolved=t.specJson=t.specSource=t.specStr=t.url=t.lastError=void 0;var p=n(435),f=r(p);t.getParameter=i,t.parameterValues=o,t.parametersIncludeIn=a,t.parametersIncludeType=s,t.contentTypeValues=u,t.operationConsumes=c;var h=n(430),d=n(183),m=n(168),v="default",y=["get","put","post","delete","options","head","patch"],g=function(e){return e||(0,m.Map)()},_=(t.lastError=(0,h.createSelector)(g,function(e){return e.get("lastError")}),t.url=(0,h.createSelector)(g,function(e){return e.get("url")}),t.specStr=(0,h.createSelector)(g,function(e){return e.get("spec")||""}),t.specSource=(0,h.createSelector)(g,function(e){return e.get("specSource")||"not-editor"}),t.specJson=(0,h.createSelector)(g,function(e){return e.get("json",(0,m.Map)())}),t.specResolved=(0,h.createSelector)(g,function(e){return e.get("resolved",(0,m.Map)())})),b=t.spec=function(e){var t=_(e);return t},x=t.info=(0,h.createSelector)(b,function(e){return l(e&&e.get("info"))}),w=(t.externalDocs=(0,h.createSelector)(b,function(e){return l(e&&e.get("externalDocs"))}),t.version=(0,h.createSelector)(x,function(e){return e&&e.get("version")})),k=(t.semver=(0,h.createSelector)(w,function(e){return/v?([0-9]*)\.([0-9]*)\.([0-9]*)/i.exec(e).slice(1)}),t.paths=(0,h.createSelector)(b,function(e){return e.get("paths")})),S=t.operations=(0,h.createSelector)(k,function(e){if(!e||e.size<1)return(0,m.List)();var t=(0,m.List)();return e&&e.forEach?(e.forEach(function(e,n){return e&&e.forEach?void e.forEach(function(e,r){y.indexOf(r)!==-1&&(t=t.push((0,m.fromJS)({path:n,method:r,operation:e,id:r+"-"+n})))}):{}}),t):(0,m.List)()}),E=t.consumes=(0,h.createSelector)(b,function(e){return(0,m.Set)(e.get("consumes"))}),C=t.produces=(0,h.createSelector)(b,function(e){return(0,m.Set)(e.get("produces"))}),A=(t.security=(0,h.createSelector)(b,function(e){return e.get("security",(0,m.List)())}),t.securityDefinitions=(0,h.createSelector)(b,function(e){return e.get("securityDefinitions")}),t.findDefinition=function(e,t){return _(e).getIn(["definitions",t],null)},t.definitions=(0,h.createSelector)(b,function(e){return e.get("definitions")||(0,m.Map)()}),t.basePath=(0,h.createSelector)(b,function(e){return e.get("basePath")}),t.host=(0,h.createSelector)(b,function(e){return e.get("host")}),t.schemes=(0,h.createSelector)(b,function(e){return e.get("schemes",(0,m.Map)())}),t.operationsWithRootInherited=(0,h.createSelector)(S,E,C,function(e,t,n){return e.map(function(e){return e.update("operation",function(e){if(e){if(!m.Map.isMap(e))return;return e.withMutations(function(e){return e.get("consumes")||e.update("consumes",function(e){return(0,m.Set)(e).merge(t)}),e.get("produces")||e.update("produces",function(e){return(0,m.Set)(e).merge(n)}),e})}return(0,m.Map)()})})})),T=t.tags=(0,h.createSelector)(b,function(e){return e.get("tags",(0,m.List)())}),D=t.tagDetails=function(e,t){var n=T(e)||(0,m.List)();return n.filter(m.Map.isMap).find(function(e){return e.get("name")===t},(0,m.Map)())},M=t.operationsWithTags=(0,h.createSelector)(A,function(e){return e.reduce(function(e,t){var n=(0,m.Set)(t.getIn(["operation","tags"]));return n.count()<1?e.update(v,(0,m.List)(),function(e){return e.push(t)}):n.reduce(function(e,n){return e.update(n,(0,m.List)(),function(e){return e.push(t)})},e)},(0,m.Map)())}),O=(t.taggedOperations=function(e){return function(t){var n=t.getConfigs,r=n(),i=r.operationsSorter;return M(e).map(function(t,n){var r="function"==typeof i?i:d.sorters.operationsSorter[i],o=r?t.sort(r):t;return(0,m.Map)({tagDetails:D(e,n),operations:o})})}},t.responses=(0,h.createSelector)(g,function(e){return e.get("responses",(0,m.Map)())})),P=t.requests=(0,h.createSelector)(g,function(e){return e.get("requests",(0,m.Map)())}),I=(t.responseFor=function(e,t,n){return O(e).getIn([t,n],null)},t.requestFor=function(e,t,n){return P(e).getIn([t,n],null)},t.allowTryItOutFor=function(){return!0},t.hasHost=(0,h.createSelector)(b,function(e){var t=e.get("host");return"string"==typeof t&&t.length>0&&"/"!==t[0]}),t.operationScheme=function(e,t,n){var r=e.get("url"),i=r.match(/^([a-z][a-z0-9+\-.]*):/),o=Array.isArray(i)?i[1]:null;return e.getIn(["scheme",t,n])||e.getIn(["scheme","_defaultScheme"])||o||""});t.canExecuteScheme=function(e,t,n){return["http","https"].indexOf(I(e,t,n))>-1},t.validateBeforeExecute=function(e,t){var n=b(e).getIn(["paths"].concat((0,f.default)(t),["parameters"]),(0,m.fromJS)([])),r=!0;return n.forEach(function(e){var t=e.get("errors");t&&t.count()&&(r=!1)}),r}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.updateSpec=function(e,t){var n=t.specActions;return function(){e.apply(void 0,arguments),n.parseToJson.apply(n,arguments)}},t.updateJsonSpec=function(e,t){var n=t.specActions;return function(){e.apply(void 0,arguments),n.resolveSpec.apply(n,arguments)}},t.executeRequest=function(e,t){var n=t.specActions;return function(t){return n.logRequest(t),e(t)}}},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getComponents,n=e.getStore,r=e.getSystem,i=o.getComponent,s=o.render,u=o.makeMappedContainer,c=(0,a.memoize)(i.bind(null,r,n,t)),l=(0,a.memoize)(u.bind(null,r,n,c,t));return{rootInjects:{getComponent:c,makeMappedContainer:l,render:s.bind(null,r,n,i,t)}}};var i=n(485),o=r(i),a=n(183)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.getComponent=t.render=t.makeMappedContainer=void 0;var i=n(94),o=r(i),a=n(60),s=r(a),u=n(446),c=r(u),l=n(486),p=r(l),f=n(145),h=r(f),d=n(146),m=r(d),v=n(489),y=r(v),g=n(490),_=r(g),b=n(498),x=r(b),w=n(528),k=r(w),S=n(666),E=n(677),C=r(E),A=function(e,t){return function(n){function r(){return(0,h.default)(this,r),(0,y.default)(this,(r.__proto__||(0,p.default)(r)).apply(this,arguments))}return(0,_.default)(r,n),(0,m.default)(r,[{key:"render",value:function(){return x.default.createElement(t,(0,c.default)({},e(),this.props,this.context))}}]),r}(b.Component)},T=function(e,t){return function(n){function r(){return(0,h.default)(this,r),(0,y.default)(this,(r.__proto__||(0,p.default)(r)).apply(this,arguments))}return(0,_.default)(r,n),(0,m.default)(r,[{key:"render",value:function(){return x.default.createElement(S.Provider,{store:e},x.default.createElement(t,(0,c.default)({},this.props,this.context)))}}]),r}(b.Component)},D=function(e,t,n){var r=A(e,t,n),i=(0,S.connect)(function(e){return{state:e}})(r);return n?T(n,i):i},M=function(e,t,n,r){for(var i in t){var o=t[i];"function"==typeof o&&o(n[i],r[i],e())}},O=(t.makeMappedContainer=function(e,t,n,r,i,o){return function(t){function r(t,n){(0,h.default)(this,r);var i=(0,y.default)(this,(r.__proto__||(0,p.default)(r)).call(this,t,n));return M(e,o,t,{}),i}return(0,_.default)(r,t),(0,m.default)(r,[{key:"componentWillReceiveProps",value:function(t){M(e,o,t,this.props)}},{key:"render",value:function(){var e=(0,C.default)(this.props,o?(0,s.default)(o):[]),t=n(i,"root");return x.default.createElement(t,e)}}]),r}(b.Component)},t.render=function(e,t,n,r,i){var o=document.querySelector(i),a=n(e,t,r,"App","root");k.default.render(x.default.createElement(a,null),o)},function(e){return x.default.createClass({render:function(){return e(this.props)}})}),P=function(e){var t=e.name;return x.default.createElement("div",{style:{padding:"1em",color:"#aaa"}},"😱 ",x.default.createElement("i",null,"Could not render ","t"===t?"this component":t,", see the console."))},I=function(e){var t=function(e){return!(e.prototype&&e.prototype.isReactComponent)},n=t(e)?O(e):e,r=n.prototype.render;return n.prototype.render=function(){try{for(var e=arguments.length,t=Array(e),i=0;i1){for(var v=Array(m),y=0;y1){for(var _=Array(g),b=0;b8&&x<=11),S=32,E=String.fromCharCode(S),C={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},A=!1,T=null,D={eventTypes:C,extractEvents:function(e,t,n,r){return[c(e,t,n,r),f(e,t,n,r)]}};e.exports=D},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return y(e,r)}function i(e,t,n){var i=r(e,n,t);i&&(n._dispatchListeners=m(n._dispatchListeners,i),n._dispatchInstances=m(n._dispatchInstances,e))}function o(e){e&&e.dispatchConfig.phasedRegistrationNames&&d.traverseTwoPhase(e._targetInst,i,e)}function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?d.getParentInstance(t):null;d.traverseTwoPhase(n,i,e)}}function s(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,i=y(e,r);i&&(n._dispatchListeners=m(n._dispatchListeners,i),n._dispatchInstances=m(n._dispatchInstances,e))}}function u(e){e&&e.dispatchConfig.registrationName&&s(e._targetInst,null,e)}function c(e){v(e,o)}function l(e){v(e,a)}function p(e,t,n,r){d.traverseEnterLeave(n,r,s,e,t)}function f(e){v(e,u)}var h=n(538),d=n(540),m=n(542),v=n(543),y=(n(504),h.getListener),g={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:f,accumulateEnterLeaveDispatches:p};e.exports=g},function(e,t,n){"use strict";function r(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}function i(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!r(t));default:return!1}}var o=n(531),a=n(539),s=n(540),u=n(541),c=n(542),l=n(543),p=(n(508),{}),f=null,h=function(e,t){e&&(s.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},d=function(e){return h(e,!0)},m=function(e){return h(e,!1)},v=function(e){return"."+e._rootNodeID},y={injection:{injectEventPluginOrder:a.injectEventPluginOrder,injectEventPluginsByName:a.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?o("94",t,typeof n):void 0;var r=v(e),i=p[t]||(p[t]={});i[r]=n;var s=a.registrationNameModules[t];s&&s.didPutListener&&s.didPutListener(e,t,n)},getListener:function(e,t){var n=p[t];if(i(t,e._currentElement.type,e._currentElement.props))return null;var r=v(e);return n&&n[r]},deleteListener:function(e,t){var n=a.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var r=p[t];if(r){var i=v(e);delete r[i]}},deleteAllListeners:function(e){var t=v(e);for(var n in p)if(p.hasOwnProperty(n)&&p[n][t]){var r=a.registrationNameModules[n];r&&r.willDeleteListener&&r.willDeleteListener(e,n),delete p[n][t]}},extractEvents:function(e,t,n,r){for(var i,o=a.plugins,s=0;s-1?void 0:a("96",e),!c.plugins[n]){t.extractEvents?void 0:a("97",e),c.plugins[n]=t;var r=t.eventTypes;for(var o in r)i(r[o],t,o)?void 0:a("98",o,e)}}}function i(e,t,n){c.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,c.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];o(s,t,n)}return!0}return!!e.registrationName&&(o(e.registrationName,t,n),!0)}function o(e,t,n){c.registrationNameModules[e]?a("100",e):void 0,c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(531),s=(n(508),null),u={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s?a("101"):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];u.hasOwnProperty(n)&&u[n]===i||(u[n]?a("102",n):void 0,u[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var i=c.registrationNameModules[n[r]];if(i)return i}}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=c},function(e,t,n){"use strict";function r(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function i(e){return"topMouseMove"===e||"topTouchMove"===e}function o(e){return"topMouseDown"===e||"topTouchStart"===e}function a(e,t,n,r){var i=e.type||"unknown-event";e.currentTarget=y.getNodeFromInstance(r),t?m.invokeGuardedCallbackWithCatch(i,n,e):m.invokeGuardedCallback(i,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i1?1-t:void 0;return this._fallbackText=i.slice(e,s),this._fallbackText}}),o.addPoolingTo(r),e.exports=r},[1231,531],function(e,t,n){"use strict";function r(){return!o&&i.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var i=n(544),o=null;e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(549),o={data:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var i=this.constructor.Interface;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s?this[o]=s(n):"target"===o?this.target=r:this[o]=n[o]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return u?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var i=n(500),o=n(546),a=n(505),s=(n(504),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),u={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};i(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n8));var R=!1;k.canUseDOM&&(R=D("input")&&(!("documentMode"in document)||document.documentMode>9));var j={eventTypes:O,_allowSimulatedPassThrough:!0,_isInputEventSupported:R,extractEvents:function(e,t,n,o){var a,s,u=t?S.getNodeFromInstance(t):window;if(i(u)?N?a=l:s=p:M(u)?R?a=_:(a=v,s=m):y(u)&&(a=g),a){var c=a(e,t,n);if(c){var f=r(c,n,o);return f}}s&&s(e,u,t),"topBlur"===e&&b(t,u)}};e.exports=j},function(e,t,n){"use strict";function r(){A.ReactReconcileTransaction&&x?void 0:l("123")}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=f.getPooled(),this.reconcileTransaction=A.ReactReconcileTransaction.getPooled(!0)}function o(e,t,n,i,o,a){return r(),x.batchedUpdates(e,t,n,i,o,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==y.length?l("124",t,y.length):void 0,y.sort(a),g++;for(var n=0;n]/,u=n(576),c=u(function(e,t){if(e.namespaceURI!==o.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML=""+t+"";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(i.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),l=null}e.exports=c},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e};e.exports=n},function(e,t,n){"use strict";var r=n(544),i=n(578),o=n(575),a=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){return 3===e.nodeType?void(e.nodeValue=t):void o(e,i(t))})),e.exports=a},function(e,t){"use strict";function n(e){var t=""+e,n=i.exec(t);if(!n)return t;var r,o="",a=0,s=0;for(a=n.index;a]/;e.exports=r},function(e,t,n){"use strict";var r=n(531),i=n(573),o=n(544),a=n(580),s=n(505),u=(n(508),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(o.canUseDOM?void 0:r("56"),t?void 0:r("57"),"HTML"===e.nodeName?r("58"):void 0,"string"==typeof t){var n=a(t,s)[0];e.parentNode.replaceChild(n,e)}else i.replaceChildWithTree(e,t)}});e.exports=u},function(e,t,n){"use strict";function r(e){var t=e.match(l);return t&&t[1].toLowerCase()}function i(e,t){var n=c;c?void 0:u(!1);var i=r(e),o=i&&s(i);if(o){n.innerHTML=o[1]+e+o[2];for(var l=o[0];l--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:u(!1),a(p).forEach(t));for(var f=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return f}var o=n(544),a=n(581),s=n(582),u=n(508),c=o.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;e.exports=i},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),r=0;r":a.innerHTML="<"+e+">",s[e]=!a.firstChild),s[e]?f[e]:null}var i=n(544),o=n(508),a=i.canUseDOM?document.createElement("div"):null,s={},u=[1,'"],c=[1,"","
                  "],l=[3,"","
                  "],p=[1,'',""],f={"*":[1,"?
                  ","
                  "],area:[1,"",""],col:[2,"","
                  "],legend:[1,"
                  ","
                  "],param:[1,"",""],tr:[2,"","
                  "],optgroup:u,option:u,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},h=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];h.forEach(function(e){f[e]=p,s[e]=!0}),e.exports=r},function(e,t,n){"use strict";var r=n(572),i=n(530),o={dangerouslyProcessChildrenUpdates:function(e,t){var n=i.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=o},function(e,t,n){"use strict";function r(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function i(e,t){t&&(Y[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?v("137",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?v("60"):void 0,"object"==typeof t.dangerouslySetInnerHTML&&K in t.dangerouslySetInnerHTML?void 0:v("61")),null!=t.style&&"object"!=typeof t.style?v("62",r(e)):void 0)}function o(e,t,n,r){if(!(r instanceof N)){var i=e._hostContainerInfo,o=i._node&&i._node.nodeType===H,s=o?i._node:i._ownerDocument;z(t,s),r.getReactMountReady().enqueue(a,{inst:e,registrationName:t,listener:n})}}function a(){var e=this;S.putListener(e.inst,e.registrationName,e.listener)}function s(){var e=this;D.postMountWrapper(e)}function u(){var e=this;P.postMountWrapper(e)}function c(){var e=this;M.postMountWrapper(e)}function l(){j.track(this)}function p(){var e=this;e._rootNodeID?void 0:v("63");var t=L(e);switch(t?void 0:v("64"),e._tag){case"iframe":case"object":e._wrapperState.listeners=[C.trapBubbledEvent("topLoad","load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in J)J.hasOwnProperty(n)&&e._wrapperState.listeners.push(C.trapBubbledEvent(n,J[n],t));break;case"source":e._wrapperState.listeners=[C.trapBubbledEvent("topError","error",t)];break;case"img":e._wrapperState.listeners=[C.trapBubbledEvent("topError","error",t),C.trapBubbledEvent("topLoad","load",t)];break;case"form":e._wrapperState.listeners=[C.trapBubbledEvent("topReset","reset",t),C.trapBubbledEvent("topSubmit","submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[C.trapBubbledEvent("topInvalid","invalid",t)]}}function f(){O.postUpdateWrapper(this)}function h(e){Q.call(Z,e)||($.test(e)?void 0:v("65",e),Z[e]=!0)}function d(e,t){return e.indexOf("-")>=0||null!=t.is}function m(e){var t=e.type;h(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var v=n(531),y=n(500),g=n(585),_=n(587),b=n(573),x=n(574),w=n(532),k=n(595),S=n(538),E=n(539),C=n(597),A=n(533),T=n(530),D=n(600),M=n(603),O=n(604),P=n(605),I=(n(558),n(606)),N=n(624),R=(n(505),n(578)),j=(n(508),n(562),n(613),n(560)),F=(n(627),n(504),A),B=S.deleteListener,L=T.getNodeFromInstance,z=C.listenTo,q=E.registrationNameModules,U={string:!0,number:!0},W="style",K="__html",V={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},H=11,J={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},G={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},X={listing:!0,pre:!0,textarea:!0},Y=y({menuitem:!0},G),$=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Z={},Q={}.hasOwnProperty,ee=1;m.displayName="ReactDOMComponent",m.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=ee++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var o=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(p,this);break;case"input":D.mountWrapper(this,o,t),o=D.getHostProps(this,o),e.getReactMountReady().enqueue(l,this),e.getReactMountReady().enqueue(p,this);break;case"option":M.mountWrapper(this,o,t),o=M.getHostProps(this,o);break;case"select":O.mountWrapper(this,o,t),o=O.getHostProps(this,o),e.getReactMountReady().enqueue(p,this);break;case"textarea":P.mountWrapper(this,o,t),o=P.getHostProps(this,o),e.getReactMountReady().enqueue(l,this),e.getReactMountReady().enqueue(p,this)}i(this,o);var a,f;null!=t?(a=t._namespaceURI,f=t._tag):n._tag&&(a=n._namespaceURI,f=n._tag),(null==a||a===x.svg&&"foreignobject"===f)&&(a=x.html),a===x.html&&("svg"===this._tag?a=x.svg:"math"===this._tag&&(a=x.mathml)),this._namespaceURI=a;var h;if(e.useCreateElement){var d,m=n._ownerDocument;if(a===x.html)if("script"===this._tag){var v=m.createElement("div"),y=this._currentElement.type;v.innerHTML="<"+y+">",d=v.removeChild(v.firstChild)}else d=o.is?m.createElement(this._currentElement.type,o.is):m.createElement(this._currentElement.type);else d=m.createElementNS(a,this._currentElement.type);T.precacheNode(this,d),this._flags|=F.hasCachedChildNodes,this._hostParent||k.setAttributeForRoot(d),this._updateDOMProperties(null,o,e);var _=b(d);this._createInitialChildren(e,o,r,_),h=_}else{var w=this._createOpenTagMarkupAndPutListeners(e,o),S=this._createContentMarkup(e,o,r);h=!S&&G[this._tag]?w+"/>":w+">"+S+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(s,this),o.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(u,this),o.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"select":o.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"button":o.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(c,this)}return h},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(q.hasOwnProperty(r))i&&o(this,r,i,e);else{r===W&&(i&&(i=this._previousStyleCopy=y({},t.style)),i=_.createMarkupForStyles(i,this));var a=null;null!=this._tag&&d(this._tag,t)?V.hasOwnProperty(r)||(a=k.createMarkupForCustomAttribute(r,i)):a=k.createMarkupForProperty(r,i),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+k.createMarkupForRoot()),n+=" "+k.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(r=i.__html);else{var o=U[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)r=R(o);else if(null!=a){var s=this.mountChildren(a,e,n);r=s.join("")}}return X[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&b.queueHTML(r,i.__html);else{var o=U[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)""!==o&&b.queueText(r,o);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;u0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function o(e,t){var n=s.get(e);if(!n){return null}return n}var a=n(531),s=(n(513),n(608)),u=(n(558),n(552)),c=(n(508),n(504),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){c.validateCallback(t,n);var i=o(e);return i?(i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],void r(i)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t,n){var i=o(e,"replaceState");i&&(i._pendingStateQueue=[t],i._pendingReplaceState=!0,void 0!==n&&null!==n&&(c.validateCallback(n,"replaceState"),i._pendingCallbacks?i._pendingCallbacks.push(n):i._pendingCallbacks=[n]),r(i))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?a("122",t,i(e)):void 0}});e.exports=c},function(e,t,n){"use strict";var r=(n(500),n(505)),i=(n(504),r);e.exports=i},function(e,t,n){"use strict";var r=n(500),i=n(573),o=n(530),a=function(e){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};r(a.prototype,{mountComponent:function(e,t,n,r){var a=n._idCounter++;this._domID=a,this._hostParent=t,this._hostContainerInfo=n;var s=" react-empty: "+this._domID+" ";if(e.useCreateElement){var u=n._ownerDocument,c=u.createComment(s);return o.precacheNode(this,c),i(c)}return e.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return o.getNodeFromInstance(this)},unmountComponent:function(){o.uncacheNode(this)}}),e.exports=a},function(e,t,n){"use strict";function r(e,t){"_hostNode"in e?void 0:u("33"),"_hostNode"in t?void 0:u("33");for(var n=0,r=e;r;r=r._hostParent)n++;for(var i=0,o=t;o;o=o._hostParent)i++;for(;n-i>0;)e=e._hostParent,n--;for(;i-n>0;)t=t._hostParent,i--;for(var a=n;a--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function i(e,t){"_hostNode"in e?void 0:u("35"),"_hostNode"in t?void 0:u("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function o(e){return"_hostNode"in e?void 0:u("36"),e._hostParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var i;for(i=r.length;i-- >0;)t(r[i],"captured",n);for(i=0;i0;)n(u[c],"captured",o)}var u=n(531);n(508);e.exports={isAncestor:i,getLowestCommonAncestor:r,getParentInstance:o,traverseTwoPhase:a,traverseEnterLeave:s}},function(e,t,n){"use strict";var r=n(531),i=n(500),o=n(572),a=n(573),s=n(530),u=n(578),c=(n(508),n(627),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});i(c.prototype,{mountComponent:function(e,t,n,r){var i=n._idCounter++,o=" react-text: "+i+" ",c=" /react-text ";if(this._domID=i,this._hostParent=t,e.useCreateElement){var l=n._ownerDocument,p=l.createComment(o),f=l.createComment(c),h=a(l.createDocumentFragment());return a.queueChild(h,a(p)),this._stringText&&a.queueChild(h,a(l.createTextNode(this._stringText))),a.queueChild(h,a(f)),s.precacheNode(this,p),this._closingComment=f,h}var d=u(this._stringText);return e.renderToStaticMarkup?d:""+d+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();o.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?r("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),e.exports=c},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var i=n(500),o=n(552),a=n(559),s=n(505),u={initialize:s,close:function(){f.isBatchingUpdates=!1}},c={initialize:s,close:o.flushBatchedUpdates.bind(o)},l=[c,u];i(r.prototype,a,{getTransactionWrappers:function(){return l}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,i,o){var a=f.isBatchingUpdates;return f.isBatchingUpdates=!0,a?e(t,n,r,i,o):p.perform(e,null,t,n,r,i,o)}};e.exports=f},function(e,t,n){"use strict";function r(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function i(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function o(e){var t=h(e.nativeEvent),n=p.getClosestInstanceFromNode(t),i=n;do e.ancestors.push(i),i=i&&r(i);while(i);for(var o=0;ot.end?(n=t.end,r=t.start):(n=t.start,r=t.end),i.moveToElementText(e),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",r-n),i.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[l()].length,i=Math.min(t.start,r),o=void 0===t.end?i:Math.min(t.end,r);if(!n.extend&&i>o){var a=o;o=i,i=a}var s=c(e,i),u=c(e,o);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),i>o?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=n(544),c=n(639),l=n(547),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:p?i:o,setOffsets:p?a:s};e.exports=f},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var i=n(e),o=0,a=0;i;){if(3===i.nodeType){if(a=o+i.textContent.length,o<=t&&a>=t)return{node:i,offset:t-o};o=a}i=n(r(i))}}e.exports=i},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!i(e)&&(i(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var i=n(641);e.exports=r},function(e,t,n){"use strict";function r(e){return i(e)&&3==e.nodeType}var i=n(642);e.exports=r},function(e,t){"use strict";function n(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||window;return!(!e||!("function"==typeof n.Node?e instanceof n.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t){"use strict";function n(e){if(e=e||("undefined"!=typeof document?document:void 0),"undefined"==typeof e)return null;try{return e.activeElement||e.body}catch(t){return e.body}}e.exports=n},function(e,t){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},r={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},i={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(r).forEach(function(e){i.Properties[e]=0,r[e]&&(i.DOMAttributeNames[e]=r[e])}),e.exports=i},function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&u.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function i(e,t){if(g||null==m||m!==l())return null;var n=r(m);if(!y||!f(y,n)){y=n;var i=c.getPooled(d.select,v,e,t);return i.type="select",i.target=m,o.accumulateTwoPhaseDispatches(i),i}return null}var o=n(537),a=n(544),s=n(530),u=n(637),c=n(549),l=n(643),p=n(563),f=n(613),h=a.canUseDOM&&"documentMode"in document&&document.documentMode<=11,d={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},m=null,v=null,y=null,g=!1,_=!1,b={eventTypes:d,extractEvents:function(e,t,n,r){if(!_)return null;var o=t?s.getNodeFromInstance(t):window;switch(e){case"topFocus":(p(o)||"true"===o.contentEditable)&&(m=o,v=t,y=null);break;case"topBlur":m=null,v=null,y=null;break;case"topMouseDown":g=!0;break;case"topContextMenu":case"topMouseUp":return g=!1,i(n,r);case"topSelectionChange":if(h)break;case"topKeyDown":case"topKeyUp":return i(n,r)}return null},didPutListener:function(e,t,n){"onSelect"===t&&(_=!0)}};e.exports=b},function(e,t,n){"use strict";function r(e){return"."+e._rootNodeID}function i(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}var o=n(531),a=n(633),s=n(537),u=n(530),c=n(647),l=n(648),p=n(549),f=n(649),h=n(650),d=n(566),m=n(653),v=n(654),y=n(655),g=n(567),_=n(656),b=n(505),x=n(651),w=(n(508),{}),k={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n="on"+t,r="top"+t,i={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[r]};w[e]=i,k[r]=i});var S={},E={eventTypes:w,extractEvents:function(e,t,n,r){var i=k[e];if(!i)return null;var a;switch(e){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":a=p;break;case"topKeyPress":if(0===x(n))return null;case"topKeyDown":case"topKeyUp":a=h;break;case"topBlur":case"topFocus":a=f;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":a=d;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":a=m;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":a=v;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":a=c;break;case"topTransitionEnd":a=y;break;case"topScroll":a=g;break;case"topWheel":a=_;break;case"topCopy":case"topCut":case"topPaste":a=l}a?void 0:o("86",e);var u=a.getPooled(i,t,n,r);return s.accumulateTwoPhaseDispatches(u),u},didPutListener:function(e,t,n){if("onClick"===t&&!i(e._tag)){var o=r(e),s=u.getNodeFromInstance(e);S[o]||(S[o]=a.listen(s,"click",b))}},willDeleteListener:function(e,t){if("onClick"===t&&!i(e._tag)){var n=r(e);S[n].remove(),delete S[n]}}};e.exports=E},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(549),o={animationName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(549),o={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(567),o={relatedTarget:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(567),o=n(651),a=n(652),s=n(569),u={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(e){return"keypress"===e.type?o(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?o(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};i.augmentClass(r,u),e.exports=r},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t,n){"use strict";function r(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=i(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var i=n(651),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(566),o={dataTransfer:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(567),o=n(569),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:o};i.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(549),o={propertyName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(566),o={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,s=v.createElement(B,{child:t});if(e){var u=w.get(e);a=u._processChildContext(u._context)}else a=A;var l=f(n);if(l){var p=l._currentElement,d=p.props.child;if(M(d,t)){var m=l._renderedComponent.getPublicInstance(),y=r&&function(){r.call(m)};return L._updateRootComponent(l,s,a,n,y),m}L.unmountComponentAtNode(n)}var g=i(n),_=g&&!!o(g),b=c(n),x=_&&!l&&!b,k=L._renderNewRootComponent(s,n,x,a)._renderedComponent.getPublicInstance();return r&&r.call(k),k},render:function(e,t,n){return L._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){l(e)?void 0:h("40");var t=f(e);if(!t){c(e),1===e.nodeType&&e.hasAttribute(P);return!1}return delete j[t._instance.rootID],C.batchedUpdates(u,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,o,a){if(l(t)?void 0:h("41"),o){var s=i(t);if(k.canReuseMarkup(e,s))return void g.precacheNode(n,s);var u=s.getAttribute(k.CHECKSUM_ATTR_NAME);s.removeAttribute(k.CHECKSUM_ATTR_NAME);var c=s.outerHTML;s.setAttribute(k.CHECKSUM_ATTR_NAME,u);var p=e,f=r(p,c),m=" (client) "+p.substring(f-20,f+20)+"\n (server) "+c.substring(f-20,f+20);t.nodeType===N?h("42",m):void 0}if(t.nodeType===N?h("43"):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);d.insertTreeBefore(t,e,null)}else D(t,e),g.precacheNode(n,t.firstChild)}};e.exports=L},function(e,t,n){"use strict";function r(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===i?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var i=(n(627),9);e.exports=r},function(e,t){"use strict";var n={useCreateElement:!0,useFiber:!1};e.exports=n},function(e,t,n){"use strict";var r=n(661),i=/\/?>/,o=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return o.test(e)?e:e.replace(i," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};e.exports=a},function(e,t){"use strict";function n(e){for(var t=1,n=0,i=0,o=e.length,a=o&-4;i3&&void 0!==arguments[3]?arguments[3]:{},c=Boolean(e),f=e||S,d=void 0;d="function"==typeof t?t:t?(0,y.default)(t):E;var v=n||C,g=r.pure,_=void 0===g||g,b=r.withRef,w=void 0!==b&&b,D=_&&v!==C,M=T++;return function(e){function t(e,t,n){var r=v(e,t,n);return r}var n="Connect("+s(e)+")",r=function(r){function s(e,t){i(this,s);var a=o(this,r.call(this,e,t));a.version=M,a.store=e.store||t.store,(0,k.default)(a.store,'Could not find "store" in either the context or '+('props of "'+n+'". ')+"Either wrap the root component in a , "+('or explicitly pass "store" as a prop to "'+n+'".'));var u=a.store.getState();return a.state={storeState:u},a.clearCache(),a}return a(s,r),s.prototype.shouldComponentUpdate=function(){return!_||this.haveOwnPropsChanged||this.hasStoreStateChanged},s.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),r=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n); +return r},s.prototype.configureFinalMapState=function(e,t){var n=f(e.getState(),t),r="function"==typeof n;return this.finalMapStateToProps=r?n:f,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,r?this.computeStateProps(e,t):n},s.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,r=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return r},s.prototype.configureFinalMapDispatch=function(e,t){var n=d(e.dispatch,t),r="function"==typeof n;return this.finalMapDispatchToProps=r?n:d,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,r?this.computeDispatchProps(e,t):n},s.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,m.default)(e,this.stateProps))&&(this.stateProps=e,!0)},s.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,m.default)(e,this.dispatchProps))&&(this.dispatchProps=e,!0)},s.prototype.updateMergedPropsIfNeeded=function(){var e=t(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&D&&(0,m.default)(e,this.mergedProps))&&(this.mergedProps=e,!0)},s.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},s.prototype.trySubscribe=function(){c&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},s.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},s.prototype.componentDidMount=function(){this.trySubscribe()},s.prototype.componentWillReceiveProps=function(e){_&&(0,m.default)(e,this.props)||(this.haveOwnPropsChanged=!0)},s.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},s.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},s.prototype.handleChange=function(){if(this.unsubscribe){var e=this.store.getState(),t=this.state.storeState;if(!_||t!==e){if(_&&!this.doStatePropsDependOnOwnProps){var n=u(this.updateStatePropsIfNeeded,this);if(!n)return;n===A&&(this.statePropsPrecalculationError=A.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:e})}}},s.prototype.getWrappedInstance=function(){return(0,k.default)(w,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},s.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,r=this.haveStatePropsBeenPrecalculated,i=this.statePropsPrecalculationError,o=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,i)throw i;var a=!0,s=!0;_&&o&&(a=n||t&&this.doStatePropsDependOnOwnProps,s=t&&this.doDispatchPropsDependOnOwnProps);var u=!1,c=!1;r?u=!0:a&&(u=this.updateStatePropsIfNeeded()),s&&(c=this.updateDispatchPropsIfNeeded());var f=!0;return f=!!(u||c||t)&&this.updateMergedPropsIfNeeded(),!f&&o?o:(w?this.renderedElement=(0,p.createElement)(e,l({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,p.createElement)(e,this.mergedProps),this.renderedElement)},s}(p.Component);return r.displayName=n,r.WrappedComponent=e,r.contextTypes={store:h.default},r.propTypes={store:h.default},(0,x.default)(r,e)}}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t1),t}),s(e,c(e),n),u&&(n=i(n,l|p|f));for(var h=t.length;h--;)o(n,t[h]);return n});e.exports=h},function(e,t,n){function r(e,t,n,A,T,D){var M,I=t&k,N=t&S,j=t&E;if(n&&(M=T?n(e,A,T,D):n(e)),void 0!==M)return M;if(!x(e))return e;var F=_(e);if(F){if(M=v(e),!I)return l(e,M)}else{var B=m(e),L=B==O||B==P;if(b(e))return c(e,I);if(B==R||B==C||L&&!T){if(M=N||L?{}:g(e),!I)return N?f(e,u(M,e)):p(e,s(M,e))}else{if(!Z[B])return T?e:{};M=y(e,B,r,I)}}D||(D=new i);var z=D.get(e);if(z)return z;D.set(e,M);var q=j?N?d:h:N?keysIn:w,U=F?void 0:q(e);return o(U||e,function(i,o){U&&(o=i,i=e[o]),a(M,o,r(i,t,n,o,e,D))}),M}var i=n(250),o=n(679),a=n(680),s=n(683),u=n(685),c=n(689),l=n(690),p=n(691),f=n(694),h=n(697),d=n(699),m=n(286),v=n(700),y=n(701),g=n(711),_=n(193),b=n(274),x=n(221),w=n(269),k=1,S=2,E=4,C="[object Arguments]",A="[object Array]",T="[object Boolean]",D="[object Date]",M="[object Error]",O="[object Function]",P="[object GeneratorFunction]",I="[object Map]",N="[object Number]",R="[object Object]",j="[object RegExp]",F="[object Set]",B="[object String]",L="[object Symbol]",z="[object WeakMap]",q="[object ArrayBuffer]",U="[object DataView]",W="[object Float32Array]",K="[object Float64Array]",V="[object Int8Array]",H="[object Int16Array]",J="[object Int32Array]",G="[object Uint8Array]",X="[object Uint8ClampedArray]",Y="[object Uint16Array]",$="[object Uint32Array]",Z={};Z[C]=Z[A]=Z[q]=Z[U]=Z[T]=Z[D]=Z[W]=Z[K]=Z[V]=Z[H]=Z[J]=Z[I]=Z[N]=Z[R]=Z[j]=Z[F]=Z[B]=Z[L]=Z[G]=Z[X]=Z[Y]=Z[$]=!0,Z[M]=Z[O]=Z[z]=!1,e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length;++n0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var r=800,i=16,o=Date.now;e.exports=n},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{fn:o}};var i=n(322),o=r(i)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o=a&&(t=console)[e].apply(t,r)}var n=e.configs,r={debug:0,info:1,log:2,warn:3,error:4},i=function(e){return r[e]||-1},o=n.logLevel,a=i(o);return t.warn=t.bind(null,"warn"),t.error=t.bind(null,"error"),t.info=t.bind(null,"info"),t.debug=t.bind(null,"debug"),{rootInjects:{log:t}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{fn:{AST:a},components:{JumpToPath:u.default}}};var o=n(729),a=i(o),s=n(761),u=r(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){function n(e,t,i){if(!e)return i&&i.start_mark?i.start_mark.line:0;if(t.length&&e.tag===b)for(r=0;r=t.column:t.line===e.start_mark.line?t.column>=e.start_mark.column:t.line===e.end_mark.line?t.column<=e.end_mark.column:e.start_mark.linet.line}var o=0;if(!e||[b,x].indexOf(e.tag)===-1)return i;if(e.tag===b)for(o=0;oo;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&O(e)})}},O=function(e){v.call(s,function(){var t,n,r,i=e._v;if(P(e)&&(t=D(function(){w?b.emit("unhandledRejection",i,e):(n=s.onunhandledrejection)?n({promise:e,reason:i}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=w||P(e)?2:1),e._a=void 0,t)throw t.error})},P=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if(t=n[r++],t.fail||!P(t.promise))return!1;return!0},I=function(e){v.call(s,function(){var t;w?b.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})})},N=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),M(t,!0))},R=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw _("Promise can't be resolved itself");(t=C(e))?y(function(){var r={_w:n,_d:!1};try{t.call(e,u(R,r,1),u(N,r,1))}catch(e){N.call(r,e)}}):(n._v=e,n._s=1,M(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};S||(x=function(e){h(this,x,g,"_h"),f(e),r.call(this);try{e(u(R,this,1),u(N,this,1))}catch(e){N.call(this,e)}},r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(739)(x.prototype,{then:function(e,t){var n=A(m(this,x));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=w?b.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&M(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),T=function(){var e=new r;this.promise=e,this.resolve=u(R,e,1),this.reject=u(N,e,1)}),l(l.G+l.W+l.F*!S,{Promise:x}),n(107)(x,g),n(740)(g),o=n(59)[g],l(l.S+l.F*!S,g,{reject:function(e){var t=A(this),n=t.reject;return n(e),t.promise}}),l(l.S+l.F*(a||!S),g,{resolve:function(e){if(e instanceof x&&E(e.constructor,this))return e;var t=A(this),n=t.resolve;return n(e),t.promise}}),l(l.S+l.F*!(S&&n(442)(function(e){x.all(e).catch(k)})),g,{all:function(e){var t=this,n=A(t),r=n.resolve,i=n.reject,o=D(function(){var n=[],o=0,a=1;d(e,!1,function(e){var s=o++,u=!1;n.push(void 0),a++,t.resolve(e).then(function(e){u||(u=!0,n[s]=e,--a||r(n))},i)}),--a||r(n)});return o&&i(o.error),n.promise},race:function(e){var t=this,n=A(t),r=n.reject,i=D(function(){d(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(82),i=n(439),o=n(440),a=n(86),s=n(72),u=n(181),c={},l={},t=e.exports=function(e,t,n,p,f){var h,d,m,v,y=f?function(){return e}:u(e),g=r(n,p,t?2:1),_=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(o(y)){for(h=s(e.length);h>_;_++)if(v=t?g(a(d=e[_])[0],d[1]):g(e[_]),v===c||v===l)return v}else for(m=y.call(e);!(d=m.next()).done;)if(v=i(m,g,d.value,t),v===c||v===l)return v};t.BREAK=c,t.RETURN=l},function(e,t,n){var r=n(86),i=n(83),o=n(108)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r,i,o,a=n(82),s=n(737),u=n(106),c=n(91),l=n(77),p=l.process,f=l.setImmediate,h=l.clearImmediate,d=l.MessageChannel,m=0,v={},y="onreadystatechange",g=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},_=function(e){g.call(e.data)};f&&h||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},h=function(e){delete v[e]},"process"==n(70)(p)?r=function(e){p.nextTick(a(g,e,1))}:d?(i=new d,o=i.port2,i.port1.onmessage=_,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",_,!1)):r=y in c("script")?function(e){u.appendChild(c("script"))[y]=function(){u.removeChild(this),g.call(e)}}:function(e){setTimeout(a(g,e,1),0)}),e.exports={set:f,clear:h}},50,function(e,t,n){var r=n(77),i=n(736).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(70)(a);e.exports=function(){var e,t,n,c=function(){var r,i;for(u&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(o){var l=!0,p=document.createTextNode("");new o(c).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}else if(s&&s.resolve){var f=s.resolve();n=function(){f.then(c)}}else n=function(){i.call(r,c)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){var r=n(84);e.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},function(e,t,n){"use strict";var r=n(77),i=n(59),o=n(85),a=n(89),s=n(108)("species");e.exports=function(e){var t="function"==typeof i[e]?i[e]:r[e];a&&t&&!t[s]&&o.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){(function(){var e,r,i,o,a,s,u,c,l,p,f,h,d;e=this.composer=n(742),r=this.constructor=n(746),i=this.dumper=n(751),o=this.errors=n(744),a=this.events=n(743),s=this.loader=n(756),u=this.nodes=n(745),c=this.parser=n(760),l=this.reader=n(757),p=this.resolver=n(755),f=this.scanner=n(758),h=this.tokens=n(759),d=n(747),this.scan=function(e,t){var n,r;for(null==t&&(t=s.Loader),n=new t(e),r=[];n.check_token();)r.push(n.get_token());return r},this.parse=function(e,t){var n,r;for(null==t&&(t=s.Loader),n=new t(e),r=[];n.check_event();)r.push(n.get_event());return r},this.compose=function(e,t){var n;return null==t&&(t=s.Loader),n=new t(e),n.get_single_node()},this.compose_all=function(e,t){var n,r;for(null==t&&(t=s.Loader),n=new t(e),r=[];n.check_node();)r.push(n.get_node());return r},this.load=function(e,t){var n;return null==t&&(t=s.Loader),n=new t(e),n.get_single_data()},this.load_all=function(e,t){var n,r;for(null==t&&(t=s.Loader),n=new t(e),r=[];n.check_data();)r.push(n.get_data());return r},this.emit=function(e,t,n,r){var o,a,s,u,c;null==n&&(n=i.Dumper),null==r&&(r={}),a=t||new d.StringStream,o=new n(a,r);try{for(u=0,c=e.length;u0&&(a=this.buffer[u-1],e.call(r,a)<0);)if(u--,this.pointer-u>n/2-1){o=" ... ",u+=5;break}for(c="",i=this.pointer;in/2-1){c=" ... ",i-=5;break}return""+new Array(t).join(" ")+o+this.buffer.slice(u,i)+c+"\n"+new Array(t+this.pointer-u+o.length).join(" ")+"^"},t.prototype.toString=function(){var e,t;return e=this.get_snippet(),t=" on line "+(this.line+1)+", column "+(this.column+1),e?t:t+":\n"+e},t}(),this.YAMLError=function(e){function n(e){this.message=e,n.__super__.constructor.call(this),this.stack=this.toString()+"\n"+(new Error).stack.split("\n").slice(1).join("\n")}return t(n,e),n.prototype.toString=function(){return this.message},n}(Error),this.MarkedYAMLError=function(e){function n(e,t,r,i,o){this.context=e,this.context_mark=t,this.problem=r,this.problem_mark=i,this.note=o,n.__super__.constructor.call(this)}return t(n,e),n.prototype.toString=function(){var e;return e=[],null!=this.context&&e.push(this.context),null==this.context_mark||null!=this.problem&&null!=this.problem_mark&&this.context_mark.line===this.problem_mark.line&&this.context_mark.column===this.problem_mark.column||e.push(this.context_mark.toString()),null!=this.problem&&e.push(this.problem),null!=this.problem_mark&&e.push(this.problem_mark.toString()),null!=this.note&&e.push(this.note),e.join("\n")},n}(this.YAMLError)}).call(this)},function(e,t){(function(){var e,t=function(e,t){function r(){this.constructor=e}for(var i in t)n.call(t,i)&&(e[i]=t[i]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},n={}.hasOwnProperty;e=0,this.Node=function(){function t(t,n,r,i){this.tag=t,this.value=n,this.start_mark=r,this.end_mark=i,this.unique_id="node_"+e++}return t}(),this.ScalarNode=function(e){function n(e,t,r,i,o){this.tag=e,this.value=t,this.start_mark=r,this.end_mark=i,this.style=o,n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.id="scalar",n}(this.Node),this.CollectionNode=function(e){function n(e,t,r,i,o){this.tag=e,this.value=t,this.start_mark=r,this.end_mark=i,this.flow_style=o,n.__super__.constructor.apply(this,arguments)}return t(n,e),n}(this.Node),this.SequenceNode=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.id="sequence",n}(this.CollectionNode),this.MappingNode=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.id="mapping",n}(this.CollectionNode)}).call(this)},function(e,t,n){(function(e){(function(){var r,i,o,a=function(e,t){function n(){this.constructor=e}for(var r in t)s.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},s={}.hasOwnProperty,u=[].indexOf||function(e){for(var t=0,n=this.length;t=0)throw new t.ConstructorError(null,null,"found unconstructable recursive node",e.start_mark);if(this.constructing_nodes.push(e.unique_id),n=null,s=null,e.tag in this.yaml_constructors)n=this.yaml_constructors[e.tag];else{for(a in this.yaml_multi_constructors)if(e.tag.indexOf(0===a)){s=e.tag.slice(a.length),n=this.yaml_multi_constructors[a];break}null==n&&(null in this.yaml_multi_constructors?(s=e.tag,n=this.yaml_multi_constructors[null]):null in this.yaml_constructors?n=this.yaml_constructors[null]:e instanceof i.ScalarNode?n=this.construct_scalar:e instanceof i.SequenceNode?n=this.construct_sequence:e instanceof i.MappingNode&&(n=this.construct_mapping))}return r=n.call(this,null!=s?s:e,e),this.constructed_objects[e.unique_id]=r,this.constructing_nodes.pop(),r},e.prototype.construct_scalar=function(e){if(!(e instanceof i.ScalarNode))throw new t.ConstructorError(null,null,"expected a scalar node but found "+e.id,e.start_mark);return e.value},e.prototype.construct_sequence=function(e){var n,r,o,a,s;if(!(e instanceof i.SequenceNode))throw new t.ConstructorError(null,null,"expected a sequence node but found "+e.id,e.start_mark);for(a=e.value,s=[],r=0,o=a.length;r=0&&(l=l.slice(1)),"0"===l)return 0;if(0===l.indexOf("0b"))return c*parseInt(l.slice(2),2);if(0===l.indexOf("0x"))return c*parseInt(l.slice(2),16);if(0===l.indexOf("0o"))return c*parseInt(l.slice(2),8);if("0"===l[0])return c*parseInt(l,8);if(u.call(l,":")>=0){for(r=function(){var e,t,n,r;for(n=l.split(/:/g),r=[],e=0,t=n.length;e=0&&(l=l.slice(1)),".inf"===l)return Infinity*c;if(".nan"===l)return NaN;if(u.call(l,":")>=0){for(r=function(){var e,t,n,r;for(n=l.split(/:/g),r=[],e=0,t=n.length;e=n?e:e.length+1===n?""+t+e:""+new Array(n-e.length+1).join(t)+e},this.to_hex=function(e){return"string"==typeof e&&(e=e.charCodeAt(0)),e.toString(16)}}).call(this)}).call(t,function(){return this}())},function(e,t,n){(function(e,r){function i(e,n){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),x(r.showHidden)&&(r.showHidden=!1),x(r.depth)&&(r.depth=2),x(r.colors)&&(r.colors=!1),x(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return _(i)||(i=u(e,i,r)),i}var o=c(e,n);if(o)return o;var a=Object.keys(n),m=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),E(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(n);if(0===a.length){if(C(n)){var v=n.name?": "+n.name:"";return e.stylize("[Function"+v+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return e.stylize(Date.prototype.toString.call(n),"date");if(E(n))return l(n)}var y="",g=!1,b=["{","}"];if(d(n)&&(g=!0,b=["[","]"]),C(n)){var x=n.name?": "+n.name:"";y=" [Function"+x+"]"}if(w(n)&&(y=" "+RegExp.prototype.toString.call(n)),S(n)&&(y=" "+Date.prototype.toUTCString.call(n)),E(n)&&(y=" "+l(n)),0===a.length&&(!g||0==n.length))return b[0]+y+b[1];if(r<0)return w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var k;return k=g?p(e,n,r,m,a):a.map(function(t){return f(e,n,r,m,t,g)}),e.seen.pop(),h(k,y,b)}function c(e,t){if(x(t))return e.stylize("undefined","undefined");if(_(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var o=[],a=0,s=t.length;a-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function d(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function v(e){return null===e}function y(e){return null==e}function g(e){return"number"==typeof e}function _(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function x(e){return void 0===e}function w(e){return k(e)&&"[object RegExp]"===T(e)}function k(e){return"object"==typeof e&&null!==e}function S(e){return k(e)&&"[object Date]"===T(e)}function E(e){return k(e)&&("[object Error]"===T(e)||e instanceof Error)}function C(e){return"function"==typeof e}function A(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function T(e){return Object.prototype.toString.call(e)}function D(e){return e<10?"0"+e.toString(10):e.toString(10)}function M(){var e=new Date,t=[D(e.getHours()),D(e.getMinutes()),D(e.getSeconds())].join(":");return[e.getDate(),R[e.getMonth()],t].join(" ")}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var P=/%[sdj%]/g;t.format=function(e){if(!_(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n2*this.indent?t.width:80,this.best_line_break="\r"===(n=t.line_break)||"\n"===n||"\r\n"===n?t.line_break:"\n",this.tag_prefixes=null,this.prepared_anchor=null,this.prepared_tag=null,this.analysis=null,this.style=null}var r,a,c;return r="\0 \t\r\n…\u2028\u2029",a={"!":"!","tag:yaml.org,2002:":"!!"},c={"\0":"0","":"a","\b":"b","\t":"t","\n":"n","\v":"v","\f":"f","\r":"r","":"e",'"':'"',"\\":"\\","…":"N"," ":"_","\u2028":"L","\u2029":"P"},n.prototype.dispose=function(){return this.states=[],this.state=null},n.prototype.emit=function(e){var t;for(this.events.push(e),t=[];!this.need_more_events();)this.event=this.events.shift(),this.state(),t.push(this.event=null);return t},n.prototype.need_more_events=function(){var e;return 0===this.events.length||(e=this.events[0],e instanceof i.DocumentStartEvent?this.need_events(1):e instanceof i.SequenceStartEvent?this.need_events(2):e instanceof i.MappingStartEvent&&this.need_events(3))},n.prototype.need_events=function(e){var t,n,r,o,a;for(o=0,a=this.events.slice(1),n=0,r=a.length;nthis.best_width)&&this.write_indent(),this.states.push(this.expect_flow_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_flow_sequence_item=function(){return this.event instanceof i.SequenceEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.canonical&&(this.write_indicator(",",!1),this.write_indent()),this.write_indicator("]",!1),this.state=this.states.pop()):(this.write_indicator(",",!1),(this.canonical||this.column>this.best_width)&&this.write_indent(),this.states.push(this.expect_flow_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_flow_mapping=function(){return this.write_indicator("{",!0,{whitespace:!0}),this.flow_level++,this.increase_indent({flow:!0}),this.state=this.expect_first_flow_mapping_key},n.prototype.expect_first_flow_mapping_key=function(){return this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.write_indicator("}",!1),this.state=this.states.pop()):((this.canonical||this.column>this.best_width)&&this.write_indent(),!this.canonical&&this.check_simple_key()?(this.states.push(this.expect_flow_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0),this.states.push(this.expect_flow_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_flow_mapping_key=function(){return this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.canonical&&(this.write_indicator(",",!1),this.write_indent()),this.write_indicator("}",!1),this.state=this.states.pop()):(this.write_indicator(",",!1),(this.canonical||this.column>this.best_width)&&this.write_indent(),!this.canonical&&this.check_simple_key()?(this.states.push(this.expect_flow_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0),this.states.push(this.expect_flow_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_flow_mapping_simple_value=function(){return this.write_indicator(":",!1),this.states.push(this.expect_flow_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_flow_mapping_value=function(){return(this.canonical||this.column>this.best_width)&&this.write_indent(),this.write_indicator(":",!0),this.states.push(this.expect_flow_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_block_sequence=function(){var e;return e=this.mapping_context&&!this.indentation,this.increase_indent({indentless:e}),this.state=this.expect_first_block_sequence_item},n.prototype.expect_first_block_sequence_item=function(){return this.expect_block_sequence_item(!0)},n.prototype.expect_block_sequence_item=function(e){return null==e&&(e=!1),!e&&this.event instanceof i.SequenceEndEvent?(this.indent=this.indents.pop(),this.state=this.states.pop()):(this.write_indent(),this.write_indicator("-",!0,{indentation:!0}),this.states.push(this.expect_block_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_block_mapping=function(){return this.increase_indent(),this.state=this.expect_first_block_mapping_key},n.prototype.expect_first_block_mapping_key=function(){return this.expect_block_mapping_key(!0)},n.prototype.expect_block_mapping_key=function(e){return null==e&&(e=!1),!e&&this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.state=this.states.pop()):(this.write_indent(),this.check_simple_key()?(this.states.push(this.expect_block_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0,{indentation:!0}),this.states.push(this.expect_block_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_block_mapping_simple_value=function(){return this.write_indicator(":",!1),this.states.push(this.expect_block_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_block_mapping_value=function(){return this.write_indent(),this.write_indicator(":",!0,{indentation:!0}),this.states.push(this.expect_block_mapping_key),this.expect_node({mapping:!0})},n.prototype.check_empty_document=function(){var e;return this.event instanceof i.DocumentStartEvent&&0!==this.events.length&&(e=this.events[0],e instanceof i.ScalarEvent&&null==e.anchor&&null==e.tag&&e.implicit&&""===e.value)},n.prototype.check_empty_sequence=function(){return this.event instanceof i.SequenceStartEvent&&this.events[0]instanceof i.SequenceEndEvent},n.prototype.check_empty_mapping=function(){return this.event instanceof i.MappingStartEvent&&this.events[0]instanceof i.MappingEndEvent},n.prototype.check_simple_key=function(){var e;return e=0,this.event instanceof i.NodeEvent&&null!=this.event.anchor&&(null==this.prepared_anchor&&(this.prepared_anchor=this.prepare_anchor(this.event.anchor)),e+=this.prepared_anchor.length),null!=this.event.tag&&(this.event instanceof i.ScalarEvent||this.event instanceof i.CollectionStartEvent)&&(null==this.prepared_tag&&(this.prepared_tag=this.prepare_tag(this.event.tag)),e+=this.prepared_tag.length),this.event instanceof i.ScalarEvent&&(null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),e+=this.analysis.scalar.length),e<128&&(this.event instanceof i.AliasEvent||this.event instanceof i.ScalarEvent&&!this.analysis.empty&&!this.analysis.multiline||this.check_empty_sequence()||this.check_empty_mapping())},n.prototype.process_anchor=function(e){return null==this.event.anchor?void(this.prepared_anchor=null):(null==this.prepared_anchor&&(this.prepared_anchor=this.prepare_anchor(this.event.anchor)),this.prepared_anchor&&this.write_indicator(""+e+this.prepared_anchor,!0),this.prepared_anchor=null)},n.prototype.process_tag=function(){var e;if(e=this.event.tag,this.event instanceof i.ScalarEvent){if(null==this.style&&(this.style=this.choose_scalar_style()),(!this.canonical||null==e)&&(""===this.style&&this.event.implicit[0]||""!==this.style&&this.event.implicit[1]))return void(this.prepared_tag=null);this.event.implicit[0]&&null==e&&(e="!",this.prepared_tag=null)}else if((!this.canonical||null==e)&&this.event.implicit)return void(this.prepared_tag=null);return null==e&&this.error("tag is not specified"),null==this.prepared_tag&&(this.prepared_tag=this.prepare_tag(e)),this.write_indicator(this.prepared_tag,!0),this.prepared_tag=null},n.prototype.process_scalar=function(){var e;switch(null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),null==this.style&&(this.style=this.choose_scalar_style()),e=!this.simple_key_context,this.style){case'"':this.write_double_quoted(this.analysis.scalar,e);break;case"'":this.write_single_quoted(this.analysis.scalar,e);break;case">":this.write_folded(this.analysis.scalar);break;case"|":this.write_literal(this.analysis.scalar);break;default:this.write_plain(this.analysis.scalar,e)}return this.analysis=null,this.style=null},n.prototype.choose_scalar_style=function(){var e;return null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),'"'===this.event.style||this.canonical?'"':this.event.style||!this.event.implicit[0]||this.simple_key_context&&(this.analysis.empty||this.analysis.multiline)||!(this.flow_level&&this.analysis.allow_flow_plain||!this.flow_level&&this.analysis.allow_block_plain)?this.event.style&&(e=this.event.style, +u.call("|>",e)>=0)&&!this.flow_level&&!this.simple_key_context&&this.analysis.allow_block?this.event.style:this.event.style&&"'"!==this.event.style||!this.analysis.allow_single_quoted||this.simple_key_context&&this.analysis.multiline?'"':"'":""},n.prototype.prepare_version=function(e){var t,n,r;return t=e[0],n=e[1],r=t+"."+n,1===t?r:this.error("unsupported YAML version",r)},n.prototype.prepare_tag_handle=function(e){var t,n,r,i;for(e||this.error("tag handle must not be empty"),"!"===e[0]&&"!"===e.slice(-1)||this.error("tag handle must start and end with '!':",e),i=e.slice(1,-1),n=0,r=i.length;n=0||this.error("invalid character '"+t+"' in the tag handle:",e);return e},n.prototype.prepare_tag_prefix=function(e){var t,n,r,i;for(e||this.error("tag prefix must not be empty"),n=[],i=0,r=+("!"===e[0]);r=0?r++:(i=0||"!"===t&&"!"!==i?r++:(f"},n.prototype.prepare_anchor=function(e){var t,n,r;for(e||this.error("anchor must not be empty"),n=0,r=e.length;n=0||this.error("invalid character '"+t+"' in the anchor:",e);return e},n.prototype.analyze_scalar=function(t){var n,i,o,a,s,c,l,p,f,h,d,m,v,y,g,_,b,x,w,k,S,E,C,A,T,D;for(t||new e(t,!0,!1,!1,!0,!0,!0,!1),c=!1,f=!1,_=!1,C=!1,D=!1,y=!1,v=!1,T=!1,A=!1,l=!1,E=!1,0!==t.indexOf("---")&&0!==t.indexOf("...")||(c=!0,f=!0),b=!0,h=1===t.length||(k=t[1],u.call("\0 \t\r\n…\u2028\u2029",k)>=0),w=!1,x=!1,m=0,m=d=0,g=t.length;d'\"%@`",p)>=0||"-"===p&&h?(f=!0,c=!0):u.call("?:",p)>=0&&(f=!0,h&&(c=!0)):u.call(",?[]{}",p)>=0?f=!0:":"===p?(f=!0,h&&(c=!0)):"#"===p&&b&&(f=!0,c=!0),u.call("\n…\u2028\u2029",p)>=0&&(_=!0),"\n"===p||" "<=p&&p<="~"||("\ufeff"!==p&&("…"===p||" "<=p&&p<="퟿"||""<=p&&p<="�")?(D=!0,this.allow_unicode||(C=!0)):C=!0)," "===p?(0===m&&(y=!0),m===t.length-1&&(T=!0),x&&(l=!0),x=!1,w=!0):u.call("\n…\u2028\u2029",p)>=0?(0===m&&(v=!0),m===t.length-1&&(A=!0),w&&(E=!0),x=!0,w=!1):(x=!1,w=!1),b=u.call(r,p)>=0,h=m+2>=t.length||(S=t[m+2],u.call(r,S)>=0);return a=!0,i=!0,s=!0,o=!0,n=!0,(y||v||T||A)&&(a=i=!1),T&&(n=!1),l&&(a=i=s=!1),(E||C)&&(a=i=s=n=!1),_&&(a=i=!1),f&&(a=!1),c&&(i=!1),new e(t,!1,_,a,i,s,o,n)},n.prototype.write_stream_start=function(){if(this.encoding&&0===this.encoding.indexOf("utf-16"))return this.stream.write("\ufeff",this.encoding)},n.prototype.write_stream_end=function(){return this.flush_stream()},n.prototype.write_indicator=function(e,t,n){var r;return null==n&&(n={}),r=this.whitespace||!t?e:" "+e,this.whitespace=!!n.whitespace,this.indentation&&(this.indentation=!!n.indentation),this.column+=r.length,this.open_ended=!1,this.stream.write(r,this.encoding)},n.prototype.write_indent=function(){var e,t,n;if(t=null!=(n=this.indent)?n:0,(!this.indentation||this.column>t||this.column===t&&!this.whitespace)&&this.write_line_break(),this.columnthis.best_width&&t&&0!==f&&a!==e.length?this.write_indent():(o=e.slice(f,a),this.column+=o.length,this.stream.write(o,this.encoding)),f=a);else if(r){if(null==i||u.call("\n…\u2028\u2029",i)<0){for("\n"===e[f]&&this.write_line_break(),l=e.slice(f,a),s=0,c=l.length;s=0||"'"===i)&&f=0),a++}return this.write_indicator("'",!1)},n.prototype.write_double_quoted=function(e,t){var n,r,i,a;for(null==t&&(t=!0),this.write_indicator('"',!0),a=i=0;i<=e.length;)n=e[i],(null==n||u.call('"\\…\u2028\u2029\ufeff',n)>=0||!(" "<=n&&n<="~"||this.allow_unicode&&(" "<=n&&n<="퟿"||""<=n&&n<="�")))&&(a=i)&&this.column+(i-a)>this.best_width&&(r=e.slice(a,i)+"\\",a"+a,!0),"+"===a.slice(-1)&&(this.open_ended=!0),this.write_line_break(),c=!0,n=!0,h=!1,d=o=0,f=[];o<=e.length;){if(r=e[o],n){if(null==r||u.call("\n…\u2028\u2029",r)<0){for(c||null==r||" "===r||"\n"!==e[d]||this.write_line_break(),c=" "===r,p=e.slice(d,o),s=0,l=p.length;sthis.best_width?this.write_indent():(i=e.slice(d,o),this.column+=i.length,this.stream.write(i,this.encoding)),d=o):(null==r||u.call(" \n…\u2028\u2029",r)>=0)&&(i=e.slice(d,o),this.column+=i.length,this.stream.write(i,this.encoding),null==r&&this.write_line_break(),d=o);null!=r&&(n=u.call("\n…\u2028\u2029",r)>=0,h=" "===r),f.push(o++)}return f},n.prototype.write_literal=function(e){var t,n,r,i,o,a,s,c,l,p,f;for(a=this.determine_block_hints(e),this.write_indicator("|"+a,!0),"+"===a.slice(-1)&&(this.open_ended=!0),this.write_line_break(),n=!0,f=o=0,p=[];o<=e.length;){if(r=e[o],n){if(null==r||u.call("\n…\u2028\u2029",r)<0){for(l=e.slice(f,o),s=0,c=l.length;s=0)&&(i=e.slice(f,o),this.stream.write(i,this.encoding),null==r&&this.write_line_break(),f=o);null!=r&&(n=u.call("\n…\u2028\u2029",r)>=0),p.push(o++)}return p},n.prototype.write_plain=function(e,t){var n,r,i,o,a,s,c,l,p,f,h;if(null==t&&(t=!0),e){for(this.root_context&&(this.open_ended=!0),this.whitespace||(o=" ",this.column+=o.length,this.stream.write(o,this.encoding)),this.whitespace=!1,this.indentation=!1,f=!1,r=!1,h=a=0,p=[];a<=e.length;){if(i=e[a],f)" "!==i&&(h+1===a&&this.column>this.best_width&&t?(this.write_indent(),this.whitespace=!1,this.indentation=!1):(o=e.slice(h,a),this.column+=o.length,this.stream.write(o,this.encoding)),h=a);else if(r){if(u.call("\n…\u2028\u2029",i)<0){for("\n"===e[h]&&this.write_line_break(),l=e.slice(h,a),s=0,c=l.length;s=0)&&(o=e.slice(h,a),this.column+=o.length,this.stream.write(o,this.encoding),h=a);null!=i&&(f=" "===i,r=u.call("\n…\u2028\u2029",i)>=0),p.push(a++)}return p}},n.prototype.determine_block_hints=function(e){var t,n,r,i,o;return n="",t=e[0],r=e.length-2,o=e[r++],i=e[r++],u.call(" \n…\u2028\u2029",t)>=0&&(n+=this.best_indent),u.call("\n…\u2028\u2029",i)<0?n+="-":(1===e.length||u.call("\n…\u2028\u2029",o)>=0)&&(n+="+"),n},n.prototype.flush_stream=function(){var e;return"function"==typeof(e=this.stream).flush?e.flush():void 0},n.prototype.error=function(e,n){var r,i;throw n&&(n=null!=(r=null!=n&&null!=(i=n.constructor)?i.name:void 0)?r:o.inspect(n)),new t.EmitterError(""+e+(n?" "+n:""))},n}(),e=function(){function e(e,t,n,r,i,o,a,s){this.scalar=e,this.empty=t,this.multiline=n,this.allow_flow_plain=r,this.allow_block_plain=i,this.allow_single_quoted=o,this.allow_double_quoted=a,this.allow_block=s}return e}()}).call(this)},function(e,t,n){(function(){var e,t,r,i,o=function(e,t){function n(){this.constructor=e}for(var r in t)a.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},a={}.hasOwnProperty;t=n(743),r=n(745),i=n(747),e=n(744).YAMLError,this.SerializerError=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t}(e),this.Serializer=function(){function e(e){var t;t=null!=e?e:{},this.encoding=t.encoding,this.explicit_start=t.explicit_start,this.explicit_end=t.explicit_end,this.version=t.version,this.tags=t.tags,this.serialized_nodes={},this.anchors={},this.last_anchor_id=0,this.closed=null}return e.prototype.open=function(){if(null===this.closed)return this.emit(new t.StreamStartEvent(this.encoding)),this.closed=!1;throw this.closed?new SerializerError("serializer is closed"):new SerializerError("serializer is already open")},e.prototype.close=function(){if(null===this.closed)throw new SerializerError("serializer is not opened");if(!this.closed)return this.emit(new t.StreamEndEvent),this.closed=!0},e.prototype.serialize=function(e){if(null===this.closed)throw new SerializerError("serializer is not opened");if(this.closed)throw new SerializerError("serializer is closed");return null!=e&&(this.emit(new t.DocumentStartEvent(void 0,void 0,this.explicit_start,this.version,this.tags)),this.anchor_node(e),this.serialize_node(e),this.emit(new t.DocumentEndEvent(void 0,void 0,this.explicit_end))),this.serialized_nodes={},this.anchors={},this.last_anchor_id=0},e.prototype.anchor_node=function(e){var t,n,i,o,a,s,u,c,l,p,f,h,d,m;if(e.unique_id in this.anchors)return null!=(t=this.anchors)[c=e.unique_id]?t[c]:t[c]=this.generate_anchor(e);if(this.anchors[e.unique_id]=null,e instanceof r.SequenceNode){for(l=e.value,h=[],n=0,s=l.length;nn?p.push([l,s]):i[s]=this.yaml_path_resolvers[l][s]);else for(d=this.yaml_path_resolvers,a=0,c=d.length;a=0)return c[e];if(a.call(c,null)>=0)return c[null]}return e===t.ScalarNode?i:e===t.SequenceNode?o:e===t.MappingNode?n:void 0},e}(),this.Resolver=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return i(t,e),t}(this.BaseResolver),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:bool",/^(?:yes|Yes|YES|true|True|TRUE|on|On|ON|no|No|NO|false|False|FALSE|off|Off|OFF)$/,"yYnNtTfFoO"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:float",/^(?:[-+]?(?:[0-9][0-9_]*)\.[0-9_]*(?:[eE][-+][0-9]+)?|\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*|[-+]?\.(?:inf|Inf|INF)|\.(?:nan|NaN|NAN))$/,"-+0123456789."),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:int",/^(?:[-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[0-9a-fA-F_]+|[-+]?0o[0-7_]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$/,"-+0123456789"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:merge",/^(?:<<)$/,"<"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:null",/^(?:~|null|Null|NULL|)$/,["~","n","N",""]),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:timestamp",/^(?:[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]|[0-9][0-9][0-9][0-9]-[0-9][0-9]?-[0-9][0-9]?(?:[Tt]|[\x20\t]+)[0-9][0-9]?:[0-9][0-9]:[0-9][0-9](?:\.[0-9]*)?(?:[\x20\t]*(?:Z|[-+][0-9][0-9]?(?::[0-9][0-9])?))?)$/,"0123456789"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:value",/^(?:=)$/,"="),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:yaml",/^(?:!|&|\*)$/,"!&*")}).call(this)},function(e,t,n){(function(){var e,t,r,i,o,a,s,u=[].slice;s=n(747),i=n(757),a=n(758),r=n(760),e=n(742),o=n(755),t=n(746),this.make_loader=function(n,c,l,p,f,h){var d,m;return null==n&&(n=i.Reader),null==c&&(c=a.Scanner),null==l&&(l=r.Parser),null==p&&(p=e.Composer),null==f&&(f=o.Resolver),null==h&&(h=t.Constructor),m=[n,c,l,p,f,h],d=function(){function e(e){var n,r,i;for(m[0].call(this,e),i=m.slice(1),n=0,r=i.length;n=0||"\r"===t&&"\n"!==this.string[this.index]?(this.line++,this.column=0):this.column++,n.push(e--);return n},n.prototype.get_mark=function(){return new e(this.line,this.column,this.string,this.index)},n.prototype.check_printable=function(){var e,n,i;if(n=r.exec(this.string))throw e=n[0],i=this.string.length-this.index+n.index,new t.ReaderError(i,e,"special characters are not allowed")},n}()}).call(this)},function(e,t,n){(function(){var e,r,i,o,a=function(e,t){function n(){this.constructor=e}for(var r in t)s.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},s={}.hasOwnProperty,u=[].slice,c=[].indexOf||function(e){for(var t=0,n=this.length;t"===e&&0===this.flow_level)return this.fetch_folded();if("'"===e)return this.fetch_single();if('"'===e)return this.fetch_double();if(this.check_plain())return this.fetch_plain();throw new t.ScannerError("while scanning for the next token",null,"found character "+e+" that cannot start any token",this.get_mark())},e.prototype.next_possible_simple_key=function(){var e,t,n,r;n=null,r=this.possible_simple_keys;for(t in r)s.call(r,t)&&(e=r[t],(null===n||e.token_numbere;)t=this.get_mark(),this.indent=this.indents.pop(),n.push(this.tokens.push(new i.BlockEndToken(t,t)));return n}},e.prototype.add_indent=function(e){return e>this.indent&&(this.indents.push(this.indent),this.indent=e,!0)},e.prototype.fetch_stream_start=function(){var e;return e=this.get_mark(),this.tokens.push(new i.StreamStartToken(e,e,this.encoding))},e.prototype.fetch_stream_end=function(){var e;return this.unwind_indent(-1),this.remove_possible_simple_key(),this.allow_possible_simple_key=!1,this.possible_simple_keys={},e=this.get_mark(),this.tokens.push(new i.StreamEndToken(e,e)),this.done=!0},e.prototype.fetch_directive=function(){return this.unwind_indent(-1),this.remove_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_directive())},e.prototype.fetch_document_start=function(){return this.fetch_document_indicator(i.DocumentStartToken)},e.prototype.fetch_document_end=function(){return this.fetch_document_indicator(i.DocumentEndToken)},e.prototype.fetch_document_indicator=function(e){var t;return this.unwind_indent(-1),this.remove_possible_simple_key(),this.allow_simple_key=!1,t=this.get_mark(),this.forward(3),this.tokens.push(new e(t,this.get_mark()))},e.prototype.fetch_flow_sequence_start=function(){return this.fetch_flow_collection_start(i.FlowSequenceStartToken)},e.prototype.fetch_flow_mapping_start=function(){return this.fetch_flow_collection_start(i.FlowMappingStartToken)},e.prototype.fetch_flow_collection_start=function(e){var t;return this.save_possible_simple_key(),this.flow_level++,this.allow_simple_key=!0,t=this.get_mark(),this.forward(),this.tokens.push(new e(t,this.get_mark()))},e.prototype.fetch_flow_sequence_end=function(){return this.fetch_flow_collection_end(i.FlowSequenceEndToken)},e.prototype.fetch_flow_mapping_end=function(){return this.fetch_flow_collection_end(i.FlowMappingEndToken)},e.prototype.fetch_flow_collection_end=function(e){var t;return this.remove_possible_simple_key(),this.flow_level--,this.allow_simple_key=!1,t=this.get_mark(),this.forward(),this.tokens.push(new e(t,this.get_mark()))},e.prototype.fetch_flow_entry=function(){var e;return this.allow_simple_key=!0,this.remove_possible_simple_key(),e=this.get_mark(),this.forward(),this.tokens.push(new i.FlowEntryToken(e,this.get_mark()))},e.prototype.fetch_block_entry=function(){var e,n;if(0===this.flow_level){if(!this.allow_simple_key)throw new t.ScannerError(null,null,"sequence entries are not allowed here",this.get_mark());this.add_indent(this.column)&&(e=this.get_mark(),this.tokens.push(new i.BlockSequenceStartToken(e,e)))}return this.allow_simple_key=!0,this.remove_possible_simple_key(),n=this.get_mark(),this.forward(),this.tokens.push(new i.BlockEntryToken(n,this.get_mark()))},e.prototype.fetch_key=function(){var e,n;if(0===this.flow_level){if(!this.allow_simple_key)throw new t.ScannerError(null,null,"mapping keys are not allowed here",this.get_mark());this.add_indent(this.column)&&(e=this.get_mark(), +this.tokens.push(new i.BlockMappingStartToken(e,e)))}return this.allow_simple_key=!this.flow_level,this.remove_possible_simple_key(),n=this.get_mark(),this.forward(),this.tokens.push(new i.KeyToken(n,this.get_mark()))},e.prototype.fetch_value=function(){var e,n,r;if(e=this.possible_simple_keys[this.flow_level])delete this.possible_simple_keys[this.flow_level],this.tokens.splice(e.token_number-this.tokens_taken,0,new i.KeyToken(e.mark,e.mark)),0===this.flow_level&&this.add_indent(e.column)&&this.tokens.splice(e.token_number-this.tokens_taken,0,new i.BlockMappingStartToken(e.mark,e.mark)),this.allow_simple_key=!1;else{if(0===this.flow_level){if(!this.allow_simple_key)throw new t.ScannerError(null,null,"mapping values are not allowed here",this.get_mark());this.add_indent(this.column)&&(n=this.get_mark(),this.tokens.push(new i.BlockMappingStartToken(n,n)))}this.allow_simple_key=!this.flow_level,this.remove_possible_simple_key()}return r=this.get_mark(),this.forward(),this.tokens.push(new i.ValueToken(r,this.get_mark()))},e.prototype.fetch_alias=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_anchor(i.AliasToken))},e.prototype.fetch_anchor=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_anchor(i.AnchorToken))},e.prototype.fetch_tag=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_tag())},e.prototype.fetch_literal=function(){return this.fetch_block_scalar("|")},e.prototype.fetch_folded=function(){return this.fetch_block_scalar(">")},e.prototype.fetch_block_scalar=function(e){return this.allow_simple_key=!0,this.remove_possible_simple_key(),this.tokens.push(this.scan_block_scalar(e))},e.prototype.fetch_single=function(){return this.fetch_flow_scalar("'")},e.prototype.fetch_double=function(){return this.fetch_flow_scalar('"')},e.prototype.fetch_flow_scalar=function(e){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_flow_scalar(e))},e.prototype.fetch_plain=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_plain())},e.prototype.check_directive=function(){return 0===this.column},e.prototype.check_document_start=function(){var e;return 0===this.column&&"---"===this.prefix(3)&&(e=this.peek(3),c.call(n+l+"\0",e)>=0)},e.prototype.check_document_end=function(){var e;return 0===this.column&&"..."===this.prefix(3)&&(e=this.peek(3),c.call(n+l+"\0",e)>=0)},e.prototype.check_block_entry=function(){var e;return e=this.peek(1),c.call(n+l+"\0",e)>=0},e.prototype.check_key=function(){var e;return 0!==this.flow_level||(e=this.peek(1),c.call(n+l+"\0",e)>=0)},e.prototype.check_value=function(){var e;return 0!==this.flow_level||(e=this.peek(1),c.call(n+l+"\0",e)>=0)},e.prototype.check_plain=function(){var e,t;return e=this.peek(),c.call(n+l+"\0-?:,[]{}#&*!|>'\"%@`",e)<0||(t=this.peek(1),c.call(n+l+"\0",t)<0&&("-"===e||0===this.flow_level&&c.call("?:",e)>=0))},e.prototype.scan_to_next_token=function(){var e,t,r;for(0===this.index&&"\ufeff"===this.peek()&&this.forward(),e=!1,r=[];!e;){for(;" "===this.peek();)this.forward();if("#"===this.peek())for(;t=this.peek(),c.call(n+"\0",t)<0;)this.forward();this.scan_line_break()?0===this.flow_level?r.push(this.allow_simple_key=!0):r.push(void 0):r.push(e=!0)}return r},e.prototype.scan_directive=function(){var e,t,r,o,a;if(o=this.get_mark(),this.forward(),t=this.scan_directive_name(o),a=null,"YAML"===t)a=this.scan_yaml_directive_value(o),e=this.get_mark();else if("TAG"===t)a=this.scan_tag_directive_value(o),e=this.get_mark();else for(e=this.get_mark();r=this.peek(),c.call(n+"\0",r)<0;)this.forward();return this.scan_directive_ignored_line(o),new i.DirectiveToken(t,a,o,e)},e.prototype.scan_directive_name=function(e){var r,i,o;for(i=0,r=this.peek(i);"0"<=r&&r<="9"||"A"<=r&&r<="Z"||"a"<=r&&r<="z"||c.call("-_",r)>=0;)i++,r=this.peek(i);if(0===i)throw new t.ScannerError("while scanning a directive",e,"expected alphanumeric or numeric character but found "+r,this.get_mark());if(o=this.prefix(i),this.forward(i),r=this.peek(),c.call(n+"\0 ",r)<0)throw new t.ScannerError("while scanning a directive",e,"expected alphanumeric or numeric character but found "+r,this.get_mark());return o},e.prototype.scan_yaml_directive_value=function(e){for(var r,i,o;" "===this.peek();)this.forward();if(r=this.scan_yaml_directive_number(e),"."!==this.peek())throw new t.ScannerError("while scanning a directive",e,"expected a digit or '.' but found "+this.peek(),this.get_mark());if(this.forward(),i=this.scan_yaml_directive_number(e),o=this.peek(),c.call(n+"\0 ",o)<0)throw new t.ScannerError("while scanning a directive",e,"expected a digit or ' ' but found "+this.peek(),this.get_mark());return[r,i]},e.prototype.scan_yaml_directive_number=function(e){var n,r,i,o;if(n=this.peek(),!("0"<=n&&n<="9"))throw new t.ScannerError("while scanning a directive",e,"expected a digit but found "+n,this.get_mark());for(r=0;"0"<=(i=this.peek(r))&&i<="9";)r++;return o=parseInt(this.prefix(r)),this.forward(r),o},e.prototype.scan_tag_directive_value=function(e){for(var t,n;" "===this.peek();)this.forward();for(t=this.scan_tag_directive_handle(e);" "===this.peek();)this.forward();return n=this.scan_tag_directive_prefix(e),[t,n]},e.prototype.scan_tag_directive_handle=function(e){var n,r;if(r=this.scan_tag_handle("directive",e),n=this.peek()," "!==n)throw new t.ScannerError("while scanning a directive",e,"expected ' ' but found "+n,this.get_mark());return r},e.prototype.scan_tag_directive_prefix=function(e){var r,i;if(i=this.scan_tag_uri("directive",e),r=this.peek(),c.call(n+"\0 ",r)<0)throw new t.ScannerError("while scanning a directive",e,"expected ' ' but found "+r,this.get_mark());return i},e.prototype.scan_directive_ignored_line=function(e){for(var r,i;" "===this.peek();)this.forward();if("#"===this.peek())for(;i=this.peek(),c.call(n+"\0",i)<0;)this.forward();if(r=this.peek(),c.call(n+"\0",r)<0)throw new t.ScannerError("while scanning a directive",e,"expected a comment or a line break but found "+r,this.get_mark());return this.scan_line_break()},e.prototype.scan_anchor=function(e){var r,i,o,a,s,u;for(s=this.get_mark(),i=this.peek(),a="*"===i?"alias":"anchor",this.forward(),o=0,r=this.peek(o);"0"<=r&&r<="9"||"A"<=r&&r<="Z"||"a"<=r&&r<="z"||c.call("-_",r)>=0;)o++,r=this.peek(o);if(0===o)throw new t.ScannerError("while scanning an "+a,s,"expected alphabetic or numeric character but found '"+r+"'",this.get_mark());if(u=this.prefix(o),this.forward(o),r=this.peek(),c.call(n+l+"\0?:,]}%@`",r)<0)throw new t.ScannerError("while scanning an "+a,s,"expected alphabetic or numeric character but found '"+r+"'",this.get_mark());return new e(u,s,this.get_mark())},e.prototype.scan_tag=function(){var e,r,o,a,s,u;if(a=this.get_mark(),e=this.peek(1),"<"===e){if(r=null,this.forward(2),s=this.scan_tag_uri("tag",a),">"!==this.peek())throw new t.ScannerError("while parsing a tag",a,"expected '>' but found "+this.peek(),this.get_mark());this.forward()}else if(c.call(n+l+"\0",e)>=0)r=null,s="!",this.forward();else{for(o=1,u=!1;c.call(n+"\0 ",e)<0;){if("!"===e){u=!0;break}o++,e=this.peek(o)}u?r=this.scan_tag_handle("tag",a):(r="!",this.forward()),s=this.scan_tag_uri("tag",a)}if(e=this.peek(),c.call(n+"\0 ",e)<0)throw new t.ScannerError("while scanning a tag",a,"expected ' ' but found "+e,this.get_mark());return new i.TagToken([r,s],a,this.get_mark())},e.prototype.scan_block_scalar=function(e){var t,r,a,s,u,l,p,f,h,d,m,v,y,g,_,b,x,w,k,S;for(u=">"===e,a=[],S=this.get_mark(),this.forward(),y=this.scan_block_scalar_indicators(S),r=y[0],l=y[1],this.scan_block_scalar_ignored_line(S),v=this.indent+1,v<1&&(v=1),null==l?(g=this.scan_block_scalar_indentation(),t=g[0],m=g[1],s=g[2],p=Math.max(v,m)):(p=v+l-1,_=this.scan_block_scalar_breaks(p),t=_[0],s=_[1]),d="";this.column===p&&"\0"!==this.peek();){for(a=a.concat(t),b=this.peek(),f=c.call(" \t",b)<0,h=0;x=this.peek(h),c.call(n+"\0",x)<0;)h++;if(a.push(this.prefix(h)),this.forward(h),d=this.scan_line_break(),w=this.scan_block_scalar_breaks(p),t=w[0],s=w[1],this.column!==p||"\0"===this.peek())break;u&&"\n"===d&&f&&(k=this.peek(),c.call(" \t",k)<0)?o.is_empty(t)&&a.push(" "):a.push(d)}return r!==!1&&a.push(d),r===!0&&(a=a.concat(t)),new i.ScalarToken(a.join(""),!1,S,s,e)},e.prototype.scan_block_scalar_indicators=function(e){var r,i,o;if(i=null,o=null,r=this.peek(),c.call("+-",r)>=0){if(i="+"===r,this.forward(),r=this.peek(),c.call(a,r)>=0){if(o=parseInt(r),0===o)throw new t.ScannerError("while scanning a block scalar",e,"expected indentation indicator in the range 1-9 but found 0",this.get_mark());this.forward()}}else if(c.call(a,r)>=0){if(o=parseInt(r),0===o)throw new t.ScannerError("while scanning a block scalar",e,"expected indentation indicator in the range 1-9 but found 0",this.get_mark());this.forward(),r=this.peek(),c.call("+-",r)>=0&&(i="+"===r,this.forward())}if(r=this.peek(),c.call(n+"\0 ",r)<0)throw new t.ScannerError("while scanning a block scalar",e,"expected chomping or indentation indicators, but found "+r,this.get_mark());return[i,o]},e.prototype.scan_block_scalar_ignored_line=function(e){for(var r,i;" "===this.peek();)this.forward();if("#"===this.peek())for(;i=this.peek(),c.call(n+"\0",i)<0;)this.forward();if(r=this.peek(),c.call(n+"\0",r)<0)throw new t.ScannerError("while scanning a block scalar",e,"expected a comment or a line break but found "+r,this.get_mark());return this.scan_line_break()},e.prototype.scan_block_scalar_indentation=function(){var e,t,r,i;for(e=[],r=0,t=this.get_mark();i=this.peek(),c.call(n+" ",i)>=0;)" "!==this.peek()?(e.push(this.scan_line_break()),t=this.get_mark()):(this.forward(),this.column>r&&(r=this.column));return[e,r,t]},e.prototype.scan_block_scalar_breaks=function(e){var t,r,i;for(t=[],r=this.get_mark();this.column=0;)for(t.push(this.scan_line_break()),r=this.get_mark();this.column=0)o.push(i),this.forward();else{if(!e||"\\"!==i)return o;if(this.forward(),i=this.peek(),i in f)o.push(f[i]),this.forward();else if(i in p){for(d=p[i],this.forward(),h=u=0,v=d;0<=v?uv;h=0<=v?++u:--u)if(y=this.peek(h),c.call(a+"ABCDEFabcdef",y)<0)throw new t.ScannerError("while scanning a double-quoted scalar",r,"expected escape sequence of "+d+" hexadecimal numbers, but found "+this.peek(h),this.get_mark());s=parseInt(this.prefix(d),16),o.push(String.fromCharCode(s)),this.forward(d)}else{if(!(c.call(n,i)>=0))throw new t.ScannerError("while scanning a double-quoted scalar",r,"found unknown escape character "+i,this.get_mark());this.scan_line_break(),o=o.concat(this.scan_flow_scalar_breaks(e,r))}}else o.push("'"),this.forward(2)}},e.prototype.scan_flow_scalar_spaces=function(e,r){var i,o,a,s,u,p,f;for(a=[],s=0;p=this.peek(s),c.call(l,p)>=0;)s++;if(f=this.prefix(s),this.forward(s),o=this.peek(),"\0"===o)throw new t.ScannerError("while scanning a quoted scalar",r,"found unexpected end of stream",this.get_mark());return c.call(n,o)>=0?(u=this.scan_line_break(),i=this.scan_flow_scalar_breaks(e,r),"\n"!==u?a.push(u):0===i.length&&a.push(" "),a=a.concat(i)):a.push(f),a},e.prototype.scan_flow_scalar_breaks=function(e,r){var i,o,a,s,u;for(i=[];;){if(o=this.prefix(3),"---"===o||"..."===o&&(a=this.peek(3),c.call(n+l+"\0",a)>=0))throw new t.ScannerError("while scanning a quoted scalar",r,"found unexpected document separator",this.get_mark());for(;s=this.peek(),c.call(l,s)>=0;)this.forward();if(u=this.peek(),!(c.call(n,u)>=0))return i;i.push(this.scan_line_break())}},e.prototype.scan_plain=function(){var e,r,o,a,s,u,p,f,h;for(r=[],h=o=this.get_mark(),a=this.indent+1,f=[];;){if(s=0,"#"===this.peek())break;for(;;){if(e=this.peek(s),c.call(n+l+"\0",e)>=0||0===this.flow_level&&":"===e&&(u=this.peek(s+1),c.call(n+l+"\0",u)>=0)||0!==this.flow_level&&c.call(",:?[]{}",e)>=0)break;s++}if(0!==this.flow_level&&":"===e&&(p=this.peek(s+1),c.call(n+l+"\0,[]{}",p)<0))throw this.forward(s),new t.ScannerError("while scanning a plain scalar",h,"found unexpected ':'",this.get_mark(),"Please check http://pyyaml.org/wiki/YAMLColonInFlowContext");if(0===s)break;if(this.allow_simple_key=!1,r=r.concat(f),r.push(this.prefix(s)),this.forward(s),o=this.get_mark(),f=this.scan_plain_spaces(a,h),null==f||0===f.length||"#"===this.peek()||0===this.flow_level&&this.column=0;)a++;if(m=this.prefix(a),this.forward(a),i=this.peek(),c.call(n,i)>=0){if(s=this.scan_line_break(),this.allow_simple_key=!0,u=this.prefix(3),"---"===u||"..."===u&&(f=this.peek(3),c.call(n+l+"\0",f)>=0))return;for(r=[];d=this.peek(),c.call(n+" ",d)>=0;)if(" "===this.peek())this.forward();else if(r.push(this.scan_line_break()),u=this.prefix(3),"---"===u||"..."===u&&(h=this.peek(3),c.call(n+l+"\0",h)>=0))return;"\n"!==s?o.push(s):0===r.length&&o.push(" "),o=o.concat(r)}else m&&o.push(m);return o},e.prototype.scan_tag_handle=function(e,n){var r,i,o;if(r=this.peek(),"!"!==r)throw new t.ScannerError("while scanning a "+e,n,"expected '!' but found "+r,this.get_mark());if(i=1,r=this.peek(i)," "!==r){for(;"0"<=r&&r<="9"||"A"<=r&&r<="Z"||"a"<=r&&r<="z"||c.call("-_",r)>=0;)i++,r=this.peek(i);if("!"!==r)throw this.forward(i),new t.ScannerError("while scanning a "+e,n,"expected '!' but found "+r,this.get_mark());i++}return o=this.prefix(i),this.forward(i),o},e.prototype.scan_tag_uri=function(e,n){var r,i,o;for(i=[],o=0,r=this.peek(o);"0"<=r&&r<="9"||"A"<=r&&r<="Z"||"a"<=r&&r<="z"||c.call("-;/?:@&=+$,_.!~*'()[]%",r)>=0;)"%"===r?(i.push(this.prefix(o)),this.forward(o),o=0,i.push(this.scan_uri_escapes(e,n))):o++,r=this.peek(o);if(0!==o&&(i.push(this.prefix(o)),this.forward(o),o=0),0===i.length)throw new t.ScannerError("while parsing a "+e,n,"expected URI but found "+r,this.get_mark());return i.join("")},e.prototype.scan_uri_escapes=function(e,n){var r,i,o,a;for(r=[],a=this.get_mark();"%"===this.peek();){for(this.forward(),o=i=0;i<=2;o=++i)throw new t.ScannerError("while scanning a "+e,n,"expected URI escape sequence of 2 hexadecimal numbers but found "+this.peek(o),this.get_mark());r.push(String.fromCharCode(parseInt(this.prefix(2),16))),this.forward(2)}return r.join("")},e.prototype.scan_line_break=function(){var e;return e=this.peek(),c.call("\r\n…",e)>=0?("\r\n"===this.prefix(2)?this.forward(2):this.forward(),"\n"):c.call("\u2028\u2029",e)>=0?(this.forward(),e):""},e}()}).call(this)},function(e,t){(function(){var e=function(e,n){function r(){this.constructor=e}for(var i in n)t.call(n,i)&&(e[i]=n[i]);return r.prototype=n.prototype,e.prototype=new r,e.__super__=n.prototype,e},t={}.hasOwnProperty;this.Token=function(){function e(e,t){this.start_mark=e,this.end_mark=t}return e}(),this.DirectiveToken=function(t){function n(e,t,n,r){this.name=e,this.value=t,this.start_mark=n,this.end_mark=r}return e(n,t),n.prototype.id="",n}(this.Token),this.DocumentStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.DocumentEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.StreamStartToken=function(t){function n(e,t,n){this.start_mark=e,this.end_mark=t,this.encoding=n}return e(n,t),n.prototype.id="",n}(this.Token),this.StreamEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.BlockSequenceStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.BlockMappingStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.BlockEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.FlowSequenceStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="[",n}(this.Token),this.FlowMappingStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="{",n}(this.Token),this.FlowSequenceEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="]",n}(this.Token),this.FlowMappingEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="}",n}(this.Token),this.KeyToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="?",n}(this.Token),this.ValueToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id=":",n}(this.Token),this.BlockEntryToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="-",n}(this.Token),this.FlowEntryToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id=",",n}(this.Token),this.AliasToken=function(t){function n(e,t,n){this.value=e,this.start_mark=t,this.end_mark=n}return e(n,t),n.prototype.id="",n}(this.Token),this.AnchorToken=function(t){function n(e,t,n){this.value=e,this.start_mark=t,this.end_mark=n}return e(n,t),n.prototype.id="",n}(this.Token),this.TagToken=function(t){function n(e,t,n){this.value=e,this.start_mark=t,this.end_mark=n}return e(n,t),n.prototype.id="",n}(this.Token),this.ScalarToken=function(t){function n(e,t,n,r,i){this.value=e,this.plain=t,this.start_mark=n,this.end_mark=r,this.style=i}return e(n,t),n.prototype.id="",n}(this.Token)}).call(this)},function(e,t,n){(function(){var e,r,i,o=function(e,t){function n(){this.constructor=e}for(var r in t)a.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},a={}.hasOwnProperty,s=[].slice;r=n(743),e=n(744).MarkedYAMLError,i=n(759),this.ParserError=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t}(e),this.Parser=function(){function e(){this.current_event=null,this.yaml_version=null,this.tag_handles={},this.states=[],this.marks=[],this.state="parse_stream_start"}var n;return n={"!":"!","!!":"tag:yaml.org,2002:"},e.prototype.dispose=function(){return this.states=[],this.state=null},e.prototype.check_event=function(){var e,t,n,r;if(t=1<=arguments.length?s.call(arguments,0):[],null===this.current_event&&null!=this.state&&(this.current_event=this[this.state]()),null!==this.current_event){if(0===t.length)return!0;for(n=0,r=t.length;n', but found "+this.peek_token().id,this.peek_token().start_mark);u=this.get_token(),e=u.end_mark,n=new r.DocumentStartEvent(a,e,!0,c,s),this.states.push("parse_document_end"),this.state="parse_document_content"}return n},e.prototype.parse_document_end=function(){var e,t,n,o,a;return a=this.peek_token(),o=e=a.start_mark,n=!1,this.check_token(i.DocumentEndToken)&&(a=this.get_token(),e=a.end_mark,n=!0),t=new r.DocumentEndEvent(o,e,n),this.state="parse_document_start",t},e.prototype.parse_document_content=function(){var e;return this.check_token(i.DirectiveToken,i.DocumentStartToken,i.DocumentEndToken,i.StreamEndToken)?(e=this.process_empty_scalar(this.peek_token().start_mark),this.state=this.states.pop(),e):this.parse_block_node()},e.prototype.process_directives=function(){var e,r,o,s,u,c,l,p,f,h;for(this.yaml_version=null,this.tag_handles={};this.check_token(i.DirectiveToken);)if(f=this.get_token(),"YAML"===f.name){if(null!==this.yaml_version)throw new t.ParserError(null,null,"found duplicate YAML directive",f.start_mark);if(u=f.value,r=u[0],o=u[1],1!==r)throw new t.ParserError(null,null,"found incompatible YAML document (version 1.* is required)",f.start_mark);this.yaml_version=f.value}else if("TAG"===f.name){if(c=f.value,e=c[0],s=c[1],e in this.tag_handles)throw new t.ParserError(null,null,"duplicate tag handle "+e,f.start_mark);this.tag_handles[e]=s}p=null,l=this.tag_handles;for(e in l)a.call(l,e)&&(s=l[e],null==p&&(p={}),p[e]=s);h=[this.yaml_version,p];for(e in n)a.call(n,e)&&(s=n[e],s in this.tag_handles||(this.tag_handles[e]=s));return h},e.prototype.parse_block_node=function(){return this.parse_node(!0)},e.prototype.parse_flow_node=function(){return this.parse_node()},e.prototype.parse_block_node_or_indentless_sequence=function(){return this.parse_node(!0,!0)},e.prototype.parse_node=function(e,n){var o,a,s,u,c,l,p,f,h,d,m;if(null==e&&(e=!1),null==n&&(n=!1),this.check_token(i.AliasToken))m=this.get_token(),s=new r.AliasEvent(m.value,m.start_mark,m.end_mark),this.state=this.states.pop();else{if(o=null,h=null,p=a=d=null,this.check_token(i.AnchorToken)?(m=this.get_token(),p=m.start_mark,a=m.end_mark,o=m.value,this.check_token(i.TagToken)&&(m=this.get_token(),d=m.start_mark,a=m.end_mark,h=m.value)):this.check_token(i.TagToken)&&(m=this.get_token(),p=d=m.start_mark,a=m.end_mark,h=m.value,this.check_token(i.AnchorToken)&&(m=this.get_token(),a=m.end_mark,o=m.value)),null!==h)if(u=h[0],f=h[1],null!==u){if(!(u in this.tag_handles))throw new t.ParserError("while parsing a node",p,"found undefined tag handle "+u,d);h=this.tag_handles[u]+f}else h=f;if(null===p&&(p=a=this.peek_token().start_mark),s=null,c=null===h||"!"===h,n&&this.check_token(i.BlockEntryToken))a=this.peek_token().end_mark,s=new r.SequenceStartEvent(o,h,c,p,a),this.state="parse_indentless_sequence_entry";else if(this.check_token(i.ScalarToken))m=this.get_token(),a=m.end_mark,c=m.plain&&null===h||"!"===h?[!0,!1]:null===h?[!1,!0]:[!1,!1],s=new r.ScalarEvent(o,h,c,m.value,p,a,m.style),this.state=this.states.pop();else if(this.check_token(i.FlowSequenceStartToken))a=this.peek_token().end_mark,s=new r.SequenceStartEvent(o,h,c,p,a,!0),this.state="parse_flow_sequence_first_entry";else if(this.check_token(i.FlowMappingStartToken))a=this.peek_token().end_mark,s=new r.MappingStartEvent(o,h,c,p,a,!0),this.state="parse_flow_mapping_first_key";else if(e&&this.check_token(i.BlockSequenceStartToken))a=this.peek_token().end_mark,s=new r.SequenceStartEvent(o,h,c,p,a,!1),this.state="parse_block_sequence_first_entry";else if(e&&this.check_token(i.BlockMappingStartToken))a=this.peek_token().end_mark,s=new r.MappingStartEvent(o,h,c,p,a,!1),this.state="parse_block_mapping_first_key";else{if(null===o&&null===h)throw l=e?"block":"flow",m=this.peek_token(),new t.ParserError("while parsing a "+l+" node",p,"expected the node content, but found "+m.id,m.start_mark);s=new r.ScalarEvent(o,h,[c,!1],"",p,a),this.state=this.states.pop()}}return s},e.prototype.parse_block_sequence_first_entry=function(){var e;return e=this.get_token(),this.marks.push(e.start_mark),this.parse_block_sequence_entry()},e.prototype.parse_block_sequence_entry=function(){var e,n;if(this.check_token(i.BlockEntryToken))return n=this.get_token(),this.check_token(i.BlockEntryToken,i.BlockEndToken)?(this.state="parse_block_sequence_entry",this.process_empty_scalar(n.end_mark)):(this.states.push("parse_block_sequence_entry"),this.parse_block_node());if(!this.check_token(i.BlockEndToken))throw n=this.peek_token(),new t.ParserError("while parsing a block collection",this.marks.slice(-1)[0],"expected , but found "+n.id,n.start_mark);return n=this.get_token(),e=new r.SequenceEndEvent(n.start_mark,n.end_mark),this.state=this.states.pop(),this.marks.pop(),e},e.prototype.parse_indentless_sequence_entry=function(){var e,t;return this.check_token(i.BlockEntryToken)?(t=this.get_token(),this.check_token(i.BlockEntryToken,i.KeyToken,i.ValueToken,i.BlockEndToken)?(this.state="parse_indentless_sequence_entry",this.process_empty_scalar(t.end_mark)):(this.states.push("parse_indentless_sequence_entry"),this.parse_block_node())):(t=this.peek_token(),e=new r.SequenceEndEvent(t.start_mark,t.start_mark),this.state=this.states.pop(),e)},e.prototype.parse_block_mapping_first_key=function(){var e;return e=this.get_token(),this.marks.push(e.start_mark),this.parse_block_mapping_key()},e.prototype.parse_block_mapping_key=function(){var e,n;if(this.check_token(i.KeyToken))return n=this.get_token(),this.check_token(i.KeyToken,i.ValueToken,i.BlockEndToken)?(this.state="parse_block_mapping_value",this.process_empty_scalar(n.end_mark)):(this.states.push("parse_block_mapping_value"),this.parse_block_node_or_indentless_sequence());if(!this.check_token(i.BlockEndToken))throw n=this.peek_token(),new t.ParserError("while parsing a block mapping",this.marks.slice(-1)[0],"expected , but found "+n.id,n.start_mark);return n=this.get_token(),e=new r.MappingEndEvent(n.start_mark,n.end_mark),this.state=this.states.pop(),this.marks.pop(),e},e.prototype.parse_block_mapping_value=function(){var e;return this.check_token(i.ValueToken)?(e=this.get_token(),this.check_token(i.KeyToken,i.ValueToken,i.BlockEndToken)?(this.state="parse_block_mapping_key",this.process_empty_scalar(e.end_mark)):(this.states.push("parse_block_mapping_key"),this.parse_block_node_or_indentless_sequence())):(this.state="parse_block_mapping_key",e=this.peek_token(),this.process_empty_scalar(e.start_mark))},e.prototype.parse_flow_sequence_first_entry=function(){var e;return e=this.get_token(),this.marks.push(e.start_mark),this.parse_flow_sequence_entry(!0)},e.prototype.parse_flow_sequence_entry=function(e){var n,o;if(null==e&&(e=!1),!this.check_token(i.FlowSequenceEndToken)){if(!e){if(!this.check_token(i.FlowEntryToken))throw o=this.peek_token(),new t.ParserError("while parsing a flow sequence",this.marks.slice(-1)[0],"expected ',' or ']', but got "+o.id,o.start_mark);this.get_token()}if(this.check_token(i.KeyToken))return o=this.peek_token(),n=new r.MappingStartEvent(null,null,!0,o.start_mark,o.end_mark,!0),this.state="parse_flow_sequence_entry_mapping_key",n;if(!this.check_token(i.FlowSequenceEndToken))return this.states.push("parse_flow_sequence_entry"),this.parse_flow_node()}return o=this.get_token(),n=new r.SequenceEndEvent(o.start_mark,o.end_mark),this.state=this.states.pop(),this.marks.pop(),n},e.prototype.parse_flow_sequence_entry_mapping_key=function(){var e;return e=this.get_token(),this.check_token(i.ValueToken,i.FlowEntryToken,i.FlowSequenceEndToken)?(this.state="parse_flow_sequence_entry_mapping_value",this.process_empty_scalar(e.end_mark)):(this.states.push("parse_flow_sequence_entry_mapping_value"),this.parse_flow_node())},e.prototype.parse_flow_sequence_entry_mapping_value=function(){var e;return this.check_token(i.ValueToken)?(e=this.get_token(),this.check_token(i.FlowEntryToken,i.FlowSequenceEndToken)?(this.state="parse_flow_sequence_entry_mapping_end",this.process_empty_scalar(e.end_mark)):(this.states.push("parse_flow_sequence_entry_mapping_end"),this.parse_flow_node())):(this.state="parse_flow_sequence_entry_mapping_end",e=this.peek_token(),this.process_empty_scalar(e.start_mark))},e.prototype.parse_flow_sequence_entry_mapping_end=function(){var e;return this.state="parse_flow_sequence_entry",e=this.peek_token(),new r.MappingEndEvent(e.start_mark,e.start_mark)},e.prototype.parse_flow_mapping_first_key=function(){var e;return e=this.get_token(),this.marks.push(e.start_mark),this.parse_flow_mapping_key(!0)},e.prototype.parse_flow_mapping_key=function(e){var n,o;if(null==e&&(e=!1),!this.check_token(i.FlowMappingEndToken)){if(!e){if(!this.check_token(i.FlowEntryToken))throw o=this.peek_token(),new t.ParserError("while parsing a flow mapping",this.marks.slice(-1)[0],"expected ',' or '}', but got "+o.id,o.start_mark);this.get_token()}if(this.check_token(i.KeyToken))return o=this.get_token(),this.check_token(i.ValueToken,i.FlowEntryToken,i.FlowMappingEndToken)?(this.state="parse_flow_mapping_value",this.process_empty_scalar(o.end_mark)):(this.states.push("parse_flow_mapping_value"),this.parse_flow_node());if(!this.check_token(i.FlowMappingEndToken))return this.states.push("parse_flow_mapping_empty_value"),this.parse_flow_node()}return o=this.get_token(),n=new r.MappingEndEvent(o.start_mark,o.end_mark),this.state=this.states.pop(),this.marks.pop(),n},e.prototype.parse_flow_mapping_value=function(){var e;return this.check_token(i.ValueToken)?(e=this.get_token(),this.check_token(i.FlowEntryToken,i.FlowMappingEndToken)?(this.state="parse_flow_mapping_key",this.process_empty_scalar(e.end_mark)):(this.states.push("parse_flow_mapping_key"),this.parse_flow_node())):(this.state="parse_flow_mapping_key",e=this.peek_token(),this.process_empty_scalar(e.start_mark))},e.prototype.parse_flow_mapping_empty_value=function(){return this.state="parse_flow_mapping_key",this.process_empty_scalar(this.peek_token().start_mark)},e.prototype.process_empty_scalar=function(e){return new r.ScalarEvent(null,null,[!0,!1],"",e,e)},e}()}).call(this)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(486),o=r(i),a=n(145),s=r(a),u=n(146),c=r(u),l=n(489),p=r(l),f=n(490),h=r(f),d=n(498),m=r(d),v=function(e){function t(){return(0,s.default)(this,t),(0,p.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),(0,c.default)(t,[{key:"render",value:function(){return null}}]),t}(m.default.Component);t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(763),o=r(i);e.exports=function(e){var t=e.configs;return{fn:{fetch:o.default.makeHttp(t.preFetch,t.postFetch),buildRequest:o.default.buildRequest,execute:o.default.execute,resolve:o.default.resolve,serializeRes:o.default.serializeRes,opId:o.default.helpers.opId}}}},function(e,t,n){ +e.exports=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=46)}([function(e,t){e.exports=n(60)},function(e,t){e.exports=n(141)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return(e.operationId||"").replace(/\s/g,"").length?b(e.operationId):o(t,n)}function o(e,t){return""+_(t)+b(e)}function a(e,t){return _(t)+"-"+e}function s(e,t){return e&&e.paths?u(e,function(e){var n=e.pathName,r=e.method,o=e.operation;if(!o||"object"!==(void 0===o?"undefined":(0,v.default)(o)))return!1;var s=o.operationId;return[i(o,n,r),a(n,r),s].some(function(e){return e&&e===t})}):null}function u(e,t){return c(e,t,!0)||null}function c(e,t,n){if(!e||"object"!==(void 0===e?"undefined":(0,v.default)(e))||!e.paths||"object"!==(0,v.default)(e.paths))return null;var r=e.paths;for(var i in r)for(var o in r[i])if("PARAMETERS"!==o.toUpperCase()){var a=r[i][o];if(a&&"object"===(void 0===a?"undefined":(0,v.default)(a))){var s={spec:e,pathName:i,method:o.toUpperCase(),operation:a},u=t(s);if(n&&u)return s}}}function l(e){var t=e.spec,n=t.paths,r={};if(!n)return e;for(var o in n){var a=n[o];if((0,g.default)(a)){var s=a.parameters;for(var u in a)!function(e){var n=a[e];if(!(0,g.default)(n))return"continue";var u=i(n,o,e);if(u&&(r[u]?r[u].push(n):r[u]=[n],(0,d.default)(r).forEach(function(e){if(r[e].length>1)r[e].forEach(function(t,n){t.__originalOperationId=t.__originalOperationId||t.operationId,t.operationId=""+e+(n+1)});else if(void 0!==n.operationId){var t=r[e][0];t.__originalOperationId=t.__originalOperationId||n.operationId,t.operationId=e}})),"parameters"!==e){var c=[],l={};for(var p in t)"produces"!==p&&"consumes"!==p&&"security"!==p||(l[p]=t[p],c.push(l));if(s&&(l.parameters=s,c.push(l)),c.length){var h=!0,m=!1,v=void 0;try{for(var y,_=(0,f.default)(c);!(h=(y=_.next()).done);h=!0){var b=y.value;for(var x in b)if(n[x]){if("parameters"===x){var w=!0,k=!1,S=void 0;try{for(var E,C=(0,f.default)(b[x]);!(w=(E=C.next()).done);w=!0)!function(){var e=E.value;n[x].some(function(t){return t.name===e.name})||n[x].push(e)}()}catch(e){k=!0,S=e}finally{try{!w&&C.return&&C.return()}finally{if(k)throw S}}}}else n[x]=b[x]}}catch(e){m=!0,v=e}finally{try{!h&&_.return&&_.return()}finally{if(m)throw v}}}}}(u)}}return e}Object.defineProperty(t,"__esModule",{value:!0});var p=n(11),f=r(p),h=n(0),d=r(h),m=n(5),v=r(m);t.opId=i,t.idFromPathMethod=o,t.legacyIdFromPathMethod=a,t.getOperationRaw=s,t.findOperation=u,t.eachOperation=c,t.normalizeSwagger=l;var y=n(41),g=r(y),_=function(e){return String.prototype.toLowerCase.call(e)},b=function(e){return e.replace(/[^\w]/gi,"_")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){if(n=n||{},t=(0,q.default)({},t,{path:t.path&&o(t.path)}),"merge"===t.op){var r=s(t.path);W.default.apply(e,[r]),(0,q.default)(r.value,t.value)}else if("mergeDeep"===t.op){var i=s(t.path);W.default.apply(e,[i]),(0,J.default)(i.value,t.value)}else if(W.default.apply(e,[t]),n.allowMetaPatches&&t.meta&&O(t)&&(Array.isArray(t.value)||S(t.value))){var a=s(t.path);W.default.apply(e,[a]),(0,q.default)(a.value,t.meta)}return e}function o(e){return Array.isArray(e)?e.length<1?"":"/"+e.map(function(e){return(e+"").replace(/~/g,"~0").replace(/\//g,"~1")}).join("/"):e}function a(e,t){return{op:"add",path:e,value:t}}function s(e){return{op:"_get",path:e}}function u(e,t,n){return{op:"replace",path:e,value:t,meta:n}}function c(e,t){return{op:"remove",path:e}}function l(e,t){return{type:"mutation",op:"merge",path:e,value:t}}function p(e,t){return{type:"mutation",op:"mergeDeep",path:e,value:t}}function f(e,t){return{type:"context",path:e,value:t}}function h(e,t){try{return m(e,y,t)}catch(e){return e}}function d(e,t){try{return m(e,v,t)}catch(e){return e}}function m(e,t,n){return k(w(e.filter(O).map(function(e){return t(e.value,n,e.path)})||[]))}function v(e,t,n){return n=n||[],Array.isArray(e)?e.map(function(e,r){return v(e,t,n.concat(r))}):S(e)?(0,L.default)(e).map(function(r){return v(e[r],t,n.concat(r))}):t(e,n[n.length-1],n)}function y(e,t,n){n=n||[];var r=[];if(n.length>0){var i=t(e,n[n.length-1],n);i&&(r=r.concat(i))}if(Array.isArray(e)){var o=e.map(function(e,r){return y(e,t,n.concat(r))});o&&(r=r.concat(o))}else if(S(e)){var a=(0,L.default)(e).map(function(r){return y(e[r],t,n.concat(r))});a&&(r=r.concat(a))}return r=w(r)}function g(e,t){if(!Array.isArray(t))return!1;for(var n=0,r=t.length;n1&&void 0!==arguments[1]?arguments[1]:{};return"object"===(void 0===e?"undefined":(0,b.default)(e))&&(t=e,e=t.url),t.headers=t.headers||{},T.mergeInQueryOrForm(t),t.requestInterceptor&&(t=t.requestInterceptor(t)||t),/multipart\/form-data/i.test(t.headers["content-type"]||t.headers["Content-Type"])&&(delete t.headers["content-type"],delete t.headers["Content-Type"]),fetch(t.url,t).then(function(n){var r=T.serializeRes(n,e,t).then(function(e){return t.responseInterceptor&&(e=t.responseInterceptor(e)||e),e});if(!n.ok){var i=new Error(n.statusText);return i.statusCode=i.status=n.status,r.then(function(e){throw i.response=e,i},function(e){throw i.responseError=e,i})}return r})}function o(e){return/json/.test(e)||/xml/.test(e)||/yaml/.test(e)||/text/.test(e)}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.loadSpec,i=void 0!==r&&r,a={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:s(e.headers)},u=i||o(a.headers["content-type"]);return(u?e.text:e.blob||e.buffer).call(e).then(function(e){if(a.text=e,a.data=e,u)try{var t=S.default.safeLoad(e);a.body=t,a.obj=t}catch(e){a.parseError=e}return a})}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return"function"==typeof e.forEach?(e.forEach(function(e,n){void 0!==t[n]?(t[n]=Array.isArray(t[n])?t[n]:[t[n]],t[n].push(e)):t[n]=e}),t):t}function u(e){return"undefined"!=typeof File?e instanceof File:null!==e&&"object"===(void 0===e?"undefined":(0,b.default)(e))&&"function"==typeof e.pipe}function c(e,t){var n=e.value,r=e.collectionFormat,i=e.allowEmptyValue,o={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};if(void 0===n&&i)return"";if(u(n))return n;var a=encodeURIComponent;return t&&(a=(0,A.default)(n)?function(e){return e}:function(e){return(0,g.default)(e)}),n&&!Array.isArray(n)?a(n):Array.isArray(n)&&!r?n.map(a).join(","):"multi"===r?n.map(a):n.map(a).join(o[r])}function l(e){var t=(0,v.default)(e).reduce(function(t,n){var r=e[n],i=encodeURIComponent(n),o=function(e){return e&&"object"===(void 0===e?"undefined":(0,b.default)(e))}(r)&&!Array.isArray(r);return t[i]=c(o?r:{value:r}),t},{});return w.default.stringify(t,{encode:!1,indices:!1})||""}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,r=void 0===t?"":t,i=e.query,o=e.form;if(o){var a=(0,v.default)(o).some(function(e){return u(o[e].value)}),s=e.headers["content-type"]||e.headers["Content-Type"];if(a||/multipart\/form-data/i.test(s)){var p=n(35);e.body=new p,(0,v.default)(o).forEach(function(t){e.body.append(t,c(o[t],!0))})}else e.body=l(o);delete e.form}if(i){var f=r.split("?"),h=(0,d.default)(f,2),m=h[0],y=h[1],g="";if(y){var _=w.default.parse(y);(0,v.default)(i).forEach(function(e){return delete _[e]}),g=w.default.stringify(_,{encode:!0})}var b=function(){for(var e=arguments.length,t=Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e?n.url=e:n=e,!(this instanceof i))return new i(n);(0,c.default)(this,n);var r=this.resolve().then(function(){return t.disableInterfaces||(0,c.default)(t,i.makeApisTagOperation(t)),t});return r.client=this,r}var o=n(4),a=r(o),s=n(37),u=(r(s),n(8)),c=r(u),l=n(6),p=r(l),f=n(20),h=r(f),d=n(9),m=r(d),v=n(19),y=n(18),g=n(2);i.http=p.default,i.makeHttp=l.makeHttp.bind(null,i.http),i.resolve=h.default,i.execute=y.execute,i.serializeRes=l.serializeRes,i.serializeHeaders=l.serializeHeaders,i.clearCache=f.clearCache,i.parameterBuilders=y.PARAMETER_BUILDERS,i.makeApisTagOperation=v.makeApisTagOperation,i.buildRequest=y.buildRequest,i.helpers={opId:g.opId},e.exports=i,i.prototype={http:p.default,execute:function(e){return this.applyDefaults(),i.execute((0,a.default)({spec:this.spec,http:this.http.bind(this),securities:{authorized:this.authorizations}},e))},resolve:function(){var e=this;return i.resolve({spec:this.spec,url:this.url,allowMetaPatches:this.allowMetaPatches}).then(function(t){return e.originalSpec=e.spec,e.spec=t.spec,e.errors=t.errors,e})}},i.prototype.applyDefaults=function(){var e=this.spec,t=this.url;if(t&&t.startsWith("http")){var n=m.default.parse(t);e.host||(e.host=n.host),e.schemes||(e.schemes=[n.protocol.replace(":","")]),e.basePath||(e.basePath="/")}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.http,n=e.fetch,r=e.spec,i=e.operationId,o=e.pathName,a=e.method,s=e.parameters,u=e.securities,c=(0,b.default)(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]);t=t||n||R.default,o&&a&&!i&&(i=(0,j.legacyIdFromPathMethod)(o,a));var l=q.buildRequest((0,g.default)({spec:r,operationId:i,parameters:s,securities:u},c));return l.body&&((0,A.default)(l.body)||(0,D.default)(l.body))&&(l.body=(0,v.default)(l.body)),t(l)}function o(e){var t=e.spec,n=e.operationId,r=e.parameters,i=e.securities,o=e.requestContentType,a=e.responseContentType,s=e.parameterBuilders,u=e.scheme,c=e.requestInterceptor,l=e.responseInterceptor,h=e.contextUrl;s=s||U;var d={url:p({spec:t,scheme:u,contextUrl:h}),credentials:"same-origin",headers:{}};if(c&&(d.requestInterceptor=c),l&&(d.responseInterceptor=l),!n)return d;var m=(0,j.getOperationRaw)(t,n);if(!m)throw new z("Operation "+n+" not found");var v=m.operation,y=void 0===v?{}:v,g=m.method,_=m.pathName;d.url+=_,d.method=(""+g).toUpperCase(),r=r||{};var b=t.paths[_]||{};return a&&(d.headers.accept=a),L(y.parameters).concat(L(b.parameters)).forEach(function(e){var n=s[e.in],i=void 0;if("body"===e.in&&e.schema&&e.schema.properties&&(i=r),i=e&&e.name&&r[e.name],void 0!==e.default&&void 0===i&&(i=e.default),void 0===i&&e.required&&!e.allowEmptyValue)throw new Error("Required parameter "+e.name+" is not provided");n&&n({req:d,parameter:e,value:i,operation:y,spec:t})}),d=f({request:d,securities:i,operation:y,spec:t}),(d.body||d.form)&&(o?d.headers["content-type"]=o:Array.isArray(y.consumes)?d.headers["content-type"]=y.consumes[0]:Array.isArray(t.consumes)?d.headers["content-type"]=t.consumes[0]:y.parameters.filter(function(e){return"file"===e.type}).length?d.headers["content-type"]="multipart/form-data":y.parameters.filter(function(e){return"formData"===e.in}).length&&(d.headers["content-type"]="application/x-www-form-urlencoded")),(0,N.mergeInQueryOrForm)(d),d}function a(e){var t=e.req,n=e.value;t.body=n}function s(e){var t=e.req,n=e.value,r=e.parameter;t.form=t.form||{},(n||r.allowEmptyValue)&&(t.form[r.name]={value:n,allowEmptyValue:r.allowEmptyValue,collectionFormat:r.collectionFormat})}function u(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{},void 0!==r&&(t.headers[n.name]=r)}function c(e){var t=e.req,n=e.value,r=e.parameter;t.url=t.url.replace("{"+r.name+"}",encodeURIComponent(n))}function l(e){var t=e.req,n=e.value,r=e.parameter;if(t.query=t.query||{},!1===n&&"boolean"===r.type&&(n="false"),n)t.query[r.name]={collectionFormat:r.collectionFormat,value:n};else if(r.allowEmptyValue){var i=r.name;t.query[i]=t.query[i]||{},t.query[i].allowEmptyValue=!0}}function p(e){var t=e.spec,n=e.scheme,r=e.contextUrl,i=void 0===r?"":r,o=I.default.parse(i),a=Array.isArray(t.schemes)?t.schemes[0]:null,s=n||a||W(o.protocol)||"http",u=t.host||o.host||"",c=t.basePath||"";if(s&&u){var l=s+"://"+(u+c);return"/"===l[l.length-1]?l.slice(0,-1):l}return""}function f(e){var t=e.request,n=e.securities,r=void 0===n?{}:n,i=e.operation,o=void 0===i?{}:i,a=e.spec,s=(0,S.default)({},t),u=r.authorized,c=void 0===u?{}:u,l=r.specSecurity,p=void 0===l?[]:l,f=o.security||p,h=c&&!!(0,d.default)(c).length,m=a.securityDefinitions;return s.headers=s.headers||{},s.query=s.query||{},(0,d.default)(r).length&&h&&f&&(!Array.isArray(o.security)||o.security.length)?(f.forEach(function(e,t){for(var n in e){var r=c[n];if(r){var i=r.token,o=r.value||r,a=m[n],u=a.type,l=i&&i.access_token,p=i&&i.token_type;if(r)if("apiKey"===u){var f="query"===a.in?"query":"headers";s[f]=s[f]||{},s[f][a.name]=o}else"basic"===u?o.header?s.headers.authorization=o.header:(o.base64=(0,O.default)(o.username+":"+o.password),s.headers.authorization="Basic "+o.base64):"oauth2"===u&&(s.headers.authorization=(p||"Bearer")+" "+l)}}}),s):t}Object.defineProperty(t,"__esModule",{value:!0}),t.PARAMETER_BUILDERS=t.self=void 0;var h=n(0),d=r(h),m=n(7),v=r(m),y=n(4),g=r(y),_=n(29),b=r(_),x=n(1),w=r(x);t.execute=i,t.buildRequest=o,t.bodyBuilder=a,t.formDataBuilder=s,t.headerBuilder=u,t.pathBuilder=c,t.queryBuilder=l,t.baseUrl=p,t.applySecurities=f;var k=n(8),S=r(k),E=n(39),C=(r(E),n(42)),A=r(C),T=n(40),D=r(T),M=n(32),O=r(M),P=n(9),I=r(P),N=n(6),R=r(N),j=n(2),F=n(10),B=r(F),L=function(e){return Array.isArray(e)?e:[]},z=(0,B.default)("OperationNotFoundError",function(e,t,n){this.originalError=n,(0,w.default)(this,t||{})}),q=t.self={buildRequest:o},U=t.PARAMETER_BUILDERS={body:a,header:u,query:l,path:c,formData:s},W=function(e){return e?e.replace(/\W/g,""):null}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.pathName,r=t.method,i=t.operationId;return function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.execute((0,c.default)({spec:e.spec},(0,p.default)(e,"requestInterceptor","responseInterceptor"),{pathName:n,method:r,parameters:t,operationId:i},o))}}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=m.makeExecute(e),n=m.mapTagOperations({spec:e.spec,cb:t}),r={};for(var i in n){r[i]={operations:{}};for(var o in n[i])r[i].operations[o]={execute:n[i][o]}}return{apis:r}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=m.makeExecute(e);return{apis:m.mapTagOperations({spec:e.spec,cb:t})}}function s(e){var t=e.spec,n=e.cb,r=void 0===n?h:n,i=e.defaultTag,o=void 0===i?"default":i,a={},s={};return(0,f.eachOperation)(t,function(e){var n=e.pathName,i=e.method,u=e.operation;(u.tags?d(u.tags):[o]).forEach(function(e){if("string"==typeof e){var o=s[e]=s[e]||{},c=(0,f.opId)(u,n,i),l=r({spec:t,pathName:n,method:i,operation:u,operationId:c});if(a[c])a[c]=a[c]+1,o[""+c+a[c]]=l;else if(void 0!==o[c]){var p=a[c]||1;a[c]=p+1,o[""+c+a[c]]=l;var h=o[c];delete o[c],o[""+c+p]=h}else o[c]=l}})}),s}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var u=n(4),c=r(u);t.makeExecute=i,t.makeApisTagOperationsOperationExecute=o,t.makeApisTagOperation=a,t.mapTagOperations=s;var l=n(44),p=r(l),f=n(2),h=function(){return null},d=function(e){return Array.isArray(e)?e:[e]},m=t.self={mapTagOperations:s,makeExecute:i}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return function(t){return e({url:t,loadSpec:!0,headers:{Accept:"application/json"},credentials:"same-origin"}).then(function(e){return e.body})}}function o(){c.plugins.refs.clearCache()}function a(e){function t(e){s&&(c.plugins.refs.docCache[s]=e),c.plugins.refs.fetchJSON=i(n);var t=[c.plugins.refs];return"function"==typeof v&&t.push(c.plugins.parameters),"function"==typeof m&&t.push(c.plugins.properties),"strict"!==f&&t.push(c.plugins.allOf),(0,l.default)({spec:e,context:{baseDoc:s},plugins:t,allowMetaPatches:d,parameterMacro:v,modelPropertyMacro:m}).then(p.normalizeSwagger)}var n=e.http,r=e.fetch,o=e.spec,a=e.url,s=e.baseDoc,f=e.mode,h=e.allowMetaPatches,d=void 0===h||h,m=e.modelPropertyMacro,v=e.parameterMacro;return s=s||a,n=r||n||u.default,o?t(o):i(n)(s).then(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.makeFetchJSON=i,t.clearCache=o,t.default=a;var s=n(6),u=r(s),c=n(21),l=r(c),p=n(2)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return new F(e).dispatch()}Object.defineProperty(t,"__esModule",{value:!0}),t.plugins=t.SpecMap=void 0;var o=n(7),a=r(o),s=n(12),u=r(s),c=n(15),l=r(c),p=n(0),f=r(p),h=n(11),d=r(h),m=n(27),v=r(m),y=n(1),g=r(y),_=n(13),b=r(_),x=n(14),w=r(x);t.default=i;var k=n(38),S=r(k),E=n(3),C=r(E),A=n(26),T=r(A),D=n(22),M=r(D),O=n(24),P=r(O),I=n(25),N=r(I),R=n(23),j=r(R),F=function(){function e(t){(0,b.default)(this,e),(0,g.default)(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new j.default,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:(0,g.default)((0,v.default)(this),C.default),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(C.default.isFunction),this.patches.push(C.default.add([],this.spec)),this.patches.push(C.default.context([],this.context)),this.updatePatches(this.patches)}return(0,w.default)(e,[{key:"debug",value:function(e){if(this.debugLevel===e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0)return u.default.race(this.promisedPatches.map(function(e){return e.value}))}},{key:"getPluginHistory",value:function(e){var t=this.getPluginName(e);return this.pluginHistory[t]||[]}},{key:"getPluginRunCount",value:function(e){return this.getPluginHistory(e).length}},{key:"getPluginHistoryTip",value:function(e){var t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}},{key:"getPluginMutationIndex",value:function(e){var t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}},{key:"getPluginName",value:function(e){return e.pluginName}},{key:"updatePluginHistory",value:function(e,t){var n=this.getPluginName(e);(this.pluginHistory[n]=this.pluginHistory[n]||[]).push(t)}},{key:"updatePatches",value:function(e,t){var n=this;C.default.normalizeArray(e).forEach(function(e){if(e instanceof Error)return void n.errors.push(e);try{if(!C.default.isObject(e))return void n.debug("updatePatches","Got a non-object patch",e);if(n.showDebug&&n.allPatches.push(e),C.default.isPromise(e.value))return n.promisedPatches.push(e),void n.promisedPatchThen(e);if(C.default.isContextPatch(e))return void n.setContext(e.path,e.value);if(C.default.isMutation(e))return void n.updateMutations(e)}catch(e){n.errors.push(e)}})}},{key:"updateMutations",value:function(e){C.default.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches})&&this.mutations.push(e)}},{key:"removePromisedPatch",value:function(e){var t=this.promisedPatches.indexOf(e);return t<0?void this.debug("Tried to remove a promisedPatch that isn't there!"):void this.promisedPatches.splice(t,1)}},{key:"promisedPatchThen",value:function(e){var t=this;return e.value=e.value.then(function(n){var r=(0,g.default)({},e,{value:n});t.removePromisedPatch(e),t.updatePatches(r)}).catch(function(n){t.removePromisedPatch(e),t.updatePatches(n)})}},{key:"getMutations",value:function(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(e){var t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getPatchesOfType",value:function(e,t){return e.filter(t)}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(e){return C.default.getIn(this.state,e)}},{key:"_getContext",value:function(e){return this.contextTree.get(e)}},{key:"setContext",value:function(e,t){return this.contextTree.set(e,t)}},{key:"_hasRun",value:function(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}},{key:"_clone",value:function(e){return JSON.parse((0,a.default)(e))}},{key:"dispatch",value:function(){function e(e){e&&(e=C.default.fullyNormalizeArray(e),n.updatePatches(e,r))}var t=this,n=this,r=this.nextPlugin();if(!r){var i=this.nextPromisedPatch();if(i)return i.then(function(){return t.dispatch()}).catch(function(){return t.dispatch()});var o={spec:this.state,errors:this.errors};return this.showDebug&&(o.patches=this.allPatches),u.default.resolve(o)}if(n.pluginCount=n.pluginCount||{},n.pluginCount[r]=(n.pluginCount[r]||0)+1,n.pluginCount[r]>100)return u.default.resolve({spec:n.state,errors:n.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(r!==this.currentPlugin&&this.promisedPatches.length){var a=this.promisedPatches.map(function(e){return e.value});return u.default.all(a.map(function(e){return e.then(Function,Function)})).then(function(){return t.dispatch()})}return function(){n.currentPlugin=r;var t=n.getCurrentMutations(),i=n.mutations.length-1;try{if(r.isGenerator){var o=!0,a=!1,s=void 0;try{for(var u,c=(0,d.default)(r(t,n.getLib()));!(o=(u=c.next()).done);o=!0)e(u.value)}catch(e){a=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(a)throw s}}}else e(r(t,n.getLib()))}catch(t){e([(0,g.default)((0,v.default)(t),{plugin:r})])}finally{n.updatePluginHistory(r,{mutationIndex:i})}return n.dispatch()}()}}]),e}(),B={refs:T.default,allOf:M.default,parameters:P.default,properties:N.default};t.SpecMap=F,t.plugins=B},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={key:"allOf",plugin:function(e,t,n,r,i){if(!i.meta||!i.meta.$$ref){if(!Array.isArray(e)){var o=new TypeError("allOf must be an array");return o.fullPath=n,o}var a=n.slice(0,-1),s=!1;return[r.replace(a,{})].concat(e.map(function(e,t){if(!r.isObject(e)){if(s)return null;s=!0;var i=new TypeError("Elements in allOf must be objects");return i.fullPath=n,i}return r.mergeDeep(a,e)}))}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return o({children:{}},e,t)}function o(e,t,n){return e.value=t||{},e.protoValue=n?(0,c.default)({},n.protoValue,e.value):e.value,(0,s.default)(e.children).forEach(function(t){var n=e.children[t];e.children[t]=o(n,n.value,e)}),e}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=r(a),u=n(4),c=r(u),l=n(13),p=r(l),f=n(14),h=r(f),d=function(){function e(t){(0,p.default)(this,e),this.root=i(t||{})}return(0,h.default)(e,[{key:"set",value:function(e,t){var n=this.getParent(e,!0);if(!n)return void o(this.root,t,null);var r=e[e.length-1],a=n.children;return a[r]?void o(a[r],t,n):void(a[r]=i(t,n))}},{key:"get",value:function(e){if(e=e||[],e.length<1)return this.root.value;for(var t=this.root,n=void 0,r=void 0,i=0;i")+"#"+e;if(t==r.contextTree.get([]).baseDoc&&v(o,e))return!0;var s="";return!!n.some(function(e){return s=s+"/"+d(e),i[s]&&i[s].some(function(e){return v(e,a)||v(a,e)})})||void(i[o]=(i[o]||[]).concat(a))}function g(e,t){function n(e){return N.default.isObject(e)&&(r.indexOf(e)>=0||(0,w.default)(e).some(function(t){return n(e[t])}))}var r=[e];return t.path.reduce(function(e,t){return r.push(e[t]),e[t]},e),n(t.value)}Object.defineProperty(t,"__esModule",{value:!0});var _=n(5),b=r(_),x=n(0),w=r(x),k=n(12),S=r(k),E=n(28),C=r(E),A=n(1),T=r(A),D=n(16),M=r(D),O=n(9),P=r(O),I=n(3),N=r(I),R=n(10),j=r(R),F=new RegExp("^([a-z]+://|//)","i"),B=(0, +j.default)("JSONRefError",function(e,t,n){this.originalError=n,(0,T.default)(this,t||{})}),L={},z=new C.default,q={key:"$ref",plugin:function(e,t,n,r){var u=n.slice(0,-1),c=r.getContext(n).baseDoc;if("string"!=typeof e)return new B("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:c,fullPath:n});var l=a(e),p=l[0],h=l[1]||"",d=void 0;try{d=c||p?i(p,c):null}catch(t){return o(t,{pointer:h,$ref:e,basePath:d,fullPath:n})}var m=void 0,v=void 0;if(!y(h,d,u,r)){if(null==d?(v=f(h),void 0===(m=r.get(v))&&(m=new B("Could not resolve reference: "+e,{pointer:h,$ref:e,baseDoc:c,fullPath:n}))):(m=s(d,h),m=null!=m.__value?m.__value:m.catch(function(t){throw o(t,{pointer:h,$ref:e,baseDoc:c,fullPath:n})})),m instanceof Error)return[N.default.remove(n),m];var _=N.default.replace(u,m,{$$ref:e});return d&&d!==c?[_,N.default.context(u,{baseDoc:d})]:g(r.state,_)?void 0:_}}},U=(0,T.default)(q,{docCache:L,absoluteify:i,clearCache:u,JSONRefError:B,wrapError:o,getDoc:c,split:a,extractFromDoc:s,fetchJSON:l,extract:p,jsonPointerToArray:f,unescapeJsonPointerToken:h});t.default=U;var W=function(e){return!e||"/"===e||"#"===e}},function(e,t){e.exports=n(495)},function(e,t){e.exports=n(815)},function(e,t){e.exports=n(447)},function(e,t){e.exports=n(184)},function(e,t){e.exports=n(435)},function(e,t){e.exports=n(823)},function(e,t){e.exports=n(131)},function(e,t){e.exports=n(824)},function(e,t){e.exports=n(825)},function(e,t){e.exports=n(448)},function(e,t){e.exports=n(826)},function(e,t){e.exports=n(894)},function(e,t){e.exports=n(917)},function(e,t){e.exports=n(800)},function(e,t){e.exports=n(781)},function(e,t){e.exports=n(939)},function(e,t){e.exports=n(940)},function(e,t){e.exports=n(941)},function(e,t){e.exports=n(949)},function(e,t,n){e.exports=n(17)}])},function(e,t,n){var r=n(765),i=n(768),o=n(769),a=n(790),s=n(793),u=n(794),c=Object.prototype,l=c.hasOwnProperty,p=o(function(e,t){if(s(t)||a(t))return void i(t,u(t),e);for(var n in t)l.call(t,n)&&r(e,n,t[n])});e.exports=p},[1233,766,767],function(e,t){function n(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var r=Object.defineProperty;e.exports=n},234,[1235,765,766],function(e,t,n){function r(e){return i(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++r0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var r=500,i=16,o=Date.now;e.exports=n},[1230,767,790,792,781],[1213,780,791],279,276,283,[1208,795,801,790],function(e,t,n){function r(e,t){var n=a(e)||o(e)?i(e.length,String):[],r=n.length,u=!!r;for(var l in e)!t&&!c.call(e,l)||u&&("length"==l||s(l,r))||n.push(l);return n}var i=n(796),o=n(797),a=n(800),s=n(792),u=Object.prototype,c=u.hasOwnProperty;e.exports=r},271,function(e,t,n){function r(e){return i(e)&&s.call(e,"callee")&&(!c.call(e,"callee")||u.call(e)==o)}var i=n(798),o="[object Arguments]",a=Object.prototype,s=a.hasOwnProperty,u=a.toString,c=a.propertyIsEnumerable;e.exports=r},function(e,t,n){function r(e){return o(e)&&i(e)}var i=n(790),o=n(799);e.exports=r},158,193,[1211,793,802],[1212,803],157,function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,n){if(e&&c.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}function o(e){return c.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)}function a(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t}var u=n(805),c=n(806);t.parse=i,t.resolve=a,t.resolveObject=s,t.format=o,t.Url=r;var l=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["<",">",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(h),m=["'"].concat(d),v=["%","/","?",";","#"].concat(m),y=["/","?","#"],g=255,_=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},k={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},S=n(807);r.prototype.parse=function(e,t,n){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=r!==-1&&r127?"x":N[j];if(!R.match(_)){var B=P.slice(0,A),L=P.slice(A+1),z=N.match(b);z&&(B.push(z[1]),L.unshift(z[2])),L.length&&(s="/"+L.join(".")+s),this.hostname=B.join(".");break}}}this.hostname.length>g?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=u.toASCII(this.hostname));var q=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+q,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!x[d])for(var A=0,I=m.length;A0)&&n.host.split("@");E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return n.search=e.search,n.query=e.query,c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=x.slice(-1)[0],A=(n.host||e.host||x.length>1)&&("."===C||".."===C)||""===C,T=0,D=x.length;D>=0;D--)C=x[D],"."===C?x.splice(D,1):".."===C?(x.splice(D,1),T++):T&&(x.splice(D,1),T--);if(!_&&!b)for(;T--;T)x.unshift("..");!_||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),A&&"/"!==x.join("/").substr(-1)&&x.push("");var M=""===x[0]||x[0]&&"/"===x[0].charAt(0);if(S){n.hostname=n.host=M?"":x.length?x.shift():"";var E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return _=_||n.host&&x.length,_&&!M&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=p.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var r;(function(e,i){!function(o){function a(e){throw RangeError(P[e])}function s(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function u(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(O,".");var i=e.split("."),o=s(i,t).join(".");return r+o}function c(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(e-=65536,t+=R(e>>>10&1023|55296),e=56320|1023&e),t+=R(e)}).join("")}function p(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:x}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function h(e,t,n){var r=0;for(e=n?N(e/E):e>>1,e+=N(e/t);e>I*k>>1;r+=x)e=N(e/I);return N(r+(I+1)*e/(e+S))}function d(e){var t,n,r,i,o,s,u,c,f,d,m=[],v=e.length,y=0,g=A,_=C;for(n=e.lastIndexOf(T),n<0&&(n=0),r=0;r=128&&a("not-basic"),m.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=v&&a("invalid-input"),c=p(e.charCodeAt(i++)),(c>=x||c>N((b-y)/s))&&a("overflow"),y+=c*s,f=u<=_?w:u>=_+k?k:u-_,!(cN(b/d)&&a("overflow"),s*=d;t=m.length+1,_=h(y-o,t,0==o),N(y/t)>b-g&&a("overflow"),g+=N(y/t),y%=t,m.splice(y++,0,g)}return l(m)}function m(e){var t,n,r,i,o,s,u,l,p,d,m,v,y,g,_,S=[];for(e=c(e),v=e.length,t=A,n=0,o=C,s=0;s=t&&mN((b-n)/y)&&a("overflow"),n+=(u-t)*y,t=u,s=0;sb&&a("overflow"),m==t){for(l=n,p=x;d=p<=o?w:p>=o+k?k:p-o,!(l= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=x-w,N=Math.floor,R=String.fromCharCode;_={version:"1.3.2",ucs2:{decode:c,encode:l},decode:d,encode:m,toASCII:y,toUnicode:v},r=function(){return _}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)}).call(t,n(161)(e),function(){return this}())},function(e,t){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(808),t.encode=t.stringify=n(809)},function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(t);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var c=0;c=0?(l=d.substr(0,m),p=d.substr(m+1)):(l=d,p=""),f=decodeURIComponent(l),h=decodeURIComponent(p),n(o,f)?Array.isArray(o[f])?o[f].push(h):o[f]=[o[f],h]:o[f]=h}return o}},function(e,t){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(n(i))+r;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(n(e))}).join(t):o+encodeURIComponent(n(e[i]))}).join(t):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(e)):""}},function(e,t,n){e.exports=n(811)},function(e,t,n){(function(t){var r="object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this,i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(812),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}}).call(t,function(){return this}())},function(e,t){(function(t){!function(t){"use strict";function n(e,t,n,r){var o=t&&t.prototype instanceof i?t:i,a=Object.create(o.prototype),s=new h(r||[]);return a._invoke=c(e,n,s),a}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function a(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){function n(t,i,o,a){var s=r(e[t],e,i);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&g.call(c,"__await")?Promise.resolve(c.__await).then(function(e){n("next",e,o,a)},function(e){n("throw",e,o,a)}):Promise.resolve(c).then(function(e){u.value=e,o(u)},a)}a(s.arg)}function i(e,t){function r(){return new Promise(function(r,i){n(e,t,r,i)})}return o=o?o.then(r,r):r()}"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n));var o;this._invoke=i}function c(e,t,n){var i=E;return function(o,a){if(i===A)throw new Error("Generator is already running");if(i===T){if("throw"===o)throw a;return m()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=l(s,n);if(u){if(u===D)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===E)throw i=T,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=A;var c=r(e,t,n);if("normal"===c.type){if(i=n.done?T:C,c.arg===D)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=T,n.method="throw",n.arg=c.arg)}}}function l(e,t){var n=e.iterator[t.method];if(n===v){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=v,l(e,t),"throw"===t.method))return D;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return D}var i=r(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,D;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=v),t.delegate=null,D):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,D)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[b];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),s=g.call(i,"finallyLoc");if(a&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),f(n),D}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;f(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=v),D}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,function(){return this}())},function(e,t,n){n(814),e.exports=self.fetch.bind(self)},function(e,t){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function r(e){this.map={},e instanceof r?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function o(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function a(e){var t=new FileReader;return t.readAsArrayBuffer(e),o(t)}function s(e){var t=new FileReader;return t.readAsText(e),o(t)}function u(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(d.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(d.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!d.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type&&this.headers.set("content-type",this._bodyBlob.type))},d.blob?(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(a)},this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return s(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=i(this);return e?e:Promise.resolve(this._bodyText)},d.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function c(e){var t=e.toUpperCase();return m.indexOf(t)>-1?t:e}function l(e,t){t=t||{};var n=t.body;if(l.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new r(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new r(t.headers)),this.method=c(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function f(e){var t=new r,n=(e.getAllResponseHeaders()||"").trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),i=n.join(":").trim();t.append(r,i)}),t}function h(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof r?t.headers:new r(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){r.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];i||(i=[],this.map[e]=i),i.push(r)},r.prototype.delete=function(e){delete this.map[t(e)]},r.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},r.prototype.getAll=function(e){return this.map[t(e)]||[]},r.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},r.prototype.set=function(e,r){this.map[t(e)]=[n(r)]},r.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)};var d={blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e},m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this)},u.call(l.prototype),u.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers),url:this.url})},h.error=function(){var e=new h(null,{status:0,statusText:""});return e.type="error",e};var v=[301,302,303,307,308];h.redirect=function(e,t){if(v.indexOf(t)===-1)throw new RangeError("Invalid status code");return new h(null,{status:t,headers:{location:e}})},e.Headers=r,e.Request=l,e.Response=h,e.fetch=function(e,t){return new Promise(function(n,r){function i(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var o;o=l.prototype.isPrototypeOf(e)&&!t?e:new l(e,t);var a=new XMLHttpRequest;a.onload=function(){var e=1223===a.status?204:a.status;if(e<100||e>599)return void r(new TypeError("Network request failed"));var t={status:e,statusText:a.statusText,headers:f(a),url:i()},o="response"in a?a.response:a.responseText;n(new h(o,t))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&d.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(e,t,n){e.exports={default:n(816),__esModule:!0}},function(e,t,n){n(128),n(110),n(817),e.exports=n(59).WeakMap},function(e,t,n){"use strict";var r,i=n(818)(0),o=n(101),a=n(118),s=n(144),u=n(821),c=n(87),l=a.getWeak,p=Object.isExtensible,f=u.ufstore,h={},d=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(e){if(c(e)){var t=l(e);return t===!0?f(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(this,e,t)}},v=e.exports=n(822)("WeakMap",d,m,u,!0,!0);7!=(new v).set((Object.freeze||Object)(h),7).get(h)&&(r=u.getConstructor(d),s(r.prototype,m),a.NEED=!0,i(["delete","has","get","set"],function(e){var t=v.prototype,n=t[e];o(t,e,function(t,i){if(c(t)&&!p(t)){this._f||(this._f=new r);var o=this._f[e](t,i);return"set"==e?this:o}return n.call(this,t,i)})}))},function(e,t,n){var r=n(82),i=n(69),o=n(63),a=n(72),s=n(819);e.exports=function(e,t){var n=1==e,u=2==e,c=3==e,l=4==e,p=6==e,f=5==e||p,h=t||s;return function(t,s,d){for(var m,v,y=o(t),g=i(y),_=r(s,d,3),b=a(g.length),x=0,w=n?h(t,b):u?h(t,0):void 0;b>x;x++)if((f||x in g)&&(m=g[x],v=_(m,x,y),e))if(n)w[x]=v;else if(v)switch(e){case 3:return!0;case 5:return m;case 6:return x;case 2:w.push(m)}else if(l)return!1;return p?-1:c||l?l:w}}},function(e,t,n){var r=n(820);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(87),i=n(124),o=n(108)("species");e.exports=function(e){var t;return i(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&(t=t[o],null===t&&(t=void 0))),void 0===t?Array:t}},function(e,t,n){"use strict";var r=n(739),i=n(118).getWeak,o=n(86),a=n(87),s=n(733),u=n(734),c=n(818),l=n(67),p=c(5),f=c(6),h=0,d=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},v=function(e,t){return p(e.a,function(e){return e[0]===t})};m.prototype={get:function(e){var t=v(this,e);if(t)return t[1]},has:function(e){return!!v(this,e)},set:function(e,t){var n=v(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var c=e(function(e,r){s(e,c,t,"_i"),e._i=h++,e._l=void 0,void 0!=r&&u(r,n,e[o],e)});return r(c.prototype,{delete:function(e){if(!a(e))return!1;var t=i(e);return t===!0?d(this).delete(e):t&&l(t,this._i)&&delete t[this._i]},has:function(e){if(!a(e))return!1;var t=i(e);return t===!0?d(this).has(e):t&&l(t,this._i)}}),c},def:function(e,t,n){var r=i(o(t),!0);return r===!0?d(e).set(t,n):r[e._i]=n,e},ufstore:d}},function(e,t,n){"use strict";var r=n(77),i=n(81),o=n(118),a=n(90),s=n(84),u=n(739),c=n(734),l=n(733),p=n(87),f=n(107),h=n(85).f,d=n(818)(0),m=n(89);e.exports=function(e,t,n,v,y,g){var _=r[e],b=_,x=y?"set":"add",w=b&&b.prototype,k={};return m&&"function"==typeof b&&(g||w.forEach&&!a(function(){(new b).entries().next()}))?(b=t(function(t,n){l(t,b,e,"_c"),t._c=new _,void 0!=n&&c(n,y,t[x],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in w&&(!g||"clear"!=e)&&s(b.prototype,e,function(n,r){if(l(this,b,e),!t&&g&&!p(n))return"get"==e&&void 0;var i=this._c[e](0===n?0:n,r);return t?this:i})}),"size"in w&&h(b.prototype,"size",{get:function(){return this._c.size}})):(b=v.getConstructor(t,e,y,x),u(b.prototype,n),o.NEED=!0),f(b,e),k[e]=b,i(i.G+i.W+i.F,k),g||v.setStrong(b,e,y),b}},function(e,t,n){(function(t){!function(){"use strict";function n(e){var n;return n=e instanceof t?e:new t(e.toString(),"binary"),n.toString("base64")}e.exports=n}()}).call(t,n(132).Buffer)},function(e,t,n){/*! + * https://github.com/Starcounter-Jack/JSON-Patch + * json-patch-duplex.js version: 1.1.10 + * (c) 2013 Joachim Wester + * MIT license + */ +var r;!function(e){function t(e,n){switch(typeof e){case"undefined":case"boolean":case"string":case"number":return e===n;case"object":if(null===e)return null===n;if(E(e)){if(!E(n)||e.length!==n.length)return!1;for(var r=0,i=e.length;r0&&(e.patches=[],e.callback&&e.callback(i)),i}function l(e,t,r,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var o=g(t),a=g(e),u=!1,c=!1,p=a.length-1;p>=0;p--){var f=a[p],h=e[f];if(!t.hasOwnProperty(f)||void 0===t[f]&&void 0!==h&&E(t)===!1)r.push({op:"remove",path:i+"/"+n(f)}),c=!0;else{var d=t[f];"object"==typeof h&&null!=h&&"object"==typeof d&&null!=d?l(h,d,r,i+"/"+n(f)):h!==d&&(u=!0,r.push({op:"replace",path:i+"/"+n(f),value:s(d)}))}}if(c||o.length!=a.length)for(var p=0;p=48&&t<=57))return!1;n++}}return!0}function f(e,t,n){for(var r,i,o=[],a=0,s=t.length;a=h){o.push(x[r.op].call(r,l,i,e));break}if(E(l)){if("-"===i)i=l.length;else{if(n&&!p(i))throw new C("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a-1,r.path,r);i=parseInt(i,10)}if(f>=h){if(n&&"add"===r.op&&i>l.length)throw new C("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a-1,r.path,r);o.push(b[r.op].call(r,l,i,e));break}}else if(i&&i.indexOf("~")!=-1&&(i=i.replace(/~1/g,"/").replace(/~0/g,"~")),f>=h){o.push(_[r.op].call(r,l,i,e));break}l=l[i]}}return o}function h(e,t){var n=[];return l(e,t,n,""),n}function d(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function m(e){if(void 0===e)return!0;if(e)if(E(e)){for(var t=0,n=e.length;t0)throw new C('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",n,t,r);if(("move"===t.op||"copy"===t.op)&&"string"!=typeof t.from)throw new C("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",n,t,r);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&void 0===t.value)throw new C("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",n,t,r);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&m(t.value))throw new C("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",n,t,r);if(r)if("add"==t.op){var o=t.path.split("/").length,a=i.split("/").length;if(o!==a+1&&o!==a)throw new C("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",n,t,r)}else if("replace"===t.op||"remove"===t.op||"_get"===t.op){if(t.path!==i)throw new C("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",n,t,r)}else if("move"===t.op||"copy"===t.op){var s={op:"_get",path:t.from,value:void 0},u=e.validate([s],r);if(u&&"OPERATION_PATH_UNRESOLVABLE"===u.name)throw new C("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",n,t,r)}}function y(e,t){try{if(!E(e))throw new C("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)t=JSON.parse(JSON.stringify(t)),f.call(this,t,e,!0);else for(var n=0;nf))return!1;var d=l.get(e);if(d&&l.get(t))return d==t;var m=-1,v=!0,y=c&s?new i:void 0;for(l.set(e,t),l.set(t,e);++m=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?n+=t.charAt(i):o<128?n+=r[o]:o<2048?n+=r[192|o>>6]+r[128|63&o]:o<55296||o>=57344?n+=r[224|o>>12]+r[128|o>>6&63]+r[128|63&o]:(i+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(i)),n+=r[240|o>>18]+r[128|o>>12&63]+r[128|o>>6&63]+r[128|63&o])}return n},t.compact=function(e,n){if("object"!=typeof e||null===e)return e;var r=n||[],i=r.indexOf(e);if(i!==-1)return r[i];if(r.push(e),Array.isArray(e)){for(var o=[],a=0;a=0&&n.parseArrays&&a<=n.arrayLimit?(r=[],r[a]=s(e,t,n)):r[o]=s(e,t,n)}return r},u=function(e,t,n){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,u=o.exec(r),c=u?r.slice(0,u.index):r,l=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var p=0;null!==(u=a.exec(r))&&pp?d=p:this.setState({position:a,resized:!0}),this.props.onChange&&this.props.onChange(d),this.setState({draggedSize:d}),n.setState({size:d})}}}}},{key:"onMouseUp",value:function(){this.props.allowResize&&this.state.active&&("function"==typeof this.props.onDragFinished&&this.props.onDragFinished(this.state.draggedSize),this.setState({active:!1}))}},{key:"setSize",value:function(e,t){var n="first"===this.props.primary?this.pane1:this.pane2,r=void 0;n&&(r=e.size||t&&t.draggedSize||e.defaultSize||e.minSize,n.setState({size:r}),e.size!==t.draggedSize&&this.setState({draggedSize:r}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.split,r=t.allowResize,i=r?"":"disabled",o=u({},this.props.style||{},{display:"flex",flex:1,position:"relative",outline:"none",overflow:"hidden",MozUserSelect:"text",WebkitUserSelect:"text",msUserSelect:"text",userSelect:"text"});"vertical"===n?u(o,{flexDirection:"row",height:"100%",position:"absolute",left:0,right:0}):u(o,{flexDirection:"column",height:"100%",minHeight:"100%",position:"absolute",top:0,bottom:0,width:"100%"});var a=this.props.children,s=["SplitPane",this.props.className,n,i],c=this.props.prefixer.prefix(u({},this.props.paneStyle||{},this.props.pane1Style||{})),l=this.props.prefixer.prefix(u({},this.props.paneStyle||{},this.props.pane2Style||{}));return p.default.createElement("div",{className:s.join(" "),style:this.props.prefixer.prefix(o),ref:function(t){e.splitPane=t}},p.default.createElement(_.default,{ref:function(t){e.pane1=t},key:"pane1",className:"Pane1",style:c,split:n,size:"first"===this.props.primary?this.props.size||this.props.defaultSize||this.props.minSize:void 0},a[0]),p.default.createElement(x.default,{ref:function(t){e.resizer=t},key:"resizer",className:i,resizerClassName:this.props.resizerClassName,onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onTouchEnd:this.onMouseUp,style:this.props.resizerStyle||{},split:n}),p.default.createElement(_.default,{ref:function(t){e.pane2=t},key:"pane2",className:"Pane2",style:l,split:n,size:"second"===this.props.primary?this.props.size||this.props.defaultSize||this.props.minSize:void 0},a[1]))}}]),t}(l.Component);k.propTypes={primary:l.PropTypes.oneOf(["first","second"]),minSize:l.PropTypes.oneOfType([p.default.PropTypes.string,p.default.PropTypes.number]),maxSize:l.PropTypes.oneOfType([p.default.PropTypes.string,p.default.PropTypes.number]),defaultSize:l.PropTypes.oneOfType([p.default.PropTypes.string,p.default.PropTypes.number]),size:l.PropTypes.oneOfType([p.default.PropTypes.string,p.default.PropTypes.number]),allowResize:l.PropTypes.bool,split:l.PropTypes.oneOf(["vertical","horizontal"]),onDragStarted:l.PropTypes.func,onDragFinished:l.PropTypes.func,onChange:l.PropTypes.func,prefixer:l.PropTypes.instanceOf(m.default).isRequired,style:y.default,resizerStyle:y.default,paneStyle:y.default,pane1Style:y.default,pane2Style:y.default,className:l.PropTypes.string,resizerClassName:l.PropTypes.string,children:l.PropTypes.arrayOf(l.PropTypes.node).isRequired},k.defaultProps={split:"vertical",minSize:50,allowResize:!0,prefixer:new m.default({userAgent:w}),primary:"first"},t.default=k,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments[2],r=arguments[3];Object.keys(t).forEach(function(i){var o=e[i];Array.isArray(o)?[].concat(t[i]).forEach(function(t){e[i].indexOf(t)===-1&&e[i].splice(o.indexOf(n),r?0:1,t)}):e[i]=t[i]})}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n=t._browserInfo.version}).reduce(function(e,t){return e[t]=!0,e},{}),this._hasPropsRequiringPrefix=Object.keys(this._requiresPrefix).length>0):this._usePrefixAllFallback=!0}return a(e,[{key:"prefix",value:function(e){var t=this;return this._usePrefixAllFallback?(0,u.default)(e):this._hasPropsRequiringPrefix?(Object.keys(e).forEach(function(n){var r=e[n];r instanceof Object&&!Array.isArray(r)?e[n]=t.prefix(r):t._requiresPrefix[n]&&(e[t.jsPrefix+(0,d.default)(n)]=r,t._keepUnprefixed||delete e[n])}),Object.keys(e).forEach(function(n){[].concat(e[n]).forEach(function(r){L.forEach(function(i){o(e,i({property:n,value:r,styles:e,browserInfo:t._browserInfo,prefix:{js:t.jsPrefix,css:t.cssPrefix,keyframes:t.prefixedKeyframes},keepUnprefixed:t._keepUnprefixed,requiresPrefix:t._requiresPrefix}),r,t._keepUnprefixed)})})}),(0,v.default)(e)):e}}],[{key:"prefixAll",value:function(e){return(0,u.default)(e)}}]),e}();t.default=z,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return Object.keys(e).forEach(function(t){var n=e[t];n instanceof Object&&!Array.isArray(n)?e[t]=i(n):Object.keys(s.default).forEach(function(r){var i=s.default[r];i[t]&&(e[r+(0,c.default)(t)]=n)})}),Object.keys(e).forEach(function(t){[].concat(e[t]).forEach(function(n,r){M.forEach(function(r){return o(e,r(t,n))})})}),(0,p.default)(e)}function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];Object.keys(t).forEach(function(n){var r=e[n];Array.isArray(r)?[].concat(t[n]).forEach(function(t){var i=r.indexOf(t);i>-1&&e[n].splice(i,1),e[n].push(t)}):e[n]=t[n]})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(969),s=r(a),u=n(970),c=r(u),l=n(971),p=r(l),f=n(973),h=r(f),d=n(974),m=r(d),v=n(977),y=r(v),g=n(978),_=r(g),b=n(979),x=r(b),w=n(980),k=r(w),S=n(981),E=r(S),C=n(983),A=r(C),T=n(984),D=r(T),M=[h.default,m.default,y.default,x.default,k.default,E.default,A.default,D.default,_.default];e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={Webkit:{transform:!0,transformOrigin:!0,transformOriginX:!0,transformOriginY:!0,backfaceVisibility:!0,perspective:!0,perspectiveOrigin:!0,transformStyle:!0,transformOriginZ:!0,animation:!0,animationDelay:!0,animationDirection:!0,animationFillMode:!0,animationDuration:!0,animationIterationCount:!0,animationName:!0,animationPlayState:!0,animationTimingFunction:!0,appearance:!0,userSelect:!0,fontKerning:!0,textEmphasisPosition:!0,textEmphasis:!0,textEmphasisStyle:!0,textEmphasisColor:!0,boxDecorationBreak:!0,clipPath:!0,maskImage:!0,maskMode:!0,maskRepeat:!0,maskPosition:!0,maskClip:!0,maskOrigin:!0,maskSize:!0,maskComposite:!0,mask:!0,maskBorderSource:!0,maskBorderMode:!0,maskBorderSlice:!0,maskBorderWidth:!0,maskBorderOutset:!0,maskBorderRepeat:!0,maskBorder:!0,maskType:!0,textDecorationStyle:!0,textDecorationSkip:!0,textDecorationLine:!0,textDecorationColor:!0,filter:!0,fontFeatureSettings:!0,breakAfter:!0,breakBefore:!0,breakInside:!0,columnCount:!0,columnFill:!0,columnGap:!0,columnRule:!0,columnRuleColor:!0,columnRuleStyle:!0,columnRuleWidth:!0,columns:!0,columnSpan:!0,columnWidth:!0,flex:!0,flexBasis:!0,flexDirection:!0,flexGrow:!0,flexFlow:!0,flexShrink:!0,flexWrap:!0,alignContent:!0,alignItems:!0,alignSelf:!0,justifyContent:!0,order:!0,transition:!0,transitionDelay:!0,transitionDuration:!0,transitionProperty:!0,transitionTimingFunction:!0,backdropFilter:!0,scrollSnapType:!0,scrollSnapPointsX:!0,scrollSnapPointsY:!0,scrollSnapDestination:!0,scrollSnapCoordinate:!0,shapeImageThreshold:!0,shapeImageMargin:!0,shapeImageOutside:!0,hyphens:!0,flowInto:!0,flowFrom:!0,regionFragment:!0,textSizeAdjust:!0},Moz:{appearance:!0,userSelect:!0,boxSizing:!0,textAlignLast:!0,textDecorationStyle:!0,textDecorationSkip:!0,textDecorationLine:!0,textDecorationColor:!0,tabSize:!0,hyphens:!0,fontFeatureSettings:!0,breakAfter:!0,breakBefore:!0,breakInside:!0,columnCount:!0,columnFill:!0,columnGap:!0,columnRule:!0,columnRuleColor:!0,columnRuleStyle:!0,columnRuleWidth:!0,columns:!0,columnSpan:!0,columnWidth:!0},ms:{flex:!0,flexBasis:!1,flexDirection:!0,flexGrow:!1,flexFlow:!0,flexShrink:!1,flexWrap:!0,alignContent:!1,alignItems:!1,alignSelf:!1,justifyContent:!1,order:!1,transform:!0,transformOrigin:!0,transformOriginX:!0,transformOriginY:!0,userSelect:!0,wrapFlow:!0,wrapThrough:!0,wrapMargin:!0,scrollSnapType:!0,scrollSnapPointsX:!0,scrollSnapPointsY:!0,scrollSnapDestination:!0,scrollSnapCoordinate:!0,touchAction:!0,hyphens:!0,flowInto:!0,flowFrom:!0,breakBefore:!0,breakAfter:!0,breakInside:!0,regionFragment:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridTemplate:!0,gridAutoColumns:!0,gridAutoRows:!0,gridAutoFlow:!0,grid:!0,gridRowStart:!0,gridColumnStart:!0,gridRowEnd:!0,gridRow:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnGap:!0,gridRowGap:!0,gridArea:!0,gridGap:!0,textSizeAdjust:!0}},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return Object.keys(e).sort(function(e,t){return(0,a.default)(e)&&!(0,a.default)(t)?-1:!(0,a.default)(e)&&(0,a.default)(t)?1:0}).reduce(function(t,n){return t[n]=e[n],t},{})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(972),a=r(o);e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null!==e.match(/^(Webkit|Moz|O|ms)/)},e.exports=t.default},function(e,t){"use strict";function n(e,t){if("position"===e&&"sticky"===t)return{position:["-webkit-sticky","sticky"]}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if("string"==typeof t&&!(0,u.default)(t)&&t.indexOf("calc(")>-1)return(0,a.default)(e,t,function(e,t){return t.replace(/calc\(/g,e+"calc(")})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(975),a=r(o),s=n(976),u=r(s);e.exports=t.default},function(e,t){"use strict";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=arguments.length<=2||void 0===arguments[2]?function(e,t){return e+t}:arguments[2];return n({},e,["-webkit-","-moz-",""].map(function(e){return r(e,t)}))},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Array.isArray(e)&&(e=e.join(",")),null!==e.match(/-webkit-|-moz-|-ms-/)},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if("cursor"===e&&s[t])return(0,a.default)(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(975),a=r(o),s={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};e.exports=t.default},function(e,t){"use strict";function n(e,t){if("display"===e&&r[t])return{display:["-webkit-box","-moz-box","-ms-"+t+"box","-webkit-"+t,t]}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r={flex:!0,"inline-flex":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(s[e]&&u[t])return(0,a.default)(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(975),a=r(o),s={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},u={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if("string"==typeof t&&!(0,u.default)(t)&&null!==t.match(c))return(0,a.default)(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(975),a=r(o),s=n(976),u=r(s),c=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if("string"==typeof t&&m[e]){var n,r=a(t),o=r.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(e){return null===e.match(/-moz-|-ms-/)}).join(",");return e.indexOf("Webkit")>-1?i({},e,o):(n={},i(n,"Webkit"+(0,l.default)(e),o),i(n,e,r),n)}}function a(e){if((0,f.default)(e))return e;var t=e.split(/,(?![^()]*(?:\([^()]*\))?\))/g);return t.forEach(function(e,n){t[n]=Object.keys(d.default).reduce(function(t,n){var r="-"+n.toLowerCase()+"-";return Object.keys(d.default[n]).forEach(function(n){var i=(0,u.default)(n);e.indexOf(i)>-1&&"order"!==i&&(t=e.replace(i,r+i)+","+t)}),t},e)}),t.join(",")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var s=n(982),u=r(s),c=n(970),l=r(c),p=n(976),f=r(p),h=n(969),d=r(h),m={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0};e.exports=t.default},function(e,t){"use strict";function n(e){return e in o?o[e]:o[e]=e.replace(r,"-$&").toLowerCase().replace(i,"-ms-")}var r=/[A-Z]/g,i=/^ms-/,o={};e.exports=n},function(e,t){"use strict";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if(o[e])return n({},o[e],i[t]||t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},o={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msPreferredSize"};e.exports=t.default},function(e,t){"use strict";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){return"flexDirection"===e&&"string"==typeof t?{WebkitBoxOrient:t.indexOf("column")>-1?"vertical":"horizontal",WebkitBoxDirection:t.indexOf("reverse")>-1?"reverse":"normal"}:o[e]?n({},o[e],i[t]||t):void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},o={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(986),o=r(i),a={Webkit:["chrome","safari","ios","android","phantom","opera","webos","blackberry","bada","tizen","chromium","vivaldi"],Moz:["firefox","seamonkey","sailfish"],ms:["msie","msedge"]},s={chrome:[["chrome"],["chromium"]],safari:[["safari"]],firefox:[["firefox"]],edge:[["msedge"]],opera:[["opera"],["vivaldi"]],ios_saf:[["ios","mobile"],["ios","tablet"]],ie:[["msie"]],op_mini:[["opera","mobile"],["opera","tablet"]],and_uc:[["android","mobile"],["android","tablet"]],android:[["android","mobile"],["android","tablet"]]},u=function(e){if(e.firefox)return"firefox";var t="";return Object.keys(s).forEach(function(n){s[n].forEach(function(r){var i=0;r.forEach(function(t){e[t]&&(i+=1)}),r.length===i&&(t=n)})}),t};t.default=function(e){if(!e)return!1;var t=o.default._detect(e);return Object.keys(a).forEach(function(e){a[e].forEach(function(n){t[n]&&(t.prefix={inline:e,css:"-"+e.toLowerCase()+"-"})})}),t.browser=u(t),t.version=t.version?parseFloat(t.version):parseInt(parseFloat(t.osversion),10),t.osversion=parseFloat(t.osversion),"ios_saf"===t.browser&&t.version>t.osversion&&(t.version=t.osversion,t.safari=!0),"android"===t.browser&&t.chrome&&t.version>37&&(t.browser="and_chr"),"android"===t.browser&&t.osversion<5&&(t.version=t.osversion),t},e.exports=t.default},function(e,t,n){/*! + * Bowser - a browser detector + * https://github.com/ded/bowser + * MIT License | (c) Dustin Diaz 2015 + */ +!function(t,r,i){"undefined"!=typeof e&&e.exports?e.exports=i():n(987)(r,i)}(this,"bowser",function(){function e(e){function t(t){var n=e.match(t);return n&&n.length>1&&n[1]||""}function n(t){var n=e.match(t);return n&&n.length>1&&n[2]||""}function r(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var i,o=t(/(ipod|iphone|ipad)/i).toLowerCase(),s=/like android/i.test(e),u=!s&&/android/i.test(e),c=/nexus\s*[0-6]\s*/i.test(e),l=!c&&/nexus\s*[0-9]+/i.test(e),p=/CrOS/.test(e),f=/silk/i.test(e),h=/sailfish/i.test(e),d=/tizen/i.test(e),m=/(web|hpw)os/i.test(e),v=/windows phone/i.test(e),y=(/SamsungBrowser/i.test(e),!v&&/windows/i.test(e)),g=!o&&!f&&/macintosh/i.test(e),_=!u&&!h&&!d&&!m&&/linux/i.test(e),b=t(/edge\/(\d+(\.\d+)?)/i),x=t(/version\/(\d+(\.\d+)?)/i),w=/tablet/i.test(e),k=!w&&/[^-]mobi/i.test(e),S=/xbox/i.test(e);/opera/i.test(e)?i={name:"Opera",opera:a,version:x||t(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr|opios/i.test(e)?i={name:"Opera",opera:a,version:t(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||x}:/SamsungBrowser/i.test(e)?i={name:"Samsung Internet for Android",samsungBrowser:a,version:x||t(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(e)?i={name:"Opera Coast",coast:a,version:x||t(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(e)?i={name:"Yandex Browser",yandexbrowser:a,version:x||t(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?i={name:"UC Browser",ucbrowser:a,version:t(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?i={name:"Maxthon",maxthon:a,version:t(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?i={name:"Epiphany",epiphany:a,version:t(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?i={name:"Puffin",puffin:a,version:t(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?i={name:"Sleipnir",sleipnir:a,version:t(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?i={name:"K-Meleon",kMeleon:a,version:t(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:v?(i={name:"Windows Phone",windowsphone:a},b?(i.msedge=a,i.version=b):(i.msie=a,i.version=t(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?i={name:"Internet Explorer",msie:a,version:t(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:p?i={name:"Chrome",chromeos:a,chromeBook:a,chrome:a,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(e)?i={name:"Microsoft Edge",msedge:a,version:b}:/vivaldi/i.test(e)?i={name:"Vivaldi",vivaldi:a,version:t(/vivaldi\/(\d+(\.\d+)?)/i)||x}:h?i={name:"Sailfish",sailfish:a,version:t(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?i={name:"SeaMonkey",seamonkey:a,version:t(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(i={name:"Firefox",firefox:a,version:t(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(i.firefoxos=a)):f?i={name:"Amazon Silk",silk:a,version:t(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?i={name:"PhantomJS",phantom:a,version:t(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?i={name:"SlimerJS",slimer:a,version:t(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?i={name:"BlackBerry",blackberry:a,version:x||t(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:m?(i={name:"WebOS",webos:a,version:x||t(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(i.touchpad=a)):/bada/i.test(e)?i={name:"Bada",bada:a,version:t(/dolfin\/(\d+(\.\d+)?)/i)}:d?i={name:"Tizen",tizen:a,version:t(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||x}:/qupzilla/i.test(e)?i={name:"QupZilla",qupzilla:a,version:t(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||x}:/chromium/i.test(e)?i={name:"Chromium",chromium:a,version:t(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||x}:/chrome|crios|crmo/i.test(e)?i={name:"Chrome",chrome:a,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:u?i={name:"Android",version:x}:/safari|applewebkit/i.test(e)?(i={name:"Safari",safari:a},x&&(i.version=x)):o?(i={name:"iphone"==o?"iPhone":"ipad"==o?"iPad":"iPod"},x&&(i.version=x)):i=/googlebot/i.test(e)?{name:"Googlebot",googlebot:a,version:t(/googlebot\/(\d+(\.\d+))/i)||x}:{name:t(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!i.msedge&&/(apple)?webkit/i.test(e)?(/(apple)?webkit\/537\.36/i.test(e)?(i.name=i.name||"Blink",i.blink=a):(i.name=i.name||"Webkit",i.webkit=a),!i.version&&x&&(i.version=x)):!i.opera&&/gecko\//i.test(e)&&(i.name=i.name||"Gecko",i.gecko=a,i.version=i.version||t(/gecko\/(\d+(\.\d+)?)/i)),i.windowsphone||i.msedge||!u&&!i.silk?i.windowsphone||i.msedge||!o?g?i.mac=a:S?i.xbox=a:y?i.windows=a:_&&(i.linux=a):(i[o]=a,i.ios=a):i.android=a;var E="";i.windows?E=r(t(/Windows ((NT|XP)( \d\d?.\d)?)/i)):i.windowsphone?E=t(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):i.mac?(E=t(/Mac OS X (\d+([_\.\s]\d+)*)/i),E=E.replace(/[_\s]/g,".")):o?(E=t(/os (\d+([_\s]\d+)*) like mac os x/i),E=E.replace(/[_\s]/g,".")):u?E=t(/android[ \/-](\d+(\.\d+)*)/i):i.webos?E=t(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):i.blackberry?E=t(/rim\stablet\sos\s(\d+(\.\d+)*)/i):i.bada?E=t(/bada\/(\d+(\.\d+)*)/i):i.tizen&&(E=t(/tizen[\/\s](\d+(\.\d+)*)/i)),E&&(i.osversion=E);var C=!i.windows&&E.split(".")[0];return w||l||"ipad"==o||u&&(3==C||C>=4&&!k)||i.silk?i.tablet=a:(k||"iphone"==o||"ipod"==o||u||c||i.blackberry||i.webos||i.bada)&&(i.mobile=a),i.msedge||i.msie&&i.version>=10||i.yandexbrowser&&i.version>=15||i.vivaldi&&i.version>=1||i.chrome&&i.version>=20||i.samsungBrowser&&i.version>=4||i.firefox&&i.version>=20||i.safari&&i.version>=6||i.opera&&i.version>=10||i.ios&&i.osversion&&i.osversion.split(".")[0]>=6||i.blackberry&&i.version>=10.1||i.chromium&&i.version>=20?i.a=a:i.msie&&i.version<10||i.chrome&&i.version<20||i.firefox&&i.version<20||i.safari&&i.version<6||i.opera&&i.version<10||i.ios&&i.osversion&&i.osversion.split(".")[0]<6||i.chromium&&i.version<20?i.c=a:i.x=a,i}function t(e){return e.split(".").length}function n(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n=0;){if(i[0][r]>i[1][r])return 1;if(i[0][r]!==i[1][r])return-1;if(0===r)return 0}}function i(t,n,i){var o=s;"string"==typeof n&&(i=n,n=void 0),void 0===n&&(n=!1),i&&(o=e(i));var a=""+o.version;for(var u in t)if(t.hasOwnProperty(u)&&o[u]){if("string"!=typeof t[u])throw new Error("Browser version in the minVersion map should be a string: "+u+": "+String(t));return r([a,t[u]])<0}return n}function o(e,t,n){return!i(e,t,n)}var a=!0,s=e("undefined"!=typeof navigator?navigator.userAgent||"":"");return s.test=function(e){for(var t=0;t-1&&("firefox"===o&&a<15||"chrome"===o&&a<25||"safari"===o&&a<6.1||"ios_saf"===o&&a<7))return i({},t,(0,s.default)(n.replace(/calc\(/g,u+"calc("),n,c))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(991),s=r(a);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.property,n=e.value,r=e.browserInfo,i=r.browser,o=r.version,u=e.prefix.css,c=e.keepUnprefixed;if("cursor"===t&&s[n]&&("firefox"===i&&o<24||"chrome"===i&&o<37||"safari"===i&&o<9||"opera"===i&&o<24))return{cursor:(0,a.default)(u+n,n,c)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(991),a=r(o),s={"zoom-in":!0,"zoom-out":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.property,n=e.value,r=e.browserInfo.browser,i=e.prefix.css,o=e.keepUnprefixed;if("cursor"===t&&s[n]&&("firefox"===r||"chrome"===r||"safari"===r||"opera"===r))return{cursor:(0,a.default)(i+n,n,o)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(991),a=r(o),s={grab:!0,grabbing:!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.property,n=e.value,r=e.browserInfo,i=r.browser,o=r.version,u=e.prefix.css,c=e.keepUnprefixed;if("display"===t&&s[n]&&("chrome"===i&&o<29&&o>20||("safari"===i||"ios_saf"===i)&&o<9&&o>6||"opera"===i&&(15==o||16==o)))return{display:(0,a.default)(u+n,n,c)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(991),a=r(o),s={flex:!0,"inline-flex":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.prefix.css,o=e.keepUnprefixed;if(u[t]&&c[n])return i({},t,(0,s.default)(r+n,n,o))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(991),s=r(a),u={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},c={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.browserInfo,o=r.browser,a=r.version,c=e.prefix.css,l=e.keepUnprefixed;if("string"==typeof n&&null!==n.match(u)&&("firefox"===o&&a<16||"chrome"===o&&a<26||("safari"===o||"ios_saf"===o)&&a<7||("opera"===o||"op_mini"===o)&&a<12.1||"android"===o&&a<4.4||"and_uc"===o))return i({},t,(0,s.default)(c+n,n,l))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(991),s=r(a),u=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.prefix.css,o=e.requiresPrefix,s=e.keepUnprefixed,c=(0,l.default)(t);if("string"==typeof n&&p[c]){var f=function(){var e=Object.keys(o).map(function(e){return(0,u.default)(e)}),a=n.split(/,(?![^()]*(?:\([^()]*\))?\))/g);return e.forEach(function(e){a.forEach(function(t,n){t.indexOf(e)>-1&&"order"!==e&&(a[n]=t.replace(e,r+e)+(s?","+t:""))})}),{v:i({},t,a.join(","))}}();if("object"===("undefined"==typeof f?"undefined":a(f)))return f.v}}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.default=o;var s=n(982),u=r(s),c=n(999),l=r(c),p={transition:!0,transitionProperty:!0};e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.replace(/^(ms|Webkit|Moz|O)/,"");return t.charAt(0).toLowerCase()+t.slice(1)},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.styles,o=e.browserInfo,a=o.browser,l=o.version,p=e.prefix.css,f=e.keepUnprefixed;if((c[t]||"display"===t&&"string"==typeof n&&n.indexOf("flex")>-1)&&("ie_mob"===a||"ie"===a)&&10==l){if(f||Array.isArray(r[t])||delete r[t],"display"===t&&u[n])return{display:(0,s.default)(p+u[n],n,f)};if(c[t])return i({},c[t],u[n]||n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(991),s=r(a),u={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end",flex:"flexbox","inline-flex":"inline-flexbox"},c={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msPreferredSize"};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.styles,o=e.browserInfo,a=o.browser,l=o.version,f=e.prefix.css,h=e.keepUnprefixed;if((p.indexOf(t)>-1||"display"===t&&"string"==typeof n&&n.indexOf("flex")>-1)&&("firefox"===a&&l<22||"chrome"===a&&l<21||("safari"===a||"ios_saf"===a)&&l<=6.1||"android"===a&&l<4.4||"and_uc"===a)){if(h||Array.isArray(r[t])||delete r[t],"flexDirection"===t&&"string"==typeof n)return{WebkitBoxOrient:n.indexOf("column")>-1?"vertical":"horizontal",WebkitBoxDirection:n.indexOf("reverse")>-1?"reverse":"normal"};if("display"===t&&u[n])return{display:(0,s.default)(f+u[n],n,h)};if(c[t])return i({},c[t],u[n]||n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(991),s=r(a),u={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple",flex:"box","inline-flex":"inline-box"},c={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"},l=["alignContent","alignSelf","order","flexGrow","flexShrink","flexBasis","flexDirection"],p=Object.keys(c).concat(l);e.exports=t.default},function(e,t,n){var r=n(1003),i=n(498);e.exports=function(e,t,n){var i=e[t];if(i){var o=[];if(Object.keys(i).forEach(function(e){r.indexOf(e)===-1&&o.push(e)}),o.length)throw new Error("Prop "+t+" passed to "+n+". Has invalid keys "+o.join(", "))}},e.exports.isRequired=function(t,n,r){if(!t[n])throw new Error("Prop "+n+" passed to "+r+" is required");return e.exports(t,n,r)},e.exports.supportingArrays=i.PropTypes.oneOfType([i.PropTypes.arrayOf(e.exports),e.exports])},function(e,t){e.exports=["alignContent","MozAlignContent","WebKitAlignContent","MSAlignContent","OAlignContent","alignItems","MozAlignItems","WebKitAlignItems","MSAlignItems","OAlignItems","alignSelf","MozAlignSelf","WebKitAlignSelf","MSAlignSelf","OAlignSelf","all","MozAll","WebKitAll","MSAll","OAll","animation","MozAnimation","WebKitAnimation","MSAnimation","OAnimation","animationDelay","MozAnimationDelay","WebKitAnimationDelay","MSAnimationDelay","OAnimationDelay","animationDirection","MozAnimationDirection","WebKitAnimationDirection","MSAnimationDirection","OAnimationDirection","animationDuration","MozAnimationDuration","WebKitAnimationDuration","MSAnimationDuration","OAnimationDuration","animationFillMode","MozAnimationFillMode","WebKitAnimationFillMode","MSAnimationFillMode","OAnimationFillMode","animationIterationCount","MozAnimationIterationCount","WebKitAnimationIterationCount","MSAnimationIterationCount","OAnimationIterationCount","animationName","MozAnimationName","WebKitAnimationName","MSAnimationName","OAnimationName","animationPlayState","MozAnimationPlayState","WebKitAnimationPlayState","MSAnimationPlayState","OAnimationPlayState","animationTimingFunction","MozAnimationTimingFunction","WebKitAnimationTimingFunction","MSAnimationTimingFunction","OAnimationTimingFunction","backfaceVisibility","MozBackfaceVisibility","WebKitBackfaceVisibility","MSBackfaceVisibility","OBackfaceVisibility","background","MozBackground","WebKitBackground","MSBackground","OBackground","backgroundAttachment","MozBackgroundAttachment","WebKitBackgroundAttachment","MSBackgroundAttachment","OBackgroundAttachment","backgroundBlendMode","MozBackgroundBlendMode","WebKitBackgroundBlendMode","MSBackgroundBlendMode","OBackgroundBlendMode","backgroundClip","MozBackgroundClip","WebKitBackgroundClip","MSBackgroundClip","OBackgroundClip","backgroundColor","MozBackgroundColor","WebKitBackgroundColor","MSBackgroundColor","OBackgroundColor","backgroundImage","MozBackgroundImage","WebKitBackgroundImage","MSBackgroundImage","OBackgroundImage","backgroundOrigin","MozBackgroundOrigin","WebKitBackgroundOrigin","MSBackgroundOrigin","OBackgroundOrigin","backgroundPosition","MozBackgroundPosition","WebKitBackgroundPosition","MSBackgroundPosition","OBackgroundPosition","backgroundRepeat","MozBackgroundRepeat","WebKitBackgroundRepeat","MSBackgroundRepeat","OBackgroundRepeat","backgroundSize","MozBackgroundSize","WebKitBackgroundSize","MSBackgroundSize","OBackgroundSize","blockSize","MozBlockSize","WebKitBlockSize","MSBlockSize","OBlockSize","border","MozBorder","WebKitBorder","MSBorder","OBorder","borderBlockEnd","MozBorderBlockEnd","WebKitBorderBlockEnd","MSBorderBlockEnd","OBorderBlockEnd","borderBlockEndColor","MozBorderBlockEndColor","WebKitBorderBlockEndColor","MSBorderBlockEndColor","OBorderBlockEndColor","borderBlockEndStyle","MozBorderBlockEndStyle","WebKitBorderBlockEndStyle","MSBorderBlockEndStyle","OBorderBlockEndStyle","borderBlockEndWidth","MozBorderBlockEndWidth","WebKitBorderBlockEndWidth","MSBorderBlockEndWidth","OBorderBlockEndWidth","borderBlockStart","MozBorderBlockStart","WebKitBorderBlockStart","MSBorderBlockStart","OBorderBlockStart","borderBlockStartColor","MozBorderBlockStartColor","WebKitBorderBlockStartColor","MSBorderBlockStartColor","OBorderBlockStartColor","borderBlockStartStyle","MozBorderBlockStartStyle","WebKitBorderBlockStartStyle","MSBorderBlockStartStyle","OBorderBlockStartStyle","borderBlockStartWidth","MozBorderBlockStartWidth","WebKitBorderBlockStartWidth","MSBorderBlockStartWidth","OBorderBlockStartWidth","borderBottom","MozBorderBottom","WebKitBorderBottom","MSBorderBottom","OBorderBottom","borderBottomColor","MozBorderBottomColor","WebKitBorderBottomColor","MSBorderBottomColor","OBorderBottomColor","borderBottomLeftRadius","MozBorderBottomLeftRadius","WebKitBorderBottomLeftRadius","MSBorderBottomLeftRadius","OBorderBottomLeftRadius","borderBottomRightRadius","MozBorderBottomRightRadius","WebKitBorderBottomRightRadius","MSBorderBottomRightRadius","OBorderBottomRightRadius","borderBottomStyle","MozBorderBottomStyle","WebKitBorderBottomStyle","MSBorderBottomStyle","OBorderBottomStyle","borderBottomWidth","MozBorderBottomWidth","WebKitBorderBottomWidth","MSBorderBottomWidth","OBorderBottomWidth","borderCollapse","MozBorderCollapse","WebKitBorderCollapse","MSBorderCollapse","OBorderCollapse","borderColor","MozBorderColor","WebKitBorderColor","MSBorderColor","OBorderColor","borderImage","MozBorderImage","WebKitBorderImage","MSBorderImage","OBorderImage","borderImageOutset","MozBorderImageOutset","WebKitBorderImageOutset","MSBorderImageOutset","OBorderImageOutset","borderImageRepeat","MozBorderImageRepeat","WebKitBorderImageRepeat","MSBorderImageRepeat","OBorderImageRepeat","borderImageSlice","MozBorderImageSlice","WebKitBorderImageSlice","MSBorderImageSlice","OBorderImageSlice","borderImageSource","MozBorderImageSource","WebKitBorderImageSource","MSBorderImageSource","OBorderImageSource","borderImageWidth","MozBorderImageWidth","WebKitBorderImageWidth","MSBorderImageWidth","OBorderImageWidth","borderInlineEnd","MozBorderInlineEnd","WebKitBorderInlineEnd","MSBorderInlineEnd","OBorderInlineEnd","borderInlineEndColor","MozBorderInlineEndColor","WebKitBorderInlineEndColor","MSBorderInlineEndColor","OBorderInlineEndColor","borderInlineEndStyle","MozBorderInlineEndStyle","WebKitBorderInlineEndStyle","MSBorderInlineEndStyle","OBorderInlineEndStyle","borderInlineEndWidth","MozBorderInlineEndWidth","WebKitBorderInlineEndWidth","MSBorderInlineEndWidth","OBorderInlineEndWidth","borderInlineStart","MozBorderInlineStart","WebKitBorderInlineStart","MSBorderInlineStart","OBorderInlineStart","borderInlineStartColor","MozBorderInlineStartColor","WebKitBorderInlineStartColor","MSBorderInlineStartColor","OBorderInlineStartColor","borderInlineStartStyle","MozBorderInlineStartStyle","WebKitBorderInlineStartStyle","MSBorderInlineStartStyle","OBorderInlineStartStyle","borderInlineStartWidth","MozBorderInlineStartWidth","WebKitBorderInlineStartWidth","MSBorderInlineStartWidth","OBorderInlineStartWidth","borderLeft","MozBorderLeft","WebKitBorderLeft","MSBorderLeft","OBorderLeft","borderLeftColor","MozBorderLeftColor","WebKitBorderLeftColor","MSBorderLeftColor","OBorderLeftColor","borderLeftStyle","MozBorderLeftStyle","WebKitBorderLeftStyle","MSBorderLeftStyle","OBorderLeftStyle","borderLeftWidth","MozBorderLeftWidth","WebKitBorderLeftWidth","MSBorderLeftWidth","OBorderLeftWidth","borderRadius","MozBorderRadius","WebKitBorderRadius","MSBorderRadius","OBorderRadius","borderRight","MozBorderRight","WebKitBorderRight","MSBorderRight","OBorderRight","borderRightColor","MozBorderRightColor","WebKitBorderRightColor","MSBorderRightColor","OBorderRightColor","borderRightStyle","MozBorderRightStyle","WebKitBorderRightStyle","MSBorderRightStyle","OBorderRightStyle","borderRightWidth","MozBorderRightWidth","WebKitBorderRightWidth","MSBorderRightWidth","OBorderRightWidth","borderSpacing","MozBorderSpacing","WebKitBorderSpacing","MSBorderSpacing","OBorderSpacing","borderStyle","MozBorderStyle","WebKitBorderStyle","MSBorderStyle","OBorderStyle","borderTop","MozBorderTop","WebKitBorderTop","MSBorderTop","OBorderTop","borderTopColor","MozBorderTopColor","WebKitBorderTopColor","MSBorderTopColor","OBorderTopColor","borderTopLeftRadius","MozBorderTopLeftRadius","WebKitBorderTopLeftRadius","MSBorderTopLeftRadius","OBorderTopLeftRadius","borderTopRightRadius","MozBorderTopRightRadius","WebKitBorderTopRightRadius","MSBorderTopRightRadius","OBorderTopRightRadius","borderTopStyle","MozBorderTopStyle","WebKitBorderTopStyle","MSBorderTopStyle","OBorderTopStyle","borderTopWidth","MozBorderTopWidth","WebKitBorderTopWidth","MSBorderTopWidth","OBorderTopWidth","borderWidth","MozBorderWidth","WebKitBorderWidth","MSBorderWidth","OBorderWidth","bottom","MozBottom","WebKitBottom","MSBottom","OBottom","boxDecorationBreak","MozBoxDecorationBreak","WebKitBoxDecorationBreak","MSBoxDecorationBreak","OBoxDecorationBreak","boxShadow","MozBoxShadow","WebKitBoxShadow","MSBoxShadow","OBoxShadow","boxSizing","MozBoxSizing","WebKitBoxSizing","MSBoxSizing","OBoxSizing","breakAfter","MozBreakAfter","WebKitBreakAfter","MSBreakAfter","OBreakAfter","breakBefore","MozBreakBefore","WebKitBreakBefore","MSBreakBefore","OBreakBefore","breakInside","MozBreakInside","WebKitBreakInside","MSBreakInside","OBreakInside","captionSide","MozCaptionSide","WebKitCaptionSide","MSCaptionSide","OCaptionSide","ch","MozCh","WebKitCh","MSCh","OCh","clear","MozClear","WebKitClear","MSClear","OClear","clip","MozClip","WebKitClip","MSClip","OClip","clipPath","MozClipPath","WebKitClipPath","MSClipPath","OClipPath","cm","MozCm","WebKitCm","MSCm","OCm","color","MozColor","WebKitColor","MSColor","OColor","columnCount","MozColumnCount","WebKitColumnCount","MSColumnCount","OColumnCount","columnFill","MozColumnFill","WebKitColumnFill","MSColumnFill","OColumnFill","columnGap","MozColumnGap","WebKitColumnGap","MSColumnGap","OColumnGap","columnRule","MozColumnRule","WebKitColumnRule","MSColumnRule","OColumnRule","columnRuleColor","MozColumnRuleColor","WebKitColumnRuleColor","MSColumnRuleColor","OColumnRuleColor","columnRuleStyle","MozColumnRuleStyle","WebKitColumnRuleStyle","MSColumnRuleStyle","OColumnRuleStyle","columnRuleWidth","MozColumnRuleWidth","WebKitColumnRuleWidth","MSColumnRuleWidth","OColumnRuleWidth","columnSpan","MozColumnSpan","WebKitColumnSpan","MSColumnSpan","OColumnSpan","columnWidth","MozColumnWidth","WebKitColumnWidth","MSColumnWidth","OColumnWidth","columns","MozColumns","WebKitColumns","MSColumns","OColumns","content","MozContent","WebKitContent","MSContent","OContent","counterIncrement","MozCounterIncrement","WebKitCounterIncrement","MSCounterIncrement","OCounterIncrement","counterReset","MozCounterReset","WebKitCounterReset","MSCounterReset","OCounterReset","cursor","MozCursor","WebKitCursor","MSCursor","OCursor","deg","MozDeg","WebKitDeg","MSDeg","ODeg","direction","MozDirection","WebKitDirection","MSDirection","ODirection","display","MozDisplay","WebKitDisplay","MSDisplay","ODisplay","dpcm","MozDpcm","WebKitDpcm","MSDpcm","ODpcm","dpi","MozDpi","WebKitDpi","MSDpi","ODpi","dppx","MozDppx","WebKitDppx","MSDppx","ODppx","em","MozEm","WebKitEm","MSEm","OEm","emptyCells","MozEmptyCells","WebKitEmptyCells","MSEmptyCells","OEmptyCells","ex","MozEx","WebKitEx","MSEx","OEx","filter","MozFilter","WebKitFilter","MSFilter","OFilter","flex","MozFlex","WebKitFlex","MSFlex","OFlex","flexBasis","MozFlexBasis","WebKitFlexBasis","MSFlexBasis","OFlexBasis","flexDirection","MozFlexDirection","WebKitFlexDirection","MSFlexDirection","OFlexDirection","flexFlow","MozFlexFlow","WebKitFlexFlow","MSFlexFlow","OFlexFlow","flexGrow","MozFlexGrow","WebKitFlexGrow","MSFlexGrow","OFlexGrow","flexShrink","MozFlexShrink","WebKitFlexShrink","MSFlexShrink","OFlexShrink","flexWrap","MozFlexWrap","WebKitFlexWrap","MSFlexWrap","OFlexWrap","float","MozFloat","WebKitFloat","MSFloat","OFloat","font","MozFont","WebKitFont","MSFont","OFont","fontFamily","MozFontFamily","WebKitFontFamily","MSFontFamily","OFontFamily","fontFeatureSettings","MozFontFeatureSettings","WebKitFontFeatureSettings","MSFontFeatureSettings","OFontFeatureSettings","fontKerning","MozFontKerning","WebKitFontKerning","MSFontKerning","OFontKerning","fontLanguageOverride","MozFontLanguageOverride","WebKitFontLanguageOverride","MSFontLanguageOverride","OFontLanguageOverride","fontSize","MozFontSize","WebKitFontSize","MSFontSize","OFontSize","fontSizeAdjust","MozFontSizeAdjust","WebKitFontSizeAdjust","MSFontSizeAdjust","OFontSizeAdjust","fontStretch","MozFontStretch","WebKitFontStretch","MSFontStretch","OFontStretch","fontStyle","MozFontStyle","WebKitFontStyle","MSFontStyle","OFontStyle","fontSynthesis","MozFontSynthesis","WebKitFontSynthesis","MSFontSynthesis","OFontSynthesis","fontVariant","MozFontVariant","WebKitFontVariant","MSFontVariant","OFontVariant","fontVariantAlternates","MozFontVariantAlternates","WebKitFontVariantAlternates","MSFontVariantAlternates","OFontVariantAlternates","fontVariantCaps","MozFontVariantCaps","WebKitFontVariantCaps","MSFontVariantCaps","OFontVariantCaps","fontVariantEastAsian","MozFontVariantEastAsian","WebKitFontVariantEastAsian","MSFontVariantEastAsian","OFontVariantEastAsian","fontVariantLigatures","MozFontVariantLigatures","WebKitFontVariantLigatures","MSFontVariantLigatures","OFontVariantLigatures","fontVariantNumeric","MozFontVariantNumeric","WebKitFontVariantNumeric","MSFontVariantNumeric","OFontVariantNumeric","fontVariantPosition","MozFontVariantPosition","WebKitFontVariantPosition","MSFontVariantPosition","OFontVariantPosition","fontWeight","MozFontWeight","WebKitFontWeight","MSFontWeight","OFontWeight","grad","MozGrad","WebKitGrad","MSGrad","OGrad","grid","MozGrid","WebKitGrid","MSGrid","OGrid","gridArea","MozGridArea","WebKitGridArea","MSGridArea","OGridArea","gridAutoColumns","MozGridAutoColumns","WebKitGridAutoColumns","MSGridAutoColumns","OGridAutoColumns","gridAutoFlow","MozGridAutoFlow","WebKitGridAutoFlow","MSGridAutoFlow","OGridAutoFlow","gridAutoRows","MozGridAutoRows","WebKitGridAutoRows","MSGridAutoRows","OGridAutoRows","gridColumn","MozGridColumn","WebKitGridColumn","MSGridColumn","OGridColumn","gridColumnEnd","MozGridColumnEnd","WebKitGridColumnEnd","MSGridColumnEnd","OGridColumnEnd","gridColumnGap","MozGridColumnGap","WebKitGridColumnGap","MSGridColumnGap","OGridColumnGap","gridColumnStart","MozGridColumnStart","WebKitGridColumnStart","MSGridColumnStart","OGridColumnStart","gridGap","MozGridGap","WebKitGridGap","MSGridGap","OGridGap","gridRow","MozGridRow","WebKitGridRow","MSGridRow","OGridRow","gridRowEnd","MozGridRowEnd","WebKitGridRowEnd","MSGridRowEnd","OGridRowEnd","gridRowGap","MozGridRowGap","WebKitGridRowGap","MSGridRowGap","OGridRowGap","gridRowStart","MozGridRowStart","WebKitGridRowStart","MSGridRowStart","OGridRowStart","gridTemplate","MozGridTemplate","WebKitGridTemplate","MSGridTemplate","OGridTemplate","gridTemplateAreas","MozGridTemplateAreas","WebKitGridTemplateAreas","MSGridTemplateAreas","OGridTemplateAreas","gridTemplateColumns","MozGridTemplateColumns","WebKitGridTemplateColumns","MSGridTemplateColumns","OGridTemplateColumns","gridTemplateRows","MozGridTemplateRows","WebKitGridTemplateRows","MSGridTemplateRows","OGridTemplateRows","height","MozHeight","WebKitHeight","MSHeight","OHeight","hyphens","MozHyphens","WebKitHyphens","MSHyphens","OHyphens","hz","MozHz","WebKitHz","MSHz","OHz","imageOrientation","MozImageOrientation","WebKitImageOrientation","MSImageOrientation","OImageOrientation","imageRendering","MozImageRendering","WebKitImageRendering","MSImageRendering","OImageRendering","imageResolution","MozImageResolution","WebKitImageResolution","MSImageResolution","OImageResolution","imeMode","MozImeMode","WebKitImeMode","MSImeMode","OImeMode","in","MozIn","WebKitIn","MSIn","OIn","inherit","MozInherit","WebKitInherit","MSInherit","OInherit","initial","MozInitial","WebKitInitial","MSInitial","OInitial","inlineSize","MozInlineSize","WebKitInlineSize","MSInlineSize","OInlineSize","isolation","MozIsolation","WebKitIsolation","MSIsolation","OIsolation","justifyContent","MozJustifyContent","WebKitJustifyContent","MSJustifyContent","OJustifyContent","khz","MozKhz","WebKitKhz","MSKhz","OKhz","left","MozLeft","WebKitLeft","MSLeft","OLeft","letterSpacing","MozLetterSpacing","WebKitLetterSpacing","MSLetterSpacing","OLetterSpacing","lineBreak","MozLineBreak","WebKitLineBreak","MSLineBreak","OLineBreak","lineHeight","MozLineHeight","WebKitLineHeight","MSLineHeight","OLineHeight","listStyle","MozListStyle","WebKitListStyle","MSListStyle","OListStyle","listStyleImage","MozListStyleImage","WebKitListStyleImage","MSListStyleImage","OListStyleImage","listStylePosition","MozListStylePosition","WebKitListStylePosition","MSListStylePosition","OListStylePosition","listStyleType","MozListStyleType","WebKitListStyleType","MSListStyleType","OListStyleType","margin","MozMargin","WebKitMargin","MSMargin","OMargin","marginBlockEnd","MozMarginBlockEnd","WebKitMarginBlockEnd","MSMarginBlockEnd","OMarginBlockEnd","marginBlockStart","MozMarginBlockStart","WebKitMarginBlockStart","MSMarginBlockStart","OMarginBlockStart","marginBottom","MozMarginBottom","WebKitMarginBottom","MSMarginBottom","OMarginBottom","marginInlineEnd","MozMarginInlineEnd","WebKitMarginInlineEnd","MSMarginInlineEnd","OMarginInlineEnd","marginInlineStart","MozMarginInlineStart","WebKitMarginInlineStart","MSMarginInlineStart","OMarginInlineStart","marginLeft","MozMarginLeft","WebKitMarginLeft","MSMarginLeft","OMarginLeft","marginRight","MozMarginRight","WebKitMarginRight","MSMarginRight","OMarginRight","marginTop","MozMarginTop","WebKitMarginTop","MSMarginTop","OMarginTop","mask","MozMask","WebKitMask","MSMask","OMask","maskClip","MozMaskClip","WebKitMaskClip","MSMaskClip","OMaskClip","maskComposite","MozMaskComposite","WebKitMaskComposite","MSMaskComposite","OMaskComposite","maskImage","MozMaskImage","WebKitMaskImage","MSMaskImage","OMaskImage","maskMode","MozMaskMode","WebKitMaskMode","MSMaskMode","OMaskMode","maskOrigin","MozMaskOrigin","WebKitMaskOrigin","MSMaskOrigin","OMaskOrigin","maskPosition","MozMaskPosition","WebKitMaskPosition","MSMaskPosition","OMaskPosition","maskRepeat","MozMaskRepeat","WebKitMaskRepeat","MSMaskRepeat","OMaskRepeat","maskSize","MozMaskSize","WebKitMaskSize","MSMaskSize","OMaskSize","maskType","MozMaskType","WebKitMaskType","MSMaskType","OMaskType","maxBlockSize","MozMaxBlockSize","WebKitMaxBlockSize","MSMaxBlockSize","OMaxBlockSize","maxHeight","MozMaxHeight","WebKitMaxHeight","MSMaxHeight","OMaxHeight","maxInlineSize","MozMaxInlineSize","WebKitMaxInlineSize","MSMaxInlineSize","OMaxInlineSize","maxWidth","MozMaxWidth","WebKitMaxWidth","MSMaxWidth","OMaxWidth","minBlockSize","MozMinBlockSize","WebKitMinBlockSize","MSMinBlockSize","OMinBlockSize","minHeight","MozMinHeight","WebKitMinHeight","MSMinHeight","OMinHeight","minInlineSize","MozMinInlineSize","WebKitMinInlineSize","MSMinInlineSize","OMinInlineSize","minWidth","MozMinWidth","WebKitMinWidth","MSMinWidth","OMinWidth","mixBlendMode","MozMixBlendMode","WebKitMixBlendMode","MSMixBlendMode","OMixBlendMode","mm","MozMm","WebKitMm","MSMm","OMm","ms","MozMs","WebKitMs","MSMs","OMs","objectFit","MozObjectFit","WebKitObjectFit","MSObjectFit","OObjectFit","objectPosition","MozObjectPosition","WebKitObjectPosition","MSObjectPosition","OObjectPosition","offsetBlockEnd","MozOffsetBlockEnd","WebKitOffsetBlockEnd","MSOffsetBlockEnd","OOffsetBlockEnd","offsetBlockStart","MozOffsetBlockStart","WebKitOffsetBlockStart","MSOffsetBlockStart","OOffsetBlockStart","offsetInlineEnd","MozOffsetInlineEnd","WebKitOffsetInlineEnd","MSOffsetInlineEnd","OOffsetInlineEnd","offsetInlineStart","MozOffsetInlineStart","WebKitOffsetInlineStart","MSOffsetInlineStart","OOffsetInlineStart","opacity","MozOpacity","WebKitOpacity","MSOpacity","OOpacity","order","MozOrder","WebKitOrder","MSOrder","OOrder","orphans","MozOrphans","WebKitOrphans","MSOrphans","OOrphans","outline","MozOutline","WebKitOutline","MSOutline","OOutline","outlineColor","MozOutlineColor","WebKitOutlineColor","MSOutlineColor","OOutlineColor","outlineOffset","MozOutlineOffset","WebKitOutlineOffset","MSOutlineOffset","OOutlineOffset","outlineStyle","MozOutlineStyle","WebKitOutlineStyle","MSOutlineStyle","OOutlineStyle","outlineWidth","MozOutlineWidth","WebKitOutlineWidth","MSOutlineWidth","OOutlineWidth","overflow","MozOverflow","WebKitOverflow","MSOverflow","OOverflow","overflowWrap","MozOverflowWrap","WebKitOverflowWrap","MSOverflowWrap","OOverflowWrap","overflowX","MozOverflowX","WebKitOverflowX","MSOverflowX","OOverflowX","overflowY","MozOverflowY","WebKitOverflowY","MSOverflowY","OOverflowY","padding","MozPadding","WebKitPadding","MSPadding","OPadding","paddingBlockEnd","MozPaddingBlockEnd","WebKitPaddingBlockEnd","MSPaddingBlockEnd","OPaddingBlockEnd","paddingBlockStart","MozPaddingBlockStart","WebKitPaddingBlockStart","MSPaddingBlockStart","OPaddingBlockStart","paddingBottom","MozPaddingBottom","WebKitPaddingBottom","MSPaddingBottom","OPaddingBottom","paddingInlineEnd","MozPaddingInlineEnd","WebKitPaddingInlineEnd","MSPaddingInlineEnd","OPaddingInlineEnd","paddingInlineStart","MozPaddingInlineStart","WebKitPaddingInlineStart","MSPaddingInlineStart","OPaddingInlineStart","paddingLeft","MozPaddingLeft","WebKitPaddingLeft","MSPaddingLeft","OPaddingLeft","paddingRight","MozPaddingRight","WebKitPaddingRight","MSPaddingRight","OPaddingRight","paddingTop","MozPaddingTop","WebKitPaddingTop","MSPaddingTop","OPaddingTop","pageBreakAfter","MozPageBreakAfter","WebKitPageBreakAfter","MSPageBreakAfter","OPageBreakAfter","pageBreakBefore","MozPageBreakBefore","WebKitPageBreakBefore","MSPageBreakBefore","OPageBreakBefore","pageBreakInside","MozPageBreakInside","WebKitPageBreakInside","MSPageBreakInside","OPageBreakInside","pc","MozPc","WebKitPc","MSPc","OPc","perspective","MozPerspective","WebKitPerspective","MSPerspective","OPerspective","perspectiveOrigin","MozPerspectiveOrigin","WebKitPerspectiveOrigin","MSPerspectiveOrigin","OPerspectiveOrigin","pointerEvents","MozPointerEvents","WebKitPointerEvents","MSPointerEvents","OPointerEvents","position","MozPosition","WebKitPosition","MSPosition","OPosition","pt","MozPt","WebKitPt","MSPt","OPt","px","MozPx","WebKitPx","MSPx","OPx","q","MozQ","WebKitQ","MSQ","OQ","quotes","MozQuotes","WebKitQuotes","MSQuotes","OQuotes","rad","MozRad","WebKitRad","MSRad","ORad","rem","MozRem","WebKitRem","MSRem","ORem","resize","MozResize","WebKitResize","MSResize","OResize","revert","MozRevert","WebKitRevert","MSRevert","ORevert","right","MozRight","WebKitRight","MSRight","ORight","rubyAlign","MozRubyAlign","WebKitRubyAlign","MSRubyAlign","ORubyAlign","rubyMerge","MozRubyMerge","WebKitRubyMerge","MSRubyMerge","ORubyMerge","rubyPosition","MozRubyPosition","WebKitRubyPosition","MSRubyPosition","ORubyPosition","s","MozS","WebKitS","MSS","OS","scrollBehavior","MozScrollBehavior","WebKitScrollBehavior","MSScrollBehavior","OScrollBehavior","scrollSnapCoordinate","MozScrollSnapCoordinate","WebKitScrollSnapCoordinate","MSScrollSnapCoordinate","OScrollSnapCoordinate","scrollSnapDestination","MozScrollSnapDestination","WebKitScrollSnapDestination","MSScrollSnapDestination","OScrollSnapDestination","scrollSnapType","MozScrollSnapType","WebKitScrollSnapType","MSScrollSnapType","OScrollSnapType","shapeImageThreshold","MozShapeImageThreshold","WebKitShapeImageThreshold","MSShapeImageThreshold","OShapeImageThreshold","shapeMargin","MozShapeMargin","WebKitShapeMargin","MSShapeMargin","OShapeMargin","shapeOutside","MozShapeOutside","WebKitShapeOutside","MSShapeOutside","OShapeOutside","tabSize","MozTabSize","WebKitTabSize","MSTabSize","OTabSize","tableLayout","MozTableLayout","WebKitTableLayout","MSTableLayout","OTableLayout","textAlign","MozTextAlign","WebKitTextAlign","MSTextAlign","OTextAlign","textAlignLast","MozTextAlignLast","WebKitTextAlignLast","MSTextAlignLast","OTextAlignLast","textCombineUpright","MozTextCombineUpright","WebKitTextCombineUpright","MSTextCombineUpright","OTextCombineUpright","textDecoration","MozTextDecoration","WebKitTextDecoration","MSTextDecoration","OTextDecoration","textDecorationColor","MozTextDecorationColor","WebKitTextDecorationColor","MSTextDecorationColor","OTextDecorationColor","textDecorationLine","MozTextDecorationLine","WebKitTextDecorationLine","MSTextDecorationLine","OTextDecorationLine","textDecorationStyle","MozTextDecorationStyle","WebKitTextDecorationStyle","MSTextDecorationStyle","OTextDecorationStyle","textEmphasis","MozTextEmphasis","WebKitTextEmphasis","MSTextEmphasis","OTextEmphasis","textEmphasisColor","MozTextEmphasisColor","WebKitTextEmphasisColor","MSTextEmphasisColor","OTextEmphasisColor","textEmphasisPosition","MozTextEmphasisPosition","WebKitTextEmphasisPosition","MSTextEmphasisPosition","OTextEmphasisPosition","textEmphasisStyle","MozTextEmphasisStyle","WebKitTextEmphasisStyle","MSTextEmphasisStyle","OTextEmphasisStyle","textIndent","MozTextIndent","WebKitTextIndent","MSTextIndent","OTextIndent","textOrientation","MozTextOrientation","WebKitTextOrientation","MSTextOrientation","OTextOrientation","textOverflow","MozTextOverflow","WebKitTextOverflow","MSTextOverflow","OTextOverflow","textRendering","MozTextRendering","WebKitTextRendering","MSTextRendering","OTextRendering","textShadow","MozTextShadow","WebKitTextShadow","MSTextShadow","OTextShadow","textTransform","MozTextTransform","WebKitTextTransform","MSTextTransform","OTextTransform","textUnderlinePosition","MozTextUnderlinePosition","WebKitTextUnderlinePosition","MSTextUnderlinePosition","OTextUnderlinePosition","top","MozTop","WebKitTop","MSTop","OTop","touchAction","MozTouchAction","WebKitTouchAction","MSTouchAction","OTouchAction","transform","MozTransform","WebKitTransform","MSTransform","OTransform","transformBox","MozTransformBox","WebKitTransformBox","MSTransformBox","OTransformBox","transformOrigin","MozTransformOrigin","WebKitTransformOrigin","MSTransformOrigin","OTransformOrigin","transformStyle","MozTransformStyle","WebKitTransformStyle","MSTransformStyle","OTransformStyle","transition","MozTransition","WebKitTransition","MSTransition","OTransition","transitionDelay","MozTransitionDelay","WebKitTransitionDelay","MSTransitionDelay","OTransitionDelay","transitionDuration","MozTransitionDuration","WebKitTransitionDuration","MSTransitionDuration","OTransitionDuration","transitionProperty","MozTransitionProperty","WebKitTransitionProperty","MSTransitionProperty","OTransitionProperty","transitionTimingFunction","MozTransitionTimingFunction","WebKitTransitionTimingFunction","MSTransitionTimingFunction","OTransitionTimingFunction","turn","MozTurn","WebKitTurn","MSTurn","OTurn","unicodeBidi","MozUnicodeBidi","WebKitUnicodeBidi","MSUnicodeBidi","OUnicodeBidi","unset","MozUnset","WebKitUnset","MSUnset","OUnset","verticalAlign","MozVerticalAlign","WebKitVerticalAlign","MSVerticalAlign","OVerticalAlign","vh","MozVh","WebKitVh","MSVh","OVh","visibility","MozVisibility","WebKitVisibility","MSVisibility","OVisibility","vmax","MozVmax","WebKitVmax","MSVmax","OVmax","vmin","MozVmin","WebKitVmin","MSVmin","OVmin","vw","MozVw","WebKitVw","MSVw","OVw","whiteSpace","MozWhiteSpace","WebKitWhiteSpace","MSWhiteSpace","OWhiteSpace","widows","MozWidows","WebKitWidows","MSWidows","OWidows","width","MozWidth","WebKitWidth","MSWidth","OWidth","willChange","MozWillChange","WebKitWillChange","MSWillChange","OWillChange","wordBreak","MozWordBreak","WebKitWordBreak","MSWordBreak","OWordBreak","wordSpacing","MozWordSpacing","WebKitWordSpacing","MSWordSpacing","OWordSpacing","wordWrap","MozWordWrap","WebKitWordWrap","MSWordWrap","OWordWrap","writingMode","MozWritingMode","WebKitWritingMode","MSWritingMode","OWritingMode","zIndex","MozZIndex","WebKitZIndex","MSZIndex","OZIndex","fontSize","MozFontSize","WebKitFontSize","MSFontSize","OFontSize"]; +},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t=0&&_.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function u(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function c(e,t){var n,r,i;if(t.singleton){var o=g++;n=y||(y=s(t)),r=l.bind(null,n,o,!1),i=l.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),r=f.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=p.bind(null,n),i=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function l(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function p(e,t){var n=t.css,r=t.media;t.sourceMap;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function f(e,t){var n=t.css,r=(t.media,t.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var h={},d=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=d(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,g=0,_=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=i(e);return r(n,t),function(e){for(var o=[],a=0;a=400?(a.updateLoadingStatus("failed"),i.newThrownErr(new Error(t.statusText+" "+e))):(a.updateLoadingStatus("success"),a.updateSpec(t.text),void a.updateUrl(e))}var i=n.errActions,o=n.specSelectors,a=n.specActions,s=t.fetch;e=e||o.url(),a.updateLoadingStatus("loading"),s({url:e,loadSpec:!0,credentials:"same-origin",headers:{Accept:"application/json,*/*"}}).then(r,r)}},updateLoadingStatus:function(e){var t=[null,"loading","failed","success","failedConfig"];return t.indexOf(e)===-1&&console.error("Error: "+e+" is not one of "+(0,a.default)(t)),{type:"spec_update_loading_status",payload:e}}},r={spec_update_loading_status:function(e,t){return"string"==typeof t.payload?e.set("loadingStatus",t.payload):e}},i={loadingStatus:(0,s.createSelector)(function(e){return e||(0,u.Map)()},function(e){return e.get("loadingStatus")||null})};return{statePlugins:{spec:{actions:n,reducers:r,selectors:i}}}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(57),a=r(o);t.default=i;var s=n(430),u=n(168)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(486),o=r(i),a=n(145),s=r(a),u=n(146),c=r(u),l=n(489),p=r(l),f=n(490),h=r(f),d=n(498),m=r(d),v=function(e){function t(){return(0,s.default)(this,t),(0,p.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),(0,c.default)(t,[{key:"getLayout",value:function(){var e=this.props,t=e.getComponent,n=e.layoutSelectors,r=n.current(),i=t(r,!0);return i?i:function(){return m.default.createElement("h1",null,' No layout defined for "',r,'" ')}}},{key:"render",value:function(){var e=this.getLayout();return m.default.createElement(e,null)}}]),t}(m.default.Component);t.default=v,v.propTypes={getComponent:d.PropTypes.func.isRequired,layoutSelectors:d.PropTypes.object.isRequired},v.defaultProps={}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(486),o=r(i),a=n(145),s=r(a),u=n(146),c=r(u),l=n(489),p=r(l),f=n(490),h=r(f),d=n(498),m=r(d),v=function(e){function t(){var e,n,r,i;(0,s.default)(this,t);for(var a=arguments.length,u=Array(a),c=0;c6?s-6:0),c=6;c5?c-5:0),p=5;p5?a-5:0),u=5;u key("+l[p]+")"].concat(s));if(h instanceof Error)return h}}return i(t)}function u(e){return a(e,"List",b.List.isList)}function c(e,t,n,r){function o(){for(var i=arguments.length,o=Array(i),u=0;u5?s-5:0),c=5;c5?c-5:0),p=5;p>",w={listOf:u,mapOf:l,orderedMapOf:p,setOf:f,orderedSetOf:h,stackOf:d,iterableOf:m,recordOf:v,shape:g,contains:g,mapContains:_,list:o("List",b.List.isList),map:o("Map",b.Map.isMap),orderedMap:o("OrderedMap",b.OrderedMap.isOrderedMap),set:o("Set",b.Set.isSet),orderedSet:o("OrderedSet",b.OrderedSet.isOrderedSet),stack:o("Stack",b.Stack.isStack),seq:o("Seq",b.Seq.isSeq),record:o("Record",function(e){return e instanceof b.Record}),iterable:o("Iterable",b.Iterable.isIterable)};e.exports=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(137),o=r(i),a=n(486),s=r(a),u=n(145),c=r(u),l=n(146),p=r(l),f=n(489),h=r(f),d=n(490),m=r(d),v=n(498),y=r(v),g=n(1015),_=r(g),b=function(e){function t(e,n){(0,c.default)(this,t);var r=(0,h.default)(this,(t.__proto__||(0,s.default)(t)).call(this,e,n));return r.onAuthChange=function(e){var t=e.name;r.setState((0,o.default)({},t,e))},r.submitAuth=function(e){e.preventDefault();var t=r.props.authActions;t.authorize(r.state)},r.logoutClick=function(e){e.preventDefault();var t=r.props,n=t.authActions,i=t.definitions,o=i.map(function(e,t){return t}).toArray();n.logout(o)},r.state={},r}return(0,m.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.definitions,r=t.getComponent,i=t.authSelectors,o=t.errSelectors,a=r("apiKeyAuth"),s=r("basicAuth"),u=r("oauth2",!0),c=r("Button"),l=i.authorized(),p=n.filter(function(e,t){return!!l.get(t)}),f=n.filter(function(e){return"oauth2"!==e.get("type")}),h=n.filter(function(e){return"oauth2"===e.get("type")});return y.default.createElement("div",{className:"auth-container"},!!f.size&&y.default.createElement("form",{onSubmit:this.submitAuth},f.map(function(t,n){var i=t.get("type"),u=void 0;switch(i){case"apiKey":u=y.default.createElement(a,{key:n,schema:t,name:n,errSelectors:o,authorized:l,getComponent:r,onChange:e.onAuthChange});break;case"basic":u=y.default.createElement(s,{key:n,schema:t,name:n,errSelectors:o,authorized:l,getComponent:r,onChange:e.onAuthChange});break;default:u=y.default.createElement("div",{key:n},"Unknown security definition type ",i)}return y.default.createElement("div",{key:n+"-jump"},u)}).toArray(),y.default.createElement("div",{className:"auth-btn-wrapper"},f.size===p.size?y.default.createElement(c,{className:"btn modal-btn auth",onClick:this.logoutClick},"Logout"):y.default.createElement(c,{type:"submit",className:"btn modal-btn auth authorize"},"Authorize"))),h&&h.size?y.default.createElement("div",null,y.default.createElement("div",{className:"scope-def"},y.default.createElement("p",null,"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes."),y.default.createElement("p",null,"API requires the following scopes. Select which ones you want to grant to Swagger UI.")),n.filter(function(e){return"oauth2"===e.get("type")}).map(function(e,t){return y.default.createElement("div",{key:t},y.default.createElement(u,{authorized:l,schema:e,name:t}))}).toArray()):null)}}]),t}(y.default.Component);b.propTypes={definitions:v.PropTypes.object.isRequired,getComponent:v.PropTypes.func.isRequired,authSelectors:v.PropTypes.object.isRequired,authActions:v.PropTypes.object.isRequired,specSelectors:v.PropTypes.object.isRequired},b.propTypes={errSelectors:v.PropTypes.object.isRequired,getComponent:v.PropTypes.func.isRequired,authSelectors:v.PropTypes.object.isRequired,specSelectors:v.PropTypes.object.isRequired,authActions:v.PropTypes.object.isRequired,definitions:_.default.iterable.isRequired},t.default=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(486),o=r(i),a=n(145),s=r(a),u=n(146),c=r(u),l=n(489),p=r(l),f=n(490),h=r(f),d=n(498),m=r(d),v=function(e){function t(){return(0,s.default)(this,t),(0,p.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),(0,c.default)(t,[{key:"render",value:function(){var e=this.props.error,t=e.get("level"),n=e.get("message"),r=e.get("source");return m.default.createElement("div",{className:"errors",style:{backgroundColor:"#ffeeee",color:"red",margin:"1em"}},m.default.createElement("b",{style:{textTransform:"capitalize",marginRight:"1em"}},r," ",t),m.default.createElement("span",null,n))}}]),t}(m.default.Component);v.propTypes={error:d.PropTypes.object.isRequired},t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(141),o=r(i),a=n(486),s=r(a),u=n(145),c=r(u),l=n(146),p=r(l),f=n(489),h=r(f),d=n(490),m=r(d),v=n(498),y=r(v),g=function(e){function t(e,n){(0,c.default)(this,t);var r=(0,h.default)(this,(t.__proto__||(0,s.default)(t)).call(this,e,n));_.call(r);var i=r.props,o=i.name,a=i.schema,u=r.getValue();return r.state={name:o,schema:a,value:u},r}return(0,m.default)(t,e),(0,p.default)(t,[{key:"getValue",value:function(){var e=this.props,t=e.name,n=e.authorized;return n&&n.getIn([t,"value"])}},{key:"render",value:function(){var e=this.props,t=e.schema,n=e.getComponent,r=e.errSelectors,i=e.name,o=n("Input"),a=n("Row"),s=n("Col"),u=n("authError"),c=n("Markdown"),l=n("JumpToPath",!0),p=this.getValue(),f=r.allErrors().filter(function(e){return e.get("authId")===i});return y.default.createElement("div",null,y.default.createElement("h4",null,"Api key authorization",y.default.createElement(l,{path:["securityDefinitions",i]})),p&&y.default.createElement("h6",null,"Authorized"),y.default.createElement(a,null,y.default.createElement(c,{source:t.get("description")})),y.default.createElement(a,null,y.default.createElement("p",null,"Name: ",y.default.createElement("code",null,t.get("name")))),y.default.createElement(a,null,y.default.createElement("p",null,"In: ",y.default.createElement("code",null,t.get("in")))),y.default.createElement(a,null,y.default.createElement("label",null,"Value:"),p?y.default.createElement("code",null," ****** "):y.default.createElement(s,null,y.default.createElement(o,{type:"text",onChange:this.onChange}))),f.valueSeq().map(function(e,t){return y.default.createElement(u,{error:e,key:t})}))}}]),t}(y.default.Component);g.propTypes={authorized:v.PropTypes.object,getComponent:v.PropTypes.func.isRequired,errSelectors:v.PropTypes.object.isRequired,schema:v.PropTypes.object.isRequired,name:v.PropTypes.string.isRequired,onChange:v.PropTypes.func};var _=function(){var e=this;this.onChange=function(t){var n=e.props.onChange,r=t.target.value,i=(0,o.default)({},e.state,{value:r});e.setState(i),n(i)}};t.default=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(486),o=r(i),a=n(145),s=r(a),u=n(146),c=r(u),l=n(489),p=r(l),f=n(490),h=r(f),d=n(498),m=r(d),v=n(1015),y=r(v),g=function(e){function t(e,n){(0,s.default)(this,t);var r=(0,p.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e,n));_.call(r);var i=r.props,a=i.schema,u=i.name,c=r.getValue(),l=c.username;return r.state={name:u,schema:a,value:l?{username:l}:{}},r}return(0,h.default)(t,e),(0,c.default)(t,[{key:"getValue",value:function(){var e=this.props,t=e.authorized,n=e.name;return t&&t.getIn([n,"value"])||{}}},{key:"render",value:function(){var e=this.props,t=e.schema,n=e.getComponent,r=e.name,i=e.errSelectors,o=n("Input"),a=n("Row"),s=n("Col"),u=n("authError"),c=n("JumpToPath",!0),l=n("Markdown"),p=this.getValue().username,f=i.allErrors().filter(function(e){return e.get("authId")===r});return m.default.createElement("div",null,m.default.createElement("h4",null,"Basic authorization",m.default.createElement(c,{path:["securityDefinitions",r]})),p&&m.default.createElement("h6",null,"Authorized"),m.default.createElement(a,null,m.default.createElement(l,{source:t.get("description")})),m.default.createElement(a,null,m.default.createElement("label",null,"Username:"),p?m.default.createElement("code",null," ",p," "):m.default.createElement(s,null,m.default.createElement(o,{type:"text",required:"required",name:"username",onChange:this.onChange}))),m.default.createElement(a,null,m.default.createElement("label",null,"Password:"),p?m.default.createElement("code",null," ****** "):m.default.createElement(s,null,m.default.createElement(o,{required:"required",autoComplete:"new-password",name:"password",type:"password",onChange:this.onChange}))),f.valueSeq().map(function(e,t){return m.default.createElement(u,{error:e,key:t})}))}}]),t}(m.default.Component);g.propTypes={authorized:d.PropTypes.object,getComponent:d.PropTypes.func.isRequired,schema:d.PropTypes.object.isRequired,onChange:d.PropTypes.func.isRequired},g.propTypes={name:d.PropTypes.string.isRequired,errSelectors:d.PropTypes.object.isRequired,getComponent:d.PropTypes.func.isRequired,onChange:d.PropTypes.func,schema:y.default.map,authorized:y.default.map};var _=function(){var e=this;this.onChange=function(t){var n=e.props.onChange,r=t.target,i=r.value,o=r.name,a=e.state.value;a[o]=i,e.setState({value:a}),n(e.state)}};t.default=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(137),o=r(i),a=n(486),s=r(a),u=n(145),c=r(u),l=n(146),p=r(l),f=n(489),h=r(f),d=n(490),m=r(d),v=n(498),y=r(v),g=n(1021),_=r(g),b="implicit",x="accessCode",w="password",k="application",S=function(e){function t(e,n){(0,c.default)(this,t);var r=(0,h.default)(this,(t.__proto__||(0,s.default)(t)).call(this,e,n));E.call(r);var i=r.props,o=i.name,a=i.schema,u=i.authorized,l=i.authSelectors,p=u&&u.get(o),f=l.getConfigs()||{},d=p&&p.get("username")||"",m=p&&p.get("clientId")||f.clientId||"",v=p&&p.get("clientSecret")||f.clientSecret||"",y=p&&p.get("passwordType")||"request-body";return r.state={appName:f.appName,name:o,schema:a,scopes:[],clientId:m,clientSecret:v,username:d,password:"",passwordType:y},r}return(0,m.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.schema,r=t.getComponent,i=t.authSelectors,o=t.errSelectors,a=t.name,s=r("Input"),u=r("Row"),c=r("Col"),l=r("Button"),p=r("authError"),f=r("JumpToPath",!0),h=r("Markdown"),d=n.get("flow"),m=n.get("allowedScopes")||n.get("scopes"),v=i.authorized().get(a),g=!!v,_=o.allErrors().filter(function(e){return e.get("authId")===a}),S=!_.filter(function(e){return"validation"===e.get("source")}).size,E=n.get("description");return y.default.createElement("div",null,y.default.createElement("h4",null,"OAuth2.0 ",y.default.createElement(f,{path:["securityDefinitions",a]})),this.state.appName?y.default.createElement("h5",null,"Application: ",this.state.appName," "):null,E&&y.default.createElement(h,{source:n.get("description")}),g&&y.default.createElement("h6",null,"Authorized"),(d===b||d===x)&&y.default.createElement("p",null,"Authorization URL: ",y.default.createElement("code",null,n.get("authorizationUrl"))),(d===w||d===x||d===k)&&y.default.createElement("p",null,"Token URL:",y.default.createElement("code",null," ",n.get("tokenUrl"))),y.default.createElement("p",{className:"flow"},"Flow: ",y.default.createElement("code",null,n.get("flow"))),d!==w?null:y.default.createElement(u,null,y.default.createElement(u,null,y.default.createElement("label",{htmlFor:"oauth_username"},"username:"),g?y.default.createElement("code",null," ",this.state.username," "):y.default.createElement(c,{tablet:10,desktop:10},y.default.createElement("input",{id:"oauth_username",type:"text","data-name":"username",onChange:this.onInputChange}))),y.default.createElement(u,null,y.default.createElement("label",{htmlFor:"oauth_password"},"password:"),g?y.default.createElement("code",null," ****** "):y.default.createElement(c,{tablet:10,desktop:10},y.default.createElement("input",{id:"oauth_password",type:"password","data-name":"password",onChange:this.onInputChange}))),y.default.createElement(u,null,y.default.createElement("label",{htmlFor:"password_type"},"type:"),g?y.default.createElement("code",null," ",this.state.passwordType," "):y.default.createElement(c,{tablet:10,desktop:10},y.default.createElement("select",{id:"password_type","data-name":"passwordType",onChange:this.onInputChange},y.default.createElement("option",{value:"request-body"},"Request body"),y.default.createElement("option",{value:"basic"},"Basic auth"),y.default.createElement("option",{value:"query"},"Query parameters"))))),(d===k||d===b||d===x||d===w&&"basic"!==this.state.passwordType)&&(!g||g&&this.state.clientId)&&y.default.createElement(u,null,y.default.createElement("label",{htmlFor:"client_id"},"client_id:"),g?y.default.createElement("code",null," ****** "):y.default.createElement(c,{tablet:10,desktop:10},y.default.createElement("input",{id:"client_id",type:"text",required:d===w,value:this.state.clientId,"data-name":"clientId",onChange:this.onInputChange}))),(d===k||d===x||d===w&&"basic"!==this.state.passwordType)&&y.default.createElement(u,null,y.default.createElement("label",{htmlFor:"client_secret"},"client_secret:"),g?y.default.createElement("code",null," ****** "):y.default.createElement(c,{tablet:10,desktop:10},y.default.createElement("input",{id:"client_secret",value:this.state.clientSecret,type:"text","data-name":"clientSecret",onChange:this.onInputChange}))),!g&&m&&m.size?y.default.createElement("div",{className:"scopes"},y.default.createElement("h2",null,"Scopes:"),m.map(function(t,n){return y.default.createElement(u,{key:n},y.default.createElement("div",{className:"checkbox"},y.default.createElement(s,{"data-value":n,id:n+"-checkbox-"+e.state.name,disabled:g,type:"checkbox",onChange:e.onScopeChange}),y.default.createElement("label",{htmlFor:n+"-checkbox-"+e.state.name},y.default.createElement("span",{className:"item"}),y.default.createElement("div",{className:"text"},y.default.createElement("p",{className:"name" +},n),y.default.createElement("p",{className:"description"},t)))))}).toArray()):null,_.valueSeq().map(function(e,t){return y.default.createElement(p,{error:e,key:t})}),y.default.createElement("div",{className:"auth-btn-wrapper"},S&&(g?y.default.createElement(l,{className:"btn modal-btn auth authorize",onClick:this.logout},"Logout"):y.default.createElement(l,{className:"btn modal-btn auth authorize",onClick:this.authorize},"Authorize"))))}}]),t}(y.default.Component);S.propTypes={name:v.PropTypes.string,authorized:v.PropTypes.object,getComponent:v.PropTypes.func.isRequired,schema:v.PropTypes.object.isRequired,authSelectors:v.PropTypes.object.isRequired,authActions:v.PropTypes.object.isRequired,errSelectors:v.PropTypes.object.isRequired,errActions:v.PropTypes.object.isRequired,getConfigs:v.PropTypes.any};var E=function(){var e=this;this.authorize=function(){var t=e.props,n=t.authActions,r=t.errActions,i=t.getConfigs,o=t.authSelectors,a=i(),s=o.getConfigs();r.clear({authId:name,type:"auth",source:"auth"}),(0,_.default)({auth:e.state,authActions:n,errActions:r,configs:a,authConfigs:s})},this.onScopeChange=function(t){var n=t.target,r=n.checked,i=n.dataset.value;if(r&&e.state.scopes.indexOf(i)===-1){var o=e.state.scopes.concat([i]);e.setState({scopes:o})}else!r&&e.state.scopes.indexOf(i)>-1&&e.setState({scopes:e.state.scopes.filter(function(e){return e!==i})})},this.onInputChange=function(t){var n=t.target,r=n.dataset.name,i=n.value,a=(0,o.default)({},r,i);e.setState(a)},this.logout=function(t){t.preventDefault();var n=e.props,r=n.authActions,i=n.errActions,o=n.name;i.clear({authId:o,type:"auth",source:"auth"}),r.logout([o])}};t.default=S},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.auth,n=e.authActions,r=e.errActions,i=e.configs,o=e.authConfigs,u=void 0===o?{}:o,c=t.schema,l=t.scopes,p=t.name,f=t.clientId,h=c.get("flow"),d=[];switch(h){case"password":return void n.authorizePassword(t);case"application":return void n.authorizeApplication(t);case"accessCode":d.push("response_type=code");break;case"implicit":d.push("response_type=token")}"string"==typeof f&&d.push("client_id="+encodeURIComponent(f));var m=i.oauth2RedirectUrl;if("undefined"==typeof m)return void r.newAuthErr({authId:p,source:"validation",level:"error",message:"oauth2RedirectUri configuration is not passed. Oauth2 authorization cannot be performed."});if(d.push("redirect_uri="+encodeURIComponent(m)),Array.isArray(l)&&0=0||this.state.url.indexOf("127.0.0.1")>=0?null:_.default.createElement("span",{style:{float:"right"}},_.default.createElement("a",{target:"_blank",href:this.state.validatorUrl+"/debug?url="+this.state.url},_.default.createElement(x,{src:this.state.validatorUrl+"?url="+this.state.url,alt:"Online validator badge"})))}}]),t}(_.default.Component);b.propTypes={getComponent:g.PropTypes.func.isRequired,getConfigs:g.PropTypes.func.isRequired,specSelectors:g.PropTypes.object.isRequired},t.default=b;var x=function(e){function t(e){(0,p.default)(this,t);var n=(0,m.default)(this,(t.__proto__||(0,c.default)(t)).call(this,e));return n.state={loaded:!1,error:!1},n}return(0,y.default)(t,e),(0,h.default)(t,[{key:"componentDidMount",value:function(){var e=this,t=new Image;t.onload=function(){e.setState({loaded:!0})},t.onerror=function(){e.setState({error:!0})},t.src=this.props.src}},{key:"componentWillReceiveProps",value:function(e){var t=this;if(e.src!==this.props.src){var n=new Image;n.onload=function(){t.setState({loaded:!0})},n.onerror=function(){t.setState({error:!0})},n.src=e.src}}},{key:"render",value:function(){return this.state.error?_.default.createElement("img",{alt:"Error"}):this.state.loaded?_.default.createElement("img",{src:this.props.src,alt:this.props.alt}):_.default.createElement("img",{alt:"Loading..."})}}]),t}(_.default.Component);x.propTypes={src:g.PropTypes.string,alt:g.PropTypes.string}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(446),o=r(i),a=n(486),s=r(a),u=n(145),c=r(u),l=n(146),p=r(l),f=n(489),h=r(f),d=n(490),m=r(d),v=n(498),y=r(v),g=function(e){function t(){return(0,c.default)(this,t),(0,h.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,p.default)(t,[{key:"render",value:function(){var e=this.props,t=e.specSelectors,n=e.specActions,r=e.getComponent,i=e.layoutSelectors,a=e.layoutActions,s=e.authActions,u=e.authSelectors,c=e.getConfigs,l=e.fn,p=t.taggedOperations(),f=r("operation"),h=r("Collapse"),d=i.showSummary(),m=c(),v=m.docExpansion,g=m.displayOperationId;return y.default.createElement("div",null,p.map(function(e,p){var m=e.get("operations"),_=e.getIn(["tagDetails","description"],null),b=["operations-tag",p],x=i.isShown(b,"full"===v||"list"===v);return y.default.createElement("div",{className:x?"opblock-tag-section is-open":"opblock-tag-section",key:"operation-"+p},y.default.createElement("h4",{onClick:function(){return a.show(b,!x)},className:_?"opblock-tag":"opblock-tag no-desc"},y.default.createElement("span",null,p),_?y.default.createElement("small",null,_):null,y.default.createElement("button",{className:"expand-operation",title:"Expand operation",onClick:function(){return a.show(b,!x)}},y.default.createElement("svg",{className:"arrow",width:"20",height:"20"},y.default.createElement("use",{xlinkHref:x?"#large-arrow-down":"#large-arrow"})))),y.default.createElement(h,{isOpened:x},m.map(function(e){var h=["operations",e.get("id"),p],m=e.get("path",""),v=e.get("method",""),_="paths."+m+"."+v,b=t.allowTryItOutFor(e.get("path"),e.get("method")),x=t.responseFor(e.get("path"),e.get("method")),w=t.requestFor(e.get("path"),e.get("method"));return y.default.createElement(f,(0,o.default)({},e.toObject(),{isShownKey:h,jumpToKey:_,showSummary:d,key:h,response:x,request:w,allowTryItOut:b,displayOperationId:g,specActions:n,specSelectors:t,layoutActions:a,layoutSelectors:i,authActions:s,authSelectors:u,getComponent:r,fn:l,getConfigs:c}))}).toArray()))}).toArray(),p.size<1?y.default.createElement("h3",null," No operations defined in spec! "):null)}}]),t}(y.default.Component);g.propTypes={specSelectors:v.PropTypes.object.isRequired,specActions:v.PropTypes.object.isRequired,getComponent:v.PropTypes.func.isRequired,layoutSelectors:v.PropTypes.object.isRequired,layoutActions:v.PropTypes.object.isRequired,authActions:v.PropTypes.object.isRequired,authSelectors:v.PropTypes.object.isRequired,getConfigs:v.PropTypes.func.isRequired},t.default=g,g.propTypes={layoutActions:v.PropTypes.object.isRequired,specSelectors:v.PropTypes.object.isRequired,specActions:v.PropTypes.object.isRequired,layoutSelectors:v.PropTypes.object.isRequired,getComponent:v.PropTypes.func.isRequired,fn:v.PropTypes.object.isRequired}},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(486),a=i(o),s=n(145),u=i(s),c=n(146),l=i(c),p=n(489),f=i(p),h=n(490),d=i(h),m=n(498),v=i(m),y=n(1027),g=i(y),_=n(183),b=n(1029),x=r(b),w=function(e){function t(e,n){(0,u.default)(this,t);var r=(0,f.default)(this,(t.__proto__||(0,a.default)(t)).call(this,e,n));return r.toggleShown=function(){var e=r.props,t=e.layoutActions,n=e.isShownKey;t.show(n,!r.isShown())},r.isShown=function(){var e=r.props,t=e.layoutSelectors,n=e.isShownKey,i=e.getConfigs,o=i(),a=o.docExpansion;return t.isShown(n,"full"===a)},r.onTryoutClick=function(){r.setState({tryItOutEnabled:!r.state.tryItOutEnabled})},r.onCancelClick=function(){var e=r.props,t=e.specActions,n=e.path,i=e.method;r.setState({tryItOutEnabled:!r.state.tryItOutEnabled}),t.clearValidateParams([n,i])},r.onExecute=function(){r.setState({executeInProgress:!0})},r.state={tryItOutEnabled:!1},r}return(0,d.default)(t,e),(0,l.default)(t,[{key:"componentWillReceiveProps",value:function(e){var t="application/json",n=e.specActions,r=e.path,i=e.method,o=e.operation,a=o.get("produces_value"),s=o.get("produces"),u=o.get("consumes"),c=o.get("consumes_value");e.response!==this.props.response&&this.setState({executeInProgress:!1}),void 0===a&&(a=s&&s.size?s.first():t,n.changeProducesValue([r,i],a)),void 0===c&&(c=u&&u.size?u.first():t,n.changeConsumesValue([r,i],c))}},{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.isShownKey,n=e.jumpToKey,r=e.path,i=e.method,o=e.operation,a=e.showSummary,s=e.response,u=e.request,c=e.allowTryItOut,l=e.displayOperationId,p=e.fn,f=e.getComponent,h=e.specActions,d=e.specSelectors,m=e.authActions,y=e.authSelectors,g=o.get("summary"),b=o.get("description"),x=o.get("deprecated"),w=o.get("externalDocs"),k=o.get("responses"),S=o.get("security")||d.security(),E=o.get("produces"),C=o.get("schemes"),A=(0,_.getList)(o,["parameters"]),T=o.get("__originalOperationId"),D=f("responses"),M=f("parameters"),O=f("execute"),P=f("clear"),I=f("authorizeOperationBtn"),N=f("JumpToPath",!0),R=f("Collapse"),j=f("Markdown"),F=f("schemes");if(s&&s.size>0){var B=!k.get(String(s.get("status")));s=s.set("notDocumented",B)}var L=this.state.tryItOutEnabled,z=this.isShown(),q=[r,i];return v.default.createElement("div",{className:x?"opblock opblock-deprecated":z?"opblock opblock-"+i+" is-open":"opblock opblock-"+i,id:t},v.default.createElement("div",{className:"opblock-summary opblock-summary-"+i,onClick:this.toggleShown},v.default.createElement("span",{className:"opblock-summary-method"},i.toUpperCase()),v.default.createElement("span",{className:x?"opblock-summary-path__deprecated":"opblock-summary-path"},v.default.createElement("span",null,r),v.default.createElement(N,{path:n})),a?v.default.createElement("div",{className:"opblock-summary-description"},g):null,l&&T?v.default.createElement("span",{className:"opblock-summary-operation-id"},T):null,S&&S.count()?v.default.createElement(I,{authActions:m,security:S,authSelectors:y}):null),v.default.createElement(R,{isOpened:z,animated:!0},v.default.createElement("div",{className:"opblock-body"},x&&v.default.createElement("h4",{className:"opblock-title_normal"}," Warning: Deprecated"),b&&v.default.createElement("div",{className:"opblock-description-wrapper"},v.default.createElement("div",{className:"opblock-description"},v.default.createElement(j,{source:b}))),w&&w.get("url")?v.default.createElement("div",{className:"opblock-external-docs-wrapper"},v.default.createElement("h4",{className:"opblock-title_normal"},"Find more details"),v.default.createElement("div",{className:"opblock-external-docs"},v.default.createElement("span",{className:"opblock-external-docs__description"},w.get("description")),v.default.createElement("a",{className:"opblock-external-docs__link",href:w.get("url")},w.get("url")))):null,v.default.createElement(M,{parameters:A,onChangeKey:q,onTryoutClick:this.onTryoutClick,onCancelClick:this.onCancelClick,tryItOutEnabled:L,allowTryItOut:c,fn:p,getComponent:f,specActions:h,specSelectors:d,pathMethod:[r,i]}),L&&c&&C&&C.size?v.default.createElement("div",{className:"opblock-schemes"},v.default.createElement(F,{schemes:C,path:r,method:i,specActions:h})):null,v.default.createElement("div",{className:L&&s&&c?"btn-group":"execute-wrapper"},L&&c?v.default.createElement(O,{getComponent:f,operation:o,specActions:h,specSelectors:d,path:r,method:i,onExecute:this.onExecute}):null,L&&s&&c?v.default.createElement(P,{onClick:this.onClearClick,specActions:h,path:r,method:i}):null),this.state.executeInProgress?v.default.createElement("div",{className:"loading-container"},v.default.createElement("div",{className:"loading"})):null,k?v.default.createElement(D,{responses:k,request:u,tryItOutResponse:s,getComponent:f,specSelectors:d,specActions:h,produces:E,producesValue:o.get("produces_value"),pathMethod:[r,i],fn:p}):null)))}}]),t}(v.default.Component);w.propTypes={path:m.PropTypes.string.isRequired,method:m.PropTypes.string.isRequired,operation:m.PropTypes.object.isRequired,showSummary:m.PropTypes.bool,isShownKey:x.arrayOrString.isRequired,jumpToKey:x.arrayOrString.isRequired,allowTryItOut:m.PropTypes.bool,displayOperationId:m.PropTypes.bool,response:m.PropTypes.object,request:m.PropTypes.object,getComponent:m.PropTypes.func.isRequired,authActions:m.PropTypes.object,authSelectors:m.PropTypes.object,specActions:m.PropTypes.object.isRequired,specSelectors:m.PropTypes.object.isRequired,layoutActions:m.PropTypes.object.isRequired,layoutSelectors:m.PropTypes.object.isRequired,fn:m.PropTypes.object.isRequired,getConfigs:m.PropTypes.func.isRequired},w.defaultProps={showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1},t.default=w},function(e,t,n){e.exports=n(1028)},function(e,t,n){"use strict";function r(e,t,n){return!i(e.props,t)||!i(e.state,n)}var i=n(613);e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.objectWithFuncs=t.arrayOrString=void 0;var r=n(498),i=function(e,t){return r.PropTypes.shape(e.reduce(function(e,n){return e[n]=t,e},{}))};t.arrayOrString=r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.string),r.PropTypes.string]),t.objectWithFuncs=function(e){return i(e,r.PropTypes.func.isRequired)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(486),o=r(i),a=n(145),s=r(a),u=n(146),c=r(u),l=n(489),p=r(l),f=n(490),h=r(f),d=n(498),m=r(d),v=n(183),y=function(e){function t(){return(0,s.default)(this,t),(0,p.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),(0,c.default)(t,[{key:"componentDidMount",value:function(){(0,v.highlight)(this.refs.el)}},{key:"componentDidUpdate",value:function(){(0,v.highlight)(this.refs.el)}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.className;return n=n||"",m.default.createElement("pre",{ref:"el",className:n+" microlight"},t)}}]),t}(d.Component);y.propTypes={value:d.PropTypes.string.isRequired,className:d.PropTypes.string},t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(184),o=r(i),a=n(486),s=r(a),u=n(145),c=r(u),l=n(146),p=r(l),f=n(489),h=r(f),d=n(490),m=r(d),v=n(498),y=r(v),g=n(168),_=n(183),b=function(e){function t(){var e,n,r,i;(0,c.default)(this,t);for(var o=arguments.length,a=Array(o),u=0;u1&&(_=w[1])}l=y.default.createElement("div",null,y.default.createElement("a",{href:m,download:_},"Download file"))}else l=y.default.createElement("pre",null,"Download headers detected but your browser does not support downloading binary via XHR (Blob).")}else l="string"==typeof t?y.default.createElement(u,{value:t}):y.default.createElement("div",null,"Unknown response type");return l?y.default.createElement("div",null,y.default.createElement("h5",null,"Response body"),l):null}}]),t}(y.default.Component);x.propTypes={content:v.PropTypes.any.isRequired,contentType:v.PropTypes.string.isRequired,getComponent:v.PropTypes.func.isRequired,headers:v.PropTypes.object,url:v.PropTypes.string},t.default=x},function(e,t,n){var r=n(203),i=r(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()});e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(486),o=r(i),a=n(145),s=r(a),u=n(146),c=r(u),l=n(489),p=r(l),f=n(490),h=r(f),d=n(498),m=r(d),v=n(1015),y=r(v),g=n(168),_=r(g),b=function(e,t){return e.valueSeq().filter(_.default.Map.isMap).map(t)},x=function(e){function t(){var e,n,r,i;(0,s.default)(this,t);for(var a=arguments.length,u=Array(a),c=0;c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t-1)return this.renderFixed();var m=this.renderStatic,v=this.state.height,y=parseFloat(v).toFixed(1);v>-1&&m&&(this.renderStatic=!1);var g=s.default.createElement(p.default,{onHeightReady:this.onHeightReady},a);if(m){var _=n?{height:"auto"}:{overflow:"hidden",height:0};return!n&&v>-1?l?s.default.createElement("div",o({style:o({height:0,overflow:"hidden"},r)},d),g):null:s.default.createElement("div",o({style:o({},_,r)},d),g)}return s.default.createElement(c.Motion,{defaultStyle:{height:Math.max(0,v)},onRest:f,style:{height:this.getMotionHeight(v)}},function(t){if(e.height=h(t.height),!n&&"0.0"===e.height)return l?s.default.createElement("div",o({style:o({height:0,overflow:"hidden"},r)},d),g):null;var i=n&&e.height===y?{height:"auto"}:{height:t.height,overflow:"hidden"};return s.default.createElement("div",o({style:o({},i,r)},d),g)})}});t.default=d},function(e,t,n){"use strict";var r=n(1028),i={shouldComponentUpdate:function(e,t){return r(this,e,t)}};e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var i=n(1044);t.Motion=r(i);var o=n(1052);t.StaggeredMotion=r(o);var a=n(1053);t.TransitionMotion=r(a);var s=n(1055);t.spring=r(s);var u=n(1056);t.presets=r(u);var c=n(1057);t.reorderKeys=r(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t10*_&&(e.accumulatedTime=0),0===e.accumulatedTime)return e.animationID=null,void e.startAnimationIfNecessary();var i=(e.accumulatedTime-Math.floor(e.accumulatedTime/_)*_)/_,o=Math.floor(e.accumulatedTime/_),a={},s={},u={},c={};for(var p in t)if(t.hasOwnProperty(p)){var h=t[p];if("number"==typeof h)u[p]=h,c[p]=0,a[p]=h,s[p]=0;else{for(var d=e.state.lastIdealStyle[p],m=e.state.lastIdealVelocity[p],y=0;y10*b&&(e.accumulatedTime=0),0===e.accumulatedTime)return e.animationID=null,void e.startAnimationIfNecessary();for(var o=(e.accumulatedTime-Math.floor(e.accumulatedTime/b)*b)/b,a=Math.floor(e.accumulatedTime/b),s=[],u=[],c=[],l=[],f=0;f10*S&&(e.accumulatedTime=0),0===e.accumulatedTime)return e.animationID=null,void e.startAnimationIfNecessary();for(var u=(e.accumulatedTime-Math.floor(e.accumulatedTime/S)*S)/S,c=Math.floor(e.accumulatedTime/S),l=a(e.props.willEnter,e.props.willLeave,e.state.mergedPropsStyles,n,e.state.currentStyles,e.state.currentVelocities,e.state.lastIdealStyles,e.state.lastIdealVelocities),p=l[0],f=l[1],d=l[2],m=l[3],v=l[4],g=0;gr[l])return-1;if(i>o[l]&&ur[l])return 1;if(a>o[l]&&s=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;tl,collapsedContent:_},x.default.createElement("span",{className:"brace-open object"},E),r?x.default.createElement(g,{name:n}):null,x.default.createElement("span",{className:"inner-object"},x.default.createElement("table",{className:"model",style:{marginLeft:"2em"}},x.default.createElement("tbody",null,f?x.default.createElement("tr",{style:{color:"#999",fontStyle:"italic"}},x.default.createElement("td",null,"description:"),x.default.createElement("td",null,x.default.createElement(y,{source:f}))):null,h&&h.size?h.entrySeq().map(function(e){var t=(0,s.default)(e,2),r=t[0],c=t[1],l=S.List.isList(v)&&v.contains(r),p={verticalAlign:"top",paddingRight:"0.2em"};return l&&(p.fontWeight="bold"),x.default.createElement("tr",{key:r},x.default.createElement("td",{style:p},r,":"),x.default.createElement("td",{style:{verticalAlign:"top"}},x.default.createElement(P,(0,o.default)({key:"object-"+n+"-"+r+"_"+c},u,{required:l,getComponent:i,schema:c,depth:a+1}))))}).toArray():null,d&&d.size?x.default.createElement("tr",null,x.default.createElement("td",null,"< * >:"),x.default.createElement("td",null,x.default.createElement(P,(0,o.default)({},u,{required:!1,getComponent:i,schema:d,depth:a+1})))):null))),x.default.createElement("span",{className:"brace-close"},C)))}}]),t}(b.Component);D.propTypes={schema:b.PropTypes.object.isRequired,getComponent:b.PropTypes.func.isRequired,specSelectors:b.PropTypes.object.isRequired,name:b.PropTypes.string,isRef:b.PropTypes.bool,expandDepth:b.PropTypes.number,depth:b.PropTypes.number};var M=function(e){function t(){return(0,h.default)(this,t),(0,y.default)(this,(t.__proto__||(0,p.default)(t)).apply(this,arguments))}return(0,_.default)(t,e),(0,m.default)(t,[{key:"render",value:function(){var e=this.props,t=e.schema,n=e.getComponent,r=e.required;if(!t||!t.get)return x.default.createElement("div",null);var i=t.get("type"),o=t.get("format"),a=t.get("xml"),u=t.get("enum"),c=t.get("description"),l=t.filter(function(e,t){return["enum","type","format","description","$$ref"].indexOf(t)===-1}),p=r?{fontWeight:"bold"}:{},f=n("Markdown");return x.default.createElement("span",{className:"prop"},x.default.createElement("span",{className:"prop-type",style:p},i)," ",r&&x.default.createElement("span",{style:{color:"red"}},"*"),o&&x.default.createElement("span",{className:"prop-format"},"($",o,")"),l.size?l.entrySeq().map(function(e){var t=(0,s.default)(e,2),n=t[0],r=t[1];return x.default.createElement("span",{key:n+"-"+r,style:A},x.default.createElement("br",null),n,": ",String(r))}):null,c?x.default.createElement(f,{source:c}):null,a&&a.size?x.default.createElement("span",null,x.default.createElement("br",null),x.default.createElement("span",{style:A},"xml:"),a.entrySeq().map(function(e){var t=(0,s.default)(e,2),n=t[0],r=t[1];return x.default.createElement("span",{key:n+"-"+r,style:A},x.default.createElement("br",null),"   ",n,": ",String(r))}).toArray()):null,u&&x.default.createElement(T,{value:u}))}}]),t}(b.Component);M.propTypes={schema:b.PropTypes.object.isRequired,getComponent:b.PropTypes.func.isRequired,required:b.PropTypes.bool};var O=function(e){function t(){return(0,h.default)(this,t),(0,y.default)(this,(t.__proto__||(0,p.default)(t)).apply(this,arguments))}return(0,_.default)(t,e),(0,m.default)(t,[{key:"render",value:function(){var e=this.props,t=e.required,n=e.schema,r=e.depth,i=e.expandDepth,a=n.get("items"),u=n.filter(function(e,t){return["type","items","$$ref"].indexOf(t)===-1});return x.default.createElement("span",{className:"model"},x.default.createElement("span",{className:"model-title"},x.default.createElement("span",{className:"model-title__text"},n.get("title"))),x.default.createElement(N,{collapsed:r>i,collapsedContent:"[...]"},"[",x.default.createElement("span",null,x.default.createElement(P,(0,o.default)({},this.props,{schema:a,required:!1}))),"]",u.size?x.default.createElement("span",null,u.entrySeq().map(function(e){var t=(0,s.default)(e,2),n=t[0],r=t[1];return x.default.createElement("span",{key:n+"-"+r,style:A},x.default.createElement("br",null),n+":",String(r))}),x.default.createElement("br",null)):null),t&&x.default.createElement("span",{style:{color:"red"}},"*"))}}]),t}(b.Component);O.propTypes={schema:b.PropTypes.object.isRequired,getComponent:b.PropTypes.func.isRequired,specSelectors:b.PropTypes.object.isRequired,name:b.PropTypes.string,required:b.PropTypes.bool,expandDepth:b.PropTypes.number,depth:b.PropTypes.number};var P=function(e){function t(){var e,n,r,i;(0,h.default)(this,t);for(var o=arguments.length,a=Array(o),s=0;s=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!==(65535&e)&&65534!==(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function c(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function l(e,t){var n=0;return o(g,t)?g[t]:35===t.charCodeAt(0)&&y.test(t)&&(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),u(n))?c(n):e}function p(e){return e.indexOf("&")<0?e:e.replace(v,l)}function f(e){return x[e]}function h(e){return _.test(e)?e.replace(b,f):e}var d=Object.prototype.hasOwnProperty,m=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g,v=/&([a-z#][a-z0-9]{1,31});/gi,y=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,g=n(1082),_=/[&<>"]/,b=/[&<>"]/g,x={"&":"&","<":"<",">":">",'"':"""};t.assign=a,t.isString=i,t.has=o,t.unescapeMd=s,t.isValidEntityCode=u,t.fromCodePoint=c,t.replaceEntities=p,t.escapeHtml=h},function(e,t){"use strict";e.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",GT:">",Gt:"≫",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",LT:"<",Lt:"≪",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅", +varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(e,t,n){"use strict";function r(){this.rules=i.assign({},o),this.getBreak=o.getBreak}var i=n(1081),o=n(1084);e.exports=r,r.prototype.renderInline=function(e,t,n){for(var r=this.rules,i=e.length,o=0,a="";i--;)a+=r[e[o].type](e,o++,t,n,this);return a},r.prototype.render=function(e,t,n){for(var r=this.rules,i=e.length,o=-1,a="";++o=e.length-2?t:"paragraph_open"===e[t].type&&e[t].tight&&"inline"===e[t+1].type&&0===e[t+1].content.length&&"paragraph_close"===e[t+2].type&&e[t+2].tight?r(e,t+2):t}var i=n(1081).has,o=n(1081).unescapeMd,a=n(1081).replaceEntities,s=n(1081).escapeHtml,u={};u.blockquote_open=function(){return"
                  \n"},u.blockquote_close=function(e,t){return"
                  "+c(e,t)},u.code=function(e,t){return e[t].block?"
                  "+s(e[t].content)+"
                  "+c(e,t):""+s(e[t].content)+""},u.fence=function(e,t,n,r,u){var l,p,f,h=e[t],d="",m=n.langPrefix,v="";if(h.params){if(l=h.params.split(/\s+/g),p=l.join(" "),i(u.rules.fence_custom,l[0]))return u.rules.fence_custom[l[0]](e,t,n,r,u);v=s(a(o(p))),d=' class="'+m+v+'"'}return f=n.highlight?n.highlight.apply(n.highlight,[h.content].concat(l))||s(h.content):s(h.content),"
                  "+f+"
                  "+c(e,t)},u.fence_custom={},u.heading_open=function(e,t){return""},u.heading_close=function(e,t){return"\n"},u.hr=function(e,t,n){return(n.xhtmlOut?"
                  ":"
                  ")+c(e,t)},u.bullet_list_open=function(){return"
                    \n"},u.bullet_list_close=function(e,t){return"
                  "+c(e,t)},u.list_item_open=function(){return"
                • "},u.list_item_close=function(){return"
                • \n"},u.ordered_list_open=function(e,t){var n=e[t],r=n.order>1?' start="'+n.order+'"':"";return"\n"},u.ordered_list_close=function(e,t){return""+c(e,t)},u.paragraph_open=function(e,t){return e[t].tight?"":"

                  "},u.paragraph_close=function(e,t){var n=!(e[t].tight&&t&&"inline"===e[t-1].type&&!e[t-1].content);return(e[t].tight?"":"

                  ")+(n?c(e,t):"")},u.link_open=function(e,t,n){var r=e[t].title?' title="'+s(a(e[t].title))+'"':"",i=n.linkTarget?' target="'+n.linkTarget+'"':"";return'"},u.link_close=function(){return""},u.image=function(e,t,n){var r=' src="'+s(e[t].src)+'"',i=e[t].title?' title="'+s(a(e[t].title))+'"':"",u=' alt="'+(e[t].alt?s(a(o(e[t].alt))):"")+'"',c=n.xhtmlOut?" /":"";return""},u.table_open=function(){return"\n"},u.table_close=function(){return"
                  \n"},u.thead_open=function(){return"\n"},u.thead_close=function(){return"\n"},u.tbody_open=function(){return"\n"},u.tbody_close=function(){return"\n"},u.tr_open=function(){return""},u.tr_close=function(){return"\n"},u.th_open=function(e,t){var n=e[t];return""},u.th_close=function(){return""},u.td_open=function(e,t){var n=e[t];return""},u.td_close=function(){return""},u.strong_open=function(){return""},u.strong_close=function(){return""},u.em_open=function(){return""},u.em_close=function(){return""},u.del_open=function(){return""},u.del_close=function(){return""},u.ins_open=function(){return""},u.ins_close=function(){return""},u.mark_open=function(){return""},u.mark_close=function(){return""},u.sub=function(e,t){return""+s(e[t].content)+""},u.sup=function(e,t){return""+s(e[t].content)+""},u.hardbreak=function(e,t,n){return n.xhtmlOut?"
                  \n":"
                  \n"},u.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"
                  \n":"
                  \n":"\n"},u.text=function(e,t){return s(e[t].content)},u.htmlblock=function(e,t){return e[t].content},u.htmltag=function(e,t){return e[t].content},u.abbr_open=function(e,t){return''},u.abbr_close=function(){return""},u.footnote_ref=function(e,t){var n=Number(e[t].id+1).toString(),r="fnref"+n;return e[t].subId>0&&(r+=":"+e[t].subId),'['+n+"]"},u.footnote_block_open=function(e,t,n){var r=n.xhtmlOut?'
                  \n':'
                  \n';return r+'
                  \n
                    \n'},u.footnote_block_close=function(){return"
                  \n
                  \n"},u.footnote_open=function(e,t){var n=Number(e[t].id+1).toString();return'
                • '},u.footnote_close=function(){return"
                • \n"},u.footnote_anchor=function(e,t){var n=Number(e[t].id+1).toString(),r="fnref"+n;return e[t].subId>0&&(r+=":"+e[t].subId),' '},u.dl_open=function(){return"
                  \n"},u.dt_open=function(){return"
                  "},u.dd_open=function(){return"
                  "},u.dl_close=function(){return"
                  \n"},u.dt_close=function(){return"\n"},u.dd_close=function(){return"\n"};var c=u.getBreak=function(e,t){return t=r(e,t),t8&&n<14);)if(92===n&&t+11))break;if(41===n&&(o--,o<0))break;t++}return s!==t&&(a=i(e.src.slice(s,t)),!!e.parser.validateLink(a)&&(e.linkContent=a,e.pos=t,!0))}},function(e,t,n){"use strict";var r=n(1081).replaceEntities;e.exports=function(e){var t=r(e);try{t=decodeURI(t)}catch(e){}return encodeURI(t)}},function(e,t,n){"use strict";var r=n(1081).unescapeMd;e.exports=function(e,t){var n,i=t,o=e.posMax,a=e.src.charCodeAt(t);if(34!==a&&39!==a&&40!==a)return!1;for(t++,40===a&&(a=41);t0?a[t].count:1,r=0;r=0;t--)if(s=a[t],"text"===s.type){for(l=0,u=s.content,f.lastIndex=0,p=s.level,c=[];h=f.exec(u);)f.lastIndex>l&&c.push({type:"text",content:u.slice(l,h.index+h[1].length),level:p}),c.push({type:"abbr_open",title:e.env.abbreviations[":"+h[2]],level:p++}),c.push({type:"text",content:h[2],level:p}),c.push({type:"abbr_close",level:--p}),l=f.lastIndex-h[3].length;c.length&&(l=0;s--)if("inline"===e.tokens[s].type)for(a=e.tokens[s].children,t=a.length-1;t>=0;t--)i=a[t],"text"===i.type&&(o=i.content,o=n(o),r.test(o)&&(o=o.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),i.content=o)}},function(e,t){"use strict";function n(e,t){return!(t<0||t>=e.length)&&!a.test(e[t])}function r(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}var i=/['"]/,o=/['"]/g,a=/[-\s()\[\]]/,s="’";e.exports=function(e){var t,a,u,c,l,p,f,h,d,m,v,y,g,_,b,x,w;if(e.options.typographer)for(w=[],b=e.tokens.length-1;b>=0;b--)if("inline"===e.tokens[b].type)for(x=e.tokens[b].children,w.length=0,t=0;t=0&&!(w[g].level<=f);g--);w.length=g+1,u=a.content,l=0,p=u.length;e:for(;l=0&&(m=w[g],!(w[g].level\s]/i.test(e)}function i(e){return/^<\/a\s*>/i.test(e)}function o(){var e=[],t=new a({stripPrefix:!1,url:!0,email:!0,twitter:!1,replaceFn:function(t,n){switch(n.getType()){case"url":e.push({text:n.matchedText,url:n.getUrl()});break;case"email":e.push({text:n.matchedText,url:"mailto:"+n.getEmail().replace(/^mailto:/i,"")})}return!1}});return{links:e,autolinker:t}}var a=n(1102),s=/www|@|\:\/\//;e.exports=function(e){var t,n,a,u,c,l,p,f,h,d,m,v,y,g=e.tokens,_=null;if(e.options.linkify)for(n=0,a=g.length;n=0;t--)if(c=u[t],"link_close"!==c.type){if("htmltag"===c.type&&(r(c.content)&&m>0&&m--,i(c.content)&&m++),!(m>0)&&"text"===c.type&&s.test(c.content)){if(_||(_=o(),v=_.links,y=_.autolinker),l=c.content,v.length=0,y.link(l),!v.length)continue;for(p=[],d=c.level,f=0;f + * MIT Licensed. http://www.opensource.org/licenses/mit-license.php + * + * https://github.com/gregjacobs/Autolinker.js + */ +var e=function(t){e.Util.assign(this,t)};return e.prototype={constructor:e,urls:!0,email:!0,twitter:!0,newWindow:!0,stripPrefix:!0,truncate:void 0,className:"",htmlParser:void 0,matchParser:void 0,tagBuilder:void 0,link:function(e){for(var t=this.getHtmlParser(),n=t.parse(e),r=0,i=[],o=0,a=n.length;ot&&(n=null==n?"..":n,e=e.substring(0,t-n.length)+n),e},indexOf:function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n",this.getInnerHtml(),""].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+'="'+e[n]+'"');return t.join(" ")}}),e.AnchorTagBuilder=e.Util.extend(Object,{constructor:function(t){e.Util.assign(this,t)},build:function(t){var n=new e.HtmlTag({tagName:"a",attrs:this.createAttrs(t.getType(),t.getAnchorHref()),innerHtml:this.processAnchorText(t.getAnchorText())});return n},createAttrs:function(e,t){var n={href:t},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank"),n},createCssClass:function(e){var t=this.className;return t?t+" "+t+"-"+e:""},processAnchorText:function(e){return e=this.doTruncate(e)},doTruncate:function(t){return e.Util.ellipsis(t,this.truncate||Number.POSITIVE_INFINITY)}}),e.htmlParser.HtmlParser=e.Util.extend(Object,{htmlRegex:function(){var e=/[0-9a-zA-Z][0-9a-zA-Z:]*/,t=/[^\s\0"'>\/=\x01-\x1F\x7F]+/,n=/(?:"[^"]*?"|'[^']*?'|[^'"=<>`\s]+)/,r=t.source+"(?:\\s*=\\s*"+n.source+")?";return new RegExp(["(?:","<(!DOCTYPE)","(?:","\\s+","(?:",r,"|",n.source+")",")*",">",")","|","(?:","<(/)?","("+e.source+")","(?:","\\s+",r,")*","\\s*/?",">",")"].join(""),"gi")}(),htmlCharacterEntitiesRegex:/( | |<|<|>|>|"|"|')/gi,parse:function(e){for(var t,n,r=this.htmlRegex,i=0,o=[];null!==(t=r.exec(e));){var a=t[0],s=t[1]||t[3],u=!!t[2],c=e.substring(i,t.index);c&&(n=this.parseTextAndEntityNodes(c),o.push.apply(o,n)),o.push(this.createElementNode(a,s,u)),i=t.index+a.length}if(i=n))&&!(e.tShift[s]=0&&(e=e.replace(s,function(t,n){var r;return 10===e.charCodeAt(n)?(a=n+1,l=0,t):(r=" ".slice((n-a-l)%4),l=n-a+1,r)})),i=new o(e,this,t,n,r),void this.tokenize(i,i.line,i.lineMax)):[]},e.exports=r},function(e,t){"use strict";function n(e,t,n,r,i){var o,a,s,u,c,l,p;for(this.src=e,this.parser=t,this.options=n,this.env=r,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",a=this.src,l=0,p=!1,s=u=l=0,c=a.length;u=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,t,n,r){var i,o,a,s,u,c=e;if(e>=t)return"";if(c+1===t)return o=this.bMarks[c]+Math.min(this.tShift[c],n),a=r?this.eMarks[c]+1:this.eMarks[c],this.src.slice(o,a);for(s=new Array(t-e),i=0;cn&&(u=n),u<0&&(u=0),o=this.bMarks[c]+u,a=c+1=4))break;r++,i=r}return e.line=r,e.tokens.push({type:"code",content:e.getLines(t,i,4+e.blkIndent,!0),block:!0,lines:[t,e.line],level:e.level}),!0}},function(e,t){"use strict";e.exports=function(e,t,n,r){var i,o,a,s,u,c=!1,l=e.bMarks[t]+e.tShift[t],p=e.eMarks[t];if(l+3>p)return!1;if(i=e.src.charCodeAt(l),126!==i&&96!==i)return!1;if(u=l,l=e.skipChars(l,i),o=l-u,o<3)return!1;if(a=e.src.slice(l,p).trim(),a.indexOf("`")>=0)return!1;if(r)return!0;for(s=t;(s++,!(s>=n))&&(l=u=e.bMarks[s]+e.tShift[s],p=e.eMarks[s],!(l=4||(l=e.skipChars(l,i),l-uv)return!1;if(62!==e.src.charCodeAt(m++))return!1;if(e.level>=e.options.maxNesting)return!1;if(r)return!0;for(32===e.src.charCodeAt(m)&&m++,u=e.blkIndent,e.blkIndent=0,s=[e.bMarks[t]],e.bMarks[t]=m,m=m=v,a=[e.tShift[t]],e.tShift[t]=m-e.bMarks[t],p=e.parser.ruler.getRules("blockquote"),i=t+1;i=v));i++)if(62!==e.src.charCodeAt(m++)){if(o)break;for(d=!1,f=0,h=p.length;f=v,a.push(e.tShift[i]),e.tShift[i]=m-e.bMarks[i];for(c=e.parentType,e.parentType="blockquote",e.tokens.push({type:"blockquote_open",lines:l=[t,0],level:e.level++}),e.parser.tokenize(e,t,i),e.tokens.push({type:"blockquote_close",level:--e.level}),e.parentType=c,l[1]=e.line,f=0;fu)return!1;if(i=e.src.charCodeAt(s++),42!==i&&45!==i&&95!==i)return!1;for(o=1;s=i?-1:(n=e.src.charCodeAt(r++),42!==n&&45!==n&&43!==n?-1:r=i)return-1;if(n=e.src.charCodeAt(r++),n<48||n>57)return-1;for(;;){if(r>=i)return-1;if(n=e.src.charCodeAt(r++),!(n>=48&&n<=57)){if(41===n||46===n)break;return-1}}return r=0)_=!0;else{if(!((d=n(e,t))>=0))return!1;_=!1}if(e.level>=e.options.maxNesting)return!1;if(g=e.src.charCodeAt(d-1),a)return!0;for(x=e.tokens.length,_?(h=e.bMarks[t]+e.tShift[t],y=Number(e.src.substr(h,d-h-1)),e.tokens.push({type:"ordered_list_open",order:y,lines:k=[t,0],level:e.level++})):e.tokens.push({type:"bullet_list_open",lines:k=[t,0],level:e.level++}),s=t,w=!1,E=e.parser.ruler.getRules("list");!(!(s=m?1:b-d,v>4&&(v=1),v<1&&(v=1),u=d-e.bMarks[s]+v,e.tokens.push({type:"list_item_open",lines:S=[t,0],level:e.level++}),l=e.blkIndent,p=e.tight,c=e.tShift[t],f=e.parentType,e.tShift[t]=b-e.bMarks[t],e.blkIndent=u,e.tight=!0,e.parentType="list",e.parser.tokenize(e,t,o,!0),e.tight&&!w||(D=!1),w=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=l,e.tShift[t]=c,e.tight=p,e.parentType=f,e.tokens.push({type:"list_item_close",level:--e.level}),s=t=e.line,S[1]=s,b=e.bMarks[t],s>=o)||e.isEmpty(s)||e.tShift[s]l)return!1;if(91!==e.src.charCodeAt(c))return!1;if(94!==e.src.charCodeAt(c+1))return!1;if(e.level>=e.options.maxNesting)return!1;for(s=c+2;s=l||58!==e.src.charCodeAt(++s))&&(!!r||(s++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),u=e.src.slice(c+2,s-2),e.env.footnotes.refs[":"+u]=-1,e.tokens.push({type:"footnote_reference_open",label:u,level:e.level++}),i=e.bMarks[t],o=e.tShift[t],a=e.parentType,e.tShift[t]=e.skipSpaces(s)-s,e.bMarks[t]=s,e.blkIndent+=4,e.parentType="footnote",e.tShift[t]=u)return!1;if(i=e.src.charCodeAt(s),35!==i||s>=u)return!1;for(o=1,i=e.src.charCodeAt(++s);35===i&&s6||ss&&32===e.src.charCodeAt(a-1)&&(u=a),e.line=t+1,e.tokens.push({type:"heading_open",hLevel:o,lines:[t,e.line],level:e.level}),s=n)&&(!(e.tShift[a]3)&&(i=e.bMarks[a]+e.tShift[a],o=e.eMarks[a],!(i>=o)&&(r=e.src.charCodeAt(i),(45===r||61===r)&&(i=e.skipChars(i,r),i=e.skipSpaces(i),!(i=97&&t<=122}var i=n(1114),o=/^<([a-zA-Z]{1,15})[\s\/>]/,a=/^<\/([a-zA-Z]{1,15})[\s>]/;e.exports=function(e,t,n,s){var u,c,l,p=e.bMarks[t],f=e.eMarks[t],h=e.tShift[t];if(p+=h,!e.options.html)return!1;if(h>3||p+2>=f)return!1;if(60!==e.src.charCodeAt(p))return!1;if(u=e.src.charCodeAt(p+1),33===u||63===u){if(s)return!0}else{if(47!==u&&!r(u))return!1;if(47===u){if(c=e.src.slice(p,f).match(a),!c)return!1}else if(c=e.src.slice(p,f).match(o),!c)return!1;if(i[c[1].toLowerCase()]!==!0)return!1;if(s)return!0}for(l=t+1;lr)return!1;if(c=t+1,e.tShift[c]=e.eMarks[c])return!1;if(o=e.src.charCodeAt(s),124!==o&&45!==o&&58!==o)return!1;if(a=n(e,t+1),!/^[-:| ]+$/.test(a))return!1;if(l=a.split("|"),l<=2)return!1;for(f=[],u=0;u=o?-1:(r=e.src.charCodeAt(i++),126!==r&&58!==r?-1:(n=e.skipSpaces(i),i===n?-1:n>=o?-1:n))}function r(e,t){var n,r,i=e.level+2;for(n=t+2,r=e.tokens.length-2;n=0;if(f=t+1,e.isEmpty(f)&&++f>i)return!1;if(e.tShift[f]=e.options.maxNesting)return!1;p=e.tokens.length,e.tokens.push({type:"dl_open",lines:l=[t,0],level:e.level++}),u=t,s=f;e:for(;;){for(_=!0,g=!1,e.tokens.push({type:"dt_open",lines:[u,u],level:e.level++}),e.tokens.push({type:"inline",content:e.getLines(u,u+1,e.blkIndent,!1).trim(),level:e.level+1,lines:[u,u],children:[]}),e.tokens.push({type:"dt_close",level:--e.level});;){if(e.tokens.push({type:"dd_open",lines:c=[f,0],level:e.level++}),y=e.tight,d=e.ddIndent,h=e.blkIndent,v=e.tShift[s],m=e.parentType,e.blkIndent=e.ddIndent=e.tShift[s]+2,e.tShift[s]=a-e.bMarks[s],e.tight=!0,e.parentType="deflist",e.parser.tokenize(e,s,i,!0),e.tight&&!g||(_=!1),g=e.line-s>1&&e.isEmpty(e.line-1),e.tShift[s]=v,e.tight=y,e.parentType=m,e.blkIndent=h,e.ddIndent=d,e.tokens.push({type:"dd_close",level:--e.level}),c[1]=f=e.line,f>=i)break e;if(e.tShift[f]=i)break;if(u=f,e.isEmpty(u))break;if(e.tShift[u]=i)break;if(e.isEmpty(s)&&s++,s>=i)break;if(e.tShift[s]3)){for(i=!1,o=0,a=s.length;o0)return void(e.pos=n);for(t=0;t=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},r.prototype.parse=function(e,t,n,r){var i=new a(e,this,t,n,r);this.tokenize(i)},e.exports=r},function(e,t){"use strict";function n(e){switch(e){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}e.exports=function(e,t){for(var r=e.pos;r=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(var o=n-2;o>=0;o--)if(32!==e.pending.charCodeAt(o)){e.pending=e.pending.substring(0,o+1);break}e.push({type:"hardbreak",level:e.level})}else e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level});else e.push({type:"softbreak",level:e.level});for(i++;i?@[]^_`{|}~-".split("").forEach(function(e){n[e.charCodeAt(0)]=1}),e.exports=function(e,t){var r,i=e.pos,o=e.posMax;if(92!==e.src.charCodeAt(i))return!1;if(i++,i=s)return!1;if(126!==e.src.charCodeAt(u+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(o=u>0?e.src.charCodeAt(u-1):-1,a=e.src.charCodeAt(u+2),126===o)return!1;if(126===a)return!1;if(32===a||10===a)return!1;for(r=u+2;ru+3)return e.pos+=r-u,t||(e.pending+=e.src.slice(u,r)),!0;for(e.pos=u+2,i=1;e.pos+1=s)return!1;if(43!==e.src.charCodeAt(u+1))return!1;if(e.level>=e.options.maxNesting)return!1; +if(o=u>0?e.src.charCodeAt(u-1):-1,a=e.src.charCodeAt(u+2),43===o)return!1;if(43===a)return!1;if(32===a||10===a)return!1;for(r=u+2;r=s)return!1;if(61!==e.src.charCodeAt(u+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(o=u>0?e.src.charCodeAt(u-1):-1,a=e.src.charCodeAt(u+2),61===o)return!1;if(61===a)return!1;if(32===a||10===a)return!1;for(r=u+2;r=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function r(e,t){var r,i,o,a=t,s=!0,u=!0,c=e.posMax,l=e.src.charCodeAt(t);for(r=t>0?e.src.charCodeAt(t-1):-1;a=c&&(s=!1),o=a-t,o>=4?s=u=!1:(i=a=e.options.maxNesting)return!1;for(e.pos=p+n,u=[n];e.pos?@[\]^_`{|}~-])/g;e.exports=function(e,t){var r,i,o=e.posMax,a=e.pos;if(126!==e.src.charCodeAt(a))return!1;if(t)return!1;if(a+2>=o)return!1;if(e.level>=e.options.maxNesting)return!1;for(e.pos=a+1;e.pos?@[\]^_`{|}~-])/g;e.exports=function(e,t){var r,i,o=e.posMax,a=e.pos;if(94!==e.src.charCodeAt(a))return!1;if(t)return!1;if(a+2>=o)return!1;if(e.level>=e.options.maxNesting)return!1;for(e.pos=a+1;e.pos=e.options.maxNesting)return!1;if(n=y+1,s=r(e,y),s<0)return!1;if(p=s+1,p=v)return!1;for(y=p,i(e,p)?(c=e.linkContent,p=e.pos):c="",y=p;p=v||41!==e.src.charCodeAt(p))return e.pos=m,!1;p++}else{if(e.linkLevel>0)return!1;for(;p=0?u=e.src.slice(y,p++):p=y-1),u||("undefined"==typeof u&&(p=s+1),u=e.src.slice(n,s)),f=e.env.references[a(u)],!f)return e.pos=m,!1;c=f.href,l=f.title}return t||(e.pos=n,e.posMax=s,d?e.push({type:"image",src:c,title:l,alt:e.src.substr(n,s-n),level:e.level}):(e.push({type:"link_open",href:c,title:l,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level}))),e.pos=p,e.posMax=v,!0}},function(e,t,n){"use strict";var r=n(1090);e.exports=function(e,t){var n,i,o,a,s=e.posMax,u=e.pos;return!(u+2>=s)&&(94===e.src.charCodeAt(u)&&(91===e.src.charCodeAt(u+1)&&(!(e.level>=e.options.maxNesting)&&(n=u+2,i=r(e,u+1),!(i<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),o=e.env.footnotes.list.length,e.pos=n,e.posMax=i,e.push({type:"footnote_ref",id:o,level:e.level}),e.linkLevel++,a=e.tokens.length,e.parser.tokenize(e),e.env.footnotes.list[o]={tokens:e.tokens.splice(a)},e.linkLevel--),e.pos=i+1,e.posMax=s,!0)))))}},function(e,t){"use strict";e.exports=function(e,t){var n,r,i,o,a=e.posMax,s=e.pos;if(s+3>a)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(s))return!1;if(94!==e.src.charCodeAt(s+1))return!1;if(e.level>=e.options.maxNesting)return!1;for(r=s+2;r=a)&&(r++,n=e.src.slice(s+2,r-1),"undefined"!=typeof e.env.footnotes.refs[":"+n]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+n]<0?(i=e.env.footnotes.list.length,e.env.footnotes.list[i]={label:n,count:0},e.env.footnotes.refs[":"+n]=i):i=e.env.footnotes.refs[":"+n],o=e.env.footnotes.list[i].count,e.env.footnotes.list[i].count++,e.push({type:"footnote_ref",id:i,subId:o,level:e.level})),e.pos=r,e.posMax=a,!0)))}},function(e,t,n){"use strict";var r=n(1133),i=n(1093),o=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,a=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;e.exports=function(e,t){var n,s,u,c,l,p=e.pos;return 60===e.src.charCodeAt(p)&&(n=e.src.slice(p),!(n.indexOf(">")<0)&&((s=n.match(a))?!(r.indexOf(s[1].toLowerCase())<0)&&(c=s[0].slice(1,-1),l=i(c),!!e.parser.validateLink(c)&&(t||(e.push({type:"link_open",href:l,level:e.level}),e.push({type:"text",content:c,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=s[0].length,!0)):(u=n.match(o),!!u&&(c=u[0].slice(1,-1),l=i("mailto:"+c),!!e.parser.validateLink(l)&&(t||(e.push({type:"link_open",href:l,level:e.level}),e.push({type:"text",content:c,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=u[0].length,!0)))))}},function(e,t){"use strict";e.exports=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"]},function(e,t,n){"use strict";function r(e){var t=32|e;return t>=97&&t<=122}var i=n(1135).HTML_TAG_RE;e.exports=function(e,t){var n,o,a,s=e.pos;return!!e.options.html&&(a=e.posMax,!(60!==e.src.charCodeAt(s)||s+2>=a)&&(n=e.src.charCodeAt(s+1),!(33!==n&&63!==n&&47!==n&&!r(n))&&(!!(o=e.src.slice(s).match(i))&&(t||e.push({type:"htmltag",content:e.src.slice(s,s+o[0].length),level:e.level}),e.pos+=o[0].length,!0))))}},function(e,t){"use strict";function n(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=i.source||i,e=e.replace(r,i),n):new RegExp(e,t)}}var r=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,i=/[^"'=<>`\x00-\x20]+/,o=/'[^']*'/,a=/"[^"]*"/,s=n(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",i)("single_quoted",o)("double_quoted",a)(),u=n(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",r)("attr_value",s)(),c=n(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",u)(),l=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,p=//,f=/<[?].*?[?]>/,h=/]*>/,d=/])*\]\]>/,m=n(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",c)("close_tag",l)("comment",p)("processing",f)("declaration",h)("cdata",d)();e.exports.HTML_TAG_RE=m},function(e,t,n){"use strict";var r=n(1082),i=n(1081).has,o=n(1081).isValidEntityCode,a=n(1081).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,u=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,l,p=e.pos,f=e.posMax;if(38!==e.src.charCodeAt(p))return!1;if(p+1/g,">").replace(/\"/g,""")}function f(e,n){n=n.replace(/[\x00-\x20]+/g,""),n=n.replace(/<\!\-\-.*?\-\-\>/g,"");var r=n.match(/^([a-zA-Z]+)\:/);if(!r)return!!n.match(/^\/\//)&&!t.allowProtocolRelative;var o=r[1].toLowerCase();return i(t.allowedSchemesByTag,e)?t.allowedSchemesByTag[e].indexOf(o)===-1:!t.allowedSchemes||t.allowedSchemes.indexOf(o)===-1}function h(e,t){return t?(e=e.split(/\s+/),e.filter(function(e){return t.indexOf(e)!==-1}).join(" ")):e}var d="";t?(t=s(o.defaults,t),t.parser?t.parser=s(c,t.parser):t.parser=c):(t=o.defaults,t.parser=c);var m,v,y=t.nonTextTags||["script","style","textarea"];t.allowedAttributes&&(m={},v={},r(t.allowedAttributes,function(e,t){m[t]=[];var n=[];e.forEach(function(e){e.indexOf("*")>=0?n.push(u(e).replace(/\\\*/g,".*")):m[t].push(e)}),v[t]=new RegExp("^("+n.join("|")+")$")}));var g={};r(t.allowedClasses,function(e,t){m&&(i(m,t)||(m[t]=[]),m[t].push("class")),g[t]=e});var _,b={};r(t.transformTags,function(e,t){var n;"function"==typeof e?n=e:"string"==typeof e&&(n=o.simpleTransform(e)),"*"===t?_=n:b[t]=n});var x=0,w=[],k={},S={},E=!1,C=0,A=new a.Parser({onopentag:function(e,n){if(E)return void C++;var o=new l(e,n);w.push(o);var a,s=!1,u=!!o.text;i(b,e)&&(a=b[e](e,n),o.attribs=n=a.attribs,void 0!==a.text&&(o.innerText=a.text),e!==a.tagName&&(o.name=e=a.tagName,S[x]=a.tagName)),_&&(a=_(e,n),o.attribs=n=a.attribs,e!==a.tagName&&(o.name=e=a.tagName,S[x]=a.tagName)),t.allowedTags&&t.allowedTags.indexOf(e)===-1&&(s=!0,y.indexOf(e)!==-1&&(E=!0,C=1),k[x]=!0),x++,s||(d+="<"+e,(!m||i(m,e)||m["*"])&&r(n,function(t,n){if(!m||i(m,e)&&m[e].indexOf(n)!==-1||m["*"]&&m["*"].indexOf(n)!==-1||i(v,e)&&v[e].test(n)||v["*"]&&v["*"].test(n)){if(("href"===n||"src"===n)&&f(e,t))return void delete o.attribs[n];if("class"===n&&(t=h(t,g[e]),!t.length))return void delete o.attribs[n];d+=" "+n,t.length&&(d+='="'+p(t)+'"')}else delete o.attribs[n]}),t.selfClosing.indexOf(e)!==-1?d+=" />":(d+=">",!o.innerText||u||t.textFilter||(d+=o.innerText)))},ontext:function(e){if(!E){var n,r=w[w.length-1];if(r&&(n=r.tag,e=void 0!==r.innerText?r.innerText:e),"script"===n||"style"===n)d+=e;else{var i=p(e);d+=t.textFilter?t.textFilter(i):i}if(w.length){var o=w[w.length-1];o.text+=e}}},onclosetag:function(e){if(E){if(C--,C)return;E=!1}var n=w.pop();if(n){if(E=!1,x--,k[x])return delete k[x],void n.updateParentNodeText();if(S[x]&&(e=S[x],delete S[x]),t.exclusiveFilter&&t.exclusiveFilter(n))return void(d=d.substr(0,n.tagPosition));n.updateParentNodeText(),t.selfClosing.indexOf(e)===-1&&(d+="")}}},t.parser);return A.write(e),A.end(),d}var a=n(1141),s=n(1171),u=n(1172);e.exports=o;var c={decodeEntities:!0};o.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre"],allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{},allowProtocolRelative:!0},o.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,i){var o;if(n)for(o in t)i[o]=t[o];else i=t;return{tagName:e,attribs:i}}}},function(e,t,n){function r(t,n){return delete e.exports[t],e.exports[t]=n,n}var i=n(1142),o=n(1149);e.exports={Parser:i,Tokenizer:n(1143),ElementType:n(1150),DomHandler:o,get FeedHandler(){return r("FeedHandler",n(1153))},get Stream(){return r("Stream",n(1154))},get WritableStream(){return r("WritableStream",n(1155))},get ProxyHandler(){return r("ProxyHandler",n(1157))},get DomUtils(){return r("DomUtils",n(1158))},get CollectingHandler(){return r("CollectingHandler",n(1170))},DefaultHandler:o,get RssHandler(){return r("RssHandler",this.FeedHandler)},parseDOM:function(e,t){var n=new o(t);return new i(n,t).end(e),n.dom},parseFeed:function(t,n){var r=new e.exports.FeedHandler(n);return new i(r,n).end(t),r.dom},createDomStream:function(e,t,n){var r=new o(e,t,n);return new i(r,t)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},function(e,t,n){function r(e,t){this._options=t||{},this._cbs=e||{},this._tagname="",this._attribname="",this._attribvalue="",this._attribs=null,this._stack=[],this.startIndex=0,this.endIndex=null,this._lowerCaseTagNames="lowerCaseTags"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode,this._lowerCaseAttributeNames="lowerCaseAttributeNames"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode,this._options.Tokenizer&&(i=this._options.Tokenizer),this._tokenizer=new i(this._options,this),this._cbs.onparserinit&&this._cbs.onparserinit(this)}var i=n(1143),o={input:!0,option:!0,optgroup:!0,select:!0,button:!0,datalist:!0,textarea:!0},a={tr:{tr:!0,th:!0,td:!0},th:{th:!0},td:{thead:!0,th:!0,td:!0},body:{head:!0,link:!0,script:!0},li:{li:!0},p:{p:!0},h1:{p:!0},h2:{p:!0},h3:{p:!0},h4:{p:!0},h5:{p:!0},h6:{p:!0},select:o,input:o,output:o,button:o,datalist:o,textarea:o,option:{option:!0},optgroup:{optgroup:!0}},s={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,path:!0,circle:!0,ellipse:!0,line:!0,rect:!0,use:!0,stop:!0,polyline:!0,polygon:!0},u=/\s|\//;n(328)(r,n(327).EventEmitter),r.prototype._updatePosition=function(e){null===this.endIndex?this._tokenizer._sectionStart<=e?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},r.prototype.ontext=function(e){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(e)},r.prototype.onopentagname=function(e){if(this._lowerCaseTagNames&&(e=e.toLowerCase()),this._tagname=e,!this._options.xmlMode&&e in a)for(var t;(t=this._stack[this._stack.length-1])in a[e];this.onclosetag(t));!this._options.xmlMode&&e in s||this._stack.push(e),this._cbs.onopentagname&&this._cbs.onopentagname(e),this._cbs.onopentag&&(this._attribs={})},r.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in s&&this._cbs.onclosetag(this._tagname),this._tagname=""},r.prototype.onclosetag=function(e){if(this._updatePosition(1),this._lowerCaseTagNames&&(e=e.toLowerCase()),!this._stack.length||e in s&&!this._options.xmlMode)this._options.xmlMode||"br"!==e&&"p"!==e||(this.onopentagname(e),this._closeCurrentTag());else{var t=this._stack.lastIndexOf(e);if(t!==-1)if(this._cbs.onclosetag)for(t=this._stack.length-t;t--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=t;else"p"!==e||this._options.xmlMode||(this.onopentagname(e),this._closeCurrentTag())}},r.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing?this._closeCurrentTag():this.onopentagend()},r.prototype._closeCurrentTag=function(){var e=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===e&&(this._cbs.onclosetag&&this._cbs.onclosetag(e),this._stack.pop())},r.prototype.onattribname=function(e){this._lowerCaseAttributeNames&&(e=e.toLowerCase()),this._attribname=e},r.prototype.onattribdata=function(e){this._attribvalue+=e},r.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname="",this._attribvalue=""},r.prototype._getInstructionName=function(e){var t=e.search(u),n=t<0?e:e.substr(0,t);return this._lowerCaseTagNames&&(n=n.toLowerCase()),n},r.prototype.ondeclaration=function(e){if(this._cbs.onprocessinginstruction){var t=this._getInstructionName(e);this._cbs.onprocessinginstruction("!"+t,"!"+e)}},r.prototype.onprocessinginstruction=function(e){if(this._cbs.onprocessinginstruction){var t=this._getInstructionName(e);this._cbs.onprocessinginstruction("?"+t,"?"+e)}},r.prototype.oncomment=function(e){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(e),this._cbs.oncommentend&&this._cbs.oncommentend()},r.prototype.oncdata=function(e){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(e),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment("[CDATA["+e+"]]")},r.prototype.onerror=function(e){this._cbs.onerror&&this._cbs.onerror(e)},r.prototype.onend=function(){if(this._cbs.onclosetag)for(var e=this._stack.length;e>0;this._cbs.onclosetag(this._stack[--e]));this._cbs.onend&&this._cbs.onend()},r.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname="",this._attribname="",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},r.prototype.parseComplete=function(e){this.reset(),this.end(e)},r.prototype.write=function(e){this._tokenizer.write(e)},r.prototype.end=function(e){this._tokenizer.end(e)},r.prototype.pause=function(){this._tokenizer.pause()},r.prototype.resume=function(){this._tokenizer.resume()},r.prototype.parseChunk=r.prototype.write,r.prototype.done=r.prototype.end,e.exports=r},function(e,t,n){function r(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function i(e,t){return function(n){n===e&&(this._state=t)}}function o(e,t,n){var r=e.toLowerCase();return e===r?function(e){e===r?this._state=t:(this._state=n,this._index--)}:function(i){i===r||i===e?this._state=t:(this._state=n,this._index--)}}function a(e,t){var n=e.toLowerCase();return function(r){r===n||r===e?this._state=t:(this._state=m,this._index--)}}function s(e,t){this._state=h,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=h,this._special=me,this._cbs=t,this._running=!0,this._ended=!1,this._xmlMode=!(!e||!e.xmlMode),this._decodeEntities=!(!e||!e.decodeEntities)}e.exports=s;var u=n(1144),c=n(1146),l=n(1147),p=n(1148),f=0,h=f++,d=f++,m=f++,v=f++,y=f++,g=f++,_=f++,b=f++,x=f++,w=f++,k=f++,S=f++,E=f++,C=f++,A=f++,T=f++,D=f++,M=f++,O=f++,P=f++,I=f++,N=f++,R=f++,j=f++,F=f++,B=f++,L=f++,z=f++,q=f++,U=f++,W=f++,K=f++,V=f++,H=f++,J=f++,G=f++,X=f++,Y=f++,$=f++,Z=f++,Q=f++,ee=f++,te=f++,ne=f++,re=f++,ie=f++,oe=f++,ae=f++,se=f++,ue=f++,ce=f++,le=f++,pe=f++,fe=f++,he=f++,de=0,me=de++,ve=de++,ye=de++;s.prototype._stateText=function(e){"<"===e?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=d,this._sectionStart=this._index):this._decodeEntities&&this._special===me&&"&"===e&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=h,this._state=ce,this._sectionStart=this._index)},s.prototype._stateBeforeTagName=function(e){"/"===e?this._state=y:"<"===e?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):">"===e||this._special!==me||r(e)?this._state=h:"!"===e?(this._state=A,this._sectionStart=this._index+1):"?"===e?(this._state=D,this._sectionStart=this._index+1):(this._state=this._xmlMode||"s"!==e&&"S"!==e?m:W,this._sectionStart=this._index)},s.prototype._stateInTagName=function(e){("/"===e||">"===e||r(e))&&(this._emitToken("onopentagname"),this._state=b,this._index--)},s.prototype._stateBeforeCloseingTagName=function(e){r(e)||(">"===e?this._state=h:this._special!==me?"s"===e||"S"===e?this._state=K:(this._state=h,this._index--):(this._state=g,this._sectionStart=this._index))},s.prototype._stateInCloseingTagName=function(e){(">"===e||r(e))&&(this._emitToken("onclosetag"),this._state=_,this._index--)},s.prototype._stateAfterCloseingTagName=function(e){">"===e&&(this._state=h,this._sectionStart=this._index+1)},s.prototype._stateBeforeAttributeName=function(e){">"===e?(this._cbs.onopentagend(),this._state=h,this._sectionStart=this._index+1):"/"===e?this._state=v:r(e)||(this._state=x,this._sectionStart=this._index)},s.prototype._stateInSelfClosingTag=function(e){">"===e?(this._cbs.onselfclosingtag(),this._state=h,this._sectionStart=this._index+1):r(e)||(this._state=b,this._index--)},s.prototype._stateInAttributeName=function(e){("="===e||"/"===e||">"===e||r(e))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=w,this._index--)},s.prototype._stateAfterAttributeName=function(e){"="===e?this._state=k:"/"===e||">"===e?(this._cbs.onattribend(),this._state=b,this._index--):r(e)||(this._cbs.onattribend(),this._state=x,this._sectionStart=this._index)},s.prototype._stateBeforeAttributeValue=function(e){'"'===e?(this._state=S,this._sectionStart=this._index+1):"'"===e?(this._state=E,this._sectionStart=this._index+1):r(e)||(this._state=C,this._sectionStart=this._index,this._index--)},s.prototype._stateInAttributeValueDoubleQuotes=function(e){'"'===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=b):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ce,this._sectionStart=this._index)},s.prototype._stateInAttributeValueSingleQuotes=function(e){"'"===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=b):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ce,this._sectionStart=this._index)},s.prototype._stateInAttributeValueNoQuotes=function(e){r(e)||">"===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=b,this._index--):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ce,this._sectionStart=this._index)},s.prototype._stateBeforeDeclaration=function(e){this._state="["===e?N:"-"===e?M:T},s.prototype._stateInDeclaration=function(e){">"===e&&(this._cbs.ondeclaration(this._getSection()),this._state=h,this._sectionStart=this._index+1)},s.prototype._stateInProcessingInstruction=function(e){">"===e&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=h,this._sectionStart=this._index+1)},s.prototype._stateBeforeComment=function(e){"-"===e?(this._state=O,this._sectionStart=this._index+1):this._state=T},s.prototype._stateInComment=function(e){"-"===e&&(this._state=P)},s.prototype._stateAfterComment1=function(e){"-"===e?this._state=I:this._state=O},s.prototype._stateAfterComment2=function(e){">"===e?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=h,this._sectionStart=this._index+1):"-"!==e&&(this._state=O)},s.prototype._stateBeforeCdata1=o("C",R,T),s.prototype._stateBeforeCdata2=o("D",j,T),s.prototype._stateBeforeCdata3=o("A",F,T),s.prototype._stateBeforeCdata4=o("T",B,T),s.prototype._stateBeforeCdata5=o("A",L,T),s.prototype._stateBeforeCdata6=function(e){"["===e?(this._state=z,this._sectionStart=this._index+1):(this._state=T,this._index--)},s.prototype._stateInCdata=function(e){"]"===e&&(this._state=q)},s.prototype._stateAfterCdata1=i("]",U),s.prototype._stateAfterCdata2=function(e){">"===e?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=h,this._sectionStart=this._index+1):"]"!==e&&(this._state=z)},s.prototype._stateBeforeSpecial=function(e){"c"===e||"C"===e?this._state=V:"t"===e||"T"===e?this._state=te:(this._state=m,this._index--)},s.prototype._stateBeforeSpecialEnd=function(e){this._special!==ve||"c"!==e&&"C"!==e?this._special!==ye||"t"!==e&&"T"!==e?this._state=h:this._state=oe:this._state=Y},s.prototype._stateBeforeScript1=a("R",H),s.prototype._stateBeforeScript2=a("I",J),s.prototype._stateBeforeScript3=a("P",G),s.prototype._stateBeforeScript4=a("T",X),s.prototype._stateBeforeScript5=function(e){("/"===e||">"===e||r(e))&&(this._special=ve),this._state=m,this._index--},s.prototype._stateAfterScript1=o("R",$,h),s.prototype._stateAfterScript2=o("I",Z,h),s.prototype._stateAfterScript3=o("P",Q,h),s.prototype._stateAfterScript4=o("T",ee,h),s.prototype._stateAfterScript5=function(e){">"===e||r(e)?(this._special=me,this._state=g,this._sectionStart=this._index-6,this._index--):this._state=h},s.prototype._stateBeforeStyle1=a("Y",ne),s.prototype._stateBeforeStyle2=a("L",re),s.prototype._stateBeforeStyle3=a("E",ie),s.prototype._stateBeforeStyle4=function(e){("/"===e||">"===e||r(e))&&(this._special=ye),this._state=m,this._index--},s.prototype._stateAfterStyle1=o("Y",ae,h),s.prototype._stateAfterStyle2=o("L",se,h),s.prototype._stateAfterStyle3=o("E",ue,h),s.prototype._stateAfterStyle4=function(e){">"===e||r(e)?(this._special=me,this._state=g,this._sectionStart=this._index-5,this._index--):this._state=h},s.prototype._stateBeforeEntity=o("#",le,pe),s.prototype._stateBeforeNumericEntity=o("X",he,fe),s.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+16&&(t=6);t>=2;){var n=this._buffer.substr(e,t);if(l.hasOwnProperty(n))return this._emitPartial(l[n]),void(this._sectionStart+=t+1);t--}},s.prototype._stateInNamedEntity=function(e){";"===e?(this._parseNamedEntityStrict(),this._sectionStart+1"z")&&(e<"A"||e>"Z")&&(e<"0"||e>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==h?"="!==e&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},s.prototype._decodeNumericEntity=function(e,t){var n=this._sectionStart+e;if(n!==this._index){var r=this._buffer.substring(n,this._index),i=parseInt(r,t);this._emitPartial(u(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},s.prototype._stateInNumericEntity=function(e){";"===e?(this._decodeNumericEntity(2,10),this._sectionStart++):(e<"0"||e>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},s.prototype._stateInHexEntity=function(e){";"===e?(this._decodeNumericEntity(3,16),this._sectionStart++):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},s.prototype._cleanup=function(){this._sectionStart<0?(this._buffer="",this._bufferOffset+=this._index,this._index=0):this._running&&(this._state===h?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer="",this._bufferOffset+=this._index,this._index=0):this._sectionStart===this._index?(this._buffer="",this._bufferOffset+=this._index,this._index=0):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},s.prototype.write=function(e){this._ended&&this._cbs.onerror(Error(".write() after done!")),this._buffer+=e,this._parse()},s.prototype._parse=function(){for(;this._index=55296&&e<=57343||e>1114111)return"�";e in i&&(e=i[e]);var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}var i=n(1145);e.exports=r},function(e,t){e.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},function(e,t){e.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(e,t){e.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},function(e,t){e.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},function(e,t,n){function r(e,t,n){"object"==typeof e?(n=t,t=e,e=null):"function"==typeof t&&(n=t,t=u),this._callback=e,this._options=t||u,this._elementCB=n,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=n(1150),o=/\s+/g,a=n(1151),s=n(1152),u={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1};r.prototype.onparserinit=function(e){this._parser=e},r.prototype.onreset=function(){r.call(this,this._callback,this._options,this._elementCB)},r.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},r.prototype._handleCallback=r.prototype.onerror=function(e){if("function"==typeof this._callback)this._callback(e,this.dom);else if(e)throw e},r.prototype.onclosetag=function(){var e=this._tagStack.pop();this._options.withEndIndices&&(e.endIndex=this._parser.endIndex),this._elementCB&&this._elementCB(e)},r.prototype._createDomElement=function(e){if(!this._options.withDomLvl1)return e;var t;t="tag"===e.type?Object.create(s):Object.create(a);for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},r.prototype._addDomElement=function(e){var t=this._tagStack[this._tagStack.length-1],n=t?t.children:this.dom,r=n[n.length-1];e.next=null,this._options.withStartIndices&&(e.startIndex=this._parser.startIndex),this._options.withEndIndices&&(e.endIndex=this._parser.endIndex),r?(e.prev=r,r.next=e):e.prev=null,n.push(e),e.parent=t||null},r.prototype.onopentag=function(e,t){var n={type:"script"===e?i.Script:"style"===e?i.Style:i.Tag,name:e,attribs:t,children:[]},r=this._createDomElement(n);this._addDomElement(r),this._tagStack.push(r)},r.prototype.ontext=function(e){var t,n=this._options.normalizeWhitespace||this._options.ignoreWhitespace;if(!this._tagStack.length&&this.dom.length&&(t=this.dom[this.dom.length-1]).type===i.Text)n?t.data=(t.data+e).replace(o," "):t.data+=e;else if(this._tagStack.length&&(t=this._tagStack[this._tagStack.length-1])&&(t=t.children[t.children.length-1])&&t.type===i.Text)n?t.data=(t.data+e).replace(o," "):t.data+=e;else{n&&(e=e.replace(o," "));var r=this._createDomElement({data:e,type:i.Text});this._addDomElement(r)}},r.prototype.oncomment=function(e){var t=this._tagStack[this._tagStack.length-1];if(t&&t.type===i.Comment)return void(t.data+=e);var n={data:e,type:i.Comment},r=this._createDomElement(n);this._addDomElement(r),this._tagStack.push(r)},r.prototype.oncdatastart=function(){var e={children:[{data:"",type:i.Text}],type:i.CDATA},t=this._createDomElement(e);this._addDomElement(t),this._tagStack.push(t)},r.prototype.oncommentend=r.prototype.oncdataend=function(){this._tagStack.pop()},r.prototype.onprocessinginstruction=function(e,t){var n=this._createDomElement({name:e,data:t,type:i.Directive});this._addDomElement(n)},e.exports=r},function(e,t){e.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(e){return"tag"===e.type||"script"===e.type||"style"===e.type}}},function(e,t){var n=e.exports={get firstChild(){var e=this.children;return e&&e[0]||null},get lastChild(){var e=this.children;return e&&e[e.length-1]||null},get nodeType(){return i[this.type]||i.element}},r={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},i={element:1,text:3,cdata:4,comment:8};Object.keys(r).forEach(function(e){var t=r[e];Object.defineProperty(n,e,{get:function(){return this[t]||null},set:function(e){return this[t]=e,e}})})},function(e,t,n){var r=n(1151),i=e.exports=Object.create(r),o={tagName:"name"};Object.keys(o).forEach(function(e){var t=o[e];Object.defineProperty(i,e,{ +get:function(){return this[t]||null},set:function(e){return this[t]=e,e}})})},function(e,t,n){function r(e,t){this.init(e,t)}function i(e,t){return l.getElementsByTagName(e,t,!0)}function o(e,t){return l.getElementsByTagName(e,t,!0,1)[0]}function a(e,t,n){return l.getText(l.getElementsByTagName(e,t,n,1)).trim()}function s(e,t,n,r,i){var o=a(n,r,i);o&&(e[t]=o)}var u=n(1141),c=u.DomHandler,l=u.DomUtils;n(328)(r,c),r.prototype.init=c;var p=function(e){return"rss"===e||"feed"===e||"rdf:RDF"===e};r.prototype.onend=function(){var e,t,n={},r=o(p,this.dom);r&&("feed"===r.name?(t=r.children,n.type="atom",s(n,"id","id",t),s(n,"title","title",t),(e=o("link",t))&&(e=e.attribs)&&(e=e.href)&&(n.link=e),s(n,"description","subtitle",t),(e=a("updated",t))&&(n.updated=new Date(e)),s(n,"author","email",t,!0),n.items=i("entry",t).map(function(e){var t,n={};return e=e.children,s(n,"id","id",e),s(n,"title","title",e),(t=o("link",e))&&(t=t.attribs)&&(t=t.href)&&(n.link=t),(t=a("summary",e)||a("content",e))&&(n.description=t),(t=a("updated",e))&&(n.pubDate=new Date(t)),n})):(t=o("channel",r.children).children,n.type=r.name.substr(0,3),n.id="",s(n,"title","title",t),s(n,"link","link",t),s(n,"description","description",t),(e=a("lastBuildDate",t))&&(n.updated=new Date(e)),s(n,"author","managingEditor",t,!0),n.items=i("item",r.children).map(function(e){var t,n={};return e=e.children,s(n,"id","guid",e),s(n,"title","title",e),s(n,"link","link",e),s(n,"description","description",e),(t=a("pubDate",e))&&(n.pubDate=new Date(t)),n}))),this.dom=n,c.prototype._handleCallback.call(this,r?null:Error("couldn't find root of feed"))},e.exports=r},function(e,t,n){function r(e){o.call(this,new i(this),e)}function i(e){this.scope=e}e.exports=r;var o=n(1155);n(328)(r,o),r.prototype.readable=!0;var a=n(1141).EVENTS;Object.keys(a).forEach(function(e){if(0===a[e])i.prototype["on"+e]=function(){this.scope.emit(e)};else if(1===a[e])i.prototype["on"+e]=function(t){this.scope.emit(e,t)};else{if(2!==a[e])throw Error("wrong number of arguments!");i.prototype["on"+e]=function(t,n){this.scope.emit(e,t,n)}}})},function(e,t,n){function r(e,t){var n=this._parser=new i(e,t),r=this._decoder=new a;o.call(this,{decodeStrings:!1}),this.once("finish",function(){n.end(r.end())})}e.exports=r;var i=n(1142),o=n(326).Writable||n(1156).Writable,a=n(343).StringDecoder,s=n(132).Buffer;n(328)(r,o),o.prototype._write=function(e,t,n){e instanceof s&&(e=this._decoder.write(e)),this._parser.write(e),n()}},335,function(e,t,n){function r(e){this._cbs=e||{}}e.exports=r;var i=n(1141).EVENTS;Object.keys(i).forEach(function(e){if(0===i[e])e="on"+e,r.prototype[e]=function(){this._cbs[e]&&this._cbs[e]()};else if(1===i[e])e="on"+e,r.prototype[e]=function(t){this._cbs[e]&&this._cbs[e](t)};else{if(2!==i[e])throw Error("wrong number of arguments");e="on"+e,r.prototype[e]=function(t,n){this._cbs[e]&&this._cbs[e](t,n)}}})},function(e,t,n){var r=e.exports;[n(1159),n(1165),n(1166),n(1167),n(1168),n(1169)].forEach(function(e){Object.keys(e).forEach(function(t){r[t]=e[t].bind(r)})})},function(e,t,n){function r(e,t){return e.children?e.children.map(function(e){return a(e,t)}).join(""):""}function i(e){return Array.isArray(e)?e.map(i).join(""):s(e)?"br"===e.name?"\n":i(e.children):e.type===o.CDATA?i(e.children):e.type===o.Text?e.data:""}var o=n(1150),a=n(1160),s=o.isTag;e.exports={getInnerHTML:r,getOuterHTML:a,getText:i}},function(e,t,n){function r(e,t){if(e){var n,r="";for(var i in e)n=e[i],r&&(r+=" "),r+=!n&&p[i]?i:i+'="'+(t.decodeEntities?l.encodeXML(n):n)+'"';return r}}function i(e,t){"svg"===e.name&&(t={decodeEntities:t.decodeEntities,xmlMode:!0});var n="<"+e.name,i=r(e.attribs,t);return i&&(n+=" "+i),!t.xmlMode||e.children&&0!==e.children.length?(n+=">",e.children&&(n+=d(e.children,t)),h[e.name]&&!t.xmlMode||(n+="")):n+="/>",n}function o(e){return"<"+e.data+">"}function a(e,t){var n=e.data||"";return!t.decodeEntities||e.parent&&e.parent.name in f||(n=l.encodeXML(n)),n}function s(e){return""}function u(e){return""}var c=n(1161),l=n(1162),p={__proto__:null,allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,loop:!0,multiple:!0,muted:!0,open:!0,readonly:!0,required:!0,reversed:!0,scoped:!0,seamless:!0,selected:!0,typemustmatch:!0},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},h={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},d=e.exports=function(e,t){Array.isArray(e)||e.cheerio||(e=[e]),t=t||{};for(var n="",r=0;r0&&(o=i(e,o,n,r),a=a.concat(o),r-=o.length,r<=0)));s++);return a}function o(e,t){for(var n=0,r=t.length;n0&&(n=a(e,t[r].children)));return n}function s(e,t){for(var n=0,r=t.length;n0&&s(e,t[n].children)))return!0;return!1}function u(e,t){for(var n=[],r=[t];r.length;){for(var i=r.pop(),o=0,a=i.length;o0;)i[a].children&&i[a].children.length>0&&r.push(i[a].children)}return n}var c=n(1150).isTag;e.exports={filter:r,find:i,findOneChild:o,findOne:a,existsOne:s,findAll:u}},function(e,t,n){function r(e,t){return"function"==typeof t?function(n){return n.attribs&&t(n.attribs[e])}:function(n){return n.attribs&&n.attribs[e]===t}}function i(e,t){return function(n){return e(n)||t(n)}}var o=n(1150),a=t.isTag=o.isTag;t.testElement=function(e,t){for(var n in e)if(e.hasOwnProperty(n)){if("tag_name"===n){if(!a(t)||!e.tag_name(t.name))return!1}else if("tag_type"===n){if(!e.tag_type(t.type))return!1}else if("tag_contains"===n){if(a(t)||!e.tag_contains(t.data))return!1}else if(!t.attribs||!e[n](t.attribs[n]))return!1}else;return!0};var s={tag_name:function(e){return"function"==typeof e?function(t){return a(t)&&e(t.name)}:"*"===e?a:function(t){return a(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return!a(t)&&e(t.data)}:function(t){return!a(t)&&t.data===e}}};t.getElements=function(e,t,n,o){var a=Object.keys(e).map(function(t){var n=e[t];return t in s?s[t](n):r(t,n)});return 0===a.length?[]:this.filter(a.reduce(i),t,n,o)},t.getElementById=function(e,t,n){return Array.isArray(t)||(t=[t]),this.findOne(r("id",e),t,n!==!1)},t.getElementsByTagName=function(e,t,n,r){return this.filter(s.tag_name(e),t,n,r)},t.getElementsByTagType=function(e,t,n,r){return this.filter(s.tag_type(e),t,n,r)}},function(e,t){t.removeSubsets=function(e){for(var t,n,r,i=e.length;--i>-1;){for(t=n=e[i],e[i]=null,r=!0;n;){if(e.indexOf(n)>-1){r=!1,e.splice(i,1);break}n=n.parent}r&&(e[i]=t)}return e};var n={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16},r=t.compareDocumentPosition=function(e,t){var r,i,o,a,s,u,c=[],l=[];if(e===t)return 0;for(r=e;r;)c.unshift(r),r=r.parent;for(r=t;r;)l.unshift(r),r=r.parent;for(u=0;c[u]===l[u];)u++;return 0===u?n.DISCONNECTED:(i=c[u-1],o=i.children,a=c[u],s=l[u],o.indexOf(a)>o.indexOf(s)?i===t?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:i===e?n.PRECEDING|n.CONTAINS:n.PRECEDING)};t.uniqueSort=function(e){var t,i,o=e.length;for(e=e.slice();--o>-1;)t=e[o],i=e.indexOf(t),i>-1&&i-1}var o=n(r);e.exports=i},function(e,t,n,r){function i(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var o=n(r);e.exports=i},function(e,t,n,r,i){var o=n(r),a=n(i),s=o(a,"Map");e.exports=s},function(e,t,n,r){function i(e){var t=o(this,e).delete(e);return this.size-=t?1:0,t}var o=n(r);e.exports=i},function(e,t,n,r){function i(e,t){var n=e.__data__;return o(t)?n["string"==typeof t?"string":"hash"]:n.map}var o=n(r);e.exports=i},function(e,t,n,r){function i(e){return o(this,e).get(e)}var o=n(r);e.exports=i},function(e,t,n,r){function i(e){return o(this,e).has(e)}var o=n(r);e.exports=i},function(e,t,n,r){function i(e,t){var n=o(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var o=n(r);e.exports=i},function(e,t,n,r,i,o){function a(e){return function(t,n,r){var i=Object(t);if(!u(t)){var o=s(n,3);t=c(t),n=function(e){return o(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[o?t[a]:a]:void 0}}var s=n(r),u=n(i),c=n(o);e.exports=a},function(e,t,n,r,i,o,a,s){function u(e){return"function"==typeof e?e:null==e?p:"object"==typeof e?f(e)?l(e[0],e[1]):c(e):h(e)}var c=n(r),l=n(i),p=n(o),f=n(a),h=n(s);e.exports=u},function(e,t,n,r,i,o){function a(e){var t=u(e);return 1==t.length&&t[0][2]?c(t[0][0],t[0][1]):function(n){return n===e||s(n,e,t)}}var s=n(r),u=n(i),c=n(o);e.exports=a},function(e,t,n,r,i,o,a,s,u){function c(e){var t=this.__data__=new l(e);this.size=t.size}var l=n(r),p=n(i),f=n(o),h=n(a),d=n(s),m=n(u);c.prototype.clear=p,c.prototype.delete=f,c.prototype.get=h,c.prototype.has=d,c.prototype.set=m,e.exports=c},function(e,t,n,r){function i(){this.__data__=new o,this.size=0}var o=n(r);e.exports=i},function(e,t,n,r,i,o){function a(e,t){var n=this.__data__;if(n instanceof s){var r=n.__data__;if(!u||r.length0&&n(l)?t>1?o(l,t-1,n,r,i):a(i,l):r||(i[i.length]=l)}return i}var a=n(r),s=n(i);e.exports=o},function(e,t,n,r,i,o){function a(e){return c(e)||u(e)||!!(l&&e&&e[l])}var s=n(r),u=n(i),c=n(o),l=s?s.isConcatSpreadable:void 0;e.exports=a},function(e,t,n,r){function i(e,t,n){return t=a(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=a(r.length-t,0),u=Array(s);++i=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(19),i=n(20);e.exports=function(e){return function(t,n){var o,s,a=String(i(t)),u=r(n),c=a.length;return u<0||u>=c?e?"":void 0:(o=a.charCodeAt(u),o<55296||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?e?a.charAt(u):o:e?a.slice(u,u+2):(o-55296<<10)+(s-56320)+65536)}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(22),i=n(23),o=n(10),s=n(11),a=n(26),u=n(27),c=n(28),l=n(29),h=n(12).getProto,p=n(6)("iterator"),f=!([].keys&&"next"in[].keys()),d="@@iterator",m="keys",g="values",x=function(){return this};e.exports=function(e,t,n,y,v,b,D){c(n,t,y);var w,E,k=function(e){if(!f&&e in F)return F[e];switch(e){case m:return function(){return new n(this,e)};case g:return function(){return new n(this,e)}}return function(){return new n(this,e)}},A=t+" Iterator",C=v==g,S=!1,F=e.prototype,T=F[p]||F[d]||v&&F[v],B=T||k(v);if(T){var N=h(B.call(new e));l(N,A,!0),!r&&a(F,d)&&s(N,p,x),C&&T.name!==g&&(S=!0,B=function(){return T.call(this)})}if(r&&!D||!f&&!S&&F[p]||s(F,p,B),u[t]=B,u[A]=x,v)if(w={values:C?B:k(g),keys:b?B:k(m),entries:C?k("entries"):B},D)for(E in w)E in F||o(F,E,w[E]);else i(i.P+i.F*(f||S),t,w);return w}},function(e,t){e.exports=!1},function(e,t,n){var r=n(8),i=n(16),o=n(11),s=n(10),a=n(24),u="prototype",c=function(e,t,n){var l,h,p,f,d=e&c.F,m=e&c.G,g=e&c.S,x=e&c.P,y=e&c.B,v=m?r:g?r[t]||(r[t]={}):(r[t]||{})[u],b=m?i:i[t]||(i[t]={}),D=b[u]||(b[u]={});m&&(n=t);for(l in n)h=!d&&v&&l in v,p=(h?v:n)[l],f=y&&h?a(p,r):x&&"function"==typeof p?a(Function.call,p):p,v&&!h&&s(v,l,p),b[l]!=p&&o(b,l,f),x&&D[l]!=p&&(D[l]=p)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,e.exports=c},function(e,t,n){var r=n(25);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(12),i=n(13),o=n(29),s={};n(11)(s,n(6)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r.create(s,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(12).setDesc,i=n(26),o=n(6)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){n(31);var r=n(8),i=n(11),o=n(27),s=n(6)("iterator"),a=r.NodeList,u=r.HTMLCollection,c=a&&a.prototype,l=u&&u.prototype,h=o.NodeList=o.HTMLCollection=o.Array;c&&!c[s]&&i(c,s,h),l&&!l[s]&&i(l,s,h)},function(e,t,n){"use strict";var r=n(32),i=n(33),o=n(27),s=n(34);e.exports=n(21)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var r=n(6)("unscopables"),i=Array.prototype;void 0==i[r]&&n(11)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(35),i=n(20);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(5);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){"use strict";var r,i=n(12),o=n(22),s=n(8),a=n(24),u=n(4),c=n(23),l=n(37),h=n(38),p=n(25),f=n(39),d=n(40),m=n(45).set,g=n(46),x=n(6)("species"),y=n(47),v=n(48),b="Promise",D=s.process,w="process"==u(D),E=s[b],k=function(){},A=function(e){var t,n=new E(k);return e&&(n.constructor=function(e){e(k,k)}),(t=E.resolve(n)).catch(k),t===n},C=function(){function e(t){var n=new E(t);return m(n,e.prototype),n}var t=!1;try{if(t=E&&E.resolve&&A(),m(e,E),e.prototype=i.create(E.prototype,{constructor:{value:e}}),e.resolve(5).then(function(){})instanceof e||(t=!1),t&&n(14)){var r=!1;E.resolve(i.setDesc({},"then",{get:function(){r=!0}})),t=r}}catch(e){t=!1}return t}(),S=function(e,t){return!(!o||e!==E||t!==r)||g(e,t)},F=function(e){var t=h(e)[x];return void 0!=t?t:e},T=function(e){var t;return!(!l(e)||"function"!=typeof(t=e.then))&&t},B=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=p(t),this.reject=p(n)},N=function(e){try{e()}catch(e){return{error:e}}},I=function(e,t){if(!e.n){e.n=!0;var n=e.c;v(function(){for(var r=e.v,i=1==e.s,o=0,a=function(t){var n,o,s=i?t.ok:t.fail,a=t.resolve,u=t.reject;try{s?(i||(e.h=!0),n=s===!0?r:s(r),n===t.promise?u(TypeError("Promise-chain cycle")):(o=T(n))?o.call(n,a,u):a(n)):u(r)}catch(e){u(e)}};n.length>o;)a(n[o++]);n.length=0,e.n=!1,t&&setTimeout(function(){var t,n,i=e.p;P(i)&&(w?D.emit("unhandledRejection",r,i):(t=s.onunhandledrejection)?t({promise:i,reason:r}):(n=s.console)&&n.error&&n.error("Unhandled promise rejection",r)),e.a=void 0},1)})}},P=function(e){var t,n=e._d,r=n.a||n.c,i=0;if(n.h)return!1;for(;r.length>i;)if(t=r[i++],t.fail||!P(t.promise))return!1;return!0},M=function(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,t.a=t.c.slice(),I(t,!0))},O=function(e){var t,n=this;if(!n.d){n.d=!0,n=n.r||n;try{if(n.p===e)throw TypeError("Promise can't be resolved itself");(t=T(e))?v(function(){var r={r:n,d:!1};try{t.call(e,a(O,r,1),a(M,r,1))}catch(e){M.call(r,e)}}):(n.v=e,n.s=1,I(n,!1))}catch(e){M.call({r:n,d:!1},e)}}};C||(E=function(e){p(e);var t=this._d={p:f(this,E,b),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};try{e(a(O,t,1),a(M,t,1))}catch(e){M.call(t,e)}},n(53)(E.prototype,{then:function(e,t){var n=new B(y(this,E)),r=n.promise,i=this._d;return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,i.c.push(n),i.a&&i.a.push(n),i.s&&I(i,!1),r},catch:function(e){return this.then(void 0,e)}})),c(c.G+c.W+c.F*!C,{Promise:E}),n(29)(E,b),n(54)(b),r=n(16)[b],c(c.S+c.F*!C,b,{reject:function(e){var t=new B(this),n=t.reject;return n(e),t.promise}}),c(c.S+c.F*(!C||A(!0)),b,{resolve:function(e){if(e instanceof E&&S(e.constructor,this))return e;var t=new B(this),n=t.resolve;return n(e),t.promise}}),c(c.S+c.F*!(C&&n(55)(function(e){E.all(e).catch(function(){})})),b,{all:function(e){var t=F(this),n=new B(t),r=n.resolve,o=n.reject,s=[],a=N(function(){d(e,!1,s.push,s);var n=s.length,a=Array(n);n?i.each.call(s,function(e,i){var s=!1;t.resolve(e).then(function(e){s||(s=!0,a[i]=e,--n||r(a))},o)}):r(a)});return a&&o(a.error),n.promise},race:function(e){var t=F(this),n=new B(t),r=n.reject,i=N(function(){d(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(37);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError(n+": use the 'new' operator!");return e}},function(e,t,n){var r=n(24),i=n(41),o=n(42),s=n(38),a=n(43),u=n(44);e.exports=function(e,t,n,c){var l,h,p,f=u(e),d=r(n,c,t?2:1),m=0;if("function"!=typeof f)throw TypeError(e+" is not iterable!");if(o(f))for(l=a(e.length);l>m;m++)t?d(s(h=e[m])[0],h[1]):d(e[m]);else for(p=f.call(e);!(h=p.next()).done;)i(p,d,h.value,t)}},function(e,t,n){var r=n(38);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(27),i=n(6)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){var r=n(19),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(4),i=n(6)("iterator"),o=n(27);e.exports=n(16).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(12).getDesc,i=n(37),o=n(38),s=function(e,t){if(o(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){try{i=n(24)(Function.call,r(Object.prototype,"__proto__").set,2),i(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return s(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:s}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(38),i=n(25),o=n(6)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||void 0==(n=r(s)[o])?t:i(n)}},function(e,t,n){var r,i,o,s=n(8),a=n(49).set,u=s.MutationObserver||s.WebKitMutationObserver,c=s.process,l=s.Promise,h="process"==n(5)(c),p=function(){var e,t,n;for(h&&(e=c.domain)&&(c.domain=null,e.exit());r;)t=r.domain,n=r.fn,t&&t.enter(),n(),t&&t.exit(),r=r.next;i=void 0,e&&e.enter()};if(h)o=function(){c.nextTick(p)};else if(u){var f=1,d=document.createTextNode("");new u(p).observe(d,{characterData:!0}),o=function(){d.data=f=-f}}else o=l&&l.resolve?function(){l.resolve().then(p)}:function(){a.call(s,p)};e.exports=function(e){var t={fn:e,next:void 0,domain:h&&c.domain};i&&(i.next=t),r||(r=t,o()),i=t}},function(e,t,n){var r,i,o,s=n(24),a=n(50),u=n(51),c=n(52),l=n(8),h=l.process,p=l.setImmediate,f=l.clearImmediate,d=l.MessageChannel,m=0,g={},x="onreadystatechange",y=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},v=function(e){y.call(e.data)};p&&f||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++m]=function(){a("function"==typeof e?e:Function(e),t)},r(m),m},f=function(e){delete g[e]},"process"==n(5)(h)?r=function(e){h.nextTick(s(y,e,1))}:d?(i=new d,o=i.port2,i.port1.onmessage=v,r=s(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",v,!1)):r=x in c("script")?function(e){u.appendChild(c("script"))[x]=function(){u.removeChild(this),y.call(e)}}:function(e){setTimeout(s(y,e,1),0)}),e.exports={set:p,clear:f}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){e.exports=n(8).document&&document.documentElement},function(e,t,n){var r=n(37),i=n(8).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(10);e.exports=function(e,t){for(var n in t)r(e,n,t[n]);return e}},function(e,t,n){"use strict";var r=n(8),i=n(12),o=n(14),s=n(6)("species");e.exports=function(e){var t=r[e];o&&t&&!t[s]&&i.setDesc(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(6)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},e(o)}catch(e){}return n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(57),o=r(i);n(174);var s=n(178),a=r(s),u=n(181),c=r(u),l=[a.default,c.default,function(){return{components:{StandaloneLayout:o.default}}}];e.exports=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(58),o=r(i),s=n(84),a=r(s),u=n(85),c=r(u),l=n(89),h=r(l),p=n(136),f=r(p),d=n(144),m=r(d),g=function(e){function t(){return(0,a.default)(this,t),(0,h.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,f.default)(t,e),(0,c.default)(t,[{key:"render",value:function(){var e=this.props,t=e.getComponent,n=e.specSelectors,r=t("Container"),i=t("Row"),o=t("Col"),s=t("Topbar",!0),a=t("BaseLayout",!0),u=t("onlineValidatorBadge",!0),c=n.loadingStatus();return m.default.createElement(r,{className:"swagger-ui"},s?m.default.createElement(s,null):null,"loading"===c&&m.default.createElement("div",{className:"info"},m.default.createElement("h4",{className:"title"},"Loading...")),"failed"===c&&m.default.createElement("div",{className:"info"},m.default.createElement("h4",{className:"title"},"Failed to load spec.")),"failedConfig"===c&&m.default.createElement("div",{className:"info",style:{maxWidth:"880px",marginLeft:"auto",marginRight:"auto",textAlign:"center"}},m.default.createElement("h4",{className:"title"},"Failed to load config.")),!c||"success"===c&&m.default.createElement(a,null),m.default.createElement(i,null,m.default.createElement(o,null,m.default.createElement(u,null))))}}]),t}(m.default.Component);g.propTypes={errSelectors:d.PropTypes.object.isRequired,errActions:d.PropTypes.object.isRequired,specActions:d.PropTypes.object.isRequired,specSelectors:d.PropTypes.object.isRequired,layoutSelectors:d.PropTypes.object.isRequired,layoutActions:d.PropTypes.object.isRequired,getComponent:d.PropTypes.func.isRequired},t.default=g},function(e,t,n){e.exports={default:n(59),__esModule:!0}},function(e,t,n){n(60),e.exports=n(71).Object.getPrototypeOf},function(e,t,n){var r=n(61),i=n(63);n(69)("getPrototypeOf",function(){return function(e){return i(r(e))}})},function(e,t,n){var r=n(62);e.exports=function(e){return Object(r(e))}},20,function(e,t,n){var r=n(64),i=n(61),o=n(65)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},26,function(e,t,n){var r=n(66)("keys"),i=n(68);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(67),i="__core-js_shared__",o=r[i]||(r[i]={});e.exports=function(e){return o[e]||(o[e]={})}},8,9,function(e,t,n){var r=n(70),i=n(71),o=n(80);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],s={};s[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",s)}},function(e,t,n){var r=n(67),i=n(71),o=n(72),s=n(74),a="prototype",u=function(e,t,n){var c,l,h,p=e&u.F,f=e&u.G,d=e&u.S,m=e&u.P,g=e&u.B,x=e&u.W,y=f?i:i[t]||(i[t]={}),v=y[a],b=f?r:d?r[t]:(r[t]||{})[a];f&&(n=t);for(c in n)l=!p&&b&&void 0!==b[c],l&&c in y||(h=l?b[c]:n[c],y[c]=f&&"function"!=typeof b[c]?n[c]:g&&l?o(h,r):x&&b[c]==h?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[a]=e[a],t}(h):m&&"function"==typeof h?o(Function.call,h):h,m&&((y.virtual||(y.virtual={}))[c]=h,e&u.R&&v&&!v[c]&&s(v,c,h)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(73);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},25,function(e,t,n){var r=n(75),i=n(83);e.exports=n(79)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(76),i=n(78),o=n(82),s=Object.defineProperty;t.f=n(79)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(77);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},37,function(e,t,n){e.exports=!n(79)&&!n(80)(function(){return 7!=Object.defineProperty(n(81)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){e.exports=!n(80)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},15,function(e,t,n){var r=n(77),i=n(67).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(77);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},13,function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(86),o=r(i);t.default=function(){function e(e,t){for(var n=0;n=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(95),i=n(62);e.exports=function(e){return function(t,n){var o,s,a=String(i(t)),u=r(n),c=a.length;return u<0||u>=c?e?"":void 0:(o=a.charCodeAt(u),o<55296||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?e?a.charAt(u):o:e?a.slice(u,u+2):(o-55296<<10)+(s-56320)+65536)}}},19,function(e,t,n){"use strict";var r=n(97),i=n(70),o=n(98),s=n(74),a=n(64),u=n(99),c=n(100),l=n(113),h=n(63),p=n(114)("iterator"),f=!([].keys&&"next"in[].keys()),d="@@iterator",m="keys",g="values",x=function(){return this};e.exports=function(e,t,n,y,v,b,D){c(n,t,y);var w,E,k,A=function(e){if(!f&&e in T)return T[e];switch(e){case m:return function(){return new n(this,e)};case g:return function(){return new n(this,e)}}return function(){return new n(this,e)}},C=t+" Iterator",S=v==g,F=!1,T=e.prototype,B=T[p]||T[d]||v&&T[v],N=B||A(v),I=v?S?A("entries"):N:void 0,P="Array"==t?T.entries||B:B;if(P&&(k=h(P.call(new e)),k!==Object.prototype&&(l(k,C,!0),r||a(k,p)||s(k,p,x))),S&&B&&B.name!==g&&(F=!0,N=function(){return B.call(this)}),r&&!D||!f&&!F&&T[p]||s(T,p,N),u[t]=N,u[C]=x,v)if(w={values:S?N:A(g),keys:b?N:A(m),entries:I},D)for(E in w)E in T||o(T,E,w[E]);else i(i.P+i.F*(f||F),t,w);return w}},function(e,t){e.exports=!0},function(e,t,n){e.exports=n(74)},27,function(e,t,n){"use strict";var r=n(101),i=n(83),o=n(113),s={};n(74)(s,n(114)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(s,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(76),i=n(102),o=n(111),s=n(65)("IE_PROTO"),a=function(){},u="prototype",c=function(){var e,t=n(81)("iframe"),r=o.length,i="<",s=">";for(t.style.display="none",n(112).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(i+"script"+s+"document.F=Object"+i+"/script"+s),e.close(),c=e.F;r--;)delete c[u][o[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(a[u]=r(e),n=new a,a[u]=null,n[s]=e):n=c(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(75),i=n(76),o=n(103);e.exports=n(79)?Object.defineProperties:function(e,t){i(e);for(var n,s=o(t),a=s.length,u=0;a>u;)r.f(e,n=s[u++],t[n]);return e}},function(e,t,n){var r=n(104),i=n(111);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(64),i=n(105),o=n(108)(!1),s=n(65)("IE_PROTO");e.exports=function(e,t){var n,a=i(e),u=0,c=[];for(n in a)n!=s&&r(a,n)&&c.push(n);for(;t.length>u;)r(a,n=t[u++])&&(~o(c,n)||c.push(n));return c}},function(e,t,n){var r=n(106),i=n(62);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(107);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},5,function(e,t,n){var r=n(105),i=n(109),o=n(110);e.exports=function(e){return function(t,n,s){var a,u=r(t),c=i(u.length),l=o(s,c);if(e&&n!=n){for(;c>l;)if(a=u[l++],a!=a)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n){var r=n(95),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(95),i=Math.max,o=Math.min;e.exports=function(e,t){return e=r(e),e<0?i(e+t,0):o(e,t)}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){e.exports=n(67).document&&document.documentElement},function(e,t,n){var r=n(75).f,i=n(64),o=n(114)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(66)("wks"),i=n(68),o=n(67).Symbol,s="function"==typeof o,a=e.exports=function(e){return r[e]||(r[e]=s&&o[e]||(s?o:i)("Symbol."+e))};a.store=r},function(e,t,n){n(116);for(var r=n(67),i=n(74),o=n(99),s=n(114)("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=a[u],l=r[c],h=l&&l.prototype;h&&!h[s]&&i(h,s,c),o[c]=o.Array}},function(e,t,n){"use strict";var r=n(117),i=n(118),o=n(99),s=n(105);e.exports=n(96)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},33,function(e,t,n){t.f=n(114)},function(e,t,n){e.exports={default:n(121),__esModule:!0}},function(e,t,n){n(122),n(133),n(134),n(135),e.exports=n(71).Symbol},function(e,t,n){"use strict";var r=n(67),i=n(64),o=n(79),s=n(70),a=n(98),u=n(123).KEY,c=n(80),l=n(66),h=n(113),p=n(68),f=n(114),d=n(119),m=n(124),g=n(125),x=n(126),y=n(129),v=n(76),b=n(105),D=n(82),w=n(83),E=n(101),k=n(130),A=n(132),C=n(75),S=n(103),F=A.f,T=C.f,B=k.f,N=r.Symbol,I=r.JSON,P=I&&I.stringify,M="prototype",O=f("_hidden"),_=f("toPrimitive"),L={}.propertyIsEnumerable,R=l("symbol-registry"),U=l("symbols"),j=l("op-symbols"),z=Object[M],J="function"==typeof N,X=r.QObject,Y=!X||!X[M]||!X[M].findChild,K=o&&c(function(){return 7!=E(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=F(z,t);r&&delete z[t],T(e,t,n),r&&e!==z&&T(z,t,r)}:T,W=function(e){var t=U[e]=E(N[M]);return t._k=e,t},H=J&&"symbol"==typeof N.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof N},q=function(e,t,n){return e===z&&q(j,t,n),v(e),t=D(t,!0),v(n),i(U,t)?(n.enumerable?(i(e,O)&&e[O][t]&&(e[O][t]=!1),n=E(n,{enumerable:w(0,!1)})):(i(e,O)||T(e,O,w(1,{})),e[O][t]=!0),K(e,t,n)):T(e,t,n)},G=function(e,t){v(e);for(var n,r=x(t=b(t)),i=0,o=r.length;o>i;)q(e,n=r[i++],t[n]);return e},V=function(e,t){return void 0===t?E(e):G(E(e),t)},$=function(e){var t=L.call(this,e=D(e,!0));return!(this===z&&i(U,e)&&!i(j,e))&&(!(t||!i(this,e)||!i(U,e)||i(this,O)&&this[O][e])||t)},Z=function(e,t){if(e=b(e),t=D(t,!0),e!==z||!i(U,t)||i(j,t)){var n=F(e,t);return!n||!i(U,t)||i(e,O)&&e[O][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=B(b(e)),r=[],o=0;n.length>o;)i(U,t=n[o++])||t==O||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===z,r=B(n?j:b(e)),o=[],s=0;r.length>s;)!i(U,t=r[s++])||n&&!i(z,t)||o.push(U[t]);return o};J||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===z&&t.call(j,n),i(this,O)&&i(this[O],e)&&(this[O][e]=!1),K(this,e,w(1,n))};return o&&Y&&K(z,e,{configurable:!0,set:t}),W(e)},a(N[M],"toString",function(){return this._k}),A.f=Z,C.f=q,n(131).f=k.f=Q,n(128).f=$,n(127).f=ee,o&&!n(97)&&a(z,"propertyIsEnumerable",$,!0),d.f=function(e){return W(f(e))}),s(s.G+s.W+s.F*!J,{Symbol:N});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)f(te[ne++]);for(var te=S(f.store),ne=0;te.length>ne;)m(te[ne++]);s(s.S+s.F*!J,"Symbol",{for:function(e){return i(R,e+="")?R[e]:R[e]=N(e)},keyFor:function(e){if(H(e))return g(R,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),s(s.S+s.F*!J,"Object",{create:V,defineProperty:q,defineProperties:G,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:ee}),I&&s(s.S+s.F*(!J||c(function(){var e=N();return"[null]"!=P([e])||"{}"!=P({a:e})||"{}"!=P(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!H(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return t=r[1],"function"==typeof t&&(n=t),!n&&y(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!H(t))return t}),r[1]=t,P.apply(I,r)}}}),N[M][_]||n(74)(N[M],_,N[M].valueOf),h(N,"Symbol"),h(Math,"Math",!0),h(r.JSON,"JSON",!0)},function(e,t,n){var r=n(68)("meta"),i=n(77),o=n(64),s=n(75).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(80)(function(){return u(Object.preventExtensions({}))}),l=function(e){s(e,r,{value:{i:"O"+ ++a,w:{}}})},h=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[r].i},p=function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[r].w},f=function(e){return c&&d.NEED&&u(e)&&!o(e,r)&&l(e),e},d=e.exports={KEY:r,NEED:!1,fastKey:h,getWeak:p,onFreeze:f}},function(e,t,n){var r=n(67),i=n(71),o=n(97),s=n(119),a=n(75).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}},function(e,t,n){var r=n(103),i=n(105);e.exports=function(e,t){for(var n,o=i(e),s=r(o),a=s.length,u=0;a>u;)if(o[n=s[u++]]===t)return n}},function(e,t,n){var r=n(103),i=n(127),o=n(128);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var s,a=n(e),u=o.f,c=0;a.length>c;)u.call(e,s=a[c++])&&t.push(s);return t}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(107);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(105),i=n(131).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return i(e)}catch(e){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==o.call(e)?a(e):i(r(e))}},function(e,t,n){var r=n(104),i=n(111).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(128),i=n(83),o=n(105),s=n(82),a=n(64),u=n(78),c=Object.getOwnPropertyDescriptor;t.f=n(79)?c:function(e,t){if(e=o(e),t=s(t,!0),u)try{return c(e,t)}catch(e){}if(a(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t){},function(e,t,n){n(124)("asyncIterator")},function(e,t,n){n(124)("observable")},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(137),o=r(i),s=n(141),a=r(s),u=n(90),c=r(u);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,c.default)(t)));e.prototype=(0,a.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0 +}}),t&&(o.default?(0,o.default)(e,t):e.__proto__=t)}},function(e,t,n){e.exports={default:n(138),__esModule:!0}},function(e,t,n){n(139),e.exports=n(71).Object.setPrototypeOf},function(e,t,n){var r=n(70);r(r.S,"Object",{setPrototypeOf:n(140).set})},function(e,t,n){var r=n(77),i=n(76),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(72)(Function.call,n(132).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){e.exports={default:n(142),__esModule:!0}},function(e,t,n){n(143);var r=n(71).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(70);r(r.S,"Object",{create:n(101)})},function(e,t,n){"use strict";e.exports=n(145)},function(e,t,n){"use strict";var r=n(146),i=n(147),o=n(156),s=n(164),a=n(158),u=n(165),c=n(170),l=n(171),h=n(173),p=a.createElement,f=a.createFactory,d=a.cloneElement,m=r,g=function(e){return e},x={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:h},Component:i.Component,PureComponent:i.PureComponent,createElement:p,cloneElement:d,isValidElement:a.isValidElement,PropTypes:u,createClass:l,createFactory:f,createMixin:g,DOM:s,version:c,__spread:m};e.exports=x},function(e,t){/* + object-assign + (c) Sindre Sorhus + @license MIT + */ +"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,u=n(e),c=1;c1){for(var g=Array(m),x=0;x1){for(var v=Array(y),b=0;blabel{font-size:12px;font-weight:700;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:-20px 15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scheme-container .schemes>label select{min-width:130px;text-transform:uppercase}.swagger-ui .loading-container{padding:40px 0 60px}.swagger-ui .loading-container .loading{position:relative}.swagger-ui .loading-container .loading:after{font-size:10px;font-weight:700;position:absolute;top:50%;left:50%;content:\"loading\";-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);text-transform:uppercase;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .loading-container .loading:before{position:absolute;top:50%;left:50%;display:block;width:60px;height:60px;margin:-30px;content:\"\";-webkit-animation:rotation 1s infinite linear,opacity .5s;animation:rotation 1s infinite linear,opacity .5s;opacity:1;border:2px solid rgba(85,85,85,.1);border-top-color:rgba(0,0,0,.6);border-radius:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden}@-webkit-keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes blinker{50%{opacity:0}}@keyframes blinker{50%{opacity:0}}.swagger-ui .btn{font-size:14px;font-weight:700;padding:5px 23px;transition:all .3s;border:2px solid #888;border-radius:4px;background:transparent;box-shadow:0 1px 2px rgba(0,0,0,.1);font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .btn[disabled]{cursor:not-allowed;opacity:.3}.swagger-ui .btn:hover{box-shadow:0 0 5px rgba(0,0,0,.3)}.swagger-ui .btn.cancel{border-color:#ff6060;font-family:Titillium Web,sans-serif;color:#ff6060}.swagger-ui .btn.authorize{line-height:1;display:inline;color:#49cc90;border-color:#49cc90}.swagger-ui .btn.authorize span{float:left;padding:4px 20px 0 0}.swagger-ui .btn.authorize svg{fill:#49cc90}.swagger-ui .btn.execute{-webkit-animation:swagger-ui-pulse 2s infinite;animation:swagger-ui-pulse 2s infinite;color:#fff;border-color:#4990e2}@-webkit-keyframes swagger-ui-pulse{0%{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,.8)}70%{box-shadow:0 0 0 5px rgba(73,144,226,0)}to{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,0)}}@keyframes swagger-ui-pulse{0%{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,.8)}70%{box-shadow:0 0 0 5px rgba(73,144,226,0)}to{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,0)}}.swagger-ui .btn-group{display:-webkit-box;display:-ms-flexbox;display:flex;padding:30px}.swagger-ui .btn-group .btn{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui .btn-group .btn:first-child{border-radius:4px 0 0 4px}.swagger-ui .btn-group .btn:last-child{border-radius:0 4px 4px 0}.swagger-ui .authorization__btn{padding:0 10px;border:none;background:none}.swagger-ui .authorization__btn.locked{opacity:1}.swagger-ui .authorization__btn.unlocked{opacity:.4}.swagger-ui .expand-methods,.swagger-ui .expand-operation{border:none;background:none}.swagger-ui .expand-methods svg,.swagger-ui .expand-operation svg{width:20px;height:20px}.swagger-ui .expand-methods{padding:0 10px}.swagger-ui .expand-methods:hover svg{fill:#444}.swagger-ui .expand-methods svg{transition:all .3s;fill:#777}.swagger-ui button{cursor:pointer;outline:none}.swagger-ui select{font-size:14px;font-weight:700;padding:5px 40px 5px 10px;border:2px solid #41444e;border-radius:4px;background:#f7f7f7 url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+ICAgIDxwYXRoIGQ9Ik0xMy40MTggNy44NTljLjI3MS0uMjY4LjcwOS0uMjY4Ljk3OCAwIC4yNy4yNjguMjcyLjcwMSAwIC45NjlsLTMuOTA4IDMuODNjLS4yNy4yNjgtLjcwNy4yNjgtLjk3OSAwbC0zLjkwOC0zLjgzYy0uMjctLjI2Ny0uMjctLjcwMSAwLS45NjkuMjcxLS4yNjguNzA5LS4yNjguOTc4IDBMMTAgMTFsMy40MTgtMy4xNDF6Ii8+PC9zdmc+) right 10px center no-repeat;background-size:20px;box-shadow:0 1px 2px 0 rgba(0,0,0,.25);font-family:Titillium Web,sans-serif;color:#3b4151;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swagger-ui select[multiple]{margin:5px 0;padding:5px;background:#f7f7f7}.swagger-ui .opblock-body select{min-width:230px}.swagger-ui label{font-size:12px;font-weight:700;margin:0 0 5px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui input[type=email],.swagger-ui input[type=password],.swagger-ui input[type=search],.swagger-ui input[type=text]{min-width:100px;margin:5px 0;padding:8px 10px;border:1px solid #d9d9d9;border-radius:4px;background:#fff}.swagger-ui input[type=email].invalid,.swagger-ui input[type=password].invalid,.swagger-ui input[type=search].invalid,.swagger-ui input[type=text].invalid{-webkit-animation:shake .4s 1;animation:shake .4s 1;border-color:#f93e3e;background:#feebeb}@-webkit-keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}@keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}.swagger-ui textarea{font-size:12px;width:100%;min-height:280px;padding:10px;border:none;border-radius:4px;outline:none;background:hsla(0,0%,100%,.8);font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui textarea:focus{border:2px solid #61affe}.swagger-ui textarea.curl{font-size:12px;min-height:100px;margin:0;padding:10px;resize:none;border-radius:4px;background:#41444e;font-family:Source Code Pro,monospace;font-weight:600;color:#fff}.swagger-ui .checkbox{padding:5px 0 10px;transition:opacity .5s;color:#333}.swagger-ui .checkbox label{display:-webkit-box;display:-ms-flexbox;display:flex}.swagger-ui .checkbox p{font-weight:400!important;font-style:italic;margin:0!important;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .checkbox input[type=checkbox]{display:none}.swagger-ui .checkbox input[type=checkbox]+label>.item{position:relative;top:3px;display:inline-block;width:16px;height:16px;margin:0 8px 0 0;padding:5px;cursor:pointer;border-radius:1px;background:#e8e8e8;box-shadow:0 0 0 2px #e8e8e8;-webkit-box-flex:0;-ms-flex:none;flex:none}.swagger-ui .checkbox input[type=checkbox]+label>.item:active{-webkit-transform:scale(.9);transform:scale(.9)}.swagger-ui .checkbox input[type=checkbox]:checked+label>.item{background:#e8e8e8 url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='10' height='8' viewBox='3 7 10 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%2341474E' fill-rule='evenodd' d='M6.333 15L3 11.667l1.333-1.334 2 2L11.667 7 13 8.333z'/%3E%3C/svg%3E\") 50% no-repeat}.swagger-ui .dialog-ux{position:fixed;z-index:9999;top:0;right:0;bottom:0;left:0}.swagger-ui .dialog-ux .backdrop-ux{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.8)}.swagger-ui .dialog-ux .modal-ux{position:absolute;z-index:9999;top:50%;left:50%;width:100%;min-width:300px;max-width:650px;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border:1px solid #ebebeb;border-radius:4px;background:#fff;box-shadow:0 10px 30px 0 rgba(0,0,0,.2)}.swagger-ui .dialog-ux .modal-ux-content{overflow-y:auto;max-height:540px;padding:20px}.swagger-ui .dialog-ux .modal-ux-content p{font-size:12px;margin:0 0 5px;color:#41444e;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-content h4{font-size:18px;font-weight:600;margin:15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-header{display:-webkit-box;display:-ms-flexbox;display:flex;padding:12px 0;border-bottom:1px solid #ebebeb;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .dialog-ux .modal-ux-header .close-modal{padding:0 10px;border:none;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swagger-ui .dialog-ux .modal-ux-header h3{font-size:20px;font-weight:600;margin:0;padding:0 20px;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .model{font-size:12px;font-weight:300;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .model-toggle{font-size:10px;position:relative;top:6px;display:inline-block;margin:auto .3em;cursor:pointer;transition:-webkit-transform .15s ease-in;transition:transform .15s ease-in;transition:transform .15s ease-in,-webkit-transform .15s ease-in;-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}.swagger-ui .model-toggle.collapsed{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.swagger-ui .model-toggle:after{display:block;width:20px;height:20px;content:\"\";background:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E\") 50% no-repeat;background-size:100%}.swagger-ui .model-jump-to-path{position:relative;cursor:pointer}.swagger-ui .model-jump-to-path .view-line-link{position:absolute;top:-.4em;cursor:pointer}.swagger-ui .model-title{position:relative}.swagger-ui .model-title:hover .model-hint{visibility:visible}.swagger-ui .model-hint{position:absolute;top:-1.8em;visibility:hidden;padding:.1em .5em;white-space:nowrap;color:#ebebeb;border-radius:4px;background:rgba(0,0,0,.7)}.swagger-ui section.models{margin:30px 0;border:1px solid rgba(59,65,81,.3);border-radius:4px}.swagger-ui section.models.is-open{padding:0 0 20px}.swagger-ui section.models.is-open h4{margin:0 0 5px;border-bottom:1px solid rgba(59,65,81,.3)}.swagger-ui section.models.is-open h4 svg{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.swagger-ui section.models h4{font-size:16px;display:-webkit-box;display:-ms-flexbox;display:flex;margin:0;padding:10px 20px 10px 10px;cursor:pointer;transition:all .2s;font-family:Titillium Web,sans-serif;color:#777;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui section.models h4 svg{transition:all .4s}.swagger-ui section.models h4 span{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui section.models h4:hover{background:rgba(0,0,0,.02)}.swagger-ui section.models h5{font-size:16px;margin:0 0 10px;font-family:Titillium Web,sans-serif;color:#777}.swagger-ui section.models .model-jump-to-path{position:relative;top:5px}.swagger-ui section.models .model-container{margin:0 20px 15px;transition:all .5s;border-radius:4px;background:rgba(0,0,0,.05)}.swagger-ui section.models .model-container:hover{background:rgba(0,0,0,.07)}.swagger-ui section.models .model-container:first-of-type{margin:20px}.swagger-ui section.models .model-container:last-of-type{margin:0 20px}.swagger-ui section.models .model-box{background:none}.swagger-ui .model-box{padding:10px;border-radius:4px;background:rgba(0,0,0,.1)}.swagger-ui .model-box .model-jump-to-path{position:relative;top:4px}.swagger-ui .model-title{font-size:16px;font-family:Titillium Web,sans-serif;color:#555}.swagger-ui span>span.model,.swagger-ui span>span.model .brace-close{padding:0 0 0 10px}.swagger-ui .prop-type{color:#55a}.swagger-ui .prop-enum{display:block}.swagger-ui .prop-format{color:#999}.swagger-ui table{width:100%;padding:0 10px;border-collapse:collapse}.swagger-ui table.model tbody tr td{padding:0;vertical-align:top}.swagger-ui table.model tbody tr td:first-of-type{width:100px;padding:0}.swagger-ui table.headers td{font-size:12px;font-weight:300;vertical-align:middle;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui table tbody tr td{padding:10px 0 0;vertical-align:top}.swagger-ui table tbody tr td:first-of-type{width:20%;padding:10px 0}.swagger-ui table thead tr td,.swagger-ui table thead tr th{font-size:12px;font-weight:700;padding:12px 0;text-align:left;border-bottom:1px solid rgba(59,65,81,.2);font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description p{font-size:14px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description input[type=text]{width:100%;max-width:340px}.swagger-ui .parameter__name{font-size:16px;font-weight:400;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .parameter__name.required{font-weight:700}.swagger-ui .parameter__name.required:after{font-size:10px;position:relative;top:-6px;padding:5px;content:\"required\";color:rgba(255,0,0,.6)}.swagger-ui .parameter__in{font-size:12px;font-style:italic;font-family:Source Code Pro,monospace;font-weight:600;color:#888}.swagger-ui .table-container{padding:20px}.swagger-ui .topbar{padding:8px 30px;background-color:#89bf04}.swagger-ui .topbar .topbar-wrapper{-ms-flex-align:center}.swagger-ui .topbar .topbar-wrapper,.swagger-ui .topbar a{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;align-items:center}.swagger-ui .topbar a{font-size:1.5em;font-weight:700;max-width:300px;text-decoration:none;-webkit-box-flex:1;-ms-flex:1;flex:1;-ms-flex-align:center;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .topbar a span{margin:0;padding:0 10px}.swagger-ui .topbar .download-url-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:3;-ms-flex:3;flex:3}.swagger-ui .topbar .download-url-wrapper input[type=text]{width:100%;min-width:350px;margin:0;border:2px solid #547f00;border-radius:4px 0 0 4px;outline:none}.swagger-ui .topbar .download-url-wrapper .download-url-button{font-size:16px;font-weight:700;padding:4px 40px;border:none;border-radius:0 4px 4px 0;background:#547f00;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .info{margin:50px 0}.swagger-ui .info hgroup.main{margin:0 0 20px}.swagger-ui .info hgroup.main a{font-size:12px}.swagger-ui .info li,.swagger-ui .info p,.swagger-ui .info table{font-size:14px;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info h1,.swagger-ui .info h2,.swagger-ui .info h3,.swagger-ui .info h4,.swagger-ui .info h5{font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info code{padding:3px 5px;border-radius:4px;background:rgba(0,0,0,.05);font-family:Source Code Pro,monospace;font-weight:600;color:#9012fe}.swagger-ui .info a{font-size:14px;transition:all .4s;font-family:Open Sans,sans-serif;color:#4990e2}.swagger-ui .info a:hover{color:#1f69c0}.swagger-ui .info>div{margin:0 0 5px}.swagger-ui .info .base-url{font-size:12px;font-weight:300!important;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .info .title{font-size:36px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info .title small{font-size:10px;position:relative;top:-5px;display:inline-block;margin:0 0 0 5px;padding:2px 4px;vertical-align:super;border-radius:57px;background:#7d8492}.swagger-ui .info .title small pre{margin:0;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .auth-btn-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px 0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.swagger-ui .auth-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.swagger-ui .auth-wrapper .authorize{padding-right:20px}.swagger-ui .auth-container{margin:0 0 10px;padding:10px 20px;border-bottom:1px solid #ebebeb}.swagger-ui .auth-container:last-of-type{margin:0;padding:10px 20px;border:0}.swagger-ui .auth-container h4{margin:5px 0 15px!important}.swagger-ui .auth-container .wrapper{margin:0;padding:0}.swagger-ui .auth-container input[type=password],.swagger-ui .auth-container input[type=text]{min-width:230px}.swagger-ui .auth-container .errors{font-size:12px;padding:10px;border-radius:4px;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .scopes h2{font-size:14px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scope-def{padding:0 0 20px}.swagger-ui .errors-wrapper{margin:20px;padding:10px 20px;-webkit-animation:scaleUp .5s;animation:scaleUp .5s;border:2px solid #f93e3e;border-radius:4px;background:rgba(249,62,62,.1)}.swagger-ui .errors-wrapper .error-wrapper{margin:0 0 10px}.swagger-ui .errors-wrapper .errors h4{font-size:14px;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .errors-wrapper .errors small{color:#666}.swagger-ui .errors-wrapper hgroup{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .errors-wrapper hgroup h4{font-size:20px;margin:0;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}@-webkit-keyframes scaleUp{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes scaleUp{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}",""]); +},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t=0&&v.splice(t,1)}function a(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function u(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function c(e,t){var n,r,i;if(t.singleton){var o=y++;n=x||(x=a(t)),r=l.bind(null,n,o,!1),i=l.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),r=p.bind(null,n),i=function(){s(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(t),r=h.bind(null,n),i=function(){s(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function l(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var o=document.createTextNode(i),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(o,s[t]):e.appendChild(o)}}function h(e,t){var n=t.css,r=t.media;t.sourceMap;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function p(e,t){var n=t.css,r=(t.media,t.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var f={},d=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),g=d(function(){return document.head||document.getElementsByTagName("head")[0]}),x=null,y=0,v=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=i(e);return r(n,t),function(e){for(var o=[],s=0;s=400?(i.updateLoadingStatus("failedConfig"),i.updateLoadingStatus("failedConfig"),i.updateUrl(""),console.error(n.statusText+" "+e),t(null)):t(c(n.text))}var i=n.specActions;if(e)return i.downloadConfig(e).then(r,r)}}},r={getLocalConfig:function(){return c(u.default)}};return{statePlugins:{spec:{actions:n,selectors:r}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(182),s=r(o),a=n(217),u=r(a),c=function(e,t){try{return s.default.safeLoad(e)}catch(e){return t&&t.errActions.newThrownErr(new Error(e)),{}}}},function(e,t,n){"use strict";var r=n(183);e.exports=r},function(e,t,n){"use strict";function r(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var i=n(184),o=n(216);e.exports.Type=n(190),e.exports.Schema=n(189),e.exports.FAILSAFE_SCHEMA=n(193),e.exports.JSON_SCHEMA=n(192),e.exports.CORE_SCHEMA=n(191),e.exports.DEFAULT_SAFE_SCHEMA=n(188),e.exports.DEFAULT_FULL_SCHEMA=n(211),e.exports.load=i.load,e.exports.loadAll=i.loadAll,e.exports.safeLoad=i.safeLoad,e.exports.safeLoadAll=i.safeLoadAll,e.exports.dump=o.dump,e.exports.safeDump=o.safeDump,e.exports.YAMLException=n(186),e.exports.MINIMAL_SCHEMA=n(193),e.exports.SAFE_SCHEMA=n(188),e.exports.DEFAULT_SCHEMA=n(211),e.exports.scan=r("scan"),e.exports.parse=r("parse"),e.exports.compose=r("compose"),e.exports.addConstructor=r("addConstructor")},function(e,t,n){"use strict";function r(e){return 10===e||13===e}function i(e){return 9===e||32===e}function o(e){return 9===e||32===e||10===e||13===e}function s(e){return 44===e||91===e||93===e||123===e||125===e}function a(e){var t;return 48<=e&&e<=57?e-48:(t=32|e,97<=t&&t<=102?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function c(e){return 48<=e&&e<=57?e-48:-1}function l(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function h(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function p(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Y,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function f(e,t){return new z(t,new J(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function d(e,t){throw f(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,f(e,t))}function g(e,t,n,r){var i,o,s,a;if(t1&&(e.result+=j.repeat("\n",t-1))}function E(e,t,n){var a,u,c,l,h,p,f,d,m,x=e.kind,y=e.result;if(m=e.input.charCodeAt(e.position),o(m)||s(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=e.input.charCodeAt(e.position+1),o(u)||n&&s(u)))return!1;for(e.kind="scalar",e.result="",c=l=e.position,h=!1;0!==m;){if(58===m){if(u=e.input.charCodeAt(e.position+1),o(u)||n&&s(u))break}else if(35===m){if(a=e.input.charCodeAt(e.position-1),o(a))break}else{if(e.position===e.lineStart&&D(e)||n&&s(m))break;if(r(m)){if(p=e.line,f=e.lineStart,d=e.lineIndent,b(e,!1,-1),e.lineIndent>=t){h=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=p,e.lineStart=f,e.lineIndent=d;break}}h&&(g(e,c,l,!1),w(e,e.line-p),c=l=e.position,h=!1),i(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,c,l,!1),!!e.result||(e.kind=x,e.result=y,!1)}function k(e,t){var n,i,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(g(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;i=e.position,e.position++,o=e.position}else r(n)?(g(e,i,o,!0),w(e,b(e,!1,t)),i=o=e.position):e.position===e.lineStart&&D(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function A(e,t){var n,i,o,s,c,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return g(e,n,e.position,!0),e.position++,!0;if(92===l){if(g(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),r(l))b(e,!1,t);else if(l<256&&ie[l])e.result+=oe[l],e.position++;else if((c=u(l))>0){for(o=c,s=0;o>0;o--)l=e.input.charCodeAt(++e.position),(c=a(l))>=0?s=(s<<4)+c:d(e,"expected hexadecimal character");e.result+=h(s),e.position++}else d(e,"unknown escape sequence");n=i=e.position}else r(l)?(g(e,n,i,!0),w(e,b(e,!1,t)),n=i=e.position):e.position===e.lineStart&&D(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function C(e,t){var n,r,i,s,a,u,c,l,h,p,f,m=!0,g=e.tag,x=e.anchor,v={};if(f=e.input.charCodeAt(e.position),91===f)s=93,c=!1,r=[];else{if(123!==f)return!1;s=125,c=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),f=e.input.charCodeAt(++e.position);0!==f;){if(b(e,!0,t),f=e.input.charCodeAt(e.position),f===s)return e.position++,e.tag=g,e.anchor=x,e.kind=c?"mapping":"sequence",e.result=r,!0;m||d(e,"missed comma between flow collection entries"),h=l=p=null,a=u=!1,63===f&&(i=e.input.charCodeAt(e.position+1),o(i)&&(a=u=!0,e.position++,b(e,!0,t))),n=e.line,P(e,t,W,!1,!0),h=e.tag,l=e.result,b(e,!0,t),f=e.input.charCodeAt(e.position),!u&&e.line!==n||58!==f||(a=!0,f=e.input.charCodeAt(++e.position),b(e,!0,t),P(e,t,W,!1,!0),p=e.result),c?y(e,r,v,h,l,p):a?r.push(y(e,null,v,h,l,p)):r.push(l),b(e,!0,t),f=e.input.charCodeAt(e.position),44===f?(m=!0,f=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function S(e,t){var n,o,s,a,u=V,l=!1,h=!1,p=t,f=0,m=!1;if(a=e.input.charCodeAt(e.position),124===a)o=!1;else{if(62!==a)return!1;o=!0}for(e.kind="scalar",e.result="";0!==a;)if(a=e.input.charCodeAt(++e.position),43===a||45===a)V===u?u=43===a?Z:$:d(e,"repeat of a chomping mode identifier");else{if(!((s=c(a))>=0))break;0===s?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):h?d(e,"repeat of an indentation width identifier"):(p=t+s-1,h=!0)}if(i(a)){do a=e.input.charCodeAt(++e.position);while(i(a));if(35===a)do a=e.input.charCodeAt(++e.position);while(!r(a)&&0!==a)}for(;0!==a;){for(v(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!h||e.lineIndentp&&(p=e.lineIndent),r(a))f++;else{if(e.lineIndentt)&&0!==i)d(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(P(e,t,G,!0,s)&&(v?g=e.result:x=e.result),v||(y(e,p,f,m,g,x,a,u),m=g=x=null),b(e,!0,-1),c=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==c)d(e,"bad indentation of a mapping entry");else if(e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndent tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):d(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function M(e){var t,n,s,a,u=e.position,c=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(a=e.input.charCodeAt(e.position))&&(b(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==a));){for(c=!0,a=e.input.charCodeAt(++e.position),t=e.position;0!==a&&!o(a);)a=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),s=[],n.length<1&&d(e,"directive name must not be less than one character in length");0!==a;){for(;i(a);)a=e.input.charCodeAt(++e.position);if(35===a){do a=e.input.charCodeAt(++e.position);while(0!==a&&!r(a));break}if(r(a))break;for(t=e.position;0!==a&&!o(a);)a=e.input.charCodeAt(++e.position);s.push(e.input.slice(t,e.position))}0!==a&&v(e),K.call(ae,n)?ae[n](e,n,s):m(e,'unknown document directive "'+n+'"')}return b(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,b(e,!0,-1)):c&&d(e,"directives end mark is expected"),P(e,e.lineIndent-1,G,!1,!0),b(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(u,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&D(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,b(e,!0,-1))):void(e.position0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(r-1))===-1;)if(r-=1,this.position-r>t/2-1){n=" ... ",r+=5;break}for(o="",s=this.position;st/2-1){o=" ... ",s-=5;break}return a=this.buffer.slice(r,s),i.repeat(" ",e)+n+a+o+"\n"+i.repeat(" ",e+this.position-r+n.length)+"^"},r.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},e.exports=r},function(e,t,n){"use strict";var r=n(189);e.exports=new r({include:[n(191)],implicit:[n(201),n(202)],explicit:[n(203),n(208),n(209),n(210)]})},function(e,t,n){"use strict";function r(e,t,n){var i=[];return e.include.forEach(function(e){n=r(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&t.kind===e.kind&&i.push(n)}),n.push(e)}),n.filter(function(e,t){return i.indexOf(t)===-1})}function i(){function e(e){r[e.kind][e.tag]=r.fallback[e.tag]=e}var t,n,r={scalar:{},sequence:{},mapping:{},fallback:{}};for(t=0,n=arguments.length;t=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){i.unshift(parseFloat(e,10))}),t=0,r=1,i.forEach(function(e){t+=e*r,r*=60}),n*t):n*parseFloat(t,10)}function o(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(a.isNegativeZero(e))return"-0.0";return n=e.toString(10),l.test(n)?n.replace("e",".e"):n}function s(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||a.isNegativeZero(e))}var a=n(185),u=n(190),c=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;e.exports=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o,defaultStyle:"lowercase"})},function(e,t,n){"use strict";function r(e){return null!==e&&(null!==a.exec(e)||null!==u.exec(e))}function i(e){var t,n,r,i,o,s,c,l,h,p,f=0,d=null;if(t=a.exec(e),null===t&&(t=u.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],s=+t[5],c=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(l=+t[10],h=+(t[11]||0),d=6e4*(60*l+h),"-"===t[9]&&(d=-d)),p=new Date(Date.UTC(n,r,i,o,s,c,f)),d&&p.setTime(p.getTime()-d),p}function o(e){return e.toISOString()}var s=n(190),a=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),u=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new s("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:o})},function(e,t,n){"use strict";function r(e){return"<<"===e||null===e}var i=n(190);e.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})},function(e,t,n){function r(e){if(null===e)return!1;var t,n,r=0,i=e.length,o=c;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8===0}function i(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=c,s=0,u=[];for(t=0;t>16&255),u.push(s>>8&255),u.push(255&s)),s=s<<6|o.indexOf(r.charAt(t));return n=i%4*6,0===n?(u.push(s>>16&255),u.push(s>>8&255),u.push(255&s)):18===n?(u.push(s>>10&255),u.push(s>>2&255)):12===n&&u.push(s>>4&255),a?a.from?a.from(u):new a(u):u}function o(e){var t,n,r="",i=0,o=e.length,s=c;for(t=0;t>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]),i=(i<<8)+e[t];return n=o%3,0===n?(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]):2===n?(r+=s[i>>10&63],r+=s[i>>4&63],r+=s[i<<2&63],r+=s[64]):1===n&&(r+=s[i>>2&63],r+=s[i<<4&63],r+=s[64],r+=s[64]),r}function s(e){return a&&a.isBuffer(e)}var a;try{a=n(204).Buffer}catch(e){}var u=n(190),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o})},function(e,t,n){(function(e){/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function i(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),s.alloc(+e)}function x(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return K(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return N(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return F(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:D(e,t,n,r,i);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):D(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function D(e,t,n,r,i){function o(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,a=e.length,u=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;ca&&(n=a-u),c=n;c>=0;c--){for(var h=!0,p=0;pi&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s239?4:o>223?3:o>191?2:1;if(i+a<=n){var u,c,l,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],128===(192&u)&&(h=(31&o)<<6|63&u,h>127&&(s=h));break;case 3:u=e[i+1],c=e[i+2],128===(192&u)&&128===(192&c)&&(h=(15&o)<<12|(63&u)<<6|63&c,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(h=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l,h>65535&&h<1114112&&(s=h))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return B(r)}function B(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function _(e,t,n,r,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function U(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,i){return i||U(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,n,r,23,4),n+4}function z(e,t,n,r,i){return i||U(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,n,r,52,8),n+8}function J(e){if(e=X(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function X(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],s=0;s55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function q(e){return $.toByteArray(J(e))}function G(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function V(e){return e!==e}var $=n(205),Z=n(206),Q=n(207);t.Buffer=s,t.SlowBuffer=g,t.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),t.kMaxLength=i(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,n){return a(null,e,t,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,n){return c(null,e,t,n)},s.allocUnsafe=function(e){return l(null,e)},s.allocUnsafeSlow=function(e){return l(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,r,i){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,a=n-t,u=Math.min(o,a),c=this.slice(r,i),l=e.slice(t,n),h=0;hi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":return k(this,e,t,n);case"latin1":case"binary":return A(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;s.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),Z.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),Z.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),Z.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),Z.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;_(this,e,t,n,i,0)}var o=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+o]=e/s&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||_(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||_(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||_(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||_(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||_(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);_(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);_(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||_(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||_(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||_(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||_(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-n(e)}function i(e){var t,r,i,o,s,a=e.length;o=n(e),s=new l(3*a/4-o),r=o>0?a-4:a;var u=0;for(t=0;t>16&255,s[u++]=i>>8&255,s[u++]=255&i;return 2===o?(i=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,s[u++]=255&i):1===o&&(i=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,s[u++]=i>>8&255,s[u++]=255&i),s}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function s(e,t,n){for(var r,i=[],s=t;sl?l:c+a));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),o.push(i),o.join("")}t.byteLength=r,t.toByteArray=i,t.fromByteArray=a;for(var u=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,f=h.length;p>1,l=-7,h=n?i-1:0,p=n?-1:1,f=e[t+h];for(h+=p,o=f&(1<<-l)-1,f>>=-l,l+=a;l>0;o=256*o+e[t+h],h+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+e[t+h],h+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:(f?-1:1)*(1/0);s+=Math.pow(2,r),o-=c}return(f?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+h>=1?p/u:p*Math.pow(2,1-h),t*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(t*u-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[n+f]=255&a,f+=d,a/=256,i-=8);for(s=s<0;e[n+f]=255&s,f+=d,s/=256,c-=8);e[n+f-d]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,o,u=[],c=e;for(t=0,n=c.length;t3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0}function i(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function o(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function s(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var a=n(190);e.exports=new a("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o})},function(e,t,n){function r(e){if(null===e)return!1;try{var t="("+e+")",n=a.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&"FunctionExpression"===n.body[0].expression.type}catch(e){return!1}}function i(e){var t,n="("+e+")",r=a.parse(n,{range:!0}),i=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(e){i.push(e.name)}),t=r.body[0].expression.body.range,new Function(i,n.slice(t[0]+1,t[1]-1))}function o(e){return e.toString()}function s(e){return"[object Function]"===Object.prototype.toString.call(e)}var a;try{a=n(215)}catch(e){"undefined"!=typeof window&&(a=window.esprima)}var u=n(190);e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o})},function(e,t,n){!function(t,n){e.exports=n()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e,t,n){var r=null,i=function(e,t){n&&n(e,t),r&&r.visit(e,t)},u="function"==typeof n?i:null,c=!1;if(t){c="boolean"==typeof t.comment&&t.comment;var l="boolean"==typeof t.attachComment&&t.attachComment;(c||l)&&(r=new o.CommentHandler,r.attach=l,t.comment=!0,u=i)}var h;h=t&&"boolean"==typeof t.jsx&&t.jsx?new a.JSXParser(e,t,u):new s.Parser(e,t,u);var p=h.parseProgram();return c&&(p.comments=r.comments),h.config.tokens&&(p.tokens=h.tokens),h.config.tolerant&&(p.errors=h.errorHandler.errors),p}function i(e,t,n){var r,i=new u.Tokenizer(e,t);r=[];try{for(;;){var o=i.getNextToken();if(!o)break;n&&(o=n(o)),r.push(o)}}catch(e){i.errorHandler.tolerate(e)}return i.errorHandler.tolerant&&(r.errors=i.errors()),r}var o=n(1),s=n(3),a=n(11),u=n(15);t.parse=r,t.tokenize=i;var c=n(2);t.Syntax=c.Syntax,t.version="3.1.3"},function(e,t,n){"use strict";var r=n(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===r.Syntax.BlockStatement&&0===e.body.length){for(var n=[],i=this.leading.length-1;i>=0;--i){var o=this.leading[i];t.end.offset>=o.start&&(n.unshift(o.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e,t){var n=[];if(this.trailing.length>0){for(var r=this.trailing.length-1;r>=0;--r){var i=this.trailing[r];i.start>=t.end.offset&&n.unshift(i.comment)}return this.trailing.length=0,n}var o=this.stack[this.stack.length-1];if(o&&o.node.trailingComments){var s=o.node.trailingComments[0];s&&s.range[0]>=t.end.offset&&(n=o.node.trailingComments,delete o.node.trailingComments)}return n},e.prototype.findLeadingComments=function(e,t){for(var n,r=[];this.stack.length>0;){var i=this.stack[this.stack.length-1];if(!(i&&i.start>=t.start.offset))break;n=this.stack.pop().node}if(n){for(var o=n.leadingComments?n.leadingComments.length:0,s=o-1;s>=0;--s){var a=n.leadingComments[s];a.range[1]<=t.start.offset&&(r.unshift(a),n.leadingComments.splice(s,1))}return n.leadingComments&&0===n.leadingComments.length&&delete n.leadingComments,r}for(var s=this.leading.length-1;s>=0;--s){var i=this.leading[s];i.start<=t.start.offset&&(r.unshift(i.comment),this.leading.splice(s,1))}return r},e.prototype.visitNode=function(e,t){if(!(e.type===r.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(e,t),i=this.findLeadingComments(e,t);i.length>0&&(e.leadingComments=i),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=n,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type?this.visitComment(e,t):"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var r=n(4),i=n(5),o=n(6),s=n(7),a=n(8),u=n(2),c=n(10),l="ArrowParameterPlaceHolder",h=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new o.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new a.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2, +"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.sourceType=t&&"module"===t.sourceType?"module":"script",this.lookahead=null,this.hasLineTerminator=!1,this.context={allowIn:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:"module"===this.sourceType},this.tokens=[],this.startMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.lastMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.nextToken(),this.lastMarker={index:this.scanner.index,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type===s.Token.EOF||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.lineNumber=this.startMarker.lineNumber,this.lastMarker.lineStart=this.startMarker.lineStart)},e.prototype.parsePrimaryExpression=function(){var e,t,n,r,o=this.createNode();switch(this.lookahead.type){case s.Token.Identifier:"module"===this.sourceType&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.finalize(o,new c.Identifier(this.nextToken().value));break;case s.Token.NumericLiteral:case s.Token.StringLiteral:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),r=this.getTokenRaw(n),e=this.finalize(o,new c.Literal(n.value,r));break;case s.Token.BooleanLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),n.value="true"===n.value,r=this.getTokenRaw(n),e=this.finalize(o,new c.Literal(n.value,r));break;case s.Token.NullLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),n.value=null,r=this.getTokenRaw(n),e=this.finalize(o,new c.Literal(n.value,r));break;case s.Token.Template:e=this.parseTemplateLiteral();break;case s.Token.Punctuator:switch(t=this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,n=this.nextRegexToken(),r=this.getTokenRaw(n),e=this.finalize(o,new c.RegexLiteral(n.value,r,n.regex));break;default:this.throwUnexpectedToken(this.nextToken())}break;case s.Token.Keyword:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(o,new c.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(o,new c.ThisExpression)):this.matchKeyword("class")?e=this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new c.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new c.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,n},e.prototype.parsePropertyMethodFunction=function(){var e=!1,t=this.createNode(),n=this.context.allowYield;this.context.allowYield=!1;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=n,this.finalize(t,new c.FunctionExpression(null,r.params,i,e))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),n=null;switch(t.type){case s.Token.StringLiteral:case s.Token.NumericLiteral:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,i.Messages.StrictOctalLiteral);var r=this.getTokenRaw(t);n=this.finalize(e,new c.Literal(t.value,r));break;case s.Token.Identifier:case s.Token.BooleanLiteral:case s.Token.NullLiteral:case s.Token.Keyword:n=this.finalize(e,new c.Identifier(t.value));break;case s.Token.Punctuator:"["===t.value?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):this.throwUnexpectedToken(t);break;default:this.throwUnexpectedToken(t)}return n},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n,r,o=this.createNode(),a=this.lookahead,u=!1,l=!1,h=!1;a.type===s.Token.Identifier?(this.nextToken(),n=this.finalize(o,new c.Identifier(a.value))):this.match("*")?this.nextToken():(u=this.match("["),n=this.parseObjectPropertyKey());var p=this.qualifiedPropertyName(this.lookahead);if(a.type===s.Token.Identifier&&"get"===a.value&&p)t="get",u=this.match("["),n=this.parseObjectPropertyKey(),this.context.allowYield=!1,r=this.parseGetterMethod();else if(a.type===s.Token.Identifier&&"set"===a.value&&p)t="set",u=this.match("["),n=this.parseObjectPropertyKey(),r=this.parseSetterMethod();else if(a.type===s.Token.Punctuator&&"*"===a.value&&p)t="init",u=this.match("["),n=this.parseObjectPropertyKey(),r=this.parseGeneratorMethod(),l=!0;else if(n||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":"))!u&&this.isPropertyKey(n,"__proto__")&&(e.value&&this.tolerateError(i.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),r=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))r=this.parsePropertyMethodFunction(),l=!0;else if(a.type===s.Token.Identifier){var f=this.finalize(o,new c.Identifier(a.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),h=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);r=this.finalize(o,new c.AssignmentPattern(f,d))}else h=!0,r=f}else this.throwUnexpectedToken(this.nextToken());return this.finalize(o,new c.Property(t,n,u,r,l,h))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new c.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new c.TemplateElement(n,t.tail))},e.prototype.parseTemplateElement=function(){this.lookahead.type!==s.Token.Template&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new c.TemplateElement(n,t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],r=this.parseTemplateHead();for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize(e,new c.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:l,params:[]};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:l,params:[e]};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);this.startMarker.index")||this.expect("=>"),this.context.isBindingElement=!1;for(var o=0;o")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(r=!0,e={type:l,params:[e]}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(var o=0;o0){this.nextToken(),n.prec=r,this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],o=t,s=this.isolateCoverGrammar(this.parseExponentiationExpression),a=[o,n,s];;){if(r=this.binaryPrecedence(this.lookahead),r<=0)break;for(;a.length>2&&r<=a[a.length-2].prec;){s=a.pop();var u=a.pop().value;o=a.pop(),i.pop();var l=this.startNode(i[i.length-1]);a.push(this.finalize(l,new c.BinaryExpression(u,o,s)))}n=this.nextToken(),n.prec=r,a.push(n),i.push(this.lookahead),a.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var h=a.length-1;for(t=a[h],i.pop();h>1;){var l=this.startNode(i.pop());t=this.finalize(l,new c.BinaryExpression(a[h-1].value,a[h-2],t)),h-=2}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new c.ConditionalExpression(t,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=this.reinterpretAsCoverFormalsList(e);if(r){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var o=this.context.strict,s=this.context.allowYield;this.context.allowYield=!0;var a=this.startNode(t);this.expect("=>");var h=this.match("{")?this.parseFunctionSourceElements():this.isolateCoverGrammar(this.parseAssignmentExpression),p=h.type!==u.Syntax.BlockStatement;this.context.strict&&r.firstRestricted&&this.throwUnexpectedToken(r.firstRestricted,r.message),this.context.strict&&r.stricted&&this.tolerateUnexpectedToken(r.stricted,r.message),e=this.finalize(a,new c.ArrowFunctionExpression(r.params,h,p)),this.context.strict=o,this.context.allowYield=s}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var f=e;this.scanner.isRestrictedWord(f.name)&&this.tolerateUnexpectedToken(n,i.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(f.name)&&this.tolerateUnexpectedToken(n,i.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),n=this.nextToken();var d=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new c.AssignmentExpression(n.value,e,d)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);this.startMarker.index",t.TokenName[n.Identifier]="Identifier",t.TokenName[n.Keyword]="Keyword",t.TokenName[n.NullLiteral]="Null",t.TokenName[n.NumericLiteral]="Numeric",t.TokenName[n.Punctuator]="Punctuator",t.TokenName[n.StringLiteral]="String",t.TokenName[n.RegularExpression]="RegularExpression",t.TokenName[n.Template]="Template"},function(e,t,n){"use strict";function r(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function i(e){return"01234567".indexOf(e)}var o=n(4),s=n(5),a=n(9),u=n(7),c=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){void 0===e&&(e=s.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,s.Messages.UnexpectedTokenIllegal)},e.prototype.skipSingleLineComment=function(e){var t,n,r;for(this.trackComment&&(t=[],n=this.index-e,r={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,a.Character.isLineTerminator(i)){if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[n+e,this.index-1],range:[n,this.index-1],loc:r};t.push(o)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!1,slice:[n+e,this.index],range:[n,this.index],loc:r};t.push(o)}return t},e.prototype.skipMultiLineComment=function(){var e,t,n;for(this.trackComment&&(e=[],t=this.index-2,n={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(a.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:n};e.push(i)}return e}++this.index}else++this.index}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:n};e.push(i)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(a.Character.isWhiteSpace(n))++this.index;else if(a.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(n=this.source.charCodeAt(this.index+1),47===n){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==n)break;this.index+=2;var r=this.skipMultiLineComment();this.trackComment&&(e=e.concat(r))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;var r=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(r))}else{if(60!==n)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;var r=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);if(n>=56320&&n<=57343){var r=t;t=1024*(r-55296)+n-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,i=0;i1114111||"}"!==e)&&this.throwUnexpectedToken(),a.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!a.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=a.Character.fromCodePoint(e);this.index+=t.length;var n;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),e=n.charCodeAt(0),n&&"\\"!==n&&a.Character.isIdentifierStart(e)||this.throwUnexpectedToken()),t=n);!this.eof()&&(e=this.codePointAt(this.index),a.Character.isIdentifierPart(e));)n=a.Character.fromCodePoint(e),t+=n,this.index+=n.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),e=n.charCodeAt(0),n&&"\\"!==n&&a.Character.isIdentifierPart(e)||this.throwUnexpectedToken()),t+=n);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=i(e);return!this.eof()&&a.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+i(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&a.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+i(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();return e=1===n.length?u.Token.Identifier:this.isKeyword(n)?u.Token.Keyword:"null"===n?u.Token.NullLiteral:"true"===n||"false"===n?u.Token.BooleanLiteral:u.Token.Identifier,{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e={type:u.Token.Punctuator,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index},t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)))}return this.index===e.start&&this.throwUnexpectedToken(),e.end=this.index,e.value=t,e},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&a.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),a.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&(t=this.source[this.index],"0"===t||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(a.Character.isIdentifierStart(t)||a.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:u.Token.NumericLiteral,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(a.Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&a.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(a.Character.isIdentifierStart(this.source.charCodeAt(this.index))||a.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,r){var o=parseInt(t||r,16);return o>1114111&&i.throwUnexpectedToken(s.Messages.InvalidRegExp),o<=65535?String.fromCharCode(o):n}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,n));try{RegExp(r)}catch(e){this.throwUnexpectedToken(s.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];o.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,r=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],a.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(s.Messages.UnterminatedRegExp),t+=e;else if(a.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(s.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){r=!0;break}"["===e&&(n=!0)}r||this.throwUnexpectedToken(s.Messages.UnterminatedRegExp);var i=t.substr(1,t.length-2);return{value:i,literal:t}},e.prototype.scanRegExpFlags=function(){for(var e="",t="";!this.eof();){var n=this.source[this.index];if(!a.Character.isIdentifierPart(n.charCodeAt(0)))break;if(++this.index,"\\"!==n||this.eof())t+=n,e+=n;else if(n=this.source[this.index],"u"===n){++this.index;var r=this.index;if(n=this.scanHexEscape("u"))for(t+=n,e+="\\u";r=55296&&e<57343&&a.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=c},function(e,t){"use strict";var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ +};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";var r=n(2),i=function(){function e(e){this.type=r.Syntax.ArrayExpression,this.elements=e}return e}();t.ArrayExpression=i;var o=function(){function e(e){this.type=r.Syntax.ArrayPattern,this.elements=e}return e}();t.ArrayPattern=o;var s=function(){function e(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n}return e}();t.ArrowFunctionExpression=s;var a=function(){function e(e,t,n){this.type=r.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n}return e}();t.AssignmentExpression=a;var u=function(){function e(e,t){this.type=r.Syntax.AssignmentPattern,this.left=e,this.right=t}return e}();t.AssignmentPattern=u;var c=function(){function e(e,t,n){var i="||"===e||"&&"===e;this.type=i?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n}return e}();t.BinaryExpression=c;var l=function(){function e(e){this.type=r.Syntax.BlockStatement,this.body=e}return e}();t.BlockStatement=l;var h=function(){function e(e){this.type=r.Syntax.BreakStatement,this.label=e}return e}();t.BreakStatement=h;var p=function(){function e(e,t){this.type=r.Syntax.CallExpression,this.callee=e,this.arguments=t}return e}();t.CallExpression=p;var f=function(){function e(e,t){this.type=r.Syntax.CatchClause,this.param=e,this.body=t}return e}();t.CatchClause=f;var d=function(){function e(e){this.type=r.Syntax.ClassBody,this.body=e}return e}();t.ClassBody=d;var m=function(){function e(e,t,n){this.type=r.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n}return e}();t.ClassDeclaration=m;var g=function(){function e(e,t,n){this.type=r.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n}return e}();t.ClassExpression=g;var x=function(){function e(e,t){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}return e}();t.ComputedMemberExpression=x;var y=function(){function e(e,t,n){this.type=r.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n}return e}();t.ConditionalExpression=y;var v=function(){function e(e){this.type=r.Syntax.ContinueStatement,this.label=e}return e}();t.ContinueStatement=v;var b=function(){function e(){this.type=r.Syntax.DebuggerStatement}return e}();t.DebuggerStatement=b;var D=function(){function e(e,t){this.type=r.Syntax.ExpressionStatement,this.expression=e,this.directive=t}return e}();t.Directive=D;var w=function(){function e(e,t){this.type=r.Syntax.DoWhileStatement,this.body=e,this.test=t}return e}();t.DoWhileStatement=w;var E=function(){function e(){this.type=r.Syntax.EmptyStatement}return e}();t.EmptyStatement=E;var k=function(){function e(e){this.type=r.Syntax.ExportAllDeclaration,this.source=e}return e}();t.ExportAllDeclaration=k;var A=function(){function e(e){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=e}return e}();t.ExportDefaultDeclaration=A;var C=function(){function e(e,t,n){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n}return e}();t.ExportNamedDeclaration=C;var S=function(){function e(e,t){this.type=r.Syntax.ExportSpecifier,this.exported=t,this.local=e}return e}();t.ExportSpecifier=S;var F=function(){function e(e){this.type=r.Syntax.ExpressionStatement,this.expression=e}return e}();t.ExpressionStatement=F;var T=function(){function e(e,t,n){this.type=r.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1}return e}();t.ForInStatement=T;var B=function(){function e(e,t,n){this.type=r.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n}return e}();t.ForOfStatement=B;var N=function(){function e(e,t,n,i){this.type=r.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=i}return e}();t.ForStatement=N;var I=function(){function e(e,t,n,i){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1}return e}();t.FunctionDeclaration=I;var P=function(){function e(e,t,n,i){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1}return e}();t.FunctionExpression=P;var M=function(){function e(e){this.type=r.Syntax.Identifier,this.name=e}return e}();t.Identifier=M;var O=function(){function e(e,t,n){this.type=r.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n}return e}();t.IfStatement=O;var _=function(){function e(e,t){this.type=r.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}return e}();t.ImportDeclaration=_;var L=function(){function e(e){this.type=r.Syntax.ImportDefaultSpecifier,this.local=e}return e}();t.ImportDefaultSpecifier=L;var R=function(){function e(e){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=e}return e}();t.ImportNamespaceSpecifier=R;var U=function(){function e(e,t){this.type=r.Syntax.ImportSpecifier,this.local=e,this.imported=t}return e}();t.ImportSpecifier=U;var j=function(){function e(e,t){this.type=r.Syntax.LabeledStatement,this.label=e,this.body=t}return e}();t.LabeledStatement=j;var z=function(){function e(e,t){this.type=r.Syntax.Literal,this.value=e,this.raw=t}return e}();t.Literal=z;var J=function(){function e(e,t){this.type=r.Syntax.MetaProperty,this.meta=e,this.property=t}return e}();t.MetaProperty=J;var X=function(){function e(e,t,n,i,o){this.type=r.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=i,this.static=o}return e}();t.MethodDefinition=X;var Y=function(){function e(e,t){this.type=r.Syntax.NewExpression,this.callee=e,this.arguments=t}return e}();t.NewExpression=Y;var K=function(){function e(e){this.type=r.Syntax.ObjectExpression,this.properties=e}return e}();t.ObjectExpression=K;var W=function(){function e(e){this.type=r.Syntax.ObjectPattern,this.properties=e}return e}();t.ObjectPattern=W;var H=function(){function e(e,t){this.type=r.Syntax.Program,this.body=e,this.sourceType=t}return e}();t.Program=H;var q=function(){function e(e,t,n,i,o,s){this.type=r.Syntax.Property,this.key=t,this.computed=n,this.value=i,this.kind=e,this.method=o,this.shorthand=s}return e}();t.Property=q;var G=function(){function e(e,t,n){this.type=r.Syntax.Literal,this.value=e,this.raw=t,this.regex=n}return e}();t.RegexLiteral=G;var V=function(){function e(e){this.type=r.Syntax.RestElement,this.argument=e}return e}();t.RestElement=V;var $=function(){function e(e){this.type=r.Syntax.ReturnStatement,this.argument=e}return e}();t.ReturnStatement=$;var Z=function(){function e(e){this.type=r.Syntax.SequenceExpression,this.expressions=e}return e}();t.SequenceExpression=Z;var Q=function(){function e(e){this.type=r.Syntax.SpreadElement,this.argument=e}return e}();t.SpreadElement=Q;var ee=function(){function e(e,t){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}return e}();t.StaticMemberExpression=ee;var te=function(){function e(){this.type=r.Syntax.Super}return e}();t.Super=te;var ne=function(){function e(e,t){this.type=r.Syntax.SwitchCase,this.test=e,this.consequent=t}return e}();t.SwitchCase=ne;var re=function(){function e(e,t){this.type=r.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}return e}();t.SwitchStatement=re;var ie=function(){function e(e,t){this.type=r.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}return e}();t.TaggedTemplateExpression=ie;var oe=function(){function e(e,t){this.type=r.Syntax.TemplateElement,this.value=e,this.tail=t}return e}();t.TemplateElement=oe;var se=function(){function e(e,t){this.type=r.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}return e}();t.TemplateLiteral=se;var ae=function(){function e(){this.type=r.Syntax.ThisExpression}return e}();t.ThisExpression=ae;var ue=function(){function e(e){this.type=r.Syntax.ThrowStatement,this.argument=e}return e}();t.ThrowStatement=ue;var ce=function(){function e(e,t,n){this.type=r.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n}return e}();t.TryStatement=ce;var le=function(){function e(e,t){this.type=r.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}return e}();t.UnaryExpression=le;var he=function(){function e(e,t,n){this.type=r.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n}return e}();t.UpdateExpression=he;var pe=function(){function e(e,t){this.type=r.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}return e}();t.VariableDeclaration=pe;var fe=function(){function e(e,t){this.type=r.Syntax.VariableDeclarator,this.id=e,this.init=t}return e}();t.VariableDeclarator=fe;var de=function(){function e(e,t){this.type=r.Syntax.WhileStatement,this.test=e,this.body=t}return e}();t.WhileStatement=de;var me=function(){function e(e,t){this.type=r.Syntax.WithStatement,this.object=e,this.body=t}return e}();t.WithStatement=me;var ge=function(){function e(e,t){this.type=r.Syntax.YieldExpression,this.argument=e,this.delegate=t}return e}();t.YieldExpression=ge},function(e,t,n){"use strict";function r(e){var t;switch(e.type){case l.JSXSyntax.JSXIdentifier:var n=e;t=n.name;break;case l.JSXSyntax.JSXNamespacedName:var i=e;t=r(i.namespace)+":"+r(i.name);break;case l.JSXSyntax.JSXMemberExpression:var o=e;t=r(o.object)+"."+r(o.property)}return t}var i,o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=n(9),a=n(7),u=n(3),c=n(12),l=n(13),h=n(10),p=n(14);!function(e){e[e.Identifier=100]="Identifier",e[e.Text=101]="Text"}(i||(i={})),a.TokenName[i.Identifier]="JSXIdentifier",a.TokenName[i.Text]="JSXText";var f=function(e){function t(t,n,r){e.call(this,t,n,r)}return o(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.lineNumber,this.scanner.lineStart=this.startMarker.lineStart},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,r=!1,i=!1,o=!1;!this.scanner.eof()&&n&&!r;){var a=this.scanner.source[this.scanner.index];if(a===e)break;if(r=";"===a,t+=a,++this.scanner.index,!r)switch(t.length){case 2:i="#"===a;break;case 3:i&&(o="x"===a,n=o||s.Character.isDecimalDigit(a.charCodeAt(0)),i=i&&!o);break;default:n=n&&!(i&&!s.Character.isDecimalDigit(a.charCodeAt(0))),n=n&&!(o&&!s.Character.isHexDigit(a.charCodeAt(0)))}}if(n&&r&&t.length>2){var u=t.substr(1,t.length-2);i&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):o&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):i||o||!c.XHTMLEntities[u]||(t=c.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e){var t=this.scanner.source[this.scanner.index++];return{type:a.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===e||39===e){for(var n=this.scanner.index,r=this.scanner.source[this.scanner.index++],o="";!this.scanner.eof();){var u=this.scanner.source[this.scanner.index++];if(u===r)break;o+="&"===u?this.scanXHTMLEntity(r):u}return{type:a.Token.StringLiteral,value:o,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}if(46===e){var c=this.scanner.source.charCodeAt(this.scanner.index+1),l=this.scanner.source.charCodeAt(this.scanner.index+2),t=46===c&&46===l?"...":".",n=this.scanner.index;return this.scanner.index+=t.length,{type:a.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}if(96===e)return{type:a.Token.Template,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(s.Character.isIdentifierStart(e)&&92!==e){var n=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(s.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}var h=this.scanner.source.slice(n,this.scanner.index);return{type:i.Identifier,value:h,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}this.scanner.throwUnexpectedToken()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,s.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart;var r={type:i.Text,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(r)),r},t.prototype.peekJSXToken=function(){var e=this.scanner.index,t=this.scanner.lineNumber,n=this.scanner.lineStart;this.scanner.scanComments();var r=this.lexJSX();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=n,r},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();t.type===a.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===a.Token.Punctuator&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return t.type!==i.Identifier&&this.throwUnexpectedToken(t),this.finalize(e,new p.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new p.JSXNamespacedName(n,r))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var o=this.parseJSXIdentifier();t=this.finalize(e,new p.JSXMemberExpression(i,o))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=n;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new p.JSXNamespacedName(r,i))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();t.type!==a.Token.StringLiteral&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new h.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new p.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new p.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new p.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new p.JSXOpeningElement(t,r,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new p.JSXClosingElement(t))}var n=this.parseJSXElementName(),r=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new p.JSXOpeningElement(n,i,r))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.finalize(e,new p.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new p.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;var s=this.finalize(e.node,new p.JSXElement(e.opening,e.children,e.closing));e=t.pop(),e.children.push(s)}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],r=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:r,children:n});n=i.children,r=i.closing}return this.finalize(e,new p.JSXElement(t,n,r))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t}(u.Parser);t.JSXParser=f},function(e,t){"use strict";t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t){"use strict";t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";var r=n(13),i=function(){function e(e){this.type=r.JSXSyntax.JSXClosingElement,this.name=e}return e}();t.JSXClosingElement=i;var o=function(){function e(e,t,n){this.type=r.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n}return e}();t.JSXElement=o;var s=function(){function e(){this.type=r.JSXSyntax.JSXEmptyExpression}return e}();t.JSXEmptyExpression=s;var a=function(){function e(e){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=e}return e}();t.JSXExpressionContainer=a;var u=function(){function e(e){this.type=r.JSXSyntax.JSXIdentifier,this.name=e}return e}();t.JSXIdentifier=u;var c=function(){function e(e,t){this.type=r.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}return e}();t.JSXMemberExpression=c;var l=function(){function e(e,t){this.type=r.JSXSyntax.JSXAttribute,this.name=e,this.value=t}return e}();t.JSXAttribute=l;var h=function(){function e(e,t){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}return e}();t.JSXNamespacedName=h;var p=function(){function e(e,t,n){this.type=r.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n}return e}();t.JSXOpeningElement=p;var f=function(){function e(e){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=e}return e}();t.JSXSpreadAttribute=f;var d=function(){function e(e,t){this.type=r.JSXSyntax.JSXText,this.value=e,this.raw=t}return e}();t.JSXText=d},function(e,t,n){"use strict";var r=n(8),i=n(6),o=n(7),s=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var r=this.values[this.curly-4];t=!!r&&!this.beforeFunctionExpression(r)}else if("function"===this.values[this.curly-4]){var i=this.values[this.curly-5];t=!i||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){e.type===o.Token.Punctuator||e.type===o.Token.Keyword?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),a=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new s}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;tr&&" "!==e[d+1],d=o);else if(!l(s))return le;m=m&&h(s)}u=u||f&&o-d-1>r&&" "!==e[d+1]}return a||u?" "===e[0]&&n>9?le:u?ce:ue:m&&!i(e)?se:ae}function d(e,t,n,r){e.dump=function(){function i(t){return u(e,t)}if(0===t.length)return"''";if(!e.noCompatMode&&oe.indexOf(t)!==-1)return"'"+t+"'";var o=e.indent*Math.max(1,n),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),c=r||e.flowLevel>-1&&n>=e.flowLevel;switch(f(t,c,e.indent,a,i)){case se:return t;case ae:return"'"+t.replace(/'/g,"''")+"'";case ue:return"|"+m(t,e.indent)+g(s(t,o));case ce:return">"+m(t,e.indent)+g(s(x(t,a),o));case le:return'"'+v(t,a)+'"';default:throw new N("impossible error: invalid scalar style")}}()}function m(e,t){var n=" "===e[0]?String(t):"",r="\n"===e[e.length-1],i=r&&("\n"===e[e.length-2]||"\n"===e),o=i?"+":r?"":"-";return n+o+"\n"}function g(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function x(e,t){for(var n,r,i=/(\n+)([^\n]*)/g,o=function(){var n=e.indexOf("\n");return n=n!==-1?n:e.length,i.lastIndex=n,y(e.slice(0,n),t)}(),s="\n"===e[0]||" "===e[0];r=i.exec(e);){var a=r[1],u=r[2];n=" "===u[0],o+=a+(s||n||""===u?"":"\n")+y(u,t),s=n}return o}function y(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,s=0,a=0,u="";n=i.exec(e);)a=n.index,a-o>t&&(r=s>o?s:a,u+="\n"+e.slice(o,r),o=r+1),s=a;return u+="\n",u+=e.length-o>t&&s>o?e.slice(o,s)+"\n"+e.slice(s+1):e.slice(o),u.slice(1)}function v(e){for(var t,n,r="",o=0;o1024&&(a+="? "),a+=e.dump+": ",A(e,t,s,!1,!1)&&(a+=e.dump,u+=a));e.tag=c,e.dump="{"+u+"}"}function E(e,t,n,r){var i,o,s,u,c,l,h="",p=e.tag,f=Object.keys(n);if(e.sortKeys===!0)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new N("sortKeys must be a boolean or a function"); +for(i=0,o=f.length;i1024,c&&(l+=e.dump&&L===e.dump.charCodeAt(0)?"?":"? "),l+=e.dump,c&&(l+=a(e,t)),A(e,t+1,u,!0,c)&&(l+=e.dump&&L===e.dump.charCodeAt(0)?":":": ",l+=e.dump,h+=l));e.tag=p,e.dump=h||"{}"}function k(e,t,n){var r,i,o,s,a,u;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o tag resolver accepts not "'+u+'" style');r=a.represent[u](t,u)}e.dump=r}return!0}return!1}function A(e,t,n,r,i,o){e.tag=null,e.dump=n,k(e,n,!1)||k(e,n,!0);var s=M.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var a,u,c="[object Object]"===s||"[object Array]"===s;if(c&&(a=e.duplicates.indexOf(n),u=a!==-1),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(i=!1),u&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(c&&u&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),"[object Object]"===s)r&&0!==Object.keys(e.dump).length?(E(e,t,e.dump,i),u&&(e.dump="&ref_"+a+e.dump)):(w(e,t,e.dump),u&&(e.dump="&ref_"+a+" "+e.dump));else if("[object Array]"===s)r&&0!==e.dump.length?(D(e,t,e.dump,i),u&&(e.dump="&ref_"+a+e.dump)):(b(e,t,e.dump),u&&(e.dump="&ref_"+a+" "+e.dump));else{if("[object String]"!==s){if(e.skipInvalid)return!1;throw new N("unacceptable kind of an object to dump "+s)}"?"!==e.tag&&d(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function C(e,t){var n,r,i=[],o=[];for(S(e,i,o),n=0,r=o.length;nlabel{font-size:12px;font-weight:700;display:flex;flex-direction:column;margin:-20px 15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scheme-container .schemes>label select{min-width:130px;text-transform:uppercase}.swagger-ui .loading-container{padding:40px 0 60px}.swagger-ui .loading-container .loading{position:relative}.swagger-ui .loading-container .loading:after{font-size:10px;font-weight:700;position:absolute;top:50%;left:50%;content:"loading";transform:translate(-50%,-50%);text-transform:uppercase;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .loading-container .loading:before{position:absolute;top:50%;left:50%;display:block;width:60px;height:60px;margin:-30px;content:"";animation:rotation 1s infinite linear,opacity .5s;opacity:1;border:2px solid rgba(85,85,85,.1);border-top-color:rgba(0,0,0,.6);border-radius:100%;backface-visibility:hidden}@keyframes rotation{to{transform:rotate(1turn)}}@keyframes blinker{50%{opacity:0}}.swagger-ui .btn{font-size:14px;font-weight:700;padding:5px 23px;transition:all .3s;border:2px solid #888;border-radius:4px;background:transparent;box-shadow:0 1px 2px rgba(0,0,0,.1);font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .btn[disabled]{cursor:not-allowed;opacity:.3}.swagger-ui .btn:hover{box-shadow:0 0 5px rgba(0,0,0,.3)}.swagger-ui .btn.cancel{border-color:#ff6060;font-family:Titillium Web,sans-serif;color:#ff6060}.swagger-ui .btn.authorize{line-height:1;display:inline;color:#49cc90;border-color:#49cc90}.swagger-ui .btn.authorize span{float:left;padding:4px 20px 0 0}.swagger-ui .btn.authorize svg{fill:#49cc90}.swagger-ui .btn.execute{animation:swagger-ui-pulse 2s infinite;color:#fff;border-color:#4990e2}@keyframes swagger-ui-pulse{0%{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,.8)}70%{box-shadow:0 0 0 5px rgba(73,144,226,0)}to{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,0)}}.swagger-ui .btn-group{display:flex;padding:30px}.swagger-ui .btn-group .btn{flex:1}.swagger-ui .btn-group .btn:first-child{border-radius:4px 0 0 4px}.swagger-ui .btn-group .btn:last-child{border-radius:0 4px 4px 0}.swagger-ui .authorization__btn{padding:0 10px;border:none;background:none}.swagger-ui .authorization__btn.locked{opacity:1}.swagger-ui .authorization__btn.unlocked{opacity:.4}.swagger-ui .expand-methods,.swagger-ui .expand-operation{border:none;background:none}.swagger-ui .expand-methods svg,.swagger-ui .expand-operation svg{width:20px;height:20px}.swagger-ui .expand-methods{padding:0 10px}.swagger-ui .expand-methods:hover svg{fill:#444}.swagger-ui .expand-methods svg{transition:all .3s;fill:#777}.swagger-ui button{cursor:pointer;outline:none}.swagger-ui select{font-size:14px;font-weight:700;padding:5px 40px 5px 10px;border:2px solid #41444e;border-radius:4px;background:#f7f7f7 url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+ICAgIDxwYXRoIGQ9Ik0xMy40MTggNy44NTljLjI3MS0uMjY4LjcwOS0uMjY4Ljk3OCAwIC4yNy4yNjguMjcyLjcwMSAwIC45NjlsLTMuOTA4IDMuODNjLS4yNy4yNjgtLjcwNy4yNjgtLjk3OSAwbC0zLjkwOC0zLjgzYy0uMjctLjI2Ny0uMjctLjcwMSAwLS45NjkuMjcxLS4yNjguNzA5LS4yNjguOTc4IDBMMTAgMTFsMy40MTgtMy4xNDF6Ii8+PC9zdmc+) right 10px center no-repeat;background-size:20px;box-shadow:0 1px 2px 0 rgba(0,0,0,.25);font-family:Titillium Web,sans-serif;color:#3b4151;appearance:none}.swagger-ui select[multiple]{margin:5px 0;padding:5px;background:#f7f7f7}.swagger-ui .opblock-body select{min-width:230px}.swagger-ui label{font-size:12px;font-weight:700;margin:0 0 5px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui input[type=email],.swagger-ui input[type=password],.swagger-ui input[type=search],.swagger-ui input[type=text]{min-width:100px;margin:5px 0;padding:8px 10px;border:1px solid #d9d9d9;border-radius:4px;background:#fff}.swagger-ui input[type=email].invalid,.swagger-ui input[type=password].invalid,.swagger-ui input[type=search].invalid,.swagger-ui input[type=text].invalid{animation:shake .4s 1;border-color:#f93e3e;background:#feebeb}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(2px,0,0)}30%,50%,70%{transform:translate3d(-4px,0,0)}40%,60%{transform:translate3d(4px,0,0)}}.swagger-ui textarea{font-size:12px;width:100%;min-height:280px;padding:10px;border:none;border-radius:4px;outline:none;background:hsla(0,0%,100%,.8);font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui textarea:focus{border:2px solid #61affe}.swagger-ui textarea.curl{font-size:12px;min-height:100px;margin:0;padding:10px;resize:none;border-radius:4px;background:#41444e;font-family:Source Code Pro,monospace;font-weight:600;color:#fff}.swagger-ui .checkbox{padding:5px 0 10px;transition:opacity .5s;color:#333}.swagger-ui .checkbox label{display:flex}.swagger-ui .checkbox p{font-weight:400!important;font-style:italic;margin:0!important;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .checkbox input[type=checkbox]{display:none}.swagger-ui .checkbox input[type=checkbox]+label>.item{position:relative;top:3px;display:inline-block;width:16px;height:16px;margin:0 8px 0 0;padding:5px;cursor:pointer;border-radius:1px;background:#e8e8e8;box-shadow:0 0 0 2px #e8e8e8;flex:none}.swagger-ui .checkbox input[type=checkbox]+label>.item:active{transform:scale(.9)}.swagger-ui .checkbox input[type=checkbox]:checked+label>.item{background:#e8e8e8 url("data:image/svg+xml;charset=utf-8,%3Csvg width='10' height='8' viewBox='3 7 10 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%2341474E' fill-rule='evenodd' d='M6.333 15L3 11.667l1.333-1.334 2 2L11.667 7 13 8.333z'/%3E%3C/svg%3E") 50% no-repeat}.swagger-ui .dialog-ux{position:fixed;z-index:9999;top:0;right:0;bottom:0;left:0}.swagger-ui .dialog-ux .backdrop-ux{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.8)}.swagger-ui .dialog-ux .modal-ux{position:absolute;z-index:9999;top:50%;left:50%;width:100%;min-width:300px;max-width:650px;transform:translate(-50%,-50%);border:1px solid #ebebeb;border-radius:4px;background:#fff;box-shadow:0 10px 30px 0 rgba(0,0,0,.2)}.swagger-ui .dialog-ux .modal-ux-content{overflow-y:auto;max-height:540px;padding:20px}.swagger-ui .dialog-ux .modal-ux-content p{font-size:12px;margin:0 0 5px;color:#41444e;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-content h4{font-size:18px;font-weight:600;margin:15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-header{display:flex;padding:12px 0;border-bottom:1px solid #ebebeb;align-items:center}.swagger-ui .dialog-ux .modal-ux-header .close-modal{padding:0 10px;border:none;background:none;appearance:none}.swagger-ui .dialog-ux .modal-ux-header h3{font-size:20px;font-weight:600;margin:0;padding:0 20px;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .model{font-size:12px;font-weight:300;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .model-toggle{font-size:10px;position:relative;top:6px;display:inline-block;margin:auto .3em;cursor:pointer;transition:transform .15s ease-in;transform:rotate(90deg);transform-origin:50% 50%}.swagger-ui .model-toggle.collapsed{transform:rotate(0deg)}.swagger-ui .model-toggle:after{display:block;width:20px;height:20px;content:"";background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E") 50% no-repeat;background-size:100%}.swagger-ui .model-jump-to-path{position:relative;cursor:pointer}.swagger-ui .model-jump-to-path .view-line-link{position:absolute;top:-.4em;cursor:pointer}.swagger-ui .model-title{position:relative}.swagger-ui .model-title:hover .model-hint{visibility:visible}.swagger-ui .model-hint{position:absolute;top:-1.8em;visibility:hidden;padding:.1em .5em;white-space:nowrap;color:#ebebeb;border-radius:4px;background:rgba(0,0,0,.7)}.swagger-ui section.models{margin:30px 0;border:1px solid rgba(59,65,81,.3);border-radius:4px}.swagger-ui section.models.is-open{padding:0 0 20px}.swagger-ui section.models.is-open h4{margin:0 0 5px;border-bottom:1px solid rgba(59,65,81,.3)}.swagger-ui section.models h4{font-size:16px;display:flex;margin:0;padding:10px 20px 10px 10px;cursor:pointer;transition:all .2s;font-family:Titillium Web,sans-serif;color:#777;align-items:center}.swagger-ui section.models h4 svg{transition:all .4s}.swagger-ui section.models h4 span{flex:1}.swagger-ui section.models h4:hover{background:rgba(0,0,0,.02)}.swagger-ui section.models h5{font-size:16px;margin:0 0 10px;font-family:Titillium Web,sans-serif;color:#777}.swagger-ui section.models .model-jump-to-path{position:relative;top:5px}.swagger-ui section.models .model-container{margin:0 20px 15px;transition:all .5s;border-radius:4px;background:rgba(0,0,0,.05)}.swagger-ui section.models .model-container:hover{background:rgba(0,0,0,.07)}.swagger-ui section.models .model-container:first-of-type{margin:20px}.swagger-ui section.models .model-container:last-of-type{margin:0 20px}.swagger-ui section.models .model-box{background:none}.swagger-ui .model-box{padding:10px;border-radius:4px;background:rgba(0,0,0,.1)}.swagger-ui .model-box .model-jump-to-path{position:relative;top:4px}.swagger-ui .model-title{font-size:16px;font-family:Titillium Web,sans-serif;color:#555}.swagger-ui span>span.model,.swagger-ui span>span.model .brace-close{padding:0 0 0 10px}.swagger-ui .prop-type{color:#55a}.swagger-ui .prop-enum{display:block}.swagger-ui .prop-format{color:#999}.swagger-ui table{width:100%;padding:0 10px;border-collapse:collapse}.swagger-ui table.model tbody tr td{padding:0;vertical-align:top}.swagger-ui table.model tbody tr td:first-of-type{width:100px;padding:0}.swagger-ui table.headers td{font-size:12px;font-weight:300;vertical-align:middle;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui table tbody tr td{padding:10px 0 0;vertical-align:top}.swagger-ui table tbody tr td:first-of-type{width:20%;padding:10px 0}.swagger-ui table thead tr td,.swagger-ui table thead tr th{font-size:12px;font-weight:700;padding:12px 0;text-align:left;border-bottom:1px solid rgba(59,65,81,.2);font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description p{font-size:14px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description input[type=text]{width:100%;max-width:340px}.swagger-ui .parameter__name{font-size:16px;font-weight:400;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .parameter__name.required{font-weight:700}.swagger-ui .parameter__name.required:after{font-size:10px;position:relative;top:-6px;padding:5px;content:"required";color:rgba(255,0,0,.6)}.swagger-ui .parameter__in{font-size:12px;font-style:italic;font-family:Source Code Pro,monospace;font-weight:600;color:#888}.swagger-ui .table-container{padding:20px}.swagger-ui .topbar{padding:8px 30px;background-color:#89bf04}.swagger-ui .topbar .topbar-wrapper,.swagger-ui .topbar a{display:flex;align-items:center}.swagger-ui .topbar a{font-size:1.5em;font-weight:700;flex:1;max-width:300px;text-decoration:none;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .topbar a span{margin:0;padding:0 10px}.swagger-ui .topbar .download-url-wrapper{display:flex;flex:3;justify-content:flex-end}.swagger-ui .topbar .download-url-wrapper input[type=text]{width:100%;min-width:350px;margin:0;border:2px solid #547f00;border-radius:4px 0 0 4px;outline:none}.swagger-ui .topbar .download-url-wrapper .select-label{display:flex;align-items:center;width:100%;max-width:600px;margin:0}.swagger-ui .topbar .download-url-wrapper .select-label span{font-size:16px;flex:1;padding:0 10px 0 0;text-align:right}.swagger-ui .topbar .download-url-wrapper .select-label select{flex:2;width:100%;border:2px solid #547f00;outline:none;box-shadow:none}.swagger-ui .topbar .download-url-wrapper .download-url-button{font-size:16px;font-weight:700;padding:4px 40px;border:none;border-radius:0 4px 4px 0;background:#547f00;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .info{margin:50px 0}.swagger-ui .info hgroup.main{margin:0 0 20px}.swagger-ui .info hgroup.main a{font-size:12px}.swagger-ui .info li,.swagger-ui .info p,.swagger-ui .info table{font-size:14px;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info h1,.swagger-ui .info h2,.swagger-ui .info h3,.swagger-ui .info h4,.swagger-ui .info h5{font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info code{padding:3px 5px;border-radius:4px;background:rgba(0,0,0,.05);font-family:Source Code Pro,monospace;font-weight:600;color:#9012fe}.swagger-ui .info a{font-size:14px;transition:all .4s;font-family:Open Sans,sans-serif;color:#4990e2}.swagger-ui .info a:hover{color:#1f69c0}.swagger-ui .info>div{margin:0 0 5px}.swagger-ui .info .base-url{font-size:12px;font-weight:300!important;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .info .title{font-size:36px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info .title small{font-size:10px;position:relative;top:-5px;display:inline-block;margin:0 0 0 5px;padding:2px 4px;vertical-align:super;border-radius:57px;background:#7d8492}.swagger-ui .info .title small pre{margin:0;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .auth-btn-wrapper{display:flex;padding:10px 0;justify-content:center}.swagger-ui .auth-wrapper{display:flex;flex:1;justify-content:flex-end}.swagger-ui .auth-wrapper .authorize{padding-right:20px}.swagger-ui .auth-container{margin:0 0 10px;padding:10px 20px;border-bottom:1px solid #ebebeb}.swagger-ui .auth-container:last-of-type{margin:0;padding:10px 20px;border:0}.swagger-ui .auth-container h4{margin:5px 0 15px!important}.swagger-ui .auth-container .wrapper{margin:0;padding:0}.swagger-ui .auth-container input[type=password],.swagger-ui .auth-container input[type=text]{min-width:230px}.swagger-ui .auth-container .errors{font-size:12px;padding:10px;border-radius:4px;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .scopes h2{font-size:14px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scope-def{padding:0 0 20px}.swagger-ui .errors-wrapper{margin:20px;padding:10px 20px;animation:scaleUp .5s;border:2px solid #f93e3e;border-radius:4px;background:rgba(249,62,62,.1)}.swagger-ui .errors-wrapper .error-wrapper{margin:0 0 10px}.swagger-ui .errors-wrapper .errors h4{font-size:14px;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .errors-wrapper .errors small{color:#666}.swagger-ui .errors-wrapper hgroup{display:flex;align-items:center}.swagger-ui .errors-wrapper hgroup h4{font-size:20px;margin:0;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}@keyframes scaleUp{0%{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}.swagger-ui .Resizer.vertical.disabled { + display: none; +} + +/*# sourceMappingURL=swagger-ui.css.map*/ \ No newline at end of file diff --git a/reference/dtr/2.6/cli/emergency-repair.md b/reference/dtr/2.6/cli/emergency-repair.md index be8b936349..601beee374 100644 --- a/reference/dtr/2.6/cli/emergency-repair.md +++ b/reference/dtr/2.6/cli/emergency-repair.md @@ -45,7 +45,7 @@ DTR replicas for high availability. | `--existing-replica-id` | $DTR_REPLICA_ID | The ID of an existing DTR replica. To add, remove or modify DTR, you must connect to an existing healthy replica's database. | | `--help-extended` | $DTR_EXTENDED_HELP | Display extended help text for a given command. | | `--overlay-subnet` | $DTR_OVERLAY_SUBNET | The subnet used by the dtr-ol overlay network. Example: `10.0.0.0/24`. For high-availability, DTR creates an overlay network between UCP nodes. This flag allows you to choose the subnet for that network. Make sure the subnet you choose is not used on any machine where DTR replicas are deployed. | -| `--prune` | $PRUNE | Delete the data volumes of all unhealthy replicas. With this option, the volume of the DTR replica you`re restoring is preserved but the volumes for all other replicas are deleted. This has the same result as completely uninstalling DTR from those replicas. | +| `--prune` | $PRUNE | Delete the data volumes of all unhealthy replicas. With this option, the volume of the DTR replica you're restoring is preserved but the volumes for all other replicas are deleted. This has the same result as completely uninstalling DTR from those replicas. | | `--ucp-ca` | $UCP_CA | Use a PEM-encoded TLS CA certificate for UCP. Download the UCP TLS CA certificate from https:///ca, and use `--ucp-ca "$(cat ca.pem)"`. | | `--ucp-insecure-tls` | $UCP_INSECURE_TLS | Disable TLS verification for UCP. The installation uses TLS but always trusts the TLS certificate used by UCP, which can lead to MITM (man-in-the-middle) attacks. For production deployments, use `--ucp-ca "$(cat ca.pem)"` instead. | | `--ucp-password` | $UCP_PASSWORD | The UCP administrator password. | diff --git a/reference/dtr/2.6/cli/install.md b/reference/dtr/2.6/cli/install.md index 8806e1440c..36cfed2311 100644 --- a/reference/dtr/2.6/cli/install.md +++ b/reference/dtr/2.6/cli/install.md @@ -34,10 +34,10 @@ $ docker run -it --rm docker/dtr:{{ site.dtr_version }}.0 install \ | Option | Environment Variable | Description | |:------------------------------|:--------------------------|:-------------------------------------------------------------------------------------| | `--debug` | $DEBUG | Enable debug mode for additional logs. | -| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS CA certificate with `--dtr-ca "$(cat ca.pem)"`. | -| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS certificate with `--dtr-cert "$(cat ca.pem)"`. | +| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own root CA public certificate with `--dtr-ca "$(cat ca.pem)"`. | +| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own public key certificate with `--dtr-cert "$(cat cert.pem)"`. If the certificate has been signed by an intermediate certificate authority, append its public key certificate at the end of the file to establish a chain of trust. | | `--dtr-external-url` | $DTR_EXTERNAL_URL | URL of the host or load balancer clients use to reach DTR. When you use this flag, users are redirected to UCP for logging in. Once authenticated they are redirected to the URL you specify in this flag. If you don't use this flag, DTR is deployed without single sign-on with UCP. Users and teams are shared but users log in separately into the two applications. You can enable and disable single sign-on within your DTR system settings. Format `https://host[:port]`, where port is the value you used with `--replica-https-port`. | -| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with `--dtr-key "$(cat ca.pem)"`. | +| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with `--dtr-key "$(cat key.pem)"`. | | `--dtr-storage-volume` | $DTR_STORAGE_VOLUME | Customize the volume to store Docker images. By default DTR creates a volume to store the Docker images in the local filesystem of the node where DTR is running, without high-availability. Use this flag to specify a full path or volume name for DTR to store images. For high-availability, make sure all DTR replicas can read and write data on this volume. If you're using NFS, use `--nfs-storage-url` instead. | | `--enable-pprof` | $DTR_PPROF | Enables pprof profiling of the server. Use `--enable-pprof=false` to disable it. Once DTR is deployed with this flag, you can access the `pprof` endpoint for the api server at `/debug/pprof`, and the registry endpoint at `/registry_debug_pprof/debug/pprof`. | | `--help-extended` | $DTR_EXTENDED_HELP | Display extended help text for a given command. | diff --git a/reference/dtr/2.6/cli/join.md b/reference/dtr/2.6/cli/join.md index 80373de3e2..d518a58877 100644 --- a/reference/dtr/2.6/cli/join.md +++ b/reference/dtr/2.6/cli/join.md @@ -4,13 +4,19 @@ description: Add a new replica to an existing DTR cluster keywords: dtr, cli, join --- -Add a new replica to an existing DTR cluster +Add a new replica to an existing DTR cluster. Use SSH to log into any node that is already part of UCP. +## Usage +```bash +docker run -it --rm \ + docker/dtr:2.6.0 join \ + --ucp-node \ + --ucp-insecure-tls +``` ## Description - This command creates a replica of an existing DTR on a node managed by Docker Universal Control Plane (UCP). diff --git a/reference/dtr/2.6/cli/reconfigure.md b/reference/dtr/2.6/cli/reconfigure.md index 200a93ab51..1c4b124dc1 100644 --- a/reference/dtr/2.6/cli/reconfigure.md +++ b/reference/dtr/2.6/cli/reconfigure.md @@ -27,10 +27,10 @@ time, configure your DTR for high availability. | Option | Environment Variable | Description | |:------------------------------|:--------------------------|:-------------------------------------------------------------------------------------| | `--debug` | $DEBUG | Enable debug mode for additional logs. | -| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR.By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS CA certificate with --dtr-ca "$(cat ca.pem)". | -| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR.By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS certificate with --dtr-cert "$(cat ca.pem)". | +| `--dtr-ca` | $DTR_CA | Use a PEM-encoded TLS CA certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own root CA public certificate with `--dtr-ca "$(cat ca.pem)"`. | +| `--dtr-cert` | $DTR_CERT | Use a PEM-encoded TLS certificate for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own public key certificate with `--dtr-cert "$(cat cert.pem)"`. If the certificate has been signed by an intermediate certificate authority, append its public key certificate at the end of the file to establish a chain of trust. | | `--dtr-external-url` | $DTR_EXTERNAL_URL | URL of the host or load balancer clients use to reach DTR. When you use this flag, users are redirected to UCP for logging in. Once authenticated they are redirected to the url you specify in this flag. If you don't use this flag, DTR is deployed without single sign-on with UCP. Users and teams are shared but users login separately into the two applications. You can enable and disable single sign-on in the DTR settings. Format `https://host[:port]`, where port is the value you used with `--replica-https-port`. | -| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with `--dtr-key "$(cat ca.pem)"`. | +| `--dtr-key` | $DTR_KEY | Use a PEM-encoded TLS private key for DTR. By default DTR generates a self-signed TLS certificate during deployment. You can use your own TLS private key with `--dtr-key "$(cat key.pem)"`. | | `--dtr-storage-volume` | $DTR_STORAGE_VOLUME | Customize the volume to store Docker images. By default DTR creates a volume to store the Docker images in the local filesystem of the node where DTR is running, without high-availability. Use this flag to specify a full path or volume name for DTR to store images. For high-availability, make sure all DTR replicas can read and write data on this volume. If you're using NFS, use `--nfs-storage-url` instead. | | `--enable-pprof` | $DTR_PPROF | Enables pprof profiling of the server. Use `--enable-pprof=false` to disable it. Once DTR is deployed with this flag, you can access the pprof endpoint for the api server at `/debug/pprof`, and the registry endpoint at `/registry_debug_pprof/debug/pprof`. | | `--existing-replica-id` | $DTR_REPLICA_ID | The ID of an existing DTR replica. To add, remove or modify DTR, you must connect to an existing healthy replica's database. | diff --git a/reference/ucp/3.0/api/lang/en.js b/reference/ucp/3.0/api/lang/en.js deleted file mode 100644 index c7b8c7499a..0000000000 --- a/reference/ucp/3.0/api/lang/en.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -/* jshint quotemark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Warning: Deprecated", - "Implementation Notes":"Implementation Notes", - "Response Class":"Response Class", - "Status":"Status", - "Parameters":"Parameters", - "Parameter":"Parameter", - "Value":"Value", - "Description":"Description", - "Parameter Type":"Parameter Type", - "Data Type":"Data Type", - "Response Messages":"Response Messages", - "HTTP Status Code":"HTTP Status Code", - "Reason":"Reason", - "Response Model":"Response Model", - "Request URL":"Request URL", - "Response Body":"Response Body", - "Response Code":"Response Code", - "Response Headers":"Response Headers", - "Hide Response":"Hide Response", - "Headers":"Headers", - "Try it out!":"Try it out!", - "Show/Hide":"Show/Hide", - "List Operations":"List Operations", - "Expand Operations":"Expand Operations", - "Raw":"Raw", - "can't parse JSON. Raw result":"can't parse JSON. Raw result", - "Model Schema":"Model Schema", - "Model":"Model", - "apply":"apply", - "Username":"Username", - "Password":"Password", - "Terms of service":"Terms of service", - "Created by":"Created by", - "See more at":"See more at", - "Contact the developer":"Contact the developer", - "api version":"api version", - "Response Content Type":"Response Content Type", - "fetching resource":"fetching resource", - "fetching resource list":"fetching resource list", - "Explore":"Explore", - "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"Can't read from server. It may not have the appropriate access-control-origin settings.", - "Please specify the protocol for":"Please specify the protocol for", - "Can't read swagger JSON from":"Can't read swagger JSON from", - "Finished Loading Resource Information. Rendering Swagger UI":"Finished Loading Resource Information. Rendering Swagger UI", - "Unable to read api":"Unable to read api", - "from path":"from path", - "server returned":"server returned" -}); diff --git a/reference/ucp/3.0/api/lang/es.js b/reference/ucp/3.0/api/lang/es.js deleted file mode 100644 index 01dff98d28..0000000000 --- a/reference/ucp/3.0/api/lang/es.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -/* jshint quotemark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Advertencia: Obsoleto", - "Implementation Notes":"Notas de implementación", - "Response Class":"Clase de la Respuesta", - "Status":"Status", - "Parameters":"Parámetros", - "Parameter":"Parámetro", - "Value":"Valor", - "Description":"Descripción", - "Parameter Type":"Tipo del Parámetro", - "Data Type":"Tipo del Dato", - "Response Messages":"Mensajes de la Respuesta", - "HTTP Status Code":"Código de Status HTTP", - "Reason":"Razón", - "Response Model":"Modelo de la Respuesta", - "Request URL":"URL de la Solicitud", - "Response Body":"Cuerpo de la Respuesta", - "Response Code":"Código de la Respuesta", - "Response Headers":"Encabezados de la Respuesta", - "Hide Response":"Ocultar Respuesta", - "Try it out!":"Pruébalo!", - "Show/Hide":"Mostrar/Ocultar", - "List Operations":"Listar Operaciones", - "Expand Operations":"Expandir Operaciones", - "Raw":"Crudo", - "can't parse JSON. Raw result":"no puede parsear el JSON. Resultado crudo", - "Model Schema":"Esquema del Modelo", - "Model":"Modelo", - "apply":"aplicar", - "Username":"Nombre de usuario", - "Password":"Contraseña", - "Terms of service":"Términos de Servicio", - "Created by":"Creado por", - "See more at":"Ver más en", - "Contact the developer":"Contactar al desarrollador", - "api version":"versión de la api", - "Response Content Type":"Tipo de Contenido (Content Type) de la Respuesta", - "fetching resource":"buscando recurso", - "fetching resource list":"buscando lista del recurso", - "Explore":"Explorar", - "Show Swagger Petstore Example Apis":"Mostrar Api Ejemplo de Swagger Petstore", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"No se puede leer del servidor. Tal vez no tiene la configuración de control de acceso de origen (access-control-origin) apropiado.", - "Please specify the protocol for":"Por favor, especificar el protocola para", - "Can't read swagger JSON from":"No se puede leer el JSON de swagger desde", - "Finished Loading Resource Information. Rendering Swagger UI":"Finalizada la carga del recurso de Información. Mostrando Swagger UI", - "Unable to read api":"No se puede leer la api", - "from path":"desde ruta", - "server returned":"el servidor retornó" -}); diff --git a/reference/ucp/3.0/api/lang/pt.js b/reference/ucp/3.0/api/lang/pt.js deleted file mode 100644 index 288c81a80e..0000000000 --- a/reference/ucp/3.0/api/lang/pt.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -/* jshint quotemark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Aviso: Depreciado", - "Implementation Notes":"Notas de Implementação", - "Response Class":"Classe de resposta", - "Status":"Status", - "Parameters":"Parâmetros", - "Parameter":"Parâmetro", - "Value":"Valor", - "Description":"Descrição", - "Parameter Type":"Tipo de parâmetro", - "Data Type":"Tipo de dados", - "Response Messages":"Mensagens de resposta", - "HTTP Status Code":"Código de status HTTP", - "Reason":"Razão", - "Response Model":"Modelo resposta", - "Request URL":"URL requisição", - "Response Body":"Corpo da resposta", - "Response Code":"Código da resposta", - "Response Headers":"Cabeçalho da resposta", - "Headers":"Cabeçalhos", - "Hide Response":"Esconder resposta", - "Try it out!":"Tente agora!", - "Show/Hide":"Mostrar/Esconder", - "List Operations":"Listar operações", - "Expand Operations":"Expandir operações", - "Raw":"Cru", - "can't parse JSON. Raw result":"Falha ao analisar JSON. Resulto cru", - "Model Schema":"Modelo esquema", - "Model":"Modelo", - "apply":"Aplicar", - "Username":"Usuário", - "Password":"Senha", - "Terms of service":"Termos do serviço", - "Created by":"Criado por", - "See more at":"Veja mais em", - "Contact the developer":"Contate o desenvolvedor", - "api version":"Versão api", - "Response Content Type":"Tipo de conteúdo da resposta", - "fetching resource":"busca recurso", - "fetching resource list":"buscando lista de recursos", - "Explore":"Explorar", - "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"Não é possível ler do servidor. Pode não ter as apropriadas configurações access-control-origin", - "Please specify the protocol for":"Por favor especifique o protocolo", - "Can't read swagger JSON from":"Não é possível ler o JSON Swagger de", - "Finished Loading Resource Information. Rendering Swagger UI":"Carregar informação de recurso finalizada. Renderizando Swagger UI", - "Unable to read api":"Não foi possível ler api", - "from path":"do caminho", - "server returned":"servidor retornou" -}); diff --git a/reference/ucp/3.0/api/lang/ru.js b/reference/ucp/3.0/api/lang/ru.js deleted file mode 100644 index 15248d5424..0000000000 --- a/reference/ucp/3.0/api/lang/ru.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -/* jshint quotemark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Ворнинг: Депрекейтед", - "Implementation Notes":"Заметки", - "Response Class":"Пример ответа", - "Status":"Статус", - "Parameters":"Параметры", - "Parameter":"Параметр", - "Value":"Значение", - "Description":"Описание", - "Parameter Type":"Тип параметра", - "Data Type":"Тип данных", - "HTTP Status Code":"HTTP код", - "Reason":"Причина", - "Response Model":"Структура ответа", - "Request URL":"URL запроса", - "Response Body":"Тело ответа", - "Response Code":"HTTP код ответа", - "Response Headers":"Заголовки ответа", - "Hide Response":"Спрятать ответ", - "Response Messages":"Что может прийти в ответ", - "Try it out!":"Попробовать!", - "Show/Hide":"Показать/Скрыть", - "List Operations":"Операции кратко", - "Expand Operations":"Операции подробно", - "Raw":"В сыром виде", - "can't parse JSON. Raw result":"Не удается распарсить ответ:", - "Model Schema":"Структура", - "Model":"Описание", - "apply":"применить", - "Username":"Имя пользователя", - "Password":"Пароль", - "Terms of service":"Условия использования", - "Created by":"Разработано", - "See more at":"Еще тут", - "Contact the developer":"Связаться с разработчиком", - "api version":"Версия API", - "Response Content Type":"Content Type ответа", - "fetching resource":"Получение ресурса", - "fetching resource list":"Получение ресурсов", - "Explore":"Поехали", - "Show Swagger Petstore Example Apis":"Показать примеры АПИ", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"Не удается получить ответ от сервера. Возможно, какая-то лажа с настройками доступа", - "Please specify the protocol for":"Пожалуйста, укажите протогол для", - "Can't read swagger JSON from":"Не получается прочитать swagger json из", - "Finished Loading Resource Information. Rendering Swagger UI":"Загрузка информации о ресурсах завершена. Рендерим", - "Unable to read api":"Не удалось прочитать api", - "from path":"по адресу", - "server returned":"сервер сказал" -}); diff --git a/reference/ucp/3.0/api/lang/tr.js b/reference/ucp/3.0/api/lang/tr.js deleted file mode 100644 index b371b67f3f..0000000000 --- a/reference/ucp/3.0/api/lang/tr.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -/* jshint quotemark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Uyarı: Deprecated", - "Implementation Notes":"Gerçekleştirim Notları", - "Response Class":"Dönen Sınıf", - "Status":"Statü", - "Parameters":"Parametreler", - "Parameter":"Parametre", - "Value":"Değer", - "Description":"Açıklama", - "Parameter Type":"Parametre Tipi", - "Data Type":"Veri Tipi", - "Response Messages":"Dönüş Mesajı", - "HTTP Status Code":"HTTP Statü Kodu", - "Reason":"Gerekçe", - "Response Model":"Dönüş Modeli", - "Request URL":"İstek URL", - "Response Body":"Dönüş İçeriği", - "Response Code":"Dönüş Kodu", - "Response Headers":"Dönüş Üst Bilgileri", - "Hide Response":"Dönüşü Gizle", - "Headers":"Üst Bilgiler", - "Try it out!":"Dene!", - "Show/Hide":"Göster/Gizle", - "List Operations":"Operasyonları Listele", - "Expand Operations":"Operasyonları Aç", - "Raw":"Ham", - "can't parse JSON. Raw result":"JSON çözümlenemiyor. Ham sonuç", - "Model Schema":"Model Şema", - "Model":"Model", - "apply":"uygula", - "Username":"Kullanıcı Adı", - "Password":"Parola", - "Terms of service":"Servis şartları", - "Created by":"Oluşturan", - "See more at":"Daha fazlası için", - "Contact the developer":"Geliştirici ile İletişime Geçin", - "api version":"api versiyon", - "Response Content Type":"Dönüş İçerik Tipi", - "fetching resource":"kaynak getiriliyor", - "fetching resource list":"kaynak listesi getiriliyor", - "Explore":"Keşfet", - "Show Swagger Petstore Example Apis":"Swagger Petstore Örnek Api'yi Gör", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"Sunucudan okuma yapılamıyor. Sunucu access-control-origin ayarlarınızı kontrol edin.", - "Please specify the protocol for":"Lütfen istenen adres için protokol belirtiniz", - "Can't read swagger JSON from":"Swagger JSON bu kaynaktan okunamıyor", - "Finished Loading Resource Information. Rendering Swagger UI":"Kaynak baglantısı tamamlandı. Swagger UI gösterime hazırlanıyor", - "Unable to read api":"api okunamadı", - "from path":"yoldan", - "server returned":"sunucuya dönüldü" -}); diff --git a/reference/ucp/3.0/api/lang/translator.js b/reference/ucp/3.0/api/lang/translator.js deleted file mode 100644 index ffb879f9a2..0000000000 --- a/reference/ucp/3.0/api/lang/translator.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -/** - * Translator for documentation pages. - * - * To enable translation you should include one of language-files in your index.html - * after . - * For example - - * - * If you wish to translate some new texts you should do two things: - * 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too. - * 2. Mark that text it templates this way New Phrase or . - * The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate. - * - */ -window.SwaggerTranslator = { - - _words:[], - - translate: function(sel) { - var $this = this; - sel = sel || '[data-sw-translate]'; - - $(sel).each(function() { - $(this).html($this._tryTranslate($(this).html())); - - $(this).val($this._tryTranslate($(this).val())); - $(this).attr('title', $this._tryTranslate($(this).attr('title'))); - }); - }, - - _tryTranslate: function(word) { - return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word; - }, - - learn: function(wordsMap) { - this._words = wordsMap; - } -}; diff --git a/registry/storage-drivers/gcs.md b/registry/storage-drivers/gcs.md index 2c74f34c59..32b1c6b3bc 100644 --- a/registry/storage-drivers/gcs.md +++ b/registry/storage-drivers/gcs.md @@ -72,4 +72,4 @@ An implementation of the `storagedriver.StorageDriver` interface which uses Goog **Note** Instead of a key file you can use [Google Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials). -`rootdirectory`: (optional) The root directory tree in which all registry files are stored. Defaults to the empty string (bucket root). +`rootdirectory`: (optional) The root directory tree in which all registry files are stored. Defaults to the empty string (bucket root). If a prefix is used, the path `bucketname/` has to be pre-created before starting the registry. diff --git a/release-notes/docker-machine.md b/release-notes/docker-machine.md index c6f65cdc0c..9ad0da9b09 100644 --- a/release-notes/docker-machine.md +++ b/release-notes/docker-machine.md @@ -523,7 +523,7 @@ toc_max: 2 - Update Boot2Docker cache in PreCreateCheck phase - OpenStack - Filter floating IPs by tenant ID -- Virtualbox +- VirtualBox - Reject duplicate hostonlyifs Name/IP with clear message - Detect when hostonlyif can't be created. Point to known working version of VirtualBox - Don't create the VM if no hardware virtualization is available and add a flag to force create @@ -581,7 +581,7 @@ Non-core driver plugins should still work as intended (in externally distributed - Generic - Support password protected ssh keys though ssh-agent - Support DNS names -- Virtualbox +- VirtualBox - Show a warning if virtualbox is too old - Recognize yet another Hardware Virtualization issue pattern - Fix Hardware Virtualization on Linux/AMD diff --git a/storage/storagedriver/device-mapper-driver.md b/storage/storagedriver/device-mapper-driver.md index 54e56d63b6..72e4410a67 100644 --- a/storage/storagedriver/device-mapper-driver.md +++ b/storage/storagedriver/device-mapper-driver.md @@ -807,6 +807,14 @@ storage driver. by thin provisioning and copy-on-write. Volumes have other benefits, such as allowing you to share data among containers and persisting even when no running container is using them. + +- **Note**: when using `devicemapper` and the `json-file` log driver, the log + files generated by a container are still stored in Docker's dataroot directory, + by default `/var/lib/docker`. If your containers generate lots of log messages, + this may lead to increased disk usage or the inability to manage your system due + to a full disk. You can configure a + [log driver](/config/containers/logging/configure.md) to store your container + logs externally. ## Related Information diff --git a/storage/storagedriver/select-storage-driver.md b/storage/storagedriver/select-storage-driver.md index f6655101be..4df14fcc71 100644 --- a/storage/storagedriver/select-storage-driver.md +++ b/storage/storagedriver/select-storage-driver.md @@ -152,14 +152,14 @@ With regard to Docker, the backing filesystem is the filesystem where `/var/lib/docker/` is located. Some storage drivers only work with specific backing filesystems. -| Storage driver | Supported backing filesystems | +| Storage driver | Supported backing filesystems | |:----------------------|:------------------------------| -| `overlay2`, `overlay` | `xfs` with fstype=1, `ext4` | +| `overlay2`, `overlay` | `xfs` with ftype=1, `ext4` | | `aufs` | `xfs`, `ext4` | | `devicemapper` | `direct-lvm` | | `btrfs` | `btrfs` | | `zfs` | `zfs` | -| `vfs` | any filesystem | +| `vfs` | any filesystem | ## Other considerations diff --git a/storage/storagedriver/zfs-driver.md b/storage/storagedriver/zfs-driver.md index a439d897d1..46f83af919 100644 --- a/storage/storagedriver/zfs-driver.md +++ b/storage/storagedriver/zfs-driver.md @@ -20,7 +20,7 @@ The ZFS on Linux (ZoL) port is healthy and maturing. However, at this point in time it is not recommended to use the `zfs` Docker storage driver for production use unless you have substantial experience with ZFS on Linux. -> **Note**: There is also a FUSE implementation of ZFS on the Linux platform. +> ***Note***: There is also a FUSE implementation of ZFS on the Linux platform. > This is not recommended. The native ZFS driver (ZoL) is more tested, more > performant, and is more widely used. The remainder of this document refers > to the native ZoL port. @@ -44,6 +44,9 @@ use unless you have substantial experience with ZFS on Linux. and push existing images to Docker Hub or a private repository, so that you do not need to re-create them later. +> ***NOTE:*** There is no need to use `MountFlags=slave` with Docker Engine 18.09 or +> later because `dockerd` and `containerd` are in different mount namespaces. + ## Configure Docker with the `zfs` storage driver 1. Stop Docker. diff --git a/test.md b/test.md index 8b42804a23..846b4c4b69 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 diff --git a/toolbox/index.md b/toolbox/index.md index a0fe896f65..f4029f366c 100644 --- a/toolbox/index.md +++ b/toolbox/index.md @@ -5,6 +5,8 @@ keywords: docker, documentation, about, technology, docker toolbox, gui title: Docker Toolbox --- +**Note** while Docker Toolbox is now considered Legacy, Kitematic is still supported and available as a separate download from [https://github.com/docker/kitematic](https://github.com/docker/kitematic) + Available for both Windows and Mac, Docker Toolbox installs the Docker Client, Machine, Compose, and Kitematic. **Learn about Docker Toolbox**. See [Docker Toolbox Overview](overview.md) for a quick tour of Toolbox, and