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
9069a8df
Commit
9069a8df
authored
Nov 01, 2023
by
贾浩@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update metanet
parent
5180c181
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
14 deletions
+45
-14
host.sh
host/host.sh
+24
-6
net.sh
net.sh
+21
-8
No files found.
host/host.sh
View file @
9069a8df
...
...
@@ -40,6 +40,28 @@ echo 'max_gs_count = 50000000' >> $configFile
echo
'gs_block_count = 100'
>>
$configFile
# net config
for
i
in
$(
seq
1
$N
)
do
echo
"generate metanet config at
$i
"
configPath
=
$PWD
/data/net/
$i
mkdir
-p
$configPath
configFile
=
$configPath
/config.yaml
rm
-fv
$configFile
echo
"single_node: true"
>>
$configFile
echo
"enable_prom: true"
>>
$configFile
echo
"grpc_host:
\"
0.0.0.0
\"
"
>>
$configFile
echo
"grpc_port: 38010"
>>
$configFile
echo
"p2p_host_ip:
\"
172.99.1.
$i
\"
"
>>
$configFile
if
[
$i
-eq
1
]
;
then
echo
"p2p-priv-key:
\"
/etc/MetaNet/default-priv-key
\"
"
>>
$configFile
else
echo
"peer: [
\"
/ip4/172.99.1.1/tcp/30333/p2p/16Uiu2HAm3pzLayNahJtkYHaxWFMibZ7RuyG8BRsdj1YQRvwWYKM5
\"
]"
>>
$configFile
fi
done
# net config end
resourcering
=
"
deploy:
...
...
@@ -155,17 +177,13 @@ echo "" >> $composefile
echo
" net:"
>>
$composefile
echo
" image: 192.168.1.220:5000/metanet:v0.0.4"
>>
$composefile
echo
" container_name: net"
>>
$composefile
if
[
$i
-eq
1
]
;
then
echo
" entrypoint: /root/MetaNet --single-node --enable-prom --log-level info --p2p-priv-key /root/default-priv-key --grpc-host 0.0.0.0 --grpc-port 38010 --p2p-host-ip 172.99.1.1 > /root/net.log 2>&1"
>>
$composefile
else
echo
" entrypoint: /root/MetaNet --single-node --enable-prom --log-level info --peer /ip4/192.168.1.220/tcp/30333/p2p/16Uiu2HAm3pzLayNahJtkYHaxWFMibZ7RuyG8BRsdj1YQRvwWYKM5 --grpc-host 0.0.0.0 --grpc-port 38010 --p2p-host-ip 172.99.1.
$i
> /root/net.log 2>&1"
>>
$composefile
fi
echo
" entrypoint: /usr/bin/MetaNet -c /root/config.yaml > /root/net.log 2>&1"
>>
$composefile
echo
"
$resourcenebula
"
>>
$composefile
echo
" ports:"
>>
$composefile
echo
" -
\"
$((
38010
))
:38010
\"
"
>>
$composefile
echo
" -
\"
$((
30333
))
:30333
\"
"
>>
$composefile
echo
" volumes:"
>>
$composefile
echo
" - ./data/net/:/root"
>>
$composefile
echo
" - ./data/net/
$i
:/root"
>>
$composefile
echo
" networks:"
>>
$composefile
echo
" meta:"
>>
$composefile
echo
" ipv4_address: 172.99.1.
$i
"
>>
$composefile
...
...
net.sh
View file @
9069a8df
...
...
@@ -6,8 +6,27 @@ N=${1:-1}
rm
-rfv
./data/net/
*
composefile
=
"docker-compose-net.yml"
for
i
in
$(
seq
1
$N
)
do
echo
"generate metanet config at
$i
"
configPath
=
$PWD
/data/net/
$i
mkdir
-p
$configPath
configFile
=
$configPath
/config.yaml
rm
-fv
$configFile
echo
"single_node: true"
>>
$configFile
echo
"enable_prom: true"
>>
$configFile
echo
"grpc_host:
\"
0.0.0.0
\"
"
>>
$configFile
echo
"grpc_port: 38010"
>>
$configFile
echo
"p2p_host_ip:
\"
172.99.1.
$i
\"
"
>>
$configFile
if
[
$i
-eq
1
]
;
then
echo
"p2p-priv-key:
\"
/etc/MetaNet/default-priv-key
\"
"
>>
$configFile
else
echo
"peer: [
\"
/ip4/172.99.1.1/tcp/30333/p2p/16Uiu2HAm3pzLayNahJtkYHaxWFMibZ7RuyG8BRsdj1YQRvwWYKM5
\"
]"
>>
$configFile
fi
done
composefile
=
"docker-compose-net.yml"
echo
'version: "3.9"'
>
$composefile
echo
''
>>
$composefile
...
...
@@ -28,11 +47,7 @@ do
echo
" net
$i
:"
>>
$composefile
echo
" image: 192.168.1.220:5000/metanet:v0.0.4"
>>
$composefile
echo
" container_name: net
$i
"
>>
$composefile
if
[
$i
-eq
1
]
;
then
echo
" entrypoint: /root/MetaNet --single-node --enable-prom --log-level info --p2p-priv-key /root/default-priv-key --grpc-host 0.0.0.0 --grpc-port 38010 --p2p-host-ip 172.99.1.1 > /root/net.log 2>&1"
>>
$composefile
else
echo
" entrypoint: /root/MetaNet --single-node --enable-prom --log-level info --peer /ip4/172.99.1.1/tcp/30333/p2p/16Uiu2HAm3pzLayNahJtkYHaxWFMibZ7RuyG8BRsdj1YQRvwWYKM5 --grpc-host 0.0.0.0 --grpc-port 38010 --p2p-host-ip 172.99.1.
$i
> /root/net.log 2>&1"
>>
$composefile
fi
echo
" entrypoint: /usr/bin/MetaNet -c /root/config.yaml > /root/net.log 2>&1"
>>
$composefile
echo
"
$deploy
"
>>
$composefile
echo
" ports:"
>>
$composefile
echo
" -
\"
$((
38010
+
i
))
:38010
\"
"
>>
$composefile
...
...
@@ -47,7 +62,5 @@ if [ $i -ne 1 ]; then
fi
echo
""
>>
$composefile
done
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