Setting up Mediator Agent in Ubuntu — (.Net Core service in Linux Box)

Rangesh Sripathi
3 min readAug 4, 2021

--

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 :

  1. Right Click on your project
  2. Click on publish
  3. Now create a new publish profile, and browse the folder where you want to publish your project dll
  4. Click on publish so it will create your dll in the folder

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.debsudo dpkg -i packages-microsoft-prod.debrm packages-microsoft-prod.debsudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-3.1sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update &&\
sudo apt-get install -y aspnetcore-runtime-3.1sudo 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 http://security.ubuntu.com/ubuntu bionic-security main" | sudo tee -a /etc/apt/sources.list.d/bionic.listsudo apt updateapt-cache policy libssl1.0-devsudo 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-

--

--

No responses yet