Recommended reading:
To get started, visit the Amazon Marketplace. In the search bar that appears, enter Hyperon Runtime and press Enter.
Click the "Hyperon Runtime" entry.
On the main page, you can read basic information about Hyperon Runtime. Click Continue to subscribe and read Terms and Conditions. After getting yourself familiar with the license, click Continue to configuration.
On this screen, you can choose the Hyperon Runtime version and region you want to launch your instance in. Next, click Continue to launch.
Select Launch through EC2 in the Choose Action section. This step is required to be able to specify the user-data script, which allows passing environment variables to the application without the need to log in to the instance.
By default Hyperon Runtime AMI uses AWS Systems Manager Parameter Store to fetch properties at the start of the application. You should specify AWS_ACCESS_KEY_ID and AWS_SECRET_KEY in the user-data script to connect AWS Systems Manager Parameter Store. If you do not define those properties, Hyperon Runtime will not launch.
Required properties with example values:
value: admin
value: admin
value: jdbc:postgresql://hostname:port/postgres
Another option is to disable AWS Systems Manager Parameter Store with environment variable AWS_PARAM STORE_ENABLED=FALSE with the help of a user-data script and provide necessary properties directly in this script.
This complex script is required to pass new environment variables on every EC2 reboot, as pointed out in this article.
1. TCP 22 – SSH, used to administrate your instance remotely.
2. TCP 8081 – Hyperon Runtime, this is the port on which you can access Hyperon Runtime.
Go to Security Groups in AWS Management Console and click Create security group.
This is the configuration of the security group used to access Hyperon Runtime. For simplicity, I choose source "Anywhere-IPv4" for the SSH port. However, it would be best if you restricted it to your public IP address by selecting "My IP" or to the company network while specifying the source.
After successfully deploying the AMI image, you can log in to the instance.
You need to use a PEM file with a public key downloaded while creating the EC2 instance. Type the ssh command in the terminal (Powershell on Windows or any other able to use ssh program):
The jar file present in the "ec2-user" home directory is deployed as a standalone java application. Systemd service is configured to manage this instance. Therefore, you can use systemctl commands to, e.g., start, stop, enable, disable or check status.
Hyperon Runtime allows you to define properties in several locations. The properties are processed in the order defined below;this implies that the last one overwrites other overlapping properties.
· /home/ec2-user/conf/application.properties
· /home/ec2-user/application.properties
· from “HYPERON_CONFIG_PATH” environment variable (can be defined in user-datascript)
· environment variables (from /home/ec2-user/environment.conf)
· AWS Systems Manager Parameter Store
Some updates are probably available from the time we build the AMI and the time you deploy it, potentially critical security updates. Therefore it is highly recommended to update the server with the command:
Hyperon supports various SQL databases,including PostgreSQL, Oracle, H2, and MsSQL. By default, we have built the AMI with PostgreSQL support. This means that the PostgreSQL JDBC driver is referenced in run_hyperon_runtime_rest.sh script with loader.path property:
-Dloader.path=/home/ec2-user/postgresql-42.2.5.jar
We only expect you to provide the URL and credentials for the database. If you want to connect to another database, replace this path with a new one pointing to the proper driver. After the driver is specified, update properties to point to the new database.