initial_setup

Function initial_setup 

Source
pub fn initial_setup(
    config: &Config,
    rollback: &RollbackManager,
) -> Result<(), Box<dyn Error>>
Expand description

Performs the initial setup of the server based on the provided configuration.

This function orchestrates the entire initial setup process, including:

  • Updating the system
  • Installing essential packages
  • Setting up the firewall
  • Configuring SSH

It creates a snapshot before starting the setup process for potential rollback.

§Arguments

  • config - A reference to the Config struct containing setup configuration
  • rollback - A reference to the RollbackManager for creating snapshots

§Returns

Returns Ok(()) if the initial setup is completed successfully, or an error if setup fails.