Giter Club home page Giter Club logo

extended_drbd's Introduction

Description:

This cookbook is designed to setup and configure a pair of server with drbd. Please Note: this cookbook does not mount the drbd drive.

This cookbook can be used in the following situations:

1) Fresh server pair installation (please see below for how to use).

2) Adding a server to another server running drbd.

3) Change drbd.conf file and have drbd update with out restarting.

How to use when creating a fresh server pair:

Prerequisites:

  • Chef client must be installed on both servers.

  • The disk location (node[:disk]) must exist.

  • The servers MUST be able to ssh to the other server.

Note: In order for this work properly both servers need to be running chef at the same time,

You will need to have the following attribute values specified:

node[:primary] and node[:remote_host]

Once one server has been specified as drbd master you can add the recipe “drbd::drbd_fresh_install” to the run_list of both servers.

How to use when adding a new server to another server running drbd:

This is the same as above except the new server is not specified as the drbd master, and you dont have to be running chef-client on the other server.

How to use when changing the drbd.conf file:

On which ever server you are updated (or both) add the recipe “drbd::drbd_inplace_upgrade” to the server’s run_list. And the next time Chef-client runs it will preform the changes in a safe way.

The ways I have used this have been to call this drbd cookbook from within another cookbook, and have the second cookbook do the logic of decided whether or not this is a fresh install or inplace upgrade.

Here is how I use it:

if system(" [ -f /etc/drbd.conf ] ")
   include_recipe "extended_drbd::drbd_inplace_upgrade"
else
   include_recipe "extended_drbd::drbd_fresh_install"
end

ATTRIBUTES:

default[:packages] = [“kmod-drbd83”, “drbd83”]

default[:disk] = “/dev/local/data”

default[:mount] = “/data”

default[:fs_type] = “ext3”

default[:fs_parameters] = nil

default[:dev] = “/dev/drbd0”

default[:master] = false

default[:two_masters] = false

default[:port] = 7789

default[:configured] = false

default[:syncrate] = “36M”

default[:resource] = “data”

default[:stop_file] = “/etc/drbd_stop_file”

default[:synced] = “/etc/drbd_synced_stop_file”

default[:initialized] = “/etc/drbd_initialized_stop_file”

default[:primary] = nil

default[:remote_host] = nil

default[:splitbrain] = “discard-zero-changes”

default[:splitbrain] = “discard-secondary”

default[:splitbrain] = “disconnect”

License

DRBD Chef Recipe Copyright © 2012 Justin Witrick

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

extended_drbd's People

Contributors

elrido avatar simonrupf avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.