iann0036 / former2

Generate CloudFormation / Terraform / Troposphere templates from your existing AWS resources.
https://former2.com
MIT License
2.21k stars 267 forks source link

How to install Former2 on private hosted VM having webserver #356

Open vadiraj-prahalad opened 8 months ago

vadiraj-prahalad commented 8 months ago

Hello Team,

Is there a documentation on how to install the Former2 on Private VM having Webservers running.

OS Type : RHEL8

iann0036 commented 8 months ago

Hey @vadiraj-prahalad,

Check out HOSTING.md for information on this.

tl;dr host this repo on any web server (Apache, nginx, etc.) and tweak the helper to allow it to talk to whatever endpoint you're hosting on, if it's not localhost.

vadiraj-prahalad commented 8 months ago

@iann0036 Thank you, I was able to setup.

As per the documentation, I have added AmazonS3ReadOnlyAccess policy for the IAM user, however strangely I could not see any S3 buckets getting listed in the UI. Adding other policy like AmazonEC2ReadOnlyAccess, the EC2 instances are getting listed in UI. Not sure what is the issue with S3. Could you please help.

iann0036 commented 8 months ago

Hey @vadiraj-prahalad,

Have you installed the browser extension? That'll be required for the majority of services (due to a lack of CORS).

vadiraj-prahalad commented 8 months ago

Hi @iann0036 Yes, I have installed the plugin. Attached is the screenprint from different tabs. Please review, what else may be missing Former2_2 Former2_1

vadiraj-prahalad commented 8 months ago

The "Loading" screen stays and do not load any S3 buckets

iann0036 commented 8 months ago

Hi @vadiraj-prahalad,

Thanks for confirming.

When doing this, are there any errors in your console logs? On Chrome, you can find those in View > Developer > JavaScript Console.

Also, if you're self-hosting and not using 127.0.0.1 or localhost, you'll need to customize the helper extension per the HOSTING document.

vadiraj-prahalad commented 8 months ago

Hello @iann0036, Thank you for your response.

Attached is the issue which coming up in Developer Console of the browser.

FYI: I am running the Application as docker container as suggested in HOSTING.md>.

root@fb8693ae1f9f:/usr/share/nginx/html# find / -name 'manifest.json' /usr/share/nginx/html/lib/drawio/src/main/webapp/connect/trello/manifest.json /usr/share/nginx/html/lib/drawio/src/main/webapp/images/manifest.json

However i am not able to configure the manifest.json file after logging into the running container. Please find the above code snippet from the container. Could you please help here ![Uploading Former2_3.jpg…]()

vadiraj-prahalad commented 8 months ago

Former2_3

iann0036 commented 8 months ago

Hey @vadiraj-prahalad,

That does look like the web application is still not using the extension correctly.

You need to clone the Former2 Helper repository (https://github.com/iann0036/former2-helper) then configure the manifest.json file per the instructions in HOSTING.md. Note that this is not the same repository as what is hosted within the Docker container - the only change within the Docker container files is to set the new CHROME_HELPER_EXTENSION_ID.

To be clear, if you see network traffic towards any *.amazonaws.com endpoint on the locally hosted website, the extension is not working for you.

vadiraj-prahalad commented 5 months ago

Hello @iann0036 ,

Reviving this issue, now using alternate option of hosting on webserver ( not using container )

Steps performed

  1. Installed webserver ( httpd - apache ) on Linux machine
  2. Cloned the repository former2-helper in /var/www/html
  3. Removed the existing Extension from local ( Windows 11 )
  4. Added "https://us-west-2.console.aws.amazon.com/*" in manifest.json under externally_connectable
  5. Also added in line 3 modified in bg.js
  6. Need information here

As per the documentation in HOSTING.md which states

Load the extension by visiting chrome://extensions, clicking the "Load unpacked" button and selecting the chrome/ directory.

Since the app server with Project is installed in Linux server, how to browse from Windows 11

Could you please help here

Thanks, Vadiraj