Skip to content

Commit

Permalink
Fix rockcraft entry point and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-ratushnyy committed Nov 29, 2023
1 parent 7daca81 commit ce806f1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Charmed MongoDB ROCK is an Open Container Initiative (OCI) image derived from the [Charmed MongoDB Snap](https://snapcraft.io/charmed-mongodb). The tool used to create this ROCK is called [Rockcraft](https://canonical-rockcraft.readthedocs-hosted.com/en/latest/index.html).

The [Charmed MongoDB ROCK](https://github.com/canonical/charmed-mongodb-rock/pkgs/container/charmed-mongodb) is an enhanced, source-available, fully-compatible, drop-in replacement of the OCI image of MongoDB 5.0.13 Community version. In addition, the Charmed MongoDB ROCK package offers more features than the MongoDB Community version, such as backup and restore, monitoring and security features.
The [Charmed MongoDB ROCK](https://github.com/canonical/charmed-mongodb-rock/pkgs/container/charmed-mongodb) is an enhanced, source-available, fully-compatible, drop-in replacement of the OCI image of MongoDB 6.0.6 Community version. In addition, the Charmed MongoDB ROCK package offers more features than the MongoDB Community version, such as backup and restore, monitoring and security features.

One benefit of using the Charmed MongoDB ROCK is that it bundles MongoDB with other tools in its ecosystem to be used in the Charmed MongoDB Operator. One of the operators that uses this ROCK is the [Charmed MongoDB (Kubernetes Operator)](https://charmhub.io/mongodb-k8s).

Expand All @@ -30,11 +30,11 @@ sudo snap install docker
```
Then to use the Charmed MongoDB ROCK run the following command
```
sudo docker run --rm -it ghcr.io/canonical/charmed-mongodb:5.0.14-22.04_edge
sudo docker run --rm -it ghcr.io/canonical/charmed-mongodb:6.0.6-22.04_edge
```
By running this command you have already started the mongod service with Percona Server for MongoDB. Leave this command running and create another terminal.

*Note if you would like to start `mongod` with custom options you can append your desired options to the container run command i.e.*: `sudo docker run --rm -it ghcr.io/canonical/charmed-mongodb:5.0.14-22.04_edge --bind-ip-all --another-option` *you can read more about [mongod optons here](https://www.mongodb.com/docs/manual/reference/program/mongod/)*
*Note if you would like to start `mongod` with custom options you can append your desired options to the container run command i.e.*: `sudo docker run --rm -it ghcr.io/canonical/charmed-mongodb:6.0.6-22.04_edge --bind-ip-all --another-option` *you can read more about [mongod optons here](https://www.mongodb.com/docs/manual/reference/program/mongod/)*

To access your now running MongoDB instance enter the command:
```
Expand All @@ -43,11 +43,11 @@ sudo docker container ls
This should output something like this:
```
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0dddcc9c71d6 ghcr.io/canonical/charmed-mongodb:5.0.14-22.04_edge "/usr/bin/setpriv --…" 44 seconds ago Up 44 seconds romantic_newton
bf08481d18a3 ghcr.io/canonical/charmed-mongodb:6.0.6-22.04_edge "/bin/pebble enter -…" About a minute ago Up About a minute quizzical_sinoussi
```
The name of the container is listed under `NAME` - use this name to connect to your now running database
```
sudo docker exec --interactive <container-name> mongo
sudo docker exec --interactive <container-name> mongosh
```
Now enter `show dbs` this should show you all of your available databases and output something like:
```
Expand Down Expand Up @@ -119,7 +119,3 @@ The Charmed MongoDB Operator is free software, distributed under the [Apache Sof
## Trademark Notice

"MongoDB" is a trademark or registered trademark of MongoDB, Inc. Other trademarks are property of their respective owners. Charmed MongoDB is not sponsored, endorsed, or affiliated with MongoDB, Inc.




8 changes: 8 additions & 0 deletions rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,11 @@ parts:
source: licenses
organize:
LICENSE-rock: licenses/LICENSE-rock

entry:
plugin: dump
source: scripts
organize:
start.sh: bin/start.sh
stage:
- bin/start.sh

0 comments on commit ce806f1

Please sign in to comment.