Skip to content

Commit

Permalink
Add ELK app start
Browse files Browse the repository at this point in the history
  • Loading branch information
seokho-son committed Nov 29, 2023
1 parent 6bf0f82 commit 98e3c58
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@
<select id="selectApp" name="selectApp" class="form-control" aria-label="Select Application"
aria-describedby="selectAppLabel">
<option value="Xonotic" selected="selected">FPSGame(Xonotic)</option>
<option value="ELK">LogAnalisys(ELK)</option>
<option value="Westward">MMORPG(Westward)</option>
<option value="Nginx">WebServer(Nginx)</option>
<option value="WeaveScope">Monitor(WeaveScope)</option>
Expand Down
15 changes: 15 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2836,6 +2836,9 @@ function startApp() {
} else if (selectApp.value == "Westward") {
defaultRemoteCommand =
"wget -O ~/setgame.sh https://raw.githubusercontent.com/cloud-barista/cb-tumblebug/main/scripts/setgame.sh; chmod +x ~/setgame.sh; sudo ~/setgame.sh";
} else if (selectApp.value == "ELK") {
defaultRemoteCommand =
"wget -O ~/startServer.sh https://raw.githubusercontent.com/cloud-barista/cb-tumblebug/main/scripts/usecases/elastic-stack/startELK.sh; chmod +x ~/startServer.sh; sudo ~/startServer.sh ";
} else if (selectApp.value == "WeaveScope") {
defaultRemoteCommand =
"wget -O ~/startServer.sh https://raw.githubusercontent.com/cloud-barista/cb-tumblebug/main/scripts/usecases/weavescope/startServer.sh; chmod +x ~/startServer.sh; sudo ~/startServer.sh " +
Expand Down Expand Up @@ -2886,6 +2889,12 @@ function stopApp() {
);
cmd.push("chmod +x ~/stopServer.sh");
cmd.push("sudo ~/stopServer.sh");
} else if (selectApp.value == "ELK") {
cmd.push(
"wget https://raw.githubusercontent.com/cloud-barista/cb-tumblebug/main/scripts/usecases/elastic-stack/stopELK.sh"
);
cmd.push("chmod +x ~/stopELK.sh");
cmd.push("sudo ~/stopELK.sh");
} else if (selectApp.value == "Westward") {
cmd.push(
"wget https://raw.githubusercontent.com/cloud-barista/cb-tumblebug/main/scripts/usecases/xonotic/stopServer.sh"
Expand Down Expand Up @@ -2972,6 +2981,12 @@ function statusApp() {
);
cmd.push("chmod +x ~/statusServer.sh");
cmd.push("sudo ~/statusServer.sh");
} else if (selectApp.value == "ELK") {
cmd.push(
"wget https://raw.githubusercontent.com/cloud-barista/cb-tumblebug/main/scripts/usecases/elastic-stack/statusELK.sh -O ~/statusServer.sh"
);
cmd.push("chmod +x ~/statusServer.sh");
cmd.push("sudo ~/statusServer.sh");
} else {
cmd.push("ls -al");
}
Expand Down

0 comments on commit 98e3c58

Please sign in to comment.