Skip to main content

OFX Cloud Sync

Tool which allows syncing of OrcaFlex simulation files to the cloud and back to local drives.

Requirements

To use this you will need:

  1. Python 3.6+ installed on all servers and local machines
  2. Cloud Key ID, Secret and Bucket (these can either be from your own AWS account or you can request some from us)

Installing

Using pip

pip install orcaflex-cloudsync

User guide

Introduction

This tool tries to solve the problem of running OrcaFlex simulations on remote servers but then wanting to have the simulation files on a local machine for viewing/processing. There are a few reasons you might want this:

  • remote desktop wars with other users
  • corporate VPN making everything terrible
  • cloud servers within a private network with no remote access

Our solution to this comes in the form of a command line tool called ofxcs combined with a post calculation action script in OrcaFlex.

Configuring

If you have successfully installed the tool with pip then you should be able to type:

ofxcs

and see something like:

Usage: ofxcs [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...

  Command line interface to orcaflex-cloudsync.

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  add        add a folder to sync
  configure  configures orcaflex-cloudsync
  keygen     generates a keyfile used to encrypt simulation data
  remove     stop syncing a folder
  show       shows the current config
  sync       sync files from cloud to local drive


Configuring

YOU WILL NEED TO INSTALL AND CONFIGURE ON EVERY MACHINE THAT YOU WANT TO RUN SIMULATIONS OR SYNC SIMULATIONS LOCALLY

The ofxcs tool will guide you through configuration:

ofxcs configure

Will ask a series of questions:

  1. It will ask you to enter your cloud key details, bucket and the region that your bucket is based in
  2. It will ask you where you want to copy the post calculation action script. You will need to point to this from all your models
  3. It will ask where you want to save local simulations when they are synced back to your local drive
  4. It will ask you if you have a key file. See section below for more details.

Encryption

Access to your bucket is restricted only to people who have access to the cloud key and secret and the administrator of the cloud account. Encryption allows you to ensure that your stored simulation files can only ever be read by people in your company.

This is done with a key file, you can generate these with:

ofxcs keygen

This will save a key file and optionally it will update the local config to point to the key file.

IMPORTANT: You should only do this once for your company and then share the key file internally and have each user configure their system with this key file. If you lose the key file there will be no way to decrypt the simulation files stored in the cloud.

Now you have configured ofxcs you can start to sync simulations to the cloud.

Post-calculation actions

In every model you want to sync you must specify a Post calculation action. Action type needs to be In-process Python and version must be Python 3.

The Script File Name is wherever you saved the file during the ofxcs configure process above.

NOTE: The default location for pca_ofx2cloud.py is based on your local user profile and may be different on remote computers. It might be easier to move the file to somewhere like C:\pca_ofx2cloud.py so it will be consistent on all machines.

You also need to add a tag on General of FOLDER in every model. This is how your simulations will be organised in the cloud. The folder name can contain only alphanumeric and the following special characters:

! - _ . * ' ( )

With ofxcs configured and post calculations specified, simulations run in batch processing or distributed OrcaFlex will be automatically uploaded to the cloud.

Local sync

Now you want to sync them to you local machine. You start by adding the folders that you specified in the models:

ofxcs add --folder my_ofx_project

There is no need to add the folders every time you start the sync, it will remember which folders you want.

You can then run the sync command:

ofxcs sync

The syncing operation will continue until you stop it by killing the process or pressing CRTL+C.

If you want to see what folders are currently set to sync:

ofxcs show
{'bucket': 'xxx000',
 'root_folder': 'C:\\Users\\username\\AppData\\Local\\agiletek\\ofx-cloudsync\\ofxsync',
 'sync': ['my_ofx_project']}

To remove a folder (stop syncing it)

ofx remove --folder my_ofx_project

will stop syncing but not delete the local files, whereas:

ofxcs remove --delete --folder my_ofx_project

deletes the folder locally.

Roadmap

Next steps for development:

  1. Proper logging
  2. Simple GUI

Help/support

If you have any questions or need any help with this package then contact ofxcs@agiledat.co.uk

Metadata

Release files for orcaflex-cloudsync 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for orcaflex-cloudsync 0.2.5
File Size Uploaded
orcaflex-cloudsync-0.2.5.tar.gz 11.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for orcaflex-cloudsync 0.2.5
File Interpreter ABI Platform
orcaflex_cloudsync-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 21.5 kB

Release files / orcaflex-cloudsync-0.2.5.tar.gz

Download URL orcaflex-cloudsync-0.2.5.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8884f139767694367e53264ea6ee6fb0f4b276c4163ebae15d037824c7e78299
BLAKE2b-256 checksum
How to use checksums
ccfb921e1bd46a1013ad1de9312a16415cdc4982f79497041927fabd48f0baee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.6.5 Linux/4.19.95-flatcar

Release files / orcaflex_cloudsync-0.2.5-py3-none-any.whl

Download URL orcaflex_cloudsync-0.2.5-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d991b7d6fea3bcb6c07e607799644a9682ea22de763c7632e43441b6b8a1fb5
BLAKE2b-256 checksum
How to use checksums
8e0b383eaf93214a01eac67bb310a1cf21e879490207c65eec1031d1a7475f2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.6.5 Linux/4.19.95-flatcar

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page