From c695a430f0c3da79af972484ae5f408921ace2a4 Mon Sep 17 00:00:00 2001 From: Hacktivista Date: Wed, 7 Nov 2018 11:15:49 -0300 Subject: [PATCH 01/13] Update configs.md configs key is not (and will not be) supported in docker compose, check https://github.com/docker/compose/issues/5110 for more info --- engine/swarm/configs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/swarm/configs.md b/engine/swarm/configs.md index f78c1c4616..5127c47de1 100644 --- a/engine/swarm/configs.md +++ b/engine/swarm/configs.md @@ -122,8 +122,8 @@ Docker configs. ### Defining and using configs in compose files -Both the `docker compose` and `docker stack` commands support defining configs -in a compose file. See +`docker stack` command supports defining configs in a compose file, though +`docker compose` will ignore the `configs` key as is not supported. See [the Compose file reference](/compose/compose-file/#configs) for details. ### Simple example: Get started with configs From 478113a972c7b656edf396243e4e023850fc0109 Mon Sep 17 00:00:00 2001 From: Alastair Smith Date: Mon, 1 Apr 2019 13:11:12 -0500 Subject: [PATCH 02/13] add slack webhook to Jenkinsfile --- Jenkinsfile | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8e420440ae..a826f05f52 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,6 @@ def dtrVpnAddress = "vpn.corp-us-east-1.aws.dckr.io" def ucpBundle = [file(credentialsId: "ucp-bundle", variable: 'UCP')] +def slackString = [string(credentialsId: 'slack-docs-webhook', variable: 'slack')] def reg = [credentialsId: 'csebuildbot', url: 'https://index.docker.io/v1/'] pipeline { @@ -50,7 +51,6 @@ pipeline { } withDockerRegistry(reg) { sh """ - cd ucp-bundle-success_bot export DOCKER_TLS_VERIFY=1 export COMPOSE_TLS_VERSION=TLSv1_2 export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot @@ -70,15 +70,18 @@ pipeline { withCredentials(ucpBundle) { sh 'unzip -o $UCP' } - withDockerRegistry(reg) { - sh """ - cd ucp-bundle-success_bot - export DOCKER_TLS_VERIFY=1 - export COMPOSE_TLS_VERSION=TLSv1_2 - export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot - export DOCKER_HOST=tcp://ucp.corp-us-east-1.aws.dckr.io:443 - docker service update --detach=false --force --image docs/docker.github.io:prod-${env.BUILD_NUMBER} docs-docker-com_docs --with-registry-auth - """ + withCredentials(slackString) { + withDockerRegistry(reg) { + sh """ + cd ucp-bundle-success_bot + export DOCKER_TLS_VERIFY=1 + export COMPOSE_TLS_VERSION=TLSv1_2 + export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot + export DOCKER_HOST=tcp://ucp.corp-us-east-1.aws.dckr.io:443 + docker service update --detach=false --force --image docs/docker.github.io:prod-${env.BUILD_NUMBER} docs-docker-com_docs --with-registry-auth + curl -X POST -H 'Content-type: application/json' --data '{"text":"Successfully published docs. https://docs.docker.com/"}' $slack + """ + } } } } From d749399706cb26fcd271b71426ba1e683c2dcc6c Mon Sep 17 00:00:00 2001 From: Darwin Traver Date: Mon, 1 Apr 2019 20:55:36 -0400 Subject: [PATCH 03/13] Adding Azure note (#8566) * Adding Azure note * Rephrase additional line and update link --- reference/ucp/3.1/cli/install.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reference/ucp/3.1/cli/install.md b/reference/ucp/3.1/cli/install.md index 5528f1cdc3..9835357c67 100644 --- a/reference/ucp/3.1/cli/install.md +++ b/reference/ucp/3.1/cli/install.md @@ -38,6 +38,8 @@ If you have SELinux policies enabled for your Docker install, you will need to use `docker container run --rm -it --security-opt label=disable ...` when running this command. +If you are installing on Azure, see [Install UCP on Azure](/ee/ucp/admin/install/install-on-azure/). + ## Options | Option | Description | From a2e2846b6c6d93982ed96980d6fd2cf3a6870297 Mon Sep 17 00:00:00 2001 From: David Ye Date: Mon, 1 Apr 2019 23:56:55 -0700 Subject: [PATCH 04/13] Fix typo --- develop/develop-images/dockerfile_best-practices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/develop/develop-images/dockerfile_best-practices.md b/develop/develop-images/dockerfile_best-practices.md index c020cdcaa0..6beacdc26b 100644 --- a/develop/develop-images/dockerfile_best-practices.md +++ b/develop/develop-images/dockerfile_best-practices.md @@ -202,7 +202,7 @@ cd example # create an example file touch somefile.txt -# build and image using the current directory as context, and a Dockerfile passed through stdin +# build an image using the current directory as context, and a Dockerfile passed through stdin docker build -t myimage:latest -f- . < Date: Tue, 2 Apr 2019 09:08:02 -0300 Subject: [PATCH 05/13] Update configs.md --- engine/swarm/configs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/swarm/configs.md b/engine/swarm/configs.md index 5127c47de1..9be45cc8bc 100644 --- a/engine/swarm/configs.md +++ b/engine/swarm/configs.md @@ -122,8 +122,8 @@ Docker configs. ### Defining and using configs in compose files -`docker stack` command supports defining configs in a compose file, though -`docker compose` will ignore the `configs` key as is not supported. See +The `docker stack` command supports defining configs in a compose file. +However, the 'configs' key is not supported for `docker compose`. See [the Compose file reference](/compose/compose-file/#configs) for details. ### Simple example: Get started with configs From 41dfff114babdcc6776bf808195ab067c6cd6775 Mon Sep 17 00:00:00 2001 From: Maria Bermudez Date: Tue, 2 Apr 2019 09:09:51 -0700 Subject: [PATCH 06/13] Final edit --- engine/swarm/configs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/swarm/configs.md b/engine/swarm/configs.md index 9be45cc8bc..d2aec6673d 100644 --- a/engine/swarm/configs.md +++ b/engine/swarm/configs.md @@ -122,8 +122,8 @@ Docker configs. ### Defining and using configs in compose files -The `docker stack` command supports defining configs in a compose file. -However, the 'configs' key is not supported for `docker compose`. See +The `docker stack` command supports defining configs in a Compose file. +However, the `configs` key is not supported for `docker compose`. See [the Compose file reference](/compose/compose-file/#configs) for details. ### Simple example: Get started with configs From b39d2ddd1427afe7d192b18496c5b1724c64f5ea Mon Sep 17 00:00:00 2001 From: Alastair Smith Date: Tue, 2 Apr 2019 12:00:23 -0500 Subject: [PATCH 07/13] add protection to Jenkinsfile --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 34916fbce7..744eb91abd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,6 +13,9 @@ pipeline { agent { label 'ubuntu-1604-aufs-stable' } + when { + expression { env.GIT_URL == 'https://github.com/docker/docker.github.io.git' } + } stages { stage( 'build and push stage image' ) { when { From 900feffb4ce8df014e30eef01423166b9ad04f87 Mon Sep 17 00:00:00 2001 From: Alastair Smith Date: Tue, 2 Apr 2019 12:23:41 -0500 Subject: [PATCH 08/13] fix git url protection in jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 744eb91abd..e1102ed1ec 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ pipeline { label 'ubuntu-1604-aufs-stable' } when { - expression { env.GIT_URL == 'https://github.com/docker/docker.github.io.git' } + expression { env.GIT_URL == 'https://github.com/Docker/docker.github.io.git' } } stages { stage( 'build and push stage image' ) { From 1662ab4867a2ac42bfdbdda81a50737de5d0fbe5 Mon Sep 17 00:00:00 2001 From: Yoju LEE Date: Tue, 2 Apr 2019 20:42:20 +0200 Subject: [PATCH 09/13] typo fix friendlyname -> friendlyhello --- get-started/part2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-started/part2.md b/get-started/part2.md index 162290edde..89968c1e96 100644 --- a/get-started/part2.md +++ b/get-started/part2.md @@ -418,7 +418,7 @@ ones if you'd like to explore a bit before moving on. ```shell docker build -t friendlyhello . # Create image using this directory's Dockerfile -docker run -p 4000:80 friendlyhello # Run "friendlyname" mapping port 4000 to 80 +docker run -p 4000:80 friendlyhello # Run "friendlyhello" mapping port 4000 to 80 docker run -d -p 4000:80 friendlyhello # Same thing, but in detached mode docker container ls # List all running containers docker container ls -a # List all containers, even those not running From 3a4d4f4cbb9e8b1c2e7c04b3251dcdb74dcf1322 Mon Sep 17 00:00:00 2001 From: paigehargrave Date: Wed, 3 Apr 2019 12:47:29 -0400 Subject: [PATCH 10/13] Update to UCP known issues --- ee/ucp/release-notes.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ee/ucp/release-notes.md b/ee/ucp/release-notes.md index 7161890fd2..46d0660f9e 100644 --- a/ee/ucp/release-notes.md +++ b/ee/ucp/release-notes.md @@ -42,6 +42,9 @@ upgrade your installation to the latest release. * Fixed an issue with continuous interlock reconciliation if `ucp-interlock` service image does not match expected version. (ENGORC-2081) ### Known Issues +* Upgrading from UCP 3.1.4 to 3.1.5 causes missing Swarm placement constraints banner for some services (ENGORC-2191)https://docker.atlassian.net/browse/ENGORC-2191. This can cause Swarm services to run unexpectedly on Kubernetes nodes. See https://www.docker.com/ddc-41 for more information. + + - Workaround: Delete any `ucp-*-s390x` services; they're designed for running on IBM Z nodes. * There are important changes to the upgrade process that, if not correctly followed, can impact the availability of applications running on the Swarm during uprades. These constraints impact any upgrades coming from any Docker Engine version before 18.09 to version 18.09 or greater. For more information about about upgrading Docker Enterprise to version 2.1, see [Upgrade Docker](../upgrade) * To deploy Pods with containers using Restricted Parameters, the user must be an admin and a service account must explicitly have a **ClusterRoleBinding** with `cluster-admin` as the **ClusterRole**. Restricted Parameters on Containers include: * Host Bind Mounts From 8dc337686dd74ecfe77343f1b223d1402f615532 Mon Sep 17 00:00:00 2001 From: paigehargrave Date: Wed, 3 Apr 2019 12:52:28 -0400 Subject: [PATCH 11/13] Update UCP release notes --- ee/ucp/release-notes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/ucp/release-notes.md b/ee/ucp/release-notes.md index 46d0660f9e..92f462a0ad 100644 --- a/ee/ucp/release-notes.md +++ b/ee/ucp/release-notes.md @@ -42,9 +42,9 @@ upgrade your installation to the latest release. * Fixed an issue with continuous interlock reconciliation if `ucp-interlock` service image does not match expected version. (ENGORC-2081) ### Known Issues -* Upgrading from UCP 3.1.4 to 3.1.5 causes missing Swarm placement constraints banner for some services (ENGORC-2191)https://docker.atlassian.net/browse/ENGORC-2191. This can cause Swarm services to run unexpectedly on Kubernetes nodes. See https://www.docker.com/ddc-41 for more information. +* Upgrading from UCP 3.1.4 to 3.1.5 causes missing Swarm placement constraints banner for some Swarm services (ENGORC-2191)https://docker.atlassian.net/browse/ENGORC-2191. This can cause Swarm services to run unexpectedly on Kubernetes nodes. See https://www.docker.com/ddc-41 for more information. - - Workaround: Delete any `ucp-*-s390x` services; they're designed for running on IBM Z nodes. + - Workaround: Delete any `ucp-*-s390x` Swarm services for example, `ucp-auth-api-s390x`. * There are important changes to the upgrade process that, if not correctly followed, can impact the availability of applications running on the Swarm during uprades. These constraints impact any upgrades coming from any Docker Engine version before 18.09 to version 18.09 or greater. For more information about about upgrading Docker Enterprise to version 2.1, see [Upgrade Docker](../upgrade) * To deploy Pods with containers using Restricted Parameters, the user must be an admin and a service account must explicitly have a **ClusterRoleBinding** with `cluster-admin` as the **ClusterRole**. Restricted Parameters on Containers include: * Host Bind Mounts From e88746c6a8d0fccfd8eb41f4b8c58115c3ee51eb Mon Sep 17 00:00:00 2001 From: Maria Bermudez Date: Wed, 3 Apr 2019 09:56:56 -0700 Subject: [PATCH 12/13] Update release-notes.md --- ee/ucp/release-notes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/ucp/release-notes.md b/ee/ucp/release-notes.md index 92f462a0ad..f10e995f0b 100644 --- a/ee/ucp/release-notes.md +++ b/ee/ucp/release-notes.md @@ -42,9 +42,9 @@ upgrade your installation to the latest release. * Fixed an issue with continuous interlock reconciliation if `ucp-interlock` service image does not match expected version. (ENGORC-2081) ### Known Issues -* Upgrading from UCP 3.1.4 to 3.1.5 causes missing Swarm placement constraints banner for some Swarm services (ENGORC-2191)https://docker.atlassian.net/browse/ENGORC-2191. This can cause Swarm services to run unexpectedly on Kubernetes nodes. See https://www.docker.com/ddc-41 for more information. - - Workaround: Delete any `ucp-*-s390x` Swarm services for example, `ucp-auth-api-s390x`. +* Upgrading from UCP 3.1.4 to 3.1.5 causes missing Swarm placement constraints banner for some Swarm services (ENGORC-2191)https://docker.atlassian.net/browse/ENGORC-2191. This can cause Swarm services to run unexpectedly on Kubernetes nodes. See https://www.docker.com/ddc-41 for more information. + - Workaround: Delete any `ucp-*-s390x` Swarm services. For example, `ucp-auth-api-s390x`. * There are important changes to the upgrade process that, if not correctly followed, can impact the availability of applications running on the Swarm during uprades. These constraints impact any upgrades coming from any Docker Engine version before 18.09 to version 18.09 or greater. For more information about about upgrading Docker Enterprise to version 2.1, see [Upgrade Docker](../upgrade) * To deploy Pods with containers using Restricted Parameters, the user must be an admin and a service account must explicitly have a **ClusterRoleBinding** with `cluster-admin` as the **ClusterRole**. Restricted Parameters on Containers include: * Host Bind Mounts From 64cbf59a3e5c40019f1202ee15dec79b2c87a831 Mon Sep 17 00:00:00 2001 From: Ally Smith Date: Wed, 3 Apr 2019 16:01:55 -0500 Subject: [PATCH 13/13] make jenkinsfile serve private and public docs After a couple of Jenkins-based mix-ups it became obvious we needed a Jenkinsfile that would serve both public and private projects, that we could move between repos without worry. This Jenkinsfile knows which images to build and push and which swarm services to update because of the use of git_url and branch conditions. --- Jenkinsfile | 126 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 101 insertions(+), 25 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e1102ed1ec..3b54bd3e61 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,3 @@ -def dtrVpnAddress = "vpn.corp-us-east-1.aws.dckr.io" -def ucpBundle = [file(credentialsId: "ucp-bundle", variable: 'UCP')] -def slackString = [string(credentialsId: 'slack-docs-webhook', variable: 'slack')] def reg = [credentialsId: 'csebuildbot', url: 'https://index.docker.io/v1/'] pipeline { @@ -13,6 +10,12 @@ pipeline { agent { label 'ubuntu-1604-aufs-stable' } + environment { + DTR_VPN_ADDRESS = credentials('dtr-vpn-address') + DOCKER_HOST_STRING = credentials('docker-host') + UCP_BUNDLE = credentials('ucp-bundle') + SLACK = credentials('slack-docs-webhook') + } when { expression { env.GIT_URL == 'https://github.com/Docker/docker.github.io.git' } } @@ -43,48 +46,121 @@ pipeline { } } } - stage( 'update docs-stage' ) { + stage( 'update docs stage' ) { when { branch 'master' } steps { - withVpn(dtrVpnAddress) { - withCredentials(ucpBundle) { - sh 'unzip -o $UCP' - } + withVpn("$DTR_VPN_ADDRESS") { + sh "unzip -o $UCP_BUNDLE" withDockerRegistry(reg) { sh """ export DOCKER_TLS_VERIFY=1 export COMPOSE_TLS_VERSION=TLSv1_2 export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot - export DOCKER_HOST=tcp://ucp.corp-us-east-1.aws.dckr.io:443 + export DOCKER_HOST=$DOCKER_HOST_STRING docker service update --detach=false --force --image docs/docker.github.io:stage-${env.BUILD_NUMBER} docs-stage-docker-com_docs --with-registry-auth """ } } } } - stage( 'update docs-prod' ) { + stage( 'update docs prod' ) { when { branch 'published' } steps { - withVpn(dtrVpnAddress) { - withCredentials(ucpBundle) { - sh 'unzip -o $UCP' + withVpn("$DTR_VPN_ADDRESS") { + sh "unzip -o $UCP_BUNDLE" + withDockerRegistry(reg) { + sh """ + cd ucp-bundle-success_bot + export DOCKER_TLS_VERIFY=1 + export COMPOSE_TLS_VERSION=TLSv1_2 + export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot + export DOCKER_HOST=$DOCKER_HOST_STRING + docker service update --detach=false --force --image docs/docker.github.io:prod-${env.BUILD_NUMBER} docs-docker-com_docs --with-registry-auth + curl -X POST -H 'Content-type: application/json' --data '{"text":"Successfully published docs. https://docs.docker.com/"}' $SLACK + """ } - withCredentials(slackString) { - withDockerRegistry(reg) { - sh """ - cd ucp-bundle-success_bot - export DOCKER_TLS_VERIFY=1 - export COMPOSE_TLS_VERSION=TLSv1_2 - export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot - export DOCKER_HOST=tcp://ucp.corp-us-east-1.aws.dckr.io:443 - docker service update --detach=false --force --image docs/docker.github.io:prod-${env.BUILD_NUMBER} docs-docker-com_docs --with-registry-auth - curl -X POST -H 'Content-type: application/json' --data '{"text":"Successfully published docs. https://docs.docker.com/"}' $slack - """ - } + } + } + } + } + } + stage( 'docs-private' ) { + agent { + label 'ubuntu-1604-aufs-stable' + } + environment { + DTR_VPN_ADDRESS = credentials('dtr-vpn-address') + DOCKER_HOST_STRING = credentials('docker-host') + UCP_BUNDLE = credentials('ucp-bundle') + } + when { + expression { env.GIT_URL == "https://github.com/docker/docs-private.git" } + } + stages { + stage( 'build and push new beta stage image' ) { + when { + branch 'amberjack' + } + steps { + withDockerRegistry(reg) { + sh """ + docker image build --tag docs/docs-private:beta-stage-${env.BUILD_NUMBER} . && \ + docker image push docs/docs-private:beta-stage-${env.BUILD_NUMBER} + """ + } + } + } + stage( 'build and push new beta image' ) { + when { + branch 'published' + } + steps { + withDockerRegistry(reg) { + sh """ + docker image build --tag docs/docs-private:beta-${env.BUILD_NUMBER} . && \ + docker image push docs/docs-private:beta-${env.BUILD_NUMBER} + """ + } + } + } + stage( 'update beta stage service' ) { + when { + branch 'amberjack' + } + steps { + withVpn("$DTR_VPN_ADDRESS") { + sh "unzip -o $UCP_BUNDLE" + withDockerRegistry(reg) { + sh """ + export DOCKER_TLS_VERIFY=1 + export COMPOSE_TLS_VERSION=TLSv1_2 + export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot + export DOCKER_HOST=$DOCKER_HOST_STRING + docker service update --detach=false --force --image docs/docs-private:beta-stage-${env.BUILD_NUMBER} docs-beta-stage-docker-com_docs --with-registry-auth + """ + } + } + } + } + stage( 'update beta service' ) { + when { + branch 'published' + } + steps { + withVpn("$DTR_VPN_ADDRESS") { + sh "unzip -o $UCP_BUNDLE" + withDockerRegistry(reg) { + sh """ + export DOCKER_TLS_VERIFY=1 + export COMPOSE_TLS_VERSION=TLSv1_2 + export DOCKER_CERT_PATH=${WORKSPACE}/ucp-bundle-success_bot + export DOCKER_HOST=$DOCKER_HOST_STRING + docker service update --detach=false --force --image docs/docs-private:beta-${env.BUILD_NUMBER} docs-beta-docker-com_docs --with-registry-auth + """ } } }