echo "... restarted Docker service"
if [ -n "${DOCKER_PROXY_URL}" ]; then
echo "Configuring docker proxy ..."
- if [ -f daemon.json ]; then
- if grep -q registry-mirrors daemon.json; then
- sudo sed -Ei 's/("registry-mirrors".*\[)(.*)\]/\1\2, \"'"${DOCKER_PROXY_URL}"'\"\]/' daemon.json
+ if [ -f /etc/docker/daemon.json ]; then
+ if grep -q registry-mirrors /etc/docker/daemon.json; then
+ sudo sed -Ei 's/("registry-mirrors".*\[)(.*)\]/\1\2, \"'"${DOCKER_PROXY_URL}"'\"\]/' /etc/docker/daemon.json
else
- sudo sed -i 's/{/{\n "registry-mirrors": [\"'"${DOCKER_PROXY_URL}"'\"]",/' daemon.json
+ sudo sed -i 's/{/{\n "registry-mirrors": [\"'"${DOCKER_PROXY_URL}"'\"]",/' /etc/docker/daemon.json
fi
else
- sudo cat << EOF > daemon.json
+ sudo cat << EOF > /etc/docker/daemon.json
{
"registry-mirrors": ["${DOCKER_PROXY_URL}"]
}
if [ "$module" == "pla" ]; then
if [ -n "$INSTALL_PLA" ]; then
echo "Updating K8s manifest file from opensourcemano\/${module}:.* to ${DOCKER_REGISTRY_URL}${DOCKER_USER}\/${module}:${TAG}"
- $WORKDIR_SUDO sed -i "s/opensourcemano\/pla:.*/${DOCKER_REGISTRY_URL}${DOCKER_USER}\/\/pla:${OSM_DOCKER_TAG}/g" ${OSM_DOCKER_WORK_DIR}/osm_pla/pla.yaml
+ $WORKDIR_SUDO sed -i "s#opensourcemano/pla:.*#${DOCKER_REGISTRY_URL}${DOCKER_USER}/pla:${OSM_DOCKER_TAG}#g" ${OSM_DOCKER_WORK_DIR}/osm_pla/pla.yaml
fi
else
echo "Updating K8s manifest file from opensourcemano\/${module}:.* to ${DOCKER_REGISTRY_URL}${DOCKER_USER}\/${module}:${TAG}"
- $WORKDIR_SUDO sed -i "s/opensourcemano\/${module}:.*/${DOCKER_REGISTRY_URL}${DOCKER_USER}\/${module}:${TAG}/g" ${OSM_K8S_WORK_DIR}/${module}.yaml
+ $WORKDIR_SUDO sed -i "s#opensourcemano/${module}:.*#${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module}:${TAG}#g" ${OSM_K8S_WORK_DIR}/${module}.yaml
fi
done
}
function update_manifest_files() {
- osm_services="nbi lcm ro pol mon light-ui ng-ui keystone pla"
+ if [ -n "$NGUI" ]; then
+ osm_services="nbi lcm ro pol mon ng-ui keystone pla"
+ else
+ osm_services="nbi lcm ro pol mon light-ui keystone pla"
+ fi
list_of_services=""
for module in $osm_services; do
module_upper="${module^^}"
fi
done
list_of_services_to_rebuild=$(echo ${TO_REBUILD,,} |sed "s/lw-ui/light-ui/g")
- if [ ! "$OSM_DOCKER_TAG" == "8" ]; then
+ if [ ! "$OSM_DOCKER_TAG" == "9" ]; then
parse_yaml $OSM_DOCKER_TAG $list_of_services
fi
if [ -n "$MODULE_DOCKER_TAG" ]; then