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

Need docs on CLI commands required to create a usable workspace #1211

Open
brooke-hamilton opened this issue Aug 30, 2024 · 0 comments
Open
Labels

Comments

@brooke-hamilton
Copy link
Contributor

brooke-hamilton commented Aug 30, 2024

What content needs to be created or modified?

The Radius CLI docs have a topic on creating a new workspace. However, there is no documentation on how to get a working workspace without running rad init. It is useful to be able to create a workspace without rad init because that command is interactive and cannot be used in an unattended script.

Describe the solution you'd like

The current workspace create doc page has this example, which will successfully create a Radius workspace based on the current Kubernetes context. (This example uses a local k3d cluster, but the same applies for other cluster types.)

$ rad workspace create kubernetes
Creating workspace...
Set "k3d-k3s-default" as current workspace

Trying to run rad deploy after that, the user is prompted for a group.

$ rad deploy app.bicep
No resource group set, use `--group` to pass in a resource group name.

Creating the group, and trying to deploy still doesn't work.

$ rad group create k3d-k3s-default
creating resource group "k3d-k3s-default" in workspace "k3d-k3s-default"...

resource group "k3d-k3s-default" created

$ rad deploy app.bicep
No resource group set, use `--group` to pass in a resource group name.

The user has to switch to the group just created. But after switching to the group, the user still encounters an error:

$ rad group switch k3d-k3s-default
Switched to resource group "k3d-k3s-default"

$ rad deploy app.bicep
Error: no environment name provided and no default environment set, either pass in an environment name or set a default environment by using `rad env switch`

TraceId:  8da2af102119c4e625d7c3a1aac44e39

The user has to create an environment. However, the docs are not specific on which parameters to provide to create a working environment. Another rad deploy and the user is prompted to switch to the environment just created.

$ rad env create k3d-k3s-default
Creating Environment...
Successfully created environment "k3d-k3s-default" in resource group "k3d-k3s-default"

$ rad deploy app.bicep
Error: no environment name provided and no default environment set, either pass in an environment name or set a default environment by using `rad env switch`

TraceId:  413876e47ce68140f52615a628d86f4f

The rad deploy command now succeeds after switching to the environment just created.

$ rad env switch k3d-k3s-default
Switching default environment to k3d-k3s-default

$ rad deploy app.bicep
Building app.bicep...
...

There does not appear to be any documentation that puts all of this together. Also, the CLI topics in this scenario have parameters that are not described in terms of why a user would need to use them. For example, the docs for rad env create show that there is a parameter named --namespace, but do not describe why a user would need to set that parameter.

Where should the new material be placed?

I think the documentation for the CLI commands workspace, group, and env could be enhanced to give an end-to-end scenario for how to create a usable workspace. Or, there could be a topic on how to replicate via command line the setup that is done by the rad init command.

AB#13124

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