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

2024 changes from ETH + Restart script #1

Open
wants to merge 4 commits into
base: commnet24
Choose a base branch
from

Conversation

maxju
Copy link
Collaborator

@maxju maxju commented Oct 1, 2024

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 and configure_as.sh
from my branch.

NotSpecial and others added 4 commits August 28, 2024 17:17
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants