-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
72-add-bash-script-to-pull-and-run-protocol-verifier (#73)
* add bash script to pull and run latest tagged version protocol veridier * change script bin/bash * add sudo into docker compose commands * update bash script to get host network through user input * update bash script * update sed command for config.config file * update protocol-verifier tag in default config file * update default config to use kafka * update default config protocol verifier tag * update default test timeout time * add flask-cors to enable upload to homeserver from local machine * add CORS after Swagger * add flask-cors to requirements.txt * update flask cors version * update flask cors 4.0.1 * Update documentation to explain CORS * update comments within bash script * update CORS to accept from localhost * 69-update-readme_v2 (#74) * update README to improve Windows installation * update stdout after docker compose up * add extra steps for windows systems to make install script executable * remove a windowds instruction when in dev container, add run tests * update curl commands for windows * update readmev2 with changes * further updates to readme * add screenshot ref reopening in dev container * remove windows commands when in dev container * small change
- Loading branch information
1 parent
6e98bfe
commit 3664d27
Showing
4 changed files
with
76 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
|
||
# This script automates the process of pulling the latest tagged version of the protocol verifier, | ||
# updating necessary files, and running the protocol verifier using Docker Compose. It ensures | ||
# that the setup is configured correctly to pass functional and performance tests. | ||
|
||
# If using the test harness and protocol verifier on an external server, to access the Swagger UI | ||
# you must port forward when gaining ssh access | ||
# ssh -L 8800:localhost:8800 <user_name>@<host_ip_address> | ||
|
||
# NOTE: This script should be run within the root directory of erebus | ||
# ./scripts/install_and_run_protocol_verifier.sh | ||
|
||
# Get user input for IP address of where protocol verifier is being hosted | ||
echo "Please enter the IP address of the host network:" | ||
read host_network | ||
|
||
# Change working directory to root and pull munin repo | ||
git clone https://github.com/xtuml/munin.git | ||
cd munin | ||
|
||
# returns latest tag sorted by date in the form refs/tags/<tag_name> | ||
latest_pv_tag_ref=$(git for-each-ref --sort=creatordate --format '%(refname)' refs/tags | tail -1) | ||
|
||
# format latest tag to just <tag_name> | ||
latest_pv_tag=${latest_pv_tag_ref:10} | ||
|
||
echo "Checking out latest tag: $latest_pv_tag" | ||
git checkout tags/$latest_pv_tag | ||
|
||
# Copy specific files over to munin repo to get tests to pass | ||
echo "Copying over required property files to munin" | ||
cd .. | ||
cp ./end_to_end_test_files/log-pv-files.properties ./munin/deploy/config/log-pv-files.properties | ||
cp ./end_to_end_test_files/log-pv-kafka.properties ./munin/deploy/config/log-pv-kafka.properties | ||
|
||
echo "Replacing docker compose file within munin /deploy" | ||
cp ./end_to_end_test_files/docker-compose.prod.yml ./munin/deploy/docker-compose.yml | ||
|
||
mkdir -p ./config | ||
|
||
echo "Copying config file" | ||
cp ./test_harness/config/default_config.config ./config/config.config | ||
|
||
# Update config file with host network IP address | ||
sed -i "s/host.docker.internal/$host_network/g" ./config/config.config | ||
|
||
# Update IP address for KAFKA_ADVERTISED_LISTENERS within copied docker-compose | ||
sed -i "s/172.17.0.1/$host_network/g" ./munin/deploy/docker-compose.yml | ||
|
||
echo "Starting up the protocol verifier" | ||
sudo docker compose -f ./munin/deploy/docker-compose.yml up -d | ||
|
||
echo "Starting up the test harness" | ||
sudo docker compose -f ./docker-compose.yml up -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters