how to create an amazon ec2 instance for the srv250 · how to create an amazon ec2 instance for the...

37
HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security Firewalls 6 Installing the .NET Framework 3.5 and the Eltek Gateway 19 Installing FileZilla and setting up a FTP Server 25 Setting up the Firewall with Advanced Security 31 The Eltek Gateway Application 32 Checking the Ports are set up correctly 33 Configuring the SRV250 Logger and Darca Heritage 35 Confirming Darca Heritage can retrieve data 36 Further Information TERMS OF REFERENCE Amazon AWS Console: The back of house area in Amazon AWS - the account and control settings used to set up and manage the instance. Remote Desktop: The desktop of the virtual server where Eltek Gateway runs (this is the day-to-day operating area of the EC2 instance - your virtual Microsoft Windows Server). SRV250: The Eltek datalogger Darca Heritage: The software used to configure the datalogger from a PC.

Upload: others

Post on 14-Jul-2020

17 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

0

HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250

CONTENTS

Page

1 Getting Started with the AWS Console

4 Setting up the Security Firewalls

6 Installing the .NET Framework 3.5 and the Eltek Gateway

19 Installing FileZilla and setting up a FTP Server

25 Setting up the Firewall with Advanced Security

31 The Eltek Gateway Application

32 Checking the Ports are set up correctly

33 Configuring the SRV250 Logger and Darca Heritage

35 Confirming Darca Heritage can retrieve data

36 Further Information

TERMS OF REFERENCE

Amazon AWS Console: The back of house area in Amazon AWS - the account and control settings used

to set up and manage the instance.

Remote Desktop: The desktop of the virtual server where Eltek Gateway runs (this is the day-to-day

operating area of the EC2 instance - your virtual Microsoft Windows Server).

SRV250: The Eltek datalogger

Darca Heritage: The software used to configure the datalogger from a PC.

Page 2: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

1

USING YOUR PC - GETTING STARTED WITH THE AMAZON AWS CONSOLE

Create an Amazon AWS Account at: https://aws.amazon.com/account/ and sign in to the console.

Click the dropdown arrow next to “All

Services” and then click EC2

Click Launch Instance

Page 3: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

2

Scroll down the options until you get to

Microsoft Windows Server 2012 R2 Base

and click Select

N.B. It is possible to use other options,

but this is the one we would

recommend.

The default option is free, but you can

choose a variation with the options

that is appropriate for your use.

When you have chosen, click Review

and Launch.

Leave the default settings as they are

and click Launch.

Page 4: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

3

Click the dropdown menu and select

“Create a new key pair”. Give it a

name in the box below (MyFirstKey in

this example) and click Download Key

Pair. Save the file somewhere that you

can locate it easily in the future.

Click Launch Instances

Click View Instances

Page 5: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

4

USING YOUR PC - SETTING UP THE SECURITY FIREWALLS

The last step in the previous section will bring you to this menu; if you need to locate this menu again,

log in to the console, click EC2 as you did in the first step of the previous section, then click Instances

in the panel on the left.

Scroll over to the right of the panel and

click the link under Security Groups

(launch-wizard-1 in this example)

Click the Inbound tab

Click Edit

Click the Add Rule button to add

a new row

Page 6: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

5

You need to add rules as follows:

Type Protocol Port Range Source Description

Custom TCP TCP 21 Anywhere port21

Custom TCP TCP 11000 Anywhere port11000

Custom TCP TCP 1024-1124 Anywhere port1024

Custom TCP TCP 3389 Anywhere port3389

Click Save when you have added

all the rules.

Click Instances in the left panel

Page 7: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

6

USING YOUR PC - INSTALLING .NET FRAMEWORK 3.5 & ELTEK GATEWAY ON THE SERVER

From the Instances menu, make a note of the Instance ID

and the Availability Zone.

N.B. You may need to resize the Instance ID column to see

the whole ID. Hover over small grey bar just to the right of

the Instance ID column label, and when the cursor changes,

you will be able to click and drag right to resize.

Click Snapshots

In the dropdown here, click and select Public Snapshots

Click in the search bar here, then select Owner from the

dropdown menu, then click Amazon Images.

Click in the search bar again, click Description from the

dropdown menu, and then type in “windows”. Press Enter.

Page 8: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

7

Scroll down and select the Installation

Media that matches the version of Windows

Server you chose originally – it is this one if

