Skip to content

Commit

Permalink
Uniconfig cache permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Volak committed Apr 1, 2022
1 parent be98bcf commit c9bbab7
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ From the worker node:
```sh
# create cache volume for uniconfig-cotroller
mkdir -p /opt/frinx/<SERVICE_NAME>/uniconfig-controller/cache/
# set correct permissions
chmod -R 777 /opt/frinx/<SERVICE_NAME>/uniconfig-controller/cache/

# if older FM was started on this node, remove docker persistant volumes
docker volume prune --filter label=fm
Expand Down
2 changes: 1 addition & 1 deletion composefiles/swarm-uniconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ services:
- dbPersistence_connection_databaseLocations_port=5432
volumes:
- frinx_uniconfig-controller_logs:/opt/uniconfig-frinx/log
- ${UC_CONFIG_PATH}/cache:/opt/uniconfig-frinx/cache_tmp:rw
- ${UC_CONFIG_PATH}/cache:/opt/uniconfig-frinx/cache:rw
secrets:
- frinx_uniconfig_db
configs:
Expand Down
Empty file modified config/uniconfig/frinx/uniconfig/cache/README
100644 → 100755
Empty file.
5 changes: 0 additions & 5 deletions config/uniconfig/run_uniconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ if [[ -f "/set_env_secrets.sh" ]]; then
. /set_env_secrets.sh ''
fi

if [[ -d "/opt/uniconfig-frinx/cache_tmp" ]]; then
echo "Copy cache_tmp folder before start"
cp -R /opt/uniconfig-frinx/cache_tmp/* /opt/uniconfig-frinx/cache
fi

display_usage() {
echo -e "Usage: $(basename "$0") [-f] [-l LICENSE_TOKEN] [--debug]"
echo -e "where: "
Expand Down
1 change: 1 addition & 0 deletions generate_uc_compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ function prepareConfigFiles {

# prepare uniconfig cache folder and files
mkdir -p "${__FOLDER_PATH}/${__CONFIG_PATH}/${__UNICONFIG_SERVICE_SUFIX}/cache"
chmod -R 777 "${__FOLDER_PATH}/${__CONFIG_PATH}/${__UNICONFIG_SERVICE_SUFIX}/cache"
}


Expand Down
1 change: 1 addition & 0 deletions startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ function startUniconfig {
else
echo -e "${INFO} Single-node deployment - composefiles/${dockerSwarmUniconfig}"
echo -e "${INFO} Uniconfig swarm worker node hostname: ${UC_SWARM_NODE_ID}"
chmod -R 777 ${UC_CONFIG_PATH}/cache
docker stack deploy --compose-file "composefiles/${dockerSwarmUniconfig}" $stackName
fi
}
Expand Down

0 comments on commit c9bbab7

Please sign in to comment.