Skip to content

Commit

Permalink
remove docker image set by manual as updating the node now have base_…
Browse files Browse the repository at this point in the history
…system info
  • Loading branch information
wonkr committed Feb 27, 2023
1 parent d58d747 commit 4c5d925
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
15 changes: 0 additions & 15 deletions examples/B06-blockchain/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,6 @@

docker = Docker(etherViewEnabled=True)

# Add the 'rafaelawon/seedemu-lighthouse-base' custom image from dockerhub.
# This image contains custom lighthouse software.
docker.addImage(DockerImage('rafaelawon/seed-geth-base:v1.10.26', [], local=False), priority=-1)

base = emu.getLayer('Base')

# Get the physical nodes of all hosts from Base layer.
# The name of physical nodes generated from Makers.makeEmulatorBaseWith10StubASAndHosts() is 'host_{}'
# Base::getNodesByName('host') returns the physical nodes whose name starts with 'host'.
hosts = base.getNodesByName('host')

# Set all host nodes to use the custom 'seedemu-lighthouse-base' image.
for host in hosts:
docker.setImageOverride(host, 'rafaelawon/seed-geth-base:v1.10.26')

# If output directory exists and override is set to false, we call exit(1)
# updateOutputdirectory will not be called
emu.compile(docker, './output')
27 changes: 0 additions & 27 deletions examples/C04-ethereum-pos/blockchain-pos.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,31 +86,4 @@
# Enable etherView
docker = Docker(internetMapEnabled=True, etherViewEnabled=True)

# Add the 'rafaelawon/seedemu-lighthouse-base' custom image from dockerhub.
# This image contains custom lighthouse software.
docker.addImage(DockerImage('rafaelawon/seedemu-lighthouse-base', [], local=False), priority=-1)

# Add the 'rafaelawon/seedemu-lighthouse-base' custom image from dockerhub.
# This image contains custom lcli software.
docker.addImage(DockerImage('rafaelawon/seedemu-lcli-base', [], local=False), priority=-2)

base = emu.getLayer('Base')

# Get the physical nodes of all hosts from Base layer.
# The name of physical nodes generated from Makers.makeEmulatorBaseWith10StubASAndHosts() is 'host_{}'
# Base::getNodesByName('host') returns the physical nodes whose name starts with 'host'.
hosts = base.getNodesByName('host')

# Set all host nodes to use the custom 'seedemu-lighthouse-base' image.
for host in hosts:
docker.setImageOverride(host, 'rafaelawon/seedemu-lighthouse-base')

# Get the physical node of beacon setup node.
# The host in asn 150 with id 0 (ip : 10.150.0.71) is set as BeaconSetupNode.
# Base::getNodeByAsnAndName(150, 'host_0') returns the physical node whose name is 'host_0' in AS 150.
beacon_setup = base.getNodeByAsnAndName(150, 'host_0')

# Set the node to use the custom 'seedemu-lcli-base' image.
docker.setImageOverride(beacon_setup, 'rafaelawon/seedemu-lcli-base')

emu.compile(docker, './output', override = True)

0 comments on commit 4c5d925

Please sign in to comment.