Permalink
Browse files

Documentation cleansing. Adds some tables with appropriate values to …

…summarize some sections

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6394 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent bebdecb commit 4a0eff04e634ca4f11dcd682c8a04c047f5508cf taher committed Mar 21, 2011
Showing with 63 additions and 21 deletions.
  1. +21 −5 doc/cookbook_authentication.txt
  2. +40 −13 doc/cookbook_dbslayer.txt
  3. +2 −3 doc/dev_debug.txt
@@ -113,8 +113,9 @@ database to fetch any content.
First, lets define a unique rule in our virtual server managed by the
`List and Send` handler. Through the `Security` tab we can configure
it to use MySQL as authentication mechanism. Filling up just the
-essential fields will be enough. Realm, database name, user, password
-and an SQL query that must return one row with one column as password.
+essential fields will be enough. Those are realm, database name, user,
+password, and an SQL query that must return one row with one column as
+password.
image::media/images/cookbook_mysql_validator.png[MySQL validator set up]
@@ -152,7 +153,9 @@ Query OK, 1 row affected (0.00 sec)
mysql> quit
----
-When we are done, our simple virtual server should look like this:
+When we are done, our simple virtual server should only have a
+`Default` rule, managed by the `List & Send` hander, and with `MySQL`
+authentication set.
image::media/images/cookbook_mysql_rule.png[MySQL Authenticated rule]
@@ -202,8 +205,8 @@ directory, just the second rule would apply.
[[fixed_list]]
=== Fixed list
-For this validator you will only need to add user-password pairs. As
-always, the `realm` field is mandatory.
+For this validator you will only need to add user-password pairs, and
+the mandatory `realm` field.
image::media/images/admin_validators_authlist.png[Fixed List]
@@ -215,4 +218,17 @@ Here is a basic example of the LDAP validator in action. It assumes
you have a working LDAP service running at your localhost, and it uses
no TLS of CA files.
+[cols="50%,50%",options="header"]
+|=============================================================
+|Field | Value
+|Validation Mechanism |`LDAP Server`
+|Methods | `Basic`
+|Realm | secret
+|Server | localhost
+|Port | 389
+|Bind Domain | my_domain
+|Bind Password | my_password
+|Base Domain | example.com
+|=============================================================
+
image::media/images/admin_validators_ldap.png[LDAP example]
View
@@ -140,7 +140,7 @@ production environment. Isolation is generally a good idea.
First, we edit the `default` virtual server. Since we will only be
using it for database balancing, we can safely point it to an empty
-`Document Root`, in this case `/var/www/fake`.
+`Document Root`, in this case `/dev/null`.
image::media/images/cookbook_dbslayer1.png[MySQL Bridge, step 1]
@@ -157,28 +157,55 @@ that is what we will use.
image::media/images/cookbook_dbslayer2.png[MySQL Bridge, step 2]
+[cols="50%,50%"]
+.Source #1
+|=============================================================
+|Type | Remote source
+|Nick | mysql_0
+|Connection | 10.0.0.100:3306
+|=============================================================
+
+[cols="50%,50%"]
+.Source #2
+|=============================================================
+|Type | Remote source
+|Nick | mysql_1
+|Connection | 10.0.0.101:3306
+|=============================================================
+
Next is removing every possible rule and configuring the default one
to use the MySQL bridge handler. This is not required, but obeys the
recommendations stated above.
image::media/images/cookbook_dbslayer3.png[MySQL Bridge, step 3]
To do so, simply click on the rule in the `Behavior` tab and proceed
-to the `Handler` section, where you can adjust the following settings.
+to the `Handler` section, where you can adjust all the settings.
+
+After adding the information sources to be balanced, and setting up
+the information required to access an existing database, only the
+matter of selecting a language will remain. In this example we will be
+using Python because that is what the testing script will be written
+in. If your favorite language of choice is not available you can
+simply select JSON, which is widely supported in most programming
+languages. Using Python in this case will simply allow us to directly
+evaluate the results offered by the database, creating a native object
+that can be managed more comfortably.
+
+[cols="50%,50%"]
+.Sample configuration values
+|=============================================================
+|Handler | `MySQL Bridge`
+|Language | `Python`
+|DB User | my_user
+|DB Password | my_password
+|Database | my_database
+|Balancer | `Round Robin`
+|Information Sources | mysql_0, mysql_1
+|=============================================================
image::media/images/cookbook_dbslayer4.png[MySQL Bridge, step 4]
-After adding the information sources to be balanced, and setting up the
-information required to access an existing database, only the matter
-of selecting a language will remain.
-
-In this example we will be using Python because that is what the
-testing script will be written in. If your favorite language of choice
-is not available you can simply select JSON, which is widely supported
-in most programming languages. Using Python in this case will simply
-allow us to directly evaluate the results offered by the database,
-creating a native object that can be managed more comfortably.
-
And these were all the steps required. You are ready to go!
[[example_python]]
View
@@ -122,8 +122,7 @@ An example of usage would be:
CHEROKEE_TRACE=thread,all ./cherokee | ../contrib/tracelor.py iocache
----
+
-And it would yield an output such as the following. Even if it is
-not terribly complicated, it is a handy script to trace the server more
-easily.
+And it would yield a colorized output. Even if it is not terribly
+complicated, it is a handy script to trace the server more easily.
image::media/images/tracelor.png[Output of tracelor.py]

0 comments on commit 4a0eff0

Please sign in to comment.