Skip to content

Target for Azure Storage #134

Closed
Closed

Description

Hello, we have our projects hosted on Azure. We are planning to build some nodejs utilities of hybrid nature: node-js with C++ add-ons and .NET using edge.

Is it possible to use Azure Storage for Node.js as a storage to host binaries build by node-pre-gyp? If not, please provide the steps if someone has successfully configured it.

It would be much appreciated if Azure Store is added as an alternative service provider to AWS, and the how-to info is reflected on docs.

Activity

  1. springmeyer commented on Jan 9, 2015

    @springmeyer
    Contributor

    Yes, this should be doable now without any changes to node-pre-gyp. The install command that is used when users install your binaries uses https and does not depend on AWS S3. That is the only critical piece. So just configure the host parameter to point to an http/web accessable location hosted on azure and your users will be able to get your binaries.

    As far as getting the binaries published. Well, it should be as simple as running node-pre-gyp package locally and then manually pushing the tarball to your remote location. But with a little bit of effort you can automate that yourself because it is easy to programmatically interact with node-pre-gyp in order to write your own publish script. You can run node-pre-gyp reveal to get access to all the info you'd need to script uploading your binaries to a custom location on azure. A workflow could look like this:

    # build and package binary module
    ./node_modules/.bin/node-pre-gyp build package
    # then validate the package
    ./node_modules/.bin/node-pre-gyp testpackage
    # next grab the path to the tarball package
    LOCAL_BINARY=$(./node_modules/.bin/node-pre-gyp reveal staged_tarball --silent)
    REMOTE_BINARY=$(./node_modules/.bin/node-pre-gyp reveal hosted_tarball --silent)
    # ... then use whatever azure upload tool you want to move the LOCAL_BINARY to the REMOTE_BINARY

    Let me know if I need to make anything more clear.

  2. ghost closed this as completedon Jan 21, 2015
  3. springmeyer commented on Jan 21, 2015

    @springmeyer
    Contributor

    @jasonwilliams200OK - yes, I highly recommend using Amazon S3 - you are likely talking about less than a few bucks a month to host a node-pre-gyp binary on S3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions