Skip to content

Commit 80536dd

Browse files
committed
2 parents 29cda71 + 148cae8 commit 80536dd

File tree

11 files changed

+30
-14
lines changed

11 files changed

+30
-14
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[submodule "working_with_cogstack"]
2-
path = services/jupyter-hub/notebooks/working_with_cogstack
2+
path = services/jupyter-hub/notebooks/demo_working_with_cogstack
33
url = https://github.com/CogStack/working_with_cogstack.git
44
branch = main
55

nifi/conf/nifi.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ nifi.web.max.header.size=32 KB
168168
# IMPORTANT : be careful with this setting, it is buggy and single '/' don't work
169169
# After testing it seems that when running nifi in Docker you should set it via the NIFI_WEB_PROXY_CONTEXT_PATH ENV var, otherwise it wont work (needs a bug report)
170170
nifi.web.proxy.context.path="/,/nifi,/nifi-api,/nifi-api/,/nifi/"
171-
#nifi.web.proxy.host="0.0.0.0:8443,cogstack:8443,nifi:8443"
171+
nifi.web.proxy.host="0.0.0.0:8443,cogstack:8443,nifi:8443"
172172
nifi.web.max.content.size=
173173
nifi.web.max.requests.per.second=30000
174174
nifi.web.max.access.token.requests.per.second=25

scripts/installation_utils/install_docker_and_utils.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,10 @@ fi;
9292
echo "Installing require python packages.."
9393

9494
sudo -H pip3 install --upgrade pip
95-
sudo -H pip3 install wheel docker-compose
96-
sudo -H pip3 install html2text jsoncsv detect
95+
sudo -H pip3 install html2text jsoncsv detect --break-system-packages
9796

9897
echo "Finished installing docker and utils.."
9998

100-
10199
sudo sysctl -w vm.max_map_count=262144
102100

103101
sudo sh -c "echo 'vm.max_map_count=262144' >> /etc/sysctl.conf"

security/certificates_general.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
ROOT_CERTIFICATE_NAME=root-ca
44
ROOT_CERTIFICATE_KEY_PASSWORD=cogstackNifi
55
ROOT_CERTIFICATE_SUBJ_LINE="/C=UK/ST=UK/L=UK/O=cogstack/OU=cogstack/CN=cogstack"
6+
ROOT_CERTIFICATE_SUBJ_ALT_NAMES="subjectAltName=DNS:cogstack-net.test"
67
ROOT_CERTIFICATE_ALIAS_NAME=root-ca
78
ROOT_CERTIFICATE_TIME_VAILIDITY_IN_DAYS=730
89
ROOT_CERTIFICATE_KEY_SIZE=4096

security/certificates_nifi.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
NIFI_TOOLKIT_VERSION="1.24.0"
33
NIFI_CERTIFICATE_TIME_VAILIDITY_IN_DAYS=730
44
NIFI_SUBJ_LINE_CERTIFICATE_CN="CN=cogstack,OU=NIFI,C=UK,ST=UK,L=UK,O=cogstack"
5-
NIFI_KEY_PASSWORD=cogstackNifi
5+
NIFI_KEY_PASSWORD=cogstackNifi
6+
NIFI_SUBJ_ALT_NAMES="test[1-6].cogstack.net"

security/create_root_ca_cert.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ else
2828
ROOT_CERTIFICATE_SUBJ_LINE=${ROOT_CERTIFICATE_SUBJ_LINE}
2929
fi
3030

