minor adjustments

This commit is contained in:
kevgliss 2015-12-01 13:03:08 -08:00
parent 308f1b44c3
commit bafc3d0082
1 changed files with 20 additions and 20 deletions

View File

@ -21,11 +21,11 @@ Some basic prerequisites which you'll need in order to run Lemur:
be as generic as possible and are not intended to document every step of launching Lemur into a given environment.
Installing build dependencies
Installing Build Dependencies
-----------------------------
If installing Lemur on truely bare Ubuntu OS you will need to grab the following packages so that Lemur can correctly build it's
dependencies::
If installing Lemur on a bare Ubuntu OS you will need to grab the following packages so that Lemur can correctly build it's
dependencies:
.. code-block:: bash
@ -34,7 +34,7 @@ dependencies::
.. note:: PostgreSQL is only required if your database is going to be on the same host as the webserver. npm is needed if you're installing the Lemur source (e.g. from git).
Now, install Python ``virtualenv`` package::
Now, install Python ``virtualenv`` package:
.. code-block:: bash
@ -44,21 +44,21 @@ Now, install Python ``virtualenv`` package::
Setting up an Environment
-------------------------
In this guide Lemur will be installed in ``/www``, so you need to create that structure first::
In this guide Lemur will be installed in ``/www``, so you need to create that structure first:
.. code-block:: bash
$ sudo mkdir /www
$ cd /www
Clone Lemur inside this directory and give your user permission to write in it (assume your user is lemur here)::
Clone Lemur inside the just created directory and give yourself write permission (we assume lemur is the user):
.. code-block:: bash
$ sudo git clone https://github.com/Netflix/lemur
$ sudo chown -R lemur lemur/
Create the virtual environment, activate it and enter the Lemur's directory::
Create the virtual environment, activate it and enter the Lemur's directory:
.. code-block:: bash
@ -95,7 +95,7 @@ Before we run Lemur we must create a valid configuration file for it.
The Lemur cli comes with a simple command to get you up and running quickly.
Simply run::
Simply run:
.. code-block:: bash
@ -116,7 +116,7 @@ Once created you will need to update the configuration file with information abo
such as which database to talk to, where keys are stored etc..
.. note:: If you are unfamiliar with with the SQLALCHEMY_DATABASE_URI string it can be broken up like so:
postgresql://userame:password@databasefqdn:databaseport/databasename
postgresql://userame:password@<database-fqdn>:<database-port>/<database-name>
Setup Postgres
@ -125,14 +125,14 @@ Setup Postgres
For production a dedicated database is recommended, for this guide we will assume postgres has been installed and is on
the same machine that Lemur is installed on.
First, set a password for the postgres user. For this guide, we will use **lemur** as an example but you should use the database password generated for by Lemur::
First, set a password for the postgres user. For this guide, we will use **lemur** as an example but you should use the database password generated by Lemur::
$ sudo -u postgres psql postgres
# \password postgres
Enter new password: lemur
Enter it again: lemur
Type CTRL-D to exit psql once you have changed the password.
Once successful enter CTRL-D to exit the postgres shell.
Next, we will create our new database::
@ -140,14 +140,14 @@ Next, we will create our new database::
.. _InitializingLemur:
Set a password for lemur user inside Postgres:
Set a password for lemur user inside Postgres::
$ sudo -u postgres psql postgres
\password lemur
Enter new password: lemur
Enter it again: lemur
Again, type CTRL-D to exit psql.
Again, enter CTRL-D to exit the postgres shell.
Initializing Lemur
@ -184,7 +184,7 @@ See :ref:`Creating Notifications <CreatingNotifications>` and :ref:`Command Line
Setup a Reverse Proxy
---------------------
By default, Lemur runs on port 5000. Even if you change this, under normal conditions you won't be able to bind to
By default, Lemur runs on port 8000. Even if you change this, under normal conditions you won't be able to bind to
port 80. To get around this (and to avoid running Lemur as a privileged user, which you shouldn't), we need setup a
simple web proxy. There are many different web servers you can use for this, we like and recommend Nginx.
@ -192,7 +192,7 @@ simple web proxy. There are many different web servers you can use for this, we
Proxying with Nginx
~~~~~~~~~~~~~~~~~~~
You'll use the builtin HttpProxyModule within Nginx to handle proxying. Edit the ``/etc/nginx/sites-available/default`` file according to the lines below::
You'll use the builtin HttpProxyModule within Nginx to handle proxying. Edit the ``/etc/nginx/sites-available/default`` file according to the lines below
::
@ -222,9 +222,9 @@ After making these changes, restart Nginx service to apply them::
Starting the Web Service
------------------------
Lemur provides a built-in webserver (powered by gunicorn and eventlet) to get you off the ground quickly.
Lemur provides a built-in web server (powered by gunicorn and eventlet) to get you off the ground quickly.
To start the webserver, you simply use ``lemur start``. If you opted to use an alternative configuration path
To start the web server, you simply use ``lemur start``. If you opted to use an alternative configuration path
you can pass that via the --config option.
.. note::
@ -233,15 +233,15 @@ you can pass that via the --config option.
::
# Lemur's server runs on port 5000 by default. Make sure your client reflects
# Lemur's server runs on port 8000 by default. Make sure your client reflects
# the correct host and port!
lemur --config=/etc/lemur.conf.py start -b 127.0.0.1:5000
lemur --config=/etc/lemur.conf.py start -b 127.0.0.1:8000
You should now be able to test the web service by visiting `http://localhost:5000/`.
Running Lemur as a Service
---------------------------
--------------------------
We recommend using whatever software you are most familiar with for managing Lemur processes. One option is
`Supervisor <http://supervisord.org/>`_.