Free Mongo on OpenShift
Upcoming SlideShare
Loading in...5
×
 

Free Mongo on OpenShift

on

  • 2,205 views

My talk to the Bay Area Mongo Users Group. It has a basic introduction to PaaS, OpenShift, and using Openshift, RockMongo, and MMS on OpenShift.

My talk to the Bay Area Mongo Users Group. It has a basic introduction to PaaS, OpenShift, and using Openshift, RockMongo, and MMS on OpenShift.

Statistics

Views

Total Views
2,205
Views on SlideShare
2,201
Embed Views
4

Actions

Likes
4
Downloads
18
Comments
0

1 Embed 4

http://www.linkedin.com 4

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Free Mongo on OpenShift Free Mongo on OpenShift Presentation Transcript

  • Getting Started with Mongo DB & OpenShift Aka Free Mongo applications for you! Steve Citron-Pousty Developer Evangelist, Red Hat March 20, 20121
  • Agenda • What is OpenShift? • Getting Started • Using Mongo with OpenShift • Next Steps2
  • My Goal for today  Introduce you to OpenShift  Get you comfortable with using the tools.  I want you to be ready to start writing apps A bit about me: Long time Java, RDBMS, Spatial New to: OpenShift and Mongo3
  • Assumptions 1) You might know some Mongo 2) You have a favorite programming language 3) You are comfortable with the command line (for now) 4) You might know GIT 5) You are unfamiliar with PaaS PLEASE ASK QUESTIONS!!!!4
  • What is OpenShift? Red Hat’s free platform as a service for applications in the cloud.5
  • Kind of like Amazon, right? Nope.6
  • What’s Infrastructure as a Service?• Network, storage and compute offered as an on- demand service• Basically, servers in the cloud• You’re still on the hook to configure & manage the cloud & stack• Example: Amazon EC2 “How do I use this?”7
  • What’s Platform as a Service?• It’s an application platform• Basically, an app run-time environment in the cloud• PaaS configures & manages the cloud & stack for you• Example: OpenShift “The cloud is now useful!”8
  • What’s Software as a Service?• It’s an on-demand application• Nothing to install or configure• Example: Salesforce, Gmail “This is all my customers and users care about!”9
  • So, why should I use a PaaS? • Realize the benefits of the cloud quickly • Let the PaaS configure, manage & scale the stack • Make deployments to the cloud easy • Focus on your app & users, not the stack10
  • What’s supported?11
  • How does it work?• Install the client tools• Create a domain name• Create an application rhc-create-app –a my_app –t my_lang• Congrats! You are now in the cloud!12
  • Looks great, but how much does it cost?• OpenShift is free-as-in-beer• Five 512 MB RAM / 1 GB Storage instances• Need more resources, just ask!13
  • But, First…. SSH • To keep things secure we do most things over SSH • You need to have your keys working properly Git • Is used to push changes to apps on OpenShift • Is a distributed revision control and source code management system Builds • Java – we use Maven • For others we just copy from the git repo over14
  • So, Let’s Get Started! 1. Sign up 2. Install the client tools 3. Create a domain name 4. Create an application15
  • DEMO – Finally!16
  • So here are the steps1) Create an account on openshift.com using the web console2) Create a Domain using the command line • Remember your domain has to be unique to the rhcloud.com namespace. • It will be used in all your apps urls3) Then go ahead and create an app4) I am going to use eclipse to add other cartridges and edit the source code • Make sure to store the usernames and passwords for the mongo and rockmongo5) You can now modify the source and then commit and push to remote repository17
  • 1. Sign Up! • openshift.com • All it takes is an email address • Promo Code: BAMUG18
  • Now to install the client tools On the openshift site: OpenShift > Community > Knowledge Base > Installing OpenShift Express client tools… Basically 1. Install ruby and ruby gems 2. Gem install rhc 3. Make sure you have git and ssh19
  • On the different platforms  Easy Cheesy on Linux machines  Mac you need to install the full Xcode  Windows…well a bit more work20
  • Don’t have Cygwin installed? Get it here: cygwin.com/install.html21
  • Hold up, what’s Cygwin? A Linux-like environment for Windows making it possible to port software running on Linux systems to Windows.22
  • 2. Install the Client Tools on Windows • What you are going to need: Cygwin • Plus these cygwin components: • openssh • Ruby • Git • You will need all these for SSH and for advanced command line usage. Eclipse plugin does a lot23
  • 2. Install the Client Tools on Windows Next, download and extract rubygems from: http://rubyforge.org/projects/rubygems24
  • 2. Install the Client Tools on Windows • In Cygwin run: $ ruby <path_to_extracted_rubygems>/setup.rb install Cygwin is unix so your path looks like c:/<path_to_extracted_rubygems>/setup.rb install • Install the gem $ gem install rhc25
  • Quick Tip: Client Tool Commands rhc-* : prefix for all commands rhc-create-domain : Create a namespace rhc-create-app : Create an application rhc-ctl-app : Control an app and embed components rhc-snapshot : Backup and restore an application26
  • 3. Create a Domain Name $ rhc domain create –n <your domain> -l <your login> Password: • When creating apps the URLs will look like this: http://<app name>-<your domain>.rhcloud.com Example: http://javarules-jgsdomain.rhcloud.com27
  • Some tech to help with more learning forOpenShift 1. Git – the source control and publishing system to openshift. For SVN users: https://git.wiki.kernel.org/articles/g/i/t/GitSvnCrashCourse_512d.html 2. Eclipse tooling – use the latest Jboss Studio plugin http://www.jboss.org/tools/download/dev 3. -bliss 4. Our new shiny web console https://openshift.redhat.com/app/console28
  • 4. Create an Application $ rhc app create –a <your app name> -t jbossas-7 Password:29
  • Mongo Specific awesomeness RockMongo MMS Spatial is enabled Sharding and replication are not running yet but they will be by time we leave Beta30
  • GitHub • Full featured applications on GitHub • www.github.com/gshipley • BeerShift • www.github.com/openshift • A whole bunch31
  • One more demo A little bit of spatial goodness Mongo has built in 2D spatial indexing capabilities You can build your own FourSquare or similar app. Quick demo of loading some spatial data on an OpenShift Mongo Instance and then doing a query at the command line (or in RockMongo)32
  • Next Steps • Forum: redhat.com/openshift/community • Email: openshift@redhat.com • IRC: #openshift on freenode33