aboutsummaryrefslogtreecommitdiffstats
path: root/INSTALL.md
blob: 3db7ee6f20e01385c4aea0696265ca5adf5d08da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Installing aclog

## Application (backend)

```sh
# installing aclog at /var/webapps/aclog
git clone https://github.com/rhenium/aclog.git /var/webapps/aclog
cd /var/webapps/aclog

bundle install

# Copy the example aclog config
cp config/settings.yml.example config/settings.yml
vi config/settings.yml

# Copy the example aclog database config
cp config/database.yml.example config/database.yml
vi config/database.yml

# Set random secret_token
cp config/secrets.yml.example config/secrets.yml
sed -i s/replace_here/$(rake secret)/g config/secrets.yml

# Setup database. This will create database and tables on MySQL server.
RAILS_ENV=production bundle exec rake db:setup

# start your aclog:
# with Rake
RAILS_ENV=production bundle exec rake web:start
RAILS_ENV=production bundle exec rake collector:start
RAILS_ENV=production bundle exec bin/delayed_job start

# or, with systemd
cp example/systemd/aclog-{webserver,collector,delayed_job}.service /usr/lib/systemd/system/
systemctl start aclog-webserver.service
systemctl start aclog-collector.service
systemctl start aclog-delayed_job.service
```

## Application (frontend)

```sh
cd /var/webapps/aclog/frontend
npm install
node_modules/gulp/bin/gulp.js build

# and edit your nginx configuration like example/nginx.conf
```

## Collector worker node(s)

```sh
git clone https://github.com/rhenium/aclog.git /var/webapps/aclog
cd /var/webapps/aclog/worker_node

bundle install

# Copy the example collector config
cp settings.yml.example settings.yml
vi settings.yml

# start a node:
# with Rake
bundle exec rake worker_node:run

# or, with systemd
cp example/systemd/aclog-worker-node.service /usr/lib/systemd/system/
systemctl start aclog-worker-node.service
```