This repository has been archived by the owner on May 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d76cb0b
commit 2f0372f
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Optional, if you want to wrap Pirus into a lxc container: | ||
In order to run containers inside containers : | ||
|
||
$ echo 'lxc.mount.auto = cgroup | ||
lxc.aa_profile = lxc-container-default-with-nesting' >> ~/.config/lxc/default.conf | ||
|
||
$ lxc-create -n regovar_pirus -t download -- -d ubuntu -r xenial -a amd64 | ||
$ lxc-start -n regovar_pirus | ||
$ lxc-attach -n regovar_pirus | ||
|
||
Installation script for Pirus on a fresh Ubuntu Xenial: | ||
# apt update && apt upgrade | ||
# apt install git ca-certificates nginx rabbitmq-server mongodb lxd build-essential libssl-dev libffi-dev python3-dev virtualenv | ||
# newgrp lxd | ||
# lxd init | ||
# useradd pirus --create-home | ||
# sudo usermod -a -G lxd pirus | ||
# mkdir -p /var/regovar/pirus/{cache,downloads,files,databases,pipelines,runs} | ||
# chown -R pirus:pirus /var/regovar/pirus | ||
# su pirus | ||
$ lxc launch images:ubuntu/xenial firstContainerToInitLxd | ||
$ lxc delete firstContainerToInitLxd --force | ||
$ git clone https://github.com/REGOVAR/Pirus.git ~/Pirus | ||
$ cd ~/Pirus | ||
$ virtualenv -p /usr/bin/python3.5 venv | ||
$ source venv/bin/activate | ||
$ pip install -r requirements.txt | ||
$ cd pirus | ||
$ make cel &! | ||
$ make app &! | ||
$ exit | ||
# echo 'upstream aiohttp_pirus | ||
{ | ||
server 127.0.0.1:8200 fail_timeout=0; | ||
} | ||
server | ||
{ | ||
listen 80; | ||
listen [::]:80; | ||
|
||
location / { | ||
# Need for websockets | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
|
||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_redirect off; | ||
proxy_buffering off; | ||
proxy_pass http://aiohttp_pirus; | ||
} | ||
|
||
location /static { | ||
root /var/regovar/pirus; | ||
} | ||
}' > /etc/nginx/sites-available/pirus | ||
# rm /etc/nginx/sites-enabled/default | ||
# ln -s /etc/nginx/sites-available/pirus /etc/nginx/sites-enabled | ||
# /etc/init.d/nginx restart |