AWS EC2 on-prem Retool installation & how to use vim

Perhaps you are doing what I did a couple of days ago - installing on-prem Retool to AWS using the instructional video found here:

Having slowed things right down you may well have followed the procedure until you arrive at 05:15 and the cryptic instruction "let's use vim and go and get what's inside". With that, Justin disappears into what looks like a cmd window without giving us any clue as to how he's making the edits.

At this point you need to go here (scroll down to the bit about vim):

Justin obviously learned how to edit files using vim at about the same time as he learned to walk, and its all second nature to him now (we all know what that is like), but trust me, you wont be able to work out vim by trial and error. If you try to do so then you risk corrupting those vital files and aging rapidly as you attempt to sort out the mess you've made.

As you have gathered, I am a 'solutions-oriented, iteration-informed, IT dilettante', and therefore the bane of help-desks everywhere as I ask questions that everyone else already has answers to. In fairness though, the appearance of people like me is entirely down to the premise of lo-code/no-code vendors and it would be nice if their documentation assumed a lower level of knowledge/competence. Anyway, back to my topic...

Despite my little outburst above, I muddled through and I could not have done so without Justin's assistance. That was last Friday, and today I decided to get into 'externalising my database' - aarrgh.

For anyone that is hacking their own trail through this neck of the woods, I'll share my solution-path:

Instal pgAdmin4 and point it at your cloud-hosted Retool database (use the components of the connection string): postgresql://[username]:[password]@[hostname]/[database_name]?[additional_parameters]. This way you don't have to get into command line instructions just yet.

Set up an account at Supabase on the Pro plan. Point pgAdmin4 at your new Postgres database.

Use the Backup and Restore functions in pgAdmin4 to create a copy of the Retool database in your new Postgres database on Supabase's servers (IT professionals will do all this from the cmd prompt using pg_admin and pg_restore and setting all the switches perfectly but we don't have the time to learn how to do that).

Create a data resource in the cloud version of Retool that points at Supabase, select this data source in a new copy of your apps, and test that all is well.

Go watch Justin's video. Do everything exactly as Justin says. Rewind repeatedly to work out what Justin says (just joking Justin, although the audio is not great).

Use your new AWS EC2 instance's public key to log into your on-prem instance of Retool on AWS. Things are a little glitchy for the first hour or so, I suppose that's AWS and Retool getting acquainted.

"Externalise your database", remember that? Hang on, you've already got a database hosted at Supabase! In your on-prem Retool instance create a resource that points at Supabase exactly as you did two paragraphs ago in the cloud-hosted Retool instance.

Go to your cloud-hosted Retool instance and download your copied apps in json format (don't forget, they already point to the Supabase resource). Upload these apps into the on-prem instance of Retool and you're good to go!

All that remains is to invite users to the on-prem installation.

Next job, enable https - wish me well!

p.s.

I'm sure that some of you are shouting at the screen right now on account of some fatal architectural error that I've committed, or some gaping security breach that I've left open. If so please have compassion for me as I only started learning about on-prem last Wednesday.

Any and all comments and contributions will be very gratefully received.

1 Like