diff options
Diffstat (limited to 'test/mocks/pnfsimulator')
-rw-r--r-- | test/mocks/pnfsimulator/README.md | 2 | ||||
-rw-r--r-- | test/mocks/pnfsimulator/docker-compose.yml | 12 | ||||
-rw-r--r-- | test/mocks/pnfsimulator/pom.xml | 1 | ||||
-rwxr-xr-x | test/mocks/pnfsimulator/simulator.sh | 9 | ||||
-rw-r--r-- | test/mocks/pnfsimulator/src/assembly/resources.xml | 3 |
5 files changed, 19 insertions, 8 deletions
diff --git a/test/mocks/pnfsimulator/README.md b/test/mocks/pnfsimulator/README.md index e53d72fb7..24359ae08 100644 --- a/test/mocks/pnfsimulator/README.md +++ b/test/mocks/pnfsimulator/README.md @@ -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. diff --git a/test/mocks/pnfsimulator/docker-compose.yml b/test/mocks/pnfsimulator/docker-compose.yml index adaa3eb2c..d853ca9da 100644 --- a/test/mocks/pnfsimulator/docker-compose.yml +++ b/test/mocks/pnfsimulator/docker-compose.yml @@ -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 + diff --git a/test/mocks/pnfsimulator/pom.xml b/test/mocks/pnfsimulator/pom.xml index c8355dcd2..1f52bbdf2 100644 --- a/test/mocks/pnfsimulator/pom.xml +++ b/test/mocks/pnfsimulator/pom.xml @@ -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> diff --git a/test/mocks/pnfsimulator/simulator.sh b/test/mocks/pnfsimulator/simulator.sh index 23facce6a..6b61e6b87 100755 --- a/test/mocks/pnfsimulator/simulator.sh +++ b/test/mocks/pnfsimulator/simulator.sh @@ -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 diff --git a/test/mocks/pnfsimulator/src/assembly/resources.xml b/test/mocks/pnfsimulator/src/assembly/resources.xml index 4963fa76d..063c7100a 100644 --- a/test/mocks/pnfsimulator/src/assembly/resources.xml +++ b/test/mocks/pnfsimulator/src/assembly/resources.xml @@ -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 |