hyperweb-io / hyperweb-io/starship
Feature: Ability to run scripts against the system as a k8s job
- Dominant language
- TypeScript
- Stars
- 77
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
## 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`
```yaml
# cat values.yaml
---
jobs:
- name: "Osmosis pool creation script"
type: "cosmjs" # one of cosmjs or bash type of job
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: ""
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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.