Sunday, December 29, 2019

Running MongoDB on ChromeOS (via Crostini)

In my previous post I explored Linux application support in ChromeOS and Chromebooks (a.k.a. Crostini). Of course I was bound to try running MongoDB in this environment, which I found to work really well (for development purposes). Here's my notes on running a MongoDB database and tools on a Chromebook with Linux (beta) enabled:
  • In ChromeOS, launch the Terminal app (which opens a Shell inside the 'Penguin' Linux container inside the 'Termina' Linux VM)
  • Run the following commands which are documented in the MongoDB Manual page on installing MongoDB Enterprise on Debian (following the manual's tab instructions titled “Debian 9 "Stretch”):
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
echo "deb http://repo.mongodb.com/apt/debian stretch/mongodb-enterprise/4.2 main" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
sudo apt-get update
sudo apt-get install -y mongodb-enterprise
  • Start a MongoDB database instance running:
mkdir ~/data
mongod --dbpath ~/data
  • Launch a second Terminal window and then run the Mongo Shell against this database and perform a quick database insert and query test:
mongo
db.mycoll.insert({a:1})
db.mycoll.find()
db.mycoll.drop()
exit

  • Install Python 3 and the PIP Python package manager (using Anaconda) and then install the MongoDB Python driver (PyMongo):
wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh
bash Anaconda3-*-Linux-x86_64.sh
source ~/.bashrc
python --version
pip --version
pip install --user pymongo
  • Test PyMongo by running a small ‘payments data generator’ Python script pulled down from a GitHub repository (this should insert records into the MongoDB local database’s “fs.payments” collection; after letting it run for a minute, continuously inserting new records, press Ctrl-C to stop it):
git clone https://github.com/pkdone/PaymentsWriteReadConcerns.git
cd PaymentsWriteReadConcerns/
./payments-records-loader.py -p 1
  • Download MongoDB Compass (use the Ubuntu 64-bit 14.04+ version), install and run it against the 'localhost' MongoDB database and inspect the contents of the “fs.payments” collection:
wget https://downloads.mongodb.com/compass/mongodb-compass_1.20.4_amd64.deb
sudo apt install ./mongodb-compass_*_amd64.deb
mongodb-compass




Song for today: Sun. Tears. Red by Jambinai

15 comments:

madin said...

OMEGA has been a world leader in advanced watch design since 1848. Over the years, cheap replica watchesthe brand has been widely celebrated for their durability and precision. replica omega watches has served as the official timekeepers of the Olympic Games for nearly a century. They also created the official watch of the space program and first watch to land on the moon. Buying an OMEGA watch is an excellent way to invest in a piece of history.

madin said...

Louis Vuitton himself was born the son of a miller in 1821 in Anchay, a hamlet in the Jura Mountains, not far from the Swiss border. Replica bagsThe region was a poor one - serfdom had only been abolished less than 40 years previously, so Louis left to seek his fortune when he was a teenager, arriving in the French capital aged 16. This was the Paris of Victor Hugo's Les Misérables, with nearly one million inhabitants. As the composer Chopin said in a letter to a friend at the time, "Here you find the greatest luxury and the greatest filth, the greatest virtue and the greatest vice."replica Louis Vuiton bags

madin said...

Montblanc Meisterstück Geometric Solitaire Platinum Ballpoint Pen is the ideal writing tool for you to impress. This replica mont blanc fountain pen medium has proven to be replica montblanc heritage collection very popular among collectors because it is larger than a standard Classique ballpoint pen, but smaller than a large LeGrand pen, so it can be easily held in your hand. Each writing instrument in the series has more than 2,000 geometric facets, giving them a unique optical illusion that makes your eyes charming and fun. The geometry of Taipan Solitaire was born from the desire to combine Montblanc classic design with unique materials.

madin said...

Ideal for collectors, replica mont blanc fountain pen this Starwalker fountain pen is a bold evolution replica mont blanc pix of Montblanc's Starwalker fountain pen. It uses new emblem technology and has a blue translucent dome, reminiscent of the earth appearing above the moon. The pen is part of a new series designed to help commemorate the 50th anniversary of the moon's landing.

madin said...

Rolex watches are made from the finest raw materials and carefully selected.replica rolex watches uk Each component is designed, fake submariner watches developed and produced in-house to the strictest standards.

madin said...

Renowned for their red-lacquered soles,replica louboutin uk Christian Louboutin shoes bring luxury replica women louboutin boots footwear to daring new heights. No matter the event, Louboutin shoes exude glamour and an unrivaled appeal. Discover statement-making Louboutin heels like the So Kate, Pigalle, chic printed flats, and more unique styles.

madin said...

No outfit is complete without the perfect pair of shoes,cheap giuseppe zanotti shoes and it's not always cheap man giuseppe zanotti shoes easy to find them. But with this exceptional range by Giuseppe Zanotti, that's a thing of the past. An elaborate and sometimes wild journey into eccentric design choices,cheap man giuseppe zanotti shoes this collection of shoes is for all those who want to really try something new. The base shoes themselves hark back to classic designs 'sneakers, ankle boots, and so on 'but the detailing is something that's all its own. You'll find buckles, straps, fringes and much more on many of the pieces in the Giuseppe Zanotti range 'but there are also several pieces with an understated charm, too. Are you a wild one or a little more reserved? With this collection, both schools are catered for.

madin said...
This comment has been removed by the author.
madin said...

No outfit is complete without the perfect pair of shoes,cheap giuseppe zanotti shoes and it's not always cheap man giuseppe zanotti shoes easy to find them. But with this exceptional range by Giuseppe Zanotti, that's a thing of the past. An elaborate and sometimes wild journey into eccentric design choices,cheap man giuseppe zanotti shoes this collection of shoes is for all those who want to really try something new. The base shoes themselves hark back to classic designs 'sneakers, ankle boots, and so on 'but the detailing is something that's all its own. You'll find buckles, straps, fringes and much more on many of the pieces in the Giuseppe Zanotti range 'but there are also several pieces with an understated charm, too. Are you a wild one or a little more reserved? With this collection, both schools are catered for.

madin said...

A heritage brand with a cult following,cheap moncler jackets Moncler makes cold weather effortless to maneuver. replica woman moncler jackets Super soft puffer jackets and packaway hooded styles offer a variety of choices that'll each prove indispensable throughout the seasons' increasingly unpredictable climes.

madin said...

replica cartier watches is the renowned French jeweller and watchmaker with a history of pioneering design and a drive for excellence. The first references to Cartier wristwatches date back to 1888.discounted replica watches Late in the 19th century it was pocket and chatelaine watches that were most popular, but Louis Cartier saw a future in timepieces that could be worn on the wrist.

madin said...

La storia di repliche longines orologi è piena di orologi innovativi, repliche longines evidenza dai primi come il calibro Lépine 18 L ai pezzi successivi come Longines Evidenza e Longines LungoMare. Riveliamo anche i progressi tecnologici innovativi realizzati per gli orologi Longines, come il "Vibrograph", un dispositivo per il controllo della frequenza degli orologi, che ha debuttato nel 1946. Pur continuando a creare cronometristi meccanici, l'azienda ha anche aperto la strada a innovazioni nella tecnologia al quarzo per i suoi Orologi Longines. Uno è stato il primo orologio al quarzo portatile, nel 1954, che ha superato i requisiti della sua era di precisione e affidabilità. Gli orologi Longines incorporano ancora entrambe le tecnologie oggi; sia il quarzo che il meccanico sono stati rappresentati nel portafoglio diversificato del marchio per molti decenni.

madin said...

Based in Saint-Imier, replica longines watches Switzerland since 1832,replica mens longines watches Longines' watchmaking expertise reflects a strong devotion to tradition, elegance, and performance.

madin said...

replica longines watches uk have been a landmark of the industry since their brand began in 1832 in Saint-Imier. Today, replica mens longines 1832 watches the brand offers a wide variety of watches for men and women. Watches manufactured by Longines have been utilized throughout history for everything from exploration ventures to the expression of elegance. In addition to being famous for their ties to the racing and equestrian worlds, Longines watches are globally recognized for their timeless chic sophistication. we have a variety of Longines watches for sale, all new, beautiful, and guaranteed to be genuine. Even better, when shopping our Longines watches online, you know you are getting the best value. Browse our selection to find the Internet’s best Longines watch price.

madin said...

The complete selection of all replica Ray-Ban Sunglasses Ray-Ban sunglasses styles available online. replica Ray-Ban Sunglasses clubmaster Browse between new or classic frames, lenses and colors to find the shades that match your style. Discover the complete selection of women's sunglasses and men's designer shades through the iconic Ray-Ban models. Shop now on the official online store and receive free shipping on all orders.