|
|
Hello |
|
|
\ No newline at end of file |
|
|
```zsh
|
|
|
_ _
|
|
|
| | | _____ ____
|
|
|
/\ | | |/ ____|/ __ \
|
|
|
/ \ | | | | __| | | |
|
|
|
/ /\ \ | | | | |_ | | | |
|
|
|
/ ____ \| | | |__| | |__| |
|
|
|
/_/ \_\ | |\_____|\____/
|
|
|
|_|_|
|
|
|
|
|
|
```
|
|
|
|
|
|
# What is Allgo?
|
|
|
Allgo is a web infrastructure to deploy online scientific algorithms, it has been made to be quick and easy. Our goal is to reduce the cost of a transfer between a researcher's computer and final users (e.g. team members, scientific community, startups). Deploying apps has never been that easy using our Web interface and API.
|
|
|
|
|
|
Concerning the technologies used, we're base on the framework [Ruby on Rails](http://rubyonrails.org/) to develop our website and the REST API. To manage the algorithms we're using [Docker](https://www.docker.com/), a tool allowing us to manage application images, and [Docker Swarm](https://www.docker.com/docker-swarm) to manage our cluster.
|
|
|
|
|
|
Allgo gives to users the possibility to create jobs, which are operation with one or multiple inputs giving a result depending of the algorithm/app chosen.
|
|
|
|
|
|
# Infrastructure
|
|
|
![infrastructure](http://gitlab.irisa.fr/uploads/charly.maupetit/rails-allgo/25e0900ad2/infrastructure.png)
|
|
|
|
|
|
All our machines are running on Debian 8.
|
|
|
|
|
|
## Webapp
|
|
|
It contains the Web application, the datastore and the Swarm master to manage the cluster. It depends on Ruby 2.2.2-dev, Nginx, MariaDB, Ruby + Rails via rvm, Capistrano, redis, git, zip, curl, sudo.
|
|
|
|
|
|
## Cargo
|
|
|
Cargo runs the Docker image [registry](https://registry.hub.docker.com/_/registry/) which allow us to store private Docker images. We use a NAS to replicate the created images in case of an accident with our main server.
|
|
|
|
|
|
## Node<x>
|
|
|
A node is a server that executes jobs created by users on Allgo. It receives order from the Swarm manager (contained in the Webapp machine) through TCP and send pull requests to Cargo. The datastore from Webapp is mounted through ssh so that Worker can write in it.
|
|
|
As we do not have an HTTPS certification yet, we added a link to Cargo in the configuration file of all the workers to pull images from Cargo instead of Docker Hub.
|
|
|
|
|
|
## Sandbox
|
|
|
It's working like a worker, but it is also used when an application is created. It will create the docker image from the instructions given and push it into Cargo.
|
|
|
|
|
|
# Installation
|
|
|
Everything is in a `Vagrantfile`, you just need to install [Vagrant](https://www.vagrantup.com/) and run a `vagrant up` in `rails-allgo/deploy/` to have an up and running development environment. The thing you'll need after that is to create and migrate the database and then run the Rails app. Do a `vagrant ssh webapp` followed by these commands:
|
|
|
|
|
|
```zsh
|
|
|
$ cd allgo/
|
|
|
$ rake db:create ( RAILS_ENV=production )
|
|
|
$ rake db:migrate ( RAILS_ENV=production )
|
|
|
$ rails s -b 192.168.50.2
|
|
|
|
|
|
On another tab, do:
|
|
|
```zsh
|
|
|
$ cd allgo/
|
|
|
$ bundle exec sidekiq
|
|
|
```
|
|
|
|
|
|
The first time you'll create an application Sidekiq and Rails will ask you passwords, be careful and enter `vagrant` when a password is asked.
|
|
|
|
|
|
To learn more about the configuration of our machines, check the files in `rails-allgo/deploy/`. |
|
|
\ No newline at end of file |