Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
giograno committed Sep 27, 2023
1 parent 01fdb6b commit 0484469
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions content/en/user-guide/tools/cloud-pods/remotes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ We currently offer two alternative types of remotes:
- S3 bucket remote storage;
- [ORAS](https://oras.land/) (OCI Registry as Storage) remote storage.

Our Cloud Pods command-line interface (CLI) has been expanded and now offers commands to create and delete remotes:
Our Cloud Pods command-line interface (CLI) has been expanded and now offers commands to create, delete, and list remotes:

```bash
localstack pod remote --help
Expand All @@ -35,10 +35,9 @@ Options:
Commands:
add Add a remote
delete Delete a remote
list List the available remotes
```

Moreover, the `localstack pod remotes` command will show all the registered remotes.

## S3 bucket remote storage
The S3 remote lets you store Cloud Pods assets into an existing S3 bucket in a real AWS account.
The first step is to export proper AWS credentials in the terminal session.
Expand All @@ -55,13 +54,13 @@ With the command below, we are creating a new remote called `s3-storage-aws` tha
The `access_key_id` and `secret_access_key` placeholders will make sure that the AWS credentials are correctly passed to the container.

{{< command >}}
$ localstack pod remote add s3-storage-aws 's3://ls-pods-bucket-test/?access_key_id={access_key_id}&secret_access_key={secret_access_key}'
$ localstack pod remote add s3-storage-aws s3://ls-pods-bucket-test/?access_key_id=\{access_key_id\}&secret_access_key=\{secret_access_key\}'
{{< / command >}}

Finally, we can use the usual `pod` CLI command to create a new pod that targets the created remote.

{{< command >}}
localstack pod save my-pod s3-storage-aws
$ localstack pod save my-pod s3-storage-aws
{{< / command >}}

After issuing the command, we can verify that the S3 buckets now contains the pod artifacts by simply running:
Expand All @@ -75,7 +74,7 @@ aws s3 ls s3://ls-pods-bucket-test
With the `pod load` command we can later load the same pod saved into this remote:

{{< command >}}
localstack pod load my-pod s3-storage-aws
$ localstack pod load my-pod s3-storage-aws
{{< / command >}}

## ORAS remote storage
Expand All @@ -95,19 +94,19 @@ export ORAS_PASSWORD=ILoveLocalStack1!
Then, I can use the CLI to create a new remote called `oras-remote`.

{{< command >}}
localstack pod remote add oras-remote oras://{oras_username}:{oras_password}@registry.hub.docker.com/<docker_hub_id>
$ localstack pod remote add oras-remote 'oras://\{oras_username\}:\{oras_password\}@registry.hub.docker.com/<docker_hub_id>'
{{< / command >}}

Finally, we can save a pod with the just-configured remote, where `my-pod` is the name of the Cloud Pod while `oras-remote` is the name of the remote itself.

{{< command >}}
localstack pod save my-pod oras-remote
$ localstack pod save my-pod oras-remote
{{< / command >}}

Similarly, we can perform the reverse operation and load a Cloud Pod from `oras-remote` with the following command:

{{< command >}}
localstack pod load my-pod oras-remote
$ localstack pod load my-pod oras-remote
{{< / command >}}

### Miscellaneous
Expand Down

0 comments on commit 0484469

Please sign in to comment.