Setting up Mediator Agent in Ubuntu - (.Net Core service in Linux Box)
Rangesh Sripathi
Blockchain Specialist | 10x Patents in Decentralized Systems | Decade of Experience Driving Innovation | Open for SDE2 / Engineering Manager Roles
This article talks about deploying .Net Core service in Ubuntu. In a Self Sovereign Environment supported by Hyperledger Indy / Aries agent framework , Mediator Agent is one of the essential components that acts as postman service between Issuer /Verifier Aries Agent and Mobile Agent. If you prefer to choose ACA-PY version of Issuer/ Verifier Agent it runs in Python and preferred version is to run with Ubuntu, while Mediator Agent runs with .Net core , we may have to opt in for IIS/Kestrel for deployment with Windows Box. To deploy a routing service ,its not wise decision to spin up and have dedicated Windows Box rather we would utilize the Cross platform advantage of .Net core and deploy the same service in Ubuntu. This post shares the steps to deploy a .Net service in Ubuntu and does not covers the Blockchain aspect of Self Sovereign Identity.
Steps for Publishing the Mediator agent :
Mediator Agent deployed as dll in publish folder.
Steps for .Net core Installation in Ubuntu
Now that we have got the Mediator agent published, Lets get the required components installed in Ubuntu(V20).
1. Install with APT
2.Install .Net core version 3.1 and Run time version 3.1
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-3.1
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update &&\
sudo apt-get install -y aspnetcore-runtime-3.1
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-runtime-3.1
The above steps will ensure we have all the required components for .Net core
Steps for Installing LibIndy Service :
echo "deb https://security.ubuntu.com/ubuntu bionic-security main" | sudo tee -a /etc/apt/sources.list.d/bionic.list
领英推荐
sudo apt update
apt-cache policy libssl1.0-dev
sudo apt-get install libssl1.0-dev
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88
RUN add-apt-repository "deb https://repo.sovrin.org/sdk/deb xenial stable"
RUN apt-get update
RUN apt-get install -y libindy=1.14.2
This will ensure that LibIndy is installed and can be consumed by Mediator agent.
Lets try running the Mediator agent , we have all the required dependencies from Ubuntu box.
I have used nginx with apache to host the mediator agent , Intention of above exercise is to take the cross-platform advantage of .Net core and streamline the services / deployment.
Reference :
https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2004-
Senior DevOps Architect | CKAD | AWS Certified Developer | Azure Certified | GitLab Certified | Docker | Jenkins | DevSecOps | Ansible | CloudOps | Linux | Java Spring | Shell Scripting | Selenium | Terraform | MLOps
3 年Wow Rangesh ??