GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - stryan/materia: GitOps tool for deploying Quadlets

BranchesTags
Open more actions menu

Latest commit

 

History

607 Commits
607 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitea/workflows
.gitea/workflows
 
 
.github
.github
 
 
cmd/materia
cmd/materia
 
 
docs
docs
 
 
install
install
 
 
internal
internal
 
 
pkg
pkg
 
 
scripts
scripts
 
 
virter
virter
 
 
.gitignore
.gitignore
 
 
.golangci.yml
.golangci.yml
 
 
.mockery.yml
.mockery.yml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Containerfile.build
Containerfile.build
 
 
Containerfile.ci
Containerfile.ci
 
 
Containerfile.test
Containerfile.test
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
ROADMAP.md
ROADMAP.md
 
 
cosign.pub
cosign.pub
 
 
diagram.md
diagram.md
 
 
fnox.toml
fnox.toml
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
materia_logo.png
materia_logo.png
 
 
mise.ci.lock
mise.ci.lock
 
 
mise.ci.toml
mise.ci.toml
 
 
mise.lock
mise.lock
 
 
mise.toml
mise.toml
 
 
mise.virter.toml
mise.virter.toml
 
 

Repository files navigation

Materia Logo Materia

Chat on Matrix

A GitOps tool for managing services and applications deployed as Podman Quadlets.

Materia makes managing Podman containers easy: just install the single binary or run the container on your host, point it at a Git repository or OCI image containing your desired state, and Materia will keep everything in sync.

The general workflow looks like this:

  1. Materia syncs with a remote source, downloading a manifest that describes what components are assigned to the host.
  2. It installs new Quadlets and data files or updates existing ones, optionally templating them from age, sops, and other engines.
  3. It starts, stops, and restarts systemd services based on which files changed.
  4. When a component is no longer assigned to a host, Materia stops the related services and removes the now unnecessary files.

Want more details on how it works? See the materia update workflow diagram. Ready to run it yourself? Try the Quickstart guide or read on.

Documentation

Main Documentation site: primamateria.systems

Online Manpages: latest

Example Materia Repository: here

Example Materia Component: dnsmasq component here

Installation

Requirements

The following are run time requirements and reflect what systems Materia is tested on. It may work without the specified versions (especially the systemd requirement).

Materia will not work with Podman versions lower than 4.4, as that is the version Quadlets were introduced in.

  • Podman 5.4 or higher
  • Systemd v254 or higher
  • AMD64 or ARM64 architecture

Materia supports running both root and rootless quadlets, however currently root is the more tested pathway.

Note: When running in a container Materia uses the Podman remote API; therefore some features may be limited by the host's Podman API version (i.e. the container may have Podman 5.8 but if the host is 5.3 you can't use volume backups).

If you are using dbus locking with dbus-broker, you will need to install the ./install/systems.primamateria.materia.conf config file.

From source

Build from source using mise build. By default this will generate binaries for amd64 and arm64.

If you'd like to build without mise, you can do so through the normal go methods such as: go build -ldflags="-w -s" -o bin/materia-arm64 ./cmd/materia/

From Binary

Grab a release tarball for your architecture from the releases page; both amd64 and arm64 are supported.

With Podman

For obvious reasons, materia should only be run using podman as your container engine.

By default it is assumed you are running using root. If not, you'll need to update the bind mounts to their appropriate locations; see the manual for more details. By default materia uses XDG_DIR settings in rootless mode.

These volume mounts are exhaustive for teaching purposes.

podman run --name materia --rm \
	--hostname <system_hostname> \
	--network host \
	--security-opt label=disable \ # optional, depending on OS security settings
	-v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket \ # needed to manage systemd units
	-v /run/podman/podman.sock:/run/podman/podman.sock \ # needed to get container status
	-v /var/lib/materia:/var/lib/materia \ # Where materia stores its source cache and component data
	-v /etc/containers/systemd:/etc/containers/systemd \ # needed to install Quadlets
	-v /usr/local/bin:/usr/local/bin \ # customizable, change to where ever you want scripts to be installed to
	-v /etc/systemd/system:/etc/systemd/system \ # Needed to manage services, can also use /usr/local/lib/systemd/system/
	-v /etc/materia/known_hosts:/root/.ssh/known_hosts:ro \ #Optional, used for git+ssh checkouts
	-v /etc/materia/key.txt:/etc/materia/key.txt \ #Optional, used for age decryption
	-v /etc/materia/materia_key:/etc/materia/materia_key \ # Optional, used for git+ssh checkouts
	--env MATERIA_AGE__KEYFILE=/etc/materia/key.txt \
	--env MATERIA_SOURCE__KIND="git" \
	--env MATERIA_SOURCE__URL=https://github.com/stryan/materia_example_repo \
	ghcr.io/stryan/materia:stable update

Note that some security settings may need to be adjusted based off your distro. For example, systems using AppArmor may require PodmanArgs=--security-opt=apparmor=unconfined.

See install for example Quadlets.

Available tags

stable: Use the latest tagged release.

v: Specific tagged release.

latest: Latest push to master that passes integration tests.

Validating Installations

Container images and binaries are signed with Cosign starting with v0.8. The latter attaches signed signature bundles on each release.

The cosign public key is available at ./cosign.pub and on the main project website.

Contributing

Questions or bug reports are welcome! Please start a Discussion versus opening an Issue, as Materia does bug tracking outside of Github using git-bug. You can also submit bugs/suggestions or ask questions in the Matrix room.

For submitting features/bugfixes/code-in general via merge requests, please see the Contribution guide.

About

GitOps tool for deploying Quadlets

primamateria.systems

Topics

configuration-managementcontainerscontinuous-deliverygitopspodmanquadlets

Resources

Readme
GPL-3.0 license

Contributing

Contributing
Activity

Stars

225 stars

Watchers

3 watching

Forks

10 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.