Following is the step by step guide to install OSSVerse-In-A-Box in a single machine.
- Netwrok Components
1.1 Registry
1.2 Gateway - Buyer Components
2.1 Buyer Network Protocol
2.2 Buyer App
2.3 Buyer UI - Seller Components
3.1 Seller Netwrok Protocol
3.2 Seller App and Seller API
3.3 Seller UI
- A Linux machine or VM with ubuntu 22.04 installed on it.
- Recomended hardware for machine is 2 cpu, 8GB RAM and 50 GB storage.
- Machine should be connected to internet.
- A domain name to access the OIAB components.
- Install the required tools and settings before installing the OIAB components.
Follow the below steps to install docker in your machine.
# apt update
# apt upgrade -y
# apt install -y ca-certificates curl software-properties-common
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# add-apt-repository -y “deb [arch=arm64] https://download.docker.com/linux/ubuntu focal stable”
# apt update
# apt install -y docker-ce docker-ce-cli containerd.io
# usermod -aG docker $USER
# systemctl restart docker
- Install Nginx
# apt update
# apt upgrade -y
- Configure Nginx
-
touch /etc/nginx/sites-available/registry.<domain name>.com
- Open and add the following text in the file.
server { listen 80; listen [::]:80; server_name registry.DOMAINNAME.com www.registry.DOMAINNAME.com; location / { proxy_pass http://0.0.0.0:3030; include proxy_params; } }
- Open and add the following text in the file.
-
touch /etc/nginx/sites-available/gateway.<domain name>.com
- Open and add the following text in the file.
server { listen 80; listen [::]:80; server_name gateway.DOMAINNAME.com www.gateway.DOMAINNAME.com; location / { proxy_pass http://0.0.0.0:4030; include proxy_params; } }
-
touch /etc/nginx/sites-available/bapnetwork.<domain name>.com
-
Open and add the following text in the file.
server { listen 80; listen [::]:80; server_name bapnetwork.DOMAINNAME.com www.bapnetwork.DOMAINNAME.com; location / { proxy_pass http://0.0.0.0:5002; include proxy_params; } }
-
touch /etc/nginx/sites-available/registry.<domain name>.com
-
Open and add the following text in the file.
server { listen 80; listen [::]:80; server_name bapclient.DOMAINNAME.com www.bapclient.DOMAINNAME.com; location / { proxy_pass http://0.0.0.0:5001; include proxy_params; } }
-
touch /etc/nginx/sites-available/byerapi.<domain name>.com
-
Open and add the following text in the file.
server { listen 80; listen [::]:80; server_name buyerapi.DOMAINNAME.com www.buyerapi.DOMAINNAME.com; location / { proxy_pass http://0.0.0.0:8000; include proxy_params; } }
-
touch /etc/nginx/sites-available/buyerui.<domain name>.com
-
Open and add the following text in the file.
server { listen 80; listen [::]:80; server_name buyerui.DOMAINNAME.com www.buyerui.DOMAINNAME.com; location / { proxy_pass http://0.0.0.0:3030; include proxy_params; } }
- Open and add the following text in the file.
-
touch /etc/nginx/sites-available/bppnetwork.<domain name>.com
- Open and add the following text in the file.
server { listen 80; listen [::]:80; server_name bppnetwork.DOMAINNAME.com www.bppnetwork.DOMAINNAME.com; location / { proxy_pass http://0.0.0.0:6002; include proxy_params; } }
-
touch /etc/nginx/sites-available/bppclient.<domain name>.com
-
Open and add the following text in the file.
server { listen 80; listen [::]:80; server_name bppclient.DOMAINNAME.com www.bppclient.DOMAINNAME.com; location / { proxy_pass http://0.0.0.0:6001; include proxy_params; } }
- Open and add the following text in the file.
-
touch /etc/nginx/sites-available/registry.<domain name>.com
- Open and add the following text in the file.
server { listen 80; listen [::]:80; server_name registry.DOMAINNAME.com www.registry.DOMAINNAME.com; location / { proxy_pass http://0.0.0.0:3030; include proxy_params; } }
- Open and add the following text in the file.
-
touch /etc/nginx/sites-available/sellerapi.<domain name>.com
- Open and add the following text in the file.
server { listen 80; listen [::]:80; server_name sellerapi.DOMAINNAME.com www.sellerapi.DOMAINNAME.com; location / { proxy_pass http://0.0.0.0:3001; include proxy_params; } }
-
touch /etc/nginx/sites-available/sellerwenhook.<domain name>.com
-
Open and add the following text in the file.
server { listen 80; listen [::]:80; server_name sellerwebhook.DOMAINNAME.com www.sellerwebhook.DOMAINNAME.com; location / { proxy_pass http://0.0.0.0:3008; include proxy_params; } }
-
touch /etc/nginx/sites-available/sellerui.<domain name>.com
-
Open and add the following text in the file.
server { listen 80; listen [::]:80; server_name sellerui.DOMAINNAME.com www.sellerui.DOMAINNAME.com; location / { proxy_pass http://0.0.0.0:7001; include proxy_params; } }
- Open and add the following text in the file.
-
Soft Link all the nginx configurations
# ln -s /etc/nginx/sites-available/registry.<domain name>.com /etc/nginx/sites-enabled/registry.<domain name>.com
# ln -s /etc/nginx/sites-available/gateway.<domain name>.com /etc/nginx/sites-enabled/gateway.<domain name>.com
# ln -s /etc/nginx/sites-available/bapnetwork.<domain name>.com /etc/nginx/sites-enabled/bapnetwork.<domain name>.com
# ln -s /etc/nginx/sites-available/bapclient.<domain name>.com /etc/nginx/sites-enabled/bapclient.<domain name>.com
# ln -s /etc/nginx/sites-available/buyerapi.<domain name>.com /etc/nginx/sites-enabled/buyerapi.<domain name>.com
# ln -s /etc/nginx/sites-available/buyerui.<domain name>.com /etc/nginx/sites-enabled/buyerui.<domain name>.com
# ln -s /etc/nginx/sites-available/bppnetwork.<domain name>.com /etc/nginx/sites-enabled/bppnetwork.<domain name>.com
# ln -s /etc/nginx/sites-available/bppclient.<domain name>.com /etc/nginx/sites-enabled/bppclient.<domain name>.com
# ln -s /etc/nginx/sites-available/sellerapi.<domain name>.com /etc/nginx/sites-enabled/sellerapi.<domain name>.com
# ln -s /etc/nginx/sites-available/sellerwebhook.<domain name>.com /etc/nginx/sites-enabled/sellerwebhook.<domain name>.com
# ln -s /etc/nginx/sites-available/sellerui.<domain name>.com /etc/nginx/sites-enabled/sellerui.<domain name>.com
- Restart nginx
# systemctl restart nginx
Network is the backbone for the Ossverse and contains the crucial components registry and gateway.
- Login to the Linux Machine as sudo.
- Execute
# apt update
# apt upgrade
# cd /opt
# git clone https://github.com/beckn/beckn-onix.git
# cd /opt/beckn-onix/install
# ./beckn-onix.sh
- Following screen appears:
Beckn-ONIX is a platform that helps you quickly launch and configure beckn-enabled networks.
What would you like to do?
1. Join an existing network
2. Create new production network
3. Set up a network on your local machine
4. Merge multiple networks
5. Configure Existing Network
(Press Ctrl+C to exit)
Enter your choice:
- Enter 2.
Following appears:
Which platform would you like to set up?
1. Registry
2. Gateway
3. BAP
4. BPP
Enter your choice:
- Enter 1 When asked for URL as below
Proceeding with the setup for Registry...
Enter publicly accessible registry URL:
-
Enter the registry url i.e http://registry.DOMAINNAME.com
-
Once script is excuted fully. Do
# cd /apt/beckn-onix/install
# ./beckn-onix.sh
What would you like to do?
1. Join an existing network
2. Create new production network
3. Set up a network on your local machine
4. Merge multiple networks
5. Configure Existing Network
(Press Ctrl+C to exit)
Enter your choice:
- Enter 1
Which platform would you like to set up?
1. Gateway
2. BAP
3. BPP
- Enter 1
Proceeding with the setup for Gateway...
Enter your registry URL:
-
Enter the registry URL i.e http://registry.DOMAINNAME.com
-
Check the registry and gateway containers are UP.
# docker ps -a
-
Open the registry UI in a browser using URL http://registry.DOMAINNAME.com
-
Login using root/root.
-
Click on Beckn tab as shown and select Network Domain in drob down.
-
Fill the above details and press done.
-
Click on Admin Tab and select "Network Participants" from drop down.
-
In "Netwrok Domain" field enter "*" and select the Network Domain appeared in drop down as shown.
-
Click Done and Save.
Network Compnents are Setup.
- Execute
# cd /opt/beckn-onix/install
# ./beckn-onix.sh
Beckn-ONIX is a platform that helps you quickly launch and configure beckn-enabled networks.
What would you like to do?
1. Join an existing network
2. Create new production network
3. Set up a network on your local machine
4. Merge multiple networks
5. Configure Existing Network
(Press Ctrl+C to exit)
Enter your choice:
- Enter 1.
Which platform would you like to set up?
1. Gateway
2. BAP
3. BPP
Enter your choice:
- Enter 2
Proceeding with the setup for BAP...
................Installing Protocol Server for BAP................
Enter BAP Subscriber ID:
- Enter BAP suscriber ID. Can be any unique string. Usually BAP Network url is used. e.g bapnetwork.DOMAINNAME.com
Enter the BAP Network URL:
- Enter the BAP Netwrok URL e.g http://bapnetwork.DOMAINNAME.com
Enter your registry URL:
-
Enter the registry URL with subscribers appended to it. e.g http://registry.DOMAINNAME.com/subscribers
-
Confirm that the BAP network and client installed sucessfully and docker cotainers are running using
#docker ps -a
-
On completion of script Change the Network Participant Status from INITIATED to SUBSCRIBED in registry as shown in steps 12 to 22 in section Netwotk Installation above.
-
Update the Layer 2 for BAP Network and BAP Client as follows:
# cd /opt/beckn-onix/layer2/samples/
# docker cp retail_1.1.0.yaml bap-client:/usr/src/app/schemas/Software\ Assurance_1.1.0.yaml
# docker cp retail_1.1.0.yaml bap-network:/usr/src/app/schemas/Software\ Assurance_1.1.0.yaml
# docker restart bap-network bap-client
- Install buyer api
# cd /apt
# git clone https://github.com/OSSVerse/OSSverse-buyer-app.git
# cd /opt/ ossverse-buyer-app
# vi .env.default
- Edit following fields
i. PROTOCOLO_SERVER_URL: <Enter the BAP client URL here>
ii. BAP_ID: <Enter the BAP ID we provided during installation>
iii. BAP_URL: <Enter the BAP Network URL>
- Update the Docker Compose
# vi docker-compose.yaml
-
Change the PORT number for Mongo DB from 27017:27017 to 27018:27017
-
Bring up the docker
# docker compose up –build -d
- Check the containers are UP and running using
# docker ps -a
- Bring up the docker compose
# docker compose up –build -d
- Install Buer UI
# cd /opt
# git clone https://github.com/OSSVerse/ossverse-buyer-app-ui.git
# cd ossverse-buyer-app-ui
# vi Dockerfile
- Change the Node Image version to 20.11.1.
- Execute
# docker build -y buyerappui .
# docker run -d –name buyerappui -p 7000:80 buyerappui
- Got to Beck folder and execute
# cd /opt/beckn-onix/install
# ./beckn-onix.sh
Beckn-ONIX is a platform that helps you quickly launch and configure beckn-enabled networks.
What would you like to do?
1. Join an existing network
2. Create new production network
3. Set up a network on your local machine
4. Merge multiple networks
5. Configure Existing Network
(Press Ctrl+C to exit)
Enter your choice
- Enter 1
Which platform would you like to set up?
1. Gateway
2. BAP
3. BPP
Enter your choice:
- Enter 3.
Proceeding with the setup for BPP...
................Installing Protocol Server for BPP................
Enter BPP Subscriber ID:
- Enter the BPP subscriber ID. can be any unique string. Uslally BPP network url used for this. e.g bppnetwork.DOMAINNAME.com
Enter BPP Subscriber URL:
- Enter the URL for bpp network. e.g http://bppnetwork.DOMAINNAME.com
Enter the Registry URL:
- Enter the registry URL e.g http://registry.DOMAINNAME.com/subscribers
Enter the Webhook URL:
-
Enter the webhook URL appended with "api/vi/client/handler" e.g http://sellerwebhook.DOMAINNAME.com/api/v1/client/handler
-
After complete execution of script, verify that the bpp-network and bpp-client containers are UP and running.
# docker ps -a
-
Change the Network Participant Status from INITIATED to SUBSCRIBED in registgry by following steps from 12 - 22 in Network Installation section above. Update the status and Network domain for bapnetwork.DOMAINNAME.com network pariticipant.
-
Setup the layer 2 for BPP Network and BPP client as below.
# cd /opt/beckn-onix/layer2/samples/
# docker cp retail_1.1.0.yaml bpp-client:/usr/src/app/schemas/Software\ Assurance_1.1.0.yaml
# docker cp retail_1.1.0.yaml bpp-network:/usr/src/app/schemas/Software\ Assurance_1.1.0.yaml
# docker restart bpp-client bpp-network
- Install Seller API
# cd /apt
# git clone https://github.com/OSSVerse/oasp-seller-app.git
# cd /opt/ oasp-seller-app
# vi ./seller/.env
- Change following:
OPENFORT_SELLER_URL: <Enter the BPP api URL here e.g api.<domain name>.com >
- Whitelist the api URL
# vi seller/app/config/environments/base/env.cors.js
Change the following
‘whitelistUrls’ : [
'Already exitisting URL',
'already existing URL',
'http://sellerapi.DOMAINNAME.com'
]
- Open and change following configurations
# vi seller-app-api/lib/config/production_env_config.json
Whitelist the CORS url for sellerapi
“cors”: {
“whitelistUrls: [
"Already existing URL",
"Already existing URL",
“http://sellerapi.<domain name>.com”
]
}
Also change BPP ID and BPP URL
“sellerConfig”: {
“BPP_ID”: <BPP ID entered while installing”
“BPP URL”: <BPP Client URL mapped e.g bppclient.<domain name>.com >
}
-
Save and exit
-
Open
# vi ./seller/.env
- Change follwing to point to sellerapi URL e.g http://api.DOMAINNANME.com
OPENFORT_SELLER_APP
- Bring UP the containers
# docker-compose up –build -d
-
Verify that all the database and seller app containers are UP.
-
Check the sellerapi url is accesible using swagger. Enger the following URL in browser and verify to access the APIs.
http://sellerapi.DOMAINNAME.com/api-docs/
- Install Seller UI
# cd /opt
# git clone https://github.com/OSSVerse/oasp-seller-app-ui.git
# cd oasp-seller-app-ui
# vi Dockerfile
- Change the node image version to 20.11.1. Also change the following variable to point to sellerapi URL and append "api/v1" at the end of URL. e.g http://sellerapi.DOMAINNAME.COM/api/v1
ENV VITE_API_BASE_URL: <Enter the seller api URL with "api/v1" appended to it at last.>
# cp example.env .env
- Bring UP containers
# docker build -y sellerui .
# docker run -d –name sellerui -p 7001:80 sellerui
- Verify that the Seller UI container is UP and running using
docker ps -a
Also, verify that the Seller UI is accessible at http://sellerui.DOMAINNAME.com
-
Create the Organisation and Products in seller app by following below steps:
- Open the seller api swagger using the URL
http://sellerapi.DOMAINNAME.com/api-docs/
-
Expand the POST method of OASP-APIS->Authentication api as shown.
-
Click "Try it out" and change the body as follows:
{ “email”: “[email protected]”, “password”: “Super@123” }
-
Copy the access token received as a response from above request. Refer below.
-
Add new organisation by executing POST method for oasp-api->Organisation api.
-
Click on "Try it out". Paste the access token copied above into "access-token" field as shown. Do not remove the Bearer key.
Also update the Organisation details in the body such as Organisation Name, Password , email etc. as shown below.
-
Click Excute and verify response is 200 OK.
-
Add products
-
Login and get the access tocken by repeating steps 1 -5 above by using new oganisation email password in the body.
-
Open the POST methid of oasp->products api and click on execute as done above.
-
Click on "Try it out" and enter the access token obtained in step 10 above.
-
Update the product details in product body and click on execute button.
-
Verify 200 OK as response.
-
Check the product is listed by GET method for oasp-api->products api. Use the new organisation in body to list all products from the organisation and remove any specific search criterion from body.
-
Verify the product is listed in response body in GET request.