Code Monkey home page Code Monkey logo

bluemix-node-multiregion's Introduction

bluemix-node-multiregion

A simple Node.js application for demonstrating multiregion applications on Bluemix using Cloudant

Deploy to Bluemix

If this is your first time using multiple regions on Bluemix, it is likely that you will encounter an error while the app is being deployed. If this is the case, take a look at the Potential Problem section.

After Deployment

After the app has been deployed, all three regions will work independently of one another. I encourage you to go ahead and add a few cards to each region and notice that the cards are not being shared across regions.

To set up continuous replication between the Cloudant databases located in each region we will use the bluemix-cloudant-replicator

Once you have properly installed the bluemix-cloudant-replicator, simply run the following command:

cf cloudant-replicate

You should be guided through the process of selecting your app and the appropriate databases to replicate (postcards).

To bypass prompts you can run:

cf cloudant-replicate -a APP_NAME -p PASSWORD -d postcards

See http://www.ibm.com/developerworks/cloud/library/cl-multi-region-bluemix-apps-with-cloudant-and-dyn-trs/index.html for more information.

Potential Problem

If you encountered an error while the app was being deployed, it is likely due to the fact that your account is not active in a region that has not yet been visited. You most likely see a screen like so:

If you encounter this error, click on the DASHBOARD tab from the header.

Once you are in your Bluemix Dashboard, click the Account and Support icon in the very top-right of the page.

A new panel should appear on the right of the screen. Click the Region section and select either of the regions that are not your default region(you will have to do both before deployment).

You will then be redirected to your Bluemix Dashboard for the selected region. If you have not visited the selected region before you will be prompted for a space name. For the default deployment pipeline to work, the space must be the same in each region.

After doing this for both unvisited regions, you can reclick the Deploy to Bluemix button and your app should now deploy correctly.

If you would like to delete your old project, just visit JazzHub and delete the old project. This is not required.

This sample is provided under the MIT license

bluemix-node-multiregion's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.