elazarl / go-bindata-assetfs

Serves embedded files from `jteeuwen/go-bindata` with `net/http`
BSD 2-Clause "Simplified" License
870 stars 116 forks source link

question / idea #15

Open joeblew99 opened 9 years ago

joeblew99 commented 9 years ago

this looks really nice.

i am thinking of a slightly different applicatin of this. I think i can use this for packaging my own server deployment package too. Like when you need a stupid c lib on the server or client. i can pack it in, and then install it from a nice single deployed app.

the .sh bash install script can be embedded, but i expect a golang server on the server will need to call it, due to security issues.

does anyone else know a different way of approaching this ? Or maybe your interested in extending this project to do it, or make another project that uses this to do it.

elazarl commented 9 years ago

I'm sorry, but I don't fully understand your use case.

Can you give an example?

joeblew99 commented 9 years ago

Ok I try.

You are building a go package that relies on lots of c based compiled libs. You want to do idempotent deployments.

So you embedded everything as part if the release.

When its deployed, it unpacks, using the same bash script you useg on your macbook.


Its acting as an installer essentially.

elazarl commented 9 years ago

But you can't do that with Go at all!

Go executable for Linux would not run at Mac. You must use some other language.

On Mon, May 4, 2015 at 9:10 PM, joeblew99 notifications@github.com wrote:

Ok I try.

You are building a go package that relies on lots of c based compiled libs. You want to do idempotent deployments.

So you embedded everything as part if the release.

When its deployed, it unpacks, using the same bash script you useg on your

macbook.

Its acting as an installer essentially.

— Reply to this email directly or view it on GitHub https://github.com/elazarl/go-bindata-assetfs/issues/15#issuecomment-98801337 .

joeblew99 commented 9 years ago

No I think your missing the point.

Its basically packaging the dependencies with the executable, and then installing the dependencies when deployed.

Obviously its is specific.

elazarl commented 9 years ago

OK, I see. Why do you need assetfs for that? Just copy the dependencies somewhere and that's it.

On Mon, May 4, 2015 at 9:35 PM, joeblew99 notifications@github.com wrote:

No I think your missing the point.

Its basically packaging the dependencies with the executable, and then installing the dependencies when deployed.

Obviously its is specific.

— Reply to this email directly or view it on GitHub https://github.com/elazarl/go-bindata-assetfs/issues/15#issuecomment-98807110 .

joeblew99 commented 9 years ago

Because when you deplo to 200 servers and its 20 different packages, thats 4000 things that could go wrong.

Its idempotent basically

elazarl commented 9 years ago

I meant, embed everything in the binary, and have the binary copy it. You need go-bindata, but don't need assetfs.

On Mon, May 4, 2015 at 9:39 PM, joeblew99 notifications@github.com wrote:

Because when you deplo to 200 servers and its 20 different packages, thats 4000 things that could go wrong.

Its idempotent basically

— Reply to this email directly or view it on GitHub https://github.com/elazarl/go-bindata-assetfs/issues/15#issuecomment-98808864 .

joeblew99 commented 9 years ago

Ok thanks. Closing.. :)