Commit Graph

1330 Commits

Author SHA1 Message Date
Hector Sanjuan
7496b19525 CAPTAIN.LOG.md update for v0.2.0
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-20 13:15:27 +02:00
Hector Sanjuan
10ffa5ced5 Add changelog for v0.2.0
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-20 13:12:25 +02:00
Hector Sanjuan
fb8fdb94c5 Issue #162: Improve Config.ToJSON() tests
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-20 10:42:41 +02:00
Hector Sanjuan
d62c573028 Issue #162: Add tests for raft.Config
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-19 21:22:08 +02:00
Hector Sanjuan
89364fd671 Issue #162: Add tests for informer Configs
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-19 21:09:03 +02:00
Hector Sanjuan
3cf4d90536 Issue #162: Add ipfshttp.Config tests
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-19 21:02:38 +02:00
Hector Sanjuan
67ecd6d171 Issue #162: Add tests for basic.Config
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-19 20:53:18 +02:00
Hector Sanjuan
35e5e69471 Issue #162: Add tests for rest.Config
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-19 20:49:18 +02:00
ZenGround0
e336e942f7 Merge pull request #183 from ipfs/fix/182-check-err
Fix #182: Check request error in cluster-ctl
2017-10-18 14:23:32 -04: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
Hector Sanjuan
8f06baa1bf Issue #162: Rework configuration format
The following commit reimplements ipfs-cluster configuration under
the following premises:

  * Each component is initialized with a configuration object
  defined by its module
  * Each component decides how the JSON representation of its
  configuration looks like
  * Each component parses and validates its own configuration
  * Each component exposes its own defaults
  * Component configurations are make the sections of a
  central JSON configuration file (which replaces the current
  JSON format)
  * Component configurations implement a common interface
  (config.ComponentConfig) with a set of common operations
  * The central configuration file is managed by a
  config.ConfigManager which:
    * Registers ComponentConfigs
    * Assigns the correspondent sections from the JSON file to each
    component and delegates the parsing
    * Delegates the JSON generation for each section
    * Can be notified when the configuration is updated and must be
    saved to disk

The new service.json would then look as follows:

```json
{
  "cluster": {
    "id": "QmTVW8NoRxC5wBhV7WtAYtRn7itipEESfozWN5KmXUQnk2",
    "private_key": "<...>",
    "secret": "00224102ae6aaf94f2606abf69a0e278251ecc1d64815b617ff19d6d2841f786",
    "peers": [],
    "bootstrap": [],
    "leave_on_shutdown": false,
    "listen_multiaddress": "/ip4/0.0.0.0/tcp/9096",
    "state_sync_interval": "1m0s",
    "ipfs_sync_interval": "2m10s",
    "replication_factor": -1,
    "monitor_ping_interval": "15s"
  },
  "consensus": {
    "raft": {
      "heartbeat_timeout": "1s",
      "election_timeout": "1s",
      "commit_timeout": "50ms",
      "max_append_entries": 64,
      "trailing_logs": 10240,
      "snapshot_interval": "2m0s",
      "snapshot_threshold": 8192,
      "leader_lease_timeout": "500ms"
    }
  },
  "api": {
    "restapi": {
      "listen_multiaddress": "/ip4/127.0.0.1/tcp/9094",
      "read_timeout": "30s",
      "read_header_timeout": "5s",
      "write_timeout": "1m0s",
      "idle_timeout": "2m0s"
    }
  },
  "ipfs_connector": {
    "ipfshttp": {
      "proxy_listen_multiaddress": "/ip4/127.0.0.1/tcp/9095",
      "node_multiaddress": "/ip4/127.0.0.1/tcp/5001",
      "connect_swarms_delay": "7s",
      "proxy_read_timeout": "10m0s",
      "proxy_read_header_timeout": "5s",
      "proxy_write_timeout": "10m0s",
      "proxy_idle_timeout": "1m0s"
    }
  },
  "monitor": {
    "monbasic": {
      "check_interval": "15s"
    }
  },
  "informer": {
    "disk": {
      "metric_ttl": "30s",
      "metric_type": "freespace"
    },
    "numpin": {
      "metric_ttl": "10s"
    }
  }
}
```

This new format aims to be easily extensible per component. As such,
it already surfaces quite a few new options which were hardcoded
before.

