SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Getting Started
       with Mongo DB &
           OpenShift
    Aka Free Mongo applications for you!

    Steve Citron-Pousty
    Developer Evangelist, Red Hat
    March 20, 2012
1
Agenda

    • What is OpenShift?
    • Getting Started
    • Using Mongo with OpenShift
    • Next Steps




2
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 Mongo




3
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 stack




10
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 over
14
So, Let’s Get Started!

     1. Sign up
     2. Install the client tools
     3. Create a domain name
     4. Create an application




15
DEMO – Finally!




16
So here are the steps
1) Create an account on openshift.com using the web console
2) 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 urls
3) Then go ahead and create an app
4) 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 rockmongo
5) You can now modify the source and then commit and push to
   remote repository


17
1. Sign Up!
     • openshift.com
     • All it takes is an email address
     • Promo Code: BAMUG




18
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 ssh




19
On the different platforms
  Easy Cheesy on Linux machines
  Mac you need to install the full Xcode
  Windows…well a bit more work




20
Don’t have Cygwin installed?

     Get it here: cygwin.com/install.html




21
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 lot



23
2. Install the Client Tools on Windows

     Next, download and extract rubygems from:
     http://rubyforge.org/projects/rubygems




24
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 rhc



25
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 application




26
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.com




27
Some tech to help with more learning for
OpenShift
 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/console




28
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 Beta




30
GitHub
 • Full featured applications on GitHub
 • www.github.com/gshipley
     •   BeerShift
 • www.github.com/openshift
     •   A whole bunch




31
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 freenode




33

Weitere ähnliche Inhalte

Was ist angesagt?

Блохин Леонид - "Mist, как часть Hydrosphere"
Блохин Леонид - "Mist, как часть Hydrosphere"Блохин Леонид - "Mist, как часть Hydrosphere"
Блохин Леонид - "Mist, как часть Hydrosphere"
Provectus
 

Was ist angesagt? (19)

AGES Presentation on Web, Python, Django and GeoServer
AGES Presentation on Web, Python, Django and GeoServerAGES Presentation on Web, Python, Django and GeoServer
AGES Presentation on Web, Python, Django and GeoServer
 
Open shift intro for Philly PUG
Open shift intro for Philly PUGOpen shift intro for Philly PUG
Open shift intro for Philly PUG
 
Back to Basics German 3: EinfĂźhrung in Replica Sets
Back to Basics German 3: EinfĂźhrung in Replica SetsBack to Basics German 3: EinfĂźhrung in Replica Sets
Back to Basics German 3: EinfĂźhrung in Replica Sets
 
GPFS - graphical intro
GPFS - graphical introGPFS - graphical intro
GPFS - graphical intro
 
GeoDistributed datacenter: the DNS way
GeoDistributed datacenter: the DNS wayGeoDistributed datacenter: the DNS way
GeoDistributed datacenter: the DNS way
 
Core OS
Core OSCore OS
Core OS
 
Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)
Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)
Cloud Firestore – From JSON Deserialization to Object Document Mapping (ODM)
 
Micro ORM vs Entity Framework
Micro ORM vs Entity FrameworkMicro ORM vs Entity Framework
Micro ORM vs Entity Framework
 
MongoDB on CloudFoundry
MongoDB on CloudFoundryMongoDB on CloudFoundry
MongoDB on CloudFoundry
 
Redis clustering
Redis clusteringRedis clustering
Redis clustering
 
Dockerfile for rust project
Dockerfile for rust projectDockerfile for rust project
Dockerfile for rust project
 
Kompose
KomposeKompose
Kompose
 
Web Scraping in Python with Scrapy
Web Scraping in Python with ScrapyWeb Scraping in Python with Scrapy
Web Scraping in Python with Scrapy
 
Блохин Леонид - "Mist, как часть Hydrosphere"
Блохин Леонид - "Mist, как часть Hydrosphere"Блохин Леонид - "Mist, как часть Hydrosphere"
Блохин Леонид - "Mist, как часть Hydrosphere"
 
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
 
Google chrome
Google chromeGoogle chrome
Google chrome
 
Geek Sync | Using PowerShell with Python and SQL Server
Geek Sync | Using PowerShell with Python and SQL ServerGeek Sync | Using PowerShell with Python and SQL Server
Geek Sync | Using PowerShell with Python and SQL Server
 
Reverse on go
Reverse on goReverse on go
Reverse on go
 
Geek Sync I Working with SQL Server for Linux Cross-Platform
Geek Sync I Working with SQL Server for Linux Cross-PlatformGeek Sync I Working with SQL Server for Linux Cross-Platform
Geek Sync I Working with SQL Server for Linux Cross-Platform
 

