Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ This can be useful for many reasons, such as:

Configuring Magento 2 to start storing files in your bucket is done using a single command.

Before configuring remote storage, make sure that the deprecated database media storage backend is disabled.

```bash
bin/magento setup:config:set system/media_storage_configuration/media_storage 0
```

**Hypernode Object Storage and other S3 compatible providers**

If you're using Hypernode Object Storage or a different provider than AWS S3, you need to specify the `--remote-storage-endpoint` option.
Expand All @@ -39,7 +45,7 @@ bin/magento setup:config:set \
For Hypernode Object Storage, use `main` as the bucket name and `EU` as the region. You can retrieve the remaining parameters by running `hypernode-object-storage info --with-credentials`.

```console
app@testapp ~ # hypernode-object-storage info --with-credentials
app@abcdef-example-magweb-cml:~$ hypernode-object-storage info --with-credentials
+--------------------------------------+----------------+---------+-------------+-------------------------------------+---------------+---------------+
| UUID | Name | Plan | Hypernodes | Management URL | Access Key | Secret Key |
+--------------------------------------+----------------+---------+-------------+-------------------------------------+---------------+---------------+
Expand Down Expand Up @@ -93,6 +99,10 @@ aws s3 sync var/import_export s3://my_bucket_name/import_export

Both methods are significantly faster than Magento’s built-in sync, as aws s3 sync handles uploads concurrently.

```{tip}
More information about the `hypernode-object-storage` command can be found in the [Object Storage article](../../hypernode-platform/object-storage/getting-started-with-object-storage.md).
```

## The storage flag file in the bucket

Magento's S3 implementation creates a test file called `storage.flag`, which is basically created to test if the connection works. So this is not a magic file to mark anything ([source](https://github.com/magento/magento2/blob/6f4805f82bb7511f72935daa493d48ebda3d9039/app/code/Magento/AwsS3/Driver/AwsS3.php#L104)).
Expand Down Expand Up @@ -121,6 +131,12 @@ If you’re using Amazon S3, ensure that your S3 bucket policies are properly co
}
```

## Remote storage tweaks module

After configuring remote storage for Magento 2, you might run into some slower pages in the admin product grid. This is caused by an inefficient image loading mechanism found in the Magento core code. For now we have written a Magento 2 module to fix this performance problem.

