This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"_id": "5eccff8f32b4791adbd70309", | |
"index": 0, | |
"guid": "6f170ad4-7cfa-4fe4-8f76-6c14488ce670", | |
"isActive": true, | |
"balance": "$3,781.81", | |
"picture": "http://placehold.it/32x32", | |
"age": 39, | |
"eyeColor": "blue", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prop_replace () { | |
target_file=${3} | |
echo 'replacing target file ' ${target_file} | |
sed -i -e "s|^$1=.*$|$1=$2|" ${target_file} | |
} | |
# Install the jq tool. This tool is needed to query values from the config.json | |
# file created by the tls-toolkit running in the client mode | |
apt-get update && apt-get install jq -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i -e 's|<property name="Authorizations File">./conf/authorizations.xml</property>|<property name="Authorizations File">./auth-conf/authorizations.xml</property>|' $${NIFI_AUTHZ_FILE} | |
sed -i -e 's|<property name="Users File">./conf/users.xml</property>|<property name="Users File">./auth-conf/users.xml</property>|' $${NIFI_AUTHZ_FILE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const https = require('https'); | |
const http = require('http'); | |
const fs = require('fs'); | |
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0; | |
const allowedHosts = []; | |
function onHTTPRequest(req, res) { | |
const { headers, url } = req; | |
const { host } = headers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run the tls-toolkit in client mode to generate the truststore and keystore | |
/opt/nifi/nifi-toolkit-current/bin/tls-toolkit.sh client -c nifi-ca-cs -t <token> --dn "CN=$(hostname -f), OU=NIFI" | |
# Use jq to extract the passwords form the config.json generated by the tls-toolkit | |
KEY_STORE_PASSWD=`jq -r '.keyStorePassword' ./config.json` | |
KEY_PASSWD=`jq -r '.keyPassword' ./config.json` | |
TRUST_STORE_PASSWD=`jq -r '.trustStorePassword' ./config.json` | |
mv ./keystore.jks conf/ | |
mv ./truststore.jks conf/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: ReplicaSet | |
metadata: | |
name: nifi-ca | |
namespace: nifi | |
labels: | |
app: nifi-ca | |
spec: | |
# modify replicas according to your case | |
replicas: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function observable(observer) { | |
for(var i = 0; i <= 10; i++) { | |
observer.next(i) | |
} | |
observer.error() | |
observer.complete() | |
} | |
const observer = { | |
next(value) { console.log(`next -> ${value}`) }, |
NewerOlder