GithubHelp home page GithubHelp logo

dea-orchestration's Introduction

Introduction

https://travis-ci.org/GeoscienceAustralia/dea-orchestration.svg?branch=master

This repo contains code for managing the automated processing of data within Digital Earth Australia.

It is made up of:

Lambda Functions

  • Make sure the private keys are stored in aws ssm
  • By default the user credentials will be retrieved from the ssm parameters:
  • User: orchestrator.raijin.users.default.user
  • Host: orchestrator.raijin.users.default.host
  • Private Key: orchestrator.raijin.users.default.pkey
  • The prefix orchestrator.raijin.users.default can be overriden with the DEA_RAIJIN_USER_PATH environment variable.
  • When the lambda is configured it will need an associated role with policy permissions to access
the ssm to retrieve parameters and the aws kms decryption key.

Writing a new Lambda function

Raijin Scripts

Raijin scripts folder contain a list of pre-approved commands that are available to run under one of DEA's NCI accounts. Commands in this folder should be locked down to ensure that the user isn't able to execute arbitrary code in our environment.

To Create a new Raijin script

  • create a folder in the raijin_scripts directory with the name of that will be used to invoke the command.
  • Inside the directory is an executable run file which will be called via the executor with the commandline arguments passed into the function.
  • If you require additional files please store them in this directory, for example have a python virtual environment in order to access libraries please store them in this directory.
  • If there is work required to install the command, please create an install.sh file in this directory which is where the code will be executed from following approval.
  • stderr, stdout and exit_code are returned to the lambda function by default
  • An exit code of 127 (command not found) is returned if remote cannot find the command requested.

Running a Raijin Command

  • The entry point to raijin is the ./scripts/remote executable.
  • If you wish to test raijin commands it can be done from this entry point.
    • copy the repository into your NCI environment and from the base folder run ./scripts/remote {{raijin_script_name}} {{args}}

Updating internal modules

  • To update internal modules in your virtual env run pip install --upgrade -r requirements.txt to ensure that your installed copies of the modules are up to date

Repo Script Reference

Collection Installation on Raijin

In order to set up this library on Raijin the user is required to generate 2 ssh keys.

  • One to be able to access the remote script
  • Another to be able to access the git_pull script (to limit how this is triggered)

When adding these keys to ~/.ssh/authorized_keys:

The ssh key for the remote script should be prepended with: command="{{directory_location}}/scripts/remote",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa AA3tEnxs/...E4S+UGaYQ== Running of scripts under NCI

The ssh key for git_pull script should be prepended with: command="{{directory_location}}/scripts/git_pull",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa AA3tEnxs/...E4S+UGaYQ== Automated deployment of dea-orchestration

dea-orchestration's People

Contributors

omad avatar santoshamohan avatar asvincent avatar ashoka1234 avatar harshurampur avatar tom-butler avatar

Watchers

James Cloos 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.