This commit is contained in:
Venkatesh Babu
2024-04-17 08:02:53 +05:30
parent 5d8c32ce47
commit 834f59ad1f
2 changed files with 7 additions and 25 deletions

View File

@@ -166,34 +166,17 @@ read -p "Enter your choice: " choice
boldGreen="\e[1m\e[92m" boldGreen="\e[1m\e[92m"
reset="\e[0m" reset="\e[0m"
# Function to request network configuration URL
requestNetworkConfig() {
echo "Please provide the network-specific configuration URL."
read -p "Paste the URL of the network configuration here (or press Enter to skip): " config_url
if [ -n "$config_url" ]; then
echo "Network configuration URL provided: $config_url"
else
echo "No network configuration URL provided, proceeding without it."
fi
echo ""
}
# Function to handle the setup process for each platform # Function to handle the setup process for each platform
completeSetup() { completeSetup() {
platform=$1 platform=$1
config_url=$2 # Passing this as an argument, though it could be optional or ignored by some setups
public_address="https://<your public IP address>" public_address="https://<your public IP address>"
echo "Proceeding with the setup for $platform..." echo "Proceeding with the setup for $platform..."
if [ -n "$config_url" ]; then
echo "Using network configuration from: $config_url"
fi
# Insert the specific commands for each platform, including requesting network config if necessary # Insert the specific commands for each platform, including requesting network config if necessary
case $platform in case $platform in
"Registry") "Registry")
requestNetworkConfig
read -p "Enter publicly accessible registry URL: " registry_url read -p "Enter publicly accessible registry URL: " registry_url
if [[ $registry_url =~ /$ ]]; then if [[ $registry_url =~ /$ ]]; then
new_registry_url=${registry_url%/} new_registry_url=${registry_url%/}
@@ -205,7 +188,6 @@ completeSetup() {
install_registry $new_registry_url install_registry $new_registry_url
;; ;;
"Gateway"|"Beckn Gateway") "Gateway"|"Beckn Gateway")
requestNetworkConfig
read -p "Enter your registry URL: " registry_url read -p "Enter your registry URL: " registry_url
read -p "Enter publicly accessible gateway URL: " gateway_url read -p "Enter publicly accessible gateway URL: " gateway_url
@@ -223,7 +205,6 @@ completeSetup() {
install_gateway $new_registry_url $gateway_url install_gateway $new_registry_url $gateway_url
;; ;;
"BAP") "BAP")
requestNetworkConfig
echo "${GREEN}................Installing Protocol Server for BAP................${NC}" echo "${GREEN}................Installing Protocol Server for BAP................${NC}"
read -p "Enter BAP Subscriber ID: " bap_subscriber_id read -p "Enter BAP Subscriber ID: " bap_subscriber_id
@@ -235,7 +216,6 @@ completeSetup() {
install_bap_protocol_server $registry_url $bap_subscriber_id $bap_subscriber_key_id $bap_subscriber_url install_bap_protocol_server $registry_url $bap_subscriber_id $bap_subscriber_key_id $bap_subscriber_url
;; ;;
"BPP") "BPP")
requestNetworkConfig
echo "${GREEN}................Installing Protocol Server for BAP................${NC}" echo "${GREEN}................Installing Protocol Server for BAP................${NC}"
read -p "Enter BPP Subscriber ID: " bpp_subscriber_id read -p "Enter BPP Subscriber ID: " bpp_subscriber_id
read -p "Enter BPP Subscriber URL: " bpp_subscriber_url read -p "Enter BPP Subscriber URL: " bpp_subscriber_url
@@ -274,8 +254,7 @@ read -p "Enter your choice: " platform_choice
selected_platform="${platforms[$((platform_choice-1))]}" selected_platform="${platforms[$((platform_choice-1))]}"
if [[ -n $selected_platform ]]; then if [[ -n $selected_platform ]]; then
# Note: Passing an empty string for config_url since it's optionally handled within `completeSetup` completeSetup "$selected_platform"
completeSetup "$selected_platform" ""
else else
echo "Invalid option. Please restart the script and select a valid option." echo "Invalid option. Please restart the script and select a valid option."
exit 1 exit 1

View File

@@ -1,4 +1,4 @@
version: '3' version: "3"
services: services:
registry: registry:
@@ -12,7 +12,7 @@ services:
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- registry_data_volume:/registry/overrideProperties/config - registry_data_volume:/registry/overrideProperties/config
- registry_data_volume:/registry/database - registry_database_volume:/registry/database
gateway: gateway:
image: fidedocker/gateway image: fidedocker/gateway
@@ -111,10 +111,13 @@ networks:
volumes: volumes:
registry_data_volume: registry_data_volume:
name: registry_data_volume name: registry_data_volume
external: true
registry_database_volume: registry_database_volume:
name: registry_database_volume name: registry_database_volume
external: true
gateway_data_volume: gateway_data_volume:
name: gateway_data_volume name: gateway_data_volume
external: true
gateway_database_volume: gateway_database_volume:
name: gateway_database_volume name: gateway_database_volume
external: true