Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pip instructions #698

Merged
merged 23 commits into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6777d34
Add pip instructions (barring DNS instructions fixes)
ohemorange Feb 25, 2021
e18fde4
fix typo
ohemorange Feb 25, 2021
e133999
use new id since pip is already in use
ohemorange Feb 25, 2021
61ee800
Fix non-DNS instructions
ohemorange Feb 25, 2021
b9d27ab
streamline instructions and start on DNS instructions
ohemorange Feb 25, 2021
48705aa
add symlink so DNS instructions work
ohemorange Feb 25, 2021
15f8bf5
Clean up instructions even more, including using terms from context
ohemorange Feb 25, 2021
7ea8434
Use python instead of python3
ohemorange Mar 1, 2021
1489304
Update _scripts/instruction-widget/templates/install/pip.html
ohemorange Mar 1, 2021
d8b2b32
Update _scripts/instruction-widget/templates/install/pip.html
ohemorange Mar 1, 2021
fea8794
Update _scripts/instruction-widget/templates/install/pip.html
ohemorange Mar 1, 2021
9166b43
Remove third-party plugin instructions
ohemorange Mar 1, 2021
d9bacf2
move upgrade instructions to after confirming certbot worked
ohemorange Mar 1, 2021
1f57af6
Remove other mentions of dev/devel
ohemorange Mar 1, 2021
3170bab
encourage people to uninstall and certbot os packages
ohemorange Mar 1, 2021
a6205f5
more strongly suggest people keep cb up to date
ohemorange Mar 1, 2021
f753f9f
improve readability of system dep installation instructions
ohemorange Mar 1, 2021
2d6f6ce
tt is deprecated. I'm not fixing the whole site right now but new cod…
ohemorange Mar 1, 2021
bb002f2
remove unnecessary redhat-rpm-config
ohemorange Mar 1, 2021
3b891c3
remove automatic updates line
ohemorange Mar 3, 2021
f53d1d1
put RHEL notes in full sentences
ohemorange Mar 3, 2021
1b8f049
add dns plugin and sudo to installation instructions
ohemorange Mar 3, 2021
c7a13e8
streamline and rename dropdowns and uris
ohemorange Mar 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion _scripts/instruction-widget/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,9 @@ module.exports = function(context) {
}
context.dns_plugins = true;
context.dns_package_prefix = "certbot-dns";
context.python_name = "/opt/certbot/bin/python3";
context.python_name = "/opt/certbot/bin/python";
context.original_certbot_location = "/opt/certbot/bin";
context.upgrade_instructions = true;
}

// This function is currently unused, but we keep it around to make it easy
Expand Down
14 changes: 14 additions & 0 deletions _scripts/instruction-widget/templates/getting-started/renewal.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,17 @@
look for the lock icon in the URL bar.
</p>
</li>