you have chosen our recommendation.

Click the Actions dropdown button, then

click Create Volume.

Click in the Availability Zone box, then

choose the correct zone that you noted

down earlier.

Click Create Volume

Click on the volume you just created.

Page 9: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

8

Select your instance and then click

“Connect”.

Select your volume, press the Actions

button, then click Attach Volume.

Click in the Instance field and either type in the

Instance ID you noted down before, or click the

Instance ID that appears below in the dropdown.

Click Attach

Click the Instances option in the left

hand pane.

Page 10: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

9

Click Get Password and select the

location of the key file you saved

earlier, click Choose File and then click

Decrypt Password.

These are the Windows Server Admin

login credentials – save these somewhere

safe.

Click Download Remote Desktop File.

Select Save File and save it somewhere

it can easily be located again.

Page 11: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

10

Find the saved Remote Desktop

Connection file in the file explorer,

right-click on it and select Edit.

Click on the Local Resources tab

Click More…

Click the + next to Drives and then tick

next to Local Disk (C:)

Page 12: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

11

Click Connect

If you see this screen, click Connect

Enter the password that you created

before (the Windows Server Admin login)

and click OK

Page 13: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

12

If you see this screen, select Yes to continue.

Once the Remote Desktop has opened, right-click

on the Windows logo in the bottom left of the

screen, then click Disk Management.

Right-click on the Disk and click Online,

then close the window.

Page 14: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

13

In file explorer, click on the Windows 2012 R2 English Media

(D:) folder (or whichever Installation Media you selected

earlier) and open the sources folder.

Open the sxs folder

Click in the bar here, and copy

the address, e.g. D:\sources\sxs

At the bottom left of the screen, click on

the icon here to open Server Manager.

Page 15: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

14

Click on option 2: Add roles and features

Click Next

Leave the installation type as Role-based and click Next

Page 16: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

15

Leave the server selection as the default and click Next

Leave the server roles as the default and click Next

Tick .NET Framework 3.5 Features

Click Next

Page 17: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

16

Click Specify an alternative source path

Enter the file path that you previously copied from

the sources/sxs folder and click OK.

Click Install

Page 18: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

17

In file explorer, locate the Eltek

Gateway GPRS installation folder on your

PC’s C Drive, and copy it.

Go to the Local Disk of the server and

paste the folder into the C Drive, then

open the pasted folder, and run the

setup.exe.

When installation has finished, click Close.

Click Run

Page 19: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

18

Press Next on each of these three windows.

Click Close

Page 20: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

19

USING REMOTE DESKTOP - INSTALLING FILEZILLA & SETTING UP A FTP SERVER

You cannot access Internet Explorer via the Start Menu in the Instance – you have to find the

application via file explorer.

Download FileZilla Server from https://filezilla-project.org/download.php?type=server

N.B. Only download FileZilla Server. Do not download FileZilla Client.

Locate Internet Explorer in this folder

Open the application – you can create a

shortcut on the desktop for future use.

If this error message

appears, click Add…,

then Add on the next

window, then Close.

You can then proceed to

the webpage.

Page 21: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

20

Click to Download

Click Save

Locate the installer file. If it appears as the type

“file”, rename it to add .exe on the end and press

Enter.

Click I Agree

Click Next

Page 22: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

21

Click Next

Click Next

Click Install

When installation has finished, click Close

Page 23: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

22

Open FileZilla, leave the server settings as they are

and click Connect.

Click Edit in the file menu, then click Settings

Go to Passive mode settings

Tick Use custom port range and enter 1024-1048

Select to retrieve the external IP address from

http://ip.filezilla-project.org/ip.php or you can

also specifically put the address DNS name you use

in your remote desktop

e.g.: ec2-6-100-129-60.compute-1.amazonaws.com

Click OK

Page 24: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

23

In file explorer, create a new folder in the

Local Disk (C:) drive called EltekGateway

Back in FileZilla, click Edit in the file

menu, then Users

Click Add

Page 25: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

24

Minimise FileZilla.exe (do not shut it down) as it needs to be left running in the background (so that it can

transfer data from ‘C:\EltekGateway’).

Add a user account name and then click OK

Tick to add a password and type one in

Click Shared folders

Click Add and add the folder you previously set up

e.g. C:\EltekGateway

Tick to add Read, Write and Delete permissions

Click OK

Page 26: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

