X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fcr%2FREADME.md;h=c00f539ec408fbb567decbde6abc3d1e7bfb4367;hb=refs%2Fchanges%2F50%2F6250%2F2;hp=becace1a5c05d575950842cb7770ee93ba725e61;hpb=803d48989d7824309602393763142320cdbbc0d2;p=nonrtric.git
diff --git a/test/cr/README.md b/test/cr/README.md
index becace1a..c00f539e 100644
--- a/test/cr/README.md
+++ b/test/cr/README.md
@@ -1,10 +1,10 @@
-## callback receiver - a stub interface to receive callbacks ##
+# callback receiver - a stub interface to receive callbacks
The callback receiver is intended for function tests to simulate a RAPP.
The callback receiver exposes the read and write urls, used by the agent, as configured in service.
The callback receiver receives notifications from PMS when synchronization happens between PMS and RICs. However, the callback receiver can be uses to receive any json payload from any source.
-# Ports and certificates
+## Ports and certificates
The CR normally opens the port 8090 for http. If a certificate and a key are provided the simulator will also open port 8091 for https.
The certificate and key shall be placed in the same dir and the dir shall be mounted to /usr/src/app/cert in the container.
@@ -17,7 +17,7 @@ The certificate and key shall be placed in the same dir and the dir shall be mou
The dir cert contains a self-signed cert. Use the script generate_cert_and_key.sh to generate a new certificate and key. The password of the certificate must be set 'test'.
The same urls are available on both the http port 8090 and the https port 8091. If using curl and https, the flag -k shall be given to make curl ignore checking the certificate.
-### Control interface ###
+### Control interface
The control interface can be used by any test script.
The following REST operations are available:
@@ -50,13 +50,13 @@ There are a number of counters that can be read to monitor the message processin
All counters also support the query parameter "id" to fetch counter for one individual id, eg ```/counter/current_messages?id=my-id```
-### Build and start ###
+### Build and start
>Build image
-```docker build -t callback-receiver .```
+```docker build --build-arg NEXUS_PROXY_REPO=nexus3.onap.org:10001/ -t callback-receiver .```
>Start the image on both http and https
-```docker run -it -p 8090:8090 -p 8091:8091 callback-receiver```
+```docker run --rm -it -p 8090:8090 -p 8091:8091 callback-receiver```
It will listen to http 8090 port and https 8091 port(using default certificates) at the same time.
@@ -67,20 +67,22 @@ file "generate_cert_and_key.sh" is a shell script to generate certificate and ke
file "pass" stores the password when you run the shell script
This certificates/key can be overriden by mounting a volume when using "docker run" or "docker-compose"
-In 'docker run', use field:
---volume "$PWD/certificate:/usr/src/app/cert" a1test
-```docker run -it -p 8090:8090 -p 8091:8091 -v "/PATH_TO_CERT/cert:/usr/src/app/cert" callback-receiver```
+In 'docker run', use field:
+>```-v "$PWD/certificate:/usr/src/app/cert"```
+
+eg:
+>```docker run --rm -it -p 8090:8090 -p 8091:8091 -v "/PATH_TO_CERT/cert:/usr/src/app/cert" callback-receiver```
+
In 'docker-compose.yml', use field:
-volumes:
- - ./certificate:/usr/src/app/cert:ro
+>```volumes: - ./certificate:/usr/src/app/cert:ro```
-The script ```crstub-build-start.sh``` do the above two steps in one go. This starts the callback-receiver container in stand-alone mode for basic test.
If the callback-receiver should be executed manually with the agent, replace docker run with this command to connect to the docker network with the correct service name (--name shall be aligned with the other components, i.e. the host named given in all callback urls).
-```docker run -it -p 8090:8090 -p 8091:8091 --network nonrtric-docker-net --name callback-receiver callback-receiver```
+The script ```cr-build-start.sh``` do the above two steps in one go. This starts the callback-receiver container in stand-alone mode for basic test.
If the callback-receiver should be executed manually with the agent, replace docker run with this command to connect to the docker network with the correct service name (--name shall be aligned with the other components, i.e. the host named given in all callback urls).
+>```docker run --rm -it -p 8090:8090 -p 8091:8091 --network nonrtric-docker-net --name callback-receiver callback-receiver```
>Start the image on http only
-```docker run -it -p 8090:8090 callback-receiver```
+```docker run --rm -it -p 8090:8090 callback-receiver```
-### Basic test ###
+### Basic test
Basic test is made with the script ```basic_test.sh nonsecure|secure``` which tests all the available urls with a subset of the possible operations. Use the script ```cr-build-start.sh``` to start the callback-receiver in a container first.
@@ -97,4 +99,4 @@ 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
+limitations under the License.