Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/v2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
porcupie committed Aug 28, 2017
2 parents d277f14 + 1b41d0b commit fd76a2e
Show file tree
Hide file tree
Showing 12 changed files with 376 additions and 651 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
rbd-docker-plugin
*.tpkg
vendor
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ We attempt to adhere to [Semantic Versioning](http://semver.org/).
### Removed
### Changed

## [2.0.0] - 2017-08-25
### Added
- add golang/dep support for a repeatable build

### Removed
- Removed all usage of go-ceph library. Simplifies the code and now only
shelling out to 'rbd' executable

### Changed
- Updated docker/go-plugin-helpers and latest sdk api
- Fixed List() to call out to 'rbd ls' instead of relying on in memory per-host list

## [1.5.2] - 2017-08
### Changed
- Remove cron script installation from tpkg

## [1.5.1] - 2016-09-20
### Changed
- Update XFS checks to mount/unmount to clear any disk logs
Expand Down
62 changes: 62 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"


[[constraint]]
branch = "master"
name = "github.com/docker/go-plugins-helpers"

[[constraint]]
name = "github.com/stretchr/testify"
version = "1.1.4"

[[constraint]]
name = "github.com/docker/go-connections"
# NOTE: these are broken but requested by another dep:
#revision = "990a1a1a70b0da4c4cb70e117971a4f0babfbf1a"
#version = "v0.2.1"
# NOTE: This rev of master works:
##revision = "3ede32e2033de7505e6500d6c868c2b9ed9f169d"
revision = "3ede32e2033de7505e6500d6c868c2b9ed9f169d"
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# building the rbd docker plugin golang binary with version
# makefile mostly used for packing a tpkg

.PHONY: all build install clean test version setup systemd
.PHONY: all build install clean test version setup systemd dep-tool

IMAGE_PATH=ypengineering/rbd-docker-plugin
TAG?=latest
Expand All @@ -11,8 +11,8 @@ SUDO?=

TMPDIR?=/tmp
INSTALL?=install
TPKG_VERSION=$(VERSION)-2

#TPKG_VERSION=$(VERSION)-2
TPKG_VERSION=$(VERSION)

BINARY=rbd-docker-plugin
PKG_SRC=main.go driver.go version.go
Expand All @@ -37,13 +37,19 @@ BIN_FILES=dist/$(BINARY) check-ceph-rbd-docker-plugin.sh
# in the container.
all: build

dep-tool:
go get -u github.com/golang/dep/cmd/dep

vendor: dep-tool
dep ensure

# set VERSION from version.go, eval into Makefile for inclusion into tpkg.yml
version: version.go
$(eval VERSION := $(shell grep "VERSION" version.go | cut -f2 -d'"'))

build: dist/$(BINARY)

dist/$(BINARY): $(PKG_SRC)
dist/$(BINARY): $(PKG_SRC) vendor
go build -v -x -o dist/$(BINARY) .

install: build test
Expand All @@ -52,12 +58,13 @@ install: build test
clean:
go clean
rm -f dist/$(BINARY)
rm -fr vendor/

uninstall:
@$(RM) -iv `which $(BINARY)`

# FIXME: TODO: this micro-osd script leaves ceph-mds laying around -- fix it up
test:
test: vendor
TMP_DIR=$$(mktemp -d) && \
./micro-osd.sh $$TMP_DIR && \
export CEPH_CONF=$${TMP_DIR}/ceph.conf && \
Expand All @@ -68,7 +75,7 @@ test:

# use existing ceph installation instead of micro-osd.sh - expecting CEPH_CONF to be set ...
CEPH_CONF ?= /etc/ceph/ceph.conf
local_test:
local_test: vendor
@echo "Using CEPH_CONF=$(CEPH_CONF)"
test -n "${CEPH_CONF}" && \
$(SUDO) rbd ls && \
Expand Down
Loading

0 comments on commit fd76a2e

Please sign in to comment.