Overview
MongoDB is a document database that provides high performance, high availability, and easy scalability.
- Document Database
| First install pip for Python2. Download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py | |
| $ cd <download location> | |
| $ sudo -H ./get-pip.py | |
| Use pip to install pip3 | |
| $ sudo -H pip install pip3 | |
| Installing pip3 also installs Python3 | |
| To run Python3 | |
| $ python3 |
| /* MongoDB cheat sheet */ | |
| // replication lag via serverStatus() | |
| db._adminCommand( { serverStatus : 1 , repl ; 2 } ) | |
| // stats | |
| db.stats() | |
| db.foo.stats() | |
| // size of BSON of some query |
In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.
The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| ## credit: http://fabian-affolter.ch/blog/the-lineinfile-module-of-ansible/ | |
| --- | |
| - hosts: alpine_install | |
| user: root | |
| tasks: | |
| # - name: create a complete empty file | |
| # command: /usr/bin/touch /test/test.conf | |
| - name: create a new file with lineinfile |
Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.
This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.
There is a companion feature matrix of various tools. Comments are welcome in the same manner.
| # Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
| # Will include all hosts the playbook is run on. | |
| # Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
| - name: "Build hosts file" | |
| lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
| when: hostvars[item].ansible_default_ipv4.address is defined | |
| with_items: groups['all'] |
| #!/usr/bin/python2 | |
| import serial | |
| import re, sys, signal, os, time, datetime | |
| import RPi.GPIO as GPIO | |
| BITRATE = 9600 | |
| GPIO.setmode(GPIO.BOARD) | |
| GPIO.setup(7, GPIO.OUT) | |
| GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP) |