Additionally, since Go API have changed, some redundant methods have been
removed and small refactoring has happened to take advantage of the new
way.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-18 00:00:12 +02:00
Hector Sanjuan
9c059a8e51 Merge pull request #179 from ipfs/sharness/basic-auth
Sharness/basic auth
2017-10-17 11:18:18 +02:00
dgrisham
ce9fc18b19 Adding + fixing sharness tests for BasicAuth 2017-10-16 13:26:44 -06:00
Hector Sanjuan
6e406109ea Merge pull request #147 from ipfs/feat/api-basic-auth
Issue #121: BasicAuth REST API
2017-10-16 13:22:51 +02:00
dgrisham
25a910faad BasicAuth implementation -- CLI, server, and tests. 2017-10-14 15:55:21 -06:00
Hector Sanjuan
da0cb5ebfd Merge pull request #176 from ipfs/fix/ipfsconn-with-POST
Fix/ipfsconn with post
2017-10-13 23:39:24 +02:00
Wyatt
598aaf2623 Undoing gx rewrites 2017-10-13 12:44:43 -04:00
Wyatt
c178afe371 Replace get requests with posts 2017-10-13 12:38:18 -04:00
ZenGround0
180807bde0 Merge pull request #170 from ZenGround0/fix/raft-rejoin-errors
Fix/raft rejoin errors
2017-10-12 09:54:16 -04:00
Wyatt
a5de825897 Merge branch 'master' into fix/raft-rejoin-errors
Adding in sharness test fixes to pass tests
2017-10-12 09:30:58 -04:00
Hector Sanjuan
9663de55af Merge pull request #171 from ZenGround0/fix/sharness-failures
Sharness Test Fix: Moving exec call to sh as bash is deprecated in go-ipfs
2017-10-12 09:16:10 +02:00
Wyatt
e3ccc1b8f4 Using unshadow to save bootstrappers without changing other functionality 2017-10-11 16:12:21 -04:00
Wyatt
534da6c923 Moving exec call to sh as bash is deprecated in go-ipfs 2017-10-11 15:51:17 -04:00
Wyatt
0cd8e447c4 Touching up cluster restart to wait for listener clean up more effectively 2017-10-11 13:18:46 -04:00
Wyatt
67d38a06c4 Using shadow to actually save bootstrapper, updating cluster restart to respect saved config for tests 2017-10-11 11:09:39 -04:00
Wyatt
5924219281 Pulling in secret awareness 2017-10-10 15:15:56 -04:00
Wyatt
d6e1c39e86 Include cluster-restart script for test image 2017-10-09 11:43:34 -04:00
Wyatt
a1ec459b30 Peers saved in bootstrapper upon peer rm 2017-10-07 20:27:36 +03:00
Hector Sanjuan
72d0d22a23 Merge pull request #156 from ZenGround0/update-test-image-cluster-secret
set cluster secret to empty in test image
2017-09-29 15:10:17 +02:00
Wyatt
e533eb74f3 set cluster secret to empty in restart 2017-09-21 19:05:25 -04:00
Wyatt
025709fe7f set cluster secret to empty in test image 2017-09-21 18:35:24 -04:00
Hector Sanjuan
8a0c7b99f8 Merge pull request #151 from ipfs/documentation/architecture.md-updates
Small typo fix for architecture.md
2017-09-14 14:49:20 +02:00
Hector Sanjuan
ba6e26dfaa It's actually the PeerMonitor
My bad
2017-09-14 14:48:57 +02:00
Wyatt
4f34432037 Fixed a couple of typos 2017-09-11 17:33:20 -04:00
Hector Sanjuan
a8fb61a3d7 Merge pull request #148 from ipfs/docs/cluster-secret-links
Updated links to cluster secret info in docs
2017-09-09 02:14:40 +02:00
dgrisham
bde7da7619 Updated links to cluster secret info in docs 2017-09-07 17:14:14 -06:00
Hector Sanjuan
af8a385964 Merge pull request #142 from ipfs/feat/free-space-allocation-metric
`FreeSpace` allocation metric impl
2017-09-02 13:39:11 +02:00
dgrisham
b1356cd33a removing name arg from NewInformer 2017-09-01 15:02:15 -06:00
dgrisham
456603f7a8 adding error output to NewInformerWithMetric 2017-09-01 09:48:15 -06:00
Hector Sanjuan
32984611ec Use descendalloc in tests, rather than ascendalloc
Since default disk metric is free-space, it should sort in
descending order.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-09-01 14:09:37 +02:00
dgrisham
3cc4ffba52 more verbose output in TestClusterPeerRemoveReallocsPins 2017-08-28 18:53:16 -06:00
dgrisham
407fd9f68a Informer impl refactored; SortNumeric added for allocators. 2017-08-28 08:51:01 -06:00
dgrisham
2d2a9da793 FreeSpace metric impl (including descendalloc) refactored and tested. 2017-08-11 13:57:42 -06:00
dgrisham
a46ab3dda9 freespace metric partial impl 2017-08-03 11:24:19 -06:00
Hector Sanjuan
b911aa7bdc Merge pull request #141 from ipfs/test/sharness-https-api
Sharness tests for API SSL support
2017-08-01 14:45:42 +02:00
Hector Sanjuan
fcb6a98d03 More test fixing
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-08-01 14:25:20 +02:00
Hector Sanjuan
dac6fcd18d Fix tests
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-08-01 13:50:32 +02:00
dgrisham
7066d52364 for travis tests 2017-07-31 15:13:22 -06:00
dgrisham
aaefccb8a9 Bash -> sh -style conditional 2017-07-29 10:55:04 -06: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