forked from nsg-ethz/mini_internet_project
-
Notifications
You must be signed in to change notification settings - Fork 1
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
2024 changes from ETH + Restart script #1
Open
maxju
wants to merge
4
commits into
netd-tud:commnet24
Choose a base branch
from
maxju:2024-changes
base: commnet24
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For the 2024 iteration of our lecture, we made some significant improvements to the mini Internet, which we now port back to the main branch. Most notably: - We removed the Open vSwitch connecting the containers and replaced it with direct virtual links. Adding links to the virtual switch scaled very badly to large topologies, resulting in multi-hour setup times. With the new implementation, setup takes at most tens of minutes, even for large topologies. Already "battle-tested" the new implementation earlier this year with over 100 students. - Rewrote the restart scripts to work with the new implementation. - Added a `HISTORY` service that starts with the mini-Internet and collects regular snapshots of all configs. This has two main purposes: - Even if students forget to save their config, we have a snapshot. - One can create a neat gif in the end that shows how connectivity evolved over time. The scripts to create this gif are in `utils/history_gif` - It can be disabled if space is a concern, but we found it to take a few hundred MB max, even after a long time. - Added a `variables.sh` file in config. All configurable parameters have been removed from the scripts in `setup` and moved into `variables.sh` to make it easier to configure the Mini-Internet services in one place. This includes the webserver, matrix, and the new history service. --------- Co-authored-by: CommNet Team <[email protected]> Co-authored-by: yuchen14 <[email protected]>
…sg-ethz#43) Original message on the pull-request for usage reference below. I had used several months ago for our education environment, and we felt a problem when do restoring all container after an host accidental shutdown (e.g. power outage) to the working state. To resolve this specific case, I just created a new standalone shell script that located in `platform/utils/save_and_restore/restart_mini_internet.sh` that will performs these mechanisms below: 1. The script will use all backuped configurations that compressed as `.tar.gz` archive in the `students_config` directory with the format should be `configs-as-<as number>.tar.gz` ![Correct example of ](https://github.com/nsg-ethz/mini_internet_project/assets/34955926/3aeeb867-0d49-4a57-a009-422dc748b20f) 2. Script will perform hard cleanup, by executing `./cleanup/clean.up` and ` ./cleanup/hard_reset.sh` 3. Script will perform the startup the project, executing `./startup.sh`, then `./utils/ssh/portforwarding.sh`, and finally `./utils/iptables/filters.sh`, and unpausing the MATRIX container, and show the new AS SSH login password (due to perform startup.sh again). 4. Script will perform config restoration which are based on config defined at point 1, the script is able to store router's FRR config, end-host such as server configuration with IPv4, IPv6, and also able to restore the switch configuration (VLAN etc.). The full usage of the configuration will being described later. The usage of the `restart_mini_internet.sh` described at the `-h` flag, that explained below image. ![Script usage documentation](https://github.com/nsg-ethz/mini_internet_project/assets/34955926/65947821-fa4a-43d8-9578-4d1b1354d678) Considerations when using this script: - When do a backup, the script **WILL WIPES ALL THE FILES CONTAINED IN THE `students_config` to overwrite with the new configuration, so please move your backuped config in the another location** - To perform restore, please make sure the format is same as the point 1 describes. - Currently, this script isn't able to store regarding RPKI configurations such as Krill. Regards, anandadfoxx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
Here I first merged nsg-ethz/mini_internet_project:master into a local copy of commnet24, then merged my restart script changes from maxju/mini_internet_project:testing. If you don't want to merge all these changes at once, my restart script functionality needs
restart_mini_internet.sh
andconfigure_as.sh
from my branch.