reactioncommerce / mongo-s3-backup

A Docker container to backup a MongoDB deployment to S3 and list or restore those backups.
5 stars 9 forks source link

Upgrade to AWS CLI v2 #5

Open ghost opened 4 years ago

ghost commented 4 years ago

closes #2. supercedes #4

start using aws cli v2 stop using pip to install it (follow official instructions instead)

tested against fresh reaction-development-framework installation brought up using make start on macos. when tested had to use --network="host" flag in addition to the other flags specified in the readme for things to work... something to do with running in bridged mode. haven't tested on linux yet as my other machine is taking a nap right now.

new image is 410MB. probably larger than what was there previously but changes to the aws cli necessitated a change in images as explained in the backing issue. the new image is linked to in the upstream issue against the aws cli. according to the docs for the image it's used by mono so it feels sturdy enough to use as a bases for this project.

Screen Shot 2020-08-06 at 23 22 56 Screen Shot 2020-08-06 at 23 29 55
ghost commented 4 years ago

Docker image for testing: https://hub.docker.com/repository/docker/comfusion/mongo-s3-backup

ghost commented 4 years ago

@kieckhafer Sorry to ping you directly however you're the only internal member I've had any interaction with. Could you possibly help get this pull merged? As it stands this repo is not functional without my changes. Note also I've opened a separate pull to add a LICENSE to this repo.

kieckhafer commented 4 years ago

Hey @balibebas, no worries about the direct tag.

A couple concerns with your PR here:

  1. We'd prefer to continue to use the official docker alpine image, as opposed to the fork from frolvlad. Using a community user image could complicate things in the future if we ever needed updates, the official image would be much easier to reconcile.
  2. Running sudo on the base image is not a preferred way to do this, it works, but it seems might only cause unknown issues further down the line.

If this works for you on your fork, I'd suggest using your fork to do what you need to do, and we can leave this PR open for future reference.

ghost commented 4 years ago

Thanks for the review Erik. And no worries if we can't get this merged. Regardless it'd still be nice to get a LICENSE added to this repo. I have a separate pull open for that and I'd like to rebase this work on it or another commit if possible.

Regarding (1) please refer to the research I presented in the backing issue. The AWS CLI contributor I linked to suggests base Alpine is not supported nor likely to become so, and suggested Ubuntu as an alternative base image which, as we know, isn't suitable from a microcontainer approach. The other option I saw people using is Amazon Linux, which, if it's something RC team would consider, is something I could look into switching over to in my pull.

Regarding (2) I think discussion is moot given (1) so I'm going to leave that as-is to be inline with the official AWS instructions unless RC team feels moving to Amazon Linux is something worth exploring—at which point I'll incorporate the feedback.