Skip to content

Commit

Permalink
Feature/newversion (#33)
Browse files Browse the repository at this point in the history
* Update readme

* Update description

* Fix localpinning parameter check

* Bump version
  • Loading branch information
Svetomir Smiljkovic authored Jul 30, 2020
1 parent 46505bd commit 10863c8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 4 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ Available subcommands:
|subcommand|description|
|----------|-----------|
| fileretrieval | Checks file retrieval ability of the cluster |
| fileretrievaldynamic | Checks file retrieval ability of the dynamic cluster |
| fullconnectivity | Checks full connectivity in the cluster |
| kademlia | Checks Kademlia topology in the cluster |
| localpinning | Checks local pinning ability of the cluster |
| peercount | Count peers for all nodes in the cluster |
| pingpong | Executes ping from all nodes to all other nodes in the cluster |
| pullsync | Checks pullsync ability of the cluster |
| pushsync | Checks pushsync ability of the cluster |
| retrieval | Checks retrieval ability of the cluster |

Expand All @@ -50,6 +53,16 @@ Example:
beekeeper check fileretrieval --namespace bee --node-count 3 --upload-node-count 2 --files-per-node 4 --file-size 1048576
```

### fileretrievaldynamic

**fileretrievaldynamic** checks file retrieval ability of the dynamic cluster. It uploads file to a random node, than it downloads that file from given number of random nodes. Than it stops given number of other random nodes, and tries to download file again from other random nodes. It starts stopped nodes and downloads file from them.
It has an option to add new nodes to the cluster and repeat previous steps with the updated cluster.

Example:
```bash
beekeeper check fileretrievaldynamic --namespace bee --node-count 5 --new-node-count 3 --kubeconfig /Users/<user>/.kube/config
```

### fullconnectivity

**fullconnectivity** checks if every node has connectivity to all other nodes in the cluster.
Expand All @@ -68,6 +81,15 @@ Example:
beekeeper check kademlia --namespace bee --node-count 3
```

### localpinning

**localpinning** checks local pinning ability of the cluster.

Example:
```bash
beekeeper check localpinning --namespace bee --node-count 3
```

### peercount

**peercount** counts peers for all nodes in the cluster.
Expand All @@ -87,6 +109,15 @@ Example:
beekeeper check pingpong --namespace bee --node-count 3
```

### pullsync

**pullsync** checks pullsync ability of the cluster.

Example:
```bash
beekeeper check pullsync --namespace bee --node-count 3
```

### pushsync

**pushsync** checks pushsync ability of the cluster.
Expand Down
6 changes: 4 additions & 2 deletions cmd/beekeeper/cmd/check_fileretrievaldynamic.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ func (c *command) initCheckFileRetrievalDynamic() *cobra.Command {
Use: "fileretrievaldynamic",
Short: "Checks file retrieval ability of the dynamic cluster",
Long: `Checks file retrieval ability of the dynamic cluster.
It uploads given number of files to given number of nodes,
and attempts retrieval of those files from the last node in the cluster.`,
It uploads file to a random node, than it downloads that file from given number of random nodes.
Than it stops given number of other random nodes, and tries to download file again from other random nodes.
Than it starts stopped nodes and downloads file from them.
It has an option to add new nodes to the cluster and repeat previous steps with the updated cluster.`,
RunE: func(cmd *cobra.Command, args []string) (err error) {
if len(c.config.GetString(optionNameKubeConfig)) == 0 {
return errors.New("bad parameters: full path to KubeConfig must be provided")
Expand Down
2 changes: 1 addition & 1 deletion cmd/beekeeper/cmd/check_localpinning.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If everything goes well with the reference file, it uploads new small file to an
It uploads large file to the same node, and tries downloading small file from other random node. This step can be repeated multiple times (large-file-count).
If everything goes well, it unpins the file.`,
RunE: func(cmd *cobra.Command, args []string) (err error) {
if c.config.GetInt(optionNameSmallFileDiskRatio) >= c.config.GetInt(optionNameLargeFileDiskRatio) || c.config.GetFloat64(optionNameSmallFileDiskRatio) >= 1 {
if c.config.GetFloat64(optionNameSmallFileDiskRatio) >= c.config.GetFloat64(optionNameLargeFileDiskRatio) || c.config.GetFloat64(optionNameSmallFileDiskRatio) >= 1 {
return errors.New("bad parameters: small-file-disk-ratio must be less than large-file-disk-ratio, and less than 1")
}
if c.config.GetInt64(optionNameDBCapacity) <= 0 || c.config.GetInt(optionNameLargeFileCount) <= 0 || c.config.GetFloat64(optionNameLargeFileDiskRatio) <= 0 || c.config.GetFloat64(optionNameSmallFileDiskRatio) <= 0 {
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package beekeeper

var (
version = "0.2.11" // manually set semantic version number
version = "0.2.12" // manually set semantic version number
commit string // automatically set git commit hash

// Version TODO
Expand Down

0 comments on commit 10863c8

Please sign in to comment.