First ensure that you use the keytool command shipped with the Java v1.8 package you downloaded to support MettleCI. On Unix you can check your shell’s default keytool using the which
command:
Code Block |
---|
which keytool |
Ensure that the response points to the keytool in the correct bin directory (e.g. in your OpenJDK installation).
Next, use the following command to create a keystore containing a basic self-signed certificate:
Code Block | ||
---|---|---|
| ||
keytool -genkey -keyalg RSA -alias workbench -keystore <path to keystore> -storepass <store password> -storetype PKCS12 -keysize 2048 -sigalg SHA256withRSA -dname "CN=<host url>" |
Please replace the <placeholders>
in this command based on the following descriptions:
Placeholder | Description | Example Value |
---|---|---|
path to key store | Full qualified path of the key store to be created |
|
store password | Password required when reading or writing to the newly created key store | Choose a random password string. Note that the key stores supplied with Java have a default password of |
host url | The domain name of the URL that will be used to access Workbench in your browser. This does not include the protocol or port numbers. For example, | your-engine.yourdomain.com |
For example, this command creates a keystore called /opt/dm/mci/workbench.p12
for use with workbench currently accessed using URL http://my-engine.datamigrators.com:8080
:
Expand | |||||||
---|---|---|---|---|---|---|---|
| |||||||
If you need to export your certificate for signing you can use a command like the following:
|
Expand | |||||
---|---|---|---|---|---|
| |||||
Ensure that your keystore has at least 644 ( |
. |
If you need to export your certificate for signing you can use a command like the following: | ||
Expand | ||
---|---|---|
| ||
| ||
Expand | ||
| ||
|
Note that the keytool will not normally return a value to the console.
Enabling HTTPS support
Once a key store containing the Workbench HTTPS has been created, update /opt/dm/mci/config.yml
and add the following section:
Code Block |
---|
server: applicationConnectors: - type: https port: 8443 keyStoreType: PKCS12 keyStorePath: <path to keystore> keyStorePassword: <store password> trustStoreType: PKCS12 trustStorePath: <path to keystore> trustStorePassword: <store password> |
The <place holders>
must match those used while creating the Java keytool and restart your Workbench service using
Code Block |
---|
sudo service dm-mettleci-workbench restart |
Verify Workbench is up and running by navigating to https://<host url>:8443
in your browser
Enabling concurrent HTTP and HTTPS support
Under some circumstances, you may wish to allow Workbench to communicate over both HTTP and HTTPS protocols. This can be achieved by adding the following section to /opt/dm/mci/config.yml
:
Code Block |
---|
server: applicationConnectors: - type: http port: 8080 - type: https port: 8443 keyStoreType: PKCS12 keyStorePath: <path to keystore> keyStorePassword: <store password> trustStoreType: PKCS12 trustStorePath: <path to keystore> trustStorePassword: <store password> |
The <place holders>
must match those used while creating the Java keytool and restart your Workbench service using
Code Block |
---|
sudo service dm-mettleci-workbench restart |
Verify Workbench is up and running by navigating to https://<host url>:8443
and http://<host url>:8080
in your browser.