Commit Graph

2392 Commits

Author SHA1 Message Date
Hector Sanjuan
caafe3d18d Merge branch 'captain-log-update-2' 2017-10-23 12:51:03 +02:00
Hector Sanjuan
38095afa39 Delay entry to today
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-23 12:50:44 +02:00
Hector Sanjuan
47c877fa13 Dockerfile-test: Add bash to busybox
Remove the debian-stretch Dockerfile-test and put the busybox one
with bash in its place.

Tested that kubernetes-ipfs runs with it.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-21 11:52:25 +02:00
Hector Sanjuan
12c85ab6eb Merge pull request #185 from ipfs/fix/154-dockerfile
Fix #154: Update Dockerfiles
2017-10-21 00:46:25 +02:00
Hector Sanjuan
0e26d92513 Add new Dockerfile-test using busybox (experimental)
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-21 00:12:23 +02:00
Hector Sanjuan
a57ee29e10 Use plain debian for Dockerfile-test
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-21 00:12:08 +02:00
Hector Sanjuan
fe815bb9dc Use sh for docker test scripts
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-21 00:11:47 +02:00
Hector Sanjuan
f1e5c393c8 Allow secrets to be nil (no secret)
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-20 23:44:18 +02:00
Hector Sanjuan
1d256166d6 Fix #154: Update Dockerfiles
After changes on how the final docker image for go-ipfs is generated,
our Dockerfiles failed to build.

The new version is inspired on go-ipfs Dockerfile. It takes advantage
of docker >= v17.06 which allows multi-stage Dockerfiles with
several FROM directives and COPY --from. This allows build freely on a
first stage, without thinking of cleaning up, and then just copy the
final artifacts to a second, minimal image.

The Dockerfile-test is similarly updated. Minor changes have been
applied to the entrypoints.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-20 20:51:19 +02:00
ZenGround0
4a87599399 Merge pull request #186 from ipfs/fix/bad-subcommand
ipfs-cluster-service: Do not run with unknown subcommands
2017-10-20 13:53:32 -04:00
Hector Sanjuan
eca012b9fe ipfs-cluster-service: Do not run with unknown subcommands
Shows an error when running cluster with an unknown subcommand.

Renames "ipfs-cluster-service run" to "ipfs-cluster-service daemon" which
is consistent with go-ipfs and paves ground for #153.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-20 18:57:15 +02:00
ZenGround0
03b21bf97d Merge pull request #177 from ipfs/162-new-configs
Issue #162: Rework configuration format
2017-10-20 09:29:33 -04:00
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