Обсуждение: pgadmin4 Install On Windows Server 2019, Windows Container, Either ltsc2019 or 1809

Поиск
Список
Период
Сортировка

pgadmin4 Install On Windows Server 2019, Windows Container, Either ltsc2019 or 1809

От
Alexander Biezenski
Дата:

Hello,

 

I am attempting to install pgadmin4 into a windows container using Docker, on a Windows Server 2019 system. The Dockerfile uses an image pulled from ‘mcr.microsoft.com/windows/servercore:1809’.

 

I am restricted to cmd/PowerShell and am having issues at the setup.py step in the deployment guide.

 

If I try to use the Dockerfile RUN functionality to run the setup.py script (RUN C:\'program files'\'pgadmin 4'\v6\python\python.exe C:\'program files'\'pgadmin 4'\v6\web\setup.py), it asks for the initial email, and then errors out. There is not an easy way (that I have found), to pipe through an argument mid script, to answer the email/password prompt.

 

I then tried to stop short of that run step and finish this step manually via an exec <container> PowerShell and commit the changes setup.py back to the image. However, when I manually run the setup.py in this nested PowerShell, the prompt appears, and then refuses to accept input. I can put whatever text I want in, hit enter, and it just goes to the next line, with no further messages; no errors, not anything.

 

Do you have any suggestions? Is there an argument setting I am missing? Could I pre-generate the files somewhere and copy them over? Or is this simply unsupported?

 

Thank you,

 

Alexander Biezenski

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient of this message, you are prohibited from reading, disclosing, reproducing, distributing, disseminating or otherwise using this information. If you have received this communication in error, please notify the sender immediately and delete this e-mail from your system.

Re: pgadmin4 Install On Windows Server 2019, Windows Container, Either ltsc2019 or 1809

От
Aditya Toshniwal
Дата:
Hi Alexander,

If you're using docker then follow the steps here - https://www.pgadmin.org/docs/pgadmin4/6.7/container_deployment.html
You will have to have email and password when docker image is run.

On Tue, Mar 15, 2022 at 6:50 AM Alexander Biezenski <Alexander.Biezenski@secpsd.ca> wrote:

Hello,

 

I am attempting to install pgadmin4 into a windows container using Docker, on a Windows Server 2019 system. The Dockerfile uses an image pulled from ‘mcr.microsoft.com/windows/servercore:1809’.

 

I am restricted to cmd/PowerShell and am having issues at the setup.py step in the deployment guide.

 

If I try to use the Dockerfile RUN functionality to run the setup.py script (RUN C:\'program files'\'pgadmin 4'\v6\python\python.exe C:\'program files'\'pgadmin 4'\v6\web\setup.py), it asks for the initial email, and then errors out. There is not an easy way (that I have found), to pipe through an argument mid script, to answer the email/password prompt.

 

I then tried to stop short of that run step and finish this step manually via an exec <container> PowerShell and commit the changes setup.py back to the image. However, when I manually run the setup.py in this nested PowerShell, the prompt appears, and then refuses to accept input. I can put whatever text I want in, hit enter, and it just goes to the next line, with no further messages; no errors, not anything.

 

Do you have any suggestions? Is there an argument setting I am missing? Could I pre-generate the files somewhere and copy them over? Or is this simply unsupported?

 

Thank you,

 

Alexander Biezenski

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient of this message, you are prohibited from reading, disclosing, reproducing, distributing, disseminating or otherwise using this information. If you have received this communication in error, please notify the sender immediately and delete this e-mail from your system.



--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"

RE: pgadmin4 Install On Windows Server 2019, Windows Container, Either ltsc2019 or 1809

От
Alexander Biezenski
Дата:
Hello,

The steps there link to setting up a linux container; the docker hub only has linux/amd and linux/arm distributuons. I am looking to put together a windows container/distribution.

Or did I misunderstand you?

Thank you,

Alexander Biezenski

Sent from my Galaxy


-------- Original message --------
From: Aditya Toshniwal <aditya.toshniwal@enterprisedb.com>
Date: 2022-03-14 11:26 p.m. (GMT-06:00)
To: Alexander Biezenski <Alexander.Biezenski@secpsd.ca>
Cc: pgadmin-support@lists.postgresql.org
Subject: Re: pgadmin4 Install On Windows Server 2019, Windows Container, Either ltsc2019 or 1809

Hi Alexander,

If you're using docker then follow the steps here - https://www.pgadmin.org/docs/pgadmin4/6.7/container_deployment.html
You will have to have email and password when docker image is run.

On Tue, Mar 15, 2022 at 6:50 AM Alexander Biezenski <Alexander.Biezenski@secpsd.ca> wrote:

Hello,

 

I am attempting to install pgadmin4 into a windows container using Docker, on a Windows Server 2019 system. The Dockerfile uses an image pulled from ‘mcr.microsoft.com/windows/servercore:1809’.

 

I am restricted to cmd/PowerShell and am having issues at the setup.py step in the deployment guide.

 

If I try to use the Dockerfile RUN functionality to run the setup.py script (RUN C:\'program files'\'pgadmin 4'\v6\python\python.exe C:\'program files'\'pgadmin 4'\v6\web\setup.py), it asks for the initial email, and then errors out. There is not an easy way (that I have found), to pipe through an argument mid script, to answer the email/password prompt.

 

I then tried to stop short of that run step and finish this step manually via an exec <container> PowerShell and commit the changes setup.py back to the image. However, when I manually run the setup.py in this nested PowerShell, the prompt appears, and then refuses to accept input. I can put whatever text I want in, hit enter, and it just goes to the next line, with no further messages; no errors, not anything.

 

Do you have any suggestions? Is there an argument setting I am missing? Could I pre-generate the files somewhere and copy them over? Or is this simply unsupported?

 

Thank you,

 

Alexander Biezenski

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient of this message, you are prohibited from reading, disclosing, reproducing, distributing, disseminating or otherwise using this information. If you have received this communication in error, please notify the sender immediately and delete this e-mail from your system.



--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient of this message, you are prohibited from reading, disclosing, reproducing, distributing, disseminating or otherwise using this information. If you have received this communication in error, please notify the sender immediately and delete this e-mail from your system.

Re: pgadmin4 Install On Windows Server 2019, Windows Container, Either ltsc2019 or 1809

От
Aditya Toshniwal
Дата:
Hi Alexander,

The important part is the docker command to start pgAdmin. You need to pass the correct env vars - https://www.pgadmin.org/docs/pgadmin4/6.7/container_deployment.html#examples

On Tue, Mar 15, 2022 at 7:12 PM Alexander Biezenski <Alexander.Biezenski@secpsd.ca> wrote:
Hello,

The steps there link to setting up a linux container; the docker hub only has linux/amd and linux/arm distributuons. I am looking to put together a windows container/distribution.

Or did I misunderstand you?

Thank you,

Alexander Biezenski

Sent from my Galaxy


-------- Original message --------
From: Aditya Toshniwal <aditya.toshniwal@enterprisedb.com>
Date: 2022-03-14 11:26 p.m. (GMT-06:00)
To: Alexander Biezenski <Alexander.Biezenski@secpsd.ca>
Subject: Re: pgadmin4 Install On Windows Server 2019, Windows Container, Either ltsc2019 or 1809

Hi Alexander,

If you're using docker then follow the steps here - https://www.pgadmin.org/docs/pgadmin4/6.7/container_deployment.html
You will have to have email and password when docker image is run.

On Tue, Mar 15, 2022 at 6:50 AM Alexander Biezenski <Alexander.Biezenski@secpsd.ca> wrote:

Hello,

 

I am attempting to install pgadmin4 into a windows container using Docker, on a Windows Server 2019 system. The Dockerfile uses an image pulled from ‘mcr.microsoft.com/windows/servercore:1809’.

 

I am restricted to cmd/PowerShell and am having issues at the setup.py step in the deployment guide.

 

If I try to use the Dockerfile RUN functionality to run the setup.py script (RUN C:\'program files'\'pgadmin 4'\v6\python\python.exe C:\'program files'\'pgadmin 4'\v6\web\setup.py), it asks for the initial email, and then errors out. There is not an easy way (that I have found), to pipe through an argument mid script, to answer the email/password prompt.

 

I then tried to stop short of that run step and finish this step manually via an exec <container> PowerShell and commit the changes setup.py back to the image. However, when I manually run the setup.py in this nested PowerShell, the prompt appears, and then refuses to accept input. I can put whatever text I want in, hit enter, and it just goes to the next line, with no further messages; no errors, not anything.

 

Do you have any suggestions? Is there an argument setting I am missing? Could I pre-generate the files somewhere and copy them over? Or is this simply unsupported?

 

Thank you,

 

Alexander Biezenski

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient of this message, you are prohibited from reading, disclosing, reproducing, distributing, disseminating or otherwise using this information. If you have received this communication in error, please notify the sender immediately and delete this e-mail from your system.



--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient of this message, you are prohibited from reading, disclosing, reproducing, distributing, disseminating or otherwise using this information. If you have received this communication in error, please notify the sender immediately and delete this e-mail from your system.



--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"

RE: pgadmin4 Install On Windows Server 2019, Windows Container, Either ltsc2019 or 1809

От
Alexander Biezenski
Дата:

Hello,

 

I believe my current situation does not allow these environment variables to properly reach my pgadmin installation.

 

Let me provide some context, it might help you help me.

  1. I start from the image ‘mcr.microsoft.com/windows/servercore:1809’
  2. Then Docker downloads the windows installer located at https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v6.7/windows/pgadmin4-6.7-x64.exe
  3. It then executes the installer.
  4. I am now trying to work through the initial setup in server deployment, regarding setting config files and running setup.py.

 

My guess is that this is the wrong way to go about a windows deployment in this context, but I’m not sure.

 

I did try the method of passing environment variables to my container. Unfortunately, the results are the same. Without something built into the Dockerfile to run the setup.py, no configuration is done during image build. When I run the image using ‘docker run -e …’, and then execute setup.py, it does not appear to see the environment variables, and hangs as before.

 

Thank you,

 

Alexander Biezenski

 

From: Aditya Toshniwal <aditya.toshniwal@enterprisedb.com>
Sent: Tuesday, March 15, 2022 7:58 AM
To: Alexander Biezenski <Alexander.Biezenski@secpsd.ca>
Cc: pgadmin-support@lists.postgresql.org
Subject: Re: pgadmin4 Install On Windows Server 2019, Windows Container, Either ltsc2019 or 1809

 

Hi Alexander,

 

The important part is the docker command to start pgAdmin. You need to pass the correct env vars - https://www.pgadmin.org/docs/pgadmin4/6.7/container_deployment.html#examples

 

On Tue, Mar 15, 2022 at 7:12 PM Alexander Biezenski <Alexander.Biezenski@secpsd.ca> wrote:

Hello,

 

The steps there link to setting up a linux container; the docker hub only has linux/amd and linux/arm distributuons. I am looking to put together a windows container/distribution.

 

Or did I misunderstand you?

 

Thank you,

 

Alexander Biezenski

 

Sent from my Galaxy

 

 

-------- Original message --------

From: Aditya Toshniwal <aditya.toshniwal@enterprisedb.com>

Date: 2022-03-14 11:26 p.m. (GMT-06:00)

To: Alexander Biezenski <Alexander.Biezenski@secpsd.ca>

Subject: Re: pgadmin4 Install On Windows Server 2019, Windows Container, Either ltsc2019 or 1809

 

Hi Alexander,

 

If you're using docker then follow the steps here - https://www.pgadmin.org/docs/pgadmin4/6.7/container_deployment.html

You will have to have email and password when docker image is run.

 

On Tue, Mar 15, 2022 at 6:50 AM Alexander Biezenski <Alexander.Biezenski@secpsd.ca> wrote:

Hello,

 

I am attempting to install pgadmin4 into a windows container using Docker, on a Windows Server 2019 system. The Dockerfile uses an image pulled from ‘mcr.microsoft.com/windows/servercore:1809’.

 

I am restricted to cmd/PowerShell and am having issues at the setup.py step in the deployment guide.

 

If I try to use the Dockerfile RUN functionality to run the setup.py script (RUN C:\'program files'\'pgadmin 4'\v6\python\python.exe C:\'program files'\'pgadmin 4'\v6\web\setup.py), it asks for the initial email, and then errors out. There is not an easy way (that I have found), to pipe through an argument mid script, to answer the email/password prompt.

 

I then tried to stop short of that run step and finish this step manually via an exec <container> PowerShell and commit the changes setup.py back to the image. However, when I manually run the setup.py in this nested PowerShell, the prompt appears, and then refuses to accept input. I can put whatever text I want in, hit enter, and it just goes to the next line, with no further messages; no errors, not anything.

 

Do you have any suggestions? Is there an argument setting I am missing? Could I pre-generate the files somewhere and copy them over? Or is this simply unsupported?

 

Thank you,

 

Alexander Biezenski

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient of this message, you are prohibited from reading, disclosing, reproducing, distributing, disseminating or otherwise using this information. If you have received this communication in error, please notify the sender immediately and delete this e-mail from your system.


 

--

Thanks,

Aditya Toshniwal

pgAdmin Hacker | Software Architect | edbpostgres.com

"Don't Complain about Heat, Plant a TREE"

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient of this message, you are prohibited from reading, disclosing, reproducing, distributing, disseminating or otherwise using this information. If you have received this communication in error, please notify the sender immediately and delete this e-mail from your system.


 

--

Thanks,

Aditya Toshniwal

pgAdmin Hacker | Software Architect | edbpostgres.com

"Don't Complain about Heat, Plant a TREE"

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient of this message, you are prohibited from reading, disclosing, reproducing, distributing, disseminating or otherwise using this information. If you have received this communication in error, please notify the sender immediately and delete this e-mail from your system.

Re: pgadmin4 Install On Windows Server 2019, Windows Container, Either ltsc2019 or 1809

От
Dave Page
Дата:
Hi

On Tue, 15 Mar 2022 at 14:25, Alexander Biezenski <Alexander.Biezenski@secpsd.ca> wrote:

Hello,

 

I believe my current situation does not allow these environment variables to properly reach my pgadmin installation.

 

Let me provide some context, it might help you help me.

  1. I start from the image ‘mcr.microsoft.com/windows/servercore:1809
  2. Then Docker downloads the windows installer located at https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v6.7/windows/pgadmin4-6.7-x64.exe
  3. It then executes the installer.
  4. I am now trying to work through the initial setup in server deployment, regarding setting config files and running setup.py.

 

My guess is that this is the wrong way to go about a windows deployment in this context, but I’m not sure.

 

I did try the method of passing environment variables to my container. Unfortunately, the results are the same. Without something built into the Dockerfile to run the setup.py, no configuration is done during image build. When I run the image using ‘docker run -e …’, and then execute setup.py, it does not appear to see the environment variables, and hangs as before.



The Windows installer for pgAdmin is designed to install it onto a desktop machine as a normal application for a single user. setup.py is only used (by end users - pgAdmin still uses it internally) when setting up to run in Server mode for multiple users to access using their browser.

What you're trying to do is not supported, and will not work in a safe and secure manner without a significant amount of effort (probably development effort, not just on your part).

The supported ways to run pgAdmin are documented at https://www.pgadmin.org/docs/pgadmin4/6.7/deployment.html (ignore the Cloud Deployment link - that's something different that needs to be moved). If you want to run pgAdmin in a container, follow the instructions in the container deployment section. The container that will be deployed is a Linux one, which (I believe) you can deploy using Docker with WSL or Hyper-V.

 
--