Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OntoPortal Deployment

This repository contains the Capistrano-based deployment system for the three OntoPortal components:

  • OntoPortal Web UI (ontoportal_web_ui)
  • Ontologies API (ontologies_api)
  • NCBO Cron (ncbo_cron)

It supports deployment to production and pre-production environments with a simple command-line script.

Note: This is an anonymized template. All secrets, keys, hostnames, emails and organization details have been replaced with CHANGE_ME_* placeholders (or removed, in the case of private keys and encrypted credentials). Fill them in with your own values before deploying.

Quick Start: Deploy in One Command

From the root of this repository, run:

./deploy.sh <application> <stage>

Examples

# Deploy with full name of apps in production and pre_production servers
./deploy.sh ontoportal_web_ui production
./deploy.sh ontologies_api pre_production
./deploy.sh ncbo_cron production

# Use short aliases (UI, API, CRON)
./deploy.sh UI production
./deploy.sh API pre_production
./deploy.sh CRON production

How to use it inside the server

If this repository is private, clone it on the server using a Personal Access Token (PAT).

Inside the server do:

# with user ontoportal
git clone https://<PAT_TOKEN>@github.com/your-org/ontoportal_deployment.git
cd ontoportal_deployment
./deploy.sh <application> <stage>

Project Structure

.
├── deployment/                 # Capistrano project (Ruby-based)
│   ├── Capfile                # Capistrano entry point
│   ├── Gemfile                # Ruby dependencies
│   └── config/
│       ├── deploy.rb          # Main deployment logic
│       ├── apps/              # App-specific settings (repo, etc.)
│       │   ├── ontoportal_web_ui.rb
│       │   ├── ontologies_api.rb
│       │   └── ncbo_cron.rb
│       └── deploy/            # Environment definitions
│           ├── production.rb
│           └── pre_production.rb
├── projects_configs/          # Environment-specific config files
│   ├── ontoportal_web_ui/
│   │   ├── production/config/
│   │   └── pre_production/config/
│   ├── ontologies_api/
│   │   ├── production/config/
│   │   └── pre_production/config/
│   └── ncbo_cron/
│       ├── production/config/
│       └── pre_production/config/
├── deploy.sh                  # Main deployment script (use this!)
└── README.md

Key Directories

Directory Purpose
deployment/ Contains the Capistrano automation code (Ruby)
projects_configs/ Holds environment-specific configuration files that get uploaded during deploy (e.g., database.yml, settings.rb)
deployment/config/apps/ Defines Git repo, app name, and other per-project settings
deployment/config/deploy/ Defines servers, branches, and environment settings (production vs pre_production)

How It Works

  1. You run ./deploy.sh UI production
  2. The script:
    • Validates inputs
    • Normalizes UIontoportal_web_ui
    • Changes into deployment/
    • Installs Ruby gems (into vendor/bundle)
    • Runs: APP=ontoportal_web_ui bundle exec cap production deploy
  3. Capistrano:
    • Clones the correct Git repo
    • Uploads configs from projects_configs/ontoportal_web_ui/production/config/
    • Symlinks shared files
    • Restarts the service (systemctl restart ontoportal_web_ui.service)

Requirements on the server

  • Ruby 3.1+ (managed via rbenv on target servers)
  • SSH access to target servers as the ontoportal user
  • Internet access (to clone Git repos and install gems)

Notes

  • To add a new application, create:
    • deployment/config/apps/<app_name>.rb
    • projects_configs/<app_name>/production/config/
    • projects_configs/<app_name>/pre_production/config/
  • To add a new environment, create:
    • deployment/config/deploy/<env_name>.rb
    • Update VALID_STAGES in deploy.sh
  • Config files in projects_configs/ are copied as-is to the app’s release_path during deploy.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages