ORD Web Editor¶
The ORD hosts an interactive web editor for Reaction and Dataset protos
on Google Cloud Platform (GCP); it is available at
https://editor.open-reaction-database.org.
This document describes the setup and deployment process for GCP.
Update the docker image¶
If the editor code has changed, you will need to update the docker image on Docker Hub (link). Before starting, make sure that you have installed all of the required dependencies.
Note
This updates the latest tag for the ord-editor image. To set a different
tag add “:<tag>” to the end of the name; for example
openreactiondatabase/ord-editor:v0.0.0.
$ cd "${ORD_SCHEMA_ROOT}/editor"
$ make package
$ docker build -t openreactiondatabase/ord-editor .
$ docker push openreactiondatabase/ord-editor
Create a new VM instance¶
Note
Only one instance at a time can access a persistent disk. If there is an existing instance, make sure to (1) remove the instance from the instance group and (2) shut down (and delete) the instance.
In the VM instances page, click “Create instance”
Choose “New VM instance from template” from the side panel
Select
ord-editor-templateand click “Continue”This template sets the container image as well as tags for firewall rules and metadata for Cloud Logging
Edit the new instance configuration:
Choose a better name
Expand “Management, security, disks, networking, sole tenancy”
On the “Disks” tab, click “Attach existing disk”
Disk ->
ord-editor-dataLeave all other options at their default values
Click “Done”
Expand the “Advanced container options”
Under “Environment variables”, add
ORD_EDITOR_DB=/mnt/disks/ord-editor-dataUnder “Volume mounts”, add a new volume:
Volume Type -> Disk
Mount path ->
/mnt/disks/ord-editor-dataDisk name ->
ord-editor-dataMode -> Read/write
Click “Done”
Click “Create” to initialize the VM
Expose the editor to the web¶
Navigate to Instance groups in the GCP console
Click on
editor-instance-groupClick on “Edit Group”
Select the new instance under “Add an instance”
Click “Save”