Merge pull request #402 from dod-ccpo/crl-cron-job
cronjob config for syncing CRLs
This commit is contained in:
commit
7f2442a24f
@ -86,7 +86,7 @@ jobs:
|
|||||||
name: "Load Cache: CRLs"
|
name: "Load Cache: CRLs"
|
||||||
keys:
|
keys:
|
||||||
- disa-crls-v2
|
- disa-crls-v2
|
||||||
- run:
|
- run:
|
||||||
name: "Update CRLs"
|
name: "Update CRLs"
|
||||||
command: ./script/sync-crls
|
command: ./script/sync-crls
|
||||||
- save_cache:
|
- save_cache:
|
||||||
@ -163,7 +163,7 @@ jobs:
|
|||||||
--change="ENV APP_GROUP \"${APP_GROUP}\"" \
|
--change="ENV APP_GROUP \"${APP_GROUP}\"" \
|
||||||
--change="ENV APP_DIR \"${APP_DIR}\"" \
|
--change="ENV APP_DIR \"${APP_DIR}\"" \
|
||||||
--change='ENTRYPOINT ["/usr/bin/dumb-init", "--"]' \
|
--change='ENTRYPOINT ["/usr/bin/dumb-init", "--"]' \
|
||||||
--change="CMD [\"bash\", \"-c\", \"${APP_DIR}/script/uwsgi_server\"]" \
|
--change="CMD [\"bash\", \"-c\", \"crond -b && ${APP_DIR}/script/uwsgi_server\"]" \
|
||||||
--change="WORKDIR ${APP_DIR}" \
|
--change="WORKDIR ${APP_DIR}" \
|
||||||
--change="USER \"${APP_USER}\"" \
|
--change="USER \"${APP_USER}\"" \
|
||||||
${CONTAINER_NAME} \
|
${CONTAINER_NAME} \
|
||||||
|
@ -12,5 +12,8 @@ APP_UID="8010"
|
|||||||
# Add additional packages required by app dependencies
|
# Add additional packages required by app dependencies
|
||||||
ADDITIONAL_PACKAGES="postgresql-libs python3 rsync uwsgi uwsgi-python3"
|
ADDITIONAL_PACKAGES="postgresql-libs python3 rsync uwsgi uwsgi-python3"
|
||||||
|
|
||||||
|
# add sync-crl cronjob for atst user
|
||||||
|
echo "1 */6 * * * /opt/atat/atst/script/sync-crls tests/crl-tmp" >> /etc/crontabs/atst
|
||||||
|
|
||||||
# Run the shared alpine setup script
|
# Run the shared alpine setup script
|
||||||
source ./script/include/run_alpine_setup
|
source ./script/include/run_alpine_setup
|
||||||
|
@ -4,11 +4,17 @@
|
|||||||
set -e
|
set -e
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
mkdir -p crl-tmp
|
if [[ $# -eq 0 ]]; then
|
||||||
pipenv run python ./atst/domain/authnid/crl/util.py crl-tmp crl
|
TMP_DIR=crl-tmp
|
||||||
|
else
|
||||||
|
TMP_DIR=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p $TMP_DIR
|
||||||
|
pipenv run python ./atst/domain/authnid/crl/util.py $TMP_DIR crl
|
||||||
mkdir -p crl
|
mkdir -p crl
|
||||||
rsync -rq --min-size 400 crl-tmp/. crl/.
|
rsync -rq --min-size 400 $TMP_DIR/. crl/.
|
||||||
rm -rf crl-tmp
|
rm -rf $TMP_DIR
|
||||||
|
|
||||||
if [[ $FLASK_ENV != "prod" ]]; then
|
if [[ $FLASK_ENV != "prod" ]]; then
|
||||||
# place our test CRL there
|
# place our test CRL there
|
||||||
|
Loading…
x
Reference in New Issue
Block a user