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

Installing the Dapr Helm Chart via the CLI #8033

Merged

Conversation

superbeeny
Copy link
Contributor

Description

Installing the Dapr Helm Chart via the CLI

Type of change

  • This pull request adds a feature to install Dapr to its own namespace by using the rad cli.

Fixes: #8032

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, if new APIs are being introduced.
  • If applicable, design document has been reviewed and approved by Radius maintainers/approvers.
  • [ N/R ] A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
  • [ N/R ] A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
  • [ N/R ] A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.

@superbeeny superbeeny requested review from a team as code owners November 5, 2024 17:50
bicep-types Outdated Show resolved Hide resolved
@@ -39,11 +39,11 @@ func (r *Runner) enterClusterOptions(options *initOptions) error {
if err != nil {
return clierrors.MessageWithCause(err, "Unable to verify Radius installation.")
}
options.Cluster.Install = !state.Installed
options.Cluster.Install = !state.RadiusInstalled || !state.DaprInstalled
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a test for this new case?

pkg/cli/helm/cluster.go Show resolved Hide resolved
// CheckRadiusInstall checks if the Radius release is installed in the given kubeContext and returns an InstallState object
// with the version of the release if installed, or an error if an error occurs while checking.
func CheckRadiusInstall(kubeContext string) (InstallState, error) {
// QueryRelease checks to see if a release is deployed to a namespace for a given kubecontext.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
// QueryRelease checks to see if a release is deployed to a namespace for a given kubecontext.
// queryRelease checks to see if a release is deployed to a namespace for a given kubecontext.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the 3 outputs of this function? Can we add a doc for that too?

// CheckRadiusInstall checks if the Radius release is installed in the given kubeContext and returns an InstallState object
// with the version of the release if installed, or an error if an error occurs while checking.
func CheckRadiusInstall(kubeContext string) (InstallState, error) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra line can be removed

pkg/cli/helm/cluster.go Outdated Show resolved Hide resolved
@superbeeny superbeeny force-pushed the features/superbeeny/dapr-install branch from a3bbec4 to 2e640bb Compare November 7, 2024 20:51
@superbeeny
Copy link
Contributor Author

After some discussion with @rynowak and a review of the current codebase where contour is uninstalled we agreed to be consistent and uninstall dapr

@rynowak
Copy link
Contributor

rynowak commented Nov 7, 2024

After some discussion with @rynowak and a review of the current codebase where contour is uninstalled we agreed to be consistent and uninstall dapr

Yes 👍. I was under the impression that we left Contour alone during uninstall. It turns out we remove it.

@superbeeny and I made the executive decision to be consistent with our existing behavior in the absence of user feedback. Both options (leave-installed, uninstall) have downsides. If we get feedback we'll change this.

I'll remind everyone that rad uninstall is provided for convenience, and so we're optimizing for convenience. We expect users to use the Helm charts directly in more serious scenarios.

rynowak
rynowak previously approved these changes Nov 10, 2024
Copy link
Contributor

@rynowak rynowak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me 👍 We should merge this now that we've branched for 0.39. We will be layering other changes on top for 0.40.

@rynowak rynowak temporarily deployed to functional-tests November 10, 2024 21:43 — with GitHub Actions Inactive
@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 10, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository superbeeny/radius
Commit ref 9b6aaa2
Unique ID func8e15f50698
Image tag pr-func8e15f50698
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func8e15f50698
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func8e15f50698
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func8e15f50698
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func8e15f50698
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func8e15f50698
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
❌ Failed to install Radius for corerp-cloud functional test. Please check the logs for more details
❌ corerp-cloud functional test failed. Please check the logs for more details
❌ ucp-cloud functional test cancelled. Please check the logs for more details

@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 15, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository superbeeny/radius
Commit ref 9ec2ba0
Unique ID funcd9a78759d6
Image tag pr-funcd9a78759d6
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-funcd9a78759d6
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-funcd9a78759d6
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funcd9a78759d6
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funcd9a78759d6
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funcd9a78759d6
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
❌ Failed to install Radius for corerp-cloud functional test. Please check the logs for more details
❌ corerp-cloud functional test failed. Please check the logs for more details
❌ ucp-cloud functional test cancelled. Please check the logs for more details

@ytimocin
Copy link
Contributor

These workflows may need to be tested/updated since Dapr is installed via Helm in those.

I see some functional tests of this PR fail at the Install Radius step: https://github.com/radius-project/radius/actions/runs/11865183744/job/33070281563?pr=8033.

Signed-off-by: Nick Beenham <Nicholas_Beenham@cable.comcast.com>
Signed-off-by: Nick Beenham <Nicholas_Beenham@cable.comcast.com>
Signed-off-by: Nick Beenham <Nicholas_Beenham@cable.comcast.com>
Signed-off-by: Nick Beenham <Nicholas_Beenham@cable.comcast.com>
Signed-off-by: Nick Beenham <Nicholas_Beenham@cable.comcast.com>
@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 18, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository superbeeny/radius
Commit ref 2a1affb
Unique ID func86a0238e2b
Image tag pr-func86a0238e2b
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func86a0238e2b
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func86a0238e2b
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func86a0238e2b
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func86a0238e2b
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func86a0238e2b
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
❌ Failed to install Radius for corerp-cloud functional test. Please check the logs for more details
❌ corerp-cloud functional test failed. Please check the logs for more details
❌ ucp-cloud functional test cancelled. Please check the logs for more details

Signed-off-by: Nick Beenham <Nicholas_Beenham@cable.comcast.com>
@superbeeny
Copy link
Contributor Author

workflows

My first guess is that we're not detecting that dapr is already installed, should be easy enough to replicate ... thanks!!

@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 18, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository superbeeny/radius
Commit ref ebdce15
Unique ID func73d63c4ef9
Image tag pr-func73d63c4ef9
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func73d63c4ef9
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func73d63c4ef9
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func73d63c4ef9
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func73d63c4ef9
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func73d63c4ef9
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
❌ Failed to install Radius for ucp-cloud functional test. Please check the logs for more details
❌ ucp-cloud functional test failed. Please check the logs for more details
❌ corerp-cloud functional test cancelled. Please check the logs for more details

Signed-off-by: Nick Beenham <Nicholas_Beenham@cable.comcast.com>
@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 20, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository superbeeny/radius
Commit ref 52d0fd5
Unique ID funcc2cdefd152
Image tag pr-funcc2cdefd152
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-funcc2cdefd152
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-funcc2cdefd152
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funcc2cdefd152
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funcc2cdefd152
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funcc2cdefd152
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
❌ Failed to install Radius for corerp-cloud functional test. Please check the logs for more details
❌ corerp-cloud functional test failed. Please check the logs for more details
❌ ucp-cloud functional test cancelled. Please check the logs for more details

# - name: Install dapr into cluster
# run: |
# wget -q https://raw.githubusercontent.com/dapr/cli/master/install/install.sh -O - | /bin/bash -s ${{ env.DAPR_VER }}
# dapr init -k --wait --timeout 600 --runtime-version ${{ env.DAPR_VER }} --dashboard-version ${{ env.DAPR_DASHBOARD_VER }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @superbeeny - I have a question about removing this.

Does rad install kubernetes install fail when Dapr is already installed? I think we should make sure that case succeeds.

I'm trying to assess whether this is being removed because it's unnecessary, or whether it's being removed because it's broken.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I'd prefer this be deleted rather than commented out. As well as the env-vars if they are unused. We have source control to see the history 👍

We can resolve that after the question above ^^^.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rad init will not fail for an existing dapr install

if err != nil {
return false, err
}

err = ApplyContourHelmChart(options.Contour, kubeContext)
// Install Dapr
daprFound, err := ApplyHelmChart(clusterOptions.Dapr, kubeContext)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per this question, we might need an "if !(Dapr is installed)" here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@rynowak rynowak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more question here: https://github.com/radius-project/radius/pull/8033/files#r1851230293

I think this is almost ready to go.

superbeeny and others added 2 commits November 21, 2024 09:31
…bbreviations (radius-project#8073)

# Description

Updated cmd line functions to use `environment` in place of `env` and
`initialize` in place of `init`. Both abbreviations are now aliased so
this is a non breaking change.

## Type of change

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).

Fixes: radius-project#8043 

Signed-off-by: Nick Beenham <Nicholas_Beenham@cable.comcast.com>
Signed-off-by: Nick Beenham <Nicholas_Beenham@cable.comcast.com>
Copy link
Contributor

@rynowak rynowak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: - this is awesome! thanks @superbeeny

@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 21, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository superbeeny/radius
Commit ref 7415793
Unique ID func98ed316fec
Image tag pr-func98ed316fec
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func98ed316fec
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func98ed316fec
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func98ed316fec
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func98ed316fec
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func98ed316fec
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@rynowak rynowak merged commit 9650406 into radius-project:main Nov 21, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installing the Dapr Helm Chart via the CLI
3 participants