Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
7f9f41e
added Node.addBuildCommandAtEnd() API
kevin-w-du Nov 28, 2024
99d4ef0
added the new API in the manual
kevin-w-du Nov 28, 2024
813e8f8
allow configuration of /etc/hosts entries
amdfxlucas Apr 30, 2025
14d6f50
Merge pull request #296 from amdfxlucas/etc-hosts-contrib
kevin-w-du Apr 30, 2025
5d6d8bd
remove unsupported Sysctl options
amdfxlucas May 2, 2025
a685dde
Merge pull request #297 from amdfxlucas/fix-sysctl
kevin-w-du May 3, 2025
9997496
fixed a typo
Jun 21, 2025
3f2a5e9
copy the original InternetMap code from the client folder to here; wi…
kevin-w-du Aug 5, 2025
eb32d92
map2 first commit
cy-gitlab Aug 5, 2025
8b32fc1
Merge pull request #307 from cy-gitlab/visualization
kevin-w-du Aug 6, 2025
824a7d7
map2 -> map & add flash/highlight
cy-gitlab Aug 12, 2025
f95e4a8
add: map expand/collapse
cy-gitlab Aug 12, 2025
363bf6d
removed a useless file
kevin-w-du Aug 13, 2025
58e43ac
added a new category of examples
kevin-w-du Aug 13, 2025
7c64a6f
Fix BotnetService with requirements override and version-agnostic patch
Zephyriiiii Aug 13, 2025
a74ff9b
Merge pull request #310 from Zephyriiiii/master
kevin-w-du Aug 13, 2025
b0b6fb6
added Docker::addCustomContainer() API
Aug 14, 2025
b1ea42e
modified the example: attach the Map in a new way
Aug 14, 2025
0ca5b76
add: drag fixed
cy-gitlab Aug 14, 2025
4013965
modified the compiler to solve the duplicate Map issue
Aug 14, 2025
adff7fe
revise the comment
Aug 14, 2025
0482879
Merge branch 'origin/docker-compiler' into visualization
cy-gitlab Aug 14, 2025
816ee4a
removed redundant info
Aug 14, 2025
d616ed3
Merge pull request #312 from cy-gitlab/visualization
kevin-w-du Aug 14, 2025
5408fa4
Added option to run selected tests on each github CI/CD and to manual…
ArsalanKhan04 Aug 14, 2025
4e4fbdd
added a missing entry
Aug 14, 2025
de66259
Fixed bug in yaml file for dispatch
ArsalanKhan04 Aug 14, 2025
39e75eb
Bugfix | Default values are now taken when the testing is not manuall…
ArsalanKhan04 Aug 15, 2025
08731d4
Bugfix: Added missing flags in run-tests.py
ArsalanKhan04 Aug 15, 2025
a71fd1b
Bugfix: correct name file added to build test
ArsalanKhan04 Aug 15, 2025
4a8fbc7
TempFix: Added DOCKER_BUILDKIT=0 to resolve the docker building issue…
ArsalanKhan04 Aug 15, 2025
35c2212
Bugfix: Corrected exec filename for build tests
ArsalanKhan04 Aug 15, 2025
9796248
Typo Fix
ArsalanKhan04 Aug 15, 2025
d6cb106
Added more description to inputs in workflow dispatch
ArsalanKhan04 Aug 15, 2025
d8ba5e3
BugFix: Added missing flags in build step
ArsalanKhan04 Aug 15, 2025
2bea7ab
Changed how compile-and-build-test takes argument to handle the addit…
ArsalanKhan04 Aug 15, 2025
2d9117d
Merge pull request #313 from ArsalanKhan04/feature/add-flags-for-gith…
kevin-w-du Aug 15, 2025
2f0a74d
Testing Sync Gitee
BruceJqs Aug 16, 2025
2f18b1a
Testing Sync
BruceJqs Aug 16, 2025
8d0d23c
Testing Gitee Sync
BruceJqs Aug 16, 2025
aac1772
Testing Gitee Sync
BruceJqs Aug 16, 2025
e6e8e40
Testing Gitee Sync Complete
BruceJqs Aug 16, 2025
ff7d3a3
Fix Pull Request Testing Problem
BruceJqs Aug 16, 2025
3a08bca
Comment The Failed Example & Restore the Compile-Test.py
BruceJqs Aug 16, 2025
f228266
Update compile-test.py
BruceJqs Aug 16, 2025
cdac6b6
Update compile-and-build-test
BruceJqs Aug 16, 2025
abe10f5
Merge branch 'master' into docker-compiler
Aug 17, 2025
79c6699
Comment Out All Scion Examples
BruceJqs Aug 17, 2025
79d4da2
Comment Out B51
BruceJqs Aug 17, 2025
99cdc78
Merge pull request #314 from BruceJqs/master
kevin-w-du Aug 18, 2025
3849bbc
Merge branch 'master' into docker-compiler
Aug 18, 2025
7bc264d
added the IP address arguement
Aug 18, 2025
063d192
added examples to demonstrate how to add existing containers
Aug 18, 2025
43bbbaa
restore simple_as.py
Aug 18, 2025
a63d7a8
resore mini_internet.py
Aug 18, 2025
6c52a9a
Merge pull request #315 from seed-labs/docker-compiler
kevin-w-du Aug 18, 2025
c4770e5
Update README.md
kevin-w-du Aug 19, 2025
508a2e5
Update README.md
kevin-w-du Aug 19, 2025
b350612
moved the B51 example to yesterday once more
Aug 19, 2025
692b3a2
added a few cases
Aug 19, 2025
1e70e5c
copy the original InternetMap code from the client folder to here; wi…
kevin-w-du Aug 5, 2025
f0945c0
map2 first commit
cy-gitlab Aug 5, 2025
89810f5
map2 -> map & add flash/highlight
cy-gitlab Aug 12, 2025
add5dfa
add: map expand/collapse
cy-gitlab Aug 12, 2025
6c6d378
add: drag fixed
cy-gitlab Aug 14, 2025
a50806e
add: internet_map with dhcp
cy-gitlab Aug 19, 2025
f977946
adeed BGP hijack example
Aug 20, 2025
496a2cb
added environment variable arguments to the arguement
Aug 20, 2025
1300009
Merge pull request #317 from cy-gitlab/visualization
kevin-w-du Aug 20, 2025
00f5d9f
Merge pull request #318 from seed-labs/docker-compiler
kevin-w-du Aug 20, 2025
3ec9aad
Update Docker.py
cy-gitlab Aug 21, 2025
60631d9
Merge pull request #319 from cy-gitlab/docker-compiler
kevin-w-du Aug 21, 2025
242d92e
Revert "Update Docker.py"
kevin-w-du Aug 21, 2025
ec841c5
Merge pull request #321 from seed-labs/revert-319-docker-compiler
kevin-w-du Aug 21, 2025
21b66db
Custom containers are displayed on the map
cy-gitlab Aug 21, 2025
43c725b
Merge pull request #323 from cy-gitlab/docker-compiler
kevin-w-du Aug 21, 2025
c5a0d19
add: Building an internet_map that can communicate with the SEED Emul…
cy-gitlab Aug 21, 2025
fe6b027
Custom containers are displayed on the map
cy-gitlab Aug 21, 2025
2c98ff9
Merge branch 'docker-compiler' into visualization
cy-gitlab Aug 21, 2025
8e66f69
Merge branch 'visualization' into visualization
cy-gitlab Aug 21, 2025
9a1c2f5
Comment Scion Test in run-tests
BruceJqs Aug 21, 2025
760c544
Comment another option
BruceJqs Aug 21, 2025
cd8833c
Merge pull request #326 from BruceJqs/master
kevin-w-du Aug 21, 2025
8e07413
Update Docker.py
cy-gitlab Aug 21, 2025
95f6734
Revert "Update Docker.py"
kevin-w-du Aug 21, 2025
c65f957
Custom containers are displayed on the map
cy-gitlab Aug 21, 2025
cf2a1b4
Merge branch 'docker-compiler' of github.com:seed-labs/seed-emulator …
Aug 21, 2025
64035b7
Comment Out Quick Tests
BruceJqs Aug 21, 2025
dc4aab3
Comment Out Scion Tests
BruceJqs Aug 21, 2025
2848058
Merge pull request #327 from seed-labs/docker-compiler
kevin-w-du Aug 22, 2025
8103ef7
Merge pull request #325 from cy-gitlab/visualization
kevin-w-du Aug 22, 2025
3c7717f
Merge branch 'master' into development-zju
kevin-w-du Aug 22, 2025
7a01c9b
copy the original InternetMap code from the client folder to here; wi…
kevin-w-du Aug 5, 2025
b85c7f3
map2 first commit
cy-gitlab Aug 5, 2025
2d8c1f6
map2 -> map & add flash/highlight
cy-gitlab Aug 12, 2025
01447ad
add: map expand/collapse
cy-gitlab Aug 12, 2025
9a33205
add: drag fixed
cy-gitlab Aug 14, 2025
7c1cde9
add: Building an internet_map that can communicate with the SEED Emul…
cy-gitlab Aug 21, 2025
9f50007
Custom containers are displayed on the map
cy-gitlab Aug 21, 2025
cabd8f8
Merge pull request #328 from seed-labs/development-zju
kevin-w-du Aug 22, 2025
2b4243a
moved the B51 example to yesterday once more
Aug 19, 2025
cf4b509
added a few cases
Aug 19, 2025
ce00d37
adeed BGP hijack example
Aug 20, 2025
fd298cf
Merge branch 'yesterdayoncemore' of github.com:seed-labs/seed-emulato…
Aug 22, 2025
3a3770b
Merge pull request #331 from cy-gitlab/visualization
kevin-w-du Aug 22, 2025
806afe7
Merge pull request #332 from seed-labs/visualization
kevin-w-du Aug 22, 2025
b7dcc64
Comment Out SeedEmuOptionSystemTestCase
BruceJqs Aug 26, 2025
1c2ac4f
Merge branch 'master' into yesterdayoncemore
kevin-w-du Aug 26, 2025
0d2a700
added the show-on-map example
Aug 27, 2025
e593457
added ethereum 2025 docker changes
Aug 27, 2025
fee9518
Merge branch 'seed-labs:master' into master
BruceJqs Aug 27, 2025
8f4304c
fix real world routing
amdfxlucas Aug 27, 2025
3f14a6b
Merge pull request #337 from MuhammadJamshaidGhaffar/docker-compiler
kevin-w-du Aug 28, 2025
15c4853
Merge pull request #339 from seed-labs/docker-compiler
kevin-w-du Aug 28, 2025
a1058cb
added ethereum image contant
Aug 28, 2025
664f71b
Merge pull request #340 from MuhammadJamshaidGhaffar/docker-compiler
kevin-w-du Aug 28, 2025
b43e272
Comment Out PKI test
BruceJqs Aug 28, 2025
aa6c6c0
Merge pull request #341 from seed-labs/docker-compiler
kevin-w-du Aug 28, 2025
f586124
Merge pull request #338 from amdfxlucas/fix-rw
kevin-w-du Aug 28, 2025
6cfdffa
Develop getDefaultRouters API
BruceJqs Aug 28, 2025
af03cb1
Supplementary Instruction Document
cy-gitlab Aug 29, 2025
2d7fe19
Add DefaultRouter API in emulator class
BruceJqs Aug 29, 2025
2e00d01
Add hasDHCP API(Temporary) in Emulator Class & Network Class
BruceJqs Aug 29, 2025
41f3374
Merge pull request #343 from BruceJqs/Emulator-API
kevin-w-du Aug 29, 2025
cb8fadc
Comment Out KuboTestCase
BruceJqs Aug 29, 2025
5152354
Merge pull request #342 from cy-gitlab/visualization
kevin-w-du Aug 29, 2025
24a8b02
fix: plugin
cy-gitlab Aug 29, 2025
20460ba
add: OutLine.md
cy-gitlab Aug 29, 2025
72df1e6
Modify hasDHCP API Realization
BruceJqs Aug 29, 2025
b0b1d49
Add assertion to check if the emulation is already rendered.
BruceJqs Aug 30, 2025
049a733
Minor Fix
BruceJqs Aug 30, 2025
0615e03
Solve Option Testcase Problem
BruceJqs Aug 30, 2025
0287b82
Uncomment Option Testcase and KuboTestCase
BruceJqs Aug 31, 2025
29d97e8
Fix Error
BruceJqs Aug 31, 2025
57882f5
Try PKITestCase
BruceJqs Aug 31, 2025
4100a17
Merge pull request #345 from BruceJqs/Emulator-API
kevin-w-du Aug 31, 2025
29de15f
Run Only KuboTestCase
BruceJqs Sep 1, 2025
1e11107
Run Three Tests
BruceJqs Sep 1, 2025
7151bd4
Comment Build Examples for Faster Testing
BruceJqs Sep 1, 2025
3a202cf
modify the document && add navigation
cy-gitlab Sep 1, 2025
4117cab
Run Only KuboTestCase
BruceJqs Sep 1, 2025
84aa99d
Merge pull request #344 from cy-gitlab/visualization
kevin-w-du Sep 1, 2025
239d5ce
Test
BruceJqs Sep 1, 2025
aa2d20e
Test2
BruceJqs Sep 1, 2025
b8a929a
Test Overall
BruceJqs Sep 1, 2025
ff3ed61
Recover and final test
BruceJqs Sep 1, 2025
37b739d
Merge branch 'seed-labs:master' into master
BruceJqs Sep 1, 2025
22a20b2
Merge pull request #348 from BruceJqs/master
kevin-w-du Sep 2, 2025
85150cf
chore: remove redundant word
hustrust Sep 2, 2025
eff5a7f
Merge pull request #350 from hustrust/master
kevin-w-du Sep 2, 2025
aedcb24
Improve the documentation & Optimize the navigation page & Add Submit…
cy-gitlab Sep 4, 2025
5ccfa9f
Merge pull request #354 from cy-gitlab/visualization
kevin-w-du Sep 5, 2025
c387088
made some changes
Sep 5, 2025
63e7c3f
Updated the document
kevin-w-du Sep 5, 2025
3d7a6ff
Merge pull request #1 from BruceJqs/master
BruceJqs Sep 6, 2025
bce3a0c
Change fixed default route in A11 to Emu API
BruceJqs Sep 6, 2025
92fe01b
Merge branch 'master' into yesterdayoncemore
Sep 7, 2025
566a2aa
added all the script
Sep 7, 2025
308c707
ignore .ipynb_checkpoints
Sep 7, 2025
00b60ee
added Jupyter notebook (in Chinese)
Sep 7, 2025
8c1eb07
added a line about the emulator
Sep 7, 2025
2571522
minor change
Sep 7, 2025
e61cced
fixed some typo
Sep 7, 2025
15b4c3e
fixed a broken link
Sep 7, 2025
f43a134
fix: Optimize submit_event
cy-gitlab Sep 8, 2025
24a9c4e
Merge pull request #356 from cy-gitlab/visualization
kevin-w-du Sep 8, 2025
e3a1b79
fix: Botnetservice. fixed the problem that the BotController can't ru…
Zephyriiiii Sep 8, 2025
835e7bb
typo: BotnetService. change the comment to english.
Zephyriiiii Sep 8, 2025
17cdf1e
Merge pull request #359 from Zephyriiiii/master
kevin-w-du Sep 8, 2025
f535e9f
removed a file
Sep 8, 2025
aad2009
add Y03_mirai example with .ipynb file
Zephyriiiii Sep 8, 2025
c3a02c4
Merge pull request #361 from Zephyriiiii/yesterdayoncemore
kevin-w-du Sep 8, 2025
2295b38
ignore output*
Sep 9, 2025
961338d
added another demo
Sep 9, 2025
3c60207
resolved conflict
Sep 9, 2025
c579860
removed output cells
Sep 9, 2025
9e9d17b
renamed demo to demo1
Sep 9, 2025
569cc69
fixed small issues
Sep 9, 2025
3c975bc
Add OpenVpnRouter NodeRole
BruceJqs Sep 9, 2025
4864a7e
fix: seedemu_internet_map template
cy-gitlab Sep 9, 2025
7cecbd3
Merge pull request #364 from cy-gitlab/docker-compiler
kevin-w-du Sep 9, 2025
7cce74c
Merge pull request #365 from seed-labs/docker-compiler
kevin-w-du Sep 9, 2025
c7d2d28
Merge pull request #2 from seed-labs/Emulator-API
BruceJqs Sep 10, 2025
9bdae44
updated the notebook and readme
Sep 10, 2025
71503c8
Merge branch 'master' into visualization
Sep 10, 2025
8230144
Merge pull request #366 from BruceJqs/Emulator-API
kevin-w-du Sep 10, 2025
05221c8
Merge branch 'master' into Emulator-API
Sep 10, 2025
4cb81af
chore: remove redundant words
quantpoet Sep 19, 2025
d810a00
Merge pull request #372 from quantpoet/master
kevin-w-du Sep 20, 2025
c9a4785
Merge pull request #373 from seed-labs/yesterdayoncemore
kevin-w-du Sep 22, 2025
01add7a
Merge pull request #371 from seed-labs/visualization
kevin-w-du Sep 22, 2025
bc1b3ea
Merge branch 'master' into Emulator-API
Oct 1, 2025
e0ba4b1
Merge pull request #377 from seed-labs/Emulator-API
BruceJqs Oct 2, 2025
16b3524
DNS: improve DomainNameCachingService fallback resolution; add compre…
zzw4257 Oct 22, 2025
6f0a505
examples: A08 buildtime docker: install build-essential to build ckzg…
zzw4257 Oct 23, 2025
f784794
Merge pull request #386 from zzw4257/feat/dns-tests
kevin-w-du Oct 24, 2025
d7c8827
EmailService: add service implementation and wiring (previously valid…
zzw4257 Oct 24, 2025
6ae17d0
Merge pull request #387 from seed-labs/email-service
kevin-w-du Oct 24, 2025
b19ad33
feat(b29): build B29 on EmailService and add end-to-end orchestration
zzw4257 Oct 25, 2025
ea11eab
Merge pull request #390 from zzw4257/feat/email-service
kevin-w-du Oct 26, 2025
1015163
updated the document
Oct 29, 2025
dfec868
updated the manual
Oct 29, 2025
0699a9a
chore: remove repetitive words in README.md
fengyuchuanshen Nov 4, 2025
b34aa0e
Merge pull request #395 from fengyuchuanshen/master
kevin-w-du Nov 4, 2025
2216500
Update on-pull-request.yaml
kevin-w-du Nov 5, 2025
a5db61c
Remove Irrelevant Files
BruceJqs Nov 13, 2025
ac51283
Merge pull request #402 from BruceJqs/master
kevin-w-du Nov 13, 2025
ffec3a5
Task2: externals support + per-external export folder + SCION artifac…
hamouda142 Dec 16, 2025
bf76a7c
Remove binary bundles; keep reproducible proof via source/log
hamouda142 Dec 16, 2025
d20c903
Fix missing logging import in BuildtimeDocker
hamouda142 Dec 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
98 changes: 95 additions & 3 deletions .github/workflows/on-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,48 @@ on:
pull_request:
branches:
- master
- development
workflow_dispatch:
inputs:
run-quick-tests:
description: "Run quick tests | ignores other options for testing (they still apply for compile/build)"
type: boolean
required: false
default: "false"
run-basic-tests:
description: "Run basic tests | Compile and builds all the basic examples - Runs basic tests"
type: boolean
required: false
default: "true"
run-internet-tests:
description: "Run internet tests | Compile and builds all the internet examples - Runs internet tests"
type: boolean
required: false
default: "true"
run-blockchain-tests:
description: "Run blockchain tests | Compile and builds all the blockchain examples - Runs blockchain tests"
type: boolean
required: false
default: "false"
run-scion-tests:
description: "Run SCION tests | Compile and builds all the SCION examples - Runs SCION tests"
type: boolean
required: false
default: "false"


jobs:
compile-examples:
name: Compile Examples
runs-on: ubuntu-latest
permissions:
contents: read
env:
SCION_TESTS: ${{ github.event.inputs.run-scion-tests || 'false' }}
BASIC_TESTS: ${{ github.event.inputs.run-basic-tests || 'true' }}
INTERNET_TESTS: ${{ github.event.inputs.run-internet-tests || 'true' }}
BLOCKCHAIN_TESTS: ${{ github.event.inputs.run-blockchain-tests || 'false' }}
QUICK_TESTS: ${{ github.event.inputs.run-quick-tests || 'false' }}
steps:
- name: Check out the source repository
uses: actions/checkout@v4
Expand All @@ -22,6 +57,7 @@ jobs:
cache-dependency-path: "**/*requirements.txt"
- run: pip install -r requirements.txt -r dev-requirements.txt -r tests/requirements.txt
- name: Get scion-pki
if: ${{ env.SCION_TESTS == 'true' }}
run: |
curl -fsSL -O https://github.com/scionproto/scion/releases/download/v0.12.0/scion_0.12.0_amd64_linux.tar.gz
mkdir bin
Expand All @@ -30,14 +66,33 @@ jobs:
run: |
source development.env
export PATH=$PATH:$PWD/bin
tests/compile-and-build-test/compile-test.py
CMD="tests/compile-and-build-test/compile-test.py"
if [ "$BASIC_TESTS" == "true" ]; then
CMD+=" --basic"
fi
if [ "$INTERNET_TESTS" == "true" ]; then
CMD+=" --internet"
fi
if [ "$BLOCKCHAIN_TESTS" == "true" ]; then
CMD+=" --blockchain"
fi
if [ "$SCION_TESTS" == "true" ]; then
CMD+=" --scion"
fi
python $CMD

run-tests:
name: Run Tests
needs: compile-examples # Only run heavy tests if quick compile test succeeds
runs-on: ubuntu-latest
permissions:
contents: read
env:
SCION_TESTS: ${{ github.event.inputs.run-scion-tests || 'false' }}
BASIC_TESTS: ${{ github.event.inputs.run-basic-tests || 'true' }}
INTERNET_TESTS: ${{ github.event.inputs.run-internet-tests || 'true' }}
BLOCKCHAIN_TESTS: ${{ github.event.inputs.run-blockchain-tests || 'false' }}
QUICK_TESTS: ${{ github.event.inputs.run-quick-tests || 'false' }}
steps:
- name: Check out the source repository
uses: actions/checkout@v4
Expand All @@ -49,6 +104,7 @@ jobs:
cache-dependency-path: "**/*requirements.txt"
- run: pip install -r requirements.txt -r dev-requirements.txt -r tests/requirements.txt
- name: Get scion-pki
if: ${{ env.SCION_TESTS == 'true' }}
run: |
curl -fsSL -O https://github.com/scionproto/scion/releases/download/v0.12.0/scion_0.12.0_amd64_linux.tar.gz
mkdir bin
Expand All @@ -57,7 +113,23 @@ jobs:
run: |
source development.env
export PATH=$PATH:$PWD/bin
tests/run-tests.py --ci
CMD="tests/run-tests.py"
if [ "$QUICK_TESTS" == "true" ]; then
CMD+=" --ci"
fi
if [ "$BASIC_TESTS" == "true" ]; then
CMD+=" --basic"
fi
if [ "$INTERNET_TESTS" == "true" ]; then
CMD+=" --internet"
fi
if [ "$BLOCKCHAIN_TESTS" == "true" ]; then
CMD+=" --blockchain"
fi
if [ "$SCION_TESTS" == "true" ]; then
CMD+=" --scion"
fi
python $CMD
- name: Archive test results
uses: actions/upload-artifact@v4
with:
Expand All @@ -75,6 +147,12 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
env:
SCION_TESTS: ${{ github.event.inputs.run-scion-tests || 'false' }}
BASIC_TESTS: ${{ github.event.inputs.run-basic-tests || 'true' }}
INTERNET_TESTS: ${{ github.event.inputs.run-internet-tests || 'true' }}
BLOCKCHAIN_TESTS: ${{ github.event.inputs.run-blockchain-tests || 'false' }}
QUICK_TESTS: ${{ github.event.inputs.run-quick-tests || 'false' }}
steps:
- name: Check out the source repository
uses: actions/checkout@v4
Expand All @@ -86,6 +164,7 @@ jobs:
cache-dependency-path: "**/*requirements.txt"
- run: pip install -r requirements.txt -r dev-requirements.txt -r tests/requirements.txt
- name: Get scion-pki
if: ${{ github.event.inputs.run-scion-tests == 'true' }}
run: |
curl -fsSL -O https://github.com/scionproto/scion/releases/download/v0.12.0/scion_0.12.0_amd64_linux.tar.gz
mkdir bin
Expand All @@ -95,7 +174,20 @@ jobs:
source development.env
export PATH=$PATH:$PWD/bin
cd tests/compile-and-build-test
./compile-and-build-test.py
CMD="compile-and-build-test.py"
if [ "$BASIC_TESTS" == "true" ]; then
CMD+=" --basic"
fi
if [ "$INTERNET_TESTS" == "true" ]; then
CMD+=" --internet"
fi
if [ "$BLOCKCHAIN_TESTS" == "true" ]; then
CMD+=" --blockchain"
fi
if [ "$SCION_TESTS" == "true" ]; then
CMD+=" --scion"
fi
python $CMD
- name: Archive test results
uses: actions/upload-artifact@v4
with:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/sync-gitee.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: sync2gitee
on:
push:
branches:
- master
jobs:
repo-sync:
env:
SSH_PRIVATE_KEY: ${{ secrets.GITEE_SSH_KEY }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false

- name: Configure Git
run: |
git config --global --add safe.directory /github/workspace

- name: sync github -> gitee
uses: wearerequired/git-mirror-action@master
if: env.SSH_PRIVATE_KEY
with:
source-repo: "git@github.com:${{ github.repository }}.git"
destination-repo: "git@gitee.com:seedlab/seed-emulator.git"
2 changes: 1 addition & 1 deletion VM_images/SeedVM24.04/src-amd/Install_Packages.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
git clone https://github.com/seed-labs/seed-emulator.git ~/seed-emulator
cd ~/seed-emulator
pip install -r ~/seed-emulator/requirements.txt
echo 'export PYTHONPATH="/home/seed/seed-emulator:$PYTHONPATH"' > ~/.bashrc
echo 'export PYTHONPATH="/home/seed/seed-emulator:$PYTHONPATH"' >> ~/.bashrc
2 changes: 1 addition & 1 deletion VM_images/SeedVM24.04/src-arm/Install_Packages.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
git clone https://github.com/seed-labs/seed-emulator.git ~/seed-emulator
cd ~/seed-emulator
pip install -r ~/seed-emulator/requirements.txt
echo 'export PYTHONPATH="/home/seed/seed-emulator:$PYTHONPATH"' > ~/.bashrc
echo 'export PYTHONPATH="/home/seed/seed-emulator:$PYTHONPATH"' >> ~/.bashrc
2 changes: 1 addition & 1 deletion docs/user_manual/bgp.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ and `PeerRelationship.Unfiltered` peers.

We show how to allow the nodes inside an emulator to communicate
with the machines on the real Internet. A complete example
can be found [here](../../examples/A03-real-world/).
can be found [here](../../examples/basic/A03_real_world/).
To achieve this goal, we first need to create
a BGP router to announce the real-world network
prefixes inside the emulator, so the packets going to the
Expand Down
19 changes: 16 additions & 3 deletions docs/user_manual/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,33 @@ node.addSoftware("python3")

Some of the software may have to be installed using some ad hoc
commands, like `curl`, `wget`, etc. We can add the installation commands
using the `addBuildCommand()` API.
using the `addBuildCommand()` and `addBuildCommandAtEnd()` APIs.

```python
node.addBuildCommand("curl http://example.com")
node.addBuildCommandAtEnd("unzip file.zip")
```

This API will lead to the addition of a
`RUN` command in Dockerfile. When the container is built, the command
These APIs will lead to the addition of a
`RUN` command in Dockerfile. When the container is built, the specified command
will be executed.

```
RUN curl http://example.com
... omitted ...
RUN unzip file.zip
```

If we also invoke `importFile()` API, the file COPY command caused by
this API is actually placed after the RUN command caused by
the `addBuildCommand()` API. Therefore, if we need to use
the imported file in the RUN command, we will not be able to do that.
Because of this problem, we added a new API called
`addBuildCommandAtEnd()`. It will add a RUN command
towards the end of the `Dockerfile`, after all the
COPY command.


## Import and create file

We may also install our own program on a node, or just simply
Expand Down
1 change: 1 addition & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.ipynb_checkpoints
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ e2.setBootNode(True)

Note the step above is optional. If you do not set any node as boot node, all nodes in the emulation will be each other's boot nodes, which may impact performance if you have a large number of nodes.

To let other nodes know the enode URL of the current node, the boot node hosts a text file with a simple HTTP server containing the URL. By default, it runs on port `8088`. If you have run some other services on the node on that port, you change change the bootnode http server port with `setBootNodeHttpPort`:
To let other nodes know the enode URL of the current node, the boot node hosts a text file with a simple HTTP server containing the URL. By default, it runs on port `8088`. If you have run some other services on the node on that port, you change the bootnode http server port with `setBootNodeHttpPort`:

```python3
# optionally, set boot node http server port
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
## Creating prefunded accounts

## component-blockchain.py output
- After configuring your network, the output of this file should should be similar to the picture below
- After configuring your network, the output of this file should be similar to the picture below

![Component output](images/component-blockchain-output.png)

Expand Down
Binary file added examples/Z00_external_demo/task2_proof.log
Binary file not shown.
61 changes: 61 additions & 0 deletions examples/Z00_external_demo/topology.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
from seedemu.compiler import Docker
from seedemu.core import Emulator
from seedemu.layers import Base, Routing
from seedemu.layers.external import ExternalComponent, ExternalComponentLayer
from seedemu.core.ExternalEmulation import ExternalEmuSpec


def main():
emu = Emulator()
base = Base()
routing = Routing()
ext_layer = ExternalComponentLayer()

asn = 65000
as0 = base.createAutonomousSystem(asn)

# Internal network (so r0 has a "normal" interface)
as0.createNetwork("net0", prefix="10.65.0.0/24")
r0 = as0.createRouter("r0")
r0.joinNetwork("net0")

# Create IX100 and connect r0 to it with a MANUAL IP (no auto ASN->IX mapping)
base.createInternetExchange(100) # creates network name "ix100"
r0.joinNetwork("ix100", "10.0.0.1") # IMPORTANT: no "/24" here

# External component definition (what Task 2 is about)
ext = ExternalComponent(
name="ext-r0",
role="router",
asn=asn,
impl_type="generic",
)

ext.addInterface(
name="eth0",
network="ix100",
ip="10.0.0.2/24",
mac="02:00:00:00:00:01",
)

ext_layer.addComponent(ext)
emu.addLayer(base)
emu.addLayer(routing)
emu.addLayer(ext_layer)


emu.render()
print("Registered externals in Emulator:", list(emu.getExternalComponents().keys()))

emu.compile(Docker(), output="output", override=True)
print("Compiled to .\\output")

print("External component definition created:")
print(f" Name: {ext.name}")
print(f" Role: {ext.role}")
print(f" ASN: {ext.asn}")
for iface in ext.interfaces:
print(f" Interface {iface.name}: network={iface.network}, ip={iface.ip}, mac={iface.mac}")

if __name__ == "__main__":
main()
7 changes: 5 additions & 2 deletions examples/basic/A00_simple_as/simple_as.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,12 @@ def run(dumpfile = None):
else:
emu.render()

# Attach the Internet Map container to the emulator
docker = Docker(platform=platform)

###############################################################################
# Compilation
emu.compile(Docker(platform=platform), './output', override=True)
emu.compile(docker, './output', override=True)

if __name__ == '__main__':
run()
run()
5 changes: 5 additions & 0 deletions examples/basic/A08_buildtime_docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ FROM python:slim

WORKDIR /app

# Install minimal build tools required to build native dependencies (e.g., ckzg)
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential && \
rm -rf /var/lib/apt/lists/*

RUN PYTHONDONTWRITEBYTECODE=1 pip install --progress-bar off --no-cache-dir eth-account

ENTRYPOINT [ "python", "-c", "import eth_account; print(eth_account.__version__)" ]
3 changes: 3 additions & 0 deletions examples/basic/A10_add_containers/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Add existing containers

Note: this method is the older approach; we have introduced a new approach (listed
in another example).

In some cases, we already have a group of existing containers,
we would like to add them to the emulator. How do we do this?
In this example, the existing containers are put inside the
Expand Down
26 changes: 26 additions & 0 deletions examples/basic/A11_add_containers_new/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Add existing containers

In some cases, we already have an existing container image, and we want
some of the containers in the emulator to use this image. There are two
methods to do this.


## Method 1

In this method, we add existing containers when building the emulator.
We have implemented this feature in the `Docker` compiler class. The basic idea
is to tell the compiler that we want to attach an existing container to
a network inside the emulator. The compiler will then generate the corresponding
entry inside the `docker-compose.yml` file.

See [this example](./method_1/) for details.


## Method 2

In this method, we add the existing containers after we have built the emulator.
Using this method, we first start the emulator, and then start the additional containers
from the existing images. We attach these containers to the networks created by the emulator.
This way, the new containers becomes part of the emultion.

See [this example](../A10_add_containers/) for details.
Loading
Loading