overture-stack / dms

Overture Data Management System
GNU Affero General Public License v3.0
0 stars 1 forks source link

Download All Images Earlier in the Script Before Deployment #146

Closed b-f-chan closed 3 years ago

b-f-chan commented 3 years ago

While testing with Mac, it was found that the current process for downloading the images for all the Overture services is not ideal, often taking too long and causing timeouts depending on the user's system resources, internet connection etc.

Currently, only the DMS image is pulled at the start of the script. All the individual service images are downloaded on the fly as the deployment process starts. If the user's bandwidth or connection speed is low, the process can timeout because some images are very large. Additionally, some services are dependent on others being deployed first, so if an image is not downloaded yet, this further extends deploy time. The timeout and retry value in the config.yaml can be adjusted, but this is still not a sure way to guarantee all the images are downloaded.

For example, on MacOS with 4 CPU cores and 12 GB RAM, on 40 Mbps download connection speed, the large images took as follows:

Download speed was noticeably faster testing on a Dell Linux machine with 300 Mbps download connection, but not all users will have access to such a fast connection.

Proposed Solution: Solution proposed is to change the download trigger points. Instead, download all the images at the start of the script, either before or as part of the configuration steps, so that they are ready BEFORE deploy even starts and do not risk deployment failure.

b-f-chan commented 3 years ago

Tested on Mac with these specs:

Summary:

Specific Issues:

  1. As mentioned, DMS-UI not starting
  2. Additionally, the logo asset directory is not being set correctly, it is still prefixed with /home/ubuntu, but should instead detect and use the Mac home directory
dmsUI:
  hostPort: 8000
  url: "http://localhost:80/dms-ui"
  adminEmail: "bfcwork2018@gmail.com"
  ssoProviders: "GOOGLE,GITHUB,LINKEDIN,ORCID"
  labName: "Ogre Genomics"
  logoFileName: "dms_logo.jpg"
  assetsDir: "/home/ubuntu/.dms/assets"

Timing results

Due to this new change, images are pulled at the beginning of the dms cluster startcommand, before any services are actually deployed:

Additional feedback:

b-f-chan commented 3 years ago

Tested fixes on new snapshot:

Closing