Start KVLite
Perform the following steps to start a KVLite instance:
You could start KVLite in secure mode (the default option) or non-secure mode. If the KVLite is started in a secure mode, you should also configure a secure proxy and start it. Similarly if the KVLite is started in a non-secure mode, a non-secure proxy needs to be configured and started.
Table - Environment variables
Name of the variable | Description | Sample values |
---|---|---|
KV_HOST |
Identifies a host name associated with the node on which the script to configure kvlite is run. | localhost or the name of the machine |
KV_PROXY_PORT |
The TCP/IP port on which proxy should be contacted. |
Non-Secure proxy: Use 80 if root privilege is there, else 8080 Secure proxy: Use 443 if root privilege is there, else 8443 |
KV_HARANGE |
A range of free ports that the Replication Nodes and Admins use to communicate among themselves. These ports should be sequential. | 5010-5020 |
KV_SERVICERANGE |
A range of ports that may be used for communication among administrative services running on a Storage Node and its managed services. | 5021-5049 |
KV_PORT |
The TCP/IP port on which Oracle NoSQL Database should be contacted. Sometimes referred to as the registry port. | 5000 |
KV_ADMIN_PORT |
The TCP/IP port on which the admin service should be started. | 5999 |
Start KVLite in secure mode:
- Download and extract the zipped file (start_securekvlite.zip) into the directory where you extracted kvlite. This zipped file contains the scripts needed for starting KVLite in secure mode.
- Invoke the script (
start_kvlite.sh
) to start KVLite in secure mode.
You get an output as shown below:$/bin/bash start_kvlite.sh
Waiting for kvstore to start... Waiting for kvstore to start... Generated password for user admin:********* User login file: kvroot/security/user.security Created new kvlite store with args: -root kvroot -store kvstore -host localhost -port 5000 -admin-web-port 5999 -secure-config enable
- Configure proxy for the secure kvlite: You need to do the following to configure a secure proxy:
- Create a user (
proxy_user
) as the proxy needs an identity to connect to the secure data store. -
Create a new password file to store the credentials needed to login as the proxy user.
- Create a login file
proxy.login
for the proxy user. - Create self-signed certificates that can be used to securely connect to the Oracle NoSQL Database Proxy.
setup-http-proxy-sec.sh
) to configure proxy in secure mode.
You get an output as shown below:$ /bin/bash setup-http-proxy-sec.sh
Creating password Creating USER proxy_user Oct 01, 2024 6:48:23 AM org.jline.utils.Log logr WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information) sql-> Statement completed successfully sql-> Creating proxy secfiles Created Secret created Creating certificate Generating a RSA private key ..........................................................................................................................................................................................++++ ............................................++++ writing new private key to 'kvroot/proxy/key.pem' ----- Certificate was added to keystore
- Create a user (
- Use the script (
start_proxy.sh
) to start the proxy for a secure data store:
You get an output as shown below:/bin/bash start_proxy.sh
Starting Proxy Proxy creating SSL channel Proxy started: async=false helperHosts=localhost:5000 httpPort=0 httpsPort=8443 idleReadTimeout=0 kvConsistency=NONE_REQUIRED kvDurability=COMMIT_NO_SYNC kvRequestTimeout=-1 monitorStatsEnabled=false numAcceptThreads=3 numRequestThreads=32 proxyType=KVPROXY sslCertificate=kvroot/proxy/certificate.pem sslPrivateKey=kvroot/proxy/key-pkcs8.pem sslPrivateKeyPass=iTO6aUCnh9XdsgkxFig= sslProtocols=TLSv1.2,TLSv1.1,TLSv1 storeName=kvstore storeSecurityFile=kvroot/proxy/proxy.login verbose=true proxyVersion=null kvclientVersion=24.1.11
Start KVLite in non-secure mode:
- Download and extract the zipped file (start_nonsecurekvlite.zip) into the directory where you extracted kvlite. This zipped file contains the scripts needed for starting KVLite in non-secure mode.
- Invoke the script (
start_nonsecure_kvlite.sh
) to start KVLite in non-secure mode.
You get an output as shown below:$/bin/bash start_nonsecure_kvlite.sh
Created new kvlite store with args: -root kvroot -store kvstore -host localhost -port 5000 -admin-web-port 5999 - secure-config disable
- Use the script (
start_nonsecure_proxy.sh
) to start the proxy for a non-secure data store:
You get an output as shown below:$/bin/bash start_nonsecure_proxy.sh
Starting Proxy Proxy started: async=false helperHosts=localhost:5000 httpPort=8080 httpsPort=0 idleReadTimeout=0 kvConsistency=NONE_REQUIRED kvDurability=COMMIT_NO_SYNC kvRequestTimeout=-1 monitorStatsEnabled=false numAcceptThreads=3 numRequestThreads=32 proxyType=KVPROXY sslProtocols=TLSv1.2,TLSv1.1,TLSv1 storeName=kvstore verbose=true proxyVersion=null kvclientVersion=24.1.11
For a complete list of command line options that can be provided with the kvlite utility, see kvlite.