GithubHelp home page GithubHelp logo

miguelramosfdz / openshift-meteorjs-quickstart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ryanj/openshift-meteorjs-quickstart

0.0 2.0 0.0 241 KB

Deploy meteor.js application bundles on OpenShift

Home Page: https://openshift.redhat.com/community/blogs/cloudy-with-a-chance-of-meteor

openshift-meteorjs-quickstart's Introduction

#Meteor.js on OpenShift Deploy meteor.js application bundles on OpenShift

If this is your first time using OpenShift Online or Meteor, skip down to the "Basic Setup Notes" below.

Configure your OpenShift gear

Spin up a new OpenShift gear with Node.js, MongoDB, and a shim to help meteor.js connect to the correct ports. This example uses the application name: "meteor"

rhc app create meteor nodejs-0.10 mongodb-2 --from-code=https://github.com/openshift-quickstart/openshift-meteorjs-quickstart.git

The above command will output a local copy of your OpenShift application source in a folder matching your application name. Be sure to run this command from within a folder where you would like to keep your project source.

Create a Meteor.js example project

To see a list of all available meteor.js example projects, type meteor create --list.

In this guide, we'll use the meteor.js "leaderboard" example:

meteor create --example leaderboard

See http://meteor.com/examples/ to learn about what other example applications are available. Feel free to try them all.

Bundle and merge your meteor.js code

Bundle up your meteor.js source:

cd leaderboard # if you chose the leaderboard example
meteor bundle bundle.tar.gz # to prep for deployment

Next, you'll need to extract the resulting code into your OpenShift application folder (minus the "bundle/" folder wrapper that Meteor will automatically include). Use the -k flag when extracting to prevent the existing DB connection code from being overwritten during this merge process.

If you are developing on Linux, or using GNU tar, this command should work:

tar -xvf bundle.tar.gz --transform 's|^bundle/||' -C ../meteor/

For Mac or BSD-based operating systems:

tar -xvf bundle.tar.gz -s '/^bundle//' -C ../meteor/

The above example assumes that you named your OpenShift application "meteor", as shown in the rhc app create step. And, that your OpenShift application code is available at this relative path: ../meteor

Add these new files to your OpenShift application's Git repo:

cd ../meteor
git add .
git commit -am "Adding a meteor.js application bundle"

Deploy to OpenShift

Then, push the new code to OpenShift to deploy your meteor.js application bundle:

git push

That's it! Check out your new Meteor.js application at:

http://meteor-$yournamespace.rhcloud.com

Basic Setup Notes

You'll need an OpenShift Online account, and the rhc command-line tools in order to follow this guide. You'll also need to have Node.js, MongoDB, and Meteor available in your application developement environment.

Installing meteor.js

curl https://install.meteor.com | sh

OpenShift Online Setup

In this quickstart guide, we'll be using OpenShift Online to host our application.

Sign up for an account at http://openshift.redhat.com/app/account/new

If you don't already have the rhc (Red Hat Cloud) command-line tools, install them:

sudo gem install rhc

You'll need to run rhc setup to link your OpenShift Online account with your local development environment, and to select an application namespace:

rhc setup

If you need any additional assistance setting up rhc, this doc may come in handy: https://www.openshift.com/developers/rhc-client-tools-install

openshift-meteorjs-quickstart's People

Contributors

gshipley avatar mrunalp avatar ramr avatar ryanj avatar

Watchers

 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.