diff --git a/README.md b/README.md index 955ed6e2..5b277e89 100644 --- a/README.md +++ b/README.md @@ -286,6 +286,8 @@ From the worker node: ```sh # create cache volume for uniconfig-cotroller mkdir -p /opt/frinx//uniconfig-controller/cache/ +# set correct permissions +chmod -R 777 /opt/frinx//uniconfig-controller/cache/ # if older FM was started on this node, remove docker persistant volumes docker volume prune --filter label=fm diff --git a/composefiles/swarm-uniconfig.yml b/composefiles/swarm-uniconfig.yml index ab293ee6..eabfab71 100644 --- a/composefiles/swarm-uniconfig.yml +++ b/composefiles/swarm-uniconfig.yml @@ -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: diff --git a/config/uniconfig/frinx/uniconfig/cache/README b/config/uniconfig/frinx/uniconfig/cache/README old mode 100644 new mode 100755 diff --git a/config/uniconfig/run_uniconfig.sh b/config/uniconfig/run_uniconfig.sh index f7e491f0..b99b3aa8 100644 --- a/config/uniconfig/run_uniconfig.sh +++ b/config/uniconfig/run_uniconfig.sh @@ -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: " diff --git a/generate_uc_compose.sh b/generate_uc_compose.sh index b4625de4..9168ed8f 100755 --- a/generate_uc_compose.sh +++ b/generate_uc_compose.sh @@ -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" } diff --git a/startup.sh b/startup.sh index 7f5032fb..f64123fc 100755 --- a/startup.sh +++ b/startup.sh @@ -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 }