Skip to content

Commit

Permalink
Add mongodb snaps.
Browse files Browse the repository at this point in the history
  • Loading branch information
niemeyer committed Jul 2, 2016
1 parent 4a77460 commit 0662a3b
Show file tree
Hide file tree
Showing 13 changed files with 465 additions and 0 deletions.
27 changes: 27 additions & 0 deletions mongodb/content/bin/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

if [ $(id -u) -ne 0 ]; then
SNAP_DATA=$SNAP_USER_DATA
fi

if [ -f $SNAP_DATA/environment ]; then
. $SNAP_DATA/environment
fi

OPTIONS=
if [ -f $SNAP_DATA/${1}-options ]; then
OPTIONS=$(cat $SNAP_DATA/${1}-options)
fi
if [ "$1" = mongod -o "$1" = mongo ]; then
if [ -z "${@:2}" ]; then
OPTIONS="--port=${SNAP_NAME:5}017 $OPTIONS"
fi
fi
if [ "$1" = mongod ]; then
if ! echo "$@" | grep -q -- --dbpath; then
OPTIONS="--dbpath=$SNAP_DATA/../common $OPTIONS"
fi
fi

export LC_ALL=C
exec $SNAP/bin/$1 $OPTIONS "${@:2}"
1 change: 1 addition & 0 deletions mongodb/mongo22/parts/plugins
71 changes: 71 additions & 0 deletions mongodb/mongo22/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: mongo22
version: 2.2.7
summary: MongoDB document-oriented database

description: |
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features:
* Collection oriented storage - easy storage of object-style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large objects (e.g. videos)
* Auto-sharding for cloud-level scalability
High performance, scalability, and reasonable depth of functionality
are the goals for the project.
confinement: strict

apps:
mongo22:
command: bin/run.sh mongo

mongod:
command: bin/run.sh mongod --port=22017 --smallfiles --noprealloc
daemon: simple

d:
command: bin/run.sh mongod
s:
command: bin/run.sh mongos

export:
command: bin/run.sh mongoexport
import:
command: bin/run.sh mongoimport
dump:
command: bin/run.sh mongodump
restore:
command: bin/run.sh mongorestore

top:
command: bin/run.sh mongotop
stat:
command: bin/run.sh mongostat
perf:
command: bin/run.sh mongoperf

files:
command: bin/run.sh mongofiles
sniff:
command: bin/run.sh mongosniff
oplog:
command: bin/run.sh mongooplog

plugs:
home:
network:
network-bind:

parts:
mongodb:
source: http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.2.7.tgz
plugin: dump

content:
source: ../content
plugin: dump
1 change: 1 addition & 0 deletions mongodb/mongo24/parts/plugins
71 changes: 71 additions & 0 deletions mongodb/mongo24/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: mongo24
version: 2.4.14
summary: MongoDB document-oriented database

description: |
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features:
* Collection oriented storage - easy storage of object-style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large objects (e.g. videos)
* Auto-sharding for cloud-level scalability
High performance, scalability, and reasonable depth of functionality
are the goals for the project.
confinement: strict

apps:
mongo24:
command: bin/run.sh mongo

mongod:
command: bin/run.sh mongod --port=24017 --smallfiles --noprealloc
daemon: simple

d:
command: bin/run.sh mongod
s:
command: bin/run.sh mongos

export:
command: bin/run.sh mongoexport
import:
command: bin/run.sh mongoimport
dump:
command: bin/run.sh mongodump
restore:
command: bin/run.sh mongorestore

top:
command: bin/run.sh mongotop
stat:
command: bin/run.sh mongostat
perf:
command: bin/run.sh mongoperf

files:
command: bin/run.sh mongofiles
sniff:
command: bin/run.sh mongosniff
oplog:
command: bin/run.sh mongooplog

plugs:
home:
network:
network-bind:

parts:
mongodb:
source: http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.14.tgz
plugin: dump

content:
source: ../content
plugin: dump
1 change: 1 addition & 0 deletions mongodb/mongo26/parts/plugins
71 changes: 71 additions & 0 deletions mongodb/mongo26/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: mongo26
version: 2.6.12
summary: MongoDB document-oriented database

description: |
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features:
* Collection oriented storage - easy storage of object-style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large objects (e.g. videos)
* Auto-sharding for cloud-level scalability
High performance, scalability, and reasonable depth of functionality
are the goals for the project.
confinement: strict

apps:
mongo26:
command: bin/run.sh mongo

mongod:
command: bin/run.sh mongod --port=26017 --auth --smallfiles --noprealloc
daemon: simple

d:
command: bin/run.sh mongod
s:
command: bin/run.sh mongos

export:
command: bin/run.sh mongoexport
import:
command: bin/run.sh mongoimport
dump:
command: bin/run.sh mongodump
restore:
command: bin/run.sh mongorestore

top:
command: bin/run.sh mongotop
stat:
command: bin/run.sh mongostat
perf:
command: bin/run.sh mongoperf

files:
command: bin/run.sh mongofiles
sniff:
command: bin/run.sh mongosniff
oplog:
command: bin/run.sh mongooplog

plugs:
home:
network:
network-bind:

parts:
mongodb:
source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.12.tgz
plugin: dump

content:
source: ../content
plugin: dump
1 change: 1 addition & 0 deletions mongodb/mongo30/parts/plugins
73 changes: 73 additions & 0 deletions mongodb/mongo30/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: mongo30
version: 3.0.12
summary: MongoDB document-oriented database

description: |
MongoDB is a high-performance, open source, schema-free
document-oriented data store that's easy to deploy, manage
and use. It's network accessible, written in C++ and offers
the following features:
* Collection oriented storage - easy storage of object-style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large objects (e.g. videos)
* Auto-sharding for cloud-level scalability
High performance, scalability, and reasonable depth of functionality
are the goals for the project.
confinement: strict

apps:
mongo30:
command: bin/run.sh mongo

mongod:
command: bin/run.sh mongod --port=30017 --smallfiles --noprealloc
daemon: simple

d:
command: bin/run.sh mongod
s:
command: bin/run.sh mongos

export:
command: bin/run.sh mongoexport
import:
command: bin/run.sh mongoimport
dump:
command: bin/run.sh mongodump
restore:
command: bin/run.sh mongorestore

top:
command: bin/run.sh mongotop
stat:
command: bin/run.sh mongostat
perf:
command: bin/run.sh mongoperf

files:
command: bin/run.sh mongofiles
sniff:
command: bin/run.sh mongosniff
oplog:
command: bin/run.sh mongooplog

plugs:
home:
network:
network-bind:

parts:
mongodb:
source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1404-3.0.12.tgz
plugin: dump
stage-packages:
- libssl1.0.0

content:
source: ../content
plugin: dump
1 change: 1 addition & 0 deletions mongodb/mongo32/parts/plugins
Loading

0 comments on commit 0662a3b

Please sign in to comment.