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

How do you use the s3 remote backend? #157

Open
blobcode opened this issue Mar 22, 2022 · 7 comments
Open

How do you use the s3 remote backend? #157

blobcode opened this issue Mar 22, 2022 · 7 comments

Comments

@blobcode
Copy link

I've tried using the s3 remote backend below

network.storage.s3 = {
      profile = "root";
      region = "us-east-1";
      bucket = "main-nixops-state";
      key = "personal.nixops";
      kms_keyid = "166c5cbe-b827-4105-bdf4-a2db9b52efb4";
    };

however when deploying on nixopsUnstable, I get

The network requires the 's3' state provider, but no plugin provides it.

I've found no documentation on how to fix this.

My question is how does one exactly install the s3 plugin? And does anyone have an example config I could reference?

@teto
Copy link
Member

teto commented Mar 25, 2022

I am kind of in the same boat as you so it's just a guess but probably you should use nixops.packages."${system}".nixops-aws # nixops with plugins
from nixops.url = "github:lukebfox/nixops-plugged"; to have nixops and its aws plugin.

@roberth
Copy link
Member

roberth commented Mar 25, 2022

nixpkgs also has a nixopsUnstable that includes most plugins. If something is missing from there, you can ping me for a review and merge.

@teto
Copy link
Member

teto commented Mar 25, 2022

looks like it is now called nixops_unstable on unstable

@blobcode
Copy link
Author

@roberth

It still appears as missing even with nixops_unstable on nixpkgs-unstable

@roberth
Copy link
Member

roberth commented Mar 25, 2022

Then this seems to be an issue with the aws plugin.

@roberth roberth transferred this issue from NixOS/nixops Mar 25, 2022
@lunik1
Copy link

lunik1 commented Apr 28, 2022

I'm having the same issue using a flake-based deployment.

@lunik1
Copy link

lunik1 commented Apr 28, 2022

Initial cursory investigation: NixopsAWSPlugin does not override storage_backends in nixops_aws/plugin.py, and so no s3 plugin is found when nixops assembles its list of storage backends here. The "fix" is to set storage_backends to return a dict containing the s3 bucket storage backend.

…however—and this may be my lack of sleep / familiarity with the codebase talking—I cannot find an implementation of a StorageBackend in this repo.

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

No branches or pull requests

4 participants