Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 151 lines (107 sloc) 6.131 kb
7dc8f9f @cdavis first attempt at removing prototype dependency from composer. also now b...
cdavis authored
1 ExtJS
4f0cdc3 basic install process in place
cdavis authored
2 -------------------------------------------------------------------------------
7dc8f9f @cdavis first attempt at removing prototype dependency from composer. also now b...
cdavis authored
3 Graphite used to require an external Ext installation but now Ext is bundled
4 with Graphite as allowed by the Ext FLOSS license exemption described here:
5
6 http://extjs.com/products/floss-exception.php
4f0cdc3 basic install process in place
cdavis authored
7
8
cc98f6d @cdavis more preparation for a release
cdavis authored
9 Run check-dependencies.py
4f0cdc3 basic install process in place
cdavis authored
10 -------------------------------------------------------------------------------
11 This will check for graphite's runtime dependencies and let
12 you know which you are missing. Download and install these modules and re-run
8a11291 @cdavis improved 500.html when DEBUG = False
cdavis authored
13 check-dependencies.py until it detects all the required modules.
4f0cdc3 basic install process in place
cdavis authored
14
15 Graphite requires:
e017294 @cdavis updated notes on install requirements
cdavis authored
16 python2.4 or greater (python 2.5 or greater is required for AMQP support)
cc98f6d @cdavis more preparation for a release
cdavis authored
17 whisper (available for download on the graphite project page)
4f0cdc3 basic install process in place
cdavis authored
18 pycairo (with PNG backend support)
19 django
5352ece @cdavis fix for bug #522352
cdavis authored
20 json (standard in python2.6) or simplejson
c06d730 @cdavis updated INSTALL to reference mod_wsgi
cdavis authored
21 mod_wsgi (optional, recommended) or mod_python (optional)
4f0cdc3 basic install process in place
cdavis authored
22 python-ldap (optional - needed for ldap-based webapp authentication)
23 python-memcached (optional - needed for webapp caching, big performance boost)
24 python-sqlite2 (optional - a django-supported database module is required)
b1afd90 @cdavis added twisted to check-dependencies.py and some minor INSTALL correction...
cdavis authored
25 Twisted (required only for carbon)
4f0cdc3 basic install process in place
cdavis authored
26
27
cc98f6d @cdavis more preparation for a release
cdavis authored
28 Run setup.py
ba69a59 @cdavis updated INSTALL and README files to reflect new installation steps
cdavis authored
29 -------------------------------------------------------------------------------
cc98f6d @cdavis more preparation for a release
cdavis authored
30 First take a look at the 'prefix' option in the setup.cfg file. This specifies
31 where the graphite application will be installed. Note that if you plan on
32 installing carbon on the same server you should use the same prefix for it.
33
5c447b1 @cdavis more minor deployment fixes
cdavis authored
34 The prefix where graphite is installed under where be referred to as
35 $GRAPHITE_ROOT from here on.
36
cc98f6d @cdavis more preparation for a release
cdavis authored
37 Also, do NOT change the 'install-lib' option unless you really know what
38 you are doing.
ba69a59 @cdavis updated INSTALL and README files to reflect new installation steps
cdavis authored
39
4f0cdc3 basic install process in place
cdavis authored
40
5c447b1 @cdavis more minor deployment fixes
cdavis authored
41 Initialize the Database
42 ------------------------------------------------------------------------------
43 Once you have installed graphite you must initialize its database like so:
44
89d77fa @cdavis fixed carbonlink issue, more deployment fixes
cdavis authored
45 export PYTHONPATH=$PYTHONPATH:$GRAPHITE_ROOT/webapp
5c447b1 @cdavis more minor deployment fixes
cdavis authored
46 cd $GRAPHITE_ROOT/webapp/graphite/
47 sudo python manage.py syncdb
48
49 Note that if you wish to use a custom database setup (like MySQL or Postgres)
50 you will need to make those configuration changes first. See the "Custom
51 Database Configuration" section below for details.
52
53
54 Setup Filesystem Ownership
55 ------------------------------------------------------------------------------
56 The user that apache runs as will need write access to the following directories:
57
58 $GRAPHITE_ROOT/storage/
59 $GRAPHITE_ROOT/storage/log/webapp/
60
61 As well as write access to the following files:
62
63 $GRAPHITE_ROOT/storage/graphite.db
64
65 The apache user must also have read access to $GRAPHITE_ROOT/storage/whisper/
66
67
4f0cdc3 basic install process in place
cdavis authored
68 Apache Configuration
69 -------------------------------------------------------------------------------
c06d730 @cdavis updated INSTALL to reference mod_wsgi
cdavis authored
70 When using apache there are two modules available to provide support for python
71 web application.
72
73 Graphite currently provides example configurations for both of these modules.
74 Of the two mod_wsgi is the most up to date and actively maintained so it's
75 highly recommended if you are starting afresh.
76
77 Apache Configuration for Mod_wsgi (recommended)
78 -------------------------------------------------------------------------------
79
80 If you are using mod_wsgi, Apache has to have mod_wsgi configured,
81 this is usually done by including a line like the following in your
82 httpd.conf:
83
84 LoadModule wsgi_module modules/mod_wsgi.so
85
86 Apache Configuration for Mod_python
87 -------------------------------------------------------------------------------
88
89 If you choose to use mod_python, Apache has to have mod_python configured,
90 this is usually done by including a line like the following in your
91 httpd.conf:
4f0cdc3 basic install process in place
cdavis authored
92
93 LoadModule python_module modules/mod_python.so
94
c06d730 @cdavis updated INSTALL to reference mod_wsgi
cdavis authored
95 General Apache Configuration
96 -------------------------------------------------------------------------------
97
98 Once you have configured the apache module you are using you should configure
99 a vhost for graphite (technically it doesn't have to be a vhost but its good
100 practice). This can be done one of two ways.
4f0cdc3 basic install process in place
cdavis authored
101
102 The first way (highly preferred) is to include independent vhost configs.
103
104 # This goes in httpd.conf
105 Include /usr/local/apache2/conf/vhosts.d/*.conf
106
cc98f6d @cdavis more preparation for a release
cdavis authored
107 Then simply drop your graphite vhost conf file into the vhosts.d/ directory
f2d9067 @cdavis doc update
cdavis authored
108 (or whatever directory your system uses) and apache is ready. You can use
c06d730 @cdavis updated INSTALL to reference mod_wsgi
cdavis authored
109 either of the example vhost confs as a starting point (See the examples
110 directory of this package and choose the correct one based on whether you
111 are using mod_wsgi or mod_python.)
4f0cdc3 basic install process in place
cdavis authored
112
c06d730 @cdavis updated INSTALL to reference mod_wsgi
cdavis authored
113 The second approach is to copy the contents of your chosen graphite vhost conf file
4f0cdc3 basic install process in place
cdavis authored
114 and insert it down at the end of your httpd.conf.
115
6798d61 simple install cleanup, includes example now
cdavis authored
116
ba69a59 @cdavis updated INSTALL and README files to reflect new installation steps
cdavis authored
117 Custom Database Configuration
6798d61 simple install cleanup, includes example now
cdavis authored
118 -------------------------------------------------------------------------------
ba69a59 @cdavis updated INSTALL and README files to reflect new installation steps
cdavis authored
119 By default, the graphite webapp uses a sqlite database. As long as you have the
120 appropriate sqlite module installed, you should not need to do any additional
121 database configuration. But if you wish to use a different database such as
122 MySQL or Postgres, read on.
6798d61 simple install cleanup, includes example now
cdavis authored
123
ba69a59 @cdavis updated INSTALL and README files to reflect new installation steps
cdavis authored
124 After you setup your database server, create a database and a user with full
125 privileges on that database. Now we put that information into the graphite
126 webapp local_settings.py file.
6798d61 simple install cleanup, includes example now
cdavis authored
127
5c447b1 @cdavis more minor deployment fixes
cdavis authored
128 Edit the $GRAPHITE_ROOT/webapp/graphite/local_settings.py
6798d61 simple install cleanup, includes example now
cdavis authored
129
ba69a59 @cdavis updated INSTALL and README files to reflect new installation steps
cdavis authored
130 In particular you will need to uncomment and modify all of the settings
131 that begin with "DATABASE_". Once you have done this, we need to tell
132 Django to create our tables.
133
5c447b1 @cdavis more minor deployment fixes
cdavis authored
134 cd $GRAPHITE_ROOT/webapp/graphite/
fa2519d @cdavis minor documentation stuff
cdavis authored
135 sudo python manage.py syncdb
6798d61 simple install cleanup, includes example now
cdavis authored
136 # you will be prompted to create an admin user, this is a good idea
137
4f0cdc3 basic install process in place
cdavis authored
138 Restart apache and you should see the graphite webapp on the main page.
139 If you encounter problems, you can increase the verbosity of error output
ba69a59 @cdavis updated INSTALL and README files to reflect new installation steps
cdavis authored
140 by adding a "DEBUG = True" line to local_settings.py
6798d61 simple install cleanup, includes example now
cdavis authored
141
142
d6aaf4f @cdavis fixed more installation issues
cdavis authored
143 Next Steps - setup the backend (carbon)
6798d61 simple install cleanup, includes example now
cdavis authored
144 -------------------------------------------------------------------------------
d6aaf4f @cdavis fixed more installation issues
cdavis authored
145 Now you have finished installing the graphite webapp, the next thing to do is put some
cc98f6d @cdavis more preparation for a release
cdavis authored
146 real data into it. This is accomplished by running the carbon-cache.py daemon
6798d61 simple install cleanup, includes example now
cdavis authored
147 and send it some data as demonstrated in the included
148 ./examples/example-client.py
149
d6aaf4f @cdavis fixed more installation issues
cdavis authored
150 Instructions for doing this in the README file.
Something went wrong with that request. Please try again.