Contents ======== * `Contents <#contents>`__ * `HttpTestServer <#httptestserver>`__ * `Prerequisites for Running the HttpTestServer <#prerequisites-for-running-the-httptestserver>`__ * `Starting HttpTestServer <#starting-httptestserver>`__ HttpTestServer -------------- HttpTestServer runs a simple HTTP test server with security being optional. Prerequisites for Running the HttpTestServer ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * To install EII libs on bare metal, follow the `README `_ of eii_libs_installer. * Generate the certificates required to run the HTTP Test Server using the following command: .. code-block:: sh ./generate_testserver_cert.sh test-server-ip * Update no_proxy to connect to the RestDataExport server: .. code-block:: sh export no_proxy=$no_proxy, Starting HttpTestServer ^^^^^^^^^^^^^^^^^^^^^^^ * Run the following command to start the HttpTestServer: .. code-block:: sh cd IEdgeInsights/tools/HttpTestServer go run TestServer.go --dev_mode false --host
--port --rdehost
--rdeport .. code-block:: sh Eg: go run TestServer.go --dev_mode false --host=0.0.0.0 --port=8082 --rdehost=localhost --rdeport=8087 For Helm Usecase: .. code-block:: sh Eg: go run TestServer.go --dev_mode false --host=0.0.0.0 --port=8082 --rdehost=--rdeport=31509 --client_ca_path ../../build/helm-eii/eii-deploy/Certificates/rootca/cacert.pem .. **Note:** server_cert.pem is valid for 365 days from the date of generation. * In PROD mode, you might see intermediate logs like this: .. code-block:: sh http: TLS handshake error from 127.0.0.1:51732: EOF These logs are because of RestExport trying to check if the server is present by pinging it without using any certificates and can be ignored.