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

consul: 0.9.3 -> 1.3.0 with vendored UI #49165

Merged
merged 2 commits into from
Nov 3, 2018
Merged

Conversation

nh2
Copy link
Contributor

@nh2 nh2 commented Oct 26, 2018

Motivation for this change

Subsumes #48714, #44192, #41243, and #35602.

The key point is that we no longer have to build the Consul UI, it is vendored into the binary.

See commit messages for details.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@nh2 nh2 mentioned this pull request Oct 26, 2018
9 tasks
@nh2
Copy link
Contributor Author

nh2 commented Oct 26, 2018

CC @arianvp @vdemeester @c0bw3b

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 🐯


buildGoPackage rec {
buildGo110Package rec {
Copy link
Member

Choose a reason for hiding this comment

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

IS this a typo?

Copy link
Member

Choose a reason for hiding this comment

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

if not, I don't understand where this identifier comes from :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Typo from my forward-port, fixed

@nh2
Copy link
Contributor Author

nh2 commented Oct 26, 2018

Btw, my usage of

  • python-consul
  • consul-alerts

in my staging deployment suggests that the they work well with this Consul upgrade.

@GrahamcOfBorg GrahamcOfBorg added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation 8.has: module (update) This PR changes an existing module in `nixos/` labels Oct 26, 2018
@c0bw3b
Copy link
Contributor

c0bw3b commented Oct 26, 2018

And with real chunks of documentation on top of it 🎉

rev = "v${version}";

goPackagePath = "github.com/hashicorp/consul";

# Note: Currently only release tags are supported, because they have the Consul UI
# vendored. See
# https://github.com/NixOS/nixpkgs/pull/48714#issuecomment-433454834
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps add a link to #49082 here, so people know how such a build would look like?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@c0bw3b
Copy link
Contributor

c0bw3b commented Oct 26, 2018

@GrahamcOfBorg build consul

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: consul

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/k82mvywcygqivd9v4m26anhn1rv60yr6-consul-1.3.0-bin
shrinking /nix/store/k82mvywcygqivd9v4m26anhn1rv60yr6-consul-1.3.0-bin/bin/consul
shrinking /nix/store/k82mvywcygqivd9v4m26anhn1rv60yr6-consul-1.3.0-bin/bin/certgen
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/k82mvywcygqivd9v4m26anhn1rv60yr6-consul-1.3.0-bin/bin
patching script interpreter paths in /nix/store/k82mvywcygqivd9v4m26anhn1rv60yr6-consul-1.3.0-bin
checking for references to /build in /nix/store/k82mvywcygqivd9v4m26anhn1rv60yr6-consul-1.3.0-bin...
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: consul

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/10pxm6lksdcmxylaavshjpw0riqyiyjd-consul-1.3.0-bin
shrinking /nix/store/10pxm6lksdcmxylaavshjpw0riqyiyjd-consul-1.3.0-bin/bin/consul
shrinking /nix/store/10pxm6lksdcmxylaavshjpw0riqyiyjd-consul-1.3.0-bin/bin/certgen
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/10pxm6lksdcmxylaavshjpw0riqyiyjd-consul-1.3.0-bin/bin
patching script interpreter paths in /nix/store/10pxm6lksdcmxylaavshjpw0riqyiyjd-consul-1.3.0-bin
checking for references to /build in /nix/store/10pxm6lksdcmxylaavshjpw0riqyiyjd-consul-1.3.0-bin...
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
/nix/store/10pxm6lksdcmxylaavshjpw0riqyiyjd-consul-1.3.0-bin

@c0bw3b
Copy link
Contributor

c0bw3b commented Oct 31, 2018

@nh2 could you rebase and solve the conflict with the release note XML please?

@arianvp
Copy link
Member

arianvp commented Oct 31, 2018

I have one small change requests that we can add:

  • Set Type=notify on the systemd unit. Apparently this is supported.

    When running under systemd on Linux, Consul notifies systemd by sending READY=1 to the $NOTIFY_SOCKET when a LAN join has completed. For this either the join or retry_join option has to be set and the service definition file has to have Type=notify set.
    https://www.consul.io/docs/agent/basics.html#running-an-agent

@nh2
Copy link
Contributor Author

nh2 commented Nov 3, 2018

@arianvp Let's do that as part of a separate PR or issue, as this will require more testing.

Removes the old UI build tooling; it is no longer necessary
because as of 1.2.0 it's bundled into the server binary.
It doesn't even need to have JS built, because it's bundled into
the release commit's source tree (see NixOS#48714).

The UI is enabled by default, so the NixOS service is
updated to directly use `ui = webUi;` now.

Fixes NixOS#48714.
Fixes NixOS#44192.
Fixes NixOS#41243.
Fixes NixOS#35602.

Signed-off-by: Niklas Hambüchen <[email protected]>
@nh2
Copy link
Contributor Author

nh2 commented Nov 3, 2018

Rebased to fix release notes merge conflict

@c0bw3b c0bw3b merged commit 3234079 into NixOS:master Nov 3, 2018
@nh2 nh2 mentioned this pull request Nov 3, 2018
1 task
@nh2
Copy link
Contributor Author

nh2 commented Nov 3, 2018

I have one small change requests that we can add:

@arianvp Let's do that as part of a separate PR or issue, as this will require more testing.

Extracted as #49706

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: clean-up 8.has: documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants