summaryrefslogtreecommitdiffstats
path: root/vio
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2019-04-02 11:33:47 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2019-04-02 11:36:28 +0800
commit06ee0bf69c4cc48fa1017218611f1a3194137d47 (patch)
treee43ab5a57cf01e506b231910a8df000800beeac0 /vio
parent04ad05f0302fa1e059b3c3ab3470759dc333e33e (diff)
Enable https support for vio
Enable https support for vio plugin Change-Id: I24cd39d37cd85c220fd0edd2ddbbbc01678c5616 Issue-ID: MULTICLOUD-560 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r--vio/assembly.xml2
-rw-r--r--vio/cert.crt20
-rw-r--r--vio/cert.key27
-rw-r--r--vio/docker/Dockerfile2
-rwxr-xr-xvio/run.sh7
5 files changed, 56 insertions, 2 deletions
diff --git a/vio/assembly.xml b/vio/assembly.xml
index 69ea59a..12f6de5 100644
--- a/vio/assembly.xml
+++ b/vio/assembly.xml
@@ -58,6 +58,8 @@
<include>*.ini</include>
<include>*.md</include>
<include>*.yml</include>
+ <include>*.crt</include>
+ <include>*.key</include>
</includes>
</fileSet>
</fileSets>
diff --git a/vio/cert.crt b/vio/cert.crt
new file mode 100644
index 0000000..b025450
--- /dev/null
+++ b/vio/cert.crt
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDOTCCAiECFGvacmXFIVjsVSCu473GhbCDWPjjMA0GCSqGSIb3DQEBCwUAMFkx
+CzAJBgNVBAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMQ8wDQYDVQQKDAZWTXdh
+cmUxJDAiBgkqhkiG9w0BCQEWFWV0aGFubHlubmxAdm13YXJlLmNvbTAeFw0xOTA0
+MDIwMzI1MzZaFw0yOTAzMzAwMzI1MzZaMFkxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
+DApTb21lLVN0YXRlMQ8wDQYDVQQKDAZWTXdhcmUxJDAiBgkqhkiG9w0BCQEWFWV0
+aGFubHlubmxAdm13YXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAPCrLGXnbKErvSG3ivbNlgXb89MglL3A8OtBYutThoaGNaZcZ1ccBg/Z4xJx
+WEJoyNGJAOzAdCKLClaSSTH77g/FuLCeos8PWpFB61+cdjG/igP65bkVowa9Ubi/
+3bE5aR14RjIPPm2KWMszy/4eKEgj7cb94QjMGn+qpTY1OyQCMtpSxrJ6ZZbAa5NR
+1UQukyHUx1FZKQf3XLenVgR+aSlhoCIiSr1fWR9K8nsSDj41Gjmt31rV4UwKFAHw
+Rpi/4ke5Hxf8oTU3D+6r6TJeDZWDJXJQbyir6xyx4E3yvaoZf7XoPJK295+9POwN
+ZMkwg6414Ut0EPzuUCzgMwjQCNECAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAbRyK
+paK0jO4JL6RWIWWAsgHIaHXeghmcZwLEnZKl//k3sAKm9M2IEeiqLHMIkdxz9S8b
+OdT6mMEsS0dj7foDru+DlE/qao2yKNxjYiq1Ht3tCZqDtCKhqbBnoos+g9QT26kM
+dxXBzKft/WwTi5AVqRZAwgVnU7VkCS9uJzFQ3nhbP8qMOXszt9yKydXbODmiUtY6
+ibcbI/WN2IVfuNNtwLxB2lpec7xtJrULRn73vQ4uQ1SXuw58kcLa9PYCWZbGE7/r
+iHDS64dHQD+MmVxWF9X8U3u/uSo8w/EdsGW5yHYkERpaqqH/zsLXPBg4LpNjoBzH
+Z6L/anbTkBSvIhodBw==
+-----END CERTIFICATE-----
diff --git a/vio/cert.key b/vio/cert.key
new file mode 100644
index 0000000..bc35b99
--- /dev/null
+++ b/vio/cert.key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpgIBAAKCAQEA8KssZedsoSu9IbeK9s2WBdvz0yCUvcDw60Fi61OGhoY1plxn
+VxwGD9njEnFYQmjI0YkA7MB0IosKVpJJMfvuD8W4sJ6izw9akUHrX5x2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SlhvCsFF13Uobucm4prt3FwLqLCGsP4MDCjPUwZtwL7azQPysMxT
+OWPNk1KgFSBo8/O9hxXjE6dXAoGBAMgDEs5OBTzwlU6P4UaRBh+dF5jkFDiKo3H5
+VliViXtJt61C0oKlhXKamPrYLNFwWKAMJ0xLoaWCCOMcFh6cim+YtTQjJtt01LAb
+/zZf8yqM0vGsOKUjTkj8ls+e3Dvd2O9lPeJgkKPaOnExfIhl3UbPBNs8xvuBG74X
+n6fDaeMNAoGBAMi08oqjILp7EuVhVjrGgdo3Gxl2Q4Us+OkLYp7vVsWEegsjhtDk
+erYtukArSyQWYdJZ/HJP7QVu/bGUO2F2SOmk/Cd0QjrPnc0CQlONbqk+skgXOHOr
+8cRFN0XIiX89YQK34ovXF8xGN5DcgUcRMCpSh02Mor4Exh6fwOKr3Am0
+-----END RSA PRIVATE KEY-----
diff --git a/vio/docker/Dockerfile b/vio/docker/Dockerfile
index 0330232..b035fc6 100644
--- a/vio/docker/Dockerfile
+++ b/vio/docker/Dockerfile
@@ -15,7 +15,7 @@ EXPOSE 9004
RUN groupadd -r onap && useradd -r -g onap onap
RUN apt-get update && \
- apt-get install -y unzip wget curl gcc && \
+ apt-get install -y unzip wget curl gcc libssl-dev && \
cd /opt/ && \
wget -q -O multicloud-vio.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack.vmware&a=multicloud-openstack-vmware&v=1.3.0-SNAPSHOT&e=zip' && \
unzip multicloud-vio.zip && \
diff --git a/vio/run.sh b/vio/run.sh
index 8585bc2..0a19cd5 100755
--- a/vio/run.sh
+++ b/vio/run.sh
@@ -32,7 +32,12 @@ then
python multivimbroker/scripts/api.py
else
# nohup python manage.py runserver 0.0.0.0:9004 2>&1 &
- nohup uwsgi --http :9004 --module vio.wsgi --master --processes 4 &
+ if [ ${SSL_ENABLED} = "true" ]; then
+ nohup uwsgi --https :9004,/opt/vio/cert.crt,/opt/vio/cert.key --module vio.wsgi --master --processes 4 &
+
+ else
+ nohup uwsgi --http :9004 --module vio.wsgi --master --processes 4 &
+ fi
nohup python -m vio.event_listener.server 2>&1 &
while [ ! -f $logDir/vio.log ]; do