Basic virtualenv bootstrap script for end users.

This commit is contained in:
Jakub Warmuz 2015-10-14 18:19:10 +00:00
parent 63d76ed21e
commit 3f942d7426
No known key found for this signature in database
GPG key ID: 2A7BAD3A489B52EA
2 changed files with 38 additions and 9 deletions

35
bootstrap/venv.sh Executable file
View file

@ -0,0 +1,35 @@
#!/bin/sh -e
#
# Installs and updates letencrypt virtualenv
#
# USAGE: source ./dev/venv.sh
XDG_DATA_HOME=${XDG_DATA_HOME:-~/.local/share}
VENV_NAME="letsencrypt"
VENV_PATH=${VENV_PATH:-"$XDG_DATA_HOME/$VENV_NAME"}
# virtualenv call is not idempotent: it overwrites pip upgraded in
# later steps, causing "ImportError: cannot import name unpack_url"
if [ ! -d $VENV_PATH ]
then
virtualenv --no-site-packages --python python2 $VENV_PATH
fi
. $VENV_PATH/bin/activate
pip install -U setuptools
pip install -U pip
# TODO: install apache and nginx plugins by default?
# --pre is not necessary for dev releases in more recent pip versions
pip install -U letsencrypt letsencrypt-apache letsencrypt-nginx
echo
echo "Congratulations, Let's Encrypt has been successfully installed/updated!"
echo
echo -n "Your prompt should now be prepended with ($VENV_NAME). Next "
echo -n "time, if the prompt is different, 'source' this script again "
echo -n "before running 'letsencrypt'."
echo
echo
echo "You can now run 'letsencrypt --help'."

View file

@ -122,15 +122,9 @@ bash``.
Installation
============
.. "pip install acme" doesn't search for "acme" in cwd, just like "pip
install -e acme" does; `-U setuptools pip` necessary for #722
.. code-block:: shell
virtualenv --no-site-packages -p python2 venv
./venv/bin/pip install -U setuptools
./venv/bin/pip install -U pip
./venv/bin/pip install -r requirements.txt acme/ . letsencrypt-apache/ letsencrypt-nginx/
source ./bootstrap/venv.sh
.. warning:: Please do **not** use ``python setup.py install``. Please
do **not** attempt the installation commands as
@ -148,13 +142,13 @@ To get a new certificate run:
.. code-block:: shell
sudo ./venv/bin/letsencrypt auth
(letsencrypt)$ letsencrypt auth
The ``letsencrypt`` commandline tool has a builtin help:
.. code-block:: shell
./venv/bin/letsencrypt --help
(letsencrypt)$ letsencrypt --help
Configuration file