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

codex: add initial testnet version #588

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

vpavlin
Copy link
Contributor

@vpavlin vpavlin commented Sep 20, 2024

This PR adds Codex node deployment for Akash

@vpavlin vpavlin marked this pull request as draft September 20, 2024 21:03
@vpavlin vpavlin changed the title WIP: codex: add initial testnet version codex: add initial testnet version Sep 20, 2024
@Dimokus88
Copy link
Contributor

Tnx for PR @vpavlin !
Also, need add info to file README.md root awesome-akash repo.

@vpavlin
Copy link
Contributor Author

vpavlin commented Sep 25, 2024

Yeah, this is till a draft, I am waiting for a new version of Codex to be released and then will finalize it

@vpavlin vpavlin marked this pull request as ready for review October 9, 2024 10:36
@Dimokus88
Copy link
Contributor

Yeah, this is till a draft, I am waiting for a new version of Codex to be released and then will finalize it

Hey @vpavlin !
Let me know, when completed this PR.
Just tag me.

codex/deploy.yml Outdated
--bootstrap-node=spr:CiUIAhIhAzZn3JmJab46BNjadVnLNQKbhnN3eYxwqpteKYY32SbOEgIDARo8CicAJQgCEiEDNmfcmYlpvjoE2Np1Wcs1ApuGc3d5jHCqm14phjfZJs4QrvWesAYaCwoJBKpA-TaRAnViKkcwRQIhANuMmZDD2c25xzTbKSirEpkZYoxbq-FU_lpI0K0e4mIVAiBfQX4yR47h1LCnHznXgDs6xx5DLO5q3lUcicqUeaqGeg \
--bootstrap-node=spr:CiUIAhIhAgybmRwboqDdUJjeZrzh43sn5mp8jt6ENIb08tLn4x01EgIDARo8CicAJQgCEiECDJuZHBuioN1QmN5mvOHjeyfmanyO3oQ0hvTy0ufjHTUQh4ifsAYaCwoJBI_0zSiRAnVsKkcwRQIhAJCb_z0E3RsnQrEePdJzMSQrmn_ooHv6mbw1DOh5IbVNAiBbBJrWR8eBV6ftzMd6ofa5khNA2h88OBhMqHCIzSjCeA \
--bootstrap-node=spr:CiUIAhIhAntGLadpfuBCD9XXfiN_43-V3L5VWgFCXxg4a8uhDdnYEgIDARo8CicAJQgCEiECe0Ytp2l-4EIP1dd-I3_jf5XcvlVaAUJfGDhry6EN2dgQsIufsAYaCwoJBNEmoCiRAnV2KkYwRAIgXO3bzd5VF8jLZG8r7dcLJ_FnQBYp1BcxrOvovEa40acCIDhQ14eJRoPwJ6GKgqOkXdaFAsoszl-HIRzYcXKeb7D9 \
--storage-quota=11811160064 \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 11Gib? Should this be configurable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is configurable, but you need to match the config option value and the storage request in the manifest

image
image

In theory, we could also automatically resolve the value from the mounted stored

image

Which would be probably best - we can do

df --output=size /codex | tail -1

And then all the deployer needs to do is to configure the storage request

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pused a commit with udpate

Copy link

@gmega gmega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made some minor comments, overall looking good. Thanks for doing this, @vpavlin!

@@ -330,6 +329,10 @@ Awesome DeFi apps you can deploy on Akash
- [TeamSpeak](teamspeak)
- [Waku](waku)

### Decentralized Storage
- [Codex](codex)
- [IPFS](ipfs)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be a bit wary of bucketing IPFS and Codex together as they are very different, but OK I guess in this context it could be fine. They are both "decentralized storage" to some extent, just different guarantees and completely different modes of operation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up to you, I created a new category here, if you feel like there is a better place among existing categories, I am open to suggestions

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I guess I don't have good suggestions. We could say Codex is a DSN (Decentralized Storage Network) but that'd be an even more confusing term for someone who's just looking for storage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'd leave it like this if @Dimokus88 is fine with it - worst case we restructure later.

codex/README.md Outdated Show resolved Hide resolved
env:
- DATA_DIR=/codex/data
- PRIV_KEY=
- CODEX_NAT=
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With k8s, I believe you could do something like:

env:
  - name: CODEX_NAT
    valueFrom:
      fieldRef:
        fieldPath: status.hostIP

not sure this is possible here. I guess you'd know. 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not, Akash is special - in this regard - we need to buy external IP and that is not propagated to the container in any way. There are some providers which are able to do this by using some particular netowrking setup/k8s plugins, but you cannot rely on it, so manual intervention is the best bet right now.

I have one idea I'd like to try to implement in Akash that would help, but I don't have time:D So I'd stick with manul copy for now

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

codex/deploy.yml Outdated Show resolved Hide resolved
codex/deploy.yml Outdated
cpu:
units: 2
memory:
size: 2Gi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No one is probably running it with this little RAM atm so I'm not sure this will always work, particularly with larger files. But we can always change it later. Caveat emptor. 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I am fine bumping it, I probably just started from an existing deployment and never modified this

vpavlin and others added 3 commits October 11, 2024 13:09
@vpavlin
Copy link
Contributor Author

vpavlin commented Oct 11, 2024

@Dimokus88 it is ready for your review:)

@Dimokus88
Copy link
Contributor

Tnx @vpavlin !
deploy.yml tested without problem , but i waiting response about necessity edit root README.md from @brewsterdrinkwater .

@Dimokus88
Copy link
Contributor

Ready to merge @brewsterdrinkwater

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

Successfully merging this pull request may close these issues.

4 participants