Skip to content

Commit

Permalink
Merge pull request #15 from j-griffith/overhaul
Browse files Browse the repository at this point in the history
Overhaul
  • Loading branch information
j-griffith authored Mar 6, 2018
2 parents 9b39fc8 + 0a72031 commit f6fbce2
Show file tree
Hide file tree
Showing 246 changed files with 41,140 additions and 28,985 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor/
_bin/
124 changes: 0 additions & 124 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

69 changes: 69 additions & 0 deletions Gopkg.lock

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

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

# 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]]
name = "github.com/Sirupsen/logrus"
version = "1.0.4"

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

[[constraint]]
branch = "master"
name = "github.com/mitchellh/mapstructure"

[[constraint]]
branch = "master"
name = "github.com/rackspace/gophercloud"
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.PHONY: all clean

all: cinder

cinder:
if [ ! -d ./vendor ]; then dep ensure; fi
go build -i -o _bin/cdd

clean:
go clean -r -x
-rm -rf _bin/*
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,32 @@ with containers.
## Install

### Build From Source
Obviously you'll need to have a golang dev environment setup, one piece of that
includes the golang dep tool. You can find install instructions and usage info
here: https://github.com/golang/dep

For the most part just installing the tool is good enough, the Makefile will
take care of it's usage for you.

```shell
git clone https://github.com/j-griffith/cinder-docker-driver
cd cinder-docker-driver
go build
make clean; make
sudo ./install.sh
```

NOTE the specification of the `source` argument to the install script, this
will result in the install script copying your locally built binary
(```./_bin/cdd```) into the install directory and creating the systemd file.

Omitting the `source` arg (or providing any other argument) will instruct the
installer to pull the latest release from github and installing it instead.

### Just the bits
Use curl to download and run the install script in the package Github repo::

```shell
curl -sSl https://raw.githubusercontent.com/j-griffith/cinder-docker-driver/master/install.sh | sh
curl -sSl https://raw.githubusercontent.com/j-griffith/cinder-docker-driver/master/install.sh | sudo sh
```
## Configuration options
Example config.json file:
Expand All @@ -44,8 +58,8 @@ it in your config file. Here's an example of a V3 config:
"Username": "Fred",
"Password": "FredsPassWord",
"TenantID": "979ddb6183834b9993954ca6de518c5a",
"DomainName": "MyAuthDomain",
"Region": "RegionOne"
"DomainName": "MyAuthDomain",
}
```

Expand Down Expand Up @@ -85,14 +99,14 @@ Example config with additional options:
If you want to just launch the driver daemon as root (or sudo):

```shell
sudo cinder-docker-driver >> /var/log/cdd.out 2>&1 &'
sudo ./_bin/cdd >> /var/log/cdd.out 2>&1 &'
sudo service docker restart
```
## Using systemd
The install script includes creation of a systemd service file.
If you used the install script you can just add your config file
and use ```service cinder-docker-driver start```.
and use ```service cdd start```.
Otherwise, you can inspect the install.sh script and create/setup
your own systemd service file.
Expand Down
Binary file removed cinder-docker-driver
Binary file not shown.
6 changes: 3 additions & 3 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Endpoint": "http://172.16.140.245:5000/v2.0",
"Endpoint": "http://10.117.36.27/identity/v3",
"Username": "admin",
"Password": "solidfire",
"TenantID": "092eb256b5b9402abe57d59f58ae3dbc",
"Password": "nomoresecret",
"TenantID": "f90c6e1559594a198f2a8c9228002bcf",
"Region": "RegionOne"
}
Loading

0 comments on commit f6fbce2

Please sign in to comment.