- Go 100%
| .gitignore | ||
| .goreleaser.yaml | ||
| demo.mp4 | ||
| download.go | ||
| go.mod | ||
| go.sum | ||
| init.go | ||
| LICENSE | ||
| list.go | ||
| main.go | ||
| README.md | ||
| start.go | ||
| upload.go | ||
CLI app to automatically start a Warehouse server, and manage files.
Warehouse is my distributed object storage system written in go.
I wrote this utility to make starting a Warehouse easier, so you don't have to worry about configuring Docker/a Docker-Compose file.
Dependencies
Docker must be installed.
Warning
To use Warehouse with Docker for Windows
- Ensure Docker Desktop is running before starting
- In Docker Desktop, Open Settings -> Resources -> Network -> Enable host networking
Install Warehouse Manager
With go installed:
go install codeberg.org/ultravioletasdf/warehouse_manager@latest
Without go installed (Linux only):
Warning
This installs the binary from a third part source. If you do not trust this, you can use the binaries instead.
curl -sf http://goblin.run/codeberg.org/ultravioletasdf/warehouse_manager | sh
From binaries:
- Download the latest release for your platform from Codeberg
- Extract
- To run, open your terminal and navigate to the folder you extracted to. Run
./warehousefor usage options
Usage
Note
If you have installed via go or the curl command, the binary is called
warehouse_managerIf you have installed via binaries, you must be in the same folder as the extracted binaries, and call./warehouse
Initialization
Before you can run anything, you must initialize the Warehouse server
warehouse_manager mini init
This will setup a new warehouse server in the current folder, read the generated tokens from logs and save it in warehouse.yaml
Start Warehouse
Next, you must start Warehouse.
warehouse_manager mini start
This starts:
- A master gRPC server at
localhost:3000 - A volume server at
localhost:3001 - A web server at localhost:3002
To use the web dashboard, go to localhost:3002 and sign in using the admin token from warehouse.yaml.
File Commands
As an alternative to the web UI, some features are available with warehouse_manager
Of course, you must be running warehouse_manager mini start for any of these commands
Upload a File
In the same folder as warehouse.yaml, you can upload a file using
warehouse_manager files up bucket_name object_name ~/path/to/file.txt
Download a File
In the same folder as warehouse.yaml, you can download a file using
warehouse_manager files dl bucket_name object_name ~/path/to/output.txt
List All Files
In the same folder as warehouse.yaml, you can list all files in a bucket using
warehouse_manager files ls bucket_name