Skip to content

Public Website and Oracle Cloud

Andrew Elmore edited this page Apr 14, 2025 · 6 revisions

Here are detailed instructions on how control and deploy the genotype-phenotype-api using oracle cloud.

Oracle Cloud Access

  • If you wish to have a Oracle Cloud account, please contact Weili Qiu [email protected].
  • To get access to the VM instance running the genotype-phenotype-map, please contact Andrew Elmore [email protected]

Deploying Changes

Code changes

The docker images should be built when merging code into the main branch. Once these are built, and you are happy with the changes...

  1. ssh -i ~/.ssh/oracle_gpm_vm.key [email protected]
  2. docker compose pull
  3. docker compose up -d

Changes to the genotype-phenotype-map pipeline and database will NOT be done from this repository, but from this one

DB and data changes

docker compose down, copy over the files, docker compose up? Also make sure all finemapped files are there too?

VM and Attached Volume Setup

All cloud infrastructure will be in the 'UK South (London)' region, please make sure you are there.

As of now, we will only be running this on one server. If we need to scale in the future, we can add a load balancer for multiple boxes.

Creating a new VM instance is straightforward, just follow the instructions on 'Create a VM instance', ensure you are in the GPMap compartment, and attach a volume. The volume needs to be pretty large due to all the data it will be accessing (maybe 3 TB).

The volume will not be mounted by default. Please follow these instructions.

First, in the oracle cloud website, navigate to the server, and then to the 'Attached Block Volumes'. Click on the 3 dots of the attached volume, and click 'iSCSI commands & information'. Copy the commands to connect (iscsiadm commands). Run those on the CLI of the oracle instance.

Second, you will need to create a partition, ext3 filesystem, and mount the disk to /dev/sdb. Follow the steps from this documentation:

Third, you will need to install docker, docker-compose and git.

VM Setup

Installing stuff on VM

Install docker and docker compose:

  • sudo dnf -y install dnf-plugins-core
  • sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
  • sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  • sudo systemctl enable --now docker
  • sudo docker run hello-world

Rsync: rsync on Oracle Linux is an older version that doesn't allow subdirectory creation. To update, you'll need to manually update it

sudo dnf groupinstall "Development Tools" -y
sudo dnf install perl python3 popt-devel zlib-devel -y
wget https://download.samba.org/pub/rsync/src/rsync-3.4.1.tar.gz
tar -xvf rsync-3.4.1.tar.gz
cd rsync-3.4.1
./configure --disable-xxhash --disable-lz4
make
sudo make install
./rsync --version

Exposing VM to the internet

First, you need to add rules to your subnet ingress detailed here.

Then you need to open firewall ports on the VM:

sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd --add-service=ssh --permanent
sudo firewall-cmd --reload

Or if using iptables

sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
sudo iptables-save | sudo tee /etc/sysconfig/iptables