This repository contains a docker-compose setup intended for use toward the ENTRUST research project for development purposes locally and deployment to the Tellu R&I research cloud VM in AWS.
Use the following command in an appropriate terminal in the root folder of the repository: You might need to run with "sudo" prefix.
- docker-compose build
- docker-compose up -d
-
Create a tarball of the repository locally (I've done it in Ubuntu by accessing the local repository through the /mnt/c/:
tar czf compose-entrust.tar.gz compose-entrust
-
Push the tarball to the AWS server (requires ssh set up according to https://telludoc.atlassian.net/wiki/spaces/TDO/pages/2675179619/AWS+Server+for+R+I+projects)
scp -i ~/.ssh/eratosthenes.pem compose-entrust.tar.gz ubuntu@ec2-3-254-120-13.eu-west-1.compute.amazonaws.com:entrust
-
SSH into the remote server
ssh -i ~/.ssh/eratosthenes.pem ubuntu@ec2-3-254-120-13.eu-west-1.compute.amazonaws.com
-
Extract the tarball
cd entrust tar xzf compose-entrust.tar.gz cd compose-entrust
-
Build docker image (with sudo) sudo docker-compose build
-
Deploy sudo docker-compose up -d
- Navigate to onboarding-server directory
cd onboarding server
- Install dependencies
npm install
- Execute npm build-and-start command
npm run build-and-start
http://localhost:3010/register?macAddress=user2
Registers a new user in the sqlite database (generating new secret)
http://localhost:3010/Claim?macAddress=user2
Changes the entry claimRequested to True in the database (pairing mode)
http://localhost:3010/getCredentials?macAddress=user2
Registers new user in the RabbbitMQ database.
Unclaim a device and deletes it from the RabbitMQ database