|
1 | | -# FungiList specifications |
| 1 | +# RFS Documentation |
2 | 2 |
|
3 | | -## Introduction |
| 3 | +Welcome to the comprehensive documentation for the RFS (Remote File System) command-line tool. This documentation covers all aspects of using the `rfs` command, including its various subcommands, concepts, tutorials, and user guides. |
4 | 4 |
|
5 | | -The idea behind the FL format is to build a full filesystem description that is compact and also easy to use from almost ANY language. The format need to be easy to edit by tools like `rfs` or any other tool. |
| 5 | +## Table of Contents |
6 | 6 |
|
7 | | -We decided to eventually use `sqlite`! Yes the `FL` file is just a `sqlite` database that has the following [schema](../rfs/schema/schema.sql) |
| 7 | +### Architecture |
8 | 8 |
|
9 | | -## Tables |
| 9 | +The architecture documentation provides a high-level overview of the RFS system and how it works. |
10 | 10 |
|
11 | | -### Inode |
| 11 | +- [Architecture Overview](./architecture/overview.md) - High-level architecture of the RFS system |
| 12 | +- [Components](./architecture/components.md) - How the different components work together |
| 13 | +- [Data Flow](./architecture/data-flow.md) - How data flows through the system |
| 14 | +- [Storage Backends](./architecture/storage-backends.md) - Details about the supported storage backends |
12 | 15 |
|
13 | | -Inode table describe each entry on the filesystem. It matches really closely the same `inode` structure on the linux operating system. Each inode has a unique id called `ino`, a parent `ino`, name, and other parameters (user, group, etc...). |
| 16 | +### Concepts |
14 | 17 |
|
15 | | -The type of the `inode` is defined by its `mode` which is a `1:1` mapping from the linux `mode` |
| 18 | +The concepts documentation explains the core concepts and principles behind RFS. |
16 | 19 |
|
17 | | -> from the [inode manual](https://man7.org/linux/man-pages/man7/inode.7.html) |
| 20 | +- [Understanding Flists](./concepts/flists.md) - What are flists and how they work |
| 21 | +- [Understanding Storage Backends](./concepts/stores.md) - How storage backends work |
| 22 | +- [Understanding Caching](./concepts/caching.md) - How caching works in RFS |
| 23 | +- [Understanding Sharding and Replication](./concepts/sharding.md) - How sharding and replication work |
18 | 24 |
|
19 | | -``` |
| 25 | +### Tutorials |
20 | 26 |
|
21 | | -POSIX refers to the stat.st_mode bits corresponding to the mask |
22 | | -S_IFMT (see below) as the file type, the 12 bits corresponding to |
23 | | -the mask 07777 as the file mode bits and the least significant 9 |
24 | | -bits (0777) as the file permission bits. |
| 27 | +The tutorials provide step-by-step guides for common tasks using the `rfs` command. |
25 | 28 |
|
26 | | -The following mask values are defined for the file type: |
| 29 | +### Core Functionality |
27 | 30 |
|
28 | | - S_IFMT 0170000 bit mask for the file type bit field |
| 31 | +- [Getting Started](./tutorials/getting-started.md) - Installation and basic usage |
| 32 | +- [Creating Flists](./tutorials/creating-flists.md) - How to create flists from directories |
| 33 | +- [Mounting Flists](./tutorials/mounting-flists.md) - How to mount and use flists |
| 34 | +- [End-to-End Flist Workflow](./tutorials/end-to-end-flist-workflow.md) - Complete workflow for creating and using flists |
29 | 35 |
|
30 | | - S_IFSOCK 0140000 socket |
31 | | - S_IFLNK 0120000 symbolic link |
32 | | - S_IFREG 0100000 regular file |
33 | | - S_IFBLK 0060000 block device |
34 | | - S_IFDIR 0040000 directory |
35 | | - S_IFCHR 0020000 character device |
36 | | - S_IFIFO 0010000 FIFO |
37 | | -``` |
| 36 | +### Docker Integration |
| 37 | + |
| 38 | +- [Docker Conversion](./tutorials/docker-conversion.md) - How to convert Docker images to flists |
| 39 | +- [End-to-End Docker Workflow](./tutorials/end-to-end-docker-workflow.md) - Complete workflow for Docker conversion |
| 40 | + |
| 41 | +### Server and Distribution |
| 42 | + |
| 43 | +- [Server Setup](./tutorials/server-setup.md) - How to set up the server functionality |
| 44 | +- [Website Publishing](./tutorials/website-publishing.md) - How to publish websites using RFS |
| 45 | +- [Syncing Files](./tutorials/syncing-files.md) - How to sync files between RFS servers |
| 46 | + |
| 47 | +### User Guides |
| 48 | + |
| 49 | +The user guides provide detailed information about using specific features of the `rfs` command. |
38 | 50 |
|
39 | | -## Extra |
| 51 | +- [RFS Command Reference](./user-guides/rfs-cli.md) - Comprehensive command reference |
| 52 | +- [RFS Server Guide](./user-guides/fl-server.md) - Server configuration and management |
| 53 | +- [Web Interface Guide](./user-guides/frontend.md) - Using the web interface |
| 54 | +- [Performance Tuning](./user-guides/performance-tuning.md) - Optimizing performance |
| 55 | +- [Troubleshooting](./user-guides/troubleshooting.md) - Common issues and solutions |
40 | 56 |
|
41 | | -the `extra` table holds any **optional** data associated to the inode based on its type. For now it holds the `link target` for symlink inodes. |
| 57 | +## Command Overview |
42 | 58 |
|
43 | | -## Tag |
| 59 | +The `rfs` command provides all the functionality you need to work with flists: |
44 | 60 |
|
45 | | -tag is key value for some user defined data associated with the FL. The standard keys are: |
| 61 | +```bash |
| 62 | +# Core functionality |
| 63 | +rfs pack # Create flists from directories |
| 64 | +rfs mount # Mount flists as filesystems |
| 65 | +rfs unpack # Extract flist contents to a directory |
| 66 | +rfs clone # Copy data between stores |
| 67 | +rfs config # Manage flist metadata and stores |
| 68 | + |
| 69 | +# Docker conversion |
| 70 | +rfs docker # Convert Docker images to flists |
| 71 | + |
| 72 | +# Server functionality |
| 73 | +rfs server # Run the RFS server for web-based management |
| 74 | + |
| 75 | +# Server API interaction |
| 76 | +rfs upload # Upload a file to a server |
| 77 | +rfs upload-dir # Upload a directory to a server |
| 78 | +rfs download # Download a file from a server |
| 79 | +rfs download-dir # Download a directory from a server |
| 80 | +rfs exists # Check if a file exists on a server |
| 81 | +rfs flist create # Create an flist on a server |
| 82 | +rfs website-publish # Publish a website to a server |
| 83 | +``` |
| 84 | + |
| 85 | +For detailed information about each command, use the `--help` flag: |
| 86 | + |
| 87 | +```bash |
| 88 | +rfs --help |
| 89 | +rfs pack --help |
| 90 | +rfs mount --help |
| 91 | +``` |
46 | 92 |
|
47 | | -- `version` |
48 | | -- `description` |
49 | | -- `author` |
| 93 | +## Getting Help |
50 | 94 |
|
51 | | -But an FL author can add other custom keys there |
| 95 | +If you encounter issues or have questions that aren't addressed in the documentation: |
52 | 96 |
|
53 | | -## Block |
| 97 | +1. Check the [Troubleshooting Guide](./user-guides/troubleshooting.md) for common issues and solutions. |
| 98 | +2. Use the `--help` flag with any command for detailed usage information. |
| 99 | +3. Search for similar issues on the [RFS GitHub repository](https://github.com/threefoldtech/rfs/issues). |
| 100 | +4. Open a new issue if needed. |
54 | 101 |
|
55 | | -the `block` table is used to associate data file blocks with files. An `id` field is the blob `id` in the `store`, the `key` is the key used to decrypt the blob. The current implementation of `rfs` does the following: |
| 102 | +## Contributing to Documentation |
56 | 103 |
|
57 | | -- For each blob (512k) the `sha256`. This becomes the encryption key of the block. We call it `key` |
58 | | -- The block is then `snap` compressed |
59 | | -- Then encrypted with `aes_gcm` using the `key`, and the first 12 bytes of the key as `nonce` |
60 | | -- The final encrypted blocked is hashed again with `sha256` this becomes the `id` of the block |
61 | | -- The final encrypted blob is then sent to the store using the `id` as a key. |
| 104 | +We welcome contributions to improve this documentation. If you find errors, omissions, or areas that could be clarified: |
62 | 105 |
|
63 | | -## Route |
| 106 | +1. Fork the repository |
| 107 | +2. Make your changes |
| 108 | +3. Submit a pull request |
64 | 109 |
|
65 | | -the route table holds routing information for the blobs. It basically describe where to find `blobs` with certain `ids`. The routing is done as following: |
| 110 | +Please follow the existing style and structure when making changes. |
66 | 111 |
|
67 | | -> Note routing table is loaded one time when `rfs` is started. |
| 112 | +## License |
68 | 113 |
|
69 | | -- We use the first byte of the blob `id` as the `route key` |
70 | | -- The `route key` is then consulted against the routing table |
71 | | -- While building an `FL` all matching stores are updated with the new blob. This is how the system does replication |
72 | | -- On `getting` an object, the list of matching routes are tried in random order the first one to return a value is used |
73 | | -- Note that same range and overlapping ranges are allowed, this is how shards and replications are done. |
| 114 | +This documentation is licensed under the [Apache License 2.0](../LICENSE). |
0 commit comments