diff options
-rw-r--r-- | deployments/Dockerfile | 2 | ||||
-rwxr-xr-x | deployments/start.sh | 1 | ||||
-rwxr-xr-x | kud/hosting_providers/vagrant/installer.sh | 4 | ||||
-rw-r--r-- | src/k8splugin/cmd/main.go | 3 | ||||
-rw-r--r-- | src/k8splugin/internal/config/config.go | 2 |
5 files changed, 8 insertions, 4 deletions
diff --git a/deployments/Dockerfile b/deployments/Dockerfile index b3e2f061..dfe16cb1 100644 --- a/deployments/Dockerfile +++ b/deployments/Dockerfile @@ -16,7 +16,7 @@ ENV http_proxy $HTTP_PROXY ENV https_proxy $HTTPS_PROXY ENV no_proxy $NO_PROXY -EXPOSE 8081 +EXPOSE 9015 RUN groupadd -r onap && useradd -r -g onap onap RUN apt-get update && apt-get install -y -qq apt-transport-https curl \ diff --git a/deployments/start.sh b/deployments/start.sh index f8dc8e7f..a57a6377 100755 --- a/deployments/start.sh +++ b/deployments/start.sh @@ -31,6 +31,7 @@ cat << EOF > k8sconfig.json "database-address": "$DATABASE_IP", "database-type": "mongo", "plugin-dir": "$(pwd)/plugins", + "service-port": "9015", "kube-config-dir": "$(pwd)/kubeconfigs" } EOF diff --git a/kud/hosting_providers/vagrant/installer.sh b/kud/hosting_providers/vagrant/installer.sh index dd27e05f..60e05ffb 100755 --- a/kud/hosting_providers/vagrant/installer.sh +++ b/kud/hosting_providers/vagrant/installer.sh @@ -31,10 +31,10 @@ function _install_go { # _install_pip() - Install Python Package Manager function _install_pip { if $(pip --version &>/dev/null); then + sudo -E pip install --upgrade pip + else sudo apt-get install -y python-dev curl -sL https://bootstrap.pypa.io/get-pip.py | sudo python - else - sudo -E pip install --upgrade pip fi } diff --git a/src/k8splugin/cmd/main.go b/src/k8splugin/cmd/main.go index 607e3fe1..d6d9d75a 100644 --- a/src/k8splugin/cmd/main.go +++ b/src/k8splugin/cmd/main.go @@ -25,6 +25,7 @@ import ( "k8splugin/api" utils "k8splugin/internal" "k8splugin/internal/auth" + "k8splugin/internal/config" "github.com/gorilla/handlers" ) @@ -44,7 +45,7 @@ func main() { httpServer := &http.Server{ Handler: loggedRouter, - Addr: ":8081", // Remove hardcoded port number + Addr: ":" + config.GetConfiguration().ServicePort, } connectionsClose := make(chan struct{}) diff --git a/src/k8splugin/internal/config/config.go b/src/k8splugin/internal/config/config.go index c3ca9054..dc3f7a11 100644 --- a/src/k8splugin/internal/config/config.go +++ b/src/k8splugin/internal/config/config.go @@ -39,6 +39,7 @@ type Configuration struct { EtcdCAFile string `json:"etcd-ca-file"` KubeConfigDir string `json:"kube-config-dir"` OVNCentralAddress string `json:"ovn-central-address"` + ServicePort string `json:"service-port"` } // Config is the structure that stores the configuration @@ -87,6 +88,7 @@ func defaultConfiguration() *Configuration { EtcdCAFile: "etcd-ca.cert", KubeConfigDir: cwd, OVNCentralAddress: "127.0.0.1", + ServicePort: "9015", } } |