Giter Club home page Giter Club logo

deployed-forecasts's Introduction

CIBR/FLARE Lake Forecast Automatic Deployment

IBM Cloud Functions Deployment

This repository holds JSON configuration files for automated deployment of multiple lake forecasts for the CIBR/FLARE project using OpenWhisk for microservice execution and S3 buckets to store and serve data.

The workflow for forecast users to have a lake forecast automatically deployed is as follows:

Clone, develop, and test your own code repository

The first requirement is for a user to have a stable, tested code repository with the FLARE codebase applied to your lake. Here is an example of the repository for FCRE.

Please follow the forecast code repository documentation to develop your own lake, and make sure your code is tested to run locally (in your own container or virtual machine) before proceeding with automated deployment, as tweaking and debugging an automated deployment is significantly more complex than a local deployment.

Create your json configuration file

To describe an automated deployment, you need to create a .json file with the following format:

{
  "forecast_code": "XXX",
  "config_set": "default",
  "function": "1",
  "configure_run": "configure_run.yml",
  "use_https": "TRUE",
  "aws_default_region": "s3",
  "aws_s3_endpoint": "flare-forecast.org",
  "schedule": "0 */6 * * *"
}

User-provided values (you need to configure these):

Hardwired values for CIBR project team members (make sure you use the pre-configured values below):

  • "function" should be set to "1" for CIBR runs (it specifies the FLARE function to run needs to be set to "1" (the automated deployment will sequence the execution of functions 2, 3, and 4 automatically)
  • "use_https" should be set to "TRUE" for CIBR runs (it specifies whether HTTPS is used ("TRUE") or HTTP is used ("FALSE") for access to the S3 server)
  • "aws_default_region" should be set to "s3" (it specifies the S3 server region)
  • "aws_s3_endpoint" should be set to "flare-forecast.org" (it specifies the S3 server's name)

Generate a pull request for your json file

Step1

Click on the button to fork the repo

Step2

Make sure top-left corner shows that this repo is forked from original repo. Click on Add file and Create new file buttons to create your own json file.

Step3

Edit and Commit your own json file with specific format.

Step 4

After creating all json files, we are going to create the pull request to the repo. Click on the pull request button from top menu. Then, click on the New Pull Request Button to create the pull request.

Make sure your repo and branch is correct. Click on GREEN "create pull request" button. Add commit message if you want to. Then, click on GREEN "create pull request" button.

If you see this page, it means that you have created the pull request. Once the moderator of the repo checks your json file, your pull request will be accepted and merged. Then, the ibmcloud will be deployed automatically.

Retroactive Run Deployment

To run lake forecasts in a period in the past, follow these steps:

1- Fork the forecast code repository for the lake into your GitHub account. For instance, fork https://github.com/FLARE-forecast/FCRE-forecast-code.

2- Edit the following file in your newly forked repository and change the sim_name, start_datetime and forecast_start_datetime as you need. Different forecast projects on a single lake are distinguished by their sim_name. So, choose a unique name to avoid overwriting previous runs.

  • configuration/default/configure_run.yml

For instance:

restart_file: .na
start_datetime: 2020-12-01 00:00:00
end_datetime: .na
forecast_start_datetime: 2020-12-02 00:00:00
forecast_horizon: 0
sim_name: fcre_2021
configure_flare: configure_flare.yml
configure_obs: observation_processing.yml
use_s3: TRUE

start_datetime is usually a day behind forecast_start_daytime. For a cold start without a restart_file, it is highly recommended to set the forecast_start_datetime earlier than the actual start date of the desired forecast period. The results for these early days are not as accurate as the rest of the forecast period and you can discard them later.

3- Now you can apply your desired changes to the rest of the codebase and tweak the forecast parameters in the configuration files.

4- Create a new JSON file, fcre-2021.json, for instance, and add the following content and modify it to reflect your desired retroactive forecast run. number_of_runs is the duration of the forecast period in days plus the cold start days. forecast_code_branch and forecast_code_commit are optional and you may want to leave them blank.

{
  "forecast_code": "https://github.com/vahid-dan/FCRE-forecast-code",
  "forecast_code_branch": "main",
  "forecast_code_commit": "ad1e68a91e3ec4acd8af8a71eaf84a3a34740079",
  "config_set": "default",
  "function": "0",
  "configure_run": "configure_run.yml",
  "use_https": "TRUE",
  "aws_default_region": "s3",
  "aws_s3_endpoint": "flare-forecast.org",
  "number_of_runs": 395
}

5- Send the JSON file to Yun-Jung via email (y.ku at ufl dot edu). She will verify your JSON file and get back to you with more information about the retroactive run start time.

6- The outputs of the retroactive run will start to show up in the flare-forecast S3 storage as soon as they are generated. For example, for FCRE, the forecasts are located at forecasts/fcre. It may take a while before all the outputs for the whole specified period is ready.

deployed-forecasts's People

Contributors

yun-jung avatar vahid-dan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.