|
1 | 1 | --- |
2 | | -unlisted: true |
| 2 | +sidebar_position: 4 |
3 | 3 | --- |
4 | 4 |
|
5 | 5 | # AWS Marketplace |
6 | 6 |
|
7 | | -We have created an app for the AWS Marketplace to make deployment of OpenRemote easier. This guide describes how to configure the instance using the special AWS CloudFormation template. |
| 7 | +This guide explains how to provision/configure OpenRemote via the AWS Marketplace. |
| 8 | +The `CloudFormation` template can be found at [cloudformation-aws-marketplace.yml](https://github.com/openremote/openremote/blob/master/.ci_cd/aws/cloudformation-aws-marketplace.yml). |
| 9 | + |
| 10 | +This product requires an internet connection to deploy properly. The following packages are downloaded on deployment: |
| 11 | +* `Docker` |
| 12 | +* `Docker Compose` |
8 | 13 |
|
9 | 14 | # Architecture Diagram |
10 | 15 |  |
11 | 16 |
|
12 | | -## Subscribe to the AWS Marketplace app |
13 | | -1. Search for OpenRemote on the [AWS Marketplace](https://aws.amazon.com/marketplace/search/results?searchTerms=openremote) and click on the listing. |
14 | | -2. Click on the orange button 'View purchase options'. |
15 | | -3. Accept the EULA by pressing the 'Accept Terms' button |
16 | | -4. You're now subscribed to the free OpenRemote Marketplace app. It will take a couple of minutes to process your subscription. After that, the 'Continue to Configuration' button becomes available. |
17 | | -5. When the subscription is fully processed, click on the 'Continue to Configuration' button. |
18 | | -6. Select a software version (By default, the latest version is already selected) and choose in which AWS region you want to deploy the software. |
19 | | -7. After selecting the options, press the 'Continue to Launch' button |
20 | | -8. Review your choices and press the 'Launch' button. You will now be redirected to the AWS CloudFormation page. |
21 | | -9. Then the AWS CloudFormation page is displayed, press the 'Next' button. |
22 | | - |
23 | | -## Instance Configuration |
24 | | -Now we're successfully subscribed to the OpenRemote marketplace app, we can start configuring it. In the section below, you will find a detailed description of each AWS CloudFormation parameter that's available in the template. |
25 | | - |
26 | | -#### `Name` |
27 | | -This can be anything and is used for recognizing the CloudFormation Stack. The Stack name must be 1 to 128 characters, start with a letter, and only contain alphanumeric characters. |
28 | | - |
29 | | -#### `InstanceName` |
30 | | -This name is used for recognizing the (OpenRemote) EC2 instance on the overview page. |
| 17 | +## Subscribe to the AWS Marketplace |
| 18 | +To use OpenRemote through the AWS Marketplace, you need an active subscription. Follow the steps below to subscribe. |
31 | 19 |
|
32 | | -#### `InstanceType` |
33 | | -You can choose an instance based on your monthly budget. There are three options available: |
34 | | -- `t4g.small` - `2 vCPU` / `2 GB RAM` - around $10 dollars per month AWS running costs |
35 | | -- `t4g.medium` - `2 vCPU` / `4 GB RAM` - around $25 dollars per month AWS running costs |
36 | | -- `t4g.large` - `2 vCPU` / `8 GB RAM` - around $50 dollars per month AWS running costs |
| 20 | +- Search for OpenRemote on the [AWS Marketplace](https://aws.amazon.com/marketplace/search/results?searchTerms=openremote) and click on the listing. |
| 21 | +- Click the `View purchase options` button. |
| 22 | +- Accept the EULA by selecting `Accept Terms`. |
| 23 | +- You are now subscribed on OpenRemote via the AWS Marketplace. Processing the subscription will take a few minutes. Once completed, the `Continue to Configuration` button becomes available. |
| 24 | +- Click `Continue to Configuration` to start configuring OpenRemote. |
| 25 | +- Choose a template version (the latest version is selected by default) and select your preferred AWS `region` for deployment. |
| 26 | +- Click `Continue to Launch` after making your selections. |
| 27 | +- Review your selections and click `Launch` to proceed. You will be redirected to the AWS `CloudFormation` page. |
| 28 | +- On the AWS `CloudFormation` page, click `Next` to continue. |
37 | 29 |
|
38 | | -#### `Hostname` |
39 | | -You can fill in the `FQDN (Fully Qualified Domain Name)` that you want to use for this OpenRemote instance. |
40 | | -If no value is submitted, you can access the software via the public `IPv4 address` from the EC2 instance. |
41 | | - |
42 | | -> :::note |
43 | | -> The software is not using `Amazon Route53` for DNS management. This means that – when you want to |
44 | | -> use a custom hostname, you must add an A-record pointing to the `IPv4` address of the EC2 instance. |
45 | | -
|
46 | | -> :::tip |
47 | | -> Leave the `hostname` field blank for initial deployment. Once deployed and you have updated your DNS with |
48 | | -> an A-Record pointing to the Static IP, update the CloudFormation stack via the AWS console and add the hostname. |
49 | | -> Then run the **Clear Proxy Configuration** script as described below so that the proxy container will generate |
50 | | -> a new [Lets Encrypt SSL certificate](https://letsencrypt.org/). If the hostname entered is not pointing to the |
51 | | -> Static IP when the proxy container is started, a will fail certificate retrieval, and you will be unable |
52 | | -> to access the site via the domain name. |
53 | | -
|
54 | | -#### `Keypair` |
55 | | -Choose a `keypair` for SSH Access. The `keypair` must exist in the same AWS region where you want to deploy the software. |
56 | | -Information on how to create a new `keypair` can be found [here](https://eu-central-1.console.aws.amazon.com/ec2/home?region=REGION#KeyPairs:). |
| 30 | +## Instance Configuration |
| 31 | +After subscribing on OpenRemote via the AWS Marketplace, you can start configuring it. Below, you will find a detailed description of each parameter available in the template. |
57 | 32 |
|
58 | | -> :::tip |
59 | | -> Create a keypair first and save it somewhere safe and secure. You will need this to SSH into the EC2 instance associated with this deployment. |
| 33 | +* `Stack name` - You need to specify an unique `CloudFormation` stack name for this deployment. |
| 34 | + The `stack name` must contain only letters (a-z, A-Z), numbers (0-9), and hyphens (-) and start with a letter. Max 128 characters. |
60 | 35 |
|
61 | | -#### `SSHLocation` |
62 | | -For security reasons, SSH is blocked by default on all IP addresses. In this field, you can fill in an `IPv4 address` on which you want to enable SSH access. |
| 36 | +* `Hostname` - You can specify the fully qualified domain name (`FQDN`) you want to use for this OpenRemote instance. |
| 37 | + If no value is provided, you can access OpenRemote using the public `IPv4` address of the `EC2` instance. |
63 | 38 |
|
64 | | -Please make sure you are using the following notation: |
65 | | -`0.0.0.0/32` allow one specific IP address access, or `0.0.0.0/0` allows all IP address access. |
| 39 | +* `Instance Type` - You can choose from the following `t4g` and `m6g` instance types: |
| 40 | + - `t4g.small` |
| 41 | + - vCPU: 2 |
| 42 | + - Memory: 2GB |
| 43 | + - `t4g.medium` |
| 44 | + - vCPU: 2 |
| 45 | + - Memory: 4GB |
| 46 | + - `t4g.large` |
| 47 | + - vCPU: 2 |
| 48 | + - Memory: 8GB |
| 49 | + - `m6g.large` |
| 50 | + - vCPU: 2 |
| 51 | + - Memory: 8GB |
| 52 | + - `m6g.xlarge` |
| 53 | + - vCPU: 4 |
| 54 | + - Memory: 16GB |
| 55 | + |
| 56 | + Prices vary based on the selected instance. All instances are using the `ARM` architecture. |
| 57 | + For detailed pricing information, visit the pricing pages for [t4g](https://aws.amazon.com/ec2/instance-types/t4/) and [m6g](https://aws.amazon.com/ec2/instance-types/m6g/). |
66 | 58 |
|
67 | | -#### `CIDRBlock` |
68 | | -The default (web) ports `80` and `443` are blocked by default for security reasons. |
69 | | -In this field, you can fill in an `IPv4` address on which you want to enable these ports. |
| 59 | +* `Amazon Machine Image` - This is the Amazon Machine Image (`AMI`) that is used by the `EC2` instance. |
| 60 | + |
| 61 | + :::danger |
70 | 62 |
|
71 | | -Please make sure you are using CIDR notation: |
72 | | -`x.x.x.x/32` allow one specific IP address access, or `0.0.0.0/0` allows all IP address access. |
| 63 | + Do not modify this value, as it is provided by Amazon. Changing it may cause instance creation to fail. |
| 64 | + |
| 65 | + ::: |
73 | 66 |
|
74 | | -## OpenRemote Configuration |
| 67 | +* `Storage` - You can specify the amount of block storage to provision for this OpenRemote instance, with options of `8GB`, `16GB`, `32GB`, `48GB` and `64GB`. |
| 68 | + It is possible to expand the volume after instance creation, but a reboot will be required. |
75 | 69 |
|
76 | | -#### `Password` |
77 | | -Create a password for your OpenRemote instance. This password is used for the administrator account. |
78 | | -The password must meet the following conditions: |
79 | | -- The minimum length is eight characters |
80 | | -- Must have at least one special character |
| 70 | +* `Key pair` - Choose a `key pair` for this OpenRemote instance. With the selected `key pair` you can `SSH` into the machine. |
| 71 | + You can only select a `key pair` that was created in the **same** region as where you want to deploy the OpenRemote instance. |
81 | 72 |
|
82 | | -## E-mail Configuration |
| 73 | + :::tip |
| 74 | + |
| 75 | + To create a new `key pair`, follow the steps provided [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-key-pairs.html). |
83 | 76 |
|
84 | | -The email configuration is not mandatory. All fields can be left blank / default if email is not required. |
| 77 | + ::: |
85 | 78 |
|
86 | | -#### `SMTPHost` |
87 | | -Provide the `SMTP` hostname that you want to use for sending e-mails. |
| 79 | + :::danger |
88 | 80 |
|
89 | | -#### `SMTPUser` |
90 | | -Provide the `SMTP` username that you want to use for sending e-mails. |
| 81 | + After creating the `key pair`, you receive a private key. |
| 82 | + |
| 83 | + Make sure to save this file on a secure location, as you will not be able to `SSH` into the machine without it. |
| 84 | + If you accidentally lose your key, follow the steps provided [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/replacing-key-pair.html) to recover access to your instance. |
91 | 85 |
|
92 | | -#### `SMTPPassword` |
93 | | -Provide the `SMTP` password that corresponds to the hostname and user. |
| 86 | + ::: |
94 | 87 |
|
95 | | -#### `SMTPPort` |
96 | | -The system is using port `587 (TLS)` by default for sending e-mails. If you want to use something else, for example, `465 (SSL)`, You can change it here. |
| 88 | +* `Elastic IP` - You can choose whether to assign an `Elastic IP` to this OpenRemote instance. Enabling this option ensures that your `IPv4` address remains the same after `stopping` the instance. |
| 89 | + Additional charges may apply, visit the pricing page [here](https://aws.amazon.com/vpc/pricing/). |
97 | 90 |
|
98 | | -#### `SMTPTLS` |
99 | | -Select if you want to use TLS for sending e-mails. Choose between `true` or `false`. |
| 91 | +## OpenRemote Configuration (Optional) |
100 | 92 |
|
101 | | -#### `SMTPFrom` |
102 | | -Provide the e-mail address that you want to use for sending e-mails. The e-mail address must be usable by the `SMTP` host. |
| 93 | +* `Password` - You can override the default password (`secret`) by providing a new password. |
| 94 | + There are no specific requirements for this password. If you do not provide one, you can log in to the manager using the default credentials (username `admin` and password `secret`). |
103 | 95 |
|
104 | | -#### `SMTPProtocol` |
105 | | -Select the SMTP protocol you want to use for sending e-mails. Choose between `smtp` or `smtps` (smtps = SSL). |
| 96 | +## E-mail Configuration (Optional) |
106 | 97 |
|
107 | | -# Updating |
| 98 | +* `SMTP Hostname` - You can specify the `hostname` that will be used for sending e-mails. (e.g. mail.example.com). |
| 99 | +* `SMTP Username` - You can specify the username for authenticating with the `SMTP` server. In most cases this is the e-mail address of the sending account. |
| 100 | +* `SMTP Password` - You can specify the password for authenticating with the `SMTP` server. |
| 101 | +* `SMTP Sending Address` - You can specify the e-mail address that will be used as the sending address. The e-mail address is visible for the receivers. (e.g. no-reply@example.com). |
108 | 102 |
|
109 | | -## Update OpenRemote Images |
| 103 | +## OpenRemote installation |
| 104 | +Once you've entered all the required details, click the `Next` button at the bottom of the page. You’ll be taken to a configuration page where you can configure various stack options. There’s no need to make any changes here, simply click `Next` again. |
| 105 | +On the final page, you'll see a summary of your deployment. Review the information, then click the `Submit` button at the bottom to confirm and proceed. |
110 | 106 |
|
111 | | -1. Access the AWS Systems Manager via your AWS Console (note the region) |
112 | | -2. Under Node Tools, press **Run Command**, then **Run command** again |
113 | | -3. Search for `docker` and select the **OpenRemote-updateDockerImagesDocument-xxxxxxxxxxxx** |
114 | | -4. Scroll down to the **Target** selection section, select **Choose instances manually**, and select the OpenRemote instance |
115 | | -5. Press the **Run** button at the bottom of the page |
116 | | -6. The next page will show the status of the command, and the below once the command has run successfully and any messages |
117 | | -7. Clicking on the Instance ID will show the output of the commands |
| 107 | +Amazon is provisioning the `EC2` instance using the provided `CloudFormation` template, this process takes around `5` to `10` minutes. You can monitor the progress by regularly refreshing the page using the refresh button located on the right-hand side. |
118 | 108 |
|
119 | | -## Update Packages |
| 109 | +:::note |
120 | 110 |
|
121 | | -1. Access the AWS Systems Manager via your AWS Console (note the region) |
122 | | -2. Under Node Tools, press **Run Command**, then **Run command** again |
123 | | -3. Search for `packages` and select the **OpenRemote-updatePackagesDocument-xxxxxxxxxxxx** |
124 | | -4. Scroll down to the **Target** selection section, select **Choose instances manually**, and select the OpenRemote instance |
125 | | -5. Press the **Run** button at the bottom of the page |
126 | | -6. The next page will show the status of the command, and the below once the command has run successfully and any messages |
127 | | -7. Clicking on the Instance ID will show the output of the commands |
| 111 | +The latest version of OpenRemote will be installed. Click [here](https://github.com/openremote/openremote/releases) to see the latest release. |
128 | 112 |
|
129 | | -## Update EC2 Instance OS |
| 113 | +::: |
130 | 114 |
|
131 | | -1. Access the AWS Systems Manager via your AWS Console (note the region) |
132 | | -2. Under Node Tools, press **Run Command**, then **Run command** again |
133 | | -3. Search for `aws` and select the **OpenRemote-updateAWSLinuxDocument-xxxxxxxxxxxx** |
134 | | -4. Scroll down to the **Target** selection section, select **Choose instances manually**, and select the OpenRemote instance |
135 | | -5. Press the **Run** button at the bottom of the page |
136 | | -6. The next page will show the status of the command, and the below once the command has run successfully and any messages |
137 | | -7. Clicking on the Instance ID will show the output of the commands |
| 115 | +After the `EC2` instance is successfully provisioned, the `CREATE_COMPLETE` status will appear on the `CloudFormation` page. |
138 | 116 |
|
139 | | -## Clear Proxy Configuration |
| 117 | +To start using OpenRemote, either visit the `hostname` you specified during configuration or navigate to the `EC2` page and locate the instance named `%AWS-STACKNAME%-AWS Marketplace` (make sure to replace `%AWS-STACKNAME%` with the stack name you have provided during configuration) and look for the `Public IPv4 address`. |
140 | 118 |
|
141 | | -If a change is made to the hostname field, this script will need to be run to clear the proxy data and prompt it to re-request |
142 | | -a certificate for the specified domain. Run this script if: |
| 119 | +You can also view the `IPv4` address by clicking on the `Outputs` section of the `CloudFormation` stack. |
143 | 120 |
|
144 | | -1. You want to add, change, or remove domain name to the OpenRemote instance. |
145 | | -2. You receive an `Invalid parameter: redirect_url` error |
146 | | -3. You receive a `ERR_TOO_MANY_REDIRECTS` error in Chrome or a `The page isn't redirecting properly` error in Firefox |
| 121 | +## How can I access the EC2 instance? |
| 122 | +You can access the `EC2` instance via `SSH` by following the steps below. |
147 | 123 |
|
148 | | -If adding or changing the hostname, run this script after the DNS A-record has been pointed to the Static IP and the record has propagated. |
| 124 | +- Navigate to the `EC2` page, then click on `Security Groups` located under the `Network & Security` section on the left-hand menu. |
| 125 | +- Locate the security group named `%AWS-STACKNAME%-or-ssh-whitelist` (make sure to replace `%AWS-STACKNAME%` with the stack name you specified during configuration) and click on it. |
| 126 | +- In the `Inbound rules` section, click the `Edit inbound rules` button. |
| 127 | +- Click the `Add rule` button to insert a new entry in the `Inbound rules` section. |
| 128 | +- Set the `type` to `SSH`, and enter your `ISP IP address` in the `Source` field. You can find your `IP address` [here](https://whatsmyip.com/). |
| 129 | +- Click the `Save rules` button to apply the changes. |
| 130 | +- You've now whitelisted your `IP address` to access the `EC2` instance. To connect, open your terminal and run the following command: `ssh ec2-user@%EC2PublicIP%` (make sure to replace `%EC2PublicIP%` with the instance's actual `IPv4` address or the `hostname` you have provided during configuration) |
149 | 131 |
|
150 | | -1. Access the AWS Systems Manager via your AWS Console (note the region) |
151 | | -2. Under Node Tools, press **Run Command**, then **Run command** again |
152 | | -3. Search for `proxy` and select the **OpenRemote-clearProxyDataDocument-xxxxxxxxxxxx** |
153 | | -4. Scroll down to the **Target** selection section, select **Choose instances manually**, and select the OpenRemote instance |
154 | | -5. Press the **Run** button at the bottom of the page |
155 | | -6. The next page will show the status of the command, and the below once the command has run successfully and any messages |
156 | | -7. Clicking on the Instance ID will show the output of the commands |
| 132 | +:::note |
157 | 133 |
|
| 134 | +To `SSH` into the machine, ensure that your `key pair` is saved in the `.ssh` directory. |
158 | 135 |
|
159 | | -# Troubleshooting |
160 | | -For further troubleshooting, SSH into the EC2 instance. You will need to have added an SSH key to the deployment to do this. |
| 136 | +::: |
161 | 137 |
|
162 | | -## Service Logs |
163 | | -To see the OpenRemote service logs run the below commands: |
| 138 | +## Where can I find the installation files? |
| 139 | +The installation files are located in the `/openremote` folder. You can navigate to it using the command `cd /openremote`. The data from the platform is stored in persistent `docker` volumes, located in the `/var/lib/docker/volumes` directory. |
164 | 140 |
|
165 | | -`sudo systemctl status openremote.service` |
| 141 | +## Unsubscribe from the AWS Marketplace |
| 142 | +To stop using OpenRemote from the AWS Marketplace, you can unsubscribe by following the steps below. |
166 | 143 |
|
167 | | -`journalctl -u openremote.service` |
| 144 | +- Visit the AWS Marketplace subscriptions page by clicking [here](https://us-east-1.console.aws.amazon.com/marketplace/home#/subscriptions). |
| 145 | +- Find the OpenRemote subscription in the list and click on it. |
| 146 | +- Click the `Actions` button, then select `Cancel Subscription`. |
| 147 | +- A modal pops up asking you to confirm the cancellation of the subscription. |
| 148 | +- To confirm cancellation, type `confirm` in the designated input field and click the `Yes, cancel subscription` button. |
168 | 149 |
|
169 | | -## Docker Logs |
170 | | -OpenRemote runs in a Docker environment. This means you can use standard Docker commands: |
171 | | -See the Containers section of the [Docker CLI Cheat Sheet](https://docs.docker.com/get-started/docker_cheatsheet.pdf) |
| 150 | +:::note |
172 | 151 |
|
173 | | -For example, use `sudo docker ps` to see all of the running containers. |
| 152 | +To cancel the subscription, you must first delete the OpenRemote stack created with it. |
174 | 153 |
|
175 | | -Then use `sudo docker logs <CONTAINER_ID>` to check the logs of each container. |
| 154 | +::: |
0 commit comments