25

USING REMOTE DESKTOP - SET UP THE ‘WINDOWS FIREWALL WITH ADVANCED SECURITY’

Click on the windows logo in the bottom left of

the screen to bring up the start menu. Click on

Administrative Tools.

Open Windows Firewall with

Advanced Security.

Page 27: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

26

Click on Inbound Rules

Click on New Rule

Select Program

Click Next

Page 28: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

27

Select This program path. Click the browse button to navigate

to the FileZilla Server .exe program. In this example, it was in

C:\Program Files (x86)\Filezilla Server\FileZillaServer.exe

Click Next

Click Next

Leave this at the default setting

Leave these at the default settings (all ticked)

Click Next

Page 29: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

28

Name the rule “FileZillaServer”

Click Finish

Click to add another New Rule

Select Port

Click Next

Leave this as TCP

Choose Specific local ports and enter 11000

Click Next

Page 30: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

29

Leave this as the default setting

Click Next

Leave these as the default settings (all ticked)

Click Next

Call the rule Port 11000

Click Finish

Page 31: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

30

Click to add another New Rule

Select Program

Click Next

Select This program path and locate the GPRSServer.exe file (in this example

it was located in C:\Program Files (x86)\Eltek\GPRSServer\GPRSServer.exe)

Click Next

Leave this at the default setting

Click Next

Page 32: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

31

USING REMOTE DESKTOP - THE ELTEK GATEWAY APPLICATION

Leave these at the default settings (all ticked)

Click Next

Name this rule GPRSServer

Click Finish

Open the GPRS-Server program from the

desktop

Click on File then Properties

Make sure the port here is correct (11000)

Minimise the program (don’t close it) as it

needs to be left running in the background

(so that it can receive data from an SRV250).

Page 33: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

32

USING YOUR PC – CHECKING THE PORTS ARE SET UP CORRECTLY

Go to the Amazon Web Server EC2 Console and go to the Instances menu.

Navigate to https://www.yougetsignal.com/tools/open-ports

You need to note down the IPv4 Public IP

Enter the saved the IPv4 Public IP here

Check the ports here (21, 11000, 3389) to see that

they are all open. Please note that this tool is unable

to check the port range 1024-1124.

If there are any closed ports, review the section

“Setting up the Security Firewalls” and check that

the FTP and Windows firewalls have been correctly

configured.

Page 34: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

33

USING YOUR PC - CONFIGURING THE SRV250 LOGGER AND DARCA HERITAGE

Open Darca Heritage from your PC.

Open Site Settings

Open Setup Squirrel

If the squirrel is currently logging, press Stop, then Clear.

Go into Squirrel Settings

Page 35: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

34

Go to the GPRS tab

Enter the IPv4 address that you noted down earlier

Ensure the server port is correct (11000)

These settings are relevant to your SIM provider, and also

need to be correct.

Click OK

Restart the squirrel and press Disconnect

to leave the squirrel setup.

Click Options

Click on the GPRS Server tab

Enter your details here.

The Host address is your Public IPv4 that you noted down.

The Port is 21.

The username is the name of the user that you set up in

FileZilla (ftp-user in this example).

The password is the password that you gave that user.

You can leave the folder blank as the FTP server is already

sharing the EltekGateway folder.

Click OK

Page 36: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

35

USING YOUR PC - CONFIRM DARCA HERITAGE CAN RETRIEVE DATA

Using one transmitter and the SRV250 logger, set up transmitters and Squirrel in the normal manner

(refer to the Darca Heritage guide for how to do this).

Check your GPRS-Server program is still running on the remote desktop (the EC2 instance).

In Site Settings, go to Setup Connection.

Select via GPRS

Tick GPRS – Import data from a

gateway file on the GPRS server

Click Done

Click Meter to check that the data is

coming through properly.

You’re all done!

Page 37: HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 · HOW TO CREATE AN AMAZON EC2 INSTANCE FOR THE SRV250 CONTENTS Page 1 Getting Started with the AWS Console 4 Setting up the Security

36

FURTHER INFORMATION

Further information on certain topics can be found with the following links:

Getting started with AWS:

https://aws.amazon.com/getting-started/tutorials/launch-windows-vm

More information about Security Groups:

https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/using-network-security.html

More information about Windows Optional Components:

https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/windows-optional-components.html

Creating and using volumes:

https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-using-volumes.html