|
a/README.markdown |
|
b/README.markdown |
|
... |
|
... |
53 |
The first step to installing the Allura platform is installing a virtual environment via `virtualenv`. This helps keep our distribution python installation clean.
|
53 |
The first step to installing the Allura platform is installing a virtual environment via `virtualenv`. This helps keep our distribution python installation clean.
|
54 |
|
54 |
|
55 |
~$ sudo aptitude install python-pip
|
55 |
~$ sudo aptitude install python-pip
|
56 |
~$ sudo pip install virtualenv
|
56 |
~$ sudo pip install virtualenv
|
57 |
|
57 |
|
58 |
Once you have virtualenv installed, you need to create a virtual environment. We'll call our Allura environment 'anvil'.
|
58 |
Once you have virtualenv installed, you need to create a virtual environment. We'll call our Allura environment 'env-allura'.
|
59 |
|
59 |
|
60 |
~$ virtualenv anvil
|
60 |
~$ virtualenv env-allura
|
61 |
|
61 |
|
62 |
This gives us a nice, clean environment into which we can install all the allura dependencies.
|
62 |
This gives us a nice, clean environment into which we can install all the allura dependencies.
|
63 |
In order to use the virtual environment, you'll need to activate it:
|
63 |
In order to use the virtual environment, you'll need to activate it:
|
64 |
|
64 |
|
65 |
~$ . anvil/bin/activate
|
65 |
~$ . env-allura/bin/activate
|
66 |
|
66 |
|
67 |
You'll need to do this whenever you're working on the Allura codebase so you may want to consider adding it to your `~/.bashrc` file.
|
67 |
You'll need to do this whenever you're working on the Allura codebase so you may want to consider adding it to your `~/.bashrc` file.
|
68 |
|
68 |
|
69 |
## Installing the Allura code and dependencies
|
69 |
## Installing the Allura code and dependencies
|
70 |
|
70 |
|
71 |
Now we can get down to actually getting the Allura code and dependencies downloaded and ready to go.
|
71 |
Now we can get down to actually getting the Allura code and dependencies downloaded and ready to go.
|
72 |
|
72 |
|
73 |
(anvil)~$ mkdir src
|
73 |
(env-allura)~$ mkdir src
|
74 |
(anvil)~$ cd src
|
74 |
(env-allura)~$ cd src
|
75 |
(anvil)~/src$ git clone https://git-wip-us.apache.org/repos/asf/incubator-allura.git allura
|
75 |
(env-allura)~/src$ git clone https://git-wip-us.apache.org/repos/asf/incubator-allura.git allura
|
76 |
|
76 |
|
77 |
Although the application setup.py files define a number of dependencies, the `requirements.txt` files are currently the authoritative source, so we'll use those with `pip` to make sure the correct versions are installed.
|
77 |
Although the application setup.py files define a number of dependencies, the `requirements.txt` files are currently the authoritative source, so we'll use those with `pip` to make sure the correct versions are installed.
|
78 |
|
78 |
|
79 |
(anvil)~/src$ cd allura
|
79 |
(env-allura)~/src$ cd allura
|
80 |
(anvil)~/src/allura$ pip install -r requirements.txt
|
80 |
(env-allura)~/src/allura$ pip install -r requirements.txt
|
81 |
|
81 |
|
82 |
This will take a while. If you get an error from pip, it is typically a temporary download error. Just run the command again and it will quickly pass through the packages it already downloaded and then continue.
|
82 |
This will take a while. If you get an error from pip, it is typically a temporary download error. Just run the command again and it will quickly pass through the packages it already downloaded and then continue.
|
83 |
|
83 |
|
84 |
Optional, for SVN support: symlink the system pysvn package into our virtual environment
|
84 |
Optional, for SVN support: symlink the system pysvn package into our virtual environment
|
85 |
|
85 |
|
86 |
(anvil)~/src/allura$ ln -s /usr/lib/python2.7/dist-packages/pysvn ~/anvil/lib/python2.7/site-packages/
|
86 |
(env-allura)~/src/allura$ ln -s /usr/lib/python2.7/dist-packages/pysvn ~/env-allura/lib/python2.7/site-packages/
|
87 |
|
87 |
|
88 |
And now to setup the Allura applications for development. If you want to setup all of them, run `./rebuild-all.bash`
|
88 |
And now to setup the Allura applications for development. If you want to setup all of them, run `./rebuild-all.bash`
|
89 |
If you only want to use a few tools, run:
|
89 |
If you only want to use a few tools, run:
|
90 |
|
90 |
|
91 |
cd Allura
|
91 |
cd Allura
|
|
... |
|
... |
100 |
|
100 |
|
101 |
### SOLR search and indexing server
|
101 |
### SOLR search and indexing server
|
102 |
|
102 |
|
103 |
We have a custom config ready for use.
|
103 |
We have a custom config ready for use.
|
104 |
|
104 |
|
105 |
(anvil)~$ cd ~/src
|
105 |
(env-allura)~$ cd ~/src
|
106 |
(anvil)~/src$ wget -nv http://archive.apache.org/dist/lucene/solr/4.2.1/solr-4.2.1.tgz
|
106 |
(env-allura)~/src$ wget -nv http://archive.apache.org/dist/lucene/solr/4.2.1/solr-4.2.1.tgz
|
107 |
(anvil)~/src$ tar xf solr-4.2.1.tgz && rm -f solr-4.2.1.tgz
|
107 |
(env-allura)~/src$ tar xf solr-4.2.1.tgz && rm -f solr-4.2.1.tgz
|
108 |
(anvil)~/src$ cp -f allura/solr_config/schema.xml solr-4.2.1/example/solr/collection1/conf
|
108 |
(env-allura)~/src$ cp -f allura/solr_config/schema.xml solr-4.2.1/example/solr/collection1/conf
|
109 |
|
109 |
|
110 |
(anvil)~/src$ cd solr-4.2.1/example/
|
110 |
(env-allura)~/src$ cd solr-4.2.1/example/
|
111 |
(anvil)~/src/apache-solr-1.4.1/example/$ mkdir ~/logs/
|
111 |
(env-allura)~/src/apache-solr-1.4.1/example/$ mkdir ~/logs/
|
112 |
(anvil)~/src/apache-solr-1.4.1/example/$ nohup java -jar start.jar > ~/logs/solr.log &
|
112 |
(env-allura)~/src/apache-solr-1.4.1/example/$ nohup java -jar start.jar > ~/logs/solr.log &
|
113 |
|
113 |
|
114 |
|
114 |
|
115 |
### Allura task processing
|
115 |
### Allura task processing
|
116 |
|
116 |
|
117 |
Allura uses a background task service called "taskd" to do async tasks like sending emails, and indexing data into solr, etc. Let's get it running
|
117 |
Allura uses a background task service called "taskd" to do async tasks like sending emails, and indexing data into solr, etc. Let's get it running
|
118 |
|
118 |
|
119 |
(anvil)~$ cd ~/src/allura/Allura
|
119 |
(env-allura)~$ cd ~/src/allura/Allura
|
120 |
(anvil)~/src/allura/Allura$ nohup paster taskd development.ini > ~/logs/taskd.log &
|
120 |
(env-allura)~/src/allura/Allura$ nohup paster taskd development.ini > ~/logs/taskd.log &
|
121 |
|
121 |
|
122 |
### The application server
|
122 |
### The application server
|
123 |
|
123 |
|
124 |
In order to initialize the Allura database, you'll need to run the following:
|
124 |
In order to initialize the Allura database, you'll need to run the following:
|
125 |
|
125 |
|
126 |
(anvil)~/src/allura/Allura$ paster setup-app development.ini
|
126 |
(env-allura)~/src/allura/Allura$ paster setup-app development.ini
|
127 |
|
127 |
|
128 |
This shouldn't take too long, but it will start the taskd server doing tons of stuff in the background. Once this is done, you can start the application server:
|
128 |
This shouldn't take too long, but it will start the taskd server doing tons of stuff in the background. Once this is done, you can start the application server:
|
129 |
|
129 |
|
130 |
(anvil)~/src/allura/Allura$ nohup paster serve --reload development.ini > ~/logs/tg.log &
|
130 |
(env-allura)~/src/allura/Allura$ nohup paster serve --reload development.ini > ~/logs/tg.log &
|
131 |
|
131 |
|
132 |
## Next Steps
|
132 |
## Next Steps
|
133 |
|
133 |
|
134 |
Go to the Allura webapp running on your [local machine](http://localhost:8080/) port 8080.
|
134 |
Go to the Allura webapp running on your [local machine](http://localhost:8080/) port 8080.
|
135 |
(If you're running this inside a VM, you'll probably have to configure the port forwarding settings)
|
135 |
(If you're running this inside a VM, you'll probably have to configure the port forwarding settings)
|