PDA

View Full Version : Dataflex / Cloud Initial Setup



the Guy
16-Mar-2020, 08:41 AM
I've browsed this forum, and I haven't seen step-by-step instructions with respect to how to set up Dataflex on AWS Cloud. Can someone please post some instructions? I would like to use the Free AWS deal (Amazon lets you use it for 12 months for free to try it out), and just put up a "hello world" program. I think I can take it from that point on. (Maybe!)

thank you,
Guy

Mike Peat
16-Mar-2020, 09:00 AM
Guy

What I do is install DataFlex Studio then I can have the web samples up there in a jiffy. I've done the whole thing from scratch (i.e. not even having an Amazon account - just type AWS into Google) in a 30 minute presentation.

Mike

Stephen W. Meeley
16-Mar-2020, 09:08 AM
Once you have an AWS instance, installing DataFlex is done just like on any server. The 19.1 installations (both the Studio and the Server) will take care of setting up IIS correctly automatically. As Mike mentioned, if you are in the experimenting phase, you can start with the Studio and then be able to play with all the examples. Once you are ready for real deployment, you'd just get your WebApp Server license and register it in the stack on your instance (replacing the Studio license). No need to uninstall the Studio, just using a real Server code is all you'll need.

the Guy
16-Mar-2020, 10:09 AM
LOL -- you guys make it sound so easy, but you are speaking Greek to me! For example, what kind of AWS account do I set up? Amazon tells me to go with an EC2, but others here have told me that won't work. What WILL work?

I had no idea I needed a WebApp Server license!

These are the kinds of details we need in a "how to" document. You guys tend to skip over a few steps and just say, "It's easy!" :)

Mike Peat
16-Mar-2020, 10:27 AM
Guy

EC2 is what I use. It works perfectly. Pick a free-tier option to start with: AWS --> Sign into Console --> EC2 --> Instances --> Launch Instance; click the "Free tier only" checkbox and pick something like Microsoft Windows Server 2019 Base.

You need a web app server license if you are putting up a real application for commercial use, but for just trying it out (or "proof of concept" if we are pretending to be grown up business people :)) a personal license will do.

Mike

wila
16-Mar-2020, 10:50 AM
Amazon tells me to go with an EC2, but others here have told me that won't work. What WILL work?

I take it you meant my reply to an earlier thread?

That was a reply about using EC2 as file sharing option to store your DataFlex embedded database.
It will work fine when using for a webapp (even when your webapp uses a DataFlex embedded database)

--
Wil

Mike Peat
16-Mar-2020, 11:51 AM
I just kind of assumed Guy was talking about a WebApp.

If you want to keep only your data in the cloud, I'd recommend looking at Amazon RDS Aurora - MySQL compatible, using the DataFlex ODBC driver, however I've found that using that with a local app has pretty poor performance. Using it with a web app in the same Data Center and availability zone works pretty well.

Mike

the Guy
16-Mar-2020, 12:10 PM
Ok... So, what do I need to do to convert my 154,223 lines of Windows code to "WebApp"?

Mike Peat
16-Mar-2020, 12:29 PM
Ah ha! Now that's the $64,000 question! :) (And cheap at the price!)

Mike

Mike Peat
16-Mar-2020, 12:46 PM
You could put a Windows app on an AWS server and allow users to access it via Remote Desktop (and you could stick with the embedded database), but the maximum number connected to it would by default be two. For more you would have to buy Microsoft CALs (Client Access Licenses (https://www.microsoft.com/en-gb/licensing/product-licensing/client-access-license?rtc=1)) - they cost money, so the advantages of a "Free for a year" server would tend to quickly disappear. I think they are around $30-$40 per user (YMMV - ask your local/favourite Microsoft reseller).

Mike

the Guy
16-Mar-2020, 01:31 PM
You could put a Windows app on an AWS server and allow users to access it via Remote Desktop (and you could stick with the embedded database), but the maximum number connected to it would by default be two. For more you would have to buy Microsoft CALs (Client Access Licenses (https://www.microsoft.com/en-gb/licensing/product-licensing/client-access-license?rtc=1)) - they cost money, so the advantages of a "Free for a year" server would tend to quickly disappear. I think they are around $30-$40 per user (YMMV - ask your local/favourite Microsoft reseller).

MikeThat's not terrible -- there are only 3 people at my company who may want to access the software at the same time. How do I do that?

Do I use AWS EC2, or something different?

How do I set up remote desktop?

the Guy
16-Mar-2020, 01:35 PM
Guy

What I do is install DataFlex Studio then I can have the web samples up there in a jiffy. I've done the whole thing from scratch (i.e. not even having an Amazon account - just type AWS into Google) in a 30 minute presentation.

MikeI tried creating a new Desktop Web Project in DataFlex 19.1 Studio, and I'm getting an error which says, "Unable to launch the Initialize WebApp wizard. This wizard requires Windows Administrator Access rights."

The strange thing is that I am the only user on this machine, and I DO have Windows Administrator Access rights.

The DataFlex Initialize WebApp wizard seems to be trying to create a temporary file in a hidden folder -- which I DO have full access to. C:/USERS/FLRED/APPDATA/LOCAL/TEMP/DF8417.TMP

What's going on here?!

wila
16-Mar-2020, 02:00 PM
Ok... So, what do I need to do to convert my 154,223 lines of Windows code to "WebApp"?

For a Webapp you need to rewrite the whole user interface... I doubt that is what you are after in this stage.

For a Windows app accessing it via remote desktop you need a windows server "in the cloud".
In that case you can also keep the database the embedded database if you like, for 3 users you do not have to go switch over to aurora.
The reason that works is that when you access the app via remote desktop, the database will be stored on local storage.
Both the DataFlex windows app and its database will be remote for the user and both will live "in the cloud".

If you would want to move the windows app local and the database remote then you will bump into problems.
Installing your windows app on a AWS server with embedded database down there as well is OK (it will work as you are used to)

We will all recommend to use SQL, but that's because that has a number of added benefits. For your usage scenario -at this moment- keep it simple and stick with what you know, but move it all over to a remote server.
--
Wil

the Guy
16-Mar-2020, 02:23 PM
OK! Cool! So, I should start with an AWS EC2 Amazon server?

How do I set up the remote desktop?

Garret Mott
16-Mar-2020, 03:14 PM
You have to right-click on the Studio.exe & choose "Run as Administrator". Being one doesn't cut it - it's a Windows thing.

BTW - this is all in the help...

Also - converting 150K lines of code from a desktop app to a webapp, as Mike alluded to, would be a 1,000 hour project give or take 500 hours.

Dennis Piccioni
16-Mar-2020, 03:34 PM
Garret,

in 19.1, you no longer need to do this. You still owe me a beer for showing you this at DISD. ;-)

Garret Mott
16-Mar-2020, 04:04 PM
I owe you beers for more that that!

Dennis Piccioni
16-Mar-2020, 04:14 PM
Virtual beers for now, hopefully in person again soon. :)

Mike Peat
17-Mar-2020, 03:19 AM
Guy

Remote Desktop (RDP or RDC: Remote Desktop Connection) comes as part of Windows - All Programs --> Accessories should find it.

When you set up an Amazon Windows server, all O/S level access to that is through Remote Desktop. You log in to the AWS Console, select EC2, then within that select Instances. Select your instance and click the "Connect" button. It will offer to let you download a Remote Desktop (.rdp) file, which you only need to do once (there is a choice between "A standalone RDP client" and "Session Manager", the latter of which I never use, so can't explain in detail, but see here (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html#start-ec2-console)). When you created your instance you will have been provided with a "Key pair" file which will have a .pem extension (Printable Encoded Archive security "certificate") which you should have saved somewhere sensible. When you choose to "Connect" and click on "Password", it will ask you to select that key file (telling you what it was called) and once you have done that it will let you decrypt the password, which you can then use to log into your instance via RDP (I copy-and-paste). If you change your password, this will no longer work and you'll just have to remember it, so take care.

Mike

Mike Peat
18-Mar-2020, 06:13 AM
Guy - Helen here found instructions I'd written ages ago on our web site: https://www.unicorninterglobal.com/company/presentations/getting-started-in-the-cloud-step-by-step.

Don't know if those are actually how it is now (cloud providers find it all too easy to change things as their mood changes), but it should point you the right way.

Mike

Focus
18-Mar-2020, 07:26 AM
They change almost as often as the weather ..... Boom Boom

Mike Peat
18-Mar-2020, 07:40 AM
Don't give up the day job! ;)

the Guy
21-Mar-2020, 10:16 PM
You have to right-click on the Studio.exe & choose "Run as Administrator". Being one doesn't cut it - it's a Windows thing.That did not work... It said I was running it in Administrator mode, but I still got the exact same error...

Garret Mott
22-Mar-2020, 06:28 AM
Yeah - Dennis said it was no longer needed in 19.1

Ianv
26-May-2020, 10:19 PM
I'm late to the party but just a warning; RDP is incredibly insecure and eminently vulnerable to port attacks. Ideally you would set up a VPN and connect over that. You can install Microsoft's RAS server role on the EC2 instance to do that. At the very least you are going to have to learn a bit about using AWS Security Groups one of which will be created when you first launch your EC2 instance. You'll see a reference to it in the information which shows below your instance when you look at "Running Instances" from the console. Usually it is called "launch-wizard-1" or similar. Click on that name and you will be taken to another screen. Click the "Edit Inbound Rules" button in the bottom right hand corner of the screen. You will see a line like the image below. Click on arrow alongside the word "Custom" and a drop down list will appear. Click on "MyIP" and the "0.0.0.0/0" which means anyone can connect will be replaced by the external IP address of your internet connection. Click on the "Save Rules" button at the bottom left of the screen and from then on, RDP access will only be allowed from your IP address. If you are doing this from your office, then anyone from your office will be able to connect. Otherwise, you can add new rules for their addresses, too. Whatever you do, do NOT leave your RDP connection open to all comers.

Good luck. AWS requires a bit of learning but it's worth doing since so many organizations are moving to the Cloud.

Ian

13712

bbbfletcher
7-Oct-2020, 04:08 PM
Agree with you. It wil lbe a good idea.