Skip to content

antoleandarius-dev/python-greengrass-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Greengrass Setup (Python Refactor)

A Python reimplementation of the Greengrass v2 setup and removal workflow. It mirrors the behaviour of the original shell scripts with additional configuration structure and richer logging.

Components

  • config.example.yaml – sample configuration file; copy to config.yaml and update to match your environment.
  • requirements.txt – Python dependencies (currently only PyYAML).
  • setup.py – CLI entry point for installing Greengrass.
  • remove.py – CLI entry point for uninstalling Greengrass.
  • common/ – reusable package with configuration parsing, download helpers, and installer orchestration.
  • legacy/ – Contains legacy setup and remove shell files from this entire orchestration is derived from.

Usage

  1. Create a virtual environment and install dependencies:

    cd aws-greengrass-setup/python-refactor
    python3 -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
  2. Copy the example configuration and edit it:

    cp config.example.yaml config.yaml
    $EDITOR config.yaml

    Provide either local artifact paths or download URLs for the installer and connection kit, and verify the target directories.

  3. Install Greengrass:

    python setup.py --config config.yaml --log-level INFO
  4. Remove Greengrass:

    python remove.py --config config.yaml

Features

  • Supports YAML or JSON configuration files.
  • Downloads artifacts (or reuses local copies) with progress logging.
  • Optionally installs Java when missing.
  • Cleans up the workspace automatically unless auto_cleanup is disabled.
  • Mirrors the uninstall steps from the shell version, including service removal and optional user/group cleanup.

Notes

  • The installer commands rely on sudo; ensure the executing user has appropriate privileges.
  • Only basic error handling is provided for network operations—consider wrapping network retries for production usage.
  • Extend the package as needed (e.g., checksum validation, AWS SDK integration for presigned connection kits).

About

A Python reimplementation of the Greengrass v2 setup and removal workflow. It mirrors the behaviour of the original shell scripts with additional configuration structure and richer logging.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors