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

rpk: add rpk generate license #24760

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

r-vasquez
Copy link
Contributor

This new command allows users to request a free trial license for 30 days using rpk

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.3.x
  • v24.2.x
  • v24.1.x

Release Notes

  • none

It uses the public API to request a free trial
license for 30 days.
@vbotbuildovich
Copy link
Collaborator

vbotbuildovich commented Jan 10, 2025

Retry command for Build#60551

please wait until all jobs are finished before running the slash command


/ci-repeat 1
tests/rptest/tests/cloud_storage_scrubber_test.py::CloudStorageScrubberTest.test_scrubber@{"cloud_storage_type":2}
tests/rptest/tests/archival_test.py::ArchivalTest.test_all_partitions_leadership_transfer@{"cloud_storage_type":1}

@vbotbuildovich
Copy link
Collaborator

CI test results

test results on build#60551
test_id test_kind job_url test_status passed
rm_stm_tests_rpunit.rm_stm_tests_rpunit unit https://buildkite.com/redpanda/redpanda/builds/60551#01944d66-9cd0-4a0a-a551-41431e14675c FLAKY 1/2
rm_stm_tests_rpunit.rm_stm_tests_rpunit unit https://buildkite.com/redpanda/redpanda/builds/60551#01944d66-9cd2-4644-a866-c85f59867b7c FLAKY 1/2
rptest.tests.archival_test.ArchivalTest.test_all_partitions_leadership_transfer.cloud_storage_type=CloudStorageType.S3 ducktape https://buildkite.com/redpanda/redpanda/builds/60551#01944dc3-824c-43f1-9511-b14b18f9703b FAIL 0/1
rptest.tests.cloud_storage_scrubber_test.CloudStorageScrubberTest.test_scrubber.cloud_storage_type=CloudStorageType.ABS ducktape https://buildkite.com/redpanda/redpanda/builds/60551#01944dc1-e34e-4824-ba83-f8db8c769b2b FAIL 0/1

If you require a permanent license, contact us: https://www.redpanda.com/contact

The license will be saved in your working directory or the specified path, based
on the --path value.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
on the --path value.
on the --path flag.

err = rpkos.ReplaceFile(fs, savePath, []byte(signup.Msg.GetLicense().LicenseKey), 0o644)
if err != nil {
fmt.Printf(`
Successfully generated a license but we were unable to save it to a file: %v
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the user have access to this value somewhere?
If not, we should inform them somehow. Github for example has this message when you're creating a token "Make sure to copy your personal access token now. You won’t be able to see it again!"

we could add something to that extend, if that's true.

Short: "Generate a trial license",
Long: `Generate a trial license

This command allows you to sign up for a 30 day trial of Redpanda Enterprise.

Choose a reason for hiding this comment

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

Suggested change
This command allows you to sign up for a 30 day trial of Redpanda Enterprise.
This command allows you to sign up for a 30-day trial of Redpanda Enterprise.

},
}
cmd.Flags().StringVar(&path, "path", "", "File path for generating the license")
cmd.Flags().BoolVar(&noConfirm, "no-confirm", false, "Avoid confirmation prompt for overwriting the generated license file")
Copy link

@kbatuigas kbatuigas Jan 10, 2025

Choose a reason for hiding this comment

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

Suggested change
cmd.Flags().BoolVar(&noConfirm, "no-confirm", false, "Avoid confirmation prompt for overwriting the generated license file")
cmd.Flags().BoolVar(&noConfirm, "no-confirm", false, "Do not show confirmation prompt for overwriting the generated license file")

For clarity - please check that the rephrase is correct.

cmd.Flags().StringVar(&path, "path", "", "File path for generating the license")
cmd.Flags().BoolVar(&noConfirm, "no-confirm", false, "Avoid confirmation prompt for overwriting the generated license file")
// License request info.
cmd.Flags().StringVar(&lr.name, "name", "", "First name to register the trial license")
Copy link

@kbatuigas kbatuigas Jan 10, 2025

Choose a reason for hiding this comment

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

Suggested change
cmd.Flags().StringVar(&lr.name, "name", "", "First name to register the trial license")
cmd.Flags().StringVar(&lr.name, "name", "", "First name for trial license registration")

For clarity

cmd.Flags().BoolVar(&noConfirm, "no-confirm", false, "Avoid confirmation prompt for overwriting the generated license file")
// License request info.
cmd.Flags().StringVar(&lr.name, "name", "", "First name to register the trial license")
cmd.Flags().StringVar(&lr.lastname, "last-name", "", "Last name to register the trial license")

Choose a reason for hiding this comment

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

Suggested change
cmd.Flags().StringVar(&lr.lastname, "last-name", "", "Last name to register the trial license")
cmd.Flags().StringVar(&lr.lastname, "last-name", "", "Last name for register trial license registration")

// License request info.
cmd.Flags().StringVar(&lr.name, "name", "", "First name to register the trial license")
cmd.Flags().StringVar(&lr.lastname, "last-name", "", "Last name to register the trial license")
cmd.Flags().StringVar(&lr.company, "company", "", "Company name to register the trial license")

Choose a reason for hiding this comment

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

Suggested change
cmd.Flags().StringVar(&lr.company, "company", "", "Company name to register the trial license")
cmd.Flags().StringVar(&lr.company, "company", "", "Company name for trial license registration")

cmd.Flags().StringVar(&lr.name, "name", "", "First name to register the trial license")
cmd.Flags().StringVar(&lr.lastname, "last-name", "", "Last name to register the trial license")
cmd.Flags().StringVar(&lr.company, "company", "", "Company name to register the trial license")
cmd.Flags().StringVar(&lr.email, "email", "", "Company email to register the trial license")

Choose a reason for hiding this comment

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

Suggested change
cmd.Flags().StringVar(&lr.email, "email", "", "Company email to register the trial license")
cmd.Flags().StringVar(&lr.email, "email", "", "Company email for trial license registration")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants