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

Make test code print an informational error message if it doesn't find 'DEIS_CONTROLLER_URL' in the environment #13

Open
Cryptophobia opened this issue Mar 21, 2018 · 5 comments
Labels

Comments

@Cryptophobia
Copy link
Member

From @arschles on April 12, 2016 20:13

After deis/workflow-e2e#157, the tests look for DEIS_CONTROLLER_URL in the environment to determine what server to talk to in order to run tests. This variable can be set to a variety of different values, and the test should explain the options:

  • If you're inside a Kubernetes pod inside a namespace with a full Deis install, set the value to the internal router address: DEIS_CONTROLLER_URL=${DEIS_ROUTER_SERVICE_HOST}:${DEIS_ROUTER_SERVICE_PORT}
  • If you're not inside a Kubernets pod, set the value to the external router address. This value depends on what kind of ingress server you have set up. It might be a cloud load balancer or otherwise. Assuming you have a public IP for the router: DEIS_CONTROLLER_URL=deis.${EXTERNAL_ROUTER_IP}.xip.io (or you can use .nip.io, or your own domain if you've configured one...)

Copied from original issue: deis/workflow-e2e#163

@Cryptophobia
Copy link
Member Author

From @arschles on April 12, 2016 20:13

cc/ @krancour

@Cryptophobia
Copy link
Member Author

From @krancour on April 12, 2016 20:28

If you're inside a Kubernetes pod inside a namespace with a full Deis install, set the value to the internal router address: DEIS_CONTROLLER_URL=${DEIS_ROUTER_SERVICE_HOST}:${DEIS_ROUTER_SERVICE_PORT}

In this case, you shouldn't have to worry about the value of DEIS_CONTROLLER_URL at all. If unset, it's already derived automatically (in the Makefile) from the value of DEIS_ROUTER_SERVICE_HOST, which is automatically set by k8s when Workflow is installed.

If you're not inside a Kubernets pod, set the value to the external router address. This value depends on what kind of ingress server you have set up. It might be a cloud load balancer or otherwise. Assuming you have a public IP for the router: DEIS_CONTROLLER_URL=deis.${EXTERNAL_ROUTER_IP}.xip.io (or you can use .nip.io, or your own domain if you've configured one...)

The Makefile already offers this explanation if DEIS_CONTROLLER_URL is unset and cannot be derived from DEIS_ROUTER_SERVICE_HOST:

DEIS_CONTROLLER_URL is not exported. You must export this variable to proceed.
Its value should match the Deis Controller URL you would ordinarily use with
the `deis register` or `deis login` commands.

I would suggest that the only real problem we have on this front is that if someone executes ginkgo directly (instead of via the provided make target), then none of what I just said applies. We should transplant that logic from the Makefile to the tests themselves.

@Cryptophobia
Copy link
Member Author

From @arschles on April 21, 2016 15:50

As far as I can tell, the remaining work in here is to transplant the makefile logic to translate some Makefile logic into tests themselves.

@Cryptophobia
Copy link
Member Author

From @arschles on April 21, 2016 15:50

Punting to beta4

@Cryptophobia
Copy link
Member Author

From @arschles on May 9, 2016 19:48

@krancour does it make sense to leave this open? Regardless, moving to RC1

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

1 participant