Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent Url Override #1102

Open
MaGaudin opened this issue May 29, 2024 · 5 comments
Open

Agent Url Override #1102

MaGaudin opened this issue May 29, 2024 · 5 comments
Labels

Comments

@MaGaudin
Copy link

What happened?
We are trying to use DevPod with AWS as provider. Our VPC does not have internet connectivity (just for few addresses). So, we are trying to override Agent Url with something else. In particular, We download the agent from github and we experimented Bitbucket, AWS Codecommit and AWS S3 presigned URL.

Unfortunately, we always receive errors and we are not able to start dev pod correctly. For example, with AWS S3 presignedUrl We recieved an error saying that the url is too long and not found error trying to launch sh commands on that URL. Clearly, the system is not able to use the generated url correctly.

What did you expect to happen instead?
to override the Agent Url and start a devpod agent on EC2

How can we reproduce the bug? (as minimally and precisely as possible)
Put the agent on an S3 bucket, create a presignedUrl and copy the url in Agent URL Override section.

Local Environment:

  • DevPod Version: 0.5.6
  • Operating System: windows

DevPod Provider:

  • Cloud Provider: aws
  • Local/remote provider: docker | ssh
@pascalbreuninger
Copy link
Member

Hey @MaGaudin, thanks for opening the issue.
You're right, overwriting the agent URL with presigned URLs won't work because DevPod tries to download the binary for the current VM architecture by appending devpod-linux-$ARCH to the DEVPOD_AGENT_URL environment variable.

We could substitute ${BIN_NAME} in the URL to make this work

@MaGaudin
Copy link
Author

MaGaudin commented Jun 3, 2024

Hi @pascalbreuninger ,

thank you so much for your reply. Are you going to implement this modification? Or, is there something that we can do (using the console) to implement what you're saying?

@pascalbreuninger
Copy link
Member

pascalbreuninger commented Jun 3, 2024

@MaGaudin I've linked a PR with an implementation, will kick off an alpha release for you to test the changes after tests pass.
edit: here we go https://github.com/loft-sh/devpod/releases/tag/v0.5.13-alpha.0

You'll need to pass in the agent url through the DEVPOD_AGENT_URL environment variable and can then add ${BIN_NAME} as a placeholder. Make sure to escape the dollar sign if you're on the command line so prevent the shell variable expansion.

example: export DEVPOD_AGENT_URL=https://s3.amazonaws.com/bucket/test/\${BIN_NAME}?q=somekeyhere

@MaGaudin
Copy link
Author

MaGaudin commented Jun 5, 2024

Hi @pascalbreuninger,

you were really kind. I downloaded the alpha version of DevPod but, after overriding the Agent Url as below:
image

I had the same error as before:
image

Am I doing something wrong?

Marco

@MaGaudin
Copy link
Author

Is there any update? @pascalbreuninger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants