top
(README.md)
# Filesystem example

## Summary

This is a fuse filesystem using cockroach as a backing store.
The implemented features attempt to be posix compliant.
See `main.go` for more details, including implemented features and caveats.

## Running

Run against an existing cockroach node or cluster.

#### Development node
```
# Build cockroach binary from https://github.com/cockroachdb/cockroach
# Start it in insecure mode (listens on localhost:15432)
./cockroach start --insecure

# Build filesystem example.
# Start it with:
mkdir /tmp/foo
./filesystem postgresql://root@localhost:15432/?sslmode=disable /tmp/foo
# <CTRL-C> to umount and quit
# Use /tmp/foo as a filesystem.
```

#### Insecure node or cluster
```
# Launch your node or cluster in insecure mode (with --insecure passed to cockroach).
# Find a reachable address: [mycockroach:15432].
# Run the example with:
mkdir /tmp/foo
./filesystem postgresql://root@mycockroach:15432/?sslmode=disable /tmp/foo
# <CTRL-C> to umount and quit
# Use /tmp/foo as a filesystem.
```

#### Secure node or cluster
```
# Launch your node or cluster in secure mode with certificates in [mycertsdir]
# Find a reachable address:[mycockroach:15432].
# Run the example with:
mkdir /tmp/foo
./filesystem postgresqls://root@mycockroach:15432/?certs=verify-ca&sslcert=mycertsdir/root.client.crt&sslkey=mycertsdir/root.client.key&sslrootcert=mycertsdir/ca.crt /tmp/foo
# <CTRL-C> to umount and quit
# Use /tmp/foo as a filesystem.
```

Imports 6 package(s)

  1. github.com/cockroachdb/cockroach-go/crdb
  2. bazil.org/fuse
  3. bazil.org/fuse/fs
  4. golang.org/x/net/context
  5. github.com/cockroachdb/pq
  6. bazil.org/fuse/fs/fstestutil

Test imports 4 package(s)

  1. github.com/cockroachdb/cockroach/util/randutil
  2. github.com/cockroachdb/cockroach/security
  3. github.com/cockroachdb/cockroach-go/testserver
  4. github.com/cockroachdb/cockroach/security/securitytest