No description or website provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.final_builds Sixth mongoDB release Jan 8, 2019
config
jobs Parametrize catalog Jan 8, 2019
packages Removing old references to golang 1.8 Sep 10, 2018
releases/mongodb-services Sixth mongoDB release Jan 8, 2019
src Parametrize catalog Jan 8, 2019
test
.envrc
.gitignore Updating README Mar 30, 2018
.gitmodules
.ruby-version Add basic unit-test system Sep 29, 2017
Gemfile Add basic unit-test system Sep 29, 2017
Gemfile.lock Add basic unit-test system Sep 29, 2017
LICENSE
README.md Updating README Mar 30, 2018
RUBY-ENV.md Document how to create a Ruby environment Oct 5, 2017
TEST-PLAN.md
manifest-example.yml

README.md

Mongodb Bosh Release

Contents

What's new

  • 2017-12-20:

mongodb compilation has been delayed to it's own bosh release. Now only the compiled blob is provided, which allow to considerably reducing compilation times

  • 2018-03-30:
  • Two different blobs condidering the stemcell used for deployments (centos or ubuntu)
  • Enhencing acceptance tests integration

Purpose

This project is a Mongodb Bosh release. It's entirelly compiled from sources code, which allow to include some features like Rocksdb engine.

As it is compiled with statics libraries, the release could be implemented on ubuntu or centos Stemcell.

What should the Release do

  • Configure a standalone or a set of standalone servers
  • Configure a replica set (Shard and config server are not implemented yet)
  • Complete requirements for mongodb servers (production notes)
  • Install mongodb component (shell / tools / mongod)
  • Authentification using bosh/credhub generated passwords (could be disable)

Packages versions summary

  • Mongodb database and modules version
Package Version Note
mongodb 3.4.7
mongo-rocks 3.4.7
mongo-tools 3.4.7
rocksdb 5.7.3

Installation

Clone the repository

git clone --recursive https://github.com/orange-cloudfoundry/mongodb-compilation-boshrelease.git

Create the deployment manifest

An example is provided, update and complete it with your own configuration

Deployment

bosh -d [deployment name] create-release
bosh -d [deployment name] upload-release
bosh -d [deployment name] -n deploy manifest.yml --vars-store=credentials.yml -v appli="mongodb"

--vars-store=credentials.yml is uneeded if you are using credhub

Broker

Mongodb Broker (broker job)

The mongodb broker implements the 5 REST endpoints required by Cloud Foundry to write V2 services :

  • Catalog management in order to register the broker to the platform
  • Provisioning in order to create resource in the mongodb server
  • Deprovisioning in order to release resource previously allocated
  • Binding (credentials type) in order to provide application with a set of information required to use the allocated service
  • Unbinding in order to delete credentials resources previously allocated

Mongodb Broker Smoke Tests (broker-smoke-tests job)

The mongodb broker smoke test acts as an end user developper who wants to host its application in a cloud foundry.

For that, it relies on a sample mongodb application : https://github.com/JCL38-ORANGE/cf-mongodb-example-app

The following steps are performed by the smoke tests job :

  • Authentication on Cloud Foundry by targeting org and space (cf auth and cf target)
  • Deployment of the sample mongodb application (cf push)
  • Provisioning of the service (cf create-service)
  • Binding of the service (cf bind-service)
  • Restaging of the sample mongodb application (cf restage)
  • Table creation in the mongodb cluster (HTTP POST command to the sample mongodb application)
  • Table deletion in the mongodb cluster (HTTP DELETE command to the sample mongodb application)

Configuring CF to use Mongodb service

Available Plans

For the moment, only 1 default plan available for shared Mongodb.

Broker registration

The broker uses HTTP basic authentication to authenticate clients. The cf create-service-broker command expects the credentials for the cloud controller to authenticate itself to the broker.

cf create-service-broker p-mongodb-broker <user> <password> <url> 
cf enable-service-access mongodb

Service provisioning

cf create-service mongodb default mongodb-instance

Service binding

cf bind-service mongodb-example-app mongodb-instance

Service unbinding

cf unbind-service mongodb-example-app mongodb-instance

Service deprovisioning

cf delete-service mongodb-instance

Contributing

Ruby Env Setup

This my setup:

brew install ruby-build chruby
ruby-build 2.4.2 --install-dir ~/.rubies/ruby-2.4.2
gem update --system
gem install bundler
bundle install