Giter VIP home page Giter VIP logo

faasr-examples's Introduction

FaaSr-examples

This repository holds various examples of R functions and workflow configurations for FaaSr that can serve as templates/starting points for new users

Pre-requisites

Make sure you have:

  • FaaSr and dependences installed
  • minioclient installed
  • a GitHub account and PAT token configured

Please check the FaaSr tutorial for more detailed steps on how to do this

Organization and naming

Within each folder, you will find the following files (substitute example in the instructions below appropriately to the example you're working on)

  • R functions (each function in one .R file) that implement each FaaSr function
  • an example.json configuration file that describes the workflow
  • a template env file that has Minio Play S3 test credentials pre-configured, and a template for you to enter your GitHub PAT token

Running an example

  • Clone this FaaSr-examples repository to your Rstudio session
  • Change into the example folder you want to execute
  • Edit example.json and substitute <<YOUR_GITHUB_USER_NAME>> with your github account name (e.g. "johndoe")
  • Edit env and substitute <> withy your PAT (e.g. "ghp_XXX.....XXX")
  • Load the workflow configuration and credentials:
example <- faasr(json_path="example.json", env="env")
  • register the workflow:
example$register_workflow()
  • invoke the workflow:
example$invoke_workflow()

Checking outputs

Each example will have its own specific folder/file names; please refer to the example-specific READMEs for more information

Using your own S3 bucket instead of Minio Play

If you'd rather use your own S3 bucket:

  • Edit your example.json (with a text editor, or the FaaSr workflow builder) to configure your S3 bucket as a data server, e.g.
    "DataStores": {
        "My_Private_Bucket": {
            "Endpoint": "your_endpoint",
            "Bucket": "your_bucket",
            "Region": "",
            "Writable": "TRUE"
        }
    },
  • Edit your env file to enter the corresponding S3 bucket credentials:
My_Private_Bucket_ACCESS_KEY=XXX..............XXX,
My_Private_Bucket_SECRET_KEY=YYY.............................YYY

faasr-examples's People

Contributors

kcratie avatar github-actions[bot] avatar renatof 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.