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

[WIP]: Rewritting to use boto3 #1186

Closed
wants to merge 7 commits into from
Closed

[WIP]: Rewritting to use boto3 #1186

wants to merge 7 commits into from

Conversation

takeda
Copy link

@takeda takeda commented Jul 24, 2019

The way how my AWS accounts are setup (assumeRole + MFA) makes it impossible to use old version of nixops. I initially tried to add an option to specify a profile, but turns out that old boto doesn't seem to support this kind of setup (since it was introduced later on) and it mandated porting to boto3.

So this version works fine with assumeRole + MFA and I also added an option to use the same cache that aws command uses. That way you don't have to enter MFA every for every single command.

Currently all of the commands that I used appear to be working, these are:

  • list
  • create
  • modify
  • delete
  • info
  • check
  • deploy
  • send-keys
  • destroy
  • stop
  • start
  • reboot
  • show-arguments
  • show-physical
  • ssh
  • ssh-for-each
  • scp
  • mount
  • rename
  • backup
  • backup-status
  • clean-backups
  • restore (you need to provide backup id, but it looks like that was unrelated to my change?).
  • show-option
  • list-generations
  • show-console-output
  • dump-nix-paths
  • export
  • edit

If you can, please test it (clone my branch and run nix-env -f release.nix -iA build.<your platform>) if there are still broken commands let me know otherwise perhaps this can be merged.

@takeda takeda changed the title Boto3 [WIP]: Rewritting to use boto3 Jul 24, 2019
@takeda takeda mentioned this pull request Jul 24, 2019
@disassembler
Copy link
Member

I'd like to see #1179 finalized and get this PR targeting AWS plugin rather than merging this. Sorry for the extra work here, but in the long run I think you'll get faster response on major PRs like this when they only affect one backend.

@takeda
Copy link
Author

takeda commented Jul 29, 2019

@disassembler the plugin architecture is orthogonal to this change though, I see that it still uses the unsupported boto package (which is a blocker for Python 3 migration) and still doesn't work correctly with assumeRole/MFA. If that's the way it will be restructured, perhaps my changes can be adapted to the aws plugin it seems like it was mostly moving aws components as is to the new repo.

Edit: NVM looks like you said the same thing, I'll see how hard it would be to get this adapted to the new repo, although since it is a separate repository I might not get much help from git in doing that :/

@takeda
Copy link
Author

takeda commented Sep 14, 2019

@disassembler so I moved my patches to nixops-aws, my PR is here: NixOS/nixops-aws#1

@edolstra
Copy link
Member

So can we close this one?

@takeda
Copy link
Author

takeda commented Sep 25, 2019

Yes, closing it.

@takeda takeda closed this Sep 25, 2019
@takeda takeda deleted the boto3 branch October 2, 2019 04:34
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.

None yet

3 participants