aboutsummaryrefslogtreecommitdiffstats
path: root/docker/docker-env-conf.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docker/docker-env-conf.sh')
-rw-r--r--docker/docker-env-conf.sh31
1 files changed, 9 insertions, 22 deletions
diff --git a/docker/docker-env-conf.sh b/docker/docker-env-conf.sh
index 5f5c1bd5..6e610ca7 100644
--- a/docker/docker-env-conf.sh
+++ b/docker/docker-env-conf.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-install_sf(){
+config_env(){
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
apk --no-cache update
@@ -8,15 +8,14 @@ install_sf(){
apk --no-cache add python-dev libffi-dev musl-dev py2-virtualenv
# get binary zip from nexus - vfc-nfvo-catalog
-
wget -q -O vfc-nfvo-catalog.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.catalog&a=vfc-nfvo-catalog&v=LATEST&e=zip' && \
unzip vfc-nfvo-catalog.zip && \
rm -rf vfc-nfvo-catalog.zip && \
- pip install --upgrade setuptools pip -i https://mirrors.aliyun.com/pypi/simple/ && \
- pip install --no-cache-dir --pre -r /service/vfc/nfvo/catalog/requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
+ pip install --upgrade setuptools pip && \
+ pip install --no-cache-dir --pre -r /service/vfc/nfvo/catalog/requirements.txt
}
-add_user(){
+add_onap(){
apk --no-cache add sudo
addgroup -g 1000 -S onap && \
@@ -24,32 +23,20 @@ add_user(){
chmod u+w /etc/sudoers && \
sed -i '/User privilege/a\\onap ALL=(ALL:ALL) NOPASSWD:ALL' /etc/sudoers && \
chmod u-x /etc/sudoers && \
- sudo chown onap:onap -R /service
-}
-
-config_logdir(){
-
- if [ ! -d "/var/log/onap" ]; then
- sudo mkdir /var/log/onap
- fi
-
- sudo chown onap:onap -R /var/log/onap
- chmod g+s /var/log/onap
-
+ chown onap:onap -R /service
}
-clean_sf_cache(){
+clean_env(){
rm -rf /var/cache/apk/*
rm -rf /root/.cache/pip/*
rm -rf /tmp/*
}
-install_sf
+config_env
wait
-add_user
-config_logdir
-clean_sf_cache
+add_onap
+clean_env