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
Merged

Conversation

kozlovic
Copy link
Contributor

Adding multi-arch support.
Details can be found here


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

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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
Copy link
Member

Choose a reason for hiding this comment

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

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@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
Copy link

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
Copy link
Contributor Author

@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
Copy link

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
Copy link
Contributor Author

@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
Removing ENTRYPOINT and only using CMD as per comment in PR:
docker-library/official-images#3622
@yosifkit
Copy link
Member

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
Copy link
Member

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
@kozlovic
Copy link
Contributor Author

@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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Member

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
Copy link

DrStrangepork 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
Copy link
Member

tianon 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants