Getting started for a hackathon with Bluemix

. 2 min read

This weekend I planned to show up at the Swiss Re Hackathon. I hope to learn something new and god willing create something interesting!

I've loved the traditional IBM Watson stuff and have tried to play around with it quite a bit. I still think it has a long way to go and the application isn't yet upto the point of accuracy needed to make something really useful! (I hope I am wrong!).

However, IBM recently made quite a few acquisitions of quality products and rolled them up into the Watson Umbrella! I felt the new gamut of apps available to be comprehensive and mature enough to play with them again! This hackathon presents an opportunity to try that out along with meeting some great people!

The IBM team put together some very useful presentations and a great introductory video talk!


Getting Started

Now, let us look at creating a sample app using Cloud Foundry! Installation is straight forward. Download the installer from the releases page and you are all set!

I plan to use Meteor, so everything hereon will be Meteor focussed!

Let's first create a sample app:

Create the sample app

meteor create --example todos

Connect to Bluemix

cf api https://api.ng.bluemix.net

Login to Bluemix

Replace with the user credentials

cf login -u santosh@mypad.in -o santosh@mypad.in -s dev

Push the app without starting

cf push meteor-todos -b https://github.com/cloudfoundry-community/cf-meteor-buildpack.git --no-start

I ran into this nasty error!

A bit of research, showed me the way out! See Tip #3 in this post!

I needed to a .cfignore file in the root directory of the application. Add the below line to the file and you should be ready to go!

.meteor/local/

.cfignore is similar to .gitignore. The cf tool ignores the folders or files!.

This is actually very important! Look at the file sizes uploaded before and after! The entire local build directory does not need to be uploaded!

Before .cfignore

Before .cfignore

After .cfignore

After .cfignore

Note the difference! The upload needed reduced from 13.3M to 521.9K!

Create the MongoDB instance

Now, we need to create the MongoDB instance the app can bind to!

cf create-service mongodb 100 todos-mongodb

Now, we need to attach the service

cf bind-service meteor-todos todos-mongodb

Start the Meteor application

cf start meteor-todos

That's it! The meteor app was up and running at http://meteor-todos.mybluemix.net

Questions / Research Queue

Resources


Tags

AWS Analytics Antifragile Apache Spark Apple Apps Arbitrage Automation Awesome BBMP Bangalore Black Swan Bonds Boonex Bootstrap Brokerage Charges CFPB CMS CSS Calypso Camelot Capital Markets Charts Chirp Choropleth Chrome Code Igniter Collections Containerization Converters Cycling DalalBeat Data Analytics Data Journalism Data Mining Data Munging Data Privacy Data Science Databases Debt Design Design Stock DesignStock Diet Django Docker Document Processing Dropbox Electron Electronics Entertainment Entrepreneurship Exercise FFMPEG Facebook Finance Fire TV Stick Fitness Forerunner From-The-News Fun Futures Gaana Garmin General Geocoding Getting Started Ghost Google APIs GraphicsMagick HHVM HTTPS Hackathon Hacks Hardware Health House Keeping Housing IBM BlueMix IBrokers IPinfo Ideas Image Conversion Image Processing Infographics Interactive Brokers Internet Investing IoT Legal Lets Encrypt Mac Machine Learning Mailbox app Mapbox Markdown Marketing Meteor Mockups MongoDB Mortgages Movies Music MyPad MySQL Nativefier Nature Netflix Newsletters Nginx Node.js Notes OCR OSX Open Source OpenCPU Options PDF PHP Pebble Peloton Personal Photography Picture Platforms Plex Portable Apps Productivity Property Tax PyroCMS Quantitative Finance R-Project Random Raspberry Pi Research Resources Reticulate Robot S3 SQLite STT Scraping Security Server Shell Shiny Side Project Sikuli Speech Recognition Spider Pro Spinning Spotify Startup Resources Startups Strategy Sublime Text System Monitoring Tax Terminal Tips To Do Tools Torrent Trading Trends Troubleshooting USElection2016 Ubuntu Unix Valuations Video Conversion Visualization Wagtail Wearables Weekend Fun WhatsApp Wordpress anaconda annie bash catalina cv2 daily coding dailycoding data.table debugging devtools downloader e-Signatures ggplot git go google maps hat-tip iOS iPad iPhone iTunes javascript jupyter logging macos numpy opencv optionality plotly python rstats videos youtube