Administrative processes
Run admin/management tasks as one-off processes.
- As the process formation facilitates normal operation, engineers often need to do one-off administrative maintenance:
- Database migrations.
- Getting a console to the app to inspect its state or mutate data.
- Running one-time maintenance scripts.
- These processes should run in an identical environment to long-running processes of the app.
- Against a release, using the same Codebase and Configuration.
- Admin code must ship with application code.
- Dependency isolation should be used on all process types.
- Java:
- Use a consistent classpath
- Javascript:
- p.r.comp.lang.php (Private):
- Use the same p.r.comp.lang.php.util.build.compose (Private) autoloader
- p.r.comp.lang.python (Private):
- Use the same p.r.comp.lang.python.util.build.virtualenv (Private)
- p.r.comp.lang.ruby (Private):
- p.r.comp.lang.rust (Private):
- Statically-linked, baby
- Java:
- Favour languages with a REPL that make it easy to run one-off scripts:
- Locally, by directly kicking off processes in the checkout using shell commands.
- In production, via remote access software like SSH or SaltStack.
References
Backlinks