-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description This change updates each entry point of our microservices to the following in a more consistent way. - Use cobra for argument parsing and help. - Accept the configuration file using `--config-file` as a commandline option. - Use a consistent pattern for choosing the ports used for various purposes. The port changes only affect local development. In Kuberentes each pod can choose its own listening port without conflict. ## Type of change - This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional). ## Contributor checklist Please verify that the PR meets the following requirements, where applicable: - [ ] An overview of proposed schema changes is included in a linked GitHub issue. - [ ] A design document PR is created in the [design-notes repository](https://github.com/radius-project/design-notes/), if new APIs are being introduced. - [ ] If applicable, design document has been reviewed and approved by Radius maintainers/approvers. - [ ] A PR for the [samples repository](https://github.com/radius-project/samples) is created, if existing samples are affected by the changes in this PR. - [ ] A PR for the [documentation repository](https://github.com/radius-project/docs) is created, if the changes in this PR affect the documentation or any user facing updates are made. - [ ] A PR for the [recipes repository](https://github.com/radius-project/recipes) is created, if existing recipes are affected by the changes in this PR. Signed-off-by: Ryan Nowak <[email protected]>
- Loading branch information
Showing
10 changed files
with
373 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,134 +1,139 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug rad CLI", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"preLaunchTask": "Build Radius (all)", | ||
"program": "${workspaceFolder}/cmd/rad/main.go", | ||
"cwd": "${workspaceFolder}", | ||
"args": [], | ||
}, | ||
{ | ||
"name": "Debug rad CLI (prompt for args)", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "debug", | ||
"preLaunchTask": "Build Radius (all)", | ||
"program": "${workspaceFolder}/cmd/rad", | ||
"args": "${input:cliArgs}", | ||
"console": "integratedTerminal", | ||
}, | ||
{ | ||
"name": "Launch Applications RP", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"preLaunchTask": "Build Radius (all)", | ||
"program": "${workspaceFolder}/cmd/applications-rp/main.go", | ||
"args": [ | ||
"--config-file", | ||
"${workspaceFolder}/cmd/applications-rp/radius-self-hosted.yaml", | ||
], | ||
"env": { | ||
"RADIUS_ENV": "self-hosted" | ||
} | ||
},{ | ||
"name": "Launch Dynamic RP", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"preLaunchTask": "Build Radius (all)", | ||
"program": "${workspaceFolder}/cmd/dynamic-rp/main.go", | ||
}, | ||
{ | ||
"name": "Launch UCP", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"preLaunchTask": "Build Radius (all)", | ||
"program": "${workspaceFolder}/cmd/ucpd/main.go", | ||
"cwd": "${workspaceFolder}", | ||
"env": { | ||
"BASE_PATH": "/apis/api.ucp.dev/v1alpha3", | ||
"PORT": "9000", | ||
"UCP_CONFIG": "${workspaceFolder}/cmd/ucpd/ucp-self-hosted-dev.yaml" | ||
} | ||
}, | ||
{ | ||
"name": "Launch Controller", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"preLaunchTask": "Build Radius (all)", | ||
"program": "${workspaceFolder}/cmd/controller/main.go", | ||
"cwd": "${workspaceFolder}", | ||
"args": [ | ||
"--config-file", | ||
"${workspaceFolder}/cmd/controller/controller-self-hosted.yaml", | ||
"--cert-dir", | ||
"" | ||
], | ||
"env": { | ||
"RADIUS_ENV": "self-hosted" | ||
} | ||
}, | ||
{ | ||
"name": "Launch Deployment Engine", | ||
"type": "coreclr", | ||
"request": "launch", | ||
"preLaunchTask": "Build Deployment Engine", | ||
"program": "${workspaceFolder}/../deployment-engine/src/DeploymentEngine/bin/Debug/net6.0/arm-de.dll", | ||
"args": [], | ||
"cwd": "${workspaceFolder}/../deployment-engine/src/DeploymentEngine", | ||
"stopAtEntry": false, | ||
"env": { | ||
"ASPNETCORE_URLS": "http://localhost:5017", | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"KUBERNETESBICEPEXTENSIBILITYURL": "http://localhost:5017/api", | ||
"RADIUSBACKENDURI": "http://localhost:9000", | ||
}, | ||
}, | ||
{ | ||
"name": "Debug Bicep generator integration tests", | ||
"type": "node", | ||
"request": "launch", | ||
"runtimeArgs": [ | ||
"--inspect-brk", | ||
"${workspaceRoot}/hack/bicep-types-radius/src/autorest.bicep/node_modules/.bin/jest", | ||
"--runInBand", | ||
"--no-cache" | ||
], | ||
"cwd": "${workspaceFolder}/hack/bicep-types-radius/src/autorest.bicep/src", | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"sourceMaps": true | ||
}, | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Launch Control Plane (all)", | ||
"configurations": [ | ||
"Launch UCP", | ||
"Launch Dynamic RP", | ||
"Launch Applications RP", | ||
"Launch Controller", | ||
"Launch Deployment Engine", | ||
], | ||
"stopAll": true | ||
} | ||
], | ||
"inputs": [ | ||
{ | ||
"id": "cliArgs", | ||
"type": "promptString", | ||
"description": "Args for launching Radius cli. Use --cwd to set the working directory.", | ||
"default": "init --full" | ||
} | ||
] | ||
} | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug rad CLI", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"preLaunchTask": "Build Radius (all)", | ||
"program": "${workspaceFolder}/cmd/rad/main.go", | ||
"cwd": "${workspaceFolder}", | ||
"args": [] | ||
}, | ||
{ | ||
"name": "Debug rad CLI (prompt for args)", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "debug", | ||
"preLaunchTask": "Build Radius (all)", | ||
"program": "${workspaceFolder}/cmd/rad", | ||
"args": "${input:cliArgs}", | ||
"console": "integratedTerminal" | ||
}, | ||
{ | ||
"name": "Launch Applications RP", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"preLaunchTask": "Build Radius (all)", | ||
"program": "${workspaceFolder}/cmd/applications-rp/main.go", | ||
"args": [ | ||
"--config-file", | ||
"${workspaceFolder}/cmd/applications-rp/radius-self-hosted.yaml" | ||
], | ||
"env": { | ||
"RADIUS_ENV": "self-hosted" | ||
} | ||
}, | ||
{ | ||
"name": "Launch Dynamic RP", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"preLaunchTask": "Build Radius (all)", | ||
"program": "${workspaceFolder}/cmd/dynamic-rp/main.go", | ||
}, | ||
{ | ||
"name": "Launch UCP", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"preLaunchTask": "Build Radius (all)", | ||
"program": "${workspaceFolder}/cmd/ucpd/main.go", | ||
"cwd": "${workspaceFolder}", | ||
"args": [ | ||
"--config-file", | ||
"${workspaceFolder}/cmd/ucpd/ucp-dev.yaml" | ||
], | ||
"env": { | ||
"BASE_PATH": "/apis/api.ucp.dev/v1alpha3", | ||
"PORT": "9000", | ||
"UCP_CONFIG": "${workspaceFolder}/cmd/ucpd/ucp-self-hosted-dev.yaml" | ||
} | ||
}, | ||
{ | ||
"name": "Launch Controller", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"preLaunchTask": "Build Radius (all)", | ||
"program": "${workspaceFolder}/cmd/controller/main.go", | ||
"cwd": "${workspaceFolder}", | ||
"args": [ | ||
"--config-file", | ||
"${workspaceFolder}/cmd/controller/controller-self-hosted.yaml", | ||
"--cert-dir", | ||
"" | ||
], | ||
"env": { | ||
"RADIUS_ENV": "self-hosted" | ||
} | ||
}, | ||
{ | ||
"name": "Launch Deployment Engine", | ||
"type": "coreclr", | ||
"request": "launch", | ||
"preLaunchTask": "Build Deployment Engine", | ||
"program": "${workspaceFolder}/../deployment-engine/src/DeploymentEngine/bin/Debug/net6.0/arm-de.dll", | ||
"args": [], | ||
"cwd": "${workspaceFolder}/../deployment-engine/src/DeploymentEngine", | ||
"stopAtEntry": false, | ||
"env": { | ||
"ASPNETCORE_URLS": "http://localhost:5017", | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"KUBERNETESBICEPEXTENSIBILITYURL": "http://localhost:5017/api", | ||
"RADIUSBACKENDURI": "http://localhost:9000" | ||
} | ||
}, | ||
{ | ||
"name": "Debug Bicep generator integration tests", | ||
"type": "node", | ||
"request": "launch", | ||
"runtimeArgs": [ | ||
"--inspect-brk", | ||
"${workspaceRoot}/hack/bicep-types-radius/src/autorest.bicep/node_modules/.bin/jest", | ||
"--runInBand", | ||
"--no-cache" | ||
], | ||
"cwd": "${workspaceFolder}/hack/bicep-types-radius/src/autorest.bicep/src", | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"sourceMaps": true | ||
} | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Launch Control Plane (all)", | ||
"configurations": [ | ||
"Launch UCP", | ||
"Launch Applications RP", | ||
"Launch Dynamic RP", | ||
"Launch Controller", | ||
"Launch Deployment Engine" | ||
], | ||
"stopAll": true | ||
} | ||
], | ||
"inputs": [ | ||
{ | ||
"id": "cliArgs", | ||
"type": "promptString", | ||
"description": "Args for launching Radius cli. Use --cwd to set the working directory.", | ||
"default": "init --full" | ||
} | ||
] | ||
} |
Oops, something went wrong.