Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
metadeploy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Nebula
metadeploy
Commits
18d888ea
Commit
18d888ea
authored
Nov 08, 2023
by
贾浩@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use net discovery
parent
20fac126
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
host.sh
host/host.sh
+8
-6
No files found.
host/host.sh
View file @
18d888ea
...
@@ -4,6 +4,7 @@ set -e
...
@@ -4,6 +4,7 @@ set -e
N
=
${
1
:-
2
}
N
=
${
1
:-
2
}
host_ip
=
$(
ifconfig |
grep
-Eo
'inet (addr:)?([0-9]*\.){3}[0-9]*'
|
grep
-Eo
'([0-9]*\.){3}[0-9]*'
|grep
'192.168'
)
cd
../mainchain/
cd
../mainchain/
rm
-rf
conf/deploy
||
true
rm
-rf
conf/deploy
||
true
...
@@ -50,13 +51,13 @@ do
...
@@ -50,13 +51,13 @@ do
rm
-fv
$configFile
rm
-fv
$configFile
echo
"single-node: true"
>>
$configFile
echo
"single-node: true"
>>
$configFile
echo
"enable-prom: true"
>>
$configFile
echo
"enable-prom: true"
>>
$configFile
echo
"use-discovery: true"
>>
$configFile
echo
"grpc-host:
\"
0.0.0.0
\"
"
>>
$configFile
echo
"grpc-host:
\"
0.0.0.0
\"
"
>>
$configFile
echo
"grpc-port: 38010"
>>
$configFile
echo
"grpc-port: 38010"
>>
$configFile
echo
"p2p-host-ip:
\"
172.99.1.
$i
\"
"
>>
$configFile
echo
"p2p-host-ip:
\"
$host_ip
\"
"
>>
$configFile
if
[
$i
-eq
1
]
;
then
if
[
$i
-ne
1
]
;
then
echo
"p2p-priv-key:
\"
/etc/MetaNet/default-priv-key
\"
"
>>
$configFile
echo
"bootstrap-node: [
\"
enr:-JG4QBfRmluPkjjoW3TdOgSqEChosRGQTNB0E8dccbjPvrYIcu5iFlqmUYN_7zDITAgUGdyf1W0qhNHF64XleVC3YRWGAYusuIU5gmlkgnY0gmlwhMCoAdyJc2VjcDI1NmsxoQJ81pyuyqa2QoPztOPsCqpkcW1gJwUxOcSJuWr9VUNavIN0Y3CCdn6DdWRwgnZ-
\"
]"
>>
$configFile
else
# decoded enr: /ip4/192.168.1.220/tcp/30334/p2p/16Uiu2HAm3pzLayNahJtkYHaxWFMibZ7RuyG8BRsdj1YQRvwWYKM5
echo
"peer: [
\"
/ip4/192.168.1.220/tcp/30333/p2p/16Uiu2HAm3pzLayNahJtkYHaxWFMibZ7RuyG8BRsdj1YQRvwWYKM5
\"
]"
>>
$configFile
fi
fi
done
done
# net config end
# net config end
...
@@ -175,13 +176,14 @@ echo ' - meta' >> $compose
...
@@ -175,13 +176,14 @@ echo ' - meta' >> $compose
echo
""
>>
$composefile
echo
""
>>
$composefile
echo
""
>>
$composefile
echo
""
>>
$composefile
echo
" net:"
>>
$composefile
echo
" net:"
>>
$composefile
echo
" image: 192.168.1.220:5000/metanet:v0.0.
7
"
>>
$composefile
echo
" image: 192.168.1.220:5000/metanet:v0.0.
8
"
>>
$composefile
echo
" container_name: net"
>>
$composefile
echo
" container_name: net"
>>
$composefile
echo
" entrypoint: /usr/bin/MetaNet -c /root/config.yaml > /root/net.log 2>&1"
>>
$composefile
echo
" entrypoint: /usr/bin/MetaNet -c /root/config.yaml > /root/net.log 2>&1"
>>
$composefile
echo
"
$resourcenebula
"
>>
$composefile
echo
"
$resourcenebula
"
>>
$composefile
echo
" ports:"
>>
$composefile
echo
" ports:"
>>
$composefile
echo
" -
\"
$((
38010
))
:38010
\"
"
>>
$composefile
echo
" -
\"
$((
38010
))
:38010
\"
"
>>
$composefile
echo
" -
\"
$((
30333
))
:30333
\"
"
>>
$composefile
echo
" -
\"
$((
30333
))
:30333
\"
"
>>
$composefile
echo
" -
\"
$((
30334
))
:30334/udp
\"
"
>>
$composefile
echo
" volumes:"
>>
$composefile
echo
" volumes:"
>>
$composefile
echo
" - ./data/net/
$i
:/root"
>>
$composefile
echo
" - ./data/net/
$i
:/root"
>>
$composefile
echo
" networks:"
>>
$composefile
echo
" networks:"
>>
$composefile
...
...
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