Commit Graph

61 Commits

Author SHA1 Message Date
Wyatt Daviau
9521885b63 ipfs-cluster-ctl add
parse file path arguments to cmdkit.File objects
no support for directories, symlinks or recursive add

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-08-07 20:11:13 +02:00
Hector Sanjuan
df5544952a Update the libp2p dependency to version 6.0.5
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-06-28 13:27:02 +02:00
Hector Sanjuan
a0b0b56529 gx: update go-libp2p
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-06-01 17:47:53 +02:00
Hector Sanjuan
510ed23686
gx publish 0.4.0
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-30 13:26:31 +02:00
Hector Sanjuan
5a7c31a7a1 Fix #433: Use new floodsub version
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-29 20:53:45 +02:00
Hector Sanjuan
c10494f522
gx publish 0.4.0-rc2
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-28 12:46:04 +02:00
Hector Sanjuan
059fcdaa42 Go-libp2p: update to 5.0.17
Among other things, this fixes race condition test failures in libp2p and
random panics in go-log.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-27 17:30:47 +02:00
Hector Sanjuan
884f9d199a
gx publish 0.4.0-rc1
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-14 11:57:55 +02:00
Hector Sanjuan
73b962f799 Basic Monitor: test Publish()
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-07 14:26:06 +02:00
Hector Sanjuan
3c3341e491 Monitor: add PublishMetric() to component interface
The monitor component should be in charge of deciding how it is
best to send metrics to other peers and what that means.

This adds the PublishMetric() method to the component interface
and moves that functionality from Cluster main component to the
basic monitor.

There is a behaviour change. Before, the metrics where sent only to
the leader, while the leader was the only peer to broadcast them everywhere.
Now, all peers broadcast all metrics everywhere. This is mostly
because we should not rely on the consensus layer providing a Leader(), so
we are taking the chance to remove this dependency.

Note that in any-case, pubsub monitoring should replace the
existing basic monitor. This is just paving the ground.

Additionally, in order to not duplicate the multiRPC code
in the monitor, I have moved that functionality to go-libp2p-gorpc
and added an rpcutil library to cluster which includes useful
methods to perform multiRPC requests (some of them existed in
util.go, others are new and help handling multiple contexts etc).

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-07 14:26:06 +02:00
Hector Sanjuan
f9c1c44dbb
gx publish 0.3.5
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-03-29 13:44:25 +02:00
Hector Sanjuan
da1ef2a7d1 gx publish 0.3.5-rc1
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-03-26 21:57:39 +02:00
Hector Sanjuan
a888e1dfb3
Merge pull request #356 from ipfs/feat/269-shell-client
Fix #269: Add IPFS() method to api/rest/client
2018-03-26 19:48:23 +02:00
Hector Sanjuan
8d3937a637
Merge branch 'master' into feat/fs-lock 2018-03-26 15:40:10 +02:00
Hector Sanjuan
7ca3dc292a Fix #269: Add IPFS() method to api/rest/client
The IPFS() methods returns an ipfs Shell pointing to the ipfs-cluster
proxy endpoint. The location can be customized (via ProxyAddr configuration
option) or it is assumed to be the same as the PeerAddr/APIAddr, with
a different port (the default).

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-03-26 15:23:14 +02:00
Adrian Lanzafame
364a134eb5 Use go-fs-lock pkg
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2018-03-26 19:28:47 +10:00
Hector Sanjuan
fb4bda8880 restapi: Expose the http endpoints on libp2p
This commits allows restapi to serve/tunnel http on a libp2p stream.

NewWitHost(...) allows to provide a libp2p host during initialization
which is then used to obtain a listener with go-libp2p-gostream.

Alternatively, if the configuration provides an ID, PrivateKey and Libp2pListenAddr,
a host is created directly by us and used to get the listener.

The protocol tag used is provided by the p2phttp library which will
be used by the client.

All tests now run against the libp2p node too.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-03-15 17:14:22 +01:00
Hector Sanjuan
836d552fbb Fix go4-lock name in package.json
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-03-13 23:52:45 +01:00
Hector Sanjuan
c231fe8060 Update libp2p and deps to correct versions
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-03-13 15:32:56 +01:00
Hector Sanjuan
36e7ea6496
gx publish 0.3.4
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-02-20 20:26:17 +01:00
Hector Sanjuan
33b2496438
gx publish 0.3.3
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-02-12 21:13:57 +01:00
Hector Sanjuan
a180f1a5c5
Merge pull request #291 from ipfs/feat/connectivity-graph
Feat/connectivity graph
2018-01-26 12:42:18 +01:00
Hector Sanjuan
27679926e8
gx publish 0.3.2
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-26 10:39:41 +01:00
Wyatt Daviau
d2ef32f48f Testing and polishing connection graph
Added go tests
Refactored cluster connect graph to new file
Refactored dot file printing to new repo
Fixed code climate issues
Added sharness test

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-22 10:03:37 -05:00
Hector Sanjuan
10331e2678
gx publish 0.3.1
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2017-12-11 14:11:28 +01:00
Wyatt
ad492d20ae fix #254, execution locking:
ipfs-cluster-service now locks before running the daemon and state
upgrade commands.  Locking mechanism heavily inspired by ipfs, see
go-ipfs fsrepo.  Unlock called on exit to free up repo.  one lockfile
per repo. A very simple sharness test checks that two service
invocations cannot occur.

A longstanding sharness/ci logging issue is addressed by exporting
verbose=t into the travis environment.  Now output of commands from
within sharness test strings are displayed during travis runs.

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2017-12-06 11:14:53 -05:00
Wyatt
47b744f1c0 ipfs-cluster-service state upgrade cli command
ipfs-cluster-service now has a migration subcommand that upgrades
    persistant state snapshots with an out-of-date format version to the
    newest version of raft state. If all cluster members shutdown with
    consistent state, upgrade ipfs-cluster, and run the state upgrade command,
    the new version of cluster will be compatible with persistent storage.
    ipfs-cluster now validates its persistent state upon loading it and exits
    with a clear error in the case the state format version is not up to date.

    Raft snapshotting is enforced on all shutdowns and the json backup is no
    longer run.  This commit makes use of recent changes to libp2p-raft
    allowing raft states to implement their own marshaling strategies. Now
    mapstate handles the logic for its (de)serialization.  In the interest of
    supporting various potential upgrade formats the state serialization
    begins with a varint (right now one byte) describing the version.

    Some go tests are modified and a go test is added to cover new ipfs-cluster
    raft snapshot reading functions.  Sharness tests are added to cover the
    state upgrade command.
2017-11-28 22:35:48 -05:00
Hector Sanjuan
ff698141f2
sign release commits too
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2017-11-15 23:54:31 +01:00
Hector Sanjuan
0c40d50497 gx publish 0.3.0
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2017-11-15 23:40:03 +01:00
Hector Sanjuan
848023e381 Fix #139: Update cluster to Raft 1.0.0
The main differences is that the new version of Raft is more strict
about starting raft peers which already contain configurations.

For a start, cluster will fail to start if the configured cluster
peers are different from the Raft peers. The user will have to
manually cleanup Raft (TODO: an ipfs-cluster-service command for it).

Additionally, this commit adds extra options to the consensus/raft
configuration section, adds tests and improves existing ones and
improves certain code sections.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-11-01 12:17:33 +01:00
Hector Sanjuan
073848257a gx publish 0.2.1
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-26 17:01:22 +02:00
Hector Sanjuan
934714b0ba gx publish 0.2.0
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-23 19:40:45 +02:00
Hector Sanjuan
7a908282db gx publish 0.1.0
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-07-29 14:21:19 +02:00
Hector Sanjuan
54db5f2bef Update go-libp2p-raft
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-07-27 16:57:04 +02:00
Hector Sanjuan
d94aa5ba4f Fix #138: Update raft/raft-boltdb/boltdb
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-07-27 16:28:56 +02:00
dgrisham
7bcf64f6b5 build succeeds, PNETs seem to work -- still need tests
License: MIT
Signed-off-by: David Grisham <dgrisham@mines.edu>
2017-06-27 10:30:15 -06:00
Hector Sanjuan
63e77d3a6f gx publish 0.0.12
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-30 14:03:15 +02:00
Hector Sanjuan
648e25c2bc gx publish 0.0.11
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-28 11:57:41 +02:00
Hector Sanjuan
ee4102e3e9 gx publish 0.0.10
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-09 15:04:48 +01:00
Hector Sanjuan
988afe9766 gx publish 0.0.9
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-09 13:15:23 +01:00
Hector Sanjuan
09ac792c15 gx publish 0.0.8
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-09 13:15:14 +01:00
Hector Sanjuan
25fe269322 gx publish 0.0.7
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-09 12:41:58 +01:00
Hector Sanjuan
3dd0c47724 gx publish 0.0.6
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-09 12:24:50 +01:00
Hector Sanjuan
9d6121c426 gx publish 0.0.5
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-07 17:39:00 +01:00
Hector Sanjuan
101720bd91 gx publish 0.0.4
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-03 18:49:52 +01:00
Hector Sanjuan
1c16b653a7 gx publish 0.0.3
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-03 15:08:51 +01:00
Hector Sanjuan
d0e2eaf12f Update libp2p and deps
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-02 17:05:21 +01:00
Hector Sanjuan
f7bf26237b Update deps to latest raft and gorpc
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-26 13:01:35 +01:00
Hector Sanjuan
d8d4a0094a Import latest go-libp2p-gorpc
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-25 13:16:40 +01:00
Hector Sanjuan
3b8d643f86 gx publish 0.0.2
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-25 13:10:53 +01:00