-
Notifications
You must be signed in to change notification settings - Fork 18
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
Sandbox debugging #89
Conversation
/assign @efiacor @kispaljr @arora-sagar |
I couldn't get these Make targets to work with kpt as @kispaljr had done in the original Also, this PR works on the assumption that the Porch package installed in the sandbox VM is identical to the package under development (CRDs etc) except for what's in the pod deployments. I think that's a fair assumption. |
I've read the VM setup documentation that you linked in the PR, but I still do not understand what "default" and "override" deployments are. |
.vscode/launch.json
Outdated
"--secure-port=4443", | ||
"--kubeconfig=${userHome}/.kube/config", | ||
"--cache-directory=${workspaceFolder}/.cache", | ||
"--function-runner=172.18.0.202:9445", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the IP of the function-runner the only difference between "Launch Server" and "Launch Override Server"? If yes, could we avoid copy-pasting here by using e.g. environment variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or even better can we use the same IP in both setups? What prevents this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would vote for the environmental variable approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fixed in the latest PR.
Makefile
Outdated
@@ -256,6 +257,26 @@ run-in-kind-no-controller: IMAGE_TAG=test | |||
run-in-kind-no-controller: SKIP_CONTROLLER_BUILD=true | |||
run-in-kind-no-controller: load-images-to-kind deployment-config-no-controller deploy-current-config ## Build and deploy porch without the controllers into a kind cluster | |||
|
|||
.PHONY: run-default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't we achieve the same effect by something similar to the following process:
- add these lines to the bashrc of the sandbox VM:
export DEPLOYPORCHCONFIGDIR=/tmp/kpt-pkg/nephio/core/porch
export KIND_CONTEXT_NAME=<whatever is the name of the kind cluster in the Nephio sandbox :)>
- reuse the existing make targets:
run-in-kind-*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but the simplest solution IMO is to undeploy the porch instance that was deployed by the ansible playbook (call kpt live destroy /tmp/kpt-pkg/nephio/core/porch
) and then reinstall it with make run-in-kind
. and then use the same development process that is currently documented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but the simplest solution IMO is to undeploy the porch instance that was deployed by the ansible playbook (call
kpt live destroy /tmp/kpt-pkg/nephio/core/porch
) and then reinstall it withmake run-in-kind
. and then use the same development process that is currently documented.
The problem there is that if you uninstall, it undefines all the package variants and packagerevisions that are put in place by the Nephio install.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't we achieve the same effect by something similar to the following process:
* add these lines to the bashrc of the sandbox VM:
export DEPLOYPORCHCONFIGDIR=/tmp/kpt-pkg/nephio/core/porch export KIND_CONTEXT_NAME=<whatever is the name of the kind cluster in the Nephio sandbox :)>
* reuse the existing make targets: `run-in-kind-*`
The problem I had was that I couldn't get kpt
to play nicely with the old and new package. I tried to use the existing targets but because the underlying kpt wouldn't work, they failed. Maybe you could take a look @kispaljr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but the simplest solution IMO is to undeploy the porch instance that was deployed by the ansible playbook (call
kpt live destroy /tmp/kpt-pkg/nephio/core/porch
) and then reinstall it withmake run-in-kind
. and then use the same development process that is currently documented.The problem there is that if you uninstall, it undefines all the package variants and packagerevisions that are put in place by the Nephio install.
OK, I will try this out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way a tiny opinion, is it possible to use _
like DEFAULT_PORCH_CONFIG_DIR
it increases the readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all changed int he new version of the PR.
The "default" install is the install that is already on the VM when it is installed by the nephio The "override" one is the development version that we are installing, building, and debugging ont he vm, so it overrides the default install. Maybe the names I picked are not great. |
/test presubmit-nephio-go-test |
They are removed in the new version of the PR. |
/test presubmit-nephio-go-test |
1 similar comment
/test presubmit-nephio-go-test |
/assign @efiacor |
I tried it works thank you @liamfallon |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: efiacor, liamfallon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
See also nephio-project/porch#89 --------- Co-authored-by: Gergely Csatari <[email protected]>
This PR tweaks the launch configuration and Makefile to allow remote debugging of Porch on a Nephio sandbox VM.
This tweak requires explicit inventory parameters to be used, see nephio-project/test-infra#293
The documentation for remote VM debugging is in this PR: nephio-project/docs#158