-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ideameshdyx <[email protected]>
- Loading branch information
1 parent
041fca8
commit ed5a278
Showing
5 changed files
with
55 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
# check if edgecore is installed | ||
if pgrep "edgecore" >/dev/null; then | ||
echo "Edgecore process is running. Continuing with the initialization steps." | ||
|
||
# copy cni to host | ||
cp -f /usr/local/bin/edgemesh-cni /opt/cni/bin/egdemesh-cni | ||
|
||
# generate 10-edgemesh-cni.conflist under /etc/edgemesh/config/ | ||
cat <<EOF > /etc/edgemesh/config/10-edgemesh-cni.conflist | ||
{ | ||
"cniVersion": "0.0.1", | ||
"name": "edgemesh", | ||
"type": "edgemesh", | ||
"delegate": { | ||
"cniVersion": "0.0.1", | ||
"type":"bridge", | ||
"ipam": { | ||
"type":"spiderpool" | ||
} | ||
} | ||
} | ||
EOF | ||
|
||
# cpoy it to /etc/cni/net.d | ||
cp -f /etc/edgemesh/config/10-edgemesh-cni.conflist /etc/cni/net.d/ | ||
|
||
else | ||
echo "Edgecore process is not running. Exiting." | ||
exit 1 | ||
fi |
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