git
docker
make
sh
NOTE: Test are done on CentOS-7
and MacOS 10.14+
ONLY.
cd "$(git rev-parse --show-toplevel)/docker"
# it takes about 15-30 mins
make build
# P.S. the latest code may cause docker build to fail, please use older version by specifying the tag version (< v1.9.27) or post an issue
# make build TAG=v1.9.27
- production environment
- development environment
make deploy-dev
- production environment
- development environment
make verify
### ZMS
ZMS_DEBUG_PORT=8001
export ZMS_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${ZMS_DEBUG_PORT}"
# re-deploy ZMS, reference: ./deploy-scripts/zms-deploy.sh
# expose debug port
docker run --rm \
--network="${DOCKER_NETWORK}" \
-p "${ZMS_DEBUG_PORT}:${ZMS_DEBUG_PORT}" \
--link "${ZMS_HOST}:target" \
alpine/socat \
"tcp-listen:${ZMS_DEBUG_PORT},fork,reuseaddr" \
"tcp-connect:target:${ZMS_DEBUG_PORT}"
### ZTS
ZTS_DEBUG_PORT=8002
export ZTS_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${ZTS_DEBUG_PORT}"
# re-deploy ZTS, reference: ./deploy-scripts/zts-deploy.sh
# expose debug port
docker run --rm \
--network="${DOCKER_NETWORK}" \
-p "${ZTS_DEBUG_PORT}:${ZTS_DEBUG_PORT}" \
--link "${ZTS_HOST}:target" \
alpine/socat \
"tcp-listen:${ZTS_DEBUG_PORT},fork,reuseaddr" \
"tcp-connect:target:${ZTS_DEBUG_PORT}"
# remove Athenz containers
make remove-containers
# remove server data
make remove-files
# remove bootstrap setup files
make reset-repo
# reset docker and repo
make remove-all
# remove everything include docker images
make clean
3306->3306/tcp
: ZMS DB- env.sh:
ZMS_DB_PORT
- related configuration:
- zms-db.cnf:
mysqld.port
- zms.properties:
athenz.zms.jdbc_store
- zms-db.cnf:
- env.sh:
4443->4443/tcp
: ZMS server- env.sh:
ZMS_PORT
- related configuration:
- athenz.properties:
athenz.tls_port
- athenz.properties:
- env.sh:
3307->3306/tcp
: ZTS DB- env.sh:
ZTS_DB_PORT
- related configuration:
- zts-db.cnf:
mysqld.port
- zts.properties:
athenz.zts.cert_jdbc_store
- zts-db.cnf:
- env.sh:
8443->8443/tcp
: ZTS server- env.sh:
ZTS_PORT
- related configuration:
- athenz.properties:
athenz.tls_port
- athenz.properties:
- env.sh:
# check logs
less ./logs/zms/server.log
less ./logs/zts/server.log
# remove single docker
docker stop athenz-zms-server; docker rm athenz-zms-server; rm -f ./logs/zms/*
docker stop athenz-zts-server; docker rm athenz-zts-server; rm -f ./logs/zts/*
docker stop athenz-ui; docker rm athenz-ui
# inspect
docker inspect athenz-zms-server | less
docker inspect athenz-zts-server | less
# check connectivity
telnet localhost 4443
curl localhost:4443/zms/v1 -o -
curl localhost:8443/zts/v1 -o -
curl localhost:3306 -o -
curl localhost:3307 -o -
# server status
curl -k -o - https://localhost:4443/zms/v1/status
curl -k -o - https://localhost:8443/zts/v1/status
# mysql
mysql -v -u root --host=127.0.0.1 --port=3306 --password=${ZMS_DB_ROOT_PASS} --database=zms_server -e 'show tables;'
mysql -v -u root --host=127.0.0.1 --port=3307 --password=${ZTS_DB_ROOT_PASS} --database=zts_store -e 'show tables;'
# keytool
keytool -list -keystore ./zms/var/certs/zms_keystore.pkcs12
keytool -list -keystore ./zts/var/certs/zts_keystore.pkcs12
keytool -list -keystore ./zms/var/certs/zms_truststore.jks
keytool -list -keystore ./zts/var/certs/zts_truststore.jks
- Athenz-bootstrap#todo
- UI
- convert
default-config.js
parameters to ENV server.js
,login.js
,serviceFQN
;keys
folder is hard coded- configurable listening port
- convert
- ZMS
- need server health check, e.g. readiness probe
- ZPU
- If volume not mount to
/home/athenz/tmp/zpe/
, will have error:2019/06/12 06:34:09 Failed to get policies for domain: garm, Error:Unable to write Policies for domain:"garm" to file, Error:rename /home/athenz/tmp/zpe/garm.tmp /etc/acceptance-test/zpu/garm.pol: invalid cross-device link
- If volume not mount to
- athenz-cli
- build with separated docker files (add go.mod to support caching the dependency)
- common
- file permission for keys (
chmod 600
?) - support docker image version tag on
docker build
anddocker run
using ENV.TAG
.
- file permission for keys (
KeyStoreJwkKeyResolver
- support setting CA certificate using system properties for
JwkProviderBuilder
to get JWK from Internet
- support setting CA certificate using system properties for