Ähnlich wie Free Mongo on OpenShift

OpenShift Origin: Build a PaaS Just Like Red Hats
OpenShift Origin: Build a PaaS Just Like Red HatsOpenShift Origin: Build a PaaS Just Like Red Hats
OpenShift Origin: Build a PaaS Just Like Red Hats
Mark Atwood
 
Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...
Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...
Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...
AgileNCR2013
 
Workshop For pycon13
Workshop For pycon13Workshop For pycon13
Workshop For pycon13
Steven Pousty
 
MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona Workshop
Valeri Karpov
 
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
Hyun-woo Park
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg
 

Ähnlich wie Free Mongo on OpenShift (20)

OpenShift Origin: Build a PaaS Just Like Red Hats
OpenShift Origin: Build a PaaS Just Like Red HatsOpenShift Origin: Build a PaaS Just Like Red Hats
OpenShift Origin: Build a PaaS Just Like Red Hats
 
Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...
Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...
Agile NCR 2013- Shekhar Gulati - Open shift platform-for-rapid-and-agile-deve...
 
What is Node.js? (ICON UK)
What is Node.js? (ICON UK)What is Node.js? (ICON UK)
What is Node.js? (ICON UK)
 
Workshop For pycon13
Workshop For pycon13Workshop For pycon13
Workshop For pycon13
 
NLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerNLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift Primer
 
OpenShift Primer - get your business into the Cloud today!
OpenShift Primer - get your business into the Cloud today!OpenShift Primer - get your business into the Cloud today!
OpenShift Primer - get your business into the Cloud today!
 
Dockerize All The Things
Dockerize All The ThingsDockerize All The Things
Dockerize All The Things
 
Proper Connections Development for Proper Domino Developers
Proper Connections Development for Proper Domino DevelopersProper Connections Development for Proper Domino Developers
Proper Connections Development for Proper Domino Developers
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile Apps
 
MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona Workshop
 
Codemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift PrimerCodemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift Primer
 
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
 
Open Source Technology and Web Scripting
Open Source Technology and Web ScriptingOpen Source Technology and Web Scripting
Open Source Technology and Web Scripting
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
AppScale @ LA.rb
AppScale @ LA.rbAppScale @ LA.rb
AppScale @ LA.rb
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
 

Mehr von Steven Pousty

APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + DockerAPPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
Steven Pousty
 
Spatial script for CIMA
Spatial script for CIMASpatial script for CIMA
Spatial script for CIMA
Steven Pousty
 
Spatial script for my JS.Everywhere 2012
Spatial script for my JS.Everywhere 2012Spatial script for my JS.Everywhere 2012
Spatial script for my JS.Everywhere 2012
Steven Pousty
 
Spatial script for Spatial mongo for PHP and Zend
Spatial script for Spatial mongo for PHP and ZendSpatial script for Spatial mongo for PHP and Zend
Spatial script for Spatial mongo for PHP and Zend
Steven Pousty
 
Dropping Science on Your Developer Ecosystem - lessons from Ecosystem Management
Dropping Science on Your Developer Ecosystem - lessons from Ecosystem ManagementDropping Science on Your Developer Ecosystem - lessons from Ecosystem Management
Dropping Science on Your Developer Ecosystem - lessons from Ecosystem Management
Steven Pousty
 
Using PostGIS To Add Some Spatial Flavor To Your Application
Using PostGIS To Add Some Spatial Flavor To Your ApplicationUsing PostGIS To Add Some Spatial Flavor To Your Application
Using PostGIS To Add Some Spatial Flavor To Your Application
Steven Pousty
 

Mehr von Steven Pousty (15)

APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + DockerAPPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
 
Introduction to PaaS for application developers
Introduction to PaaS for application developersIntroduction to PaaS for application developers
Introduction to PaaS for application developers
 
London Cloud Summit 2014 - raising the tide: getting developers in the cloud
London Cloud Summit 2014  - raising the tide: getting developers in the cloudLondon Cloud Summit 2014  - raising the tide: getting developers in the cloud
London Cloud Summit 2014 - raising the tide: getting developers in the cloud
 
Build a PaaS with OpenShift Origin
Build a PaaS with OpenShift OriginBuild a PaaS with OpenShift Origin
Build a PaaS with OpenShift Origin
 
Monkigras - dropping science on your developer ecosystem
Monkigras - dropping science on your developer ecosystemMonkigras - dropping science on your developer ecosystem
Monkigras - dropping science on your developer ecosystem
 
