|
|
|
@ -7,16 +7,17 @@ architecture.
|
|
|
|
|
There are a lot of different GNU/Linux distributions with different package
|
|
|
|
|
management, naming convention and version release policies. So it is impossible
|
|
|
|
|
to cover all of the possible variants. We picked one distribution, which is
|
|
|
|
|
fully supported by automatic installation script, for others there are brief
|
|
|
|
|
information about installation in every project component's own chapter.
|
|
|
|
|
fully supported by automatic installation script, but there are also steps for
|
|
|
|
|
manual installation of all components which should work on most of the Linux
|
|
|
|
|
distributions.
|
|
|
|
|
|
|
|
|
|
Distribution of our choice is CentOS, currently in version 7. It is a well known
|
|
|
|
|
server distribution, derived from enterprise distrubution from Red Hat, so it is
|
|
|
|
|
very stable and widely used system with long term support. There are
|
|
|
|
|
The distribution of our choice is CentOS, currently in version 7. It is a well
|
|
|
|
|
known server distribution, derived from enterprise distrubution from Red Hat, so
|
|
|
|
|
it is very stable and widely used system with long term support. There are
|
|
|
|
|
[EPEL](https://fedoraproject.org/wiki/EPEL) additional repositories from Fedora
|
|
|
|
|
project, which adds newer versions of some packages into CentOS, which allows us
|
|
|
|
|
to use current environment. Also, _rpm_ packages are much easier to build (for
|
|
|
|
|
example from Python sources) and maintain.
|
|
|
|
|
to use current environment. Also, _rpm_ packages are much easier to build than
|
|
|
|
|
_deb_ packages (for example from Python sources).
|
|
|
|
|
|
|
|
|
|
The big rival of CentOS in server distributions field is Debian. We are running
|
|
|
|
|
one instance of ReCodEx on Debian too. You need to use _testing_ repositories to
|
|
|
|
@ -30,15 +31,15 @@ setting up Windows OS is a little bit of pain and it is not supposed to run
|
|
|
|
|
ReCodEx in this way. Only worker component may be needed to run on Windows, so
|
|
|
|
|
we are providing clickable installer including dependencies. Just for info, all
|
|
|
|
|
components should be able to run on Windows, only broker was not tested and may
|
|
|
|
|
require small tweaks to properly work.
|
|
|
|
|
require small tweaks to work properly.
|
|
|
|
|
|
|
|
|
|
## Ansible installer
|
|
|
|
|
|
|
|
|
|
For automatic installation is used set of Ansible scripts. Ansible is one of the
|
|
|
|
|
best known and used tools for automatic server management. It is required only
|
|
|
|
|
to have SSH access to the server and ansible installed on the client machine.
|
|
|
|
|
For further reading is supposed basic Ansible knowledge. For more info check
|
|
|
|
|
their [documentation](http://docs.ansible.com/ansible/intro.html).
|
|
|
|
|
For automatic installation is used a set of Ansible scripts. Ansible is one of
|
|
|
|
|
the best known and used tools for automatic server management. It is required
|
|
|
|
|
only to have SSH access to the server and ansible installed on the client
|
|
|
|
|
machine. For further reading is supposed basic Ansible knowledge. For more info
|
|
|
|
|
check their [documentation](http://docs.ansible.com/ansible/intro.html).
|
|
|
|
|
|
|
|
|
|
All Ansible scripts are located in _utils_ repository, _installation_
|
|
|
|
|
[directory](https://github.com/ReCodEx/utils/tree/master/installation). Ansible
|
|
|
|
@ -170,7 +171,7 @@ use. The package names are for CentOS if not specified otherwise.
|
|
|
|
|
Package name is `libarchive` and `libarchive-devel` (`libarchive-dev` on
|
|
|
|
|
Debian)
|
|
|
|
|
|
|
|
|
|
**Install Isolate from source** (only for Linux installations)
|
|
|
|
|
**Isolate** (only for Linux installations)
|
|
|
|
|
|
|
|
|
|
First, we need to compile sandbox Isolate from source and install it. Current
|
|
|
|
|
worker is tested against version 1.3, so this version needs to be checked out.
|
|
|
|
@ -245,19 +246,12 @@ manageable in long term horizon.
|
|
|
|
|
|
|
|
|
|
#### Install worker on Windows
|
|
|
|
|
|
|
|
|
|
From beginning we are determined to support Windows operating system on which
|
|
|
|
|
some of the workers may run (especially for projects in C# programming
|
|
|
|
|
language). Support for Windows is quite hard and time consuming and there were
|
|
|
|
|
several problems during the development. To ensure capability of compilation on
|
|
|
|
|
Windows we set up CI for Windows named [Appveyor](http://www.appveyor.com/).
|
|
|
|
|
However installation should be easy due to provided installation script.
|
|
|
|
|
|
|
|
|
|
There are only two additional dependencies needed, **Windows 7 and higher** and
|
|
|
|
|
There are basically two main dependencies needed, **Windows 7** or higher and
|
|
|
|
|
**Visual Studio 2015+**. Provided simple installation batch script should do all
|
|
|
|
|
the work on Windows machine. Officially only VS2015 and 32-bit compilation is
|
|
|
|
|
supported, because of hardcoded compile options in installation script. If
|
|
|
|
|
different VS or different platform is needed, the script should be changed to
|
|
|
|
|
appropriate values, which is simple and straightforward.
|
|
|
|
|
appropriate values.
|
|
|
|
|
|
|
|
|
|
Mentioned script is placed in *install* directory alongside supportive scripts
|
|
|
|
|
for UNIX systems and is named *win-build.cmd*. Provided script will do almost
|
|
|
|
@ -356,7 +350,7 @@ $ git clone https://github.com/ReCodEx/broker.git
|
|
|
|
|
$ git submodule update --init
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### Install broker
|
|
|
|
|
#### Installation itself
|
|
|
|
|
|
|
|
|
|
Installation of broker program does following step to your computer:
|
|
|
|
|
|
|
|
|
@ -427,7 +421,7 @@ monitor, but it is only optional. The installation would provide you with script
|
|
|
|
|
of the configuration and usage of fileserver component is much different to our
|
|
|
|
|
other Python parts.
|
|
|
|
|
|
|
|
|
|
#### Configuration and usage
|
|
|
|
|
#### Usage
|
|
|
|
|
|
|
|
|
|
There are several ways of running the ReCodEx fileserver. We will cover three
|
|
|
|
|
typical use cases.
|
|
|
|
@ -594,6 +588,29 @@ $ pip install -r requirements.txt
|
|
|
|
|
this:
|
|
|
|
|
```
|
|
|
|
|
$ python setup.py bdist_rpm --post-install ./cleaner/install/postinst
|
|
|
|
|
```
|
|
|
|
|
- Installing generated package using YUM:
|
|
|
|
|
```
|
|
|
|
|
# yum install ./dist/recodex-cleaner-<version>-1.noarch.rpm
|
|
|
|
|
```
|
|
|
|
|
- Other Linux distributions can install cleaner straight
|
|
|
|
|
```
|
|
|
|
|
$ python setup.py install --install-scripts /usr/bin
|
|
|
|
|
# ./cleaner/install/postinst
|
|
|
|
|
```
|
|
|
|
|
- For Windows installation do following:
|
|
|
|
|
- start `cmd` with administrator permissions
|
|
|
|
|
- run installation with
|
|
|
|
|
```
|
|
|
|
|
> python setup.py install --install-scripts \
|
|
|
|
|
"C:\Program Files\ReCodEx\cleaner"
|
|
|
|
|
```
|
|
|
|
|
where path specified with `--install-scripts` can be changed
|
|
|
|
|
- copy configuration file alongside with installed executable using
|
|
|
|
|
```
|
|
|
|
|
> copy install\config.yml \
|
|
|
|
|
"C:\Program Files\ReCodEx\cleaner\config.yml"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### Usage
|
|
|
|
|
|
|
|
|
@ -621,27 +638,6 @@ $ systemctl start recodex-cleaner.timer
|
|
|
|
|
-c \"C:\Program Files\ReCodEx\cleaner\config.yml\""
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# yum install ./dist/recodex-cleaner-<version>-1.noarch.rpm
|
|
|
|
|
```
|
|
|
|
|
- Other Linux distributions can install cleaner straight
|
|
|
|
|
```
|
|
|
|
|
$ python setup.py install --install-scripts /usr/bin
|
|
|
|
|
# ./cleaner/install/postinst
|
|
|
|
|
```
|
|
|
|
|
- For Windows installation do following:
|
|
|
|
|
- start `cmd` with administrator permissions
|
|
|
|
|
- run installation with
|
|
|
|
|
```
|
|
|
|
|
> python setup.py install --install-scripts \
|
|
|
|
|
"C:\Program Files\ReCodEx\cleaner"
|
|
|
|
|
```
|
|
|
|
|
where path specified with `--install-scripts` can be changed
|
|
|
|
|
- copy configuration file alongside with installed executable using
|
|
|
|
|
```
|
|
|
|
|
> copy install\config.yml \
|
|
|
|
|
"C:\Program Files\ReCodEx\cleaner\config.yml"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### REST API
|
|
|
|
|
|
|
|
|
|
The web API requires a PHP runtime version at least 7. Which one depends on
|
|
|
|
@ -693,7 +689,8 @@ directory of your project:
|
|
|
|
|
$ php -S localhost:4000 -t www
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Then visit `http://localhost:4000` in your browser to see the welcome page of API project.
|
|
|
|
|
Then visit `http://localhost:4000` in your browser to see the welcome page of
|
|
|
|
|
API project.
|
|
|
|
|
|
|
|
|
|
For Apache or Nginx, setup a virtual host to point to the `www/` directory of
|
|
|
|
|
the project and you should be ready to go. It is **critical** that whole `app/`,
|
|
|
|
|