From 5c0154874432f3b08c9ad3a2cec990c7a3ab7c4b Mon Sep 17 00:00:00 2001 From: gmittal Date: Wed, 8 Jul 2020 13:01:48 +0000 Subject: [PATCH] Docker Compose file checkin for tr069-adapter Code changes to support Docker Compose file for tr069-adapterVES and nginx support. Issue-Id: OAM-128 Signed-off-by: gmittal Change-Id: I8bb509928abe9b20ed83739c9853d79baf45f4ee --- LICENSES | 294 +-- acs/application-booter/pom.xml | 536 ++-- acs/nbi/pom.xml | 260 +- config-data/pom.xml | 436 +-- db/pom.xml | 198 +- docker-compose/README.md | 41 + docker-compose/data/importConfig.sh | 32 + docker-compose/data/testdata/0005B9423910.xml | 94 + docker-compose/data/testdata/ConfigurationData.xsd | 2765 ++++++++++++++++++++ .../tr069-adapter/tr069adapter-install.env | 95 + .../tr069-adapter/tr069adapter-install.yaml | 210 ++ factory/pom.xml | 390 +-- mapper/pom.xml | 502 ++-- netconf-server/pom.xml | 546 ++-- nginx/Dockerfile | 26 + nginx/config/configNginx.sh | 270 ++ nginx/config/nginx.conf | 112 + nginx/pom.xml | 106 + pom.xml | 137 +- 19 files changed, 5348 insertions(+), 1702 deletions(-) create mode 100644 docker-compose/README.md create mode 100755 docker-compose/data/importConfig.sh create mode 100755 docker-compose/data/testdata/0005B9423910.xml create mode 100755 docker-compose/data/testdata/ConfigurationData.xsd create mode 100755 docker-compose/tr069-adapter/tr069adapter-install.env create mode 100755 docker-compose/tr069-adapter/tr069adapter-install.yaml create mode 100755 nginx/Dockerfile create mode 100755 nginx/config/configNginx.sh create mode 100755 nginx/config/nginx.conf create mode 100755 nginx/pom.xml diff --git a/LICENSES b/LICENSES index f49a4e1..a09ec56 100644 --- a/LICENSES +++ b/LICENSES @@ -1,201 +1,95 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +oam-tr-069-adapter Apache-2.0 + +This oam-tr-069-adapter software is distributed by CommScope Inc. + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the "Software License"); +you may not use this software except in compliance with the Software +License. You may obtain a copy of the Software License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the Software License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the Software License for the specific language governing permissions +and limitations under the Software License. + +Unless otherwise specified, all documentation contained herein is licensed +under the Creative Commons License, Attribution 4.0 Intl. (the +"Documentation License"); you may not use this documentation except in +compliance with the Documentation License. You may obtain a copy of the +Documentation License at + +https://creativecommons.org/licenses/by/4.0/ + +Unless required by applicable law or agreed to in writing, documentation +distributed under the Documentation License is distributed on an "AS IS" +BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the Documentation License for the specific language governing +permissions and limitations under the Documentation License. + + +This tr-069-adapter software repository includes files that are Copyright 2014 +Cisco Systems, Inc. and distributed under the Eclipse Public License v1.0. +You may not use this file except in compliance with the License. You may obtain a +copy of the License at https://www.eclipse.org/legal/epl-v10.html. +This software 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. + +This tr-069-adapter software repository includes files that are +Copyright 2010-2019 IETF Trust and distributed under the simplified BSD +License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating +to IETF Documents (http://trustee.ietf.org/license-info). This software 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. + +This tr-069-adapter software repository includes files that are Copyright 2019 +O-RAN Alliance and distributed under BSD-3-Clause License. This software 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. + +This tr-069-adapter software repository includes files that are Copyright (C) 2002-2020 Igor Sysoev, +Copyright (C) 2011-2020 Nginx, Inc. It is licensed under the 2-clause BSD-like license. This software 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. + +This tr-069-adapter software repository includes files that are Copyright (C) 1991, 1999 +Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +Everyone is permitted to copy and distribute verbatim copies of this license document, +but changing it is not allowed. https://github.com/mariadb-corporation/mariadb-connector-j/blob/master/LICENSE + +This tr-069-adapter software repository includes files that are Copyright (c) 2007 Mockito contributors +under MIT License(https://github.com/mockito/mockito/wiki/License). THE SOFTWARE IS PROVIDED +"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES +OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +This tr-069-adapter software repository includes files that are Copyright (c) 2007, +Eclipse Foundation, Inc. and its licensors.(https://www.eclipse.org/org/documents/edl-v10.php) +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUTNOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULARPURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING,BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT,STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This tr-069-adapter software repository includes files that are Copyright (c) SAX LICENSE +(https://saas.solenovo.fi/solemove/lics/LICENSE-SAX.html) This module, both source code and +documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org +for further information. + +This tr-069-adapter software repository includes files that are Copyright (C) 1989, 1991 +Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Everyone is permitted to copy and distribute verbatim copies of this license document, +but changing it is not allowed. this is under The GNU General Public License (GPL) +https://openjdk.java.net/legal/gplv2+ce.html - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. \ No newline at end of file diff --git a/acs/application-booter/pom.xml b/acs/application-booter/pom.xml index 291d6e4..16e9a56 100644 --- a/acs/application-booter/pom.xml +++ b/acs/application-booter/pom.xml @@ -1,268 +1,268 @@ - - - - - org.commscope.tr069adapter.acs - acs - 1.0.0 - - 4.0.0 - org.commscope.tr069adapter.acs.booter - application-booter - Application Booter - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - - onap-releases - onap-releases - https://nexus.onap.org/content/repositories/releases/ - - - - tr069adapter-acs - - - - org.springframework - spring-jms - - - javax.xml.soap - javax.xml.soap-api - 1.4.0 - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-logging - - - - - org.springframework.boot - spring-boot-starter-log4j2 - - - com.lmax - disruptor - 3.4.2 - - - org.springframework.boot - spring-boot-starter-activemq - - - org.apache.activemq - activemq-broker - - - com.fasterxml.jackson.core - jackson-databind - - - org.commscope.tr069adapter.acs.common - acs-common - 1.0.0 - - - org.commscope.tr069adapter.common - common - 1.0.0 - - - org.commscope.tr069adapter.acs.cpe - cpe - 1.0.0 - - - org.commscope.tr069adapter.acs.requestprocessor - requestprocessor - 1.0.0 - - - org.commscope.tr069adapter.acs.nbi - acsnbi - 1.0.0 - - - com.google.guava - guava - 23.6-jre - - - org.apache.httpcomponents - httpcore - - - sax - sax - 2.0.1 - - - org.mockito - mockito-core - - - org.springframework.boot - spring-boot-starter-test - test - - - junit - junit - - - junit - junit-dep - 4.11 - - - com.h2database - h2 - test - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - net.revelc.code.formatter - formatter-maven-plugin - ${formatter-maven-plugin.version} - - ${project.parent.parent.basedir}/eclipse-formatter.xml - - - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless-maven-plugin.version} - - - - - com,java,javax,org - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - maven-failsafe-plugin - - - io.fabric8 - docker-maven-plugin - ${docker-maven-plugin} - false - - - generate-policy-agent-image - package - - build - save - - - ${env.CONTAINER_PULL_REGISTRY} - - - ${docker.image.name}:${build.version} - - try - ${basedir} - Dockerfile - - ${project.build.finalName}.jar - - - ${project.version} - - - - - - - - push-policy-agent-image - - build - push - - - ${env.CONTAINER_PULL_REGISTRY} - ${env.CONTAINER_PUSH_REGISTRY} - - - ${docker.image.name}:${project.version} - - ${basedir} - Dockerfile - - ${project.build.finalName}.jar - - - latest - - - - - - - - - - - org.sonarsource.scanner.maven - sonar-maven-plugin - ${sonar-maven-plugin.version} - - - - - JIRA - https://jira.o-ran-sc.org/ - - \ No newline at end of file + + + + + org.commscope.tr069adapter.acs + acs + 1.0.0 + + 4.0.0 + org.commscope.tr069adapter.acs.booter + application-booter + Application Booter + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + onap-releases + onap-releases + https://nexus.onap.org/content/repositories/releases/ + + + + o-ran-sc/tr069adapter-acs + + + + org.springframework + spring-jms + + + javax.xml.soap + javax.xml.soap-api + 1.4.0 + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + com.lmax + disruptor + 3.4.2 + + + org.springframework.boot + spring-boot-starter-activemq + + + org.apache.activemq + activemq-broker + + + com.fasterxml.jackson.core + jackson-databind + + + org.commscope.tr069adapter.acs.common + acs-common + 1.0.0 + + + org.commscope.tr069adapter.common + common + 1.0.0 + + + org.commscope.tr069adapter.acs.cpe + cpe + 1.0.0 + + + org.commscope.tr069adapter.acs.requestprocessor + requestprocessor + 1.0.0 + + + org.commscope.tr069adapter.acs.nbi + acsnbi + 1.0.0 + + + com.google.guava + guava + 23.6-jre + + + org.apache.httpcomponents + httpcore + + + sax + sax + 2.0.1 + + + org.mockito + mockito-core + + + org.springframework.boot + spring-boot-starter-test + test + + + junit + junit + + + junit + junit-dep + 4.11 + + + com.h2database + h2 + test + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + net.revelc.code.formatter + formatter-maven-plugin + ${formatter-maven-plugin.version} + + ${project.parent.parent.basedir}/eclipse-formatter.xml + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless-maven-plugin.version} + + + + + com,java,javax,org + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + + maven-failsafe-plugin + + + io.fabric8 + docker-maven-plugin + ${docker-maven-plugin} + false + + + generate-policy-agent-image + package + + build + save + + + ${env.CONTAINER_PULL_REGISTRY} + + + ${docker.image.name}:${build.version} + + try + ${basedir} + Dockerfile + + ${project.build.finalName}.jar + + + ${project.version} + + + + + + + + push-policy-agent-image + + build + push + + + ${env.CONTAINER_PULL_REGISTRY} + ${env.CONTAINER_PUSH_REGISTRY} + + + ${docker.image.name}:${project.version} + + ${basedir} + Dockerfile + + ${project.build.finalName}.jar + + + latest + + + + + + + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar-maven-plugin.version} + + + + + JIRA + https://jira.o-ran-sc.org/ + + diff --git a/acs/nbi/pom.xml b/acs/nbi/pom.xml index 9decb41..a148d16 100644 --- a/acs/nbi/pom.xml +++ b/acs/nbi/pom.xml @@ -1,130 +1,130 @@ - - - - - 4.0.0 - org.commscope.tr069adapter.acs.nbi - acsnbi - acs nbi service - - - org.commscope.tr069adapter.acs - acs - 1.0.0 - - - - - org.springframework - spring-jms - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-logging - - - - - org.springframework.boot - spring-boot-starter-log4j2 - - - com.lmax - disruptor - 3.4.2 - - - org.apache.activemq - activemq-broker - - - com.fasterxml.jackson.core - jackson-databind - - - javax.ws.rs - javax.ws.rs-api - 2.0 - - - org.commscope.tr069adapter.common - common - 1.0.0 - - - org.commscope.tr069adapter.acs.common - acs-common - 1.0.0 - - - org.commscope.tr069adapter.acs.requestprocessor - requestprocessor - 1.0.0 - - - - - - net.revelc.code.formatter - formatter-maven-plugin - ${formatter-maven-plugin.version} - - ${project.parent.parent.basedir}/eclipse-formatter.xml - - - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless-maven-plugin.version} - - - - - com,java,javax,org - - - - - - - - org.sonarsource.scanner.maven - sonar-maven-plugin - ${sonar-maven-plugin.version} - - - - - JIRA - https://jira.o-ran-sc.org/ - - \ No newline at end of file + + + + + 4.0.0 + org.commscope.tr069adapter.acs.nbi + acsnbi + acs nbi service + + + org.commscope.tr069adapter.acs + acs + 1.0.0 + + + + + org.springframework + spring-jms + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + com.lmax + disruptor + 3.4.2 + + + org.apache.activemq + activemq-broker + + + com.fasterxml.jackson.core + jackson-databind + + + javax.ws.rs + javax.ws.rs-api + 2.0 + + + org.commscope.tr069adapter.common + common + 1.0.0 + + + org.commscope.tr069adapter.acs.common + acs-common + 1.0.0 + + + org.commscope.tr069adapter.acs.requestprocessor + requestprocessor + 1.0.0 + + + + + + net.revelc.code.formatter + formatter-maven-plugin + ${formatter-maven-plugin.version} + + ${project.parent.parent.basedir}/eclipse-formatter.xml + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless-maven-plugin.version} + + + + + com,java,javax,org + + + + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar-maven-plugin.version} + + + + + JIRA + https://jira.o-ran-sc.org/ + + diff --git a/config-data/pom.xml b/config-data/pom.xml index 6c70210..830ffa7 100644 --- a/config-data/pom.xml +++ b/config-data/pom.xml @@ -1,218 +1,218 @@ - - - - 4.0.0 - - org.commscope.tr069adapter - tr069adapter - 1.0.0 - - org.commscope.tr069adapter.config - config-data - config-data - Configuration data import project for Spring Boot - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - - onap-releases - onap-releases - https://nexus.onap.org/content/repositories/releases/ - - - - tr069adapter-acs-initialpnpdb - - - - org.springframework.boot - spring-boot-starter-data-jpa - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-logging - - - - - org.springframework.boot - spring-boot-starter-log4j2 - - - org.mariadb.jdbc - mariadb-java-client - - - org.springframework.boot - spring-boot-starter-test - test - - - com.h2database - h2 - test - - - junit - junit - - - junit - junit-dep - 4.11 - - - org.springframework.boot - spring-boot-starter-test - test - - - org.commscope.tr069adapter.acs.common - acs-common - 1.0.0 - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - net.revelc.code.formatter - formatter-maven-plugin - ${formatter-maven-plugin.version} - - ${project.parent.basedir}/eclipse-formatter.xml - - - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless-maven-plugin.version} - - - - - com,java,javax,org - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - maven-failsafe-plugin - - - io.fabric8 - docker-maven-plugin - ${docker-maven-plugin} - false - - - generate-policy-agent-image - package - - build - save - - - ${env.CONTAINER_PULL_REGISTRY} - - - ${docker.image.name}:${build.version} - - try - ${basedir} - Dockerfile - - ${project.build.finalName}.jar - - - ${project.version} - - - - - - - - push-policy-agent-image - - build - push - - - ${env.CONTAINER_PULL_REGISTRY} - ${env.CONTAINER_PUSH_REGISTRY} - - - ${docker.image.name}:${project.version} - - ${basedir} - Dockerfile - - ${project.build.finalName}.jar - - - latest - - - - - - - - - - - org.sonarsource.scanner.maven - sonar-maven-plugin - ${sonar-maven-plugin.version} - - - - - JIRA - https://jira.o-ran-sc.org/ - - + + + + 4.0.0 + + org.commscope.tr069adapter + tr069adapter + 1.0.0 + + org.commscope.tr069adapter.config + config-data + config-data + Configuration data import project for Spring Boot + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + onap-releases + onap-releases + https://nexus.onap.org/content/repositories/releases/ + + + + o-ran-sc/tr069adapter-acs-initialpnpdb + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + org.mariadb.jdbc + mariadb-java-client + + + org.springframework.boot + spring-boot-starter-test + test + + + com.h2database + h2 + test + + + junit + junit + + + junit + junit-dep + 4.11 + + + org.springframework.boot + spring-boot-starter-test + test + + + org.commscope.tr069adapter.acs.common + acs-common + 1.0.0 + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + net.revelc.code.formatter + formatter-maven-plugin + ${formatter-maven-plugin.version} + + ${project.parent.basedir}/eclipse-formatter.xml + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless-maven-plugin.version} + + + + + com,java,javax,org + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + + maven-failsafe-plugin + + + io.fabric8 + docker-maven-plugin + ${docker-maven-plugin} + false + + + generate-policy-agent-image + package + + build + save + + + ${env.CONTAINER_PULL_REGISTRY} + + + ${docker.image.name}:${build.version} + + try + ${basedir} + Dockerfile + + ${project.build.finalName}.jar + + + ${project.version} + + + + + + + + push-policy-agent-image + + build + push + + + ${env.CONTAINER_PULL_REGISTRY} + ${env.CONTAINER_PUSH_REGISTRY} + + + ${docker.image.name}:${project.version} + + ${basedir} + Dockerfile + + ${project.build.finalName}.jar + + + latest + + + + + + + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar-maven-plugin.version} + + + + + JIRA + https://jira.o-ran-sc.org/ + + diff --git a/db/pom.xml b/db/pom.xml index a093570..2b63dcb 100644 --- a/db/pom.xml +++ b/db/pom.xml @@ -1,99 +1,99 @@ - - - - - org.commscope.tr069adapter - tr069adapter - 1.0.0 - - 4.0.0 - org.commscope.tr069adapter.db - maria-db - maria-db - http://maven.apache.org - - tr069adapter-mariadb - - - - - io.fabric8 - docker-maven-plugin - ${docker-maven-plugin} - false - - - generate-policy-agent-image - package - - build - save - - - ${env.CONTAINER_PULL_REGISTRY} - - - ${docker.image.name}:${build.version} - - try - ${basedir} - Dockerfile - - ${project.version} - - - - - - - - push-policy-agent-image - - build - push - - - ${env.CONTAINER_PULL_REGISTRY} - ${env.CONTAINER_PUSH_REGISTRY} - - - ${docker.image.name}:${project.version} - - ${basedir} - Dockerfile - - ${project.build.finalName}.jar - - - latest - - - - - - - - - - - + + + + + org.commscope.tr069adapter + tr069adapter + 1.0.0 + + 4.0.0 + org.commscope.tr069adapter.db + maria-db + maria-db + http://maven.apache.org + + o-ran-sc/tr069adapter-mariadb + + + + + io.fabric8 + docker-maven-plugin + ${docker-maven-plugin} + false + + + generate-policy-agent-image + package + + build + save + + + ${env.CONTAINER_PULL_REGISTRY} + + + ${docker.image.name}:${build.version} + + try + ${basedir} + Dockerfile + + ${project.version} + + + + + + + + push-policy-agent-image + + build + push + + + ${env.CONTAINER_PULL_REGISTRY} + ${env.CONTAINER_PUSH_REGISTRY} + + + ${docker.image.name}:${project.version} + + ${basedir} + Dockerfile + + ${project.build.finalName}.jar + + + latest + + + + + + + + + + + diff --git a/docker-compose/README.md b/docker-compose/README.md new file mode 100644 index 0000000..1aca96a --- /dev/null +++ b/docker-compose/README.md @@ -0,0 +1,41 @@ +# O-RAN-SC docker-compose files + +The tr069adapter-install.yaml and tr069adapter-install.env file will create an entire tr069-adapter system with one command: +docker-compose -f tr069adapter-install.yaml --env-file tr069adapter-install.env up -d + +Howto: +cd tr069-adapter/ +docker-compose -f tr069adapter-install.yaml --env-file tr069adapter-install.env up -d + +The scripts in data/ will import the test data in the running system. + +Run command: +If SSL is not enabled then execute +cd data/ +./importConfig.sh + +If SSL is enabled then execute +cd data/ +./importConfig.sh SSL + +Open link: +http://localhost:1111/getConfig/0005b9423910 +or +https://localhost:1111/getConfig/0005b9423910 + +All the imported data is shown on the web page + +## License + +O-RAN-SC : tr-069-adapter +Copyright (C) 2020 CommScope Inc Intellectual Property. +This tr-069-adapter software file is distributed by CommScope Inc 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 + +This file 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. + diff --git a/docker-compose/data/importConfig.sh b/docker-compose/data/importConfig.sh new file mode 100755 index 0000000..4adff88 --- /dev/null +++ b/docker-compose/data/importConfig.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# ============LICENSE_START======================================================================== +# O-RAN-SC : tr-069-adapter +# ================================================================================================= +# Copyright (C) 2020 CommScope Inc Intellectual Property. +# ================================================================================================= +# This tr-069-adapter software file is distributed by CommScope Inc 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 +# +# This file 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. +# ===============LICENSE_END======================================================================= + +# Run command: +# If SSL is enabled then execute : ./importConfig.sh SSL +# If SSL is not enabled then execute : ./importConfig.sh + +PROTO="http" +[ "$1" = "SSL" ] && PROTO="https" + +echo "Importing the Configuration..." +curl -k -F "files=@./testdata/0005B9423910.xml" $PROTO://localhost:1111/importConfig +echo -e "\n" + +echo "Validating the Import..." +curl $PROTO://localhost:1111/getConfig/0005b9423910 -k +echo -e "\n" + diff --git a/docker-compose/data/testdata/0005B9423910.xml b/docker-compose/data/testdata/0005B9423910.xml new file mode 100755 index 0000000..58328c1 --- /dev/null +++ b/docker-compose/data/testdata/0005B9423910.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + Open Access + + + + + + + cpe-121 + 1 + 1 + 302650 + + 1 + + + + 12602 + HeNB + + + + 10,12,13 + + + + 100 + 3200 + 21200 + 262 + 100 + + + + + + + 1 + + ALL + 36412 + 10.207.192.34 + 10.222.222.192 + + + 0 + + + + + 1 + + + 1 + + + + + + + + diff --git a/docker-compose/data/testdata/ConfigurationData.xsd b/docker-compose/data/testdata/ConfigurationData.xsd new file mode 100755 index 0000000..c1acbc3 --- /dev/null +++ b/docker-compose/data/testdata/ConfigurationData.xsd @@ -0,0 +1,2765 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docker-compose/tr069-adapter/tr069adapter-install.env b/docker-compose/tr069-adapter/tr069adapter-install.env new file mode 100755 index 0000000..0a700e1 --- /dev/null +++ b/docker-compose/tr069-adapter/tr069adapter-install.env @@ -0,0 +1,95 @@ +# ============LICENSE_START======================================================================== +# O-RAN-SC : tr-069-adapter +# ================================================================================================= +# Copyright (C) 2020 CommScope Inc Intellectual Property. +# ================================================================================================= +# This tr-069-adapter software file is distributed by CommScope Inc 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 +# +# This file 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. +# ===============LICENSE_END======================================================================= + +# +# Below 3 are the identites of TR069Adapters. This is needed if any one of the communication is going to be over SSL. +# +# tr069adapterSSLCert : Provide the Public Certificate Chain for TR069Adapter +# tr069adapterSSLKey : Provide the Private Key for TR069Adapter +# tr069adapterCertPassPhrase : Provide the PassPhrase used while generating the Public Certificate Chain for TR069Adapter + +tr069adapterSSLCert=tr069adapter.crt +tr069adapterSSLKey=tr069adapter.key +tr069adapterCertPassPhrase=tr069adapterpassphrase.txt + + +# +# Details for the Fault VES Collector Variables. +# +# faultvesCollectorDNSServer : If the faultvesCollectorHost is not an IP, but a FQDN, then provide the DNS Server IP where this FQDN is configured and will be resolved. +# faultvesCollectorHost : IP of the Fault VES Collector. Allowed values (IPv4/IPv6). If FQDN is provided, then provide the complete FQDN and not just the HOSTNAME. +# faultvesCollectorPort : Port of the Fault VES Collector. +# faultvesCollectorComm : Communication to and from Fault VES Collector. Allowed values (noAuth/basicAuth/certOnly/certBasicAuth) +# noAuth : SSL is disabled. +# basicAuth : SSL is enabled, and the verification is done via username and password only. +# certOnly : SSL is enabled, and the verification is done via Certificates only that are imported in VES. +# certBasicAuth : SSL is enabled, and the verification is done using username and password and also with Certificates. +# faultvesCollectorTrustVerify : If SSL is enabled, then whether to Trust Certificate. Allowed Values (TRUE/FALSE) +# faultvesCollectorTrustCRT : If faultvesCollectorTrustVerify=TRUE, then provide the Trust Certificate Chain +# faultvesCollectorBasicAuthUserPassEncrypt : If faultvesCollectorComm=basicAuth or faultvesCollectorComm=certBasicAuth, then provide the encrypted string. To encrypt execute the command 'echo -n "user:pass" | base64' + +faultvesCollectorDNSServer= +faultvesCollectorHost= +faultvesCollectorPort=8080 +faultvesCollectorComm=noAuth +faultvesCollectorTrustVerify=FALSE +faultvesCollectorTrustCRT=faultvestrustcert.pem +faultvesCollectorBasicAuthUserPassEncrypt= + +# +# Details for the PNF VES Collector Variables. +# +# pnfregvesCollectorDNSServer : If the pnfregvesCollectorHost is not an IP, but a FQDN, then provide the DNS Server IP where this FQDN is configured and will be resolved. +# pnfregvesCollectorHost : IP of the PNF VES Collector. Allowed values (IPv4/IPv6). If FQDN is provided, then provide the complete FQDN and not just the HOSTNAME. +# pnfregvesCollectorPort : Port of the PNF VES Collector. +# pnfregvesCollectorComm : Communication to and from PNF VES Collector. Allowed values (noAuth/basicAuth/certOnly/certBasicAuth) +# noAuth : SSL is disabled. +# basicAuth : SSL is enabled, and the verification is done via username and password only. +# certOnly : SSL is enabled, and the verification is done via Certificates only that are imported in VES. +# certBasicAuth : SSL is enabled, and the verification is done using username and password and also with Certificates. +# pnfregvesCollectorTrustVerify : If SSL is enabled, then whether to Trust Certificate. Allowed Values (TRUE/FALSE) +# pnfregvesCollectorTrustCRT : If pnfregvesCollectorTrustVerify=TRUE, then provide the Trust Certificate Chain +# pnfregvesCollectorBasicAuthUserPassEncrypt : If pnfregvesCollectorComm=basicAuth or pnfregvesCollectorComm=certBasicAuth, then provide the encrypted string. To encrypt execute the command 'echo -n "user:pass" | base64' + +pnfregvesCollectorDNSServer= +pnfregvesCollectorHost= +pnfregvesCollectorPort=8080 +pnfregvesCollectorComm=noAuth +pnfregvesCollectorTrustVerify=FALSE +pnfregvesCollectorTrustCRT=pnfvertrustcert.pem +pnfregvesCollectorBasicAuthUserPassEncrypt= + +# +# Details for the TR069Adapter Variables. +# +# tr069adapterComm : Communication to and from TR069Adapter. For all device communications, Factory Import and Config Import. Allowed values (SSL/NO-SSL) +# tr069adapterSSLClientAuth : If tr069adapterComm=SSL, then whether to Authenticate Client Certificate. Allowed Values (TRUE/FALSE) +# tr069adapterSSLClientTrustCRT : If tr069adapterSSLClientAuth=TRUE, then provide the Trust Certificate Chain for the client + +tr069adapterComm=NO-SSL +tr069adapterSSLClientAuth=FALSE +tr069adapterSSLClientTrustCRT=tr069adapterclienttrust.crt + +# +# Details for the TR069Adapter Variables. +# +# netconfServerIP : IP address of the Server where the Docker containers are hosted. Allowed value is IPv4 +# DeviceId : Mac ID of the Device + +netconfServerIP= +DeviceId=0005B9423910 + + diff --git a/docker-compose/tr069-adapter/tr069adapter-install.yaml b/docker-compose/tr069-adapter/tr069adapter-install.yaml new file mode 100755 index 0000000..2a0fa5c --- /dev/null +++ b/docker-compose/tr069-adapter/tr069adapter-install.yaml @@ -0,0 +1,210 @@ +# ============LICENSE_START======================================================================== +# O-RAN-SC : tr-069-adapter +# ================================================================================================= +# Copyright (C) 2020 CommScope Inc Intellectual Property. +# ================================================================================================= +# This tr-069-adapter software file is distributed by CommScope Inc 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 +# +# This file 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. +# ===============LICENSE_END======================================================================= + +# Note: +# In order to support the deployment in IPv6 Docker-compose enviroment, uncomment the lines in the +# network section and update the subnet and Gateway. +# + +version: '2.4' +services: + tr069adapter-mariadb: + image: "nexus3.o-ran-sc.org:10004/o-ran-sc/tr069adapter-mariadb:latest" + container_name: tr069adapter-mariadb + restart: always + ports: + - "3306:3306" + networks: + - csadapter_nw + environment: + MYSQL_ROOT_PASSWORD: root + + tr069adapter-acs-factorydb: + image: "nexus3.o-ran-sc.org:10004/o-ran-sc/tr069adapter-acs-factorydb:latest" + container_name: tr069adapter-acs-factorydb + restart: always + depends_on: + - tr069adapter-mariadb + ports: + - "8089:8089" + networks: + - csadapter_nw + environment: + FACTORY_PORT: 8089 + + tr069adapter-acs: + image: "nexus3.o-ran-sc.org:10004/o-ran-sc/tr069adapter-acs:latest" + container_name: tr069adapter-acs + restart: always + depends_on: + - tr069adapter-mariadb + ports: + - "9977:9977" + networks: + - csadapter_nw + environment: + ACS_REST_PORT: 9977 + ACS_ADDITIONAL_REST_PORT: 9975 + ACS_SSL_ENABLED: 'false' + CERT_FILE: /logs + DB_USERNAME: root + DB_PASSWORD: root + DB_SERVICE: tr069adapter-mariadb + DB_NAME: dmsdb + MAPPER_REST_PORT: 9999 + FACTORY_REST_PORT: 8089 + FACTORY_REST_HOST: tr069adapter-acs-factorydb + MAPPER_REST_HOST: tr069adapter-netconfig-mapper + + tr069adapter-netconfig-mapper: + image: "nexus3.o-ran-sc.org:10004/o-ran-sc/tr069adapter-netconfig-mapper:latest" + container_name: tr069adapter-netconfig-mapper + restart: always + depends_on: + - tr069adapter-mariadb + ports: + - "9999:9999" + networks: + - csadapter_nw + environment: + SBI_REST_HOST: tr069adapter-acs + SBI_REST_PORT: 9977 + CONFIG_DB_REST_HOST: tr069adapter-acs-initialpnpdb + CONFIG_DB_REST_PORT: 9000 + MAPPER_REST_PORT: 9999 + REQUEST_TIMEOUT: 300 + PRE_CONFIGURE_ON_PNP: 'true' + NBI_REST_HOST: tr069adapter-netconf-server + NBI_REST_PORT: 8181 + VES_REST_HOST: tr069adapter-ves-notifier + VES_REST_PORT: 8383 + NBI_NETCONF_PORT: 17830 + NETCONF_SERVER_PORT: 17830 + NETCONF_SERVER_IP: tr069adapter-netconf-server + + tr069adapter-netconf-server: + image: "nexus3.o-ran-sc.org:10004/o-ran-sc/tr069adapter-netconf-server:latest" + container_name: tr069adapter-netconf-server + restart: always + depends_on: + - tr069adapter-mariadb + ports: + - "8181:8181" + - "17830:17830" + networks: + - csadapter_nw + environment: + NETCONF_REST_PORT: 8181 + MAPPER_REST_PORT: 9999 + NETCONFSRV_PORT: 17830 + DeviceId: ${DeviceId} + netConfServerIP: ${netconfServerIP} + MAPPER_REST_HOST: tr069adapter-netconfig-mapper + VES_PORT: 8383 + VES_REST_HOST: tr069adapter-ves-notifier + VES_REST_PORT: 8383 + + tr069adapter-ves-notifier: + image: "nexus3.o-ran-sc.org:10004/o-ran-sc/tr069adapter-ves-notifier:latest" + container_name: tr069adapter-ves-notifier + restart: always + depends_on: + - tr069adapter-mariadb + ports: + - "8383:8383" + networks: + - csadapter_nw + environment: + VES_REST_PORT: 8383 + faultvesCollectorHost: ${netconfServerIP} + faultvesCollectorPort: 2222 + pnfregvesCollectorHost: ${netconfServerIP} + pnfregvesCollectorPort: 3333 + MAPPER_REST_HOST: tr069adapter-netconfig-mapper + MAPPER_REST_PORT: 9999 + DB_USERNAME: root + DB_PASSWORD: root + DB_SERVICE: tr069adapter-mariadb + DB_NAME: dmsdb + CONFIG_MAP_ENABLE: 'false' + + tr069adapter-acs-initialpnpdb: + image: "nexus3.o-ran-sc.org:10004/o-ran-sc/tr069adapter-acs-initialpnpdb:latest" + container_name: tr069adapter-acs-initialpnpdb + restart: always + depends_on: + - tr069adapter-mariadb + ports: + - "9000:9000" + networks: + - csadapter_nw + environment: + DB_USERNAME: root + DB_PASSWORD: root + DB_SERVICE: tr069adapter-mariadb + DB_NAME: dmsdb + INITIALPNP_PORT: 9000 + + tr069adapter-nginx: + image: "nexus3.o-ran-sc.org:10004/o-ran-sc/tr069adapter-nginx:latest" + container_name: tr069adapter-nginx + restart: always + ports: + - "1111:1111" + - "2222:2222" + - "3333:3333" + volumes: + - ./ssl:/etc/nginx/ssl/ + environment: + faultvesCollectorDNSServer: ${faultvesCollectorDNSServer} + faultvesCollectorHost: ${faultvesCollectorHost} + faultvesCollectorPort: ${faultvesCollectorPort} + faultvesCollectorComm: ${faultvesCollectorComm} + faultvesCollectorSSLCert: ${tr069adapterSSLCert} + faultvesCollectorSSLKey: ${tr069adapterSSLKey} + faultvesCollectorTrustVerify: ${faultvesCollectorTrustVerify} + faultvesCollectorTrustCRT: ${faultvesCollectorTrustCRT} + pnfregvesCollectorDNSServer: ${pnfregvesCollectorDNSServer} + pnfregvesCollectorHost: ${pnfregvesCollectorHost} + pnfregvesCollectorPort: ${pnfregvesCollectorPort} + pnfregvesCollectorComm: ${pnfregvesCollectorComm} + pnfregvesCollectorSSLCert: ${tr069adapterSSLCert} + pnfregvesCollectorSSLKey: ${tr069adapterSSLKey} + pnfregvesCollectorTrustVerify: ${pnfregvesCollectorTrustVerify} + pnfregvesCollectorTrustCRT: ${pnfregvesCollectorTrustCRT} + netconfServerIP: ${netconfServerIP} + tr069adapterComm: ${tr069adapterComm} + tr069adapterSSLCert: ${tr069adapterSSLCert} + tr069adapterSSLKey: ${tr069adapterSSLKey} + tr069adapterSSLClientAuth: ${tr069adapterSSLClientAuth} + tr069adapterSSLClientTrustCRT: ${tr069adapterSSLClientTrustCRT} + tr069adapterCertPassPhrase: ${tr069adapterCertPassPhrase} + pnfregvesCollectorBasicAuthUserPassEncrypt: ${pnfregvesCollectorBasicAuthUserPassEncrypt} + faultvesCollectorBasicAuthUserPassEncrypt: ${faultvesCollectorBasicAuthUserPassEncrypt} + networks: + - csadapter_nw + command: /bin/bash -c "/opt/CSAdapter/configNginx.sh" + +networks: + csadapter_nw: + name: csadapter_nw + driver: bridge +# enable_ipv6: true +# ipam: +# driver: default +# config: +# - subnet: 2001:db9:1::/64 +# gateway: 2001:db9:1::1 diff --git a/factory/pom.xml b/factory/pom.xml index 592c946..4876f27 100644 --- a/factory/pom.xml +++ b/factory/pom.xml @@ -1,195 +1,195 @@ - - - - 4.0.0 - - org.commscope.tr069adapter - tr069adapter - 1.0.0 - - org.commscope.tr069adapter.factory - factory - factory - Factory import project for Spring Boot - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - - onap-releases - onap-releases - https://nexus.onap.org/content/repositories/releases/ - - - - tr069adapter-acs-factorydb - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-logging - - - - - org.springframework.boot - spring-boot-starter-log4j2 - - - org.springframework.boot - spring-boot-starter-test - test - - - com.fasterxml.jackson.core - jackson-databind - - - org.commscope.tr069adapter.acs.common - acs-common - 1.0.0 - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - net.revelc.code.formatter - formatter-maven-plugin - ${formatter-maven-plugin.version} - - ${project.parent.basedir}/eclipse-formatter.xml - - - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless-maven-plugin.version} - - - - - com,java,javax,org - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - maven-failsafe-plugin - - - io.fabric8 - docker-maven-plugin - ${docker-maven-plugin} - false - - - generate-policy-agent-image - package - - build - save - - - ${env.CONTAINER_PULL_REGISTRY} - - - ${docker.image.name}:${build.version} - - try - ${basedir} - Dockerfile - - ${project.build.finalName}.jar - - - ${project.version} - - - - - - - - push-policy-agent-image - - build - push - - - ${env.CONTAINER_PULL_REGISTRY} - ${env.CONTAINER_PUSH_REGISTRY} - - - ${docker.image.name}:${project.version} - - ${basedir} - Dockerfile - - ${project.build.finalName}.jar - - - latest - - - - - - - - - - - org.sonarsource.scanner.maven - sonar-maven-plugin - ${sonar-maven-plugin.version} - - - - - JIRA - https://jira.o-ran-sc.org/ - - \ No newline at end of file + + + + 4.0.0 + + org.commscope.tr069adapter + tr069adapter + 1.0.0 + + org.commscope.tr069adapter.factory + factory + factory + Factory import project for Spring Boot + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + onap-releases + onap-releases + https://nexus.onap.org/content/repositories/releases/ + + + + o-ran-sc/tr069adapter-acs-factorydb + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + org.springframework.boot + spring-boot-starter-test + test + + + com.fasterxml.jackson.core + jackson-databind + + + org.commscope.tr069adapter.acs.common + acs-common + 1.0.0 + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + net.revelc.code.formatter + formatter-maven-plugin + ${formatter-maven-plugin.version} + + ${project.parent.basedir}/eclipse-formatter.xml + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless-maven-plugin.version} + + + + + com,java,javax,org + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + + maven-failsafe-plugin + + + io.fabric8 + docker-maven-plugin + ${docker-maven-plugin} + false + + + generate-policy-agent-image + package + + build + save + + + ${env.CONTAINER_PULL_REGISTRY} + + + ${docker.image.name}:${build.version} + + try + ${basedir} + Dockerfile + + ${project.build.finalName}.jar + + + ${project.version} + + + + + + + + push-policy-agent-image + + build + push + + + ${env.CONTAINER_PULL_REGISTRY} + ${env.CONTAINER_PUSH_REGISTRY} + + + ${docker.image.name}:${project.version} + + ${basedir} + Dockerfile + + ${project.build.finalName}.jar + + + latest + + + + + + + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar-maven-plugin.version} + + + + + JIRA + https://jira.o-ran-sc.org/ + + diff --git a/mapper/pom.xml b/mapper/pom.xml index cfce5a3..36d6ba9 100644 --- a/mapper/pom.xml +++ b/mapper/pom.xml @@ -1,251 +1,251 @@ - - - - org.commscope.tr069adapter - tr069adapter - 1.0.0 - - 4.0.0 - org.commscope.tr069adapter.mapper - mapper - TR069_Mapper - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - - onap-releases - onap-releases - https://nexus.onap.org/content/repositories/releases/ - - - - tr069adapter-netconfig-mapper - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-logging - - - - - org.springframework.boot - spring-boot-starter-log4j2 - - - com.lmax - disruptor - 3.4.2 - - - org.springframework.boot - spring-boot-starter-activemq - - - com.fasterxml.jackson.core - jackson-databind - - - org.commscope.tr069adapter.acs.common - acs-common - 1.0.0 - - - org.mariadb.jdbc - mariadb-java-client - - - org.springframework.boot - spring-boot-starter-data-jpa - - - commons-io - commons-io - 2.6 - - - junit - junit - test - - - junit - junit-dep - 4.11 - test - - - org.springframework.boot - spring-boot-starter-test - test - - - com.h2database - h2 - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - mapper-client - - jar - - - mapper-client - lib - - org/commscope/tr069adapter/mapper/model/* - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - net.revelc.code.formatter - formatter-maven-plugin - ${formatter-maven-plugin.version} - - ${project.parent.basedir}/eclipse-formatter.xml - - - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless-maven-plugin.version} - - - - - com,java,javax,org - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.17 - - false - - - - maven-failsafe-plugin - - - io.fabric8 - docker-maven-plugin - ${docker-maven-plugin} - false - - - generate-policy-agent-image - package - - build - save - - - ${env.CONTAINER_PULL_REGISTRY} - - - ${docker.image.name}:${build.version} - - try - ${basedir} - Dockerfile - - ${project.build.finalName}.jar - - - ${project.version} - - - - - - - - push-policy-agent-image - - build - push - - - ${env.CONTAINER_PULL_REGISTRY} - ${env.CONTAINER_PUSH_REGISTRY} - - - ${docker.image.name}:${project.version} - - ${basedir} - Dockerfile - - ${project.build.finalName}.jar - - - latest - - - - - - - - - - - org.sonarsource.scanner.maven - sonar-maven-plugin - ${sonar-maven-plugin.version} - - - - - JIRA - https://jira.o-ran-sc.org/ - - \ No newline at end of file + + + + org.commscope.tr069adapter + tr069adapter + 1.0.0 + + 4.0.0 + org.commscope.tr069adapter.mapper + mapper + TR069_Mapper + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + onap-releases + onap-releases + https://nexus.onap.org/content/repositories/releases/ + + + + o-ran-sc/tr069adapter-netconfig-mapper + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + com.lmax + disruptor + 3.4.2 + + + org.springframework.boot + spring-boot-starter-activemq + + + com.fasterxml.jackson.core + jackson-databind + + + org.commscope.tr069adapter.acs.common + acs-common + 1.0.0 + + + org.mariadb.jdbc + mariadb-java-client + + + org.springframework.boot + spring-boot-starter-data-jpa + + + commons-io + commons-io + 2.6 + + + junit + junit + test + + + junit + junit-dep + 4.11 + test + + + org.springframework.boot + spring-boot-starter-test + test + + + com.h2database + h2 + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + mapper-client + + jar + + + mapper-client + lib + + org/commscope/tr069adapter/mapper/model/* + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + net.revelc.code.formatter + formatter-maven-plugin + ${formatter-maven-plugin.version} + + ${project.parent.basedir}/eclipse-formatter.xml + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless-maven-plugin.version} + + + + + com,java,javax,org + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.17 + + false + + + + maven-failsafe-plugin + + + io.fabric8 + docker-maven-plugin + ${docker-maven-plugin} + false + + + generate-policy-agent-image + package + + build + save + + + ${env.CONTAINER_PULL_REGISTRY} + + + ${docker.image.name}:${build.version} + + try + ${basedir} + Dockerfile + + ${project.build.finalName}.jar + + + ${project.version} + + + + + + + + push-policy-agent-image + + build + push + + + ${env.CONTAINER_PULL_REGISTRY} + ${env.CONTAINER_PUSH_REGISTRY} + + + ${docker.image.name}:${project.version} + + ${basedir} + Dockerfile + + ${project.build.finalName}.jar + + + latest + + + + + + + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar-maven-plugin.version} + + + + + JIRA + https://jira.o-ran-sc.org/ + + diff --git a/netconf-server/pom.xml b/netconf-server/pom.xml index 3b09997..0f906c8 100644 --- a/netconf-server/pom.xml +++ b/netconf-server/pom.xml @@ -1,273 +1,273 @@ - - - - 4.0.0 - - org.commscope.tr069adapter - tr069adapter - 1.0.0 - - org.commscope.tr069adapter.netconf.server - netconf-server - netconf-server - jar - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - - onap-releases - onap-releases - https://nexus.onap.org/content/repositories/releases/ - - - - tr069adapter-netconf-server - - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-logging - - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-logging - - - - - org.springframework.boot - spring-boot-starter-activemq - - - com.fasterxml.jackson.core - jackson-databind - - - org.opendaylight.netconf - netconf-testtool - 1.7.0 - - - ch.qos.logback - logback-classic - - - - - org.springframework - spring-context - - - org.commscope.tr069adapter.mapper - mapper - 1.0.0 - lib - - - org.springframework.boot - spring-boot-actuator-autoconfigure - - - org.springframework.retry - spring-retry - - - org.springframework - spring-aspects - - - org.mariadb.jdbc - mariadb-java-client - - - org.springframework.boot - spring-boot-starter-data-jpa - - - org.mockito - mockito-core - - - org.springframework.boot - spring-boot-starter-test - test - - - junit - junit - test - - - ch.qos.logback - logback-classic - - - - - junit - junit-dep - 4.11 - test - - - ch.qos.logback - logback-classic - - - - - com.h2database - h2 - test - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - net.revelc.code.formatter - formatter-maven-plugin - ${formatter-maven-plugin.version} - - ${project.parent.basedir}/eclipse-formatter.xml - - - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless-maven-plugin.version} - - - - - com,java,javax,org - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - maven-failsafe-plugin - - - io.fabric8 - docker-maven-plugin - ${docker-maven-plugin} - false - - - generate-policy-agent-image - package - - build - save - - - ${env.CONTAINER_PULL_REGISTRY} - - - ${docker.image.name}:${build.version} - - try - ${basedir} - Dockerfile - - ${project.build.finalName}.jar - - - ${project.version} - - - - - - - - push-policy-agent-image - - build - push - - - ${env.CONTAINER_PULL_REGISTRY} - ${env.CONTAINER_PUSH_REGISTRY} - - - ${docker.image.name}:${project.version} - - ${basedir} - Dockerfile - - ${project.build.finalName}.jar - - - latest - - - - - - - - - - - org.sonarsource.scanner.maven - sonar-maven-plugin - ${sonar-maven-plugin.version} - - - - - JIRA - https://jira.o-ran-sc.org/ - - + + + + 4.0.0 + + org.commscope.tr069adapter + tr069adapter + 1.0.0 + + org.commscope.tr069adapter.netconf.server + netconf-server + netconf-server + jar + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + onap-releases + onap-releases + https://nexus.onap.org/content/repositories/releases/ + + + + o-ran-sc/tr069adapter-netconf-server + + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-logging + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + org.springframework.boot + spring-boot-starter-activemq + + + com.fasterxml.jackson.core + jackson-databind + + + org.opendaylight.netconf + netconf-testtool + 1.7.0 + + + ch.qos.logback + logback-classic + + + + + org.springframework + spring-context + + + org.commscope.tr069adapter.mapper + mapper + 1.0.0 + lib + + + org.springframework.boot + spring-boot-actuator-autoconfigure + + + org.springframework.retry + spring-retry + + + org.springframework + spring-aspects + + + org.mariadb.jdbc + mariadb-java-client + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.mockito + mockito-core + + + org.springframework.boot + spring-boot-starter-test + test + + + junit + junit + test + + + ch.qos.logback + logback-classic + + + + + junit + junit-dep + 4.11 + test + + + ch.qos.logback + logback-classic + + + + + com.h2database + h2 + test + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + net.revelc.code.formatter + formatter-maven-plugin + ${formatter-maven-plugin.version} + + ${project.parent.basedir}/eclipse-formatter.xml + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless-maven-plugin.version} + + + + + com,java,javax,org + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + + maven-failsafe-plugin + + + io.fabric8 + docker-maven-plugin + ${docker-maven-plugin} + false + + + generate-policy-agent-image + package + + build + save + + + ${env.CONTAINER_PULL_REGISTRY} + + + ${docker.image.name}:${build.version} + + try + ${basedir} + Dockerfile + + ${project.build.finalName}.jar + + + ${project.version} + + + + + + + + push-policy-agent-image + + build + push + + + ${env.CONTAINER_PULL_REGISTRY} + ${env.CONTAINER_PUSH_REGISTRY} + + + ${docker.image.name}:${project.version} + + ${basedir} + Dockerfile + + ${project.build.finalName}.jar + + + latest + + + + + + + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar-maven-plugin.version} + + + + + JIRA + https://jira.o-ran-sc.org/ + + diff --git a/nginx/Dockerfile b/nginx/Dockerfile new file mode 100755 index 0000000..cbba299 --- /dev/null +++ b/nginx/Dockerfile @@ -0,0 +1,26 @@ +# ============LICENSE_START======================================================================== +# O-RAN-SC : tr-069-adapter +# ================================================================================================= +# Copyright (C) 2020 CommScope Inc Intellectual Property. +# ================================================================================================= +# This tr-069-adapter software file is distributed by CommScope Inc +# 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 +# +# This file 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. +# ===============LICENSE_END======================================================================= + +FROM nginx:latest + +WORKDIR /opt/CSAdapter/ + +ADD config/configNginx.sh configNginx.sh +RUN chmod +x ./configNginx.sh +ADD config/nginx.conf /etc/nginx/nginx.conf + diff --git a/nginx/config/configNginx.sh b/nginx/config/configNginx.sh new file mode 100755 index 0000000..9a42a93 --- /dev/null +++ b/nginx/config/configNginx.sh @@ -0,0 +1,270 @@ +#!/bin/bash +# ============LICENSE_START======================================================================== +# O-RAN-SC : tr-069-adapter +# ================================================================================================= +# Copyright (C) 2020 CommScope Inc Intellectual Property. +# ================================================================================================= +# This tr-069-adapter software file is distributed by CommScope Inc 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 +# +# This file 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. +# ===============LICENSE_END======================================================================= + +NGINX_CONF=/etc/nginx/nginx.conf + +updateAdapter() +{ +echo "" +echo "# Checking if TR069Adapter is SSL Enabled..." +if [ $tr069adapterComm != "SSL" ]; then + echo ": SSL Not enabled, Cleaning up the entries..." + perl -pi -e "s/tr069adapterComm//g" $NGINX_CONF + sed -i '/tr069adapterSSLCert;/,+4 d' $NGINX_CONF +else + echo ": SSL is enabled, Updating the entries..." + perl -pi -e "s/tr069adapterComm/ssl/g" $NGINX_CONF + perl -pi -e "s/tr069adapterSSLCert/${tr069adapterSSLCert}/g" $NGINX_CONF + perl -pi -e "s/tr069adapterSSLKey/${tr069adapterSSLKey}/g" $NGINX_CONF + if [ $tr069adapterSSLClientAuth != "TRUE" ]; then + echo ": Client Trusted Certificate verification is NOT Enabled..." + sed -i '/tr069adapterSSLClientTrustCRT/,+2 d' $NGINX_CONF + else + echo ": Client Trusted Certificate verification is Enabled..." + perl -pi -e "s/tr069adapterSSLClientTrustCRT/${tr069adapterSSLClientTrustCRT}/g" $NGINX_CONF + fi +fi + + if [ -f /etc/nginx/ssl/${tr069adapterCertPassPhrase} ]; then + echo ": Updating the Certificate PassPhrase..." + perl -pi -e "s/tr069adapterCertPassPhrase/${tr069adapterCertPassPhrase}/g" $NGINX_CONF + else + echo ": Certificate PassPhrase NOT Available..." + perl -pi -e "s/^\s*ssl_password_file.*//g" $NGINX_CONF + perl -pi -e "s/^\s*proxy_ssl_password_file.*//g" $NGINX_CONF + fi + +echo ": Updating the IP Address for $netconfServerIP..." +if [[ ${netconfServerIP} =~ .*:.* ]]; then + perl -pi -e "s/netconfServerIP/[${netconfServerIP}]/g" $NGINX_CONF +else + perl -pi -e "s/netconfServerIP/${netconfServerIP}/g" $NGINX_CONF +fi +} + +updateFaultVes() +{ +echo "" +echo "# Checking configuration for Fault VES Collector..." +echo ": Updating the IP Address and Port for $faultvesCollectorHost..." +perl -pi -e "s/faultvesCollectorPort/${faultvesCollectorPort}/g" $NGINX_CONF +if [[ ${faultvesCollectorHost} =~ .*:.* ]]; then + if [ $faultvesCollectorComm = "noAuth" ]; then + perl -pi -e "s|https://faultvesCollectorHost|http://[${faultvesCollectorHost}]|g" $NGINX_CONF + else + perl -pi -e "s/faultvesCollectorHost/[${faultvesCollectorHost}]/g" $NGINX_CONF + fi +else + if [ $faultvesCollectorComm = "noAuth" ]; then + perl -pi -e "s|https://faultvesCollectorHost|http://${faultvesCollectorHost}|g" $NGINX_CONF + else + perl -pi -e "s/faultvesCollectorHost/${faultvesCollectorHost}/g" $NGINX_CONF + fi +fi + +if [ $faultvesCollectorComm = "noAuth" ]; then + echo ": SSL Not enabled, Cleaning up the entries..." + sed -i '/faultvesCollectorSSLCert/,+9 d' $NGINX_CONF + +elif [ $faultvesCollectorComm = "basicAuth" ]; then + echo ": SSL is enabled as basicAuth, Updating the entries..." + sed -i '/faultvesCollectorSSLCert/,+2 d' $NGINX_CONF + if [ ! -z ${faultvesCollectorBasicAuthUserPassEncrypt} ]; then + perl -pi -e "s/faultvesCollectorBasicAuthUserPassEncrypt/${faultvesCollectorBasicAuthUserPassEncrypt}/g" $NGINX_CONF + else + echo ": Username/Password Credentials not provided...FAILED" + exit 1 + fi + +elif [ $faultvesCollectorComm = "certOnly" ]; then + echo ": SSL is enabled as certOnly, Updating the entries..." + if [ -f /etc/nginx/ssl/${faultvesCollectorSSLCert} ]; then + perl -pi -e "s/faultvesCollectorSSLCert/${faultvesCollectorSSLCert}/g" $NGINX_CONF + else + echo ": SSL Certificate ${faultvesCollectorSSLCert} not available...FAILED" + exit 1 + fi + + if [ -f /etc/nginx/ssl/${faultvesCollectorSSLKey} ]; then + perl -pi -e "s/faultvesCollectorSSLKey/${faultvesCollectorSSLKey}/g" $NGINX_CONF + else + echo ": SSL Key ${faultvesCollectorSSLKey} not available...FAILED" + exit 1 + fi + + sed -i 's|proxy_set_header Authorization "Basic faultvesCollectorBasicAuthUserPassEncrypt";||g' $NGINX_CONF + +elif [ $faultvesCollectorComm = "certBasicAuth" ]; then + echo ": SSL is enabled as certBasicAuth, Updating the entries..." + if [ ! -z ${faultvesCollectorBasicAuthUserPassEncrypt} ]; then + perl -pi -e "s/faultvesCollectorBasicAuthUserPassEncrypt/${faultvesCollectorBasicAuthUserPassEncrypt}/g" $NGINX_CONF + else + echo ": Username/Password Credentials not provided...FAILED" + exit 1 + fi + + if [ -f /etc/nginx/ssl/${faultvesCollectorSSLCert} ]; then + perl -pi -e "s/faultvesCollectorSSLCert/${faultvesCollectorSSLCert}/g" $NGINX_CONF + else + echo ": SSL Certificate ${faultvesCollectorSSLCert} not available...FAILED" + exit 1 + fi + + if [ -f /etc/nginx/ssl/${faultvesCollectorSSLKey} ]; then + perl -pi -e "s/faultvesCollectorSSLKey/${faultvesCollectorSSLKey}/g" $NGINX_CONF + else + echo ": SSL Key ${faultvesCollectorSSLKey} not available...FAILED" + exit 1 + fi + +else + echo ": Invalid Option... FAILED" + exit 1 +fi + +echo "" +echo "# Checking if Trusted CA Certificate verification is Enabled or Not..." +if [ $faultvesCollectorTrustVerify != "TRUE" ]; then + echo ": Trusted CA Certificate verification is NOT Enabled..." + sed -i '/faultvesCollectorTrustCRT/,+2 d' $NGINX_CONF +else + echo ": Trusted CA Certificate verification is Enabled..." + perl -pi -e "s/faultvesCollectorTrustCRT/${faultvesCollectorTrustCRT}/g" $NGINX_CONF +fi + +echo "" +echo "# Checking if Fault VES Collector DNS Server Details are Provided..." +if [ ! -z ${faultvesCollectorDNSServer} ]; then + echo ": DNS Server Details Provided..." + perl -pi -e "s/faultvesCollectorDNSServer/${faultvesCollectorDNSServer}/g" $NGINX_CONF +else + echo ": DNS Server Details NOT Provided..." + sed -i 's|resolver faultvesCollectorDNSServer;||g' $NGINX_CONF +fi +} + +updatePNFVes() +{ +echo "" +echo "# Checking configuration for Pnf Req VES Collector..." +echo ": Updating the IP Address and Port for $pnfregvesCollectorHost..." +perl -pi -e "s/pnfregvesCollectorPort/${pnfregvesCollectorPort}/g" $NGINX_CONF +if [[ ${pnfregvesCollectorHost} =~ .*:.* ]]; then + if [ $pnfregvesCollectorComm = "noAuth" ]; then + perl -pi -e "s|https://pnfregvesCollectorHost|http://[${pnfregvesCollectorHost}]|g" $NGINX_CONF + else + perl -pi -e "s/pnfregvesCollectorHost/[${pnfregvesCollectorHost}]/g" $NGINX_CONF + fi +else + if [ $pnfregvesCollectorComm = "noAuth" ]; then + perl -pi -e "s|https://pnfregvesCollectorHost|http://${pnfregvesCollectorHost}|g" $NGINX_CONF + else + perl -pi -e "s/pnfregvesCollectorHost/${pnfregvesCollectorHost}/g" $NGINX_CONF + fi +fi + +if [ $pnfregvesCollectorComm = "noAuth" ]; then + echo ": SSL Not enabled, Cleaning up the entries..." + sed -i '/pnfregvesCollectorSSLCert/,+9 d' $NGINX_CONF + +elif [ $pnfregvesCollectorComm = "basicAuth" ]; then + echo ": SSL is enabled as basicAuth, Updating the entries..." + sed -i '/pnfregvesCollectorSSLCert/,+2 d' $NGINX_CONF + if [ ! -z ${pnfregvesCollectorBasicAuthUserPassEncrypt} ]; then + perl -pi -e "s/pnfregvesCollectorBasicAuthUserPassEncrypt/${pnfregvesCollectorBasicAuthUserPassEncrypt}/g" $NGINX_CONF + else + echo ": Username/Password Credentials not provided...FAILED" + exit 1 + fi + +elif [ $pnfregvesCollectorComm = "certOnly" ]; then + echo ": SSL is enabled as certOnly, Updating the entries..." + if [ -f /etc/nginx/ssl/${pnfregvesCollectorSSLCert} ]; then + perl -pi -e "s/pnfregvesCollectorSSLCert/${pnfregvesCollectorSSLCert}/g" $NGINX_CONF + else + echo ": SSL Certificate ${pnfregvesCollectorSSLCert} not available...FAILED" + exit 1 + fi + + if [ -f /etc/nginx/ssl/${pnfregvesCollectorSSLKey} ]; then + perl -pi -e "s/pnfregvesCollectorSSLKey/${pnfregvesCollectorSSLKey}/g" $NGINX_CONF + else + echo ": SSL Key ${pnfregvesCollectorSSLKey} not available...FAILED" + exit 1 + fi + + sed -i 's|proxy_set_header Authorization "Basic pnfregvesCollectorBasicAuthUserPassEncrypt";||g' $NGINX_CONF + +elif [ $pnfregvesCollectorComm = "certBasicAuth" ]; then + echo ": SSL is enabled as certBasicAuth, Updating the entries..." + if [ ! -z ${pnfregvesCollectorBasicAuthUserPassEncrypt} ]; then + perl -pi -e "s/pnfregvesCollectorBasicAuthUserPassEncrypt/${pnfregvesCollectorBasicAuthUserPassEncrypt}/g" $NGINX_CONF + else + echo ": Username/Password Credentials not provided...FAILED" + exit 1 + fi + + if [ -f /etc/nginx/ssl/${pnfregvesCollectorSSLCert} ]; then + perl -pi -e "s/pnfregvesCollectorSSLCert/${pnfregvesCollectorSSLCert}/g" $NGINX_CONF + else + echo ": SSL Certificate ${pnfregvesCollectorSSLCert} not available...FAILED" + exit 1 + fi + + if [ -f /etc/nginx/ssl/${pnfregvesCollectorSSLKey} ]; then + perl -pi -e "s/pnfregvesCollectorSSLKey/${pnfregvesCollectorSSLKey}/g" $NGINX_CONF + else + echo ": SSL Key ${pnfregvesCollectorSSLKey} not available...FAILED" + exit 1 + fi + +else + echo ": Invalid Option... FAILED" + exit 1 +fi + +echo "" +echo "# Checking if Trusted CA Certificate verification is Enabled or Not..." +if [ $pnfregvesCollectorTrustVerify != "TRUE" ]; then + echo ": Trusted CA Certificate verification is NOT Enabled..." + sed -i '/pnfregvesCollectorTrustCRT/,+2 d' $NGINX_CONF +else + echo ": Trusted CA Certificate verification is Enabled..." + perl -pi -e "s/pnfregvesCollectorTrustCRT/${pnfregvesCollectorTrustCRT}/g" $NGINX_CONF +fi + +echo"" +echo "# Checking if PNF VES Collector DNS Server Details are Provided..." +if [ ! -z ${pnfregvesCollectorDNSServer} ]; then + echo ": DNS Server Details Provided..." + perl -pi -e "s/pnfregvesCollectorDNSServer/${pnfregvesCollectorDNSServer}/g" $NGINX_CONF +else + echo ": DNS Server Details NOT Provided..." + sed -i 's|resolver pnfregvesCollectorDNSServer;||g' $NGINX_CONF +fi +} + +# +# Main Call +# + +updateAdapter +updateFaultVes +updatePNFVes + +exec nginx -g 'daemon off;' + diff --git a/nginx/config/nginx.conf b/nginx/config/nginx.conf new file mode 100755 index 0000000..cc61bd5 --- /dev/null +++ b/nginx/config/nginx.conf @@ -0,0 +1,112 @@ +# ============LICENSE_START======================================================================== +# O-RAN-SC : tr-069-adapter +# ================================================================================================= +# Copyright (C) 2020 CommScope Inc Intellectual Property. +# ================================================================================================= +# This tr-069-adapter software file is distributed by CommScope Inc 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 +# +# This file 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. +# ===============LICENSE_END======================================================================= +worker_processes auto; + +events { worker_connections 1024; } + +http { + + sendfile on; + ssl_password_file /etc/nginx/ssl/tr069adapterCertPassPhrase; +# +# This Section is TR069Adapter for SSL Termination +# + server { + listen 1111 tr069adapterComm; + server_name netconfServerIP; + ssl_certificate /etc/nginx/ssl/tr069adapterSSLCert; + ssl_certificate_key /etc/nginx/ssl/tr069adapterSSLKey; + + ssl_client_certificate /etc/nginx/ssl/tr069adapterSSLClientTrustCRT; + ssl_verify_client on; + + location /viewAll { + proxy_pass http://netconfServerIP:8089; + } + + location /importFactory { + proxy_pass http://netconfServerIP:8089; + } + + location /importConfig { + proxy_pass http://netconfServerIP:9000; + } + + location /getConfig { + proxy_pass http://netconfServerIP:9000; + } + + location /netConfServerManagerService/listServers { + proxy_pass http://netconfServerIP:8181; + } + + location /CPEMgmt/acs { + proxy_pass http://netconfServerIP:9977; + proxy_redirect off; + 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-Host $server_name; + } + } + +# +# This Section is for Fault VES Collector +# + server { + listen 2222; + resolver faultvesCollectorDNSServer; + server_name netconfServerIP; + + location / { + proxy_pass https://faultvesCollectorHost:faultvesCollectorPort$request_uri; + proxy_ssl_certificate /etc/nginx/ssl/faultvesCollectorSSLCert; + proxy_ssl_certificate_key /etc/nginx/ssl/faultvesCollectorSSLKey; + proxy_ssl_password_file /etc/nginx/ssl/tr069adapterCertPassPhrase; + proxy_ssl_session_reuse on; + + proxy_ssl_trusted_certificate /etc/nginx/ssl/faultvesCollectorTrustCRT; + proxy_ssl_verify on; + proxy_ssl_verify_depth 2; + + proxy_set_header Authorization "Basic faultvesCollectorBasicAuthUserPassEncrypt"; + } + } + +# +# This Section is for PNF Reg VES Collector +# + + server { + listen 3333; + resolver pnfregvesCollectorDNSServer; + server_name netconfServerIP; + + location / { + proxy_pass https://pnfregvesCollectorHost:pnfregvesCollectorPort$request_uri; + proxy_ssl_certificate /etc/nginx/ssl/pnfregvesCollectorSSLCert; + proxy_ssl_certificate_key /etc/nginx/ssl/pnfregvesCollectorSSLKey; + proxy_ssl_password_file /etc/nginx/ssl/tr069adapterCertPassPhrase; + proxy_ssl_session_reuse on; + + proxy_ssl_trusted_certificate /etc/nginx/ssl/pnfregvesCollectorTrustCRT; + proxy_ssl_verify on; + proxy_ssl_verify_depth 2; + + proxy_set_header Authorization "Basic pnfregvesCollectorBasicAuthUserPassEncrypt"; + } + } +} diff --git a/nginx/pom.xml b/nginx/pom.xml new file mode 100755 index 0000000..be5ec9e --- /dev/null +++ b/nginx/pom.xml @@ -0,0 +1,106 @@ + + + + + org.commscope.tr069adapter + tr069adapter + 1.0.0 + + 4.0.0 + org.commscope.tr069adapter.nginx + nginx + jar + nginx + http://maven.apache.org + + UTF-8 + UTF-8 + o-ran-sc/tr069adapter-nginx + + + + + io.fabric8 + docker-maven-plugin + ${docker-maven-plugin} + false + + + generate-policy-agent-image + package + + build + save + + + ${env.CONTAINER_PULL_REGISTRY} + + + ${docker.image.name}:${build.version} + + try + ${basedir} + Dockerfile + + ${project.version} + + + + + + + + push-policy-agent-image + + build + push + + + ${env.CONTAINER_PULL_REGISTRY} + ${env.CONTAINER_PUSH_REGISTRY} + + + ${docker.image.name}:${project.version} + + ${basedir} + Dockerfile + + ${project.build.finalName}.jar + + + latest + + + + + + + + + + + + JIRA + https://jira.o-ran-sc.org/ + + diff --git a/pom.xml b/pom.xml index ebfd52f..b616bec 100644 --- a/pom.xml +++ b/pom.xml @@ -1,68 +1,69 @@ - - - - - org.springframework.boot - spring-boot-starter-parent - 2.2.1.RELEASE - - 4.0.0 - org.commscope.tr069adapter - tr069adapter - 1.0.0 - pom - tr069adapter - - UTF-8 - latest - 1.7 - 1.8 - 1.4 - 4.12 - test - 1.1 - 2.1 - 1.8.4 - 2.4.1 - 3.1 - 2.22.0 - 2.2 - 2.7 - 1.2.17 - 0.30.0 - 3.7.0.1746 - 0.8.5 - 1.18.0 - 2.8.1 - - - common - db - factory - acs - mapper - netconf-server - ves-agent - config-data - - + + + + + org.springframework.boot + spring-boot-starter-parent + 2.2.1.RELEASE + + 4.0.0 + org.commscope.tr069adapter + tr069adapter + 1.0.0 + pom + tr069adapter + + UTF-8 + latest + 1.7 + 1.8 + 1.4 + 4.12 + test + 1.1 + 2.1 + 1.8.4 + 2.4.1 + 3.1 + 2.22.0 + 2.2 + 2.7 + 1.2.17 + 0.30.0 + 3.7.0.1746 + 0.8.5 + 1.18.0 + 2.8.1 + + + common + db + nginx + factory + acs + mapper + netconf-server + ves-agent + config-data + + -- 2.16.6