README.md
99 lines
| 2.0 KiB
| text/x-minidsrc
|
MarkdownLexer
r28 | AppEnlight | |||
r0 | ----------- | |||
Automatic Installation | ||||
====================== | ||||
Use the ansible scripts in the `/automation` directory to build complete instance of application | ||||
You can also use `packer` files in `/automation/packer` to create whole VM's for KVM and VMWare. | ||||
Manual Installation | ||||
=================== | ||||
r104 | To run the app you need to have meet prerequsites: | |||
- python 3.5+ | ||||
- running elasticsearch (2.3+ tested) | ||||
- running postgresql (9.5+ required) | ||||
- running redis | ||||
r0 | Install the app by performing | |||
pip install -r requirements.txt | ||||
r3 | ||||
r0 | python setup.py develop | |||
r104 | Install the appenlight uptime plugin (`ae_uptime_ce` package). | |||
r0 | ||||
r104 | After installing the application you need to perform following steps: | |||
r0 | ||||
1. (optional) generate production.ini (or use a copy of development.ini) | ||||
r104 | ||||
r0 | appenlight-make-config production.ini | |||
r104 | 2. Setup database structure: | |||
r0 | ||||
r105 | appenlight-migratedb -c FILENAME.ini | |||
r0 | ||||
r104 | 3. To configure elasticsearch: | |||
r0 | ||||
r104 | appenlight-reindex-elasticsearch -t all -c FILENAME.ini | |||
r105 | 4. Create base database objects | |||
(run this command with help flag to see how to create administrator user) | ||||
r104 | ||||
r0 | ||||
appenlight-initializedb -c FILENAME.ini | ||||
r104 | 5. Generate static assets | |||
r0 | ||||
appenlight-static -c FILENAME.ini | ||||
Running application | ||||
=================== | ||||
r104 | To run the main app: | |||
r0 | ||||
pserve development.ini | ||||
r104 | To run celery workers: | |||
r0 | ||||
celery worker -A appenlight.celery -Q "reports,logs,metrics,default" --ini FILENAME.ini | ||||
r104 | To run celery beat: | |||
r0 | ||||
celery beat -A appenlight.celery --ini FILENAME.ini | ||||
r104 | To run appenlight's uptime plugin: | |||
r0 | ||||
appenlight-uptime-monitor -c FILENAME.ini | ||||
r104 | ||||
Real-time Notifications | ||||
======================= | ||||
You should also run the `channelstream websocket server for real-time notifications | ||||
channelstream -i filename.ini | ||||
Testing | ||||
======= | ||||
To run test suite: | ||||
py.test appenlight/tests/tests.py --cov appenlight (this looks for testing.ini in repo root) | ||||
Development | ||||
=========== | ||||
To develop appenlight frontend: | ||||
cd frontend | ||||
npm install | ||||
bower install | ||||
grunt watch | ||||