Compare commits

...

6 Commits

Author SHA1 Message Date
Quentin Dufour 4d6c0500cb first build of the model 2023-04-10 18:41:40 +02:00
Quentin Dufour 0fbc9bbb05 wip smithy 2023-04-10 17:12:53 +02:00
arthurlutz a2a35ac7a8 docs(book/quickstart): adapt aws s3 commands to example
Signed-off-by: arthurlutz <arthurlutz@noreply.localhost>
2023-04-03 06:18:28 +00:00
Alex f167310f42 Merge pull request 'Update Helm chart versions (app + chart)' (#535) from elwin013/garage:update-helm-chart-appVersion-to-0.8.2 into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/535
2023-03-24 16:06:30 +00:00
Kamil Banach 66ed0bdd91 Update Helm chart versions (app + chart)
* chart version: 0.4.0
* app version: v0.8.2
2023-03-23 20:20:46 +01:00
Jonathan Davies 11b154b33b cli.md: Pointed Cyberduck profile at upstream link. 2023-03-20 10:46:02 +00:00
6 changed files with 143 additions and 54 deletions
+30
View File
@@ -0,0 +1,30 @@
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
+4 -49
View File
@@ -202,56 +202,11 @@ See its usage output for other commands available.
## 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.
We wrote the following connection profile for Garage:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<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!
Within Cyberduck, a
[Garage connection profile](https://docs.cyberduck.io/protocols/s3/garage/) is
available within the `Preferences -> Profiles` section. This can enabled and
then connections to Garage may be configured.
### Instuctions for the CLI
+3 -3
View File
@@ -290,13 +290,13 @@ sourcing the right file.*
aws s3 ls
# list objects of a bucket
aws s3 ls s3://my_files
aws s3 ls s3://nextcloud-bucket
# copy from your filesystem to garage
aws s3 cp /proc/cpuinfo s3://my_files/cpuinfo.txt
aws s3 cp /proc/cpuinfo s3://nextcloud-bucket/cpuinfo.txt
# copy from garage to your filesystem
aws s3 cp s3/my_files/cpuinfo.txt /tmp/cpuinfo.txt
aws s3 cp s3://nextcloud-bucket/cpuinfo.txt /tmp/cpuinfo.txt
```
Note that you can use `awscli` for more advanced operations like
+96
View File
@@ -0,0 +1,96 @@
$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
//}
+2 -2
View File
@@ -15,10 +15,10 @@ type: application
# 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.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.0
version: 0.4.0
# 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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.7.2.1"
appVersion: "v0.8.2"
+8
View File
@@ -0,0 +1,8 @@
{
"version": "1.0",
"plugins": {
"openapi": {
"service": "org.deuxfleurs.garage.k2v#K2V"
}
}
}