All Projects → icflorescu → Openshift Cartridge Mongodb

icflorescu / Openshift Cartridge Mongodb

Licence: isc
Custom cartridge for OpenShift providing MongoDB > 3.2.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Openshift Cartridge Mongodb

Train Ai With Django Swagger Jwt
Train AI (Keras + Tensorflow) to defend apps with Django REST Framework + Celery + Swagger + JWT - deploys to Kubernetes and OpenShift Container Platform
Stars: ✭ 66 (-5.71%)
Mutual labels:  openshift
Mqtt Chat
MQTT Chat Using Mosca
Stars: ✭ 67 (-4.29%)
Mutual labels:  mongodb
Mean Stack Angular6 Crud Example
MEAN Stack Angular 6 CRUD Web Application
Stars: ✭ 69 (-1.43%)
Mutual labels:  mongodb
Openshift Letsencrypt
Stars: ✭ 66 (-5.71%)
Mutual labels:  openshift
Spring Examples
SpringBoot Examples
Stars: ✭ 67 (-4.29%)
Mutual labels:  mongodb
Event Sourcing Castanha
An Event Sourcing service template with DDD, TDD and SOLID. It has High Cohesion and Loose Coupling, it's a good start for your next Microservice application.
Stars: ✭ 68 (-2.86%)
Mutual labels:  mongodb
Hentergeo
基于Symfony2和MongoDB的地理位置查询演示
Stars: ✭ 64 (-8.57%)
Mutual labels:  mongodb
Flume Ng Mongodb Sink
Flume NG MongoDB source.
Stars: ✭ 69 (-1.43%)
Mutual labels:  mongodb
Shw server
使用SpringCloud和Spring WebFlux开发的学生作业管理系统服务端,前后端分离项目,微服务架构。支持Docker集群化部署,Redis集群化缓存,文件在线预览 压缩包预览 打包上传下载
Stars: ✭ 66 (-5.71%)
Mutual labels:  mongodb
Mongoid auto increment id
Override id field to MySQL like auto increment for Mongoid.
Stars: ✭ 68 (-2.86%)
Mutual labels:  mongodb
Habitica
A habit tracker app which treats your goals like a Role Playing Game.
Stars: ✭ 8,702 (+12331.43%)
Mutual labels:  mongodb
Mongoose Geojson Schema
Schema definitions for GeoJSON types for use with Mongoose JS
Stars: ✭ 66 (-5.71%)
Mutual labels:  mongodb
Jolly
Production ready boilerplate for hapi.js
Stars: ✭ 68 (-2.86%)
Mutual labels:  mongodb
Opencompose
OpenCompose - A higher level abstraction for Kubernetes Resource
Stars: ✭ 66 (-5.71%)
Mutual labels:  openshift
Record
✨✨都是自己输出和看过觉得不错的文章,欢迎star、watch!!同时欢迎推荐新文章、书籍和视频!!
Stars: ✭ 69 (-1.43%)
Mutual labels:  mongodb
Sample Spring Cloud Webflux
sample microservices demonstrating usage of spring reactive support with spring webflux and integration spring cloud, eureka, ribbon, spring cloud gateway, spring data jpa and mongodb
Stars: ✭ 65 (-7.14%)
Mutual labels:  mongodb
Incense
Interactively retrieve data from sacred experiments.
Stars: ✭ 68 (-2.86%)
Mutual labels:  mongodb
Avocado
Strongly-typed MongoDB driver for Rust
Stars: ✭ 70 (+0%)
Mutual labels:  mongodb
Egg Mongo Native
MongoDB egg.js plugin using native driver.
Stars: ✭ 69 (-1.43%)
Mutual labels:  mongodb
Livro Nodejs
Livro de NodeJS
Stars: ✭ 68 (-2.86%)
Mutual labels:  mongodb

Custom MongoDB cartridge for OpenShift

mongodb-openshift

This is a custom OpenShift cartridge providing MongoDB 3.4.x + WiredTiger storage engine.

Why

Because the standard OpenShift MongoDB cartridge is stuck at 2.4.

When to use

When you need a quick and unsofisticated solution to run your application with the latest MongoDB version.

How to

Using web console

Open your application in the web console, go to "See the list of cartridges you can add", paste the URL below in "Install your own cartridge" textbox at the bottom of the page and click "Next".

https://raw.githubusercontent.com/icflorescu/openshift-cartridge-mongodb/master/metadata/manifest.yml

Then you can use MONGODB_URL environment variable to connect from an application running in the main web cartridge.

To keep things flexible, the connection string stored in MONGODB_URL ends with / and does not include a database name. Use your application logic to name/create your database(s) as needed.

For instance, here's how you'd do it in a Node.js application using Mongoose ODM:

var mongoose = require('mongoose');
...
// Mongoose will create database_name if necessary
mongoose.connect(process.env.MONGODB_URL + 'database_name', { db: { nativeParser: true } });

Using the command line

Make sure you have rhc installed (see here).

If you want to add a MongoDB instance based on this cartridge to an existing application:

rhc cartridge-add https://raw.githubusercontent.com/icflorescu/openshift-cartridge-mongodb/master/metadata/manifest.yml \
  --app appname

...where appname is the name of your application.

To create an app based on the standard Node.js v0.10 cartridge and this one, run:

rhc app create appname \
  nodejs-0.10 \
  https://raw.githubusercontent.com/icflorescu/openshift-cartridge-mongodb/master/metadata/manifest.yml

If you want to use the latest Node.js version, you'll have to use a custom Node.js cartridge as well:

rhc app create appname \
  https://raw.githubusercontent.com/icflorescu/openshift-cartridge-nodejs/master/metadata/manifest.yml \
  https://raw.githubusercontent.com/icflorescu/openshift-cartridge-mongodb/master/metadata/manifest.yml

Notes

  • Using this cartridge to host your data does provide a cheap solution, but please understand that you'll be using it on your own responsibility. WiredTiger engine is a memory-hungry beast and you could eventually run into problems. Use a specialized Database-as-a Service provider for critical data (mLab, Compose, etc.).
  • This is a lean cartridge. To save space, just mongod is installed. No client libraries, no mongo console. If you need external access to your data, use rhc port-forward.
  • By default, the underlying MongoDB instance will accept unauthenticated access, which should be fine for most typical usage scenarios. See the discussion here for more info.
  • Can't think of a safe way to make this cartridge auto-updatable. For now we'll just have to use mongodump, destroy the cartridge, install the new version, then do a mongorestore.
  • Don't hesitate to make a pull-request with an updated version in this file if you notice this cartridge version is behind the latest stable official MongoDB linux binary.

FAQ

Q: I'm getting the error Cannot download, must be smaller than 20480 bytes while trying to deploy the cartridge to OpenShift. What am I doing wrong?

A: You're probably trying to use the URL https://github.com/icflorescu/openshift-cartridge-mongodb instead of https://raw.githubusercontent.com/icflorescu/openshift-cartridge-mongodb/master/metadata/manifest.yml. A common mistake for people not paying sufficient attention while trying to use a custom cartridge for the first time.


Q: How do I change the default mongod options?

A: ssh to the MongoDB gear, edit the control script with nano mongodb/bin/control and make sure to restart afterwards.


Q: How can I ssh to a MongoDB cartridge running in a secondary application gear?

A: You can discover the secondary gear URL by running rhc app show appname --gears.

Related

Since you're here, chances are you might also be interested in this custom Node.js cartridge.

Credits

See contributors here.

If you find this repo useful, don't hesitate to give it a star and spread the word.

Before raising issues

I'm getting lots of questions from people just learning to do web development or simply looking to solve a very specific problem they're dealing with. While I will answer some of them for the benefit of the community, please understand that open-source is a shared effort and it's definitely not about piggybacking on other people's work. On places like GitHub, that means raising issues is encouraged, but coming up with useful PRs is a lot better. If I'm willing to share some of my code for free, I'm doing it for a number of reasons: my own intellectual challenges, pride, arrogance, stubbornness to believe I'm bringing a contribution to common progress and freedom, etc. Your particular well-being is probably not one of those reasons. I'm not in the business of providing free consultancy, so if you need my help to solve your specific problem, there's a fee for that.

License

The ISC License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].