Skip to content

Stevenans985900/Script-Actions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Scripts Actions Documentation

Documentation and scripts examples for the Script Actions App

Description

Run or schedule powerful well tested shell scripts from your phone in a secure temporary execution cloud environment. It is a unique solution that provides easy and fast access in a secure execution environment with +100 Linux commands and tools available to use them from the phone with one tap! No laptops, no servers needed.

You can build, sell, load and execute scripts from public or private repositories.

Security

Each execution environment is dedicated with isolated storage, hardware and networking resources. The networking allows outbound traffic but inbound traffic is blocked. Following the best practices, we are not storing credentials, API keys or other secrets. This information is injected on-demand in the temporary execution environment which is destroyed after the execution. Everything is protected behind an OAUTH 2.0 Authentication MFA enabled layer.

If you interesting for a PaaS license (private infrastructure) please contact us from the contact form in-app.

Use cases examples

How to build and test your scripts

Requirements

  • You need a Private or Public GIT repository. If your repository is private, don't forget to set its SSH key in-app secret manager.
  • Be sure the code size in your branch must not exceed 15MB.
  • Your code execution duration must not exceed the max execution time of your plan (5 - 20 mins), otherwise the application will terminate it.
  • Local Docker engine. (See How to install it)
  • GIT (See how to install git for windows)
  • Development skills.

Steps

  1. Create your Git repository and clone it locally. If is private you can use a separate SSH key for this project and clone it with a command like

    GIT_SSH_COMMAND="ssh -i ~/.ssh/your-key " git clone git@github.com:youraccount/private-repo.git

    or set core.sshCommand:

    git config core.sshCommand "ssh -i ~/.ssh/id_rsa_example -F /dev/null"

  2. Edit the .env file and set your reporitory details.

  3. Run your script to test it locally:

    Syntax example for public repository:

    docker run -it --rm --env-file .env itforgeuk/scriptactions:latest sh -c '/checkrepo.sh && chmod 755 /tmp/run.sh && /tmp/run.sh'

    Syntax example for private repository:

    docker run -it --rm --env-file .env -v ~/.ssh/your_ssh_key:/tmp/.ssh/id_rsa itforgeuk/scriptactions:latest sh -c '/checkrepo.sh && chmod 755 /tmp/run.sh && /tmp/run.sh'

    Syntax example with Google Cloud Service Account authentication docker run -it --rm --env-file .env -v /full/path/google-auth.json:/tmp/google-auth.json itforgeuk/scriptactions:latest sh -c '/checkrepo.sh && chmod 755 /tmp/run.sh && /tmp/run.sh'

    Syntax example with Kubernetes authentication docker run -it --rm --env-file .env -v ~/.kube/config:/tmp/kubeconfig itforgeuk/scriptactions:latest sh -c '/checkrepo.sh && chmod 755 /tmp/run.sh && /tmp/run.sh'

Tips

  • Try to minify your script output to get a more practical output in your app.
  • Avoid build steps in your script that can produce data size over limits and slow execution.
  • Test your credentials as env variables which will be the alternative of secrets manager in the app. DO NOT include them in your script only in .env file.

How to run your scripts in app

Your script is well tested and published to your repo. You can now add it in the app:

drawingdrawing

  1. Set your git repository in the "GIT repo" app field. The format for public github repos is:

    https://github.com/yourrepo/yourproject

    or for private repos:

    git@github.com:yourrepo/yourproject

  2. Set your branch, tag or commit hash in the app field.

  3. Set your script path in the app field. Do not start with '/'.

  4. Be sure you have the necessary credentials set in the secret manager.

  5. Set a shedule run if you like.

  6. Save

  7. Your script is ready. Now you can do changes in the repo without edit the action in the app.

Questions

If you read all the above but you still have a question you can write us

About

Script Examples for Script Actions App

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Shell 100.0%