'Install certificate
:param list domains: list of domains to install the certificate
:param str privkey_path: path to certificate private key
:param str cert_path: certificate file path (optional)
:param str chain_path: chain file path'

def deploy_certificate(self, domains, privkey_path, cert_path, chain_path, fullchain_path):

    if (self.installer is None):
        logger.warning('No    installer    specified,    client    is    unable    to    deploythe    certificate')
        raise errors.Error('No    installer    available')
    chain_path = (None if (chain_path is None) else os.path.abspath(chain_path))
    msg = 'Unable    to    install    the    certificate'
    with error_handler.ErrorHandler(self._recovery_routine_with_msg, msg):
        for dom in domains:
            self.installer.deploy_cert(domain=dom, cert_path=os.path.abspath(cert_path), key_path=os.path.abspath(privkey_path), chain_path=chain_path, fullchain_path=fullchain_path)
            self.installer.save()
        self.installer.save('Deployed    ACME    Certificate')
    msg = 'We    were    unable    to    install    your    certificate,    however,    we    successfully    restored    your    server    to    its    prior    configuration.'
    with error_handler.ErrorHandler(self._rollback_and_restart, msg):
        self.installer.restart()
