Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
ROS-Kubernetes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Larkin Heintzman
ROS-Kubernetes
Commits
84e4d4c5
Commit
84e4d4c5
authored
Oct 26, 2022
by
Larkin Heintzman
Browse files
Options
Browse Files
Download
Plain Diff
fixed ping deployment conflict
parents
dbac465d
3b84ecc2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
40 deletions
+9
-40
BMping.sh
docker/pinger/BMping.sh
+4
-18
Dping.sh
docker/pinger/Dping.sh
+1
-1
ping.sh
docker/pinger/ping.sh
+1
-15
ping-deployment.yaml
kubernetes/ping-deployment.yaml
+3
-6
No files found.
docker/pinger/BMping.sh
View file @
84e4d4c5
#!/bin/bash
endpoints
=
"192.168.111.200"
filename
=
"/home/l
lh
/pingStats/pingStats.json"
downtime
=
1
gpstopic
=
"/
rossetti
Modem/dji_sdk/gps_position"
filename
=
"/home/l
arkin
/pingStats/pingStats.json"
downtime
=
5
gpstopic
=
"/
mario
Modem/dji_sdk/gps_position"
echo
"pinging:
$endpoints
"
echo
"save to:
$filename
"
...
...
@@ -22,7 +22,7 @@ echo ping "${endpoints} every ${downtime:=1} sec, saving to ${filename}"
# done
while
true
;
do
rawData
=
$(
ping
-c
3
-q
-w
3
${
endpoints
:
=localhost
})
rawData
=
$(
ping
-c
5
-q
-w
5
${
endpoints
:
=localhost
})
newPacketData
=
$(
echo
"
$rawData
"
|
grep
-oP
'\d+(?=% packet loss)'
)
newLatencyData
=
$(
echo
"
$rawData
"
|
tail
-n
1
)
...
...
@@ -42,20 +42,6 @@ while true; do
num4
=
"0"
fi
# debugging help
# echo "------------------"
# echo $num1
# echo $num2
# echo $num3
# echo $num4
# echo "------------------"
# echo "$rawData"
# echo "------------------"
# echo "$newPacketData"
# echo "------------------"
# echo "$newLatencyData"
# exit
if
test
-f
"
$filename
"
;
then
false
else
...
...
docker/pinger/Dping.sh
View file @
84e4d4c5
#!/bin/bash
docker run
--env
endpoints
=
192.168.111.200
--env
filename
=
/tmp/pingStats/pingStatsDocker.json
--env
gpstopic
=
/
rossettiModem/dji_sdk/gps_position
--env
downtime
=
1
--env
ROS_IP
=
192.168.111.202
--env
ROS_MASTER_URI
=
http://192.168.111.200:11311
-v
/home/larkin/pingStats:/tmp/pingStats/
doorbell:latest /ping.sh
docker run
--env
endpoints
=
192.168.111.200
--env
filename
=
/tmp/pingStats/pingStatsDocker.json
--env
gpstopic
=
/
marioModem/dji_sdk/gps_position
--env
downtime
=
5
--env
ROS_IP
=
192.168.111.202
--env
ROS_MASTER_URI
=
http://192.168.111.200:11311
-v
/home/larkin/pingStats:/tmp/pingStats/ localhost:5000/
doorbell:latest /ping.sh
docker/pinger/ping.sh
View file @
84e4d4c5
...
...
@@ -26,7 +26,7 @@ echo ping "${endpoints} every ${downtime:=1} sec, saving to ${filename}"
# done
while
true
;
do
rawData
=
$(
ping
-c
3
-q
-w
3
${
endpoints
:
=localhost
})
rawData
=
$(
ping
-c
5
-q
-w
5
${
endpoints
:
=localhost
})
newPacketData
=
$(
echo
"
$rawData
"
|
grep
-oP
'\d+(?=% packet loss)'
)
newLatencyData
=
$(
echo
"
$rawData
"
|
tail
-n
1
)
...
...
@@ -46,20 +46,6 @@ while true; do
num4
=
"0"
fi
# debugging help
# echo "------------------"
# echo $num1
# echo $num2
# echo $num3
# echo $num4
# echo "------------------"
# echo "$rawData"
# echo "------------------"
# echo "$newPacketData"
# echo "------------------"
# echo "$newLatencyData"
# exit
if
test
-f
"
$filename
"
;
then
false
else
...
...
kubernetes/ping-deployment.yaml
View file @
84e4d4c5
...
...
@@ -26,7 +26,7 @@ spec:
effect
:
"
NoSchedule"
operator
:
"
Exists"
-
key
:
"
node.kubernetes.io/disk-pressure"
effect
:
"
Prefer
NoSchedule"
effect
:
"
NoSchedule"
operator
:
"
Exists"
volumes
:
-
name
:
ping-storage
...
...
@@ -40,20 +40,17 @@ spec:
volumeMounts
:
-
name
:
ping-storage
mountPath
:
/tmp/pingStats
image
:
localhost:5000/doorbell:latest
image
:
doorbell
imagePullPolicy
:
IfNotPresent
command
:
[
"
/bin/bash"
]
args
:
[
"
-c"
,
"
/ping.sh"
]
env
:
-
name
:
endpoints
# value: "192.168.1.5"
value
:
"
192.168.111.200"
-
name
:
interface
value
:
"
eth0"
# not strictly necessary
-
name
:
filename
value
:
"
/tmp/pingStats/pingStatsKubernetes.json"
-
name
:
downtime
# time to wait between pings
value
:
"
3
"
value
:
"
5
"
-
name
:
gpstopic
value
:
"
/marioModem/dji_sdk/gps_position"
-
name
:
ROS_IP
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment