Rename certgen
This commit renames certgen to elasticsearch-certgen.
This commit is contained in:
parent
0d8aa7527e
commit
a6b4682711
|
@ -4,17 +4,17 @@
|
||||||
|
|
||||||
deprecated[6.1,Replaced by <<certutil,`certutil`>>.]
|
deprecated[6.1,Replaced by <<certutil,`certutil`>>.]
|
||||||
|
|
||||||
The `certgen` command simplifies the creation of certificate authorities (CA),
|
The `elasticsearch-certgen` command simplifies the creation of certificate
|
||||||
certificate signing requests (CSR), and signed certificates for use with the
|
authorities (CA), certificate signing requests (CSR), and signed certificates
|
||||||
Elastic Stack. Though this command is deprecated, you do not need to replace CA,
|
for use with the Elastic Stack. Though this command is deprecated, you do not
|
||||||
CSR, or certificates that it created.
|
need to replace CAs, CSRs, or certificates that it created.
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
=== Synopsis
|
=== Synopsis
|
||||||
|
|
||||||
[source,shell]
|
[source,shell]
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
bin/x-pack/certgen
|
bin/elasticsearch-certgen
|
||||||
(([--cert <cert_file>] [--days <n>] [--dn <name>] [--key <key_file>]
|
(([--cert <cert_file>] [--days <n>] [--dn <name>] [--key <key_file>]
|
||||||
[--keysize <bits>] [--pass <password>] [--p12 <password>])
|
[--keysize <bits>] [--pass <password>] [--p12 <password>])
|
||||||
| [--csr])
|
| [--csr])
|
||||||
|
@ -42,8 +42,8 @@ Depending on the parameters that you specify, you are also prompted for
|
||||||
necessary information such as the path for the output file and the CA private
|
necessary information such as the path for the output file and the CA private
|
||||||
key password.
|
key password.
|
||||||
|
|
||||||
The `certgen` command also supports a silent mode of operation to enable easier
|
The `elasticsearch-certgen` command also supports a silent mode of operation to
|
||||||
batch operations. For more information, see <<certgen-silent>>.
|
enable easier batch operations. For more information, see <<certgen-silent>>.
|
||||||
|
|
||||||
The output file is a zip file that contains the signed certificates and private
|
The output file is a zip file that contains the signed certificates and private
|
||||||
keys for each instance. If you chose to generate a CA, which is the default
|
keys for each instance. If you chose to generate a CA, which is the default
|
||||||
|
@ -106,7 +106,7 @@ which can be blank. This parameter cannot be used with the `-csr` parameter.
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
[[certgen-silent]]
|
[[certgen-silent]]
|
||||||
==== Using `certgen` in Silent Mode
|
==== Using `elasticsearch-certgen` in Silent Mode
|
||||||
|
|
||||||
To use the silent mode of operation, you must create a YAML file that contains
|
To use the silent mode of operation, you must create a YAML file that contains
|
||||||
information about the instances. It must match the following format:
|
information about the instances. It must match the following format:
|
||||||
|
@ -144,13 +144,13 @@ the names of the files within the directory. This filename should not have an
|
||||||
extension. Note: If the `name` provided for the instance does not represent a
|
extension. Note: If the `name` provided for the instance does not represent a
|
||||||
valid filename, then the `filename` field must be present.
|
valid filename, then the `filename` field must be present.
|
||||||
|
|
||||||
When your YAML file is ready, you can use the `certgen` command to generate
|
When your YAML file is ready, you can use the `elasticsearch-certgen` command to
|
||||||
certificates or certificate signing requests. Simply use the `-in` parameter to
|
generate certificates or certificate signing requests. Simply use the `-in`
|
||||||
specify the location of the file. For example:
|
parameter to specify the location of the file. For example:
|
||||||
|
|
||||||
[source, sh]
|
[source, sh]
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
bin/x-pack/certgen -in instances.yml
|
bin/elasticsearch-certgen -in instances.yml
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
This command generates a CA certificate and private key as well as certificates
|
This command generates a CA certificate and private key as well as certificates
|
||||||
|
|
|
@ -70,7 +70,7 @@ services:
|
||||||
mkdir config/x-pack/certificates/certs;
|
mkdir config/x-pack/certificates/certs;
|
||||||
fi;
|
fi;
|
||||||
if [[ ! -f /local/certs/bundle.zip ]]; then
|
if [[ ! -f /local/certs/bundle.zip ]]; then
|
||||||
bin/x-pack/certgen --silent --in config/x-pack/certificates/instances.yml --out config/x-pack/certificates/certs/bundle.zip;
|
bin/elasticsearch-certgen --silent --in config/x-pack/certificates/instances.yml --out config/x-pack/certificates/certs/bundle.zip;
|
||||||
unzip config/x-pack/certificates/certs/bundle.zip -d config/x-pack/certificates/certs; <1>
|
unzip config/x-pack/certificates/certs/bundle.zip -d config/x-pack/certificates/certs; <1>
|
||||||
fi;
|
fi;
|
||||||
chgrp -R 0 config/x-pack/certificates/certs
|
chgrp -R 0 config/x-pack/certificates/certs
|
||||||
|
|
|
@ -499,8 +499,8 @@ public class CertificateGenerateTool extends EnvironmentAwareCommand {
|
||||||
|
|
||||||
private static void printIntro(Terminal terminal, boolean csr) {
|
private static void printIntro(Terminal terminal, boolean csr) {
|
||||||
terminal.println("******************************************************************************");
|
terminal.println("******************************************************************************");
|
||||||
terminal.println("Note: The 'certgen' tool has been deprecated in favour of the 'certutil' tool.");
|
terminal.println("Note: The 'elasticsearch-certgen' tool has been deprecated in favour of the");
|
||||||
terminal.println(" This command will be removed in a future release of X-Pack.");
|
terminal.println(" 'certutil' tool. This command will be removed in a future release.");
|
||||||
terminal.println("******************************************************************************");
|
terminal.println("******************************************************************************");
|
||||||
terminal.println("");
|
terminal.println("");
|
||||||
|
|
||||||
|
|
|
@ -196,9 +196,9 @@ CREATE_INSTANCES_FILE
|
||||||
sudo rm -f "$certificates"
|
sudo rm -f "$certificates"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
run sudo -E -u $MASTER_USER "$MASTER_HOME/bin/certgen" --in "$instances" --out "$certificates"
|
run sudo -E -u $MASTER_USER "$MASTER_HOME/bin/elasticsearch-certgen" --in "$instances" --out "$certificates"
|
||||||
[ "$status" -eq 0 ] || {
|
[ "$status" -eq 0 ] || {
|
||||||
echo "Expected certgen tool exit code to be zero"
|
echo "Expected elasticsearch-certgen tool exit code to be zero"
|
||||||
echo "$output"
|
echo "$output"
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,8 @@ verify_xpack_installation() {
|
||||||
# nocommit: already verified by "main" package verification
|
# nocommit: already verified by "main" package verification
|
||||||
#assert_file "$ESHOME/bin" d $user $group 755
|
#assert_file "$ESHOME/bin" d $user $group 755
|
||||||
local binaryFiles=(
|
local binaryFiles=(
|
||||||
'certgen'
|
'elasticsearch-certgen'
|
||||||
'certgen.bat'
|
'elasticsearch-certgen.bat'
|
||||||
'certutil'
|
'certutil'
|
||||||
'certutil.bat'
|
'certutil.bat'
|
||||||
'croneval'
|
'croneval'
|
||||||
|
|
Loading…
Reference in New Issue