ECS 2.1 – Address ECS object storage and set the Base URL
Table of Contents
When using the Amazon S3 service, all buckets names must be unique. However, the ECS S3 service supports the use of a namespace, which can be used in addition to the bucket name and allows buckets in different namespaces to have the same name. By assigning a namespace to each tenant, a tenant can assign bucket names without regard for the names currently used by other tenants. If no namespace is specified in a request, ECS uses the default namespace associated with the tenant to which the user making the request belongs.
The namespace that refers to the location of an object can be specified in the x-emc-namespace header of an HTTP request. ECS also supports extraction of the location from the host header and allows the following Amazon S3 compatible addressing schemes:
Virtual Host Style Addressing
In addition, ECS also allows the inclusion of a namespace in the address. For example:
To use this style of addressing, you need to configure ECS so that it knows which part of the URL is the bucket name. This is done by configuring the Base URL. In addition, you need to ensure that your DNS system can resolve the address. The following sections provide more information:
Path Based Addressing
A namespace can be specified using the x-emc-namespace header.Back to Top
Where your application uses path-style addressing, this is simply a case of ensuring that the base name is resolvable by DNS. For example, if your application normally issues requests in the form ecs1.yourco.com/bucket, you will need to have a DNS entry that resolves ecs1.yourco.com to the IP address of your load balancer used for access to ECS nodes. If you are using the Amazon service this URI will be of the form: s3-eu-west-1.amazonaws.com.
Where your application is using virtual host style addressing, the URL will include the bucket name and can include a namespace. Under these circumstances, you will need to ensure that you include a DNS entry that will resolve the virtual host style address. You can do this by using a wildcard in the DNS entry.
For example, if your application normally issues requests in the form bucket.s3.yourco.com, you will need to have two DNS entries.
Or, if If you are using an application that previously connected to the Amazon S3 service, using bucket.s3.amazonaws.com, the entries would be:
These entries allow the base name to be resolved when issuing service-level commands (for example, list buckets) and the virtual host style bucket address to be resolved.
If you are creating an SSL certificate for this service, it should have the wildcard entry on the name of the certificate and the non-wildcard version as a Subject Alternate Name.Back to Top
In order that ECS knows how to treat the bucket location prefix, the Base URL must be configured by choosing one of the following options.
- Use Base URL with namespace
- Use Base URL without namespace
When processing a request, ECS will:
- Try to extract namespace from the x-emc-namespace header. If found, skip the steps below and process the request.
- Get the hostname of the URL from the host header and check if the last part of the address matches any of the configured Base URLs.
- Where there is a BaseURL match, use the prefix part of the hostname (the part left when the Base URL is removed), to obtain the bucket location.
The following examples demonstrate how ECS handles incoming HTTP requests with different structures.
Host: baseball.image.emc.finance.com BaseURL: finance.com Use BaseURL with namespace enabled Namespace: emc Bucket Name: baseball.image
Host: baseball.image.emc.finance.com BaseURL: finance.com Use BaseURL without namespace enabled Namespace: null (Use other methods to determine namespace) Bucket Name: baseball.image.emc
Host: baseball.image.emc.finance.com BaseURL: not configured Namespace: null (Use other methods to determine namespace.) Bucket Name: null (Use other methods to determine the bucket name.) ViPR treats this request as a path-style request.Back to Top
Before you begin
You must ensure that the domain specified in a request that uses a URL to specify an object location resolves to the location of the ECS data node or a load balancer that sits in front of the data nodes.
- At the ECS Portal, select .
New Base URL.
The New Base URL page is displayed.
- Enter the name of the Base URL. This will provide additional information about the base URL when looking at the base URL table.
- Enter the Base URL.
If your objects location URLs are in the form: https://mybucket.mynamespace.acme.com (that is, bucket.namespace.baseurl ) or https://mybucket.acme.com (that is, bucket.baseurl), the base URL would be acme.com.You can specify which format in the Namespace selector.
- Choose the format in which your object address is encoded in the URL: with a namespace or without a namespace.
- Select Save.