You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/03/08 21:07:00 UTC
[jira] [Commented] (ARTEMIS-1676) Allow users to override JAVA_ARGS
via environment variables
[ https://issues.apache.org/jira/browse/ARTEMIS-1676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16391907#comment-16391907 ]
ASF GitHub Bot commented on ARTEMIS-1676:
-----------------------------------------
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1862#discussion_r173290483
--- Diff: artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile ---
@@ -21,14 +21,20 @@ ARTEMIS_INSTANCE='${artemis.instance}'
# The logging config will need an URI
# this will be encoded in case you use spaces or special characters
# on your directory structure
-ARTEMIS_INSTANCE_URI='${artemis.instance.uri}'
-# Cluster Properties: Used to pass arguments to ActiveMQ Artemis which can be referenced in broker.xml
-#ARTEMIS_CLUSTER_PROPS="-Dactivemq.remoting.default.port=61617 -Dactivemq.remoting.amqp.port=5673 -Dactivemq.remoting.stomp.port=61614 -Dactivemq.remoting.hornetq.port=5446"
+if [ -z "$ARTEMIS_INSTANCE_URI" ]; then
+ ARTEMIS_INSTANCE_URI='${artemis.instance.uri}'
+fi
+# Cluster Properties: Used to pass arguments to ActiveMQ Artemis which can be referenced in broker.xml
+if [ -z "$ARTEMIS_CLUSTER_PROPS" ]; then
+ #ARTEMIS_CLUSTER_PROPS="-Dactivemq.remoting.default.port=61617 -Dactivemq.remoting.amqp.port=5673 -Dactivemq.remoting.stomp.port=61614 -Dactivemq.remoting.hornetq.port=5446"
--- End diff --
I would be ok with this on ARTEMIS_HOME.. ARTEMIS_INSTANCE is a bit dangerous IMO.
Say you went to cd /artemis-servers/server1
and by accident previously you set ARTEMIS-INSTANCE = /artemis-server/myOtherServer
You wouldn't be able to figure out easily... I think it's a bit dangerous...
the best way we can do about this is like what we do now.. we figure out ARTEMIS-INSTANCE by the location of the executable's. if you do /my-other-server/bin/artemis start
then you will know you're starting the right server.
> Allow users to override JAVA_ARGS via environment variables
> -----------------------------------------------------------
>
> Key: ARTEMIS-1676
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1676
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Reporter: Martyn Taylor
> Priority: Major
>
> We currently require users to update the artemis.profile file to change JAVA_ARGS options. However, it's often useful to be able to override certain properties via environment variables. Typical example is when running in a cloud environment, where customisation is often injected via environment variables.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)