Code Monkey home page Code Monkey logo

etcd-starter's Introduction

etcd-starter

etcd-starter is the starter code to faciliate etcd upgrade in CoreOS image. The main functionality is:

  1. do binary selection between etcd v0.4 and etcd v2.0 based on the layout of data directory and the content inside wal and snapshot
  2. modify flag for standby-mode v0.4 etcd, which helps it run on proxy mode

Installation

mkdir $GOPATH/src/github.com/coreos
cd $GOPATH/src/github.com/coreos
git clone [email protected]:coreos/etcd-starter.git
cd etcd-starter
go build .

Usage

Set ETCD_INTERNAL_BINARY_DIR to the internal binary directory, which should be organized in this way:

ETCD_INTERNAL_BINARY_DIR
├── 1
    ├── etcd (points to v0.4 etcd binary)
├── 2
    ├── etcd (points to v2.0 etcd binary)

The default value for ETCD_INTERNAL_BINARY_DIR is "/usr/libexec/etcd/internal_versions/".

Start etcd-starter just like etcd. Here is an example:

$ etcd-starter --name default --data-dir default.etcd

Upgrade Example

Assume that you have a data directory default.etcd which is used by v0.4 etcd.

You can start it using v0.4 etcd as before:

$ etcd-starter --name default --data-dir default.etcd

When you want to upgrade it to v2.0, trigger it:

$ etcdctl upgrade --peer-urls http://127.0.0.1:7001

etcd will exit after 10 seconds if everything goes well. Restart it using the same command line:

$ etcd-starter --name default --data-dir default.etcd

It will run using v2.0 etcd now.

etcd-starter's People

Contributors

yichengq avatar kelseyhightower avatar xiang90 avatar crawford avatar

Watchers

Antony Ingram 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.