Merge "Files assembly for vsftpd_ftpes_server"
authorGary Wu <gary.i.wu@huawei.com>
Tue, 30 Oct 2018 14:36:52 +0000 (14:36 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 30 Oct 2018 14:36:52 +0000 (14:36 +0000)
test/mocks/pnfsimulator/README.md
test/mocks/pnfsimulator/docker-compose.yml
test/mocks/pnfsimulator/pom.xml
test/mocks/pnfsimulator/simulator.sh
test/mocks/pnfsimulator/src/assembly/resources.xml

index e53d72f..24359ae 100644 (file)
@@ -20,7 +20,9 @@ Proper config must contain *simulatorParams*, *commonEventHeaderParams* and *pnf
 The recommended way is to checkout PNF Simulator project from ONAP Git repository and use *simulator*.sh script.
 If you copy *simulator.sh* script to another location, keep in mind to copy also *docker-compose.yml* and directories: *config,json_schema and netconf*.
 In order to run simulator, invoke ./simulator.sh start
+You may be asked for providing password for ypur user during startup.
 Script downloads if necessary needed Docker images and runs instances of these images.
+The easiest way is to download or generate PNF Simulator zip archive with all needed configuration files.
 
 ###Logging
 It is possible to get access to logs by invocation of *./simulator.sh* logs. 
index adaa3eb..d853ca9 100644 (file)
@@ -27,7 +27,8 @@ services:
     restart: on-failure
     depends_on:
       - sftp-server
-      - ftpes-server
+      - ftpes-server-pure-ftpd
+      - ftpes-server-vsftpd
 
   sftp-server:
     container_name: sftp-server
@@ -40,8 +41,8 @@ services:
     restart: on-failure
     command: sftp-user::1001
 
-  ftpes-server:
-    container_name: ftpes-server
+  ftpes-server-pure-ftpd:
+    container_name: ftpes-server-pure-ftpd
     image: stilliard/pure-ftpd:latest
     ports:
       - "2221:21"
@@ -56,8 +57,8 @@ services:
       FTP_USER_HOME: onap
     restart: on-failure
 
-  vsftpd_ftpes_server:
-    container_name: vsftpd_ftpes_server
+  ftpes-server-vsftpd:
+    container_name: ftpes-server-vsftpd
     image: docker.io/panubo/vsftpd
     ports:
       - "8221:21"
@@ -76,3 +77,4 @@ services:
       - ./ftpes/files/onap/ftpes-onap.txt:/srv/ftpes-onap.txt:ro
     restart: on-failure
     command: vsftpd /etc/vsftpd_ssl.conf
+
index c8355dc..1f52bbd 100644 (file)
@@ -4,7 +4,6 @@
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
-
   <parent>
     <groupId>org.onap.oparent</groupId>
     <artifactId>oparent</artifactId>
index 23facce..6b61e6b 100755 (executable)
@@ -46,7 +46,12 @@ function build_image(){
     fi
 }
 
+function set_vsftpd_file_owner() {
+    sudo chown root ./ftpes/vsftpd/configuration/vsftpd_ssl.conf
+}
+
 function start_netconf_server() {
+    set_vsftpd_file_owner
     docker-compose -f $1 up -d $NETOPEER_CONTAINER_NAME
     echo
     echo "NETCONF server container's logs:"
@@ -62,7 +67,7 @@ function start(){
         echo "Simulator containers are already up"
     else
         echo "Starting simulator containers using netconf model specified in config/netconf.env"
-
+        set_vsftpd_file_owner
         archive_logs
         start_netconf_server $1
         docker-compose -f $1 up -d $SIMULATOR_CONTAINER_NAME
@@ -138,7 +143,7 @@ Logs are written to logs/pnf-simulator.log. After each "start/start-dev" old log
 
 FOR DEVELOPERS
 1. Build local simulator image using "./simulator.sh build"
-2. Run containers with "./simulator.sh start-debug"
+2. Run containers with "./simulator.sh start-dev"
 
 If you change the source code you have to rebuild image with "./simulator.sh build" and run "./simulator.sh start/start-dev" again
 EndOfMessage
index 4963fa7..063c710 100644 (file)
@@ -39,6 +39,8 @@
             <includes>
                 <include>**/*</include>
             </includes>
+            <fileMode>0644</fileMode>
+
         </fileSet>
         <fileSet>
             <directory>json_schema</directory>
@@ -67,6 +69,7 @@
             <includes>
                 <include>**/*</include>
             </includes>
+
         </fileSet>
     </fileSets>
 </assembly>
\ No newline at end of file