certdeploy.server package¶
Subpackages¶
- certdeploy.server.config package
- Submodules
- certdeploy.server.config.client module
ClientConnectionClientConnection.addressClientConnection.domainsClientConnection.hashClientConnection.needs_chainClientConnection.needs_fullchainClientConnection.needs_privkeyClientConnection.pathClientConnection.portClientConnection.pubkeyClientConnection.pubkey_blobClientConnection.push_retriesClientConnection.push_retry_intervalClientConnection.username
- certdeploy.server.config.server module
PushModeServerServer.client_config_directoryServer.client_configsServer.fail_fastServer.join_timeoutServer.log_filenameServer.log_levelServer.privkey_filenameServer.push_intervalServer.push_modeServer.push_retriesServer.push_retry_intervalServer.queue_dirServer.renew_argsServer.renew_atServer.renew_everyServer.renew_execServer.renew_timeoutServer.renew_unitServer.sftp_auth_timeoutServer.sftp_banner_timeoutServer.sftp_log_filenameServer.sftp_log_levelServer.sftp_tcp_timeout
- Module contents
Submodules¶
certdeploy.server.renew module¶
Functions for renewing certs with certbot.
- certdeploy.server.renew.renew_certs(config: ServerConfig)[source]¶
Run the command to renew certificates.
- Parameters:
config – The CertDeploy server config.
- Raises:
CertDeployError – If the renewal command returns non-zero and config.fail_fast is True
certdeploy.server.server module¶
CertDeploy Server daemon and SFTP parts.
- class certdeploy.server.server.PushWorker(server: Server, client: ClientConnection, config: ServerConfig)[source]¶
Bases:
ThreadA worker thread to push lineages to a single client.
- class certdeploy.server.server.Queue(server: ServerConfig, mode: str = 'r')[source]¶
Bases:
objectA queue of push jobs.
- append(client_hash: str, lineage: str)[source]¶
Append a job (lineage) to the queue for a given client.
- Parameters:
client_hash – The value of ClientConnection.hash for the client that needs the update.
lineage – The lineage path that needs syncing to the client.
- count(client_hash: str) int[source]¶
Return the number of lineages left to push for the given client.
- get(client_hash: str, default: Any = None) list[str][source]¶
Get a list of lineages that need to be pushed to a client.
- Parameters:
client_hash – The value of ClientConnection.hash for the client being requested.
default – This will be returned when no client matching client_hash is found. Defaults to None.
- Returns:
A list of lineages that need to be pushed for the given client.
- load()[source]¶
Load the queue from the path configured with queue_dir.
This won’t load a file that is open for writing.
- class certdeploy.server.server.Server(config: ServerConfig)[source]¶
Bases:
objectAccept new sync requests and push new certs to clients.