mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-16 00:43:11 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a259f820a4 |
@@ -1,30 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id("software.amazon.smithy").version("0.6.0")
|
|
||||||
}
|
|
||||||
|
|
||||||
buildscript {
|
|
||||||
dependencies {
|
|
||||||
|
|
||||||
// This dependency is required in order to apply the "openapi"
|
|
||||||
// plugin in smithy-build.json
|
|
||||||
classpath("software.amazon.smithy:smithy-openapi:1.29.0")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation("software.amazon.smithy:smithy-model:1.29.0")
|
|
||||||
implementation("software.amazon.smithy:smithy-aws-traits:1.29.0")
|
|
||||||
}
|
|
||||||
|
|
||||||
configure<software.amazon.smithy.gradle.SmithyExtension> {
|
|
||||||
// Uncomment this to use a custom projection when building the JAR.
|
|
||||||
// projection = "foo"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Uncomment to disable creating a JAR.
|
|
||||||
//tasks["jar"].enabled = false
|
|
||||||
@@ -32,6 +32,13 @@ in {
|
|||||||
i386 = build_debug_and_release "i686-unknown-linux-musl";
|
i386 = build_debug_and_release "i686-unknown-linux-musl";
|
||||||
arm64 = build_debug_and_release "aarch64-unknown-linux-musl";
|
arm64 = build_debug_and_release "aarch64-unknown-linux-musl";
|
||||||
arm = build_debug_and_release "armv6l-unknown-linux-musleabihf";
|
arm = build_debug_and_release "armv6l-unknown-linux-musleabihf";
|
||||||
|
win = {
|
||||||
|
amd64 = build_debug_and_release "x86_64-w64-mingw32";
|
||||||
|
};
|
||||||
|
apple = {
|
||||||
|
arm64 = build_debug_and_release "aarch64-apple-darwin";
|
||||||
|
amd64 = build_debug_and_release "x86_64-apple-darwin";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
test = {
|
test = {
|
||||||
amd64 = test (compile {
|
amd64 = test (compile {
|
||||||
|
|||||||
+49
-4
@@ -202,11 +202,56 @@ See its usage output for other commands available.
|
|||||||
## Cyberduck & duck {#cyberduck}
|
## Cyberduck & duck {#cyberduck}
|
||||||
|
|
||||||
Both Cyberduck (the GUI) and duck (the CLI) have a concept of "Connection Profiles" that contain some presets for a specific provider.
|
Both Cyberduck (the GUI) and duck (the CLI) have a concept of "Connection Profiles" that contain some presets for a specific provider.
|
||||||
|
We wrote the following connection profile for Garage:
|
||||||
|
|
||||||
Within Cyberduck, a
|
```xml
|
||||||
[Garage connection profile](https://docs.cyberduck.io/protocols/s3/garage/) is
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
available within the `Preferences -> Profiles` section. This can enabled and
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
then connections to Garage may be configured.
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>Protocol</key>
|
||||||
|
<string>s3</string>
|
||||||
|
<key>Vendor</key>
|
||||||
|
<string>garage</string>
|
||||||
|
<key>Scheme</key>
|
||||||
|
<string>https</string>
|
||||||
|
<key>Description</key>
|
||||||
|
<string>GarageS3</string>
|
||||||
|
<key>Default Hostname</key>
|
||||||
|
<string>127.0.0.1</string>
|
||||||
|
<key>Default Port</key>
|
||||||
|
<string>4443</string>
|
||||||
|
<key>Hostname Configurable</key>
|
||||||
|
<false/>
|
||||||
|
<key>Port Configurable</key>
|
||||||
|
<false/>
|
||||||
|
<key>Username Configurable</key>
|
||||||
|
<true/>
|
||||||
|
<key>Username Placeholder</key>
|
||||||
|
<string>Access Key ID (GK...)</string>
|
||||||
|
<key>Password Placeholder</key>
|
||||||
|
<string>Secret Key</string>
|
||||||
|
<key>Properties</key>
|
||||||
|
<array>
|
||||||
|
<string>s3service.disable-dns-buckets=true</string>
|
||||||
|
</array>
|
||||||
|
<key>Region</key>
|
||||||
|
<string>garage</string>
|
||||||
|
<key>Regions</key>
|
||||||
|
<array>
|
||||||
|
<string>garage</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
```
|
||||||
|
|
||||||
|
*Note: If your garage instance is configured with vhost access style, you can remove `s3service.disable-dns-buckets=true`.*
|
||||||
|
|
||||||
|
### Instructions for the GUI
|
||||||
|
|
||||||
|
Copy the connection profile, and save it anywhere as `garage.cyberduckprofile`.
|
||||||
|
Then find this file with your file explorer and double click on it: Cyberduck will open a connection wizard for this profile.
|
||||||
|
Simply follow the wizard and you should be done!
|
||||||
|
|
||||||
### Instuctions for the CLI
|
### Instuctions for the CLI
|
||||||
|
|
||||||
|
|||||||
@@ -290,13 +290,13 @@ sourcing the right file.*
|
|||||||
aws s3 ls
|
aws s3 ls
|
||||||
|
|
||||||
# list objects of a bucket
|
# list objects of a bucket
|
||||||
aws s3 ls s3://nextcloud-bucket
|
aws s3 ls s3://my_files
|
||||||
|
|
||||||
# copy from your filesystem to garage
|
# copy from your filesystem to garage
|
||||||
aws s3 cp /proc/cpuinfo s3://nextcloud-bucket/cpuinfo.txt
|
aws s3 cp /proc/cpuinfo s3://my_files/cpuinfo.txt
|
||||||
|
|
||||||
# copy from garage to your filesystem
|
# copy from garage to your filesystem
|
||||||
aws s3 cp s3://nextcloud-bucket/cpuinfo.txt /tmp/cpuinfo.txt
|
aws s3 cp s3/my_files/cpuinfo.txt /tmp/cpuinfo.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that you can use `awscli` for more advanced operations like
|
Note that you can use `awscli` for more advanced operations like
|
||||||
|
|||||||
@@ -1,96 +0,0 @@
|
|||||||
$version: "2"
|
|
||||||
namespace org.deuxfleurs.garage.k2v
|
|
||||||
|
|
||||||
use aws.api#service
|
|
||||||
use aws.auth#sigv4
|
|
||||||
use aws.protocols#restJson1
|
|
||||||
|
|
||||||
@service(sdkId: "k2v")
|
|
||||||
@sigv4(name: "k2v")
|
|
||||||
@restJson1
|
|
||||||
service K2V {
|
|
||||||
version: "2023-04-10"
|
|
||||||
resources: [ Item ]
|
|
||||||
//operations: [ PollItem, ReadIndex, InsertBatch, DeleteBatch, PollRange ]
|
|
||||||
}
|
|
||||||
|
|
||||||
resource Item {
|
|
||||||
read: ReadItem
|
|
||||||
put: InsertItem
|
|
||||||
//delete: DeleteItem
|
|
||||||
//list: ReadBatch
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin
|
|
||||||
structure KeySelector {
|
|
||||||
@required
|
|
||||||
@httpLabel
|
|
||||||
bucketName: String
|
|
||||||
|
|
||||||
@required
|
|
||||||
@httpLabel
|
|
||||||
partitionKey: String
|
|
||||||
|
|
||||||
@required
|
|
||||||
@httpQuery("sort_key")
|
|
||||||
sortKey: String
|
|
||||||
}
|
|
||||||
|
|
||||||
@readonly
|
|
||||||
@http(method: "GET", uri: "/{bucketName}/{partitionKey}", code: 200)
|
|
||||||
operation ReadItem {
|
|
||||||
input: ReadItemInput
|
|
||||||
output: ReadItemOutput
|
|
||||||
}
|
|
||||||
|
|
||||||
@input
|
|
||||||
structure ReadItemInput with [KeySelector] {}
|
|
||||||
|
|
||||||
@output
|
|
||||||
structure ReadItemOutput {
|
|
||||||
value: ItemList
|
|
||||||
}
|
|
||||||
|
|
||||||
@sparse
|
|
||||||
list ItemList {
|
|
||||||
member: Blob
|
|
||||||
}
|
|
||||||
|
|
||||||
@idempotent
|
|
||||||
@http(method: "PUT", uri: "/{bucketName}/{partitionKey}", code: 204)
|
|
||||||
operation InsertItem {
|
|
||||||
input: InsertItemInput
|
|
||||||
}
|
|
||||||
|
|
||||||
@input
|
|
||||||
structure InsertItemInput with [KeySelector] {}
|
|
||||||
|
|
||||||
//operation DeleteItem {
|
|
||||||
// input: String
|
|
||||||
// output: String
|
|
||||||
//}
|
|
||||||
|
|
||||||
//operation PollItem {
|
|
||||||
// input: String
|
|
||||||
// output: String
|
|
||||||
//}
|
|
||||||
|
|
||||||
//operation ReadIndex {
|
|
||||||
// input: String
|
|
||||||
// output: String
|
|
||||||
//}
|
|
||||||
|
|
||||||
//operation InsertBatch {
|
|
||||||
// input: String
|
|
||||||
// output: String
|
|
||||||
//}
|
|
||||||
|
|
||||||
//operation DeleteBatch {
|
|
||||||
// input: String
|
|
||||||
// output: String
|
|
||||||
//}
|
|
||||||
|
|
||||||
//operation PollRange {
|
|
||||||
// input: String
|
|
||||||
// output: String
|
|
||||||
//}
|
|
||||||
@@ -15,10 +15,10 @@ type: application
|
|||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 0.4.0
|
version: 0.3.0
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
# It is recommended to use it with quotes.
|
# It is recommended to use it with quotes.
|
||||||
appVersion: "v0.8.2"
|
appVersion: "v0.7.2.1"
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "1.0",
|
|
||||||
"plugins": {
|
|
||||||
"openapi": {
|
|
||||||
"service": "org.deuxfleurs.garage.k2v#K2V"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user