Saturday, August 8, 2015

8-8-2015 Install Mongo 3.0 from start to finish (status : just started )

The purpose of this task is to install Mongo as a complicated sharding cluster or single server (with replicas). I did Mongo 2 for over a year, and I am getting certified in Mongo 3.0 for fun, and I like the direction Mongo is going, so I think it will be here for a while.

A big issue is the initial installation, the setup, and then graphing later. I need to install graphite at least before I am done with this blog entry.


  • Install DAD modules, develop them. 
  • Integrate with Salt
    • Make a module n the client side which
      • Checks if there is already a mongo installed, if there is enough diskspace, validates we can install. 
      • Install mongos, mongo config, or mongo data. Or standalone is replica set, or standalone. 
        • We need a config. 
      • The module will probably use existing salt modules. 
      • Return the data as yaml or multi-level dictionaries. 
    • DAD can detect if this server can execute stuff on other server via salt. 
      • Or via sudo. 
      • Detect is client side module is installed. 
  • Once integrated with SALT or sudo, 
    • Choose naming convention for mongo installations because we might have more than one mongo on it. Allow crazy configurations (which can be useful or test or QA boxes). 
    • Connect and execute detection scripts on all targeted hosts. 
    • Then execute the install scripts. 
    • Execute test scripts. 
    • Run as a background job and report status.
  • Make a DAD interface for monitoring mongo in its basic form. 
    • Include basic graphite stuff. 

Setting up dad. The initial setup is crude. I will need to make a package that installs this. I just

 ln -s /usr/lib/python2.7/dad  /SOME/DIR/work/git/dad

instead of making a package. Then a simple dad is just "import dad" in a python script. I am going to have to make packages for the target servers.

I am going to use MariaDB, because later I want to use the MariaDB Max stuff. https://downloads.mariadb.org/mariadb/repositories/#mirror=jmu&distro=Ubuntu&distro_release=precise--ubuntu_precise&version=10.0

sudo apt-get install python-software-properties
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://mirror.jmu.edu/pub/mariadb/repo/10.0/ubuntu precise main

sudo apt-get update
sudo apt-get install mariadb-server

# changed in etc/mysql/my.cnf the homedir to /data/mysql_00
mkdir -p /data/mysql_00
chown -R mysql /data/mysql_00
mv /var/lib/mysql/mysql /data/mysql_00/mysql 

service mysql stop
service mysql start


TODO: my.cnf settings, connection pooling, buffers, connections, etc.
Integratig with SALt.....

No comments:

Post a Comment