edgi-govdata-archiving / archivers.space

🗄 Event data management app used at DataRescues
https://www.archivers.space/
GNU Affero General Public License v3.0
6 stars 3 forks source link

include a command-line invocation when generating an AWS token for harvesting #28

Open kmcculloch opened 7 years ago

kmcculloch commented 7 years ago

From @titaniumbones on February 11, 2017 7:28

When an AWS burner token is generated (for upload after harvesting), would it be possible to also include a script or one-liner that a user could run trivially on a remote VM? Asking mostly for those of us who have no AWS experience, Even if not downloadable, such a script could at least be documented & put in the harvesting-tools.

Copied from original issue: b5/pipeline#62

kmcculloch commented 7 years ago

From @b5 on February 11, 2017 16:11

Such a script could absolutely be written, but it's a little more complicated than it seems. Maybe someone wants to take on writing this script? Pseudo Code:

# command should accept a path to the [uuid].zip: to be uploaded

# constants for modularizing script:
SIGNING_SERVER_URL="http://drp-upload.herokuapp.com"

if !aws_cli_installed
  manager = get_machine_package_manager 
  manager install aws

# http://github.com/edgi-govdata-archiving/s3-upload-server for more info on getting tokens
get_aws_token
if error
    print_err

set_aws_env_vars

aws s3 cp [uuid.zip path] s3://...

For now I'm going to refer people to the page that the token generates, but having this script would be a huge plus.

kmcculloch commented 7 years ago

@titaniumbones @b5 The "Help Wanted" label came over from the old queue. How should I interpret it?