Giter Site home page Giter Site logo

fractal-code / azure-demeteorizer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from christopheranderson/azure-demeteorizer

0.0 3.0 0.0 28 KB

CLI tool for deploying demeteorized meteor apps on Azure App Service.

License: MIT License

JavaScript 99.84% Python 0.16%

azure-demeteorizer's Introduction

azure-demeteorizer v0.2.0 (Alpha)

๐ŸŽ‰ Checkout this project for a much simpler option (Meteor 1.4+) - https://github.com/fractal-code/meteor-azure

CLI tool for deploying demeteorized meteor apps on Azure App Service.

Installation

NOTE: Windows only! While the CLI may work on Linux/Mac, the native modules Meteor requires must be compiled on a Windows machine for it to deploy successfuly on Azure. There is some investigation to moving this install process to Azure.

Meteor requires node v0.10.40 32bit to work. Check out nvm for a good tool to manage your node versions.

npm install -g christopheranderson/azure-demeteorizer

Using GitHub has the install source is temporary until the package reaches "beta"

Prerequisites

  1. Install Meteor locally (>v0.8.1)- Install from Meteor.com
  2. Node v0.10.40 32bit - Use nvm to make node version manage easy
  3. Mongo accessibly to Azure - i.e. MongoDB on a VM or Mongo Lab
  4. App Service App with following App Settings:
    • MONGO_URL - (Mongo DB connection string from a MongoDB hosted on Mongo Lab or a VM)
    • ROOT_URL - http://{sitename}.azurewebsites.net or your custom domain if you've set that up
    • WEBSITE_NODE_DEFAULT_VERSION - 0.10.40
    • METEOR_SETTINGS - (Optional: Meteor app setting content from your settings.json)
  5. Python 2.7 - Required for node-gyp
  6. Microsoft Visual C++ Redistributable (2010 or greater)
    • It may be required to configure npm to use a newer version of C++ if you don't have 2010 installed.

If you have any issues during the install phase, it's likely that you are either using the wrong node version or don't have the prerequisites installed. Please review the requirements on node-gyp's github page for Windows users.

If you have any issues after you've deployed, it's likely your node version is incorrect on the server.

Deploy to Azure

There are 4 commands needed to deploy to Azure

  1. After installing the tool, navigate to the directory hosting your meteor app
  2. azure-demeteorizer build
  3. azure-demeteorizer install
  4. azure-demeteorizer zip
  5. azure-demeteorizer deploy -s [sitename] -u [username] - p [password]

You should now be able to navigate to your site ({sitename}.azurewebsites.net) and see your application deployed now.

Additional options and tips

Deployment fails

A couple of issues may arise while deploying:

  1. Credentials aren't working
  • Go to the Azure Portal and reset your deployment credentials via any Web App. If you're still getting failures, turn local git deployment on and off. If you're still failing, open an issue.
  1. 500 Error during deployment - can't delete fibers.node
  • Fibers is currently locked by the node process. There is currently some work in progress to fix this, but the work around is to stop your site via the Azure Portal before deploying, and starting it again after deploying.

Custom web.config

There are lots of good reasons to need a custom web.config, for instance, forcing HTTPS or redirecting to your custom domain.

To use a custom web.config, just pass the path during the install phase. Like so: azure-demeteorizer install -p ./path/to/web.config

Add .demeteorized to your .gitignore

If you add .demeteorized to your .gitignore (if you're using git), you can prevent the tool output from affecting your repository.

Why is there a CLI tool for this?

Meteor is a popular JavaScript App Platform. It's something Azure App Service had a lot of requests for on the Azure feedback site. Azure App Serivce doesn't have explicit support for meteor apps, but it does have support for node applications, which is what meteor is built around. Demeteorizer is an open source, community supported tool designed to unpackage meteor apps into a regular node app. This CLI tool wraps Demeteorizer and makes the steps to deploy to Azure very simple.

Future Plans

  • Beta Release:
    • Tests
    • More configuration
    • Streamline commands
    • Yell at you when your App Service App is misconfigured (missing connection strings, etc.)
  • Even more future:
    • Enable CI: Remove need to run this tool on local box - allow it to run in a deploy script.
    • Supprt Linux/Mac

License

MIT

azure-demeteorizer's People

Contributors

christopheranderson avatar danielsmon avatar kgao avatar prashanthmadi avatar ramijarrar avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.