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 #163

Open
arschles opened this issue Apr 12, 2016 · 6 comments
Labels

Comments

@arschles
Copy link
Member

After #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...)
@arschles arschles added the doc label Apr 12, 2016
@arschles arschles added this to the v2.0-beta3 milestone Apr 12, 2016
@arschles
Copy link
Member Author

cc/ @krancour

@krancour
Copy link
Contributor

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.

@arschles
Copy link
Member Author

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.

@arschles
Copy link
Member Author

Punting to beta4

@arschles arschles modified the milestones: v2.0-beta4, v2.0-beta3 Apr 21, 2016
@arschles
Copy link
Member Author

arschles commented May 9, 2016

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

@Cryptophobia
Copy link

This issue was moved to teamhephy/workflow-e2e#13

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

4 participants