Skip to content

Instantly share code, notes, and snippets.

@ataylor284
Last active October 13, 2021 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ataylor284/739bfddbb587b6fd2a474d225c56cb61 to your computer and use it in GitHub Desktop.
Save ataylor284/739bfddbb587b6fd2a474d225c56cb61 to your computer and use it in GitHub Desktop.
[nxrm] Set Nexus cluster node name with a groovy script
def hazelcast = container.lookup('com.hazelcast.core.HazelcastInstance')
def nodeConfigurationSource = container.lookup('org.sonatype.nexus.common.node.NodeConfigurationSource')
def nodeId = hazelcast.cluster.members[0].attributes['node.identity']
nodeConfigurationSource.setFriendlyName(nodeId, "My Node")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment