Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-27323

DOC: Setting up Amazon AWS S3 clustering

    XMLWordPrintable

    Details

      Description

      As I didn't find any docs for how to set up AWS S3, I'm proposing this based on stuff I pulled from various sources. Related pages:
      https://doc.ez.no/display/DEVELOPER/Asset+Management
      https://doc.ez.no/display/DEVELOPER/Clustering
      https://doc.ez.no/display/EZP/Binary+files+handling

      Clustering on Amazon AWS S3

      NB: This feature is experimental, and not currently supported in eZ Platform Enterprise Edition.

      Set up AWS S3 account

      Set up eZ Platform for AWS S3

      • In your eZ Platform root directory, run php composer.phar require league/flysystem-aws-s3-v3
      • In your eZ Platform configuration, e.g. app/config/config.yml, set up the AWS S3 client:
        services:
            amazon.s3_client:
                class: Aws\S3\S3Client
                arguments:
                    -
                        version: "latest"
                        region: "eu-west-1" # The region string of your chosen region
                        credentials:
                            key: "ABCDEF..." # Your AWS key ID
                            secret: "abc123..." # Your AWS secret key
        
      • Still in your eZ Platform configuration, e.g. app/config/config.yml, set up the Flysystem adapter that uses the S3 client:
        oneup_flysystem:
            adapters:
                aws_s3_adapter:
                    awss3v3:
                        client: amazon.s3_client
                        bucket: "my-bucket" # Your bucket name
                        prefix: "%database_name%"
        
      • Still in your eZ Platform configuration, e.g. app/config/config.yml, set up the binary data handler for the S3 adapter:
        ez_io:
            binarydata_handlers:
                aws_s3:
                    flysystem:
                        adapter: aws_s3_adapter
        
      • In your eZ Platform system settings, e.g. app/config/ezplatform.yml, enable the binary data handler:
        ezpublish:
            system:
                default:
                    io:
                        binarydata_handler: aws_s3
        
      • Clear all caches and reload, and that's it.

      Migrate your existing binary data to S3

      Use the php app/console ezplatform:io:migrate-files command which was added in https://jira.ez.no/browse/EZP-25946, eZ Platform 1.10 and 1.7.4.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              gunnstein.lye@ez.no Gunnstein Lye
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: