Skip to content

Commit

Permalink
Merge pull request #3 from ljkeller/feature/ew_deploy
Browse files Browse the repository at this point in the history
Nice-to-have scripts/changes
  • Loading branch information
ljkeller authored Apr 7, 2024
2 parents 8070a66 + 53ac7a6 commit 5063f53
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/iot/secrets-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"caPath": "/opt/SPARK/iot/.pem"
},
"ids": {
"uniqueId": "",
"sid": ""
"uniqueId": "DEVICE NAME",
"sid": "FOUND IN ORGANZIATION KEY VAULT UNDER SDK VERSION"
},
"networking": {
"discoveryUrl": ""
"discoveryUrl": "FOUND IN ORGANIZATION KEY VAULT"
}
}
2 changes: 2 additions & 0 deletions utils/check_internet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "Pinging google to see if internet is available..."
ping 8.8.8.8
14 changes: 14 additions & 0 deletions utils/check_iot_keys.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
echo "Printing SPARK iotc related files at /opt/spark/iot/"
echo "------------------------------------------"
find /opt/spark/iot/ -type f
echo "------------------------------------------"

echo "IoT service secrets.json file content"
echo "------------------------------------------"
cat /opt/spark/iot/secrets.json
if [ $? -ne 0 ]; then
echo "secrets.json file not found. Ensure it exists in /opt/spark/iot/ directory"
fi
echo "------------------------------------------"

echo "Please cross reference the files and secrets.json to ensure all dependencies exist"
1 change: 1 addition & 0 deletions utils/follow_service_logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
journalctl -u iotc-spark-server.service -f
5 changes: 5 additions & 0 deletions utils/get_service_status.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "Checking iotc-spark-server.service status..."
systemctl list-units --type=service --all | grep -i iotc-spark-server.service

echo "Checking iotc-spark-server.service logs..."
journalctl -u iotc-spark-server.service
1 change: 1 addition & 0 deletions utils/restart_service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
systemctl restart iotc-spark-server.service

0 comments on commit 5063f53

Please sign in to comment.