mirror of https://github.com/minio/minio.git
A full restructure
This commit is contained in:
parent
bdc4c3ebe7
commit
6b36b5c551
17
CONTRIB.md
17
CONTRIB.md
|
@ -1,17 +0,0 @@
|
|||
### Contribution Guidelines
|
||||
We welcome your contributions. To make the process as seamless as possible, we ask for the following:
|
||||
* Go ahead and fork the project and make your changes. We encourage pull requests to discuss code changes.
|
||||
- Fork it
|
||||
- Create your feature branch (git checkout -b my-new-feature)
|
||||
- Commit your changes (git commit -am 'Add some feature')
|
||||
- Push to the branch (git push origin my-new-feature)
|
||||
- Create new Pull Request
|
||||
* If you have additional dependencies for ``minio``, ``minio`` manages its depedencies using [godep](https://github.com/tools/godep)
|
||||
- Run `go get foo/bar`
|
||||
- Edit your code to import foo/bar
|
||||
- Run `make save` from top-level directory (or `godep restore && godep save ./...`).
|
||||
* When you're ready to create a pull request, be sure to:
|
||||
- Have test cases for the new code. If you have questions about how to do it, please ask in your pull request.
|
||||
- Run go fmt
|
||||
- Squash your commits into a single commit. git rebase -i. It's okay to force update your pull request.
|
||||
- Make sure go test -race ./... passes, and go build completes.
|
|
@ -0,0 +1,40 @@
|
|||
### Setup your Minio Github Repository
|
||||
Fork [Minio upstream](https://github.com/Minio-io/minio/fork) source repository to your own personal repository. Copy the URL and pass it to ``go get`` command. Go uses git to clone a copy into your project workspace folder.
|
||||
```sh
|
||||
$ git clone https://github.com/$USER_ID/minio
|
||||
$ cd minio
|
||||
$ mkdir -p ${GOPATH}/src/github.com/minio-io
|
||||
$ ln -s ${PWD} $GOPATH/src/github.com/minio-io/
|
||||
```
|
||||
|
||||
### Compiling Minio from source
|
||||
Minio uses ``Makefile`` to wrap around some of the limitations of ``go build``. To compile Minio source, simply change to your workspace folder and type ``make``.
|
||||
```sh
|
||||
$ cd $GOPATH/src/github.com/$USER_ID/minio/
|
||||
$ make
|
||||
Checking if proper environment variables are set.. Done
|
||||
...
|
||||
Checking dependencies for Minio.. Done
|
||||
...
|
||||
...
|
||||
Installed minio into /home/userid/work/minio/gopath/bin
|
||||
Installed new-cmd into /home/userid/work/minio/gopath/bin
|
||||
```
|
||||
### Developer Guidelines
|
||||
|
||||
``minio`` community welcomes your contribution. To make the process as seamless as possible, we ask for the following:
|
||||
* Go ahead and fork the project and make your changes. We encourage pull requests to discuss code changes.
|
||||
- Fork it
|
||||
- Create your feature branch (git checkout -b my-new-feature)
|
||||
- Commit your changes (git commit -am 'Add some feature')
|
||||
- Push to the branch (git push origin my-new-feature)
|
||||
- Create new Pull Request
|
||||
* If you have additional dependencies for ``minio``, ``minio`` manages its depedencies using [godep](https://github.com/tools/godep)
|
||||
- Run `go get foo/bar`
|
||||
- Edit your code to import foo/bar
|
||||
- Run `make save` from top-level directory (or `godep restore && godep save ./...`).
|
||||
* When you're ready to create a pull request, be sure to:
|
||||
- Have test cases for the new code. If you have questions about how to do it, please ask in your pull request.
|
||||
- Run go fmt
|
||||
- Squash your commits into a single commit. git rebase -i. It's okay to force update your pull request.
|
||||
- Make sure go test -race ./... passes, and go build completes.
|
34
Makefile
34
Makefile
|
@ -11,54 +11,54 @@ getdeps: checkdeps
|
|||
@go get golang.org/x/tools/cmd/cover && echo "Installed cover"
|
||||
|
||||
build-erasure:
|
||||
@$(MAKE) $(MAKE_OPTIONS) -C pkgs/erasure/isal lib
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/erasure
|
||||
@$(MAKE) $(MAKE_OPTIONS) -C pkg/erasure/isal lib
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/erasure
|
||||
|
||||
build-signify:
|
||||
@$(MAKE) $(MAKE_OPTIONS) -C pkgs/signify
|
||||
@$(MAKE) $(MAKE_OPTIONS) -C pkg/signify
|
||||
|
||||
build-cpu:
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/cpu
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/cpu
|
||||
|
||||
build-md5:
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/crypto/md5/
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/crypto/md5c/
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/crypto/md5/
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/crypto/md5c/
|
||||
|
||||
build-sha1:
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/crypto/sha1/
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/crypto/sha1/
|
||||
|
||||
build-sha256:
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/crypto/sha256/
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/crypto/sha256/
|
||||
|
||||
build-sha512:
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/crypto/sha512/
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/crypto/sha512/
|
||||
|
||||
build-crc32c:
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/checksum/crc32c
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/checksum/crc32c
|
||||
|
||||
build-scsi:
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/scsi
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/scsi
|
||||
|
||||
build-split: build-strbyteconv
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/split
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/split
|
||||
|
||||
build-strbyteconv:
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/strbyteconv
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/strbyteconv
|
||||
|
||||
build-storage: build-storage-append build-storage-encoded
|
||||
|
||||
build-storage-append:
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/storage/appendstorage
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/storage/appendstorage
|
||||
|
||||
build-storage-encoded:
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/storage/encodedstorage
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/storage/encodedstorage
|
||||
|
||||
cover: build-erasure build-signify build-split build-crc32c build-cpu build-scsi build-storage build-md5 build-sha1 build-sha256 build-sha512
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/gateway
|
||||
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/gateway
|
||||
|
||||
install: build-erasure
|
||||
@godep go install github.com/minio-io/minio/cmd/minio && echo "Installed minio into ${GOPATH}/bin"
|
||||
@godep go install github.com/minio-io/minio/cmd/minio-cli && echo "Installed minio-cli into ${GOPATH}/bin"
|
||||
@godep go install github.com/minio-io/minio/cmd/new-cmd && echo "Installed new-cmd into ${GOPATH}/bin"
|
||||
@godep go install github.com/minio-io/minio/cmd/crypto && echo "Installed crypto into ${GOPATH}/bin"
|
||||
|
||||
save: restore
|
||||
|
|
35
README.md
35
README.md
|
@ -1,38 +1,21 @@
|
|||
## Introduction
|
||||
|
||||
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Minio-io/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
Minio is an open source object storage released under [Apache license v2](./LICENSE) . It uses ``Rubberband Erasure`` coding to dynamically protect the data.
|
||||
Minio's design is inspired by Amazon's S3 for its API and Facebook's Haystack for its immutable data structure.
|
||||
|
||||
### Install BUILD dependencies
|
||||
### Download
|
||||
|
||||
[Build Dependencies](./DEVELOPERS.md)
|
||||
|
||||
### Setup your Minio Github Repository
|
||||
Fork [Minio upstream](https://github.com/Minio-io/minio/fork) source repository to your own personal repository. Copy the URL and pass it to ``go get`` command. Go uses git to clone a copy into your project workspace folder.
|
||||
```sh
|
||||
$ go get -u github.com/$USER_ID/minio
|
||||
$ cd $GOPATH/src/github.com/$USER_ID/minio/
|
||||
$ git remote add upstream https://github.com/Minio-io/minio.git
|
||||
```
|
||||
|
||||
### Compiling Minio from source
|
||||
Minio uses ``Makefile`` to wrap around some of the limitations of ``go build``. To compile Minio source, simply change to your workspace folder and type ``make``.
|
||||
```sh
|
||||
$ cd $GOPATH/src/github.com/$USER_ID/minio/
|
||||
$ make
|
||||
Checking dependencies for Minio.. SUCCESS
|
||||
...
|
||||
...
|
||||
Installed minio into /home/harsha/.gvm/pkgsets/go1.4/global/bin
|
||||
Installed minio-cli into /home/harsha/.gvm/pkgsets/go1.4/global/bin
|
||||
```
|
||||
-- No releases have been made yet --
|
||||
|
||||
### Join Community
|
||||
|
||||
* [Howto Contribute](./CONTRIB.md)
|
||||
* [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Minio-io/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
* IRC join channel #minio @ irc.freenode.net
|
||||
* Google Groups - minio-dev@googlegroups.com
|
||||
|
||||
### Developers
|
||||
|
||||
* [Get Source](./DEVELOPER.md)
|
||||
* [Build Dependencies](./BUILDDEPS.md)
|
||||
* [Development Workflow](./DEVELOPER.md#developer-guidelines)
|
||||
|
||||
[![Analytics](https://ga-beacon.appspot.com/UA-56860620-3/minio/readme)](https://github.com/igrigorik/ga-beacon)
|
||||
|
|
23
checkdeps.sh
23
checkdeps.sh
|
@ -1,5 +1,26 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo -n "Checking if proper environment variables are set.. "
|
||||
|
||||
echo ${GOROOT:?} 2>&1 >/dev/null
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "ERROR"
|
||||
echo "GOROOT environment variable missing, please refer to Go installation document"
|
||||
echo "https://github.com/Minio-io/minio/blob/master/BUILDDEPS.md#install-go-13"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ${GOPATH:?} 2>&1 >/dev/null
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "ERROR"
|
||||
echo "GOPATH environment variable missing, please refer to Go installation document"
|
||||
echo "https://github.com/Minio-io/minio/blob/master/BUILDDEPS.md#install-go-13"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Done"
|
||||
echo "Using GOPATH=${GOPATH} and GOROOT=${GOROOT}"
|
||||
|
||||
echo -n "Checking dependencies for Minio.. "
|
||||
|
||||
## Check all dependencies are present
|
||||
|
@ -28,4 +49,4 @@ if [ "x${MISSING}" != "x" ]; then
|
|||
echo
|
||||
exit 1
|
||||
fi
|
||||
echo "SUCCESS"
|
||||
echo "Done"
|
||||
|
|
|
@ -25,10 +25,10 @@ import (
|
|||
"os"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/minio-io/minio/pkgs/crypto/md5"
|
||||
"github.com/minio-io/minio/pkgs/crypto/sha1"
|
||||
"github.com/minio-io/minio/pkgs/crypto/sha256"
|
||||
"github.com/minio-io/minio/pkgs/crypto/sha512"
|
||||
"github.com/minio-io/minio/pkg/crypto/md5"
|
||||
"github.com/minio-io/minio/pkg/crypto/sha1"
|
||||
"github.com/minio-io/minio/pkg/crypto/sha256"
|
||||
"github.com/minio-io/minio/pkg/crypto/sha512"
|
||||
)
|
||||
|
||||
var Options = []cli.Command{
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/minio-io/minio/pkgs/strbyteconv"
|
||||
"github.com/minio-io/minio/pkg/strbyteconv"
|
||||
)
|
||||
|
||||
// config representing cli input
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/minio-io/minio/pkgs/storage"
|
||||
es "github.com/minio-io/minio/pkgs/storage/encodedstorage"
|
||||
"github.com/minio-io/minio/pkg/storage"
|
||||
es "github.com/minio-io/minio/pkg/storage/encodedstorage"
|
||||
)
|
||||
|
||||
func erasureGetList(config inputConfig, objectPath string) (io.Reader, error) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"text/template"
|
||||
"time"
|
||||
|
||||
"github.com/minio-io/minio/pkgs/utils"
|
||||
"github.com/minio-io/minio/pkg/utils"
|
||||
)
|
||||
|
||||
type source struct {
|
||||
|
@ -19,7 +19,7 @@ type source struct {
|
|||
|
||||
const (
|
||||
// Relative path from GOPATH default
|
||||
TEMPLATEREPO = "/src/github.com/minio-io/minio/templates/"
|
||||
TEMPLATEREPO = "/src/github.com/minio-io/minio/cmd/minio-cli/templates/"
|
||||
)
|
||||
|
||||
type option struct {
|
|
@ -28,7 +28,7 @@ import (
|
|||
"io"
|
||||
"unsafe"
|
||||
|
||||
"github.com/minio-io/minio/pkgs/cpu"
|
||||
"github.com/minio-io/minio/pkg/cpu"
|
||||
)
|
||||
|
||||
const (
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue