Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing hard dependency on SCION lab packages, SCION build config #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

divinepaul
Copy link
Collaborator

Ability to set a build config on the scion layer which can,

  1. Clone any SCION git repository with mentioned tag, commit or branch and build SCION binaries.
scion.setBuildConfiguration({
    "mode": "build",
    "gitRepoUrl": "https://github.com/scionproto/scion.git",
    "checkout": "v0.11.0" # could be tag, branch or commit (ex "efbbd5835f33ab52389976d4b69d68fa7c087230")
})
  1. Use a local directory ( absolute path ) to import the SCION binaries
scion.setBuildConfiguration({
    "mode": "release",
    "releaseLocation": "/absolute/path",   
    "version": "v0.12.0" # does nothing except suffix the directory containing the binaries
})
  1. Use any HTTP URL that returns a .tar.gz file containing the binaries
scion.setBuildConfiguration({
    "mode": "release",
    "releaseLocation": "https://github.com/scionproto/scion/releases/download/v0.12.0/scion_0.12.0_amd64_linux.tar.gz"
    "version": "v0.12.0" # does nothing except suffix the directory containing the binaries
})

Things to note,
All configurations write the binaries to a directory called .scion_build_output in the current working directory.
the directory will contain sudirectories with the binaries named with a suffix to either the version or the checkout.
the build is not repeated for the same checkout or version.
any scion output will now have shared directories with docker volumes, so deleting the binaries or the shared folder will break the produced docker compose configuration.
I did not make another file for the ScionBuildConfig class since I was unsure where it could go in the project.
And I need help nailing down how changing the build config for individual nodes could look like.

Copy link

@martenwallewein martenwallewein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, great work!

@martenwallewein
Copy link

While testing this with the example S02-scion-bgp-mixed I encountered the following issue:

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/marten/go/src/github.com/netsys-lab/seed-emulator/examples/scion/S02_scion_bgp_mixed/.scion_build_output/scion_binaries_v0.12.0" to rootfs at "/bin/scion": mount /home/marten/go/src/github.com/netsys-lab/seed-emulator/examples/scion/S02_scion_bgp_mixed/.scion_build_output/scion_binaries_v0.12.0:/bin/scion (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

Can you replicate this? On my machine this leads to the containers not starting in this example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pin SCION Version and remove hard dependency on scionlab packages
2 participants