liveBook · Manning

Package manager

As explained in Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

Software that automates the retrieval, installation, updating, and dependency management of reusable software packages.

A package manager automates retrieving, installing, updating, and managing dependencies for reusable software packages. In infrastructure configuration, it downloads versioned modules from remote repositories before they are imported. section 5.1.2

A repository-based workflow uses the package manager to:

  • Declare each module as a library requirement with a repository URL and specific tag. section 5.1.2
  • Download modules before configuration code imports them, replacing local-path dependencies. section 5.1.2
  • Reuse consistent modules across development and production environments, reducing configuration drift. section 5.1.2
Listing 5.2 Python requirements.txt references module repositories
-e git+https://github.com/joatmon08/gcp-tags-module.git@1.0.0#egg=tags         #1
-e git+https://github.com/joatmon08/gcp-network-module.git@1.0.0#egg=network   #2
-e git+https://github.com/joatmon08/gcp-server-module.git@0.0.1#egg=server     #2
-e git+https://github.com/joatmon08/gcp-database-module.git@1.0.0#egg=database #2

Shows requirements.txt entries that pin infrastructure modules to tagged repository versions. section 5.1.2

Installing repository modules

Running pip install -r requirements.txt obtains the tagged tags, network, server, and database modules, making them available for infrastructure imports. section 5.1.2

How Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform covers it

How deep it goes
Explains requirements, installation, and imports, but defers detailed testing and environment practices.
Examples
Uses requirements.txt, pip installation, tagged Git repositories, and imports for network, server, database, and tagging modules.
What it assumes
Assumes Python-based configuration and version-control repositories; teaches retrieval before module import.
What you can do after
Operate/configure Python’s package manager to install tagged infrastructure modules before importing them into environment configurations.
How it connects
Connects multi-repository structure with version control, reusable modules, reproducibility, composability, and environment drift.

Also explained in

Compare how 4 books explain package manager →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform. The section links point to the parts of the book it draws on.