Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nats-streaming] Release v0.6.0 #3622

Merged
merged 3 commits into from Oct 26, 2017

Conversation

Projects
None yet
6 participants
@kozlovic
Copy link
Contributor

commented Oct 25, 2017

Adding multi-arch support.
Details can be found here


Tags: 0.5.0-linux, linux
SharedTags: 0.5.0, latest
amd64-GitCommit: 2f9abaf0830c64e40d22e3a8d4da47b96c666aef

This comment has been minimized.

Copy link
@tianon

tianon Oct 25, 2017

Member

This section needs to include Architectures: amd64, arm32v7, arm64v8 or it will inherit the default value, which is just amd64.

This comment has been minimized.

Copy link
@kozlovic

kozlovic Oct 25, 2017

Author Contributor

Thanks, and for some reason I got it wrong with the release version! Let me update this. Sorry for wasting your time.

Architectures: windows-amd64
windows-amd64-GitCommit: 2f9abaf0830c64e40d22e3a8d4da47b96c666aef
windows-amd64-Directory: windows/windowsservercore
Constraints: windowsservercore

This comment has been minimized.

Copy link
@tianon

tianon Oct 25, 2017

Member

These images both appear to be using ENTRYPOINT, which isn't something we've allowed on Windows previously due to PowerShell or even CMD not being sufficient for an entrypoint script, lacking exec or even the ability to perform sane signal passing (see https://github.com/docker-library/official-images#consistency).

This comment has been minimized.

Copy link
@kozlovic

kozlovic Oct 25, 2017

Author Contributor

I am confused about this one. Reading the link, I don't see why we would not be using entrypoint and cmd. The entrypoint is the nats-streaming-server executable and we pass by default the monitoring port (with cmd). Note this is also how we did for NATS Server.

This comment has been minimized.

Copy link
@kozlovic

kozlovic Oct 25, 2017

Author Contributor

Looking at other repos for guidance. Should I remove entrypoint and have this for instance:

CMD ["nats-streaming-server", "-m", "8222"]

So if you run the docker image without any argument, it will launch the server with monitoring port. However, if one wants to change the parameters, one would have to include the executable nats-streaming-server as the first argument.
With that approach, though, one could start cmd and have a shell.

This comment has been minimized.

Copy link
@tianon

tianon Oct 26, 2017

Member

Yeah, for now using CMD would definitely be the easiest path to acceptance -- we're trying to find a good solution for Windows to have ENTRYPOINT and still follow our guidelines, but we don't have any exceptions to the ENTRYPOINT rule except images that are FROM scratch (and thus have no environment to allow access to, which is why the existing images use ENTRYPOINT).

This comment has been minimized.

Copy link
@kozlovic

kozlovic Oct 26, 2017

Author Contributor

Ok, so I will update the other repo and let you know when that is done. I am also checking with my team if we need to issue 0.6.2 with Go 1.9.2 or 0.6.0 with Go 1.9.1 is fine. Thanks!

This comment has been minimized.

Copy link
@kozlovic

kozlovic Oct 26, 2017

Author Contributor

@tianon I have updated the Dockerfiles in the nats-streaming-docker repo, and updated the GitCommit only for the Windows variants, hope that is ok. Let me know. Thanks!

@alexellis

This comment has been minimized.

Copy link

commented Oct 25, 2017

Hey @tianon, I have someone who wants to show this in a keynote next week. If there is an image published soon, even a test version I can try integrating it back into OpenFaaS for ARMHF. Is there anything that needs to be done that's remaining?

@kozlovic

This comment has been minimized.

Copy link
Contributor Author

commented Oct 26, 2017

@tianon Would appreciate your feedback about entrypoint/cmd. Also, please do not merge this since we may re-issue with an update of Go to 1.9.2 that was just released today.

@alexellis

This comment has been minimized.

Copy link

commented Oct 26, 2017

Hmm.. would be great to get an image for ARM32v7 for use in a demo next week. Should we try to roll our own if this won't be ready in time?

@kozlovic

This comment has been minimized.

Copy link
Contributor Author

commented Oct 26, 2017

@alexellis @tianon Actually, not sure if a new release for Go 1.9.2 is needed since I don't see security fixes in 1.9.2 compared to 1.9.1, so we may be ok there.
There is still the question about entrypoint/cmd that I am not sure what to do.

As for creating your own image, you could do that indeed. I will comment in the issue in your repo. Thanks!

kozlovic added a commit to nats-io/nats-streaming-docker that referenced this pull request Oct 26, 2017

Update Dockerfile for Windows variants
Removing ENTRYPOINT and only using CMD as per comment in PR:
docker-library/official-images#3622
@yosifkit

This comment has been minimized.

Copy link
Member

commented Oct 26, 2017

LGTM

Diff:
diff --git a/_bashbrew-arches b/_bashbrew-arches
index 46ac9c4..536f898 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -1 +1,5 @@
-nats-streaming:latest @ amd64
+nats-streaming:linux @ amd64
+nats-streaming:linux @ arm32v7
+nats-streaming:linux @ arm64v8
+nats-streaming:nanoserver @ windows-amd64
+nats-streaming:windowsservercore @ windows-amd64
diff --git a/_bashbrew-list b/_bashbrew-list
index 1a97078..0827495 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -1,2 +1,10 @@
-nats-streaming:0.5.0
+nats-streaming:0.6.0
+nats-streaming:0.6.0
+nats-streaming:0.6.0-linux
+nats-streaming:0.6.0-nanoserver
+nats-streaming:0.6.0-windowsservercore
 nats-streaming:latest
+nats-streaming:latest
+nats-streaming:linux
+nats-streaming:nanoserver
+nats-streaming:windowsservercore
diff --git a/_bashbrew-shared-tags b/_bashbrew-shared-tags
index e69de29..6152c4c 100644
--- a/_bashbrew-shared-tags
+++ b/_bashbrew-shared-tags
@@ -0,0 +1,2 @@
+nats-streaming:0.6.0 -- nats-streaming:linux, nats-streaming:nanoserver
+nats-streaming:latest -- nats-streaming:linux, nats-streaming:nanoserver
diff --git a/nats-streaming_latest/Dockerfile b/nats-streaming_linux/Dockerfile
similarity index 100%
rename from nats-streaming_latest/Dockerfile
rename to nats-streaming_linux/Dockerfile
diff --git a/nats-streaming_latest/nats-streaming-server b/nats-streaming_linux/nats-streaming-server
similarity index 48%
copy from nats-streaming_latest/nats-streaming-server
copy to nats-streaming_linux/nats-streaming-server
index 9ad6064..45e5a21 100755
Binary files a/nats-streaming_latest/nats-streaming-server and b/nats-streaming_linux/nats-streaming-server differ
diff --git a/nats-streaming_nanoserver/Dockerfile b/nats-streaming_nanoserver/Dockerfile
new file mode 100644
index 0000000..09f5df8
--- /dev/null
+++ b/nats-streaming_nanoserver/Dockerfile
@@ -0,0 +1,17 @@
+FROM microsoft/nanoserver
+
+# The NAT Streaming Server will look for this environment variable.
+# When set, it prevents the use of the service API to detect
+# if it is running in interactive mode or not, which is
+# failing in the context of a Docker container.
+# (https://github.com/nats-io/gnatsd/issues/543)
+ENV NATS_DOCKERIZED=1
+
+WORKDIR c:/nats-streaming-server
+COPY nats-streaming-server.exe nats-streaming-server.exe
+
+# Expose client and management ports
+EXPOSE 4222 8222
+
+# Run with default memory based store 
+CMD ["nats-streaming-server", "-m", "8222"]
diff --git a/nats-streaming_latest/nats-streaming-server b/nats-streaming_nanoserver/nats-streaming-server.exe
similarity index 48%
copy from nats-streaming_latest/nats-streaming-server
copy to nats-streaming_nanoserver/nats-streaming-server.exe
index 9ad6064..9334a15 100755
Binary files a/nats-streaming_latest/nats-streaming-server and b/nats-streaming_nanoserver/nats-streaming-server.exe differ
diff --git a/nats-streaming_windowsservercore/Dockerfile b/nats-streaming_windowsservercore/Dockerfile
new file mode 100644
index 0000000..02a6b65
--- /dev/null
+++ b/nats-streaming_windowsservercore/Dockerfile
@@ -0,0 +1,17 @@
+FROM microsoft/windowsservercore
+
+# The NAT Streaming Server will look for this environment variable.
+# When set, it prevents the use of the service API to detect
+# if it is running in interactive mode or not, which is
+# failing in the context of a Docker container.
+# (https://github.com/nats-io/gnatsd/issues/543)
+ENV NATS_DOCKERIZED=1
+
+WORKDIR c:/nats-streaming-server
+COPY nats-streaming-server.exe nats-streaming-server.exe
+
+# Expose client and management ports
+EXPOSE 4222 8222
+
+# Run with default memory based store 
+CMD ["nats-streaming-server", "-m", "8222"]
diff --git a/nats-streaming_latest/nats-streaming-server b/nats-streaming_windowsservercore/nats-streaming-server.exe
similarity index 48%
rename from nats-streaming_latest/nats-streaming-server
rename to nats-streaming_windowsservercore/nats-streaming-server.exe
index 9ad6064..9334a15 100755
Binary files a/nats-streaming_latest/nats-streaming-server and b/nats-streaming_windowsservercore/nats-streaming-server.exe differ
@yosifkit

This comment has been minimized.

Copy link
Member

commented Oct 26, 2017

Build test of #3622; c7f20b0 (nats-streaming):

$ bashbrew build nats-streaming:0.6.0-linux
Building bashbrew/cache:dd06495b536b6e552386b1c2ce979bf47243ddc0b120b911e8f550e69764b7e6 (nats-streaming:0.6.0-linux)
Tagging nats-streaming:0.6.0-linux
Tagging nats-streaming:linux
Tagging nats-streaming:0.6.0
Tagging nats-streaming:latest

$ test/run.sh nats-streaming:0.6.0-linux
testing nats-streaming:0.6.0-linux
	'cve-2014--shellshock' [1/2]...passed
	'override-cmd' [2/2]...image does not appear to contain "echo" -- assuming single-binary image
passed


$ bashbrew build nats-streaming:0.6.0-nanoserver
skipping "nats-streaming:0.6.0-nanoserver" (due to architecture "amd64"; only "windows-amd64" supported)

$ test/run.sh nats-streaming:0.6.0-nanoserver
testing nats-streaming:0.6.0-nanoserver
	image does not exist!


$ bashbrew build nats-streaming:0.6.0-windowsservercore
skipping "nats-streaming:0.6.0-windowsservercore" (due to architecture "amd64"; only "windows-amd64" supported)

$ test/run.sh nats-streaming:0.6.0-windowsservercore
testing nats-streaming:0.6.0-windowsservercore
	image does not exist!

@yosifkit yosifkit merged commit 38d7b7e into docker-library:master Oct 26, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kozlovic

This comment has been minimized.

Copy link
Contributor Author

commented Oct 27, 2017

@yosifkit I am not sure what's happening, but there is no amd64/linux variant:

$ docker run --rm mplatform/mquery nats-streaming:latest
Manifest List: Yes
Supported platforms:
 - arm/linux (variant: v7)
 - arm64/linux (variant: v8)
 - amd64/windows

$ docker pull nats-streaming
Using default tag: latest
latest: Pulling from library/nats-streaming
no matching manifest for linux/amd64 in the manifest list entries

What did I do wrong?

@kozlovic

This comment has been minimized.

Copy link
Contributor Author

commented Oct 27, 2017

Was doing above from Mac OS Yosemite, tried from Sierra and I can pull the image, however, the platform list still does not show the amd64/linux platform (but it does show it for nats for instance, which was built the same way).

@kozlovic

This comment has been minimized.

Copy link
Contributor Author

commented Oct 27, 2017

It seems it got resolved somehow since now the tool is giving me amd64/linux in the list and I can pull the image (even from macOS Yosemite).

@yosifkit

This comment has been minimized.

Copy link
Member

commented Oct 27, 2017

Yeah, it is an artifact of our build process; sometimes one or more architectures get done before others and the job that updates the manifest-lists just pushes up what is available at the time so that slow or failed builds don't hold up updates. (related issues: docker-library/rabbitmq#188, docker-library/ruby#159, erlang/docker-erlang-otp#75, #3472, docker-library/wordpress#239)

@DrStrangepork

This comment has been minimized.

Copy link

commented Oct 31, 2017

This is happening for maven as well (3653)

# docker pull maven:3-jdk-8-alpine
3-jdk-8-alpine: Pulling from library/maven
no matching manifest for linux/amd64 in the manifest list entries
@tianon

This comment has been minimized.

Copy link
Member

commented Dec 21, 2017

I've filed #3835 in order to have a central place to track this problem globally more directly. 👍 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.