-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* modify services for geneva * add stopping of Geneva containr * wrapping up some additional changes before release * remove geneva tmp files * addressed PR comments * addressing PR comments --------- Co-authored-by: Ubuntu <rafsalas@a100vm.dnkq5svzo1wedbjjy0q5ykz5bb.bx.internal.cloudapp.net> Co-authored-by: Ubuntu <rafsalas@genevatestvm.1dqaosvq5e2u1cyy22xmqzfure.jx.internal.cloudapp.net>
- Loading branch information
1 parent
5f9877a
commit 754ac94
Showing
10 changed files
with
131 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# Managed Prometheus deployment: ./configure_service.sh | ||
# Azure Monitor: ./configure_service.sh azure_monitor | ||
# Geneva (internal msft): ./configure_service.sh geneva | ||
|
||
PublisherMethod=$1 | ||
|
||
if [[ -n $PublisherMethod ]]; then | ||
if [ "$PublisherMethod" == "geneva" ] || [ "$PublisherMethod" == "azure_monitor" ]; then | ||
echo "PublisherMethod is valid: $PublisherMethod" | ||
else | ||
echo "PublisherMethod $PublisherMethod is not one of the valid choices {azure_monitor, geneva}." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
MONEO_PATH=/opt/azurehpc/tools/Moneo | ||
|
||
if [[ ! -d "$MONEO_PATH" ]]; | ||
|
@@ -9,11 +24,16 @@ then | |
fi | ||
|
||
# replace the moneo path place holder with actaul moneo path and Move service file to systemd directory | ||
sed "s#<Moneo_Path>#$MONEO_PATH#g" $MONEO_PATH/linux_service/[email protected] > /etc/systemd/system/[email protected] | ||
cp $MONEO_PATH/linux_service/[email protected] /etc/systemd/system/[email protected] | ||
|
||
echo "configuring publisher service" | ||
sed "s#<Moneo_Path>#$MONEO_PATH#g;" $MONEO_PATH/linux_service/moneo_publisher.service > /etc/systemd/system/moneo_publisher.service | ||
|
||
$MONEO_PATH/src/worker/install/install.sh azure_monitor | ||
if [[ "$PublisherMethod" == "geneva" ]]; then | ||
# writes to the same file location as Azure monitor | ||
cp $MONEO_PATH/linux_service/geneva_publisher.service /etc/systemd/system/moneo_publisher.service | ||
$MONEO_PATH/src/worker/install/install.sh geneva | ||
else | ||
cp $MONEO_PATH/linux_service/moneo_publisher.service /etc/systemd/system/moneo_publisher.service | ||
$MONEO_PATH/src/worker/install/install.sh azure_monitor | ||
fi | ||
|
||
systemctl daemon-reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=Moneo exporter service geneva | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
Restart=no | ||
ExecStart=/usr/bin/python3 /tmp/moneo-worker/publisher/metrics_publisher.py geneva | ||
User=root | ||
|
||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.