31+
if [[ -z "${ROOT_CERTIFICATE_SUBJ_ALT_NAMES}" ]]; then
32+
ROOT_CERTIFICATE_SUBJ_ALT_NAMES="subjectAltName=DNS:cogstack-net.test"
33+
echo "ROOT_CERTIFICATE_SUBJ_ALT_NAMES not set, defaulting to ROOT_CERTIFICATE_SUBJ_ALT_NAMES=subjectAltName=DNS:cogstack-net.test"
34+
else
35+
ROOT_CERTIFICATE_SUBJ_ALT_NAMES=${ROOT_CERTIFICATE_SUBJ_ALT_NAMES}
36+
fi
37+
3138
if [[ -z "${ROOT_CERTIFICATE_ALIAS_NAME}" ]]; then
3239
ROOT_CERTIFICATE_ALIAS_NAME=$ROOT_CERTIFICATE_NAME
3340
echo "ROOT_CERTIFICATE_ALIAS_NAME not set, defaulting to ROOT_CERTIFICATE_ALIAS_NAME=$ROOT_CERTIFICATE_NAME"
@@ -56,7 +63,7 @@ echo "Generating root CA key"
5663
openssl genrsa -out $CA_ROOT_KEY $ROOT_CERTIFICATE_KEY_SIZE
5764

5865
echo "Generating root CA cert"
59-
openssl req -x509 -new -key $CA_ROOT_KEY -sha256 -out $CA_ROOT_CERT -days $ROOT_CERTIFICATE_TIME_VAILIDITY_IN_DAYS -subj $ROOT_CERTIFICATE_SUBJ_LINE
66+
openssl req -x509 -new -key $CA_ROOT_KEY -sha256 -out $CA_ROOT_CERT -days $ROOT_CERTIFICATE_TIME_VAILIDITY_IN_DAYS -subj $ROOT_CERTIFICATE_SUBJ_LINE -addext $ROOT_CERTIFICATE_SUBJ_ALT_NAMES
6067

6168
# create p12 version manually
6269
echo "Generation pkcs12 keystore"

security/nifi_toolkit_security.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ else
5252
fi
5353

5454

55+
if [[ -z "${NIFI_SUBJ_ALT_NAMES}" ]]; then
56+
NIFI_SUBJ_ALT_NAMES="test[1-6].cogstack.net"
57+
echo "NIFI_SUBJ_ALT_NAMES not set, defaulting to NIFI_SUBJ_ALT_NAMES=test[1-6].cogstack.net"
58+
else
59+
NIFI_SUBJ_ALT_NAMES=${NIFI_SUBJ_ALT_NAMES}
60+
fi
61+
62+
5563
# IMPRTANT: this is used in StandardSSLContextService controllers on the NiFi side, trusted keystore password field.
5664
if [[ -z "${NIFI_KEY_PASSWORD}" ]]; then
5765
NIFI_KEY_PASSWORD="cogstackNifi"
@@ -72,7 +80,7 @@ export JAVA_OPTS="-Xmx2048m -Xms2048m"
7280

7381
for win_os in ${windows_unames[@]}; do
7482
if [[ $win_os == *"$os_name"* ]]; then
75-
./nifi_toolkit/bin/tls-toolkit.bat standalone -k $KEY_SIZE -n $HOSTNAMES -o $OUTPUT_DIRECTORY -O -f $PATH_TO_NIFI_PROPERTIES_FILE -d $NIFI_CERTIFICATE_TIME_VAILIDITY_IN_DAYS -C $NIFI_SUBJ_LINE_CERTIFICATE_CN -K $NIFI_KEY_PASSWORD
83+
./nifi_toolkit/bin/tls-toolkit.bat standalone -k $KEY_SIZE -n $HOSTNAMES -o $OUTPUT_DIRECTORY -O -f $PATH_TO_NIFI_PROPERTIES_FILE -d $NIFI_CERTIFICATE_TIME_VAILIDITY_IN_DAYS -C $NIFI_SUBJ_LINE_CERTIFICATE_CN -K $NIFI_KEY_PASSWORD --subjectAlternativeNames $NIFI_SUBJ_ALT_NAMES
7684
is_os_windows=1
7785
fi
7886
done

services/jupyter-hub/Dockerfile_singleuser

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,10 @@ RUN pip3 install --no-cache-dir docker dockerspawner jupyterhub-firstuseauthenti
146146
RUN pip3 install --no-cache-dir jupyterhub-nanowireauthenticator jupyterhub-ldapauthenticator jupyterhub-kubespawner jupyterhub-nativeauthenticator
147147

