Giter Site home page Giter Site logo

flashflashrevolution / service-heartbeat-checker Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 11 KB

Simple endpoint to determine if FlashFlashRevolution services are up.

License: The Unlicense

Python 70.50% Batchfile 3.60% Shell 10.27% PowerShell 15.63%

service-heartbeat-checker's Introduction

Pixel Dailies - Count via Twitter


Setting up doctl

  • Install doctl manually, or via choco. choco install doctl
  • Authorize doctl. doctl auth init --context customname
  • Switch to the new identity context. doctl auth switch --context customname
  • Install the DigitalOcean sandbox: doctl sls install
  • Connect to your sandbox: doctl sandbox connect

Convert from Template to Function

  • Modify .do/deploy.template.yaml
    • Edit functions/github/repo to your desired repo user/repo.
    • Edit functions/name to your desired function name.
    • Edit name to your desired do function name.

For more details see App Specification Reference and How To - Manage Functions

Project.yml

  • In order to have the unmodified body be passed to your function, be sure to set the following in project.yml.
packages:
  - name: test-serverless
    actions:
      - name: test
        runtime: 'python:default'
        web: raw

Testing - Deploy to DO Function

If you have dependencies in any of the actions, you will need to implement build.<sh|cmd> scripts for your platform.

doctl sls deploy . --incremental

If you'd rather just implement different platform build scripts, then use the following command to keep to one.

doctl sls deploy . --remote-build

Environment Variables

If you have environment variables, add this flag to the deploy command. --env .env

Watch

You may also use incremental directory watching to avoid having to run deployment automatically.

doctl sls watch .

Errors

Error: While deploying action 'some-service/action': Action is named in the config but does not exist in the project

This means that you've forgotten to rename the folder structures that your function lives in. Ex. packagtes/digitalocean-serverless/test.


Deploying to an App

  • Before you deploy to an app you'll need to make build.sh executable if you haven't already. Run git update-index --chmod=+x path/to/build.sh

Renaming an App

Renaming Steps

  • Rename the function folder. packages/myservice/function -> packages/newservice/newfuncname
  • Update project.yml name fields.
  • Update .do/deploy.template.yaml name fields.

Execution Status

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.