Interact with AWS S3 on Vagrant Host Machine

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Interact with AWS S3 on Vagrant Host Machine

Jamie Jackson
In my vagrant provisioning process, on the host, I need to pull a database backup off of AWS S3.

I see a couple of ways to do it:
  • I can call out to the `aws` CLI (installed on the host)
  • I could do it through some ruby S3 API.
Doing it on the host, I can leverage the S3 configuration (keys) that already exist on my team's host machines.

I could use some feedback on a decent way to accomplish this.

Thanks,
Jamie


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CA%2BonWPcJxXFABxRFM%3DTAixnnZiDJVxy0aimWqKObW9tjRW65wA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Interact with AWS S3 on Vagrant Host Machine

Alvaro Miranda Aguilera
Hello

Not sure if you want to pull a db everytime you want to create a project, what about creating a new base box?

with packer you can build a box, and run shell-local provisioner that will run in the host.

For vagrant, you can check into vagrant-triggers plugin, and run on the host some command before up






On Thu, Apr 13, 2017 at 11:18 PM, Jamie Jackson <[hidden email]> wrote:
In my vagrant provisioning process, on the host, I need to pull a database backup off of AWS S3.

I see a couple of ways to do it:
  • I can call out to the `aws` CLI (installed on the host)
  • I could do it through some ruby S3 API.
Doing it on the host, I can leverage the S3 configuration (keys) that already exist on my team's host machines.

I could use some feedback on a decent way to accomplish this.

Thanks,
Jamie


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CA%2BonWPcJxXFABxRFM%3DTAixnnZiDJVxy0aimWqKObW9tjRW65wA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyUScBPf1feZWhkPpG56E7%3DD0fG4pbKqncCrimbaWK3ag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Interact with AWS S3 on Vagrant Host Machine

Jamie Jackson
I ended up using aws-sdk, and those operations are running in a provision trigger (it only pulls if there isn't a local copy already, BTW). I wanted to avoid coupling that part with a box.

On Fri, Apr 14, 2017 at 3:18 PM, Alvaro Miranda Aguilera <[hidden email]> wrote:
Hello

Not sure if you want to pull a db everytime you want to create a project, what about creating a new base box?

with packer you can build a box, and run shell-local provisioner that will run in the host.

For vagrant, you can check into vagrant-triggers plugin, and run on the host some command before up






On Thu, Apr 13, 2017 at 11:18 PM, Jamie Jackson <[hidden email]> wrote:
In my vagrant provisioning process, on the host, I need to pull a database backup off of AWS S3.

I see a couple of ways to do it:
  • I can call out to the `aws` CLI (installed on the host)
  • I could do it through some ruby S3 API.
Doing it on the host, I can leverage the S3 configuration (keys) that already exist on my team's host machines.

I could use some feedback on a decent way to accomplish this.

Thanks,
Jamie


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CA%2BonWPcJxXFABxRFM%3DTAixnnZiDJVxy0aimWqKObW9tjRW65wA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyUScBPf1feZWhkPpG56E7%3DD0fG4pbKqncCrimbaWK3ag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CA%2BonWPf107316C7G%2Bsa_SHHFnjW58VU8QC%2B-_k_AMih9RNMWrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.