Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Ability to run scripts against the system as a k8s job #9

Open
Anmol1696 opened this issue Oct 28, 2022 · 0 comments
Open
Labels
enhancement New feature or request nice to have Not needed, but is a nice to have

Comments

@Anmol1696
Copy link
Collaborator

Overview

Currently the only way to run scripts that change or update the state of the system are via a script run locally with port forwarded locally.

NOTE: Nice to have feature

We need a way to run a script against the system from inside the k8s cluster itself. This will alow us to get the whole cluster to a desiered state. Example of scripts that we would run via this process:

  • Create inital pools on osmosis that IBC tokens from another chain
  • Upload predefined contracts to the wasm based chain
  • Transfer tokens to some wallets to or ibc token from one chain to another

Design

We run all the jobs
values.yaml

# cat values.yaml
---
jobs:
- name: "Osmosis pool creation script"
  type: "cosmjs" # one of cosmjs or bash type of job
  image: "<custom image>" # default image will be based on the type, can be specificly specified
  scripts: # This will be mounted as a volume to the k8s cluster via configmaps 
  - examples/osmosis-setup/
  run: |  # run will be set as command for the job
    npm install
    npm build
    npm run test
- name: "Move atoms from gaia to persistenceCore"
  type: "bash"
  image: "<custom image>"
  scripts:
  - examples/persistence-gaia-setup.sh
  run: |
    bash ./examples/presistence-gaia-setup.sh
---

Benifits of this would be we can make state setup as part of cluster startup. This is nice feature to have, since we are already able to have external setup scripts that can run against the cluster and get the state to a new stage.

Down the line

These are scripts that set the state of the system, overtime this can be a workflow type of system as well and create DAGs

@Anmol1696 Anmol1696 added enhancement New feature or request nice to have Not needed, but is a nice to have labels Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request nice to have Not needed, but is a nice to have
Projects
None yet
Development

No branches or pull requests

1 participant