Skip to content

Web tool (ruby on rails) providing access to phylotastic services for acquiring species trees.

Notifications You must be signed in to change notification settings

phylotastic/phylotastic-portal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

390b24a · Oct 29, 2022
Jan 6, 2022
Apr 18, 2018
Oct 2, 2019
Sep 30, 2019
Jun 14, 2018
May 6, 2018
Oct 2, 2018
May 1, 2018
Apr 18, 2018
Jun 14, 2018
Jul 25, 2019
Jul 26, 2018
Apr 18, 2018
Mar 14, 2019
Jun 13, 2019
Mar 28, 2018
Apr 18, 2018
May 6, 2018
Oct 29, 2022
Oct 29, 2022
Apr 18, 2018
Apr 18, 2018
May 10, 2018
Jan 6, 2022
Apr 18, 2018
Jan 6, 2022

Repository files navigation

Ruby version

ruby 2.5.0p0 (2017-12-25 revision 61468)* System dependencies

Install ruby 2.5.0 in Ubuntu 22.04 openssl issue: rbenv/ruby-build#1940

How to run the test suite

  • For run all model and controller tests
rake test
  • For run tests in a file
rake test <file>
  • For run system tests
rails test:system

Deployment for dev

  • clone project
git clone git@github.com:phylotastic/phylotastic-portal.git
cd phylotastic-portal
  • install Gem
bundle install
  • create config/initializers/devise.rb

  • create config/database.yml (see config/database.yml.sample)

  • create config/secrets.yml (see config/secrets.yml.sample)

  • create database

rake db:create
rake db:migrate
  • initialize database
rake import:countries
  • start server
rails s -b 0.0.0.0

Deployment by docker and kubernetes instructions

  • Deploy by kubernetes:
docker stack deploy --namespace portal --compose-file docker-compose.yml portal
$ kubectl get services
NAME         TYPE           CLUSTER-IP    EXTERNAL-IP   PORT(S)          AGE
db           ClusterIP      None          <none>        55555/TCP        21m
kubernetes   ClusterIP      10.96.0.1     <none>        443/TCP          35m
redis        ClusterIP      None          <none>        55555/TCP        21m
web          LoadBalancer   10.98.83.41   <pending>     3000:31016/TCP   21m

$ kubectl get deployments
NAME      DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
redis     1         1         1            1           22m
web       1         1         1            1           22m
  • To scale a deployment to 3 Pods:
kubectl scale --replicas=3 deployment/web

Kubernetes dashboard:

kubectl port-forward kubernetes-dashboard-5569448c6d-tb7mj 8443:8443 -n kube-system
  • To check Kubernetes events:
kubectl get events
  • ...