Show More
@@ -1,65 +1,97 b'' | |||
|
1 | 1 | AppEnlight |
|
2 | 2 | ----------- |
|
3 | 3 | |
|
4 | 4 | Automatic Installation |
|
5 | 5 | ====================== |
|
6 | 6 | |
|
7 | 7 | Use the ansible scripts in the `/automation` directory to build complete instance of application |
|
8 | 8 | You can also use `packer` files in `/automation/packer` to create whole VM's for KVM and VMWare. |
|
9 | 9 | |
|
10 | 10 | Manual Installation |
|
11 | 11 | =================== |
|
12 | 12 | |
|
13 | To run the app you need to have meet prerequsites: | |
|
14 | ||
|
15 | - python 3.5+ | |
|
16 | - running elasticsearch (2.3+ tested) | |
|
17 | - running postgresql (9.5+ required) | |
|
18 | - running redis | |
|
19 | ||
|
13 | 20 | Install the app by performing |
|
14 | 21 | |
|
15 | 22 | pip install -r requirements.txt |
|
16 | 23 | |
|
17 | 24 | python setup.py develop |
|
18 | 25 | |
|
19 | To run the app and configure datastore you need to run: | |
|
20 | ||
|
21 | * python 3.5+ | |
|
22 | * elasticsearch (2.2+ tested) | |
|
23 | * postgresql 9.5+ | |
|
24 | * redis 2.8+ | |
|
26 | Install the appenlight uptime plugin (`ae_uptime_ce` package). | |
|
25 | 27 | |
|
26 |
|
|
|
28 | After installing the application you need to perform following steps: | |
|
27 | 29 | |
|
28 | 30 | 1. (optional) generate production.ini (or use a copy of development.ini) |
|
29 | 31 | |
|
32 | ||
|
30 | 33 | appenlight-make-config production.ini |
|
31 | 34 | |
|
32 |
2. |
|
|
35 | 2. Setup database structure: | |
|
36 | ||
|
33 | 37 | |
|
34 | 38 | appenlight-migrate-db -c FILENAME.ini |
|
35 | 39 | |
|
36 |
3. |
|
|
40 | 3. To configure elasticsearch: | |
|
37 | 41 | |
|
38 | appenlight-reindex-elasticsearch -c FILENAME.ini | |
|
39 | 42 | |
|
40 | 4. create base database objects | |
|
43 | appenlight-reindex-elasticsearch -t all -c FILENAME.ini | |
|
44 | ||
|
45 | 4. Create base database objects | |
|
46 | ||
|
41 | 47 | |
|
42 | 48 | appenlight-initializedb -c FILENAME.ini |
|
43 | 49 | |
|
44 |
5. |
|
|
50 | 5. Generate static assets | |
|
51 | ||
|
45 | 52 | |
|
46 | 53 | appenlight-static -c FILENAME.ini |
|
47 | 54 | |
|
48 | 55 | Running application |
|
49 | 56 | =================== |
|
50 | 57 | |
|
51 |
|
|
|
58 | To run the main app: | |
|
52 | 59 | |
|
53 | 60 | pserve development.ini |
|
54 | 61 | |
|
55 |
|
|
|
62 | To run celery workers: | |
|
56 | 63 | |
|
57 | 64 | celery worker -A appenlight.celery -Q "reports,logs,metrics,default" --ini FILENAME.ini |
|
58 | 65 | |
|
59 |
|
|
|
66 | To run celery beat: | |
|
60 | 67 | |
|
61 | 68 | celery beat -A appenlight.celery --ini FILENAME.ini |
|
62 | 69 | |
|
63 |
|
|
|
70 | To run appenlight's uptime plugin: | |
|
64 | 71 | |
|
65 | 72 | appenlight-uptime-monitor -c FILENAME.ini |
|
73 | ||
|
74 | Real-time Notifications | |
|
75 | ======================= | |
|
76 | ||
|
77 | You should also run the `channelstream websocket server for real-time notifications | |
|
78 | ||
|
79 | channelstream -i filename.ini | |
|
80 | ||
|
81 | Testing | |
|
82 | ======= | |
|
83 | ||
|
84 | To run test suite: | |
|
85 | ||
|
86 | py.test appenlight/tests/tests.py --cov appenlight (this looks for testing.ini in repo root) | |
|
87 | ||
|
88 | ||
|
89 | Development | |
|
90 | =========== | |
|
91 | ||
|
92 | To develop appenlight frontend: | |
|
93 | ||
|
94 | cd frontend | |
|
95 | npm install | |
|
96 | bower install | |
|
97 | grunt watch |
@@ -1,77 +1,77 b'' | |||
|
1 | 1 | import os |
|
2 | 2 | import sys |
|
3 | 3 | import re |
|
4 | 4 | |
|
5 | 5 | from setuptools import setup, find_packages |
|
6 | 6 | |
|
7 | 7 | here = os.path.abspath(os.path.dirname(__file__)) |
|
8 | README = open(os.path.join(here, 'README.md')).read() | |
|
8 | README = open(os.path.join(here, '..', 'README.md')).read() | |
|
9 | 9 | CHANGES = open(os.path.join(here, 'CHANGELOG.rst')).read() |
|
10 | 10 | |
|
11 | 11 | REQUIREMENTS = open(os.path.join(here, 'requirements.txt')).readlines() |
|
12 | 12 | |
|
13 | 13 | compiled = re.compile('([^=><]*).*') |
|
14 | 14 | |
|
15 | 15 | |
|
16 | 16 | def parse_req(req): |
|
17 | 17 | return compiled.search(req).group(1).strip() |
|
18 | 18 | |
|
19 | 19 | |
|
20 | 20 | requires = [_f for _f in map(parse_req, REQUIREMENTS) if _f] |
|
21 | 21 | |
|
22 | 22 | |
|
23 | 23 | def _get_meta_var(name, data, callback_handler=None): |
|
24 | 24 | import re |
|
25 | 25 | matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data) |
|
26 | 26 | if matches: |
|
27 | 27 | if not callable(callback_handler): |
|
28 | 28 | callback_handler = lambda v: v |
|
29 | 29 | |
|
30 | 30 | return callback_handler(eval(matches.groups()[0])) |
|
31 | 31 | |
|
32 | 32 | with open(os.path.join(here, 'src', 'appenlight', '__init__.py'), 'r') as _meta: |
|
33 | 33 | _metadata = _meta.read() |
|
34 | 34 | |
|
35 | 35 | with open(os.path.join('src', 'appenlight', 'VERSION')) as _meta_version: |
|
36 | 36 | __version__ = _meta_version.read().strip() |
|
37 | 37 | |
|
38 | 38 | __license__ = _get_meta_var('__license__', _metadata) |
|
39 | 39 | __author__ = _get_meta_var('__author__', _metadata) |
|
40 | 40 | __url__ = _get_meta_var('__url__', _metadata) |
|
41 | 41 | |
|
42 | 42 | found_packages = find_packages('src') |
|
43 | 43 | found_packages.append('appenlight.migrations.versions') |
|
44 | 44 | setup(name='appenlight', |
|
45 | 45 | description='appenlight', |
|
46 | 46 | long_description=README + '\n\n' + CHANGES, |
|
47 | 47 | classifiers=[ |
|
48 | 48 | "Programming Language :: Python", |
|
49 | 49 | "Framework :: Pylons", |
|
50 | 50 | "Topic :: Internet :: WWW/HTTP", |
|
51 | 51 | "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", |
|
52 | 52 | ], |
|
53 | 53 | version=__version__, |
|
54 | 54 | license=__license__, |
|
55 | 55 | author=__author__, |
|
56 | 56 | url=__url__, |
|
57 | 57 | keywords='web wsgi bfg pylons pyramid', |
|
58 | 58 | package_dir={'': 'src'}, |
|
59 | 59 | packages=found_packages, |
|
60 | 60 | include_package_data=True, |
|
61 | 61 | zip_safe=False, |
|
62 | 62 | test_suite='appenlight', |
|
63 | 63 | install_requires=requires, |
|
64 | 64 | entry_points={ |
|
65 | 65 | 'paste.app_factory': [ |
|
66 | 66 | 'main = appenlight:main' |
|
67 | 67 | ], |
|
68 | 68 | 'console_scripts': [ |
|
69 | 69 | 'appenlight-cleanup = appenlight.scripts.cleanup:main', |
|
70 | 70 | 'appenlight-initializedb = appenlight.scripts.initialize_db:main', |
|
71 | 71 | 'appenlight-migratedb = appenlight.scripts.migratedb:main', |
|
72 | 72 | 'appenlight-reindex-elasticsearch = appenlight.scripts.reindex_elasticsearch:main', |
|
73 | 73 | 'appenlight-static = appenlight.scripts.static:main', |
|
74 | 74 | 'appenlight-make-config = appenlight.scripts.make_config:main', |
|
75 | 75 | ] |
|
76 | 76 | } |
|
77 | 77 | ) |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now