All in one install
This commit is contained in:
2
install/ENV/.env-sandbox
Normal file
2
install/ENV/.env-sandbox
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
BPPCLIENTURL=http://bpp-client:6001
|
||||||
|
BASE_URL=http://sandbox-api:3000
|
||||||
@@ -73,13 +73,7 @@ This shell script, `start_beckn_v2.sh`, automates the setup of Beckn components,
|
|||||||
./start_container "sandbox-api"
|
./start_container "sandbox-api"
|
||||||
```
|
```
|
||||||
|
|
||||||
7. **Install Webhook:**
|
7. **Install Protocol Server for BPP:**
|
||||||
|
|
||||||
```bash
|
|
||||||
./start_container "sandbox-webhook"
|
|
||||||
```
|
|
||||||
|
|
||||||
8. **Install Protocol Server for BPP:**
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./update_bpp_config.sh
|
./update_bpp_config.sh
|
||||||
|
|||||||
@@ -162,24 +162,44 @@ install_bpp_protocol_server(){
|
|||||||
echo "Protocol server BPP installation successful"
|
echo "Protocol server BPP installation successful"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Function to install BPP Protocol Server with Sandbox
|
||||||
|
install_bpp_protocol_server_with_sandbox(){
|
||||||
|
start_support_services
|
||||||
|
|
||||||
|
docker volume create bpp_client_config_volume
|
||||||
|
docker volume create bpp_network_config_volume
|
||||||
|
|
||||||
# MAIN SCRIPT STARTS HERE
|
echo "${GREEN}................Installing Sandbox................${NC}"
|
||||||
#!/bin/bash
|
start_container $bpp_docker_compose_file_sandbox "sandbox-api"
|
||||||
|
sleep 5
|
||||||
|
echo "Sandbox installation successful"
|
||||||
|
|
||||||
echo "Welcome to Beckn-ONIX!"
|
echo "${GREEN}................Installing Protocol Server for BPP................${NC}"
|
||||||
if [ -f ./onix_ascii_art.txt ]; then
|
|
||||||
cat ./onix_ascii_art.txt
|
if [[ $1 ]];then
|
||||||
|
registry_url=$1
|
||||||
|
bpp_subscriber_id=$2
|
||||||
|
bpp_subscriber_key_id=$3
|
||||||
|
bpp_subscriber_url=$4
|
||||||
|
webhook_url=$5
|
||||||
|
bash scripts/update_bpp_config.sh $registry_url $bpp_subscriber_id $bpp_subscriber_key_id $bpp_subscriber_url $webhook_url
|
||||||
else
|
else
|
||||||
echo "[Display Beckn-ONIX ASCII Art]"
|
bash scripts/update_bpp_config.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Beckn-ONIX is a platform that helps you quickly launch and configure beckn-enabled networks."
|
sleep 10
|
||||||
echo -e "\nWhat would you like to do?\n1. Join an existing network\n2. Create new production network\n3. Set up a network on your local machine\n4. Merge multiple networks\n5. Configure Existing Network\n(Press Ctrl+C to exit)"
|
docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bpp_client_config_volume:/target busybox cp /source/bpp-client.yml /target/default.yml
|
||||||
read -p "Enter your choice: " choice
|
docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bpp_client_config_volume:/target busybox cp /source/bpp-client.yaml-sample /target
|
||||||
|
docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bpp_network_config_volume:/target busybox cp /source/bpp-network.yml /target/default.yml
|
||||||
|
docker run --rm -v $SCRIPT_DIR/../protocol-server-data:/source -v bpp_network_config_volume:/target busybox cp /source/bpp-network.yaml-sample /target
|
||||||
|
docker rmi busybox
|
||||||
|
|
||||||
|
start_container $bpp_docker_compose_file "bpp-client"
|
||||||
|
start_container $bpp_docker_compose_file "bpp-network"
|
||||||
|
sleep 10
|
||||||
|
echo "Protocol server BPP installation successful"
|
||||||
|
}
|
||||||
|
|
||||||
boldGreen="\e[1m\e[92m"
|
|
||||||
reset="\e[0m"
|
|
||||||
|
|
||||||
# Function to handle the setup process for each platform
|
# Function to handle the setup process for each platform
|
||||||
completeSetup() {
|
completeSetup() {
|
||||||
@@ -254,6 +274,31 @@ completeSetup() {
|
|||||||
# Key generation and subscription logic follows here
|
# Key generation and subscription logic follows here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# MAIN SCRIPT STARTS HERE
|
||||||
|
|
||||||
|
echo "Welcome to Beckn-ONIX!"
|
||||||
|
if [ -f ./onix_ascii_art.txt ]; then
|
||||||
|
cat ./onix_ascii_art.txt
|
||||||
|
else
|
||||||
|
echo "[Display Beckn-ONIX ASCII Art]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Beckn-ONIX is a platform that helps you quickly launch and configure beckn-enabled networks."
|
||||||
|
echo -e "\nWhat would you like to do?\n1. Join an existing network\n2. Create new production network\n3. Set up a network on your local machine\n4. Merge multiple networks\n5. Configure Existing Network\n(Press Ctrl+C to exit)"
|
||||||
|
read -p "Enter your choice: " choice
|
||||||
|
|
||||||
|
boldGreen="\e[1m\e[92m"
|
||||||
|
reset="\e[0m"
|
||||||
|
|
||||||
|
if [[ $choice -eq 3 ]]; then
|
||||||
|
echo "Installing all components on the local machine"
|
||||||
|
install_package
|
||||||
|
install_registry
|
||||||
|
install_gateway
|
||||||
|
install_bap_protocol_server
|
||||||
|
install_bpp_protocol_server_with_sandbox
|
||||||
|
else
|
||||||
# Determine the platforms available based on the initial choice
|
# Determine the platforms available based on the initial choice
|
||||||
platforms=("Gateway" "BAP" "BPP")
|
platforms=("Gateway" "BAP" "BPP")
|
||||||
[ "$choice" -eq 2 ] && platforms=("Registry" "${platforms[@]}") # Add Registry for new network setups
|
[ "$choice" -eq 2 ] && platforms=("Registry" "${platforms[@]}") # Add Registry for new network setups
|
||||||
@@ -274,6 +319,7 @@ 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
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Process complete. Thank you for using Beckn-ONIX!"
|
echo "Process complete. Thank you for using Beckn-ONIX!"
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ services:
|
|||||||
- bpp_network_schemas_volume:/usr/src/app/schemas
|
- bpp_network_schemas_volume:/usr/src/app/schemas
|
||||||
- bpp_network_logs_volume:/usr/src/app/logs
|
- bpp_network_logs_volume:/usr/src/app/logs
|
||||||
|
|
||||||
|
|
||||||
sandbox-api:
|
sandbox-api:
|
||||||
image: fidedocker/sandbox-api
|
image: fidedocker/sandbox-api
|
||||||
container_name: sandbox-api
|
container_name: sandbox-api
|
||||||
@@ -34,19 +33,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 4010:4000
|
- 4010:4000
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
sandbox-webhook:
|
|
||||||
image: fidedocker/sandbox-webhook-api
|
|
||||||
depends_on:
|
|
||||||
- sandbox-api
|
|
||||||
container_name: sandbox-webhook
|
|
||||||
networks:
|
|
||||||
- beckn_network
|
|
||||||
ports:
|
|
||||||
- 3005:3005
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./ENV/.env-webhook:/usr/src/app/.env
|
- ./ENV/.env-sandbox:/usr/src/app/.env
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
beckn_network:
|
beckn_network:
|
||||||
|
|||||||
@@ -55,19 +55,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 4010:4000
|
- 4010:4000
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
sandbox-webhook:
|
|
||||||
image: fidedocker/sandbox-webhook-api
|
|
||||||
depends_on:
|
|
||||||
- sandbox-api
|
|
||||||
container_name: sandbox-webhook
|
|
||||||
networks:
|
|
||||||
- beckn_network
|
|
||||||
ports:
|
|
||||||
- 3005:3005
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./ENV/.env-webhook:/usr/src/app/.env
|
- ./ENV/.env-sandbox:/usr/src/app/.env
|
||||||
|
|
||||||
bpp-client:
|
bpp-client:
|
||||||
image: fidedocker/protocol-server
|
image: fidedocker/protocol-server
|
||||||
|
|||||||
@@ -55,19 +55,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 4010:4000
|
- 4010:4000
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
sandbox-webhook:
|
|
||||||
image: fidedocker/sandbox-webhook-api
|
|
||||||
depends_on:
|
|
||||||
- sandbox-api
|
|
||||||
container_name: sandbox-webhook
|
|
||||||
networks:
|
|
||||||
- beckn_network
|
|
||||||
ports:
|
|
||||||
- 3005:3005
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./ENV/.env-webhook:/usr/src/app/.env
|
- ./ENV/.env-sandbox:/usr/src/app/.env
|
||||||
|
|
||||||
bpp-client:
|
bpp-client:
|
||||||
image: fidedocker/protocol-server
|
image: fidedocker/protocol-server
|
||||||
|
|||||||
@@ -66,21 +66,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 4010:4000
|
- 4010:4000
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
sandbox-webhook:
|
|
||||||
image: fidedocker/sandbox-webhook-api
|
|
||||||
depends_on:
|
|
||||||
- registry
|
|
||||||
- gateway
|
|
||||||
- sandbox-api
|
|
||||||
container_name: sandbox-webhook
|
|
||||||
networks:
|
|
||||||
- beckn_network
|
|
||||||
ports:
|
|
||||||
- 3005:3005
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./ENV/.env-webhook:/usr/src/app/.env
|
- ./ENV/.env-sandbox:/usr/src/app/.env
|
||||||
|
|
||||||
bpp-client:
|
bpp-client:
|
||||||
image: fidedocker/protocol-server
|
image: fidedocker/protocol-server
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ bpp_network_port=6002
|
|||||||
bpp_subscriber_id="bpp-network"
|
bpp_subscriber_id="bpp-network"
|
||||||
bpp_subscriber_key_id="bpp-network-key"
|
bpp_subscriber_key_id="bpp-network-key"
|
||||||
bpp_subscriber_url="http://bpp-network:6002"
|
bpp_subscriber_url="http://bpp-network:6002"
|
||||||
webhook_url="http://sandbox-webhook:3005"
|
webhook_url="http://sandbox-api:3000"
|
||||||
|
|
||||||
bpp_docker_compose_file=docker-compose-bpp.yml
|
bpp_docker_compose_file=docker-compose-bpp.yml
|
||||||
bpp_docker_compose_file_sandbox=docker-compose-bpp-with-sandbox.yml
|
bpp_docker_compose_file_sandbox=docker-compose-bpp-with-sandbox.yml
|
||||||
|
|||||||
@@ -75,11 +75,6 @@ start_container "sandbox-api"
|
|||||||
sleep 5
|
sleep 5
|
||||||
echo "Sandbox installation successful"
|
echo "Sandbox installation successful"
|
||||||
|
|
||||||
echo "${GREEN}................Installing Webhook................${NC}"
|
|
||||||
start_container "sandbox-webhook"
|
|
||||||
sleep
|
|
||||||
echo "Webhook installation successful"
|
|
||||||
|
|
||||||
echo "${GREEN}................Installing Protocol Server for BPP................${NC}"
|
echo "${GREEN}................Installing Protocol Server for BPP................${NC}"
|
||||||
bash scripts/update_bpp_config.sh
|
bash scripts/update_bpp_config.sh
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|||||||
@@ -127,11 +127,6 @@ install_bpp_protocol_server_with_sandbox(){
|
|||||||
sleep 5
|
sleep 5
|
||||||
echo "Sandbox installation successful"
|
echo "Sandbox installation successful"
|
||||||
|
|
||||||
echo "${GREEN}................Installing Webhook................${NC}"
|
|
||||||
start_container $bpp_docker_compose_file_sandbox "sandbox-webhook"
|
|
||||||
sleep 5
|
|
||||||
echo "Webhook installation successful"
|
|
||||||
|
|
||||||
echo "${GREEN}................Installing Protocol Server for BPP................${NC}"
|
echo "${GREEN}................Installing Protocol Server for BPP................${NC}"
|
||||||
|
|
||||||
if [[ $1 ]];then
|
if [[ $1 ]];then
|
||||||
|
|||||||
Reference in New Issue
Block a user