☁️ Gateway

The gateway to the StoreWise distributed data fabric.

CircleCI codecov Release

1️⃣ Get Gateway

The latest gateway binaries can be found here https://dl.bintray.com/storewise/s3-gateway. For other builds not in this list please contact [email protected].

2️⃣ Create Account

For developers and businesses that do not require their own sign-up architecture, StoreWise provides a easy on-boarding portal to access decentralized Storage through S3 via https://console.storewise.tech/.

  1. After signing up please write down your username and password, they will be required when initializing the gateway.

  2. Next generate aaccess key id and secret access key through the credentials tab on the console and save them on the local machine.

3️⃣ Configure AWS-CLI

Before the gateway can be executed it is required to set-up and configure the AWS-CLI. Installation instructions for the aws-cli can be found here.

Once the aws-cli is installed call aws configure in the command line;

$ aws configure
Default region name [None]: <leave empty>
Default output format [None]: json

Access Key and Secret Access Key can be generated in the web-console.

After aws configuration is complete the gateway can be initialized.

4️⃣ Select Metadata-Server (skip during alpha)

👉 Head over to the metadata-server section and consult in the table the endpoint in the geographic region closest to your gateway.

5️⃣ Certificates (optional)

For the addition of TLS self-signed or CA certificates to communicate with the gateway over https please consult the following section;

6️⃣ Client-Side encryption (optional)

For a second layer of client-side encryption through the gateway please consult the following section;

7️⃣ Run Gateway

After unzipping the gateway release and navigating to the designated OS folder, run this command to initialize the gateway;

$ ./gateway --username=<StoreWise user name> \
--password=<StoreWise password> \
--access-key-id=<access key id> \
--secret-access-key=<secret access key> \
--verbose=<verbose/debug mode>
--chunk-size=<bytes> # Optional if multipart-size is not selected in config.
--encryption-key=<KEY> #Optional, specify gateway client side encryption key.

StoreWise username and password are the keys used to sign into https://console.storewise.tech/.access key id and secret access key are the S3 access keys generated within the web-console.

This is a sample output log after starting gateway:

[email protected]:~/gateway/linux-amd64# ./gateway --username=rocket --password=spacex --access-key-id=585b7de01f04b22ce2c92c1f53adca268ab0c069 --secret-access-key=Io7LS3kov2f0hRJibEkQ9OeNNNgvPuWCNxW4oHwc
2020-06-05T16:55:32.886Z INFO gateway/main.go:194 web server is listening {"address": ":9300"}
2020-06-05T16:55:32.887Z INFO gateway/main.go:185 start listening{"address": ":9200", "version": "v0.4.9", "date": "2020-06-01 14:01:12"}

🎉 Congratulations! Now that you've completed the gateway setup and it is running, you can interact with the local S3 API on http://localhost:9200 or Please consult the proceeding section for interacting with the local S3 API.

Contracts data and other metadata stored client-side can be found in~/.config/storewise/gateway/id