You can find the module on [GitHub](https://github.com/ByteInternet/magento2-remote-storage-tweaks/) and [Packagist](https://packagist.org/packages/hypernode/magento2-remote-storage-tweaks).

## Magento remote storage documentation

- [Configure Remote Storage](https://experienceleague.adobe.com/en/docs/commerce-operations/configuration-guide/storage/remote-storage/remote-storage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ shopware:
You can get the required management URL, access key, and secret key by running `hypernode-object-storage info` with the `--with-credentials` flag:

```console
app@testapp ~ # hypernode-object-storage info --with-credentials
app@abcdef-example-magweb-cmbl:~$ hypernode-object-storage info --with-credentials
+--------------------------------------+----------------+---------+-------------+-------------------------------------+---------------+---------------+
| UUID | Name | Plan | Hypernodes | Management URL | Access Key | Secret Key |
+--------------------------------------+----------------+---------+-------------+-------------------------------------+---------------+---------------+
Expand Down Expand Up @@ -95,6 +95,10 @@ Alternatively, you can use the AWS CLI directly:
aws s3 sync public/media/ s3://bucket_name/media/
```

```{tip}
More information about the `hypernode-object-storage` command can be found in the [Object Storage article](../../hypernode-platform/object-storage/getting-started-with-object-storage.md).
```

## Serving assets from your S3 bucket

To serve media assets directly from your S3 bucket, you need to adjust your nginx configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The upgrade is effective as long the extra resources are needed and being used.
1. Toggle Horizontal autoscaling. This will enable the form to choose the thresholds and the applications you would like to autoscale with. You can choose the certain conditions when autoscaling should be initiated. By default we recommend when the load on the server is higher than 70 for more than 15 minutes
Note: You can also choose the specific time window in which autoscaling should be initiated, if you prefer not to autoscale 24/7. ( E.g. if you have a cron running at 4am that will increase the load on the server but you dont want that to trigger autoscaling, you can choose the autoscaling window to be 5AM-3AM. This will avoid autoscaling between 3AM-5AM)
![Autoscaling toggled](_res/autoscaling-toggled.png)
1. Now click on applications to check if your Hypernode and all the applications on that Hypernode are eligibile for horizontal autoscaling. We have a list of requirements that your Hypernode and it's applications must meet for you to be able to enable horizontal autoscaling. You can see the list [here](https://www.hypernode.com/).
1. Now click on applications to check if your Hypernode and all the applications on that Hypernode are eligibile for horizontal autoscaling. We have a list of requirements that your Hypernode and it's applications must meet for you to be able to enable horizontal autoscaling. You can see the list [here](how-does-horizontal-autoscaling-work.md).
![Autoscaling eligibility checks](_res/autoscaling-eligchecks.png)
1. If an application is not supported, you can either unselect that application so that its not a part of horizontal autoscaling. Or you can update your application as required to make it eligible and re-run the checks.
1. After you have decided the thresholds and choosen the eligible applications, you can now click save changes at the top right corner. This will enable horizontal autoscaling, charge you for the autoscaling license and now your Hypernode will be monitored 24/7 against the conditions you have set.
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ With Object Storage you get:

## CLI option

```console
You can run the CLI command with the `--help` command to find out about all the options and arguments.

```bash
hypernode-object-storage --help
```

Expand All @@ -38,45 +40,43 @@ hypernode-object-storage --help

Note: You can use one object storage across multiple Hypernodes. But you can only use one object storage space per Hypernode.

If you receive this error, please make sure to enable "Allow billing through CLI in the relevant Hypernode settings page"

```
You do not have permission to order object storage for this Hypernode. Please ask the Hypernode owner to enable 'Allow billing through the CLI' in the Control Panel settings or via the API
```

### Retrieve object storage

1. Run `hypernode-object-storage info`
1. If you want to retrieve your credentials for the workspace pass in the flag `--with-credentials`.

The output should look like this
The output should look like the following:

```console
app@testhypernode ~ # hypernode-object-storage info

app@abcdef-example-magweb-cmbl:~$ hypernode-object-storage info
+--------------------------------------+--------------+--------+------------+----------------+---------------+---------------+
| UUID | Name | Plan | Hypernodes | Management URL | Access Key | Secret Key |
+--------------------------------------+--------------+--------+------------+----------------+---------------+---------------+
| d8770125-6c90-4770-b00f-1716f699990a | test-storage | OS50GB | testnode12 | **sensitive** | **sensitive** | **sensitive** |
+--------------------------------------+--------------+--------+------------+----------------+---------------+---------------+
```

You can use the credentials and the URL now to configure remote storage for your application with the help of [this document](../../ecommerce-applications/magento-2/how-to-configure-remote-storage-for-magento-2-x.md).
You can use the credentials and the URL now to configure remote storage for your application with the help of the following articles:

1. [How to configure remote storage for Magento 2.x](../../ecommerce-applications/magento-2/how-to-configure-remote-storage-for-magento-2-x.md)
1. [How to configure remote storage for Shopware 6.x](../../ecommerce-applications/shopware-6/how-to-configure-remote-storage-for-shopware-6-x.md)

### Cancel/Delete Object Storage

To cancel an Object Storage, you can ssh into the Hypernode that is linked to that Object Storage and run `hypernode-object-storage cancel`

Note: The cancellation will be in effect from the end of the month.
```{note}
The cancellation will be in effect from the end of the month.
Also if you change your mind or forgot to pull some data. It will still be available for 7 days after the cancellation. You can always reach out to the support team for help if that happens.
```

### Managing objects in object storage

You can manage your objects using the `hypernode-object-storage objects` subcommand.
It supports all common operations--listing, copying, moving, and deleting files--while also allowing you to sync files in the background and monitor the progress of an ongoing sync.

```console
app@testhypernode ~ # hypernode-object-storage objects --help
app@abcdef-example-magweb-cmbl:~$ hypernode-object-storage objects --help
usage: hypernode-object-storage objects [-h] {sync,cp,ls,mv,rm,show} ...

Manage objects in object storage
Expand All @@ -101,22 +101,22 @@ It is important to note that `hypernode-object-storage objects` supports all opt
Syncing files between your local directory and object storage is simple. Run the following command:

```console
app@testhypernode ~ # hypernode-object-storage objects sync /example/local/path/ s3://example/bucket/uri/
app@abcdef-example-magweb-cmbl:~$ hypernode-object-storage objects sync /example/local/path/ s3://example/bucket/uri/
Syncing objects from /example/local/path/ to s3://example/bucket/uri/...
Sync process started with PID 1234 in the background.
```

The `sync` operation runs in the background, and you can monitor its progress by using the `show` command, for example:

```console
app@testhypernode ~ # hypernode-object-storage objects show 1234
app@abcdef-example-magweb-cmbl:~$ hypernode-object-storage objects show 1234
Completed 9.7 GiB/~30.0 GiB (118.2 MiB/s) with ~5 file(s) remaining (calculating...)
```

If you run the `show` command after the sync operation has finished, you’ll see output like this:

```console
app@testhypernode ~ # hypernode-object-storage objects show 1234
app@abcdef-example-magweb-cmbl:~$ hypernode-object-storage objects show 1234
Process 1234 does not exist anymore
```

Expand Down
Loading