
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
batou_ext
master is now supporting Python3 and is depending on batou2. If you still want to use batou_ext with batou 1.x running Python2 you still can use the batou1-py2 branch.
To add batou_ext
to your deployment, add a like to the requirements.txt
of your batou deployment::
batou_ext>=2.4
Changes should be accompanied with a changelog entry. Use ./changelog.sh
to create one.
Releasing will create a tag and publishes the package to pypi. Use ./release-this.sh
to create a release.
Only applicable for administrators of the Flying Circus.
Install the s3-bootstrap
feature:
batou_ext[s3-bootstrap]>=2.4.6
Then run
./appenv update-lockfile
./appenv run s3_bootstrap
The script will interactively walk you through the creation of creating an S3 bucket and - if needed - an access keypair and lifecycle rules.
On an activated virtualenv this can be tested with python -m batou_ext.s3_bootstrap
.
user@uid.service
wait until all containers have exited and clear /tmp
of containers.
Without those, unclean shutdowns were observed that prevented the containers from getting back
up on a reboot.nix.UserEnv
components to ignore collisions between file names from different derivations or outputs of the same derivationbatou_ext.oci.Container
: set backend
explicitly in Nix expression.
Otherwise this depends on the state version having varying results depending on whether the machine was installed with a NixOS older or newer than 22.05.
batou_ext.oci.Container
: allow to use podman
as backend instead of docker
.
This also enables the following features:
Rootless containers: by setting the user
option to a different user. By default,
the service user of the deployment is used.
Only mark services as active
if the container is up. This requires that the
container has a healthcheck. Alternatively, a healthcheck can be configured
with the health_cmd attribute.
batou_ext.file.SymlinkAndCleanup
: add option etag_suffix
.
This contains a suffix that each symlinked file may have.
For instance, when doing SymlinkAndCleanup
on a file downloaded with
batou_ext.s3.Download
, the pattern *.tar.gz
doesn't clean up the
.etag
files. However, *.tar.gz*
(or an equivalent) would also remove
the etag files of the files that are symlinked to current
& last
.
.nix
file created by batou_ext.file.DeploymentTrash
.Fix interactive version select.
Change the releaser defaults to actually release
Correctness fix for jenkins set-version
: if a tag is resolved, make sure it's always
resolved to the rev of the tagged commit (instead of the tag's rev) or fail hard to avoid
incorrect revs.
Improve documentation of batou_ext.file.DeploymentTrash
nixos.NixOSModule: Mark generated context file as sensitive (Fixes #167)
add an env argument for the Run
component to support running commands with specific environment variables
The component batou_ext.python.FixELFRunPath
now uses a patched version of patchelf to make sure that the
dynamic libraries don't get larger per deploy.
When a certain threshold is exceeded, Python will fail to import these.
If the component got regularly executed in deployments, you may want to consider recreating the virtualenv once.
batou_ext.systemd.ScalableService
has been added. This provides configurations
for a service that can exist multiple times (e.g. queue consumers). Detailed usage instructions
and further information can be found in the component's docstring.A new component batou_ext.mail.Mailpit
has been added.
Mailpit is an alternative for Mailhog which is not maintained anymore.
fix a mysterious regression that cause a test to fail
redis.Redis: Allow to set provide name
The SymlinkAndCleanup
internally uses the DeploymentTrash
component internally which
deletes old code using systemd-tmpfiles
and throttles the operation with IOReadIOPSMax
and IOWriteIOPSMax
.
This didn't have any effect before because these settings were wrongly placed in [Unit]
instead of [Service]
.
ssl.Certificate
: Set proper ACL for non-let's encrypt certificates.ssl.Certificate
during ceritificate renewal.ssl.Certificates
on certificate renew.oci.Container
: Add option to disable OCI container monitoring.
This is mainly useful for containers which are not running all the time.
oci.Container
: make rebuild optional
This is useful, when there are multiple container deployed which should be activated at once.
Fix a bug in the version update script where multiple environments sharing the same branch would not be updated correctly
the SymlinkAndCleanup
component was adjusted to clean up asynchronously using systemd's tmpfiles instead of deleting all candidates immediately
oci.Container: Fix a bug where containers were not restarted properly even though their image digest was out of sync after the remote tag has been updated
oci.Container: Fix a typo in the oci container component's verify method
batou_ext.python.FixELFRunPath
: search not only env_directory
, but also its subdirs for C libraries needed by the libraries to patch.
Fix PurgePackage
raising error when package is not found.
The attribute public_smtp_name
of batou_ext.mail.Mailhog
now has a default value. It points to self.host.fqdn
.
adjust the certificate expiry check output to be more easily parseable
batou_ext.python.FixELFRunPath
which modifies DT_RUNPATH
& DT_RPATH
of .so
-files in a venv to load the correct libraries (from either a Nix env or other Python libraries). Please read the docstring carefully before using it.OCI: cache validation result during deployment.
Caching results speeds up deployments where multiple containers with the same image are deployed.
batou_ext.http.HTTPServiceWatchdog
that adds a check to a systemd unit
whether a given URL is reachable (e.g. a /health
endpoint). If the URL cannot be reached within
a certain interval, the service will be restarted. Further details are documented in the
docstring.SymlinkAndCleanup
async delete and allow custom extra arguments to systemd run
.OCI: Support registries where the docker login is different than the registry used in referencing containers.
OCI: Improve change detection of remote images (required for docker.io)
OCI: The nix file does not contain sensitive data, so don’t mark it as such.
OCI: add support for extraOptions
s3_bootstrap
that interactively creates an S3 bucket (including a radosgw account & keys if needed). Will be installed with batou_ext
if the s3-bootstrap
extra is requested.add an option to move mailhog log output (stdout
+ stderr
) to a different namespace, e.g. "mailhog". see systemd.exec(5) for more information
add an option to disable stdout
logging for the mailhog service
improve dectection of a versions file for versions updates
fix the oci.Container verify method not throwing an updaterequired on changes to the docker container's environment file
Add systemd-run async cleanup option for SymlinkAndCleanup removals
batou_ext.git.Remote
which allows to manipulate remotes of a git repository.PurgePackage
component. Will not appear like a fatal error in logs anymore when the package has been purged already or is not installed for another reasonMake it possible to add arbitrary additional configuration to a service created by a SystemdTimer()
.
Add nixos.NixOSModule
to inject component attributes into .nix files.
*.md
to the release, so it can actually be used.FAQs
A library of components for batou.
We found that batou-ext demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.