applied feedback
Original commit: elastic/x-pack-elasticsearch@9042427219
This commit is contained in:
parent
ca8a7bb262
commit
583799d3e7
|
@ -35,66 +35,6 @@
|
|||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<!-- FIXME remove this redefinition and fix in core -->
|
||||
<macrodef name="startup-elasticsearch">
|
||||
<attribute name="home" default="${integ.scratch}/elasticsearch-${elasticsearch.version}"/>
|
||||
<attribute name="spawn" default="true"/>
|
||||
<attribute name="args" default="${integ.args}"/>
|
||||
<attribute name="es.unicast.enabled" default="false"/>
|
||||
<attribute name="es.unicast.hosts" default=""/>
|
||||
<attribute name="es.cluster.name" default="${integ.cluster.name}"/>
|
||||
<attribute name="es.http.port" default="${integ.http.port}"/>
|
||||
<attribute name="es.transport.tcp.port" default="${integ.transport.port}"/>
|
||||
<attribute name="es.pidfile" default="${integ.pidfile}"/>
|
||||
<attribute name="jvm.args" default="${tests.jvm.argline}"/>
|
||||
<element name="nestedA" optional="true"/>
|
||||
<sequential>
|
||||
<!-- run bin/elasticsearch with args -->
|
||||
<echo>Starting up external cluster...</echo>
|
||||
|
||||
<run-script script="@{home}/bin/elasticsearch"
|
||||
spawn="@{spawn}">
|
||||
<nested>
|
||||
<env key="JAVA_HOME" value="${java.home}"/>
|
||||
<!-- we pass these as gc options, even if they arent, to avoid conflicting gc options -->
|
||||
<env key="ES_GC_OPTS" value="@{jvm.args}"/>
|
||||
<arg value="-Des.cluster.name=@{es.cluster.name}"/>
|
||||
<arg value="-Des.http.port=@{es.http.port}"/>
|
||||
<arg value="-Des.transport.tcp.port=@{es.transport.tcp.port}"/>
|
||||
<arg value="-Des.pidfile=@{es.pidfile}"/>
|
||||
<arg value="-Des.discovery.zen.ping.unicast.enabled=@{es.unicast.enabled}"/>
|
||||
<arg value="-Des.discovery.zen.ping.unicast.hosts=@{es.unicast.hosts}"/>
|
||||
<arg value="-Des.path.repo=@{home}/repo"/>
|
||||
<arg value="-Des.discovery.zen.ping.multicast.enabled=false"/>
|
||||
<arg value="-Des.script.inline=on"/>
|
||||
<arg value="-Des.script.indexed=on"/>
|
||||
<arg value="-Des.repositories.url.allowed_urls=http://snapshot.test*"/>
|
||||
<arg value="-Des.http.cors.enabled=true"/>
|
||||
<arg value="-Des.http.cors.allow-origin=*"/>
|
||||
<nestedA/>
|
||||
</nested>
|
||||
</run-script>
|
||||
|
||||
<!-- wait for startup -->
|
||||
<local name="failed.to.start"/>
|
||||
<waitfor-elasticsearch port="@{es.http.port}"
|
||||
timeoutproperty="failed.to.start"/>
|
||||
|
||||
<!-- best effort, print console log. useful if it fails especially -->
|
||||
<local name="log.contents"/>
|
||||
<loadfile srcFile="@{home}/logs/@{es.cluster.name}.log"
|
||||
property="log.contents"
|
||||
failonerror="false"/>
|
||||
<echo message="${log.contents}" taskname="elasticsearch"/>
|
||||
|
||||
<fail message="ES instance did not start" if="failed.to.start"/>
|
||||
|
||||
<local name="integ.pid"/>
|
||||
<extract-pid file="@{es.pidfile}" property="integ.pid"/>
|
||||
<echo>External node started PID ${integ.pid}</echo>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="start-external-cluster-with-watcher-and-shield" depends="setup-workspace">
|
||||
<ac:for list="${xplugins.list}" param="xplugin.name">
|
||||
<sequential>
|
||||
|
@ -157,7 +97,13 @@
|
|||
</nested>
|
||||
</run-script>
|
||||
|
||||
<startup-elasticsearch />
|
||||
<startup-elasticsearch>
|
||||
<!-- Useful for when debugging -->
|
||||
<!--<additional-args>-->
|
||||
<!--<arg value="-Des.http.cors.enabled=true"/>-->
|
||||
<!--<arg value="-Des.http.cors.allow-origin=*"/>-->
|
||||
<!--</additional-args>-->
|
||||
</startup-elasticsearch>
|
||||
|
||||
<echo>Checking we can connect with basic auth on port ${integ.http.port}...</echo>
|
||||
<local name="temp.file"/>
|
||||
|
|
|
@ -3,96 +3,6 @@ admin:
|
|||
indices:
|
||||
'*': all
|
||||
|
||||
# monitoring cluster privileges
|
||||
# All operations on all indices
|
||||
power_user:
|
||||
cluster: monitor
|
||||
indices:
|
||||
'*': all
|
||||
|
||||
# Read-only operations on indices
|
||||
user:
|
||||
indices:
|
||||
'*': read
|
||||
|
||||
# Defines the required permissions for transport clients
|
||||
transport_client:
|
||||
cluster:
|
||||
- cluster:monitor/nodes/info
|
||||
#uncomment the following for sniffing
|
||||
#- cluster:monitor/state
|
||||
|
||||
# The required role for kibana 3 users
|
||||
kibana3:
|
||||
cluster: cluster:monitor/nodes/info
|
||||
indices:
|
||||
'*': indices:data/read/search, indices:data/read/get, indices:admin/get
|
||||
'kibana-int': indices:data/read/search, indices:data/read/get, indices:data/write/delete, indices:data/write/index, create_index
|
||||
|
||||
# The required permissions for kibana 4 users.
|
||||
kibana4:
|
||||
cluster:
|
||||
- cluster:monitor/nodes/info
|
||||
- cluster:monitor/health
|
||||
indices:
|
||||
'*':
|
||||
- indices:admin/mappings/fields/get
|
||||
- indices:admin/validate/query
|
||||
- indices:data/read/search
|
||||
- indices:data/read/msearch
|
||||
- indices:admin/get
|
||||
'.kibana':
|
||||
- indices:admin/exists
|
||||
- indices:admin/mapping/put
|
||||
- indices:admin/mappings/fields/get
|
||||
- indices:admin/refresh
|
||||
- indices:admin/validate/query
|
||||
- indices:data/read/get
|
||||
- indices:data/read/mget
|
||||
- indices:data/read/search
|
||||
- indices:data/write/delete
|
||||
- indices:data/write/index
|
||||
- indices:data/write/update
|
||||
- indices:admin/create
|
||||
|
||||
# The required permissions for the kibana 4 server
|
||||
kibana4_server:
|
||||
cluster:
|
||||
- cluster:monitor/nodes/info
|
||||
- cluster:monitor/health
|
||||
indices:
|
||||
'.kibana':
|
||||
- indices:admin/exists
|
||||
- indices:admin/mapping/put
|
||||
- indices:admin/mappings/fields/get
|
||||
- indices:admin/refresh
|
||||
- indices:admin/validate/query
|
||||
- indices:data/read/get
|
||||
- indices:data/read/mget
|
||||
- indices:data/read/search
|
||||
- indices:data/write/delete
|
||||
- indices:data/write/index
|
||||
- indices:data/write/update
|
||||
|
||||
# The required role for logstash users
|
||||
logstash:
|
||||
cluster: indices:admin/template/get, indices:admin/template/put
|
||||
indices:
|
||||
'logstash-*': indices:data/write/bulk, indices:data/write/delete, indices:data/write/update, indices:data/read/search, indices:data/read/scroll, create_index
|
||||
|
||||
# Marvel role, allowing all operations
|
||||
# on the marvel indices
|
||||
marvel_user:
|
||||
cluster: cluster:monitor/nodes/info, cluster:admin/plugin/license/get
|
||||
indices:
|
||||
'.marvel-*': all
|
||||
|
||||
# Marvel Agent users
|
||||
marvel_agent:
|
||||
cluster: indices:admin/template/get, indices:admin/template/put
|
||||
indices:
|
||||
'.marvel-*': indices:data/write/bulk, create_index
|
||||
|
||||
watcher_manager:
|
||||
cluster: manage_watcher, cluster:monitor/nodes/info, cluster:monitor/health
|
||||
indices:
|
||||
|
|
Loading…
Reference in New Issue