Comments (6)
Relevant code places:
- using supervisord will trigger a Service component (supervisord.py:227)
- the Service component is "Abstract" as it needs a platform-specific hookup with init.d or systemd
- batou_ext has the nixos platform integration: (https://github.com/flyingcircusio/batou_ext/blob/master/src/batou_ext/nix.py#L182)
- however, there is no way to pass in customizations AFAICT and IMHO restart=always should be the default anyways
from batou.
All uses of Service(...)
I can find already set systemd=dict(...Restart='always'...)
Setting this as default and mentioning it in the docs should be reasonable
from batou.
@sweh is interested in the fix for this
from batou.
customizing systemd service parameters works, as far as I can replicate; here is an example file that creates and modifies a systemd service with unit file modifications:
from batou.component import Component
from batou.lib.file import File
from batou.lib.service import Service
import batou_ext.nix
class Tick(Component):
def configure(self):
self += File(
"tick.sh",
mode="rwxr-xr-x",
content="""\
#!/bin/bash
while true; do
date
sleep 1
done
""",
)
self += Service("tick.sh", systemd=dict(
Restart="always",
Type="simple"
))
I will be setting Restart=always in a PR on batou_ext in a bit
from batou.
Not sure what is meant by customizing systemd parameters seems broken
from batou.
@sweh could you elaborate what's going wrong? Or is the code snippet enough to explain systemd behaviour on the fc nixos platform
from batou.
Related Issues (20)
- readme is outdated HOT 2
- Improve secret detection handling
- Allow consistency check to run offline (in CI)
- Provisioning lacks per host settings HOT 2
- Output component level error information
- JSONContent integration incomplete HOT 2
- add newline to .batou.json
- Multiple URLs with the same identities cause duplicated recipients in age encrypted secrets HOT 4
- Superfluous complicated message for long diffs + sensitive data
- User story for re-init git-bundle on remotes after history rewriting
- feature request: warn about untracked components on the remote side
- Better error message if batou is already running
- Feature request: Let batou return requested environment value in the commandline
- Allow only one batou deployment at a time
- Provide more SSH output if connection fails
- bootstrap script generates requirements.txt with very old batou version
- Long time to encrypt/decrypt age secret files HOT 1
- Update method `git-bundle` doesn't remove deleted files if `rsync` method was used before
- turn environment config into toml files HOT 1
- crashing on migrate when there is no environments folder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from batou.