"New pack appliance "Pharo + MongoDB" released" by Mike on at updates/fargo under #pharo, #mongo  

New pack appliance "Pharo + MongoDB" released

We have just released Pharo + Mongo starter appliance. The appliance main feature is embedded MongoDB (v2.6.7, 64-bit) running locally on a standard port.

We concider the appliance to be an easy platform to deploy small web applications in the cloud as it requires no configuration to start.

You may run the appliance test instance in Pharocloud management at "Start Appliance" page: choose PHARO MONGO and you will get a week of a trial.

1. Pharo - MongoDB connection

Pharo is able to connect to the database with a default configuration (note that you need a Mongo package installed first):

con := Mongo default open.

With Pharo + Mongo appliance Mongo and Voyage-Mongo packages work out of the box. Here are the unit-tests running on the appliance:

2. Specs

The appliance is realeased in a starter platform so it has 256 RAM memory and 5 Gb HDD. If you need more just contact the support and we'll upgrade your instance.

3. Backup and Restore

To backup MongoDB data you need to install OSProcess package and execute the following code:

ExternalOSProcess waitForCommand: 'sudo mongodump'.

This command will create a dump of MongoDB in the following directory: /mnt/universe/mongodump.

To restore MongoDB from /mnt/universe/mongodump/ execute the following command:

ExternalOSProcess waitForCommand: 'sudo mongorestore'.

If you want to download (or upload) a backup to your local computer you may archive the dump folder and access it via Web File Browser Seaside application.

To archive the folder you may use the following command:

"archive dump folder to tar-gz file"
ExternalOSProcess waitForCommand: 'sudo tar -czf /mnt/universe/backup.tar.gz -C /mnt/universe mongodump'.

"unarchive file to dump folder"
ExternalOSProcess waitForCommand: 'sudo tar -xf /mnt/universe/backup.tar.gz -C /mnt/universe'.

blog comments powered by Disqus