containerlab icon indicating copy to clipboard operation
containerlab copied to clipboard

add `redeploy` command

Open hellt opened this issue 3 years ago • 4 comments
trafficstars

redeploy command answers the need to quickly re-deploy a lab. It should be possible to redeploy a lab with and without keeping the lab directory.

Conceptually, redeploying a lab is a sequence of a destroy and deploy commands.

hellt avatar Aug 31 '22 15:08 hellt

I'd like to try and tackle this if possible.

alexandrehassan avatar Sep 29 '22 21:09 alexandrehassan

Sure. Thanks Alexandre!

On Thu, 29 Sep 2022 at 23:33, Alexandre Hassan @.***> wrote:

I'd like to try and tackle this if possible.

— Reply to this email directly, view it on GitHub https://github.com/srl-labs/containerlab/issues/1010#issuecomment-1262840392, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLKV5J6LFIC356EKBTQG5LWAYDL7ANCNFSM6AAAAAAQBPARAE . You are receiving this because you authored the thread.Message ID: @.***>

hellt avatar Sep 29 '22 21:09 hellt

@hellt - re: keeping the lab directory, am I correct in these assumptions?

  1. In keeping the directory - the user has made changes, and wants a clean slate to reset the lab
  2. In destroying the directory - the user has made changes in the node.cfg files and wants to rebuild the lab with the new config files

scotho3 avatar Nov 01 '22 23:11 scotho3

@scotho3

  1. you want to keep a directory if you want some artifacts from it to be picked up when you destroy+deploy it again. Typically, this is related to the configuration that users saved during lab lifetime and they want these configs to be applied once they redeployt the lab. For example, you launched a lab, added some configs to the nodes, saved those configs so that they got written to disk (lab directory). Now you want to redeploy the lab for whatever reason, maybe you want to free up resources and get back to that lab later. You destroy the lab without removing the lab directory. Then you deploy the lab again, and those files from the lab directory will be picked up as startup config.
  2. When you remove the lab dir, all your configs that were persisted before will be flushed. You will start from a completely clean slate.

HTH

hellt avatar Nov 02 '22 08:11 hellt