Skip to content

Instantly share code, notes, and snippets.

View jasonmimick's full-sized avatar
🌥️
build in the cloud

Jason Mimick jasonmimick

🌥️
build in the cloud
View GitHub Profile
@jasonmimick
jasonmimick / netperf
Last active September 14, 2016 01:36
#!/bin/bash
curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-3.2.9.tgz
tar xvf mongodb-linux-x86_64-rhel70-3.2.9.tgz
echo "{ nThreads:1024, fileSizeMB:1000, mmf:false, r:true, w:true, syncDelay:60 }" > netperf.conf
mongodb-linux-x86_64-rhel70-3.2.9/bin/mongoperf < ./netperf.conf >> netperf.log &
curl -s -L https://gist.githubusercontent.com/jasonmimick/3d3eeabebd912e0218374472935433b1/raw/834ae38de4f614cf171bd6cd0e6ce877f8e10954/netperf | bash 1>netperf.log 2>&1
// 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,
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
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
}
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
#!/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()'
using System;
using System.Text;
using MongoDB.Bson;
using MongoDB.Driver;
using MongoDB.Driver.Core;
namespace retry
{
class Program
{
apiVersion: v1
kind: Template
labels:
template: mongodb-openshift-dev-preview-template
message: |-
This is the MongoDB Enterprise Openshift Developer Preview.
Sweet!
metadata:
annotations:
description: |-
[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