{{#upgrade_instructions}}
<li>
[Monthly] Upgrade certbot
<p>It's important to occasionally update Certbot to keep it up-to-date. To do this, run the
following command on the command line on the machine.
<pre class="no-before"><ol>
<li>{{install_command}} --upgrade {{package}}</li></ol></pre>
</p>

<p>If this step leads to errors, run <code>rm -rf /opt/certbot</code> and repeat all installation instructions.</p>
<p>For automatic upgrades, the command in this step can be run by a monthly cron job.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally think we should delete this sentence. In our top level discussion, we decided not to give people the command to do this since we're not sure it's reliable enough. If we have concerns about it, I don't think we should suggest it at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

</li>
{{/upgrade_instructions}}
62 changes: 32 additions & 30 deletions _scripts/instruction-widget/templates/install/pip.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ <h3>Partial support</h3>
<li>
Install system dependencies

<p>System dependencies may include Python 3.6+, including venv (this might be called <code>python3-dev</code>,
<code>python3-devel</code>, or <code>python3-venv</code>) and Augeas for the Apache
<p>System dependencies may include Python 3.6+, including venv (this might be called <code>python3</code>,
<code>python3</code>, or <code>python3-venv</code>) and Augeas for the Apache
plugin (<code>libaugeas0</code> or <code>augeaslibs</code>).</p>

<p>If you're having trouble installing cryptography, you may need to install additional
Expand All @@ -23,21 +23,43 @@ <h3>Partial support</h3>
the cryptography project's site</a> for more infoformation.</p>

<p>Commands to install system dependencies may look like the following, run on the command
line on the machine:
<pre class="no-before"><ol><li># For APT-based distributions (e.g. Debian, Ubuntu ...)</li>
line on the machine.</p>
<p>For APT-based distributions (e.g. Debian, Ubuntu ...):
<pre class="no-before"><ol>
<li>sudo apt update</li>
<li>sudo apt install python3-dev python3-venv libaugeas0</li>
<li># For RPM-based distributions (e.g. Fedora, CentOS ...)</li>
<li># NB1: old distributions will use yum instead of dnf</li>
<li># NB2: RHEL-based distributions use python3X-devel instead of python3-devel (e.g. python36-devel)</li>
<li>sudo dnf install python3-devel augeas-libs redhat-rpm-config</li></ol></pre>
<li>sudo apt install python3 python3-venv libaugeas0</li>
</ol></pre>
</p>
<p>For RPM-based distributions (e.g. Fedora, CentOS ...):
<br>NB1: old distributions will use yum instead of dnf
<br>NB2: RHEL-based distributions use <code>python3X</code> instead of <code>python3</code>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I personally think this "NB#: ..." text from https://certbot.eff.org/docs/contributing.html#running-a-local-copy-of-the-client looks kind of sloppy here. If you agree, can we reformat this maybe as a note with more or less complete sentences? If you disagree, feel free to leave it as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, will give it a try.

(e.g. <code>python36</code>)
<pre class="no-before"><ol>
<li>sudo dnf install python3 augeas-libs</li></ol></pre>
</p>

<p>These packages may have slightly different names on other distributions; a search such as
"augeas on &lt;your_system_name&gt;" will probably yield helpful results.</p>
</li>
<li>
Set up a venv
Remove certbot-auto and any Certbot OS packages
<p>
If you have any Certbot packages installed using an OS package manager like
<code>apt</code>, <code>dnf</code>, or <code>yum</code>, you should remove them before
installing the Certbot snap to ensure that when you run the command
<code>certbot</code> the snap is used rather than the installation from your OS
package manager. The exact command to do this depends on your OS, but
common examples are <code>sudo apt-get remove certbot</code>, <code>sudo dnf
remove certbot</code>, or <code>sudo yum remove certbot</code>.
</p>
<p>
If you previously used Certbot through the certbot-auto script, you should
also remove its installation by following the instructions <a
href="/docs/uninstall.html">here</a>.
</p>
</li>
<li>
Set up a Python virtual environment
<p>
Execute the following instructions on the command line on the machine to set up a virtual
environment.
Expand All @@ -51,16 +73,6 @@ <h3>Partial support</h3>
{{> installcertbot}}
ohemorange marked this conversation as resolved.
Show resolved Hide resolved
{{>preparecertbotsymlinkcommand}}

<li>
[Optional] Install any custom third-party plugins
<p>
If you use third-party plugins not created by the Certbot team, you can install them by
executing the following command on the command line on the machine.
<pre class="no-before"><ol>
<li>{{install_command}} &lt;other-plugins&gt;</li></ol></pre>
</p>
</li>


{{#advanced}}
{{#dns_plugins}}
Expand All @@ -69,13 +81,3 @@ <h3>Partial support</h3>

{{> dnspluginssetup}}

<li>
[Optional] Upgrade certbot
<p>When you're ready to upgrade certbot, run the following command on the command line on the machine.
<pre class="no-before"><ol>
<li>{{install_command}} --upgrade {{package}}</li></ol></pre>
</p>

<p>If this step leads to errors, run <code>rm -rf /opt/certbot</code> and repeat all installation instructions.</p>
<p>For automatic upgrades, the command in this step can be run by a monthly cron job.</p>
</li>