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

Automatic documentation #915

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
version: v7.0.0
- project: assetmantle
version: v1.0.0
- project: autonomy
version: v1.2.1
- project: axelar
version: v0.34.0
- project: bandchain
Expand Down Expand Up @@ -54,18 +52,12 @@ jobs:
version: v4.2.9
- project: decentr
version: v1.6.4
- project: defund
version: v0.1.0-alpha
- project: desmos
version: v6.2.0
- project: dig
version: v3.3.1
- project: dydx
version: v7.0.1
- project: dymension
version: v3.1.0
- project: elysnetwork
version: v0.29.12
- project: emoney
version: v1.2.0
- project: empowerchain
Expand Down Expand Up @@ -126,7 +118,7 @@ jobs:
version: v5.1.1
- project: rizon
version: v0.4.1
- project: seinetwork
- project: sei
version: v5.7.5
- project: sentinel
version: v0.11.5
Expand All @@ -152,8 +144,6 @@ jobs:
version: v6.3.0
- project: ununifi
version: v4.0.1
- project: vidulum
version: v1.2.0
- project: xpla
version: v1.6.0
steps:
Expand All @@ -172,7 +162,7 @@ jobs:
run: |
touch .env # Create dummy env file
cd ${{matrix.project}}
docker buildx bake -f build.yml --set node_1.tags=ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/}-${{matrix.project}}-${{matrix.version}}${{matrix.tag_suffix}} --push
docker buildx bake -f build.yml --set node.tags=ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/}-${{matrix.project}}-${{matrix.version}}${{matrix.tag_suffix}} --push
build_generic:
runs-on: ubuntu-latest
strategy:
Expand All @@ -194,4 +184,4 @@ jobs:
run: |
touch .env # Create dummy env file
cd generic
docker buildx bake -f build.yml --set node_1.tags=ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/}-generic --push
docker buildx bake -f build.yml --set node.tags=ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/}-generic --push
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
run: |
touch .env # Create dummy env file
cd ${{matrix.project}}
docker buildx bake -f build.yml --set node_1.tags=node
docker buildx bake -f build.yml --set node.tags=node
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ ARG VERSION
ARG REPOSITORY
ARG BUILD_CMD="make install"
ARG BUILD_DIR=/data
ARG BUILD_REF=$VERSION

RUN git clone $REPOSITORY /data
WORKDIR $BUILD_DIR
RUN git checkout $VERSION
RUN git checkout $BUILD_REF

