|
|
#+PROPERTY: Effort_ALL 0 0:30 1:00 2:00 0.5d 1d 1.5d 2d 3d 4d 5d #+PROPERTY: Max_effort_ALL 0 0:30 1:00 2:00 0.5d 1d 1.5d 2d 3d 4d 5d #+PROPERTY: header-args:python :var filename=(buffer-file-name) #+PROPERTY: header-args:sh :var filename=(buffer-file-name) #+TODO: TODO WIP BLOCKED | DONE CANCELED #+LATEX_HEADER: \usepackage[margin=0.5in]{geometry} #+LaTeX_CLASS: article #+OPTIONS: H:8 ^:nil prop:("Effort" "Max_effort") tags:not-in-toc #+COLUMNS: %50ITEM %Effort(Min Effort) %Max_effort(Max Effort)
#+begin_LaTeX \hypersetup{ linkcolor=blue, pdfborder={0 0 0 0} } #+end_LaTeX
#+TITLE: Peertube charm management
#+LATEX: \pagebreak
Keep information related to the usage and the development of the charm.
#+LATEX: \pagebreak
#+LATEX: \pagebreak
* Todos
** TODO Logrotatability
Peertube uses ``winston`` nodejs logging mecanism, and has what I understand, hard-written transports to file:
Content of =server/helpers/logger.ts= #+BEGIN_SRC ts ... const logger = winston.createLogger({ level: CONFIG.LOG.LEVEL, format: winston.format.combine( labelFormatter, winston.format.splat() ), transports: [ new winston.transports.File({ filename: path.join(CONFIG.STORAGE.LOG_DIR, 'peertube.log'), handleExceptions: true, maxsize: 1024 * 1024 * 12, maxFiles: 5, format: winston.format.combine( winston.format.timestamp(), jsonLoggerFormat ) }), new winston.transports.Console({ handleExceptions: true, format: winston.format.combine( timestampFormatter, winston.format.colorize(), consoleLoggerFormat ) }) ], exitOnError: true })
#+END_SRC
This will ensure some part of the rotation. Which is bad.
We don't want peertube to manage the logs. So depending on what we want to do in the future with the managing of logs, I'll need to patch peertube to probably use only stdout, and/or send it to rsyslog.
For now, situation of log rotation with all charm is using logrotate, but I know this might not be the perfect solution as I'd like to stick to =logs are streams=, and avoid having to find mecanism of reloading application after rotation.
A good solution would be to use the stdout/stderr of the application, and have a generic solution using ``docker logs`` json output. ** TODO changing root password
This will probably require also a patch, as the password is set for user 'root' automatically and is to be read in the logs (duh !).
We can't initialise the application (and ask for postgres table, and root user to be created, then quit). So we can't do that in the =hooks/init= script in a reasonable manner.
There is a special ``npm run reset-password`` with odd arguments that can reset root password, only if database already populated.
I need a patch to simply set password from base server configuration.
|