148148
# extra packages for DB connections & utilities (charts, data formats, and other useful tools such as neo4j)
149-
RUN pip3 install --no-cache-dir pytesseract ipyparallel py7zr cython isort html2text jsoncsv simplejson detect wheel nltk keras bokeh seaborn matplotlib graphviz plotly tqdm
149+
RUN pip3 install --no-cache-dir pytesseract ipyparallel py7zr cython isort html2text jsoncsv simplejson detect wheel nltk keras bokeh seaborn matplotlib graphviz plotly tqdm
150150
RUN pip3 install --no-cache-dir pymssql mysql-connector-python cx-Oracle dataclasses numpy matplotlib pandas dill jsonpickle jsonext psycopg2 psycopg2-binary pyodbc openpyxl
151151
RUN pip3 install --no-cache-dir dvc flask GitPython elasticsearch opensearch-py neo4j eland --ignore-installed PyYAML
152+
RUN pip3 install --no-cache-dir opencv-python torchvision
152153

153154
# XNAT
154155
RUN pip3 install --no-cache-dir xnat
@@ -161,7 +162,7 @@ RUN pip3 install --no-cache-dir -U spacy click torch thinc
161162
#RUN for spacy_model in ${SPACY_MODELS}; do python3 -m spacy download $spacy_model; done
162163

163164
# install requirements for working with cogstack scripts
164-
# RUN pip3 isntall --no-cache-dir -r notebooks/working_with_cogstack/requirements.txt
165+
# RUN pip3 isntall --no-cache-dir -r notebooks/demo_working_with_cogstack/requirements.txt
165166

166167
RUN pip3 install --no-cache-dir medcat==1.12.0 eland plotly
167168

services/jupyter-hub/Dockerfile_singleuser_gpu

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,10 @@ RUN pip3 install --no-cache-dir docker dockerspawner jupyterhub-firstuseauthenti
166166
RUN pip3 install --no-cache-dir jupyterhub-nanowireauthenticator jupyterhub-ldapauthenticator jupyterhub-kubespawner jupyterhub-nativeauthenticator
167167

168168
# extra packages for DB connections & utilities (charts, data formats, and other useful tools such as neo4j)
169-
RUN pip3 install --no-cache-dir pytesseract ipyparallel py7zr cython isort html2text jsoncsv simplejson detect wheel nltk keras bokeh seaborn matplotlib graphviz plotly tqdm
169+
RUN pip3 install --no-cache-dir pytesseract ipyparallel py7zr cython isort html2text jsoncsv simplejson detect wheel nltk keras bokeh seaborn matplotlib graphviz plotly tqdm
170170
RUN pip3 install --no-cache-dir pymssql mysql-connector-python cx-Oracle dataclasses numpy matplotlib pandas dill jsonpickle jsonext psycopg2 psycopg2-binary pyodbc openpyxl
171-
RUN pip3 install --no-cache-dir dvc flask GitPython elasticsearch opensearch-py neo4j eland --ignore-installed PyYAML
171+
RUN pip3 install --no-cache-dir dvc flask GitPython elasticsearch opensearch-py neo4j eland --ignore-installed PyYAML
172+
RUN pip3 install --no-cache-dir opencv-python torchvision
172173

173174
# XNAT
174175
RUN pip3 install --no-cache-dir xnat
@@ -181,7 +182,7 @@ RUN pip3 install --no-cache-dir -U spacy click torch thinc
181182
#RUN for spacy_model in ${SPACY_MODELS}; do python3 -m spacy download $spacy_model; done
182183

183184
# install requirements for working with cogstack scripts
184-
# RUN pip3 isntall --no-cache-dir -r notebooks/working_with_cogstack/requirements.txt
185+
# RUN pip3 isntall --no-cache-dir -r notebooks/demo_working_with_cogstack/requirements.txt
185186

186187
RUN pip3 install --no-cache-dir medcat==1.12.0 eland plotly
187188

services/jupyter-hub/notebooks/demo_working_with_cogstack/.gitignore

Whitespace-only changes.

0 commit comments

Comments
 (0)