cscli: add --quick flag to enroll command#4350
Conversation
|
@blotus: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.
DetailsI am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository. |
|
@blotus: There are no area labels on this PR. You can add as many areas as you see fit.
DetailsI am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository. |
|
/kind enhancement |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4350 +/- ##
==========================================
- Coverage 63.58% 63.51% -0.07%
==========================================
Files 476 476
Lines 33801 33841 +40
==========================================
+ Hits 21492 21495 +3
- Misses 10176 10209 +33
- Partials 2133 2137 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
--auto flag to enroll command--quick flag to enroll command
| return nil | ||
| if rawResp.Response.StatusCode == http.StatusOK { | ||
| if autoEnroll { | ||
| log.Warn("Instance already enrolled. Please visit https://app.crowdsec.net if you wish to move it to another account.") |
There was a problem hiding this comment.
The instance is already enrolled in an organisation; transfer it using https://app.crowdsec.net/.
| } | ||
|
|
||
| if autoEnroll { | ||
| log.Infof("Please visit the following URL to enroll your instance: %s", autoResp.Url) |
| You can get your enrollment key by creating an account on https://app.crowdsec.net. | ||
| After running this command your will need to validate the enrollment in the webapp.`, | ||
| Example: fmt.Sprintf(`cscli console enroll YOUR-ENROLL-KEY | ||
| cscli console enroll --auto |
Allow enrolling an instance in the console without providing a key.
When using the
--autoflag, an URL will be returned by CAPI the user will need to visit in their browser to automatically enroll the instance in their account.The default name of an instance is also changed to the hostname of the machine.
[Do not merge until CAPI support has been deployed]