You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@milagro.apache.org by jo...@apache.org on 2019/09/03 15:03:12 UTC

[incubator-milagro-dta] branch readme created (now b66cc8e)

This is an automated email from the ASF dual-hosted git repository.

johnmcw pushed a change to branch readme
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-dta.git.


      at b66cc8e  README install instructions updated

This branch includes the following new commits:

     new b66cc8e  README install instructions updated

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-milagro-dta] 01/01: README install instructions updated

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

johnmcw pushed a commit to branch readme
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-dta.git

commit b66cc8e9c1d278444075314ad130368e75c35a6c
Author: John McCane-Whitney <jo...@espians.com>
AuthorDate: Tue Sep 3 16:02:47 2019 +0100

    README install instructions updated
---
 README.md | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 137 insertions(+), 16 deletions(-)

diff --git a/README.md b/README.md
index b9f07cd..00b0c72 100644
--- a/README.md
+++ b/README.md
@@ -31,8 +31,17 @@ Milagro D-TA provides a basic set of services for creating identities for actors
 2. **SafeGuardSecret** Encrypts a string and decrypts it again
 
 ## Installation
-To see Milagro D-TA in action you can run Milagro D-TA in a docker container
+Below are instructions on how to build and run the Milagro D-TA either using Docker, or static or dynamic builds for Linux.
 
+These instructions will build the service with default settings including an embeded IPFS node connected to a Public IPFS network. This will get you up and running quickly but will turn your D-TA into a public IPFS relay. **Not recommended for production use!**
+
+### Docker
+To see Milagro D-TA in action you can run Milagro D-TA in a docker container.  This is currently the preferred method to build and run the D-TA.  Tested on Ubuntu 19.04 and MacOS but should run in any Docker environment.
+
+#### Prerequisites
+[Docker](https://www.docker.com/)
+
+#### Build & Run Instructions
 ```
 git clone https://github.com/apache/incubator-milagro-dta.git
 
@@ -43,13 +52,34 @@ docker build -t mydta .
 docker run -p5556:5556 mydta
 ```
 
-## Dependencies
+### Linux Static Build
+Note that this has only been tested on a clean build of Debian 10 and installs all required libraries statically
+
+#### Prerequisites
+[Golang](https://golang.org/doc/install)
+
+#### Build & Run Instructions
+```
+sudo apt-get update
+sudo apt-get upgrade
+git clone https://github.com/apache/incubator-milagro-dta.git
+cd incubator-milagro-dta
+./build-static.sh
+cd bin
+./milagro init
+./milagro daemon
+```
+
+### Linux Dynamic Build
+Note that the static build above doesn't work on Ubuntu, so instead please use these instructions.  Note that these have only been tested on a clean build of Ubuntu 18.04.
 
-To correctly build the software on Ubuntu 18.04 you need to install the following packages;
+#### Prerequisites
+To correctly build the software on Ubuntu 18.04 you need to install the following packages:
 
+#### Development Tools
 ```
 sudo apt-get update
-sudo apt-get install -y --no-install-recommends \
+sudo apt-get install \
      ca-certificates \
      cmake \
      g++ \
@@ -61,10 +91,9 @@ sudo apt-get install -y --no-install-recommends \
      libssl-dev \
      jq \
      curl
-sudo apt-get clean
 ```
 
-### liboqs
+#### liboqs
 
 [liboqs](https://github.com/open-quantum-safe/liboqs) is a C library for
 quantum-resistant cryptographic algorithms. It is a API level on top of the
@@ -81,7 +110,7 @@ make -j
 sudo make install
 ```
 
-### AMCL
+#### AMCL
 
 [AMCL](https://github.com/apache/incubator-milagro-crypto-c) is required
 
@@ -98,44 +127,136 @@ make test
 sudo make install
 ```
 
-### Install pqnist
+#### pqnist
 
 ```
+git clone https://github.com/apache/incubator-milagro-dta.git
 cd incubator-milagro-dta/libs/crypto/libpqnist
 mkdir build
 cd build
 cmake -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_SHARED_LIBS=ON ..
 make
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
 make test
 sudo make install
 ```
 
-### golang
+#### golang
 
 Download and install [Golang](https://golang.org/dl/)
 
 
-## Run service
+#### Set the library path
+```
+export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/lib
+```
 
-Set the library paths
+#### Build & Run Instructions
+```
+./build.sh
+```
+
+To run the service with default settings:
 
 ```
+./target/milagro init
+./target/milagro daemon 
+```
+
+### MacOS 
+
+These instructions have been tested on MaxOS Mojave 10.14.6
+
+#### Prerequisites
+To correctly build the software on MacOS you need to install the following packages:
+
+#### Brew
+To allow the additional packages below to be installed, [Brew](https://docs.brew.sh/Installation) is required.
+
+#### Development Tools
+```
+brew install \
+     ca-certificates \
+     cmake \
+     g++ \
+     gcc \
+     git \
+     make \
+     libtool \
+     automake \
+     libssl-dev \
+     jq \
+     curl
+```
+
+#### liboqs
+
+[liboqs](https://github.com/open-quantum-safe/liboqs) is a C library for
+quantum-resistant cryptographic algorithms. It is a API level on top of the
+NIST round two submissions.
+
+```
+git clone https://github.com/open-quantum-safe/liboqs.git
+cd liboqs
+git checkout 7cb03c3ce9182790c77e69cd21a6901e270781d6 
+autoreconf -i
+./configure --disable-shared --disable-aes-ni --disable-kem-bike --disable-kem-frodokem --disable-kem-newhope --disable-kem-kyber --disable-sig-qtesla 
+make clean
+make -j
+sudo make install
+```
+
+#### AMCL
+
+[AMCL](https://github.com/apache/incubator-milagro-crypto-c) is required
+
+Build and install the AMCL library
+
+```
+git clone https://github.com/apache/incubator-milagro-crypto-c.git
+cd incubator-milagro-crypto-c
+mkdir build
+cd build
+cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=ON -D AMCL_CHUNK=64 -D AMCL_CURVE="BLS381,SECP256K1" -D AMCL_RSA="" -D BUILD_PYTHON=OFF -D BUILD_BLS=ON -D BUILD_WCC=OFF -D BUILD_MPIN=OFF -D BUILD_X509=OFF -D CMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_C_FLAGS="-fPIC" ..
+make
+make test
+sudo make install
+```
+
+#### pqnist
+
+```
+git clone https://github.com/apache/incubator-milagro-dta.git
+cd incubator-milagro-dta/libs/crypto/libpqnist
+mkdir build
+cd build
+cmake -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_SHARED_LIBS=ON ..
+make
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
-export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/lib
+make test
+sudo make install
 ```
 
-## Run Service
+#### golang
 
-This script will build the service with default settings including an embeded IPFS node connected to a Public IPFS network. This will get you up and running quickly but will turn your D-TA into a public IPFS relay. **Not recommended for production use!**
+Download and install [Golang](https://golang.org/dl/)
+
+
+#### Set the library path
+```
+export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/lib
+```
 
+#### Build & Run Instructions
 ```
 ./build.sh
 ```
 
-To run the service with default settings
+To run the service with default settings:
 
 ```
-./target/service
+./target/milagro init
+./target/milagro daemon 
 ```
 
 ## Documentation