Spatial script for MongoBoulder
Spatial script for MongoBoulderSpatial script for MongoBoulder
Spatial script for MongoBoulder
 
Spatial script for CIMA
Spatial script for CIMASpatial script for CIMA
Spatial script for CIMA
 
Spatial script for my JS.Everywhere 2012
Spatial script for my JS.Everywhere 2012Spatial script for my JS.Everywhere 2012
Spatial script for my JS.Everywhere 2012
 
Spatial script for Spatial mongo for PHP and Zend
Spatial script for Spatial mongo for PHP and ZendSpatial script for Spatial mongo for PHP and Zend
Spatial script for Spatial mongo for PHP and Zend
 
Dropping Science on Your Developer Ecosystem - lessons from Ecosystem Management
Dropping Science on Your Developer Ecosystem - lessons from Ecosystem ManagementDropping Science on Your Developer Ecosystem - lessons from Ecosystem Management
Dropping Science on Your Developer Ecosystem - lessons from Ecosystem Management
 
Open shift intro for Philly PUG
Open shift intro for Philly PUGOpen shift intro for Philly PUG
Open shift intro for Philly PUG
 
Script for Spatial Mongo
Script for Spatial MongoScript for Spatial Mongo
Script for Spatial Mongo
 
deCarta at BAPI
deCarta at BAPI deCarta at BAPI
deCarta at BAPI
 
LinuxFest NW - Using Postgis To Add Some Spatial Flavor To Your App
LinuxFest NW - Using Postgis To Add Some Spatial Flavor To Your AppLinuxFest NW - Using Postgis To Add Some Spatial Flavor To Your App
LinuxFest NW - Using Postgis To Add Some Spatial Flavor To Your App
 
Using PostGIS To Add Some Spatial Flavor To Your Application
Using PostGIS To Add Some Spatial Flavor To Your ApplicationUsing PostGIS To Add Some Spatial Flavor To Your Application
Using PostGIS To Add Some Spatial Flavor To Your Application
 

KĂźrzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

KĂźrzlich hochgeladen (20)

Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Free Mongo on OpenShift

  • 1. Getting Started with Mongo DB & OpenShift Aka Free Mongo applications for you! Steve Citron-Pousty Developer Evangelist, Red Hat March 20, 2012 1
  • 2. Agenda • What is OpenShift? • Getting Started • Using Mongo with OpenShift • Next Steps 2
  • 3. 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 Mongo 3
  • 4. 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
  • 5. What is OpenShift? Red Hat’s free platform as a service for applications in the cloud. 5
  • 6. Kind of like Amazon, right? Nope. 6
  • 7. 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
  • 8. 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
  • 9. 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
  • 10. 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 stack 10
  • 12. 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
  • 13. 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
  • 14. 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 over 14
  • 15. So, Let’s Get Started! 1. Sign up 2. Install the client tools 3. Create a domain name 4. Create an application 15
  • 17. So here are the steps 1) Create an account on openshift.com using the web console 2) 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 urls 3) Then go ahead and create an app 4) 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 rockmongo 5) You can now modify the source and then commit and push to remote repository 17
  • 18. 1. Sign Up! • openshift.com • All it takes is an email address • Promo Code: BAMUG 18
  • 19. 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 ssh 19
  • 20. On the different platforms  Easy Cheesy on Linux machines  Mac you need to install the full Xcode  Windows…well a bit more work 20
  • 21. Don’t have Cygwin installed? Get it here: cygwin.com/install.html 21
  • 22. Hold up, what’s Cygwin? A Linux-like environment for Windows making it possible to port software running on Linux systems to Windows. 22
  • 23. 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 lot 23
  • 24. 2. Install the Client Tools on Windows Next, download and extract rubygems from: http://rubyforge.org/projects/rubygems 24
  • 25. 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 rhc 25
  • 26. 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 application 26
  • 27. 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.com 27
  • 28. Some tech to help with more learning for OpenShift 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/console 28
  • 29. 4. Create an Application $ rhc app create –a <your app name> -t jbossas-7 Password: 29
  • 30. Mongo Specific awesomeness RockMongo MMS Spatial is enabled Sharding and replication are not running yet but they will be by time we leave Beta 30
  • 31. GitHub • Full featured applications on GitHub • www.github.com/gshipley • BeerShift • www.github.com/openshift • A whole bunch 31
  • 32. 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
  • 33. Next Steps • Forum: redhat.com/openshift/community • Email: openshift@redhat.com • IRC: #openshift on freenode 33