Installing Certbot via pip3

Hi Folks,

I’m trying to standardize a certbot install in a mixed linux environment (e.g. ubuntu, centos, amazon linux etc), and I’ve landed to do everything using pip3 (for various technical reasons this was the only method that resulted in a clean install vs using the local package managers). Starting with Centos 7, I’ve installed the certbot-dns-route53 package, which is installed + configured correctly. The only issue is I noticed a “cron” or “system timer” isn’t setup automatically at all. Does anyone know if there is a way to automate this by inserting some parameter doing the install process? If not, it appears I have to setup a cron doing the package install (e.g. “00 3 30 * * /usr/local/bin/certbot renew --dns-route53”), which is fine, but just wanted to see what the community recommends. Again, I noticed the renewal is baked into the config, but I don’t see any entry to renewing at the system level.

The version of my client is certbot 1.7.0.

Thanks,
Col.

No, but I believe it’s on a feature roadmap for Certbot to create/manage its own scheduled task.

I suppose the advice written for packagers applies to you (https://certbot.eff.org/docs/packaging.html):

If you’d like to include automated renewal in your package certbot renew -q should be added to crontab or systemd timer. Additionally you should include a random per-machine time offset to avoid having a large number of your clients hit Let’s Encrypt’s servers simultaneously.

You could also take a hint from the way Fedora and Debian create their Certbot package (cron and systemd timers).

This is not a supported method of installation, though I understand why you have chosen to do it anyway. certbot-auto is basically pip+virtualenv, though it is being slowly deprecated as the transition to snaps is made. Make sure to use pip3 inside a virtual environment - less likely to blow up your system’s Python packages that way.

So the only officially supported method is to use the local package managers, and not pip3? I would use them for centos 7, however, I’m receiving dependency problems with centos 7 when using “yum install certbot”:

Error: Package: python2-certbot-1.6.0-1.el7.noarch (epel)
Requires: python-zope-interface
Error: Package: 1:python-zope-component-4.1.0-5.el7.noarch (epel)
Requires: python-zope-interface
You could try using --skip-broken to work around the problem

I’ve tried using “–setopt=obsoletes=0” and still not luck.

It’s up to you, but it’s not a supported installation method for end-users, because there’s some dangers and caveats.

Weird. On a fresh CentOS 7 machine, just this should work:

yum -y install epel-release
yum -y install certbot

python-zope-interface comes from the base CentOS 7 repos.

Have you made any other changes to your package manager configuration?

negative. I’ve already done the above several times which led to me using pip3. here’s the output:

[root@ip-10-223-0-4 yum.repos.d]# yum install epel-release

Loaded plugins: amazon-id, search-disabled-repos

Package epel-release-7-12.noarch already installed and latest version

Nothing to do

[root@ip-10-223-0-4 yum.repos.d]# yum install certbot

Loaded plugins: amazon-id, search-disabled-repos

Resolving Dependencies

–> Running transaction check

—> Package certbot.noarch 0:1.6.0-1.el7 will be installed

–> Processing Dependency: python2-certbot = 1.6.0-1.el7 for package: certbot-1.6.0-1.el7.noarch

–> Running transaction check

—> Package python2-certbot.noarch 0:1.6.0-1.el7 will be installed

–> Processing Dependency: python-parsedatetime >= 1.3 for package: python2-certbot-1.6.0-1.el7.noarch

–> Processing Dependency: python2-acme >= 1.6.0 for package: python2-certbot-1.6.0-1.el7.noarch

–> Processing Dependency: python2-configargparse >= 0.9.3 for package: python2-certbot-1.6.0-1.el7.noarch

–> Processing Dependency: python2-cryptography >= 1.2.3 for package: python2-certbot-1.6.0-1.el7.noarch

–> Processing Dependency: python2-distro >= 1.0.1 for package: python2-certbot-1.6.0-1.el7.noarch

–> Processing Dependency: python2-josepy >= 1.1.0 for package: python2-certbot-1.6.0-1.el7.noarch

–> Processing Dependency: python-zope-component for package: python2-certbot-1.6.0-1.el7.noarch

–> Processing Dependency: python-zope-interface for package: python2-certbot-1.6.0-1.el7.noarch

–> Processing Dependency: python2-mock for package: python2-certbot-1.6.0-1.el7.noarch

–> Processing Dependency: python2-pyrfc3339 for package: python2-certbot-1.6.0-1.el7.noarch

–> Processing Dependency: pytz for package: python2-certbot-1.6.0-1.el7.noarch

–> Running transaction check

—> Package python-zope-component.noarch 1:4.1.0-5.el7 will be installed

–> Processing Dependency: python-zope-event for package: 1:python-zope-component-4.1.0-5.el7.noarch

–> Processing Dependency: python-zope-interface for package: 1:python-zope-component-4.1.0-5.el7.noarch

—> Package python2-acme.noarch 0:1.6.0-1.el7 will be installed

–> Processing Dependency: python-ndg_httpsclient for package: python2-acme-1.6.0-1.el7.noarch

–> Processing Dependency: python-requests-toolbelt for package: python2-acme-1.6.0-1.el7.noarch

–> Processing Dependency: python2-pyasn1 for package: python2-acme-1.6.0-1.el7.noarch

–> Processing Dependency: python2-six for package: python2-acme-1.6.0-1.el7.noarch

—> Package python2-certbot.noarch 0:1.6.0-1.el7 will be installed

–> Processing Dependency: python-zope-interface for package: python2-certbot-1.6.0-1.el7.noarch

—> Package python2-configargparse.noarch 0:0.11.0-2.el7 will be installed

—> Package python2-cryptography.x86_64 0:1.7.2-2.el7 will be installed

–> Processing Dependency: python-idna >= 2.0 for package: python2-cryptography-1.7.2-2.el7.x86_64

–> Processing Dependency: python-cffi >= 1.4.1 for package: python2-cryptography-1.7.2-2.el7.x86_64

–> Processing Dependency: python-enum34 for package: python2-cryptography-1.7.2-2.el7.x86_64

—> Package python2-distro.noarch 0:1.2.0-3.el7 will be installed

—> Package python2-josepy.noarch 0:1.3.0-2.el7 will be installed

—> Package python2-mock.noarch 0:1.0.1-10.el7 will be installed

—> Package python2-parsedatetime.noarch 0:2.4-6.el7 will be installed

–> Processing Dependency: python2-future for package: python2-parsedatetime-2.4-6.el7.noarch

—> Package python2-pyrfc3339.noarch 0:1.1-3.el7 will be installed

—> Package pytz.noarch 0:2016.10-2.el7 will be installed

–> Running transaction check

—> Package python-cffi.x86_64 0:1.6.0-5.el7 will be installed

–> Processing Dependency: python-pycparser for package: python-cffi-1.6.0-5.el7.x86_64

—> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed

—> Package python-idna.noarch 0:2.4-1.el7 will be installed

—> Package python-ndg_httpsclient.noarch 0:0.3.2-1.el7 will be installed

—> Package python-requests-toolbelt.noarch 0:0.8.0-3.el7 will be installed

—> Package python-zope-component.noarch 1:4.1.0-5.el7 will be installed

–> Processing Dependency: python-zope-interface for package: 1:python-zope-component-4.1.0-5.el7.noarch

—> Package python-zope-event.noarch 0:4.0.3-2.el7 will be installed

—> Package python2-certbot.noarch 0:1.6.0-1.el7 will be installed

–> Processing Dependency: python-zope-interface for package: python2-certbot-1.6.0-1.el7.noarch

—> Package python2-future.noarch 0:0.18.2-2.el7 will be installed

—> Package python2-pyasn1.noarch 0:0.1.9-7.el7 will be installed

—> Package python2-six.noarch 0:1.9.0-0.el7 will be installed

–> Running transaction check

—> Package python-pycparser.noarch 0:2.14-1.el7 will be installed

–> Processing Dependency: python-ply for package: python-pycparser-2.14-1.el7.noarch

—> Package python-zope-component.noarch 1:4.1.0-5.el7 will be installed

–> Processing Dependency: python-zope-interface for package: 1:python-zope-component-4.1.0-5.el7.noarch

—> Package python2-certbot.noarch 0:1.6.0-1.el7 will be installed

–> Processing Dependency: python-zope-interface for package: python2-certbot-1.6.0-1.el7.noarch

–> Running transaction check

—> Package python-ply.noarch 0:3.4-11.el7 will be installed

—> Package python-zope-component.noarch 1:4.1.0-5.el7 will be installed

–> Processing Dependency: python-zope-interface for package: 1:python-zope-component-4.1.0-5.el7.noarch

—> Package python2-certbot.noarch 0:1.6.0-1.el7 will be installed

–> Processing Dependency: python-zope-interface for package: python2-certbot-1.6.0-1.el7.noarch

–> Finished Dependency Resolution

Error: Package: python2-certbot-1.6.0-1.el7.noarch (epel)

Requires: python-zope-interface

Error: Package: 1:python-zope-component-4.1.0-5.el7.noarch (epel)

Requires: python-zope-interface

You could try using --skip-broken to work around the problem

You could try running: rpm -Va --nofiles --nodigest

Sure, I understand. What I meant to say was, on a totally fresh CentOS 7 installation, the instructions do work. So some other intermediate action is causing the breakage.

There is a slightly annoying debugging approach that you can use to identify what the cause of the problem is. That is to just try install the individual package which is refusing to install:

yum -y install python-zope-interface

if it complains about yet another package, try that one. Eventually you will hit a dead end, which will reveal what the true error is.

Yeah…I did all the traces and still ran into issues. I ended up installing a brand new vagrant box using centos7, and I was able to install certbot, however, there are a issues with python again after I installed the route53 dns plugin. Looks like it is a known issue being tracked here: https://bugzilla.redhat.com/show_bug.cgi?id=1834529

Looks like I’ll be using pip3 for the installation, at least for Centos7.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.