Commit Graph

39 Commits

Author SHA1 Message Date
Tom O'Donnell (te0d)
7add1b3b52 Added Name Option to ipfs-cluster-ctl pin add
I added an option called --name or -n which specifies the name for
the added pin to be stored in consensus. Also added quotes around
name for allocations formatter.
2017-11-30 10:14:24 -05:00
Hector Sanjuan
16acaa67c0 Release 0.3.0
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2017-11-15 23:39:50 +01:00
Hector Sanjuan
f5e5ed1e6e Release 0.2.1
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-26 17:01:04 +02:00
Hector Sanjuan
7c5f40babf Release 0.2.0
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-23 19:39:37 +02:00
Hector Sanjuan
26e126d7f4 Check request error in cluster-ctl
An error check is missing and this triggers panics when a response is nil
2017-10-18 19:04:29 +02:00
dgrisham
25a910faad BasicAuth implementation -- CLI, server, and tests. 2017-10-14 15:55:21 -06:00
Hector Sanjuan
81518e0d68 Release 0.1.0
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-07-29 14:21:06 +02:00
dgrisham
31cee53a55 Added --no-check-certificate flag for TLS API client 2017-07-23 10:11:10 -06:00
Hector Sanjuan
dcf9502d07 Address feedback in review
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-07-14 21:22:52 +02:00
Hector Sanjuan
235a9fc069 improve ipfs-cluster-ctl command help.
It seems that urfave/cli acts differently handling Description and Usage
depending on whether it is dealing with a command or a subcommand.

This fixes most of these issues, as well as the commands output which was
printing some blank lines.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-07-03 18:36:00 +02:00
Hector Sanjuan
bb82c27b25 Fix #87: Implement ipfs-cluster-ctl pin ls <cid>
I have updated API endpoints to be /allocations rather than /pinlinst

It's more self-explanatory.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-04-06 21:12:16 +02:00
Hector Sanjuan
257077c5b2 Release 0.0.12
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-30 14:03:04 +02:00
Hector Sanjuan
db6956b737 Fix #77: ipfs-cluster-ctl output tweaks.
Be more consistent when printing errors (i.e. if json encoding
is requested then it should be used for errors too). Do not
print "Request accepted".

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-28 19:10:50 +02:00
Hector Sanjuan
39683460c6 Release 0.0.11
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-28 11:57:11 +02:00
Hector Sanjuan
20b0a3382e ctl: fix some outputs
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-13 11:10:53 +01:00
Hector Sanjuan
7ce5961aba Release 0.0.10
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-09 15:04:42 +01:00
Hector Sanjuan
f93538aed1 Release 0.0.9
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-09 13:15:18 +01:00
Hector Sanjuan
6a4863e623 Release 0.0.8
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-09 13:15:08 +01:00
Hector Sanjuan
b19b3c6882 Release 0.0.7
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-09 12:41:52 +01:00
Hector Sanjuan
76707d4b9b Release 0.0.6
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-09 12:24:27 +01:00
Hector Sanjuan
e5c5909e42 Support a replication factor flag in "ipfs-cluster-ctl pin add".
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-08 18:51:03 +01:00
Hector Sanjuan
9b652bcfb3 Rename CidArg to Pin.
CidArg used to be an internal name for an argument that carried a Cid.
Now it has surfaced to API level and makes no sense. It is a Pin. It
represents a Pin (Cid, Allocations, Replication Factor)

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-08 16:57:27 +01:00
Hector Sanjuan
7be6399433 Release 0.0.5
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-07 17:38:53 +01:00
Hector Sanjuan
135a222301 Release 0.0.4
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-03 18:49:45 +01:00
Hector Sanjuan
df3c190fc8 Release 0.0.3
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-03 15:08:31 +01:00
Hector Sanjuan
2512ecb701 Issue #41: Add Replication factor
New PeerManager, Allocator, Informer components have been added along
with a new "replication_factor" configuration option.

First, cluster peers collect and push metrics (Informer) to the Cluster
leader regularly. The Informer is an interface that can be implemented
in custom wayts to support custom metrics.

Second, on a pin operation, using the information from the collected metrics,
an Allocator can provide a list of preferences as to where the new pin
should be assigned. The Allocator is an interface allowing to provide
different allocation strategies.

Both Allocator and Informer are Cluster Componenets, and have access
to the RPC API.

The allocations are kept in the shared state. Cluster peer failure
detection is still missing and re-allocation is still missing, although
re-pinning something when a node is down/metrics missing does re-allocate
the pin somewhere else.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-02-14 19:13:08 +01:00
Hector Sanjuan
c0697599ac Add nice text formatters to the ipfs-cluster-ctl app
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-02-09 16:30:53 +01:00
Hector Sanjuan
6c18c02106 Issue #10: peers/add and peers/rm feature + tests
This commit adds PeerAdd() and PeerRemove() endpoints, CLI support,
tests. Peer management is a delicate issue because of how the consensus
works underneath and the places that need to track such peers.

When adding a peer the procedure is as follows:

* Try to open a connection to the new peer and abort if not reachable
* Broadcast a PeerManagerAddPeer operation which tells all cluster members
to add the new Peer. The Raft leader will add it to Raft's peerset and
the multiaddress will be saved in the ClusterPeers configuration key.
* If the above fails because some cluster node is not responding,
broadcast a PeerRemove() and try to undo any damage.
* If the broadcast succeeds, send our ClusterPeers to the new Peer along with
the local multiaddress we are using in the connection opened in the
first step (that is the multiaddress through which the other peer can reach us)
* The new peer updates its configuration with the new list and joins
the consensus

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-02-02 13:51:49 +01:00
Hector Sanjuan
4c1e0068f5 Fix #15: Peers() provides lots of information now
I have renamed "members" to "peers".

Added IPFS daemon ID and addresses to the ID object and
have Peers() return the collection of ID() objects from the cluster.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-26 20:24:00 +01:00
Hector Sanjuan
7f9cb0b269 Separate recover() from sync()
This includes adding a new API endpoint, CLI command.

I have also changed some api endpoints. I find:

POST /pins/<cid>/sync
POST /pins/<cid>/recover
GET  /pins/<cid>
GET  /pins

better. The problem is makes the pin list /pinlist but it general
its more consistent.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-25 20:17:19 +01:00
Hector Sanjuan
2566a0cca5 golint and misspellings
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-25 18:10:18 +01:00
Hector Sanjuan
cba87c28a2 Release 0.0.2
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-25 13:10:49 +01:00
Hector Sanjuan
3f833a8c17 Use urfave/cli for ipfs-cluster-service too.
Added consistency to tools, plus it's worth the effot at this point.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-24 19:55:06 +01:00
Hector Sanjuan
81db084249 Make sure the commit string gets set. Fix PublicKey. Output JSON in cluster-ctl
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-24 16:56:14 +01:00
Hector Sanjuan
d5fc795ee5 Re-add version method to cluster-ctl
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-24 16:26:42 +01:00
Hector Sanjuan
9111c6282c Issue-21: Add cluster ID() method
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-24 16:26:42 +01:00
Hector Sanjuan
50de95d464 Issue-21: Use https://github.com/urfave/cli for cluster-ctl
Rewrote the app with better command and help support.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-24 16:25:53 +01:00
mateon1
51f87407c6 Fix typo and remove trailing whitespace.
License: MIT
Signed-off-by: Mateusz Naściszewski <matin1111@wp.pl>
2017-01-23 14:21:26 +01:00
Hector Sanjuan
365c549d7c Fix #5: Rename apps to ipfs-cluster-service and ipfs-cluster-ctl
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-23 13:34:22 +01:00