Working on Amazon AWS
Amazon AWS can be used for running a Jethro server; you only need to set up an Amazon AWS account, and then you can run a Jethro server in a matter of minutes.
This post takes you through the steps of creating and running an Amazon AWS instance that can be used for running Jethro.
Creating a Server Instance
To create a server instance:
Log in to the Amazon AWS console.
Go to the EC2 dashboard.
On the left menu, go to Images > AMIs.
Select Public Images and search for Jethro:
Select the type of instance you would like to launch:
Regular instance - In which case click Launch and proceed to select the instance type.
Spot instance - In which case proceed to the next step (a spot instance allows you to bid on unused EC2 instances, which can lower your Amazon EC2 costs significantly. For further details, seeAmazon guide on spot instances. You should also review the "Spot Instance considerations").
To launch a spot instance, Click Actions to open a drop-down menu of possible actions.
Select the option Spot Request.
Select the instance type. For best results it is recommended to choose r3.8xlarge, but you can also choose r3.2xlarge or r4.4xlarge. When done, Click Next: Configure Instance Details on the bottom right to proceed to the next step.
Configure the following parameters:
Number of instances - Enter a number in this field if you want to launch more than one Jethro server
Availability Zone - Based on your preferences or geographic location
If you launch a regular instance, skip the next step.
For a spot request, specify the maximum price you are willing to pay:
Click Next: Add Storage to proceed to the next step.
Configure the instance storage. By default the machine is configured with a root device of 128 GB and one or two additional instance store volumes.
Click Next: Tag Instance to proceed to the next step.
Optionally, enter a tag name for the instance and click Next: Configure Security Group to proceed to the next step:
Select whether to use an existing security group or to create a new one, in which case ensure that the security group allows inbound SSH and TCP port 9111 traffic.
Click Review and Launch. If the warning shown below appears, select the bottom (highlighted) option and click Next:
Review your settings and click Launch to launch the instance:
Choose whether to select an existing key pair or to create a new one. When done, ensure that the check box next to the statement at the bottom is selected and click Launch Instances to continue.
Go to your instance list and search for your instance by its name, according to the tag name you previously set for it:
Copy the public IP address of the instance.
Voila!
You now have a running instance.
Spot Instance Considerations
Spot instances allow you to bid how much you are willing to pay for the instance. If the price of the spot instance supersedes the bidding price, the instance is terminated and cannot be accessed again.
Therefore, there are few considerations that need to be taken into account when deciding to use spot instances.
The instance may be terminated, resulting in a Jethro server shutting down. If Jethro server down time is not an option, you should not use spot instances.
If you use an EBS volume as storage for your Jethro instance, it is important to create this volume with the option Delete on Termination cleared (not selected), so that if the instance is terminated, the volume persists and can then be attached to a new instance. It is your responsibility to delete the volume if you choose to terminate the instance.
Note: Any data that you want to persist should be saved on an ESB volume that is created with the Delete on Termination option cleared, rather than on the root volume. Any data saved on the instance's root volume will be lost if the instance is terminated and you will not be able to attach the root volume as the root volume of another instance even if the option Delete on Termination is not selected.
For further details about spot instances, see Amazon documentation.
This post walks you through the steps of configuring an Amazon AWS instance to be used as a Jethro server. It assumes that you already have a running Amazon AWS instance created of the Jethro Query Node AMI.
Note: If you haven't created an instance yet, go to How to Set Up an Amazon AWS Instance for instructions on creating and running an instance.
Upgrading Jethro
To upgrade Jethro:
Use the external IP address you created and log in to the instance by using ssh with the following credentials:
The key you provided during the instance creation
The user ec2-user
The machine contains a directory called scripts, which resides under the ec2-user home directory and includes the following scripts:
upgradeJethro.sh – To upgrade to the latest Jethro software
mountVolumes.sh – To mount the extra volumes that were added when creating the instance
mountS3Bucket.sh – To mount an Amazon S3 bucket as a file system
unmountS3Bucket.sh – To unmount an Amazon S3 bucket file system
Run the script upgradeJethro.sh to ensure that you use the latest Jethro release.