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

The README example about certificates doesn't work any more #5182

Closed
knz opened this issue Mar 11, 2016 · 7 comments
Closed

The README example about certificates doesn't work any more #5182

knz opened this issue Mar 11, 2016 · 7 comments
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. docs-done E-easy Easy issue to tackle, requires little or no CockroachDB experience
Milestone

Comments

@knz
Copy link
Contributor

knz commented Mar 11, 2016

The commands to initialize certificates listed in https://github.com/cockroachdb/cockroach#running-a-multi-node-cluster do not work any more:

$ ./cockroach cert create-ca
...
Error: missing or invalid parameters
$ ./cockroach cert create-node ...
...
Error: missing or invalid parameters
$ ./cockroach cert create-client root
...
Error: missing or invalid parameters
@knz knz added E-easy Easy issue to tackle, requires little or no CockroachDB experience docs-todo labels Mar 11, 2016
@knz knz added this to the Beta milestone Mar 11, 2016
@knz knz added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Mar 11, 2016
@mberhault mberhault self-assigned this Mar 12, 2016
@developerworks
Copy link

CA create command in the docs show errors like this:

Error: missing or invalid parameters
Failed running "cert"

I create certificates and keys following command help, it's correct ?

mkdir cert
./cockroach cert create-ca --ca-cert=./cert/ca.cert --ca-key=./cert/ca.key
./cockroach cert create-node --ca-cert=./cert/ca.cert --ca-key=./cert/ca.key --cert=./cert/node.server.crt --key=./cert/node.server.key localhost
./cockroach cert create-client --ca-cert=./cert/ca.cert --ca-key=./cert/ca.key --cert=./cert/node.client.crt --key=./cert/node.client.key root

@mberhault
Copy link
Contributor

These just changed a day ago, I just need to clarify the README and update the docs (and a few error messages here and there).

You almost had it to create certs. Specifically, the create-client probably shouldn't use node in the filename since the cert being generated is for root. But since you're providing the filenames at every step, you can name them anything you like.

So here's an example of how to create CA/node/user certs and use them:

$ ./cockroach cert create-ca --ca-cert=ca.cert --ca-key=ca.key
$ ./cockroach cert create-node --ca-cert=ca.cert --ca-key=ca.key --cert=node.crt --key=node.key localhost
$ ./cockroach cert create-client --ca-cert=ca.crt --ca-key=ca.key --cert=root.crt --key=root.key
# Start the server
$ ./cockroach start <standard options> --ca-cert=ca.crt --cert=node.crt --key=node.key
# Talk to the server as root
$ ./cockroach sql <standard options> --user=root --cert=root.crt --key=root.key

@mberhault
Copy link
Contributor

@jseldess: should we drop that section of the README and instead point to the actual docs?

@jseldess
Copy link
Contributor

@mberhault, I have an issue to refresh the entire readme, but I'm not going to get to that in the next few days. Above, and in another ticket, you mention refreshing the readme. Are you doing that now? If not, I'm happy to.

@petermattis
Copy link
Collaborator

@mberhault, @jseldess I think we should massively trim down the README and use it for a brief overview of cockroach and point to the docs regarding installation and basic usage. Let's touch base about this next week.

@mberhault
Copy link
Contributor

I concur. The issue I mentioned the README in was to fix up the certs-related deployment.
Since we have detailed instructions in the docs for those, the README should just point to that part.
eg: I would imagine some README sections to just links to install cockroach, deploy cockroach, etc..

@jseldess
Copy link
Contributor

Readme has been cleaned up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. docs-done E-easy Easy issue to tackle, requires little or no CockroachDB experience
Projects
None yet
Development

No branches or pull requests

5 participants