2018/03/08

KVM + Ceph with Pacemaker

KVM + Ceph with Pacemaker

Architecture

  • Hosts: 2
  • Roles:
    • Host 1: KVM, Ceph
    • Host 2: KVM, Ceph

Steps

  1. setup ceph cluster
  2. setup pacemaker cluster
  3. create VM with virt-install
  4. export the xml with virsh dump
  5. edit the xml to use ceph as backend and change other desired settings1
  6. add a virtualdomain resource to pacemaker with the xml2

Written with StackEdit.


  1. USING LIBVIRT WITH CEPH RBD ↩︎

  2. VirtualDomain (resource agent) - Linux-HA ↩︎

KVM + Ceph with Pacemaker

KVM + Ceph with Pacemaker

KVM + Ceph with Pacemaker

Architecture

  • Hosts: 2
  • Roles:
    • Host 1: KVM, Ceph
    • Host 2: KVM, Ceph

Steps

  1. setup ceph cluster
  2. setup pacemaker cluster
  3. create VM with virt-install
  4. export the xml with virsh dump
  5. edit the xml to use ceph as backend and change other desired settings1
  6. add a virtualdomain resource to pacemaker with the xml2

Written with StackEdit.


  1. USING LIBVIRT WITH CEPH RBD ↩︎

  2. VirtualDomain (resource agent) - Linux-HA ↩︎

2015/03/03

pietty with gnu screen scroll buffer

Enable mouse scroll with the GNU screen scrollback:
  1. Check Option > More Options > Terminal > Features > Disable switching to alternate terminal screen
  2. Make sure the PieTTY scrollback matches the setting of GNU screen. If not, change it at Option > More Options > Window > Lines of scrollback
  3. Add "termcapinfo xterm*|xs|rxvt|terminal ti@:te@" to ~/.screenrc

2014/01/16

L4D2 Dedicated Server setup (Linux)

  1. Download SteamCMD
    mkdir steam
    cd steam
    mkdir steamcmd
    wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz
    tar xzf steamcmd_linux.tar.gz -C steamcmd
  2. Install L4D2 dedicated server
    cd steamcmd
    ./steamcmd.sh +login anonymous +force_install_dir `pwd`/../L4D2 +app_update 222860 validate +quit
  3. Install SourceMod and Metamod:Source
    cd steam
    wget http://newyork.download.maverickservers.com/source/sourcemod-1.5.2-linux.tar.gz
    tar xvzf sourcemod-1.5.2-linux.tar.gz -C L4D2/left4dead2
    wget http://newyork.download.maverickservers.com/source/mmsource-1.10.0-linux.tar.gz
    tar xvzf mmsource-1.10.0-linux.tar.gz -C L4D2/left4dead2
  4. Verify the installation
    cd steam/L4D2
    ./srcds_run
    meta version
    If the version info is showed up, the installation is successful
  5. Install ToolZ mod
    wget 'http://forums.alliedmods.net/attachment.php?attachmentid=122230&d=1373147952' -O
    l4dtoolz\(L4D2\)-1.0.0.9h.zip
    unzip l4dtoolz\(L4D2\)-1.0.0.9h.zip -d L4D2/left4dead2/addons
  6. Install bebop mod
    wget 'http://forums.alliedmods.net/attachment.php?attachmentid=54217&d=1259334888' -O bebop_0.2beta.zip
    unzip bebop_0.2beta.zip bebop.smx -d L4D2/left4dead2/addons
  7. Edit server config to allow more than 8 players
    open steam/L4D2/left4dead2/cfg/server.cfg and add these lines:
            sv_maxplayers 8
            sv_visiblemaxplayers 8
            sv_removehumanlimit 1
            sv_force_unreserved 1

2012/12/09

Build OpenCV

  1. Prerequisite
    • ffmpeg
      • build with pic "--enable-pic"
      • build shared "--enable-shared" (optional)
    • numpy
      • libgfortran
    • Intel TBB
  2.  Build
    tar xjf OpenCV-2.4.3.tar.bz2
    cd OpenCV-2.4.3
    mkdir release
    cd release
    cmake .. -D CMAKE_INSTALL_PATH=$topt -D PYTHON_LIBRARY=$topt/lib/libpython2.7.a -D PYTHON_INCLUDE_DIR=$topt/include/python2.7 -D PYTHON_PACKAGES_PATH=$topt/lib/python -D WITH_TBB=ON -D TBB_LIB_DIR=$topt/lib/cc.4.1.0_libc2.4_kernel2.6.16.21
    make
    make install

2012/11/21

Create self signed certificate


openssl req -new -x509 -key server.key -out server.cert -newkey rsa:1024

-req: request
-x509: self-signed

2012/11/20

Install python module


python setup.py install --home=$topt

installs the module to $topt/lib/python

or

python setup.py install --prefix=$topt

will install the module to $topt/lib/pythonX.Y/site-packages