30 Commits

Author SHA1 Message Date
Joe Clarke
f9801dddfc Remove submodules in favor of READMEs.
Also, add a new script, the cml-exporter.
2025-07-12 15:41:21 -04:00
Joe Clarke
202c430cf4 Sync to latest eve2cml 2025-06-01 09:55:44 -04:00
Ralph Schmieder
0683e4af4a Add autostart script and documentation (#63)
Add a script to be deployed on CML that allows labs marked with "(autostart)" in their descriptions to be started as soon as the CML server boots up.
2025-05-20 15:19:25 -04:00
dependabot[bot]
ea6f212a88 Bump jinja2 from 3.1.5 to 3.1.6 in /scripts/brk2iterm (#61)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.5...3.1.6)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-26 00:09:55 -04:00
dependabot[bot]
a4205b4bfe Bump jinja2 from 3.1.4 to 3.1.5 in /scripts/brk2iterm (#58)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.4...3.1.5)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-01 08:52:02 -05:00
dependabot[bot]
8b2b0f6d6d --- (#41)
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-22 11:42:20 -04:00
dependabot[bot]
ff075d90da Bump jinja2 from 3.1.2 to 3.1.3 in /scripts/brk2iterm (#38)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-12 20:12:27 -04:00
Joe Clarke
310cfb0b6b Add a submodule for Ralph's eve2cml tool.
This tool allows one to convert EVE-NG topologies to CML topologies.
2024-03-12 20:09:36 -04:00
kellychristians
933b81bedb Windows SecureCRT Lab/Session Generation (#37)
* New script project for SecureCRT Session Generation

Simple script for automated session generation with secureCRT on windows.
minimal module requirements
2024-03-01 11:40:28 -05:00
tmikuska
cea96a0d76 IPv6 migration support and other improvements to the migration script (#33) 2023-01-25 03:26:48 -05:00
shawnjury
b837227eac Breakout tool update add mac support (#25)
* breakout update and MAC OS support

Added getAllNodes function to cmlApiCalls.py.
Added Mac OS support into main.py
Added new logic to get all nodes, find label and node_definition, sort by label and add the SecureCRT ini files.  This matched what the breakout tool provided for my machine.

* Update main.py

* Using Lab_title

Changed to use the LabTitle for the Directory/CRT.  This makes it more human readable when you have multiple labs.
2022-11-03 06:30:35 -04:00
Joe Clarke
d8b4d03839 Add support for clustering.
Submitted by:	Tomas Mikuska
2022-05-18 09:07:01 -04:00
sgherdao
c991ec19e4 breakout to iTerm2 script (#21)
Add a script to generate iTerm2 configurations from the breakout tool console connections.
2022-05-11 16:14:44 -04:00
sgherdao
b636b84985 added brk2tmuxp.py script (#20)
This script provides a way to turn the CML breakout labs config into tmux configuration for easy console access.
2022-05-05 16:48:21 -04:00
Joe Clarke
7451c5ae7d Allow for migration between 2.2 and 2.3+.
Submitted by:	Tomas Mikuska
2022-04-27 17:41:51 -04:00
Joe Clarke
34f9af8475 Set for release. 2022-02-20 15:23:44 -05:00
Joe Clarke
eff63cda6b New migration (#17)
* Begin support for CentOS > Ubuntu migration.

* Don't rely on the script being on the source host.  Copy it there each
  time.
* Remove the prep and unprep options.  OpenSSH must be enabled on the
  remote host.
* Allow for moving from 2.2.2 to 2.3.0.
* Fail if all labs cannot be stopped.

* WIP: Switch to rsync for migration

Support broader migration targets and handle the case where libvirt
might not be an overlay (in 2.3).

TODO: Need to support non-overlay for offline migration and need to call
the actual migration script once the restore/migration is complete.

* Format and fix some function use.

* Mount the overlay on the right machine.

* Begin to add offline support.

TODO: Determine the correct place to extract refplat images.

* Map LIBVIRT_IMAGES to LIBVIRT_IMAGES.

* Don't assume the script is in /usr/local/bin.

* Don't wait for labs to stop when we don't stop them.

* Fix a number of bugs in migration.

* Fix a bug in the use of `cut`.

While here, make rsync show progress and ensure we use rsync as root on
the remote machine.

* Refactor when the data migration is done.

* Make sure we copy the right local directories.

Also, fix rsync command line to enable compression.

* Fix the conversion of libvirt from CentOS to Ubuntu.

* Make sure migration mode is properly passed.

Also, handle image copying correctly.

* Check to see if we're migrating from the local host.

* Make sure we check an IP.

* Check that hostname resolution is working.

* Allow alembic to handle the libvirt domain changes.

* Fix permissions of node disks.

Also, don't mask errors.

* Add a comment.

* Flesh out support for offline migration.

* Make the backup file very explicit.

* Don't try and mount the overlay if we don't need it.

Also add support for running without confirmation.

* Fix some issues spotted by shellcheck.

* Update docs for version migration.

* Fix logic error to allow for migration.

* Expose tar output so people can see progress.

* Add progress for tar via checkpoints.

Use checksum verification to decide what to rsync.

* Provide a better means to show progress.

Submitted by:	Justin Guagliata

* Remove errant '-'.

* Remove the 'z'.

* This needs to be exported.

* Add a single occurrence for each tar extract command.

* Some fixes.

* Move back to straight tar to fix estimates
* Fix double extract on restore
* Uniform progress indicators for backup and restore

Submitted by:	Justin Guagliata

* Add some signal traps.

* Add some echoes to clean up the output.

* Only remove the backup file on error.

* Use grep on a string properly.

* Give more verbosity to rsync.

* Some fixes from Tomas.

* Exclude *.orig and *.rej files that may be found in node defs.
* Make sure we only migrate mapped dirs when doing migration.

* Add support for migrating libvirt networks.

* Added Palo Alto

* ignore vscode workspace

* added readme and renamed directory

* removed vscode workspace file

* update

* rename directory palo-alto

* edited while loop to account for deleted devices

this will max out at 100 nodes added. 
to add more than 100 nodes, edit line 26

* updated while loop to account for deleted devices

this will now check all nodes from n0 to n99. 
I found that deleted nodes breaks the previous script because after 1 node was not found, it ended. 
to check for nodes higher than n99, edit line 24

* Update main.py

* updated to account for deleted nodes

* Add Cumulus VX image

* Updated contributer list

* Add Charlie Fenwick's cool use case around Jupyter.

This use case demonstrates how a Jupyter notebook can be used to
provision a new lab from zero (with a nod toward Ansible as the way to
configure it).

* fixed readability / adjusted for login.yaml

* Create login.yaml

* added support for more default devices

added support for:
unmanaged switches
asav
ftdv
server
alpine
coreos
desktop
ubuntu

* Make user configurable.

Also, do not migrate the default network.

* Add support for migrating libvirt ifaces.

* Add the --get-ifaces command.

* Update docs with --user option.

* Support iface-list differences.

* Fix numerous issues.

* Add a missing sudo.

* Make sure we account for migration when checking for space.

* Fix typo.

Reported by:	Tomas Mikuska

* Fix some markdown issues and clarify bridge migration.

* More markdown consistency fixes.

* Add the SD-WAN as code use case.

* This is done as part of cleanup.

* Add version info and a --version flag for displaying it.

* Add the ability to update the script itself from GitHub.

* Use an equals expression.

* Fix version comparison.

* Fix --version comflict.

* Bump version.

* Document the --update flag.

* Make the URL a bit more modular.

Co-authored-by: Alexander Deca <alexander@deca-consulting.be>
Co-authored-by: M35a2 <49795550+M35a2@users.noreply.github.com>
2022-02-08 12:12:48 -05:00
M35a2
96ba859d14 added support for trex
added support for trex -- line 78
2021-12-03 13:38:03 -07:00
M35a2
8adac17bae added support for more default devices
added support for:
unmanaged switches
asav
ftdv
server
alpine
coreos
desktop
ubuntu
2021-10-20 15:40:57 -06:00
M35a2
19185fda09 Create login.yaml 2021-10-20 15:39:08 -06:00
M35a2
8bdc99128f fixed readability / adjusted for login.yaml 2021-10-20 15:38:09 -06:00
M35a2
8a3e1f0374 updated to account for deleted nodes 2021-09-20 13:16:53 -06:00
M35a2
a739da1d29 Update main.py 2021-09-20 13:12:13 -06:00
M35a2
5231d69a0a updated while loop to account for deleted devices
this will now check all nodes from n0 to n99. 
I found that deleted nodes breaks the previous script because after 1 node was not found, it ended. 
to check for nodes higher than n99, edit line 24
2021-09-20 12:09:47 -06:00
M35a2
92db690c6f edited while loop to account for deleted devices
this will max out at 100 nodes added. 
to add more than 100 nodes, edit line 26
2021-09-20 12:02:07 -06:00
ben
1be93cd1e8 commit 2021-08-12 11:14:36 -06:00
ben
1432ff4352 commit 2021-08-12 11:09:36 -06:00
Joe Clarke
bc0ff307c0 Update README.md
Mention bridge interfaces are not currently migrated.
2021-06-09 12:55:18 -04:00
Joe Clarke
47a0c8d84b Correct a typo. 2021-05-14 09:54:06 -04:00
Joe Clarke
37e46ae9a7 Add the migration tool.
This script allows one to migrate data, including lab node disks and
config from one CML server to another provided both are the same
version.  More details are available in the README.
2021-05-14 09:41:57 -04:00