#
# Optional build environment for Starport chains
Expand Down
59 changes: 46 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ tagged with the form `$COSMOS_OMNIBUS_VERSION-$PROJECT-$PROJECT_VERSION`.
|[akash](https://github.com/akash-network/node)|`v0.36.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-akash-v0.36.0`|[Example](./akash)|
|[archway](https://github.com/archway-network/archway)|`v7.0.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-archway-v7.0.0`|[Example](./archway)|
|[assetmantle](https://github.com/AssetMantle/node)|`v1.0.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-assetmantle-v1.0.0`|[Example](./assetmantle)|
|[autonomy](https://github.com/AutonomyNetwork/autonomy-chain)|`v1.2.1`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-autonomy-v1.2.1`|[Example](./autonomy)|
|[axelar](https://github.com/axelarnetwork/axelar-core)|`v0.34.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-axelar-v0.34.0`|[Example](./axelar)|
|[bandchain](https://github.com/bandprotocol/chain)|`v2.5.1`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-bandchain-v2.5.1`|[Example](./bandchain)|
|[bitcanna](https://github.com/BitCannaGlobal/bcna)|`v3.1.1`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-bitcanna-v3.1.1`|[Example](./bitcanna)|
Expand All @@ -65,12 +64,9 @@ tagged with the form `$COSMOS_OMNIBUS_VERSION-$PROJECT-$PROJECT_VERSION`.
|[cronos](https://github.com/crypto-org-chain/cronos)|`v1.3.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-cronos-v1.3.0`|[Example](./cronos)|
|[cryptoorgchain](https://github.com/crypto-org-chain/chain-main)|`v4.2.9`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-cryptoorgchain-v4.2.9`|[Example](./cryptoorgchain)|
|[decentr](https://github.com/Decentr-net/decentr)|`v1.6.4`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-decentr-v1.6.4`|[Example](./decentr)|
|[defund](https://github.com/defund-labs/defund)|`v0.1.0-alpha`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-defund-v0.1.0-alpha`|[Example](./defund)|
|[desmos](https://github.com/desmos-labs/desmos)|`v6.2.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-desmos-v6.2.0`|[Example](./desmos)|
|[dig](https://github.com/notional-labs/dig)|`v3.3.1`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-dig-v3.3.1`|[Example](./dig)|
|[dydx](https://github.com/dydxprotocol/v4-chain)|`v7.0.1`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-dydx-v7.0.1`|[Example](./dydx)|
|[dymension](https://github.com/dymensionxyz/dymension)|`v3.0.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-dymension-v3.1.0`|[Example](./dymension)|
|[elysnetwork](https://github.com/elys-network/elys)|`v0.29.12`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-elysnetwork-v0.29.12`|[Example](./elysnetwork)|
|[emoney](https://github.com/e-money/em-ledger)|`v1.2.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-emoney-v1.2.0`|[Example](./emoney)|
|[empowerchain](https://github.com/empowerchain/empowerchain)|`v2.0.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-empowerchain-v2.0.0`|[Example](./empowerchain)|
|[evmos](https://github.com/evmos/evmos)|`v20.0.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-evmos-v20.0.0`|[Example](./evmos)|
Expand Down Expand Up @@ -101,7 +97,7 @@ tagged with the form `$COSMOS_OMNIBUS_VERSION-$PROJECT-$PROJECT_VERSION`.
|[persistence](https://github.com/persistenceOne/persistenceCore)|`v10.3.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-persistence-v10.3.0`|[Example](./persistence)|
|[regen](https://github.com/regen-network/regen-ledger)|`v5.1.1`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-regen-v5.1.1`|[Example](./regen)|
|[rizon](https://github.com/rizon-world/rizon)|`v0.4.1`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-rizon-v0.4.1`|[Example](./rizon)|
|[seinetwork](https://github.com/sei-protocol/sei-chain)|`v5.7.5`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-seinetwork-v5.7.5`|[Example](./seinetwork)|
|[sei](https://github.com/sei-protocol/sei-chain)|`v5.7.5`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-sei-v5.7.5`|[Example](./sei)|
|[sentinel](https://github.com/sentinel-official/hub)|`v0.11.5`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-sentinel-v0.11.5`|[Example](./sentinel)|
|[shentu](https://github.com/certikfoundation/shentu)|`v2.11.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-shentu-v2.11.0`|[Example](./shentu)|
|[sifchain](https://github.com/Sifchain/sifnode)|`v1.4.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-sifchain-v1.4.0`|[Example](./sifchain)|
Expand All @@ -114,7 +110,6 @@ tagged with the form `$COSMOS_OMNIBUS_VERSION-$PROJECT-$PROJECT_VERSION`.
|[terra](https://github.com/terra-money/core)|`v2.11.8`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-terra-v2.11.8`|[Example](./terra)|
|[umee](https://github.com/umee-network/umee)|`v6.3.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-umee-v6.3.0`|[Example](./umee)|
|[ununifi](https://github.com/UnUniFi/chain)|`v4.0.1`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-ununifi-v4.0.1`|[Example](./ununifi)|
|[vidulum](https://github.com/vidulum/mainnet)|`v1.2.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-vidulum-v1.2.0`|[Example](./vidulum)|
|[xpla](https://github.com/xpladev/xpla)|`v1.6.0`|`ghcr.io/akash-network/cosmos-omnibus:v0.4.33-xpla-v1.6.0`|[Example](./xpla)|

## Example configurations
Expand Down Expand Up @@ -149,15 +144,15 @@ See the [_examples](./_examples) directory for some common setups, including:
## Configuration

Cosmos blockchains can be configured entirely using environment variables instead of the config files.
Every chain has its own prefix, but the format of the configuration is the same.
Every chain has its own namespace, but the format of the configuration is the same.

For example to configure the `seeds` option in the `p2p` section of `config.toml`, for the Akash blockchain:

```
AKASH_P2P_SEEDS=id@node:26656
```

The namespace for each of the supported chains in the cosmos omnibus can be found in the `README` in each project directory.
The namespace for each of the supported chains in the cosmos omnibus can be found in the `README` in each project directory. In all cases it is the binary name in uppercase (e.g. `akash` -> `AKASH`, `gaiad` -> `GAIAD` etc).

The omnibus images allow some specific variables and shortcuts to configure extra functionality, detailed below.

Expand Down Expand Up @@ -327,10 +322,48 @@ See [Cosmos docs](https://docs.tendermint.com/master/nodes/configuration.html) f

## Contributing

Adding a new chain is easy:
Adding a new chain is easy, but there are a few steps you need to follow:

- Ideally source or setup a `chain.json` to provide a single source of truth for chain info
- Add a project directory based on the existing projects
- Update the [github workflow](https://github.com/akash-network/cosmos-omnibus/blob/master/.github/workflows/publish.yaml) to create an image for your chain
The chain should exist in the [Chain Registry](https://github.com/cosmos/chain-registry) to provide a single source of truth for chain info.

Submit a PR or an issue if you want to see any specific chains.
Add a project directory using the same name as the Chain Registry directory.

Add a `build.yml` file using the template below. Adjust the variables as required, and run it using `docker-compose -f build.yml up --build`. Adjust until you have a working node. Check other chains for alternate configurations.

Only include the `environment` section if there is recommended configuration for your chain. This will be copied to the documentation in the next step.

```yaml
services:
node:
build:
context: ../
args:
PROJECT: cosmoshub # should match the directory/Chain Registry
PROJECT_BIN: gaiad
PROJECT_DIR: .gaia
VERSION: v21.0.0
REPOSITORY: https://github.com/cosmos/gaia
GOLANG_VERSION: 1.22-bullseye
DEBIAN_VERSION: bullseye
POLKACHU_CHAIN_ID: cosmos # only include if different from Chain Registry name
# environment:
# - FASTSYNC_VERSION=v0
ports:
- '26656:26656'
- '26657:26657'
- '1317:1317'
volumes:
- ./node-data:/root/.gaia
```

Run the documentation script to automatically create `deploy.yml`, `docker-compose.yml` and `README.md` documentation files:

```bash
./document.sh mychainname
```

Update the main [`README.md`](./README.md) file to include your chain in the [Networks](#networks-pre-built-images) section. Keep this alphabetical and ensure the versions referenced are correct.

Update the [`.github/workflows/publish.yml`](./.github/workflows/publish.yaml) file to include your chain and version. Again keep this alphabetical and ensure the versions referenced are correct.

Submit a PR with your changes and it will be validated and merged if appropriate.
26 changes: 12 additions & 14 deletions dig/deploy.yml → _templates/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@ version: "2.0"

services:
node:
image: ghcr.io/akash-network/cosmos-omnibus:v0.4.33-dig-v3.3.1
image: ghcr.io/akash-network/cosmos-omnibus:v0.4.33-akash-v0.36.0
env:
- MONIKER=node_1
- CHAIN_JSON=https://raw.githubusercontent.com/cosmos/chain-registry/master/dig/chain.json
- MONIKER=Cosmos Omnibus Node
expose:
- port: 26657
as: 80
to:
- global: true
- port: 26656
to:
- global: true
# params:
# storage:
# data:
# mount: /root/.dig
params: # remove for non-persistent storage
storage:
data:
mount: /root/.akash

profiles:
compute:
Expand All @@ -29,12 +27,12 @@ profiles:
memory:
size: 8Gi
storage:
size: 100Gi
# - size: 100Mi
# - name: data
# size: 400Gi
# attributes:
# persistent: true
- size: 10Gi
- name: data # remove for non-persistent storage
size: 400Gi
attributes:
persistent: true

placement:
dcloud:
attributes:
Expand Down
11 changes: 11 additions & 0 deletions _templates/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
services:
node:
image: ghcr.io/akash-network/cosmos-omnibus:v0.4.33-akash-v0.36.0
ports:
- '26656:26656'
- '26657:26657'
- '1317:1317'
environment:
- MONIKER=Cosmos Omnibus Node
volumes:
- ./node-data:/root/.akash
10 changes: 1 addition & 9 deletions agoric/build.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
version: '3.4'

services:
node_1:
node:
build:
context: ../
args:
PROJECT: agoric
PROJECT_BIN: ag0
VERSION: agoric-upgrade-7-2
REPOSITORY: https://github.com/Agoric/ag0/
NAMESPACE: AG0
PROJECT_DIR: .agoric
ports:
- '26656:26656'
- '26657:26657'
- '1317:1317'
environment:
- MONIKER=node_1
- CHAIN_JSON=https://raw.githubusercontent.com/cosmos/chain-registry/master/agoric/chain.json
- P2P_POLKACHU=1
- STATESYNC_POLKACHU=1
env_file:
- ../.env
volumes:
- ./node-data/.agoric:/root/.agoric
8 changes: 1 addition & 7 deletions akash/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.4'

services:
node_1:
node:
build:
context: ../
args:
Expand All @@ -15,13 +15,7 @@ services:
- '26657:26657'
- '1317:1317'
environment:
- MONIKER=node_1
- CHAIN_JSON=https://raw.githubusercontent.com/akash-network/net/main/mainnet/meta.json
- MINIMUM_GAS_PRICES=0.025uakt
- FASTSYNC_VERSION=v0
- P2P_POLKACHU=1
- STATESYNC_POLKACHU=1
env_file:
- ../.env
volumes:
- ./node-data:/root/.akash
7 changes: 1 addition & 6 deletions archway/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.4'

services:
node_1:
node:
build:
context: ../
args:
Expand All @@ -17,10 +17,5 @@ services:
- '26656:26656'
- '26657:26657'
- '1317:1317'
environment:
- MONIKER=node_1
- CHAIN_JSON=https://raw.githubusercontent.com/cosmos/chain-registry/master/archway/chain.json
env_file:
- ../.env
volumes:
- ./node-data:/root/.archway
9 changes: 1 addition & 8 deletions assetmantle/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.4'

services:
node_1:
node:
build:
context: ../
args:
Expand All @@ -16,12 +16,5 @@ services:
- '26656:26656'
- '26657:26657'
- '1317:1317'
environment:
- MONIKER=node_1
- CHAIN_JSON=https://raw.githubusercontent.com/cosmos/chain-registry/master/assetmantle/chain.json
- P2P_POLKACHU=1
- STATESYNC_POLKACHU=1
env_file:
- ../.env
volumes:
- ./node-data:/root/.mantleNode
15 changes: 0 additions & 15 deletions autonomy/README.md

This file was deleted.

26 changes: 0 additions & 26 deletions autonomy/build.yml

This file was deleted.

Loading
Loading