Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #34 from neicnordic/feature/new-services
Browse files Browse the repository at this point in the history
Add new services to defaults
  • Loading branch information
viklund authored Dec 2, 2019
2 parents 1752c00 + 528e5a3 commit d834db3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions lega_init/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def main(config_path, cega, deploy_config, jwt_payload, svc_config, cega_svc_con
{'name': 'inbox', 'ns': 'default'}, {'name': 'ingest', 'ns': 'default'},
{'name': 'finalize', 'ns': 'default'}, {'name': 'verify', 'ns': 'default'},
{'name': 'mq-server', 'ns': 'default'}, {'name': 'db', 'ns': 'default'},
{'name': 's3inbox', 'ns': 'default'}, {'name': 'doa', 'ns': 'default'},
# In case we run this in testing environment
{'name': 'tester', 'ns': 'default'}]
if cega_svc_config:
Expand Down
17 changes: 14 additions & 3 deletions lega_init/shell/java_certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ CONFPATH=$HERE/config
STORETYPE=PKCS12
STOREPASS=changeit

# list of known Java based services
services=(
dataedge
filedatabase
keys
res
doa
htsget
inbox
)

function usage {
echo "Usage: $0 [options]"
echo -e "\nOptions are:"
Expand All @@ -43,16 +54,16 @@ while [[ $# -gt 0 ]]; do
shift
done

# remove previos alias if keystore exists
# remove previous alias if keystore exists
# becomes problemantic if password changed
if [[ -f "${CONFPATH}"/certs/cacerts ]]; then
keytool -delete -alias legaCA \
-keystore "${CONFPATH}"/certs/cacerts \
-storepass "${STOREPASS}" -noprompt
fi
fi

# create java keystore for each service
for service in dataedge filedatabase keys res; do
for service in "${services[@]}"; do
if [[ "${STORETYPE}" == "JKS" ]]; then
openssl x509 -outform der -in "${CONFPATH}"/certs/"${service}".ca.crt \
-out "${CONFPATH}"/certs/"${service}".ca.der
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='legainit',
version='0.3.6',
version='0.3.7',
packages=find_packages(),
py_modules=['legainit'],
include_package_data=True,
Expand Down

0 comments on commit d834db3

Please sign in to comment.