fbpx

Create an Amazon AWS Elasticsearch index

805 views February 13, 2019 January 22, 2020 admin 0

Setup WPSOLR and Amazon AWS Elasticsearch

From WPSOLR 21.3.

This video suppose you already signed up to create an AWS account (Amazon Elasticsearch Service).

We will show you how to configure your first Elasticsearch index creation with a few clicks.

 

What is Amazon AWS Elasticsearch?

It is a service to host open source Elasticsearch indexes (with the ELK stack), managed by Amazon AWS. Rather than installing Elasticsearch on your own servers, you get a subscription and let the service manage your indexes on your behalf. No need of manpower, or servers, anymore.

WPSOLR (the plugin) communicates with the Elasticsearch service through the Elasticsearch rest api. With a zest of AWS SDK for authentication.

Here is the video tutorial to create and secure (authentication by user/secret) your first Elasticsearch cluster:

 

1 – Signup for a free test subscription at AWS Elasticsearch

2 – Create a Key/Secret to secure your Elasticsearch indexes

2.1 – Navigate to your security credentials

Amazon Elasticsearch: credentials menu

Credentials menu

 

2.2 – Navigate to your policies

Amazon Elasticsearch: policies menu

AWS Elasticsearch: policies menu

 

2.3 – Click on Create policy button

Image wpsolr-amazon-cluster-button-new-policy.png of Create an Amazon AWS Elasticsearch index

Create policy button

 

2.4 – Add the Elasticsearch service to the new policy

Image wpsolr-amazon-cluster-new-policy-add-elasticsearch-service.png of Create an Amazon AWS Elasticsearch index

New policy select Elasticsearch service

 

2.5 – Add all Elasticsearch service actions (es:*) to the new policy

Amazon Elasticsearch: new policy select all actions

New policy select all actions

 

2.6 – Add all domains resources to the new policy

Amazon Elasticsearch: new policy select all domains

New policy select all domains

 

2.7 – Review the the new policy

Amazon Elasticsearch: new policy review

New policy review

 

2.8 – New policy has been created

Amazon Elasticsearch: new policy created

New policy created

 

2.9 – Navigate to your users menu. Click on Add user button

Amazon Elasticsearch: new user button

New user button

 

2.10 – Give new user a programmatic access: he will carry the access keys used by WPSOLR to access the index

Amazon Elasticsearch: new user give programmatic access to use access keys

New user give programmatic access to use access keys

 

2.11 – Attach new policy to new user

Amazon Elasticsearch: new user attach our policy

New user attach our policy

 

2.12 – Download user access keys before saving

Amazon Elasticsearch: new user download access keys before saving

New user download access keys before saving

 

2.13 – New user has been created

Amazon Elasticsearch: new user has been created

New user has been created

 

3 – Create a new Elasticsearch domain (aka “cluster”)

3.1 – Navigate to the Elasticsearch service page

Amazon Elasticsearch: new Elasticsearch domain menu

New Elasticsearch domain menu

 

3.2 – Click on Create a new domain button

Amazon Elasticsearch: new Elasticsearch domain button

New Elasticsearch domain button

 

3.3 – Select the latest Elasticsearch version

Amazon Elasticsearch: new Elasticsearch domain version

New Elasticsearch domain version

 

3.4 – Configure your domain instances

Amazon Elasticsearch: new Elasticsearch domain instance

New Elasticsearch domain instance

  1. Set a number of instance types deployed in your domain
    An instance type is a VM (virtual machine). Each index in your domain will be split in primary shards and replicas (copy of shards). Each shard and each replica will be stored on exactly one instance. How many instance you need depends on: how many and how big indexes are, and how many shards and replicas are there per index.
  2. Select a VM type for each instance in your domain
    The VM type defines how many resources (and of which quality) are given to each instance: RAM, disk, vCPUs.

 

3.5 – Configure your domain instances SSD storage

Amazon Elasticsearch: new Elasticsearch domain SSD storage

New Elasticsearch domain SSD storage

AWS recommend that you allocate three dedicated master nodes for each production Amazon ES domain.
Fast disks are extremely important for Elasticsearch performance. Always choose SSD storage, not magnetic.

 

3.6 – Configure your domain network access: VPC or internet

Choose a VPC access if your WordPress is also hosted on Amazon AWS:

Amazon Elasticsearch: new Elasticsearch domain VPC access

New Elasticsearch domain VPC access

Or choose an internet access if your WordPress is not hosted on Amazon AWS:

Amazon Elasticsearch: new Elasticsearch domain internet access

New Elasticsearch domain internet access

 

3.7 – Copy your new user ARN (aka “user ID”)

Amazon Elasticsearch: new Elasticsearch domain copy user ARN

New Elasticsearch domain copy user ARN

 

3.8 – Select the domain template policy

Amazon Elasticsearch: new Elasticsearch domain template policy

New Elasticsearch domain template policy

 

3.9 – Paste your new user ARN in the template policy

Amazon Elasticsearch: new Elasticsearch domain paste user ARN

New Elasticsearch domain paste user ARN

 

3.10 – Copy the new domain endpoint to copy in WPSOLR later

Amazon Elasticsearch: new Elasticsearch domain copy endpoint

New Elasticsearch domain copy endpoint

Wait a few minutes, until the cluster is deployed. Then copy the endpoint that will later be pasted in WPSOLR.

 

3.11 – Summary. We now have: a new domain, with its endpoint, access key/secret, and region

Amazon Elasticsearch: new Elasticsearch domain no indexes yet

New Elasticsearch domain no indexes yet

 

4 – Create a new index in WPSOLR

Here is the video tutorial to create your first Amazon AWS Elasticsearch index in WPSOLR:

4.1 – Activate your WPSOLR license

WPSOLR admin: activate a license

WPSOLR admin: activate a license if your site is not dev/test/staging

After buying or trying WPSOLR, check your email for your license code. Enter the code in the activation popup window as show above. Wait a few seconds for WPSOLR servers to return a response, which will unlock the WPSOLR admin screens.

4.2 – Select “Elasticsearch”, then “Amazon AWS” hosting

WPSOLR admin: new index menu

WPSOLR admin: new index menu

 

WPSOLR Amazon index: select Amazon hosting

WPSOLR Amazon index: select Amazon hosting

 

4.3 – Paste the Amazon domain Endpoint url

WPSOLR Amazon index: paste Amazon domain endpoint url

WPSOLR Amazon index: paste Amazon domain endpoint url

 

4.4 – Paste the AWS user access keys. The user is attached to the domain policy.

WPSOLR Amazon index: paste Amazon domain's policy user access keys

WPSOLR Amazon index: paste Amazon domain’s policy user access keys

Do not forget to enter your AWS access control key and secret, as shown in the above screen.

4.5 – Paste the domain region

Copy the domain’s region from your Amazon AWS console:

Amazon Elasticsearch: new Elasticsearch domain region

New Elasticsearch domain region

 

Then copy the region to WPSOLR’s index form:

WPSOLR Amazon index: paste Amazon domain's region

WPSOLR Amazon index: paste Amazon domain’s region

 

4.6 – Index is created !

WPSOLR Amazon index: index created !

WPSOLR Amazon index: index created !

Click on the button “Check the index status”, which calls the Elasticsearch create index api. Wait for active shards acknowledged true (a few seconds at most). The newly created index is now ready to accept your documents.

4.7 – Send your data to the index

WPSOLR Amazon index: index indexed

WPSOLR Amazon index: index indexed

Select your index (you can have more than one), click on the “Index” button. Wait while your documents are sent in batch to the AWS index in real time.

4.8 – Perform a few searches

WPSOLR Amazon index: perform a search with facets

WPSOLR Amazon index: perform a search with facets

 

Was this helpful?

Join Our weekly Newsletter

Receive our latest news once a week, each Thursday afternoon.
Your email is kept 100% private, and you will not receive other stuff in your mailbox.

We keep your data private and share your data only with third parties that make this service possible. Read our Privacy Policy.