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
// 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;
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
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

title: "Setting up SSL for the MongoDB Enterprise PCF Tile" author: [Jason Mimick] date: "2019-01-11" keywords: [Databases, MongoDB, Cloud Foundry, Pivotal] ...

Setting up SSL for the MongoDB Enterprise PCF Tile

This note describes the procedure for enabling TLS connections for MongoDB clusters deployed on PCF through the MongoDB Enterprise PCF Tile. Currently, the MongoDB PCF Tile does not support automatic configuration of TLS/SSL settings directly. Until this functionality is added to the tile, the recommended approach for configuring TLS is outlined in this note.

```bash
YCSB_VERSION=$(curl --silent https://api.github.com/repos/brianfrankcooper/YCSB/releases/latest | jq '.tag_name')
URL=$(curl --silent https://api.github.com/repos/brianfrankcooper/YCSB/releases/latest | jq '.assets[] | select(.name =="ycsb-0.15.0.tar.gz") | .browser_download_url')
```
#!/bin/bash
# Simple demonstration of using the MongoDB Atlas API
# to download a backup.
if [ "$#" -ne 3 ]
then
echo "restore-backup.sh - simple example to download a backup from a MongoDB Atlas cluster"
echo "Usage: ./restore-backup.sh <atlasuser:atlas-apikey> <group-id> <cluster-name>"
exit 1
#Khange direktory in Cubernetes
kubectl config set-context --current $(kubectl config current-context) --namespace=${1}

Getting started with the MongoDB Atlas Terraform Provider

Clone repo into ~/go/src/github.com/terraform-providers

make build
mkdir -p terraform.d/plugins/linux_amd64
cp ~/go/bin/terraform-provider-mongodbatlas ./terraform.d/plugins/linux_amd64
apiVersion: apps/v1
kind: Deployment
metadata:
name: ycsb-load-deployment
labels:
app: ycsb-load
spec:
replicas: 3
selector:
matchLabels:
set tabstop=2
set shiftwidth=2
set expandtab
set paste
set number
syntax on
set colorcolumn=70