Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

feat(windows): Adds demo containers based on Windows #3921

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

davinci26
Copy link

Adds the makefile definitions and the checks to build Windows based
demo containers on the CI.

Fixes #3880

Signed-off-by: Sotiris Nanopoulos [email protected]

@davinci26
Copy link
Author

Lets see what the CI things of the change first

@codecov-commenter
Copy link

codecov-commenter commented Aug 4, 2021

Codecov Report

Merging #3921 (4f070c8) into main (a70ee2c) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3921      +/-   ##
==========================================
- Coverage   67.88%   67.86%   -0.02%     
==========================================
  Files         205      205              
  Lines       11629    11629              
==========================================
- Hits         7894     7892       -2     
- Misses       3684     3686       +2     
  Partials       51       51              
Flag Coverage Δ
unittests 67.86% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/k8s/announcement_handlers.go 72.97% <0.00%> (-5.41%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a70ee2c...4f070c8. Read the comment docs.

@davinci26
Copy link
Author

Updating to non-draft as the validation locally passes:

davinci@MININT-9CEC7NF:~/osm$ curl -X GET http://localhost:5000/v2/_catalog
{"repositories":["bookbuyer","bookbuyer-windows","bookstore","bookstore-windows","bookthief","bookthief-windows","bookwarehouse","bookwarehouse-windows","init","init-osm-controller","my-ubuntu","osm-controller","osm-crd-converter","osm-crds","osm-injector","tcp-client","tcp-client-windows","tcp-echo-server","tcp-echo-server-windows"]}

@davinci26 davinci26 marked this pull request as ready for review August 4, 2021 21:54
@davinci26 davinci26 requested a review from a team as a code owner August 4, 2021 21:54
@davinci26
Copy link
Author

@nojnhuh do you want to take this review since you are involved with the docker images?

Copy link
Contributor

@nojnhuh nojnhuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple comments for things that might be broken (publish-image.sh, windows images looking like linux from docker inspect) and a few other light suggestions. Everything else looks good.

@davinci26 davinci26 changed the title feat(windows): Adds demo containers based on Windows feat(windows): [Do not merge] Adds demo containers based on Windows Aug 6, 2021
@ksubrmnn ksubrmnn added the wip Work-in-Progress label Aug 6, 2021
@davinci26 davinci26 changed the title feat(windows): [Do not merge] Adds demo containers based on Windows feat(windows): [Do not merge][Blocked Externally] Adds demo containers based on Windows Aug 6, 2021
@ksubrmnn ksubrmnn added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 6, 2021
@davinci26
Copy link
Author

Currently blocked as the Windows insider images that we need to use cannot be built with docker buildx. This PR should be good to go when non-insider versions of Windows server become available

@davinci26 davinci26 force-pushed the windowsDemoContainers branch from 2ca648f to 90ae21c Compare August 6, 2021 19:01
@davinci26 davinci26 force-pushed the windowsDemoContainers branch 3 times, most recently from 4f070c8 to 1da1d80 Compare August 31, 2021 16:49
@davinci26 davinci26 changed the title feat(windows): [Do not merge][Blocked Externally] Adds demo containers based on Windows feat(windows): Adds demo containers based on Windows Aug 31, 2021
@davinci26
Copy link
Author

@nojnhuh the container image went out of public preview so we should be able to do merge it now.

davinci@MININT-9CEC7NF:~/osm$ make docker-build-windows-bookbuyer
make OS=windows build-bookbuyer
make[1]: Entering directory '/home/davinci/osm'
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o ./demo/bin/bookbuyer/bookbuyer.exe ./demo/cmd/bookbuyer
make[1]: Leaving directory '/home/davinci/osm'
docker buildx build --platform "windows/amd64" -t osmwindevregistry.azurecr.io/bookbuyer-windows:latest  -f dockerfiles/Dockerfile.bookbuyer.windows demo/bin/bookbuyer
WARN[0000] No output specified for docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load 
[+] Building 11.8s (7/7) FINISHED                                                                                                                                                                                   
 => [internal] booting buildkit                                                                                                                                                                                2.7s
 => => starting container buildx_buildkit_img-builder0                                                                                                                                                         2.7s
 => [internal] load build definition from Dockerfile.bookbuyer.windows                                                                                                                                         0.1s
 => => transferring dockerfile: 201B                                                                                                                                                                           0.0s
 => [internal] load .dockerignore                                                                                                                                                                              0.0s
 => => transferring context: 2B                                                                                                                                                                                0.0s
 => [internal] load metadata for mcr.microsoft.com/windows/nanoserver:ltsc2022                                                                                                                                 1.1s
 => [internal] load build context                                                                                                                                                                              0.5s
 => => transferring context: 24.44MB                                                                                                                                                                           0.5s
 => [1/2] FROM mcr.microsoft.com/windows/nanoserver:ltsc2022@sha256:3df3372895223b44475125ab3553fd39a71d89a896099d463d3216f1e22a3ab0                                                                           6.9s
 => => resolve mcr.microsoft.com/windows/nanoserver:ltsc2022@sha256:3df3372895223b44475125ab3553fd39a71d89a896099d463d3216f1e22a3ab0                                                                           0.0s
 => => sha256:ee7a9c9193e3d9bee1b6c8ddddddd5356aed50f77c78d18d377241f4aee6d676 117.98MB / 117.98MB                                                                                                             4.5s
 => => extracting sha256:ee7a9c9193e3d9bee1b6c8ddddddd5356aed50f77c78d18d377241f4aee6d676                                                                                                                      2.3s
 => [2/2] COPY bookbuyer.exe bookbuyer.html.template /               

@nojnhuh
Copy link
Contributor

nojnhuh commented Aug 31, 2021

LGTM, but I tried it out on my Mac but I get an "operating system is not supported" error which seems to agree with the output I get for ​docker buildx ls​:

% docker buildx ls
NAME/NODE DRIVER/ENDPOINT STATUS PLATFORMS
desktop-linux   docker
  desktop-linux desktop-linux   running linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6
default *       docker
  default       default         running linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6

​I wonder if the GitHub actions runners would hit the same error. I don't think any of the CI jobs try to build the Windows images currently. Or do you know if we were going to have Windows CI machines build the images so this probably wouldn't matter?

@nojnhuh
Copy link
Contributor

nojnhuh commented Aug 31, 2021

At @davinci26's suggestion, running docker buildx create --name img-builder --use before building any of the images fixed this issue for me.

Adds the makefile definitions and the checks to build Windows based
demo containers on the CI.

Fixes openservicemesh#3880

Signed-off-by: Sotiris Nanopoulos <[email protected]>
@davinci26 davinci26 force-pushed the windowsDemoContainers branch from 30b47ac to 5e42548 Compare August 31, 2021 19:09
@shashankram shashankram removed wip Work-in-Progress do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Aug 31, 2021
@davinci26
Copy link
Author

@shashankram should we merge this one?

@shashankram shashankram merged commit f59e84c into openservicemesh:main Sep 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows based demo containers
6 participants