This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Template | |
metadata: | |
name: mongodb-openshift-replicaset-template | |
annotations: | |
openshift.io/display-name: "MongoDB Enterprise Replica Set" | |
description: >- | |
This template will deploy a MongoDB Enterprise | |
replica set using the MongoDB Ops Manager Kubernetes | |
Operator. For more information, including a step-by-step |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Jongo.java | |
import com.mongodb.MongoClient; | |
import com.mongodb.MongoClientURI; | |
import com.mongodb.ServerAddress; | |
import com.mongodb.client.MongoDatabase; | |
import com.mongodb.client.MongoCollection; | |
import org.bson.Document; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mongodb-enterprise] | |
name=MongoDB Enterprise Repository | |
baseurl=https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/3.6/$basearch/ | |
gpgcheck=1 | |
enabled=1 | |
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Template | |
labels: | |
template: mongodb-openshift-dev-preview-template | |
message: |- | |
This is the MongoDB Enterprise Openshift Developer Preview. | |
Sweet! | |
metadata: | |
annotations: | |
description: |- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
using MongoDB.Bson; | |
using MongoDB.Driver; | |
using MongoDB.Driver.Core; | |
namespace retry | |
{ | |
class Program | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dir=$(pwd) | |
dbpath="${dir}/mms-app-db" | |
lock="${dbpath}/mongodb.lock" | |
shell="${dir}/mongodb-linux*/bin/mongo" | |
# if lock stop | |
if [ ! -f ${lock} ]; then | |
echo "mongodb running, shutting down..." | |
${shell} admin --eval 'db.shutdownServer()' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -OL https://cloud.mongodb.com/download/agent/backup/mongodb-mms-backup-agent-5.2.0.473-1.x86_64.rpm | |
sudo rpm -U mongodb-mms-backup-agent-5.2.0.473-1.x86_64.rpm | |
sudo vi /etc/mongodb-mms/backup-agent.config | |
mmsApiKey=2b6258996dcaeb3bc4d17acb5ccd6099 | |
sudo service mongodb-mms-backup-agent start | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connectionString = "mongodb://localhost:12831/test"; | |
var dbName = "test"; | |
var baseCollectionName = "Foo"; | |
var numCollections = 2;//3; | |
var sleepTimeMs = 1000*60; | |
var shouldStop = function() { | |
return ls().indexOf("./stop-textTerms")!=-1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2016-09-26T15:00:29.089-0400 I COMMAND [conn1] textTermBuild2 neTermNew=test.Foo_0_Terms.new | |
2016-09-26T15:00:29.113-0400 I COMMAND [conn1] InsertTerms called on textTermBuild2 | |
2016-09-26T15:00:29.116-0400 I COMMAND [conn1] textTermBuild2 rename start from:test.Foo_0_Terms.new to:test.Foo_0_Terms | |
2016-09-26T15:00:29.116-0400 I COMMAND [conn1] textTermBuild2 rename try drop:test.Foo_0_Terms | |
2016-09-26T15:00:29.117-0400 I COMMAND [conn1] textTermBuild2 rename dropped test.Foo_0_Terms | |
2016-09-26T15:00:29.121-0400 I COMMAND [conn1] textTermBuild2 rename done | |
2016-09-26T15:00:33.120-0400 I NETWORK [initandlisten] connection accepted from 127.0.0.1:56391 #2 (2 connections now open) | |
2016-09-26T15:00:33.122-0400 I NETWORK [initandlisten] connection accepted from 127.0.0.1:56392 #3 (3 connections now open) | |
2016-09-26T15:00:33.123-0400 I COMMAND [conn3] textTermBuild2 neTermNew=test.Foo_1_Terms.new | |
2016-09-26T15:00:33.127-0400 I NETWORK [initandlisten] connection accepted from 127.0.0.1:56393 #4 (4 connection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fts_command.h | |
/** | |
* Copyright (C) 2012 10gen Inc. | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU Affero General Public License, version 3, | |
* as published by the Free Software Foundation. | |
* | |
* This program is distributed in the hope that it will be useful, |