Skip to content

Commit 2a38ecd

Browse files
committed
Changed plugins install logic
Change plugins install logic and added watcher plugin install option
1 parent e1c06ec commit 2a38ecd

File tree

4 files changed

+45
-7
lines changed

4 files changed

+45
-7
lines changed

elk.nsi

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,27 +240,59 @@ Section "Kibana" Kibana
240240
ExecWait "net start kibana" $0
241241
SectionEnd
242242

243-
Section "Marvel (requires elasticsearch, kibana)" Marvel
243+
Section /o "License Plugin (requires elasticsearch)" License
244+
ExecWait "$INSTDIR\scripts\license-install.bat" $0
245+
SectionEnd
246+
247+
Section /o "Marvel Plugin (requires elasticsearch, kibana, license)" Marvel
244248
ExecWait "$INSTDIR\scripts\marvel-install.bat" $0
245249
SectionEnd
246250

247-
Section "Sense (requires kibana)" Sense
251+
Section /o "Sense Plugin (requires kibana)" Sense
248252
ExecWait "$INSTDIR\scripts\sense-install.bat" $0
249253
SectionEnd
250254

255+
Section /o "Watcher Plugin (requires elasticsearch, license)" Watcher
256+
ExecWait "$INSTDIR\scripts\watcher-install.bat" $0
257+
SectionEnd
258+
251259
Function .onSelChange
252260
${If} ${SectionIsSelected} ${Elasticsearch}
261+
;License plugin
262+
!insertmacro ClearSectionFlag ${License} ${SF_RO}
263+
264+
;Marvel Plugin
253265
${If} ${SectionIsSelected} ${Kibana}
254-
!insertmacro ClearSectionFlag ${Marvel} ${SF_RO}
266+
${If} ${SectionIsSelected} ${License}
267+
!insertmacro ClearSectionFlag ${Marvel} ${SF_RO}
268+
${Else}
269+
!insertmacro UnselectSection ${Marvel}
270+
!insertmacro SetSectionFlag ${Marvel} ${SF_RO}
271+
${EndIf}
255272
${Else}
256273
!insertmacro UnselectSection ${Marvel}
257274
!insertmacro SetSectionFlag ${Marvel} ${SF_RO}
258275
${EndIf}
276+
277+
;Watcher plugin
278+
${If} ${SectionIsSelected} ${License}
279+
!insertmacro ClearSectionFlag ${Watcher} ${SF_RO}
280+
${Else}
281+
!insertmacro UnselectSection ${Watcher}
282+
!insertmacro SetSectionFlag ${Watcher} ${SF_RO}
283+
${EndIf}
259284
${Else}
285+
!insertmacro UnselectSection ${License}
286+
!insertmacro SetSectionFlag ${License} ${SF_RO}
287+
260288
!insertmacro UnselectSection ${Marvel}
261289
!insertmacro SetSectionFlag ${Marvel} ${SF_RO}
290+
291+
!insertmacro UnselectSection ${Watcher}
292+
!insertmacro SetSectionFlag ${Watcher} ${SF_RO}
262293
${EndIf}
263294

295+
; Sense plugin
264296
${IfNot} ${SectionIsSelected} ${Kibana}
265297
!insertmacro UnselectSection ${Sense}
266298
!insertmacro SetSectionFlag ${Sense} ${SF_RO}
@@ -298,7 +330,6 @@ Section "Uninstall"
298330

299331
DeleteRegKey HKLM "${uninstkey}"
300332
DeleteRegKey HKLM "${regkey}"
301-
302-
RmDir /r "$INSTDIR"
303333

334+
RmDir /r "$INSTDIR"
304335
SectionEnd

scripts/license-install.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cd "%INSTDIR%\elasticsearch"
2+
bin\plugin install -b license

scripts/marvel-install.bat

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
rem this plugin requires license plugin installed
2+
13
cd "%INSTDIR%\elasticsearch"
2-
bin\plugin install license
3-
bin\plugin install marvel-agent
4+
bin\plugin install -b marvel-agent
45

56
cd "%INSTDIR%\kibana"
67
bin\kibana plugin --install elasticsearch/marvel/latest

scripts/watcher-install.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
rem this plugin requires license plugin installed
2+
3+
cd "%INSTDIR%\elasticsearch"
4+
bin\plugin install -b watcher

0 commit comments

Comments
 (0)