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

Allow defining additional volumes when deploying the activity #3291

Closed
grisha87 opened this issue Aug 9, 2024 · 2 comments · Fixed by #3327
Closed

Allow defining additional volumes when deploying the activity #3291

grisha87 opened this issue Aug 9, 2024 · 2 comments · Fixed by #3327
Labels
sdk-request issue requested by SDK team

Comments

@grisha87
Copy link
Contributor

grisha87 commented Aug 9, 2024

Why?

Consider the following case: I'm willing to use a very simple image with Postgres.

# file: Docekrfile
FROM postgres:16

Then I'm going to build a GVMI for golem/postgres:16 and shipt it to registry for people to use.

Now, when I want to do any uploads to the activity (uploading a bash script file for example), these will fail because the image didn't specify any volumes. Given I would like to do some debugging, while preserving the GVMI "pure" from any debuggin additions, I should be able to be able to specify the additional volumes on my own, when deploying the activity.

What change is requried?

I think the deploy command should support an option to specify volumes that the SDK users can set on their own, when they deploy the application.

An artificial example for golem-js would look like:

await glm.oneOf({
  order: {
    demand: {
      workload: {
        imageTag: "golem/postgres:16",
        engine: "vm",
        minCpuCores: 2,
        minStorageGib: 2,
        minMemGib: 4,
      },
    },
    market: {
      rentHours: 1,
      pricing: {
        model: "burn-rate",
        avgGlmPerHour: 1,
      },
    },
    /* THIS IS WHERE THE USER CAN SPECIFY THE DESIRED SIZE AND PATH OF THE VOLUME */
    volumes: {
      volume1: {
        size: 10,
        path: "/data",
      },
      volume2: {
        size: 5,
        path: "/config",
      },
    },
  },
});

Then we could pass the volume definitions to the deploy commands.

@grisha87 grisha87 added the sdk-request issue requested by SDK team label Aug 9, 2024
@cryptobench
Copy link
Member

I see the need, I understand the need - but wouldn't it just be better fixing the underlying issues with the root of the filesystem not being more than 128 MB of size?

The above still requires the user to run into the issue of discovering that the root is still only 128 MB of size.

@grisha87
Copy link
Contributor Author

Looks like my need is getting addressed:
https://github.com/golemfactory/ya-runtime-vm/wiki/Volume-managment

I got the info from rekuc, that there's a runtime version on testnet which supports this. I will add testing this implementation to my to-do list and will provide feedback once I'm done with the tests.

@kamirr kamirr linked a pull request Sep 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sdk-request issue requested by SDK team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants