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

improvements: custom scripts #106

Closed
Tracked by #174
Anmol1696 opened this issue May 30, 2023 · 2 comments · Fixed by #181
Closed
Tracked by #174

improvements: custom scripts #106

Anmol1696 opened this issue May 30, 2023 · 2 comments · Fixed by #181

Comments

@Anmol1696
Copy link
Collaborator

Overview

Currently all scripts being run inside the chain and relayers are default and available in the scripts/ dir in the chart.

Proposal

Make this customizable by pushing the scripts to the values.yaml

chains:
  - name: gaia-1
    type: cosmos
    numValidators: 2
    build:
      enabled: true
      source: v1.0.1
      script: scripts/build_chain.sh
    scripts:
      genesis: scripts/setup_genesis.sh
      config: scripts/setup_config.sh
      validator: scripts/create_validator

The bash scripts should be built ontop of the current scripts, since that has the correct path information as well as the environment variables exposed to them.

@Anmol1696
Copy link
Collaborator Author

Anmol1696 commented Aug 14, 2023

It is not possible to provide a file outside of values.yaml file to the helm chart, hence simple genesis: scripts/setup_genesis.sh wont be able to work.

What we could do is, create a structure in which the user only provides the file name, and during the helm install command we use --set-file to set a data value into .Values, and create chain specific configmaps from that.
Default scripts can still be used.

This would require:

  • install.sh script to be used instead of helm install, so that we can parse helm to run the helm install commands properly
  • create configmaps for setup-scripts that is chain specific: {chain-name}-setup-scripts

NOTE: Leaning more and more to a custom config parser, that we want to expose to the users of Starship. Maybe the output of the parser can be a helm values.yaml file that we can use with our helm charts.

@Anmol1696
Copy link
Collaborator Author

Use this concept for adding feature for adding $CHAIN_DIR with configmaps created from tar.gz files, which are mounted to the data dirs for the chains.

Size constraints for configmaps is 1MiB.

Optionally we need the ability to be able to pull the files from a link as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant