diff options
Diffstat (limited to 'archive/vnfsdk/resources')
-rw-r--r-- | archive/vnfsdk/resources/config/configuration.xml | 35 | ||||
-rw-r--r-- | archive/vnfsdk/resources/config/marketplace_tables_postgres.sql | 25 | ||||
-rw-r--r-- | archive/vnfsdk/resources/nginx/nginx.conf | 55 |
3 files changed, 115 insertions, 0 deletions
diff --git a/archive/vnfsdk/resources/config/configuration.xml b/archive/vnfsdk/resources/config/configuration.xml new file mode 100644 index 0000000000..09b6551c00 --- /dev/null +++ b/archive/vnfsdk/resources/config/configuration.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2017 Huawei Technologies Co., Ltd. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!DOCTYPE configuration +PUBLIC "//mybatis.org//DTD Config 3.0//EN" +"http://mybatis.org/dtd/mybatis-3-config.dtd"> +<configuration> + <environments default="development"> + <environment id="development"> + <transactionManager type="JDBC" /> + <dataSource type="UNPOOLED"> + <property name="driver" value="org.postgresql.Driver" /> + <property name="url" value="jdbc:postgresql://{{.Values.postgres.service.name2}}:{{.Values.postgres.service.externalPort}}/marketplaceDB" /> + <property name="username" value="${PG_USER}" /> + <property name="password" value="${PG_PASSWORD}" /> + </dataSource> + </environment> + </environments> + <mappers> + <mapper resource="mybatis/sql/MarketplaceMapper.xml" /> + </mappers> +</configuration> diff --git a/archive/vnfsdk/resources/config/marketplace_tables_postgres.sql b/archive/vnfsdk/resources/config/marketplace_tables_postgres.sql new file mode 100644 index 0000000000..c05d7f2d00 --- /dev/null +++ b/archive/vnfsdk/resources/config/marketplace_tables_postgres.sql @@ -0,0 +1,25 @@ +CREATE DATABASE "marketplaceDB"; + +\c marketplaceDB; + +DROP TABLE IF EXISTS CSAR_PACKAGE_TABLE; + +CREATE TABLE CSAR_PACKAGE_TABLE ( + CSARID VARCHAR(200) NOT NULL, + DOWNLOADURI VARCHAR(200) NULL, + REPORT VARCHAR(200) NULL, + SIZE VARCHAR(100) NULL, + FORMAT VARCHAR(100) NULL, + CREATETIME VARCHAR(100) NULL, + DELETIONPENDING VARCHAR(100) NULL, + MODIFYTIME VARCHAR(100) NULL, + SHORTDESC TEXT NULL, + NAME VARCHAR(100) NULL, + VERSION VARCHAR(20) NULL, + PROVIDER VARCHAR(300) NULL, + TYPE VARCHAR(300) NULL, + DETAILS TEXT NULL, + REMARKS TEXT NULL, + DOWNLOADCOUNT INT NULL, + CONSTRAINT csar_package_table_pkey PRIMARY KEY (CSARID) +); diff --git a/archive/vnfsdk/resources/nginx/nginx.conf b/archive/vnfsdk/resources/nginx/nginx.conf new file mode 100644 index 0000000000..9d7aa78b36 --- /dev/null +++ b/archive/vnfsdk/resources/nginx/nginx.conf @@ -0,0 +1,55 @@ +# Copyright 2020 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +daemon off; + +#pid /run/nginx.pid; + +events { + worker_connections 500; + # multi_accept on; +} +http { + + ## + # Basic Settings + ## + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + + #Comment or disable the access_log once tested to avoid runtime logs +# access_log /var/log/nginx/access.log format gzip; + access_log off; + error_log /var/log/nginx/error.log; + + server { + listen {{ .Values.service.internalPort }}; + server_name {{ .Values.service.name }}; + keepalive_timeout 70; + + location / { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://localhost:8702; + proxy_read_timeout 90; + proxy_redirect off; + } + } +}
\ No newline at end of file |