Skip to content

Commit

Permalink
Merge pull request #1705 from OriginTrail/v6/prerelease/testnet
Browse files Browse the repository at this point in the history
OriginTrail 6.0.0-beta.1.20 Testnet Release
  • Loading branch information
branarakic authored Jan 27, 2022
2 parents b3452a9 + 6a5c9ff commit e21337c
Show file tree
Hide file tree
Showing 51 changed files with 3,167 additions and 1,051 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ yarn-error.log*
lerna-debug.log*
.idea
.origintrail_noderc
.*_origintrail_noderc

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand Down Expand Up @@ -104,3 +105,5 @@ dist

# TernJS port file
.tern-port

data
1 change: 1 addition & 0 deletions .origintrail_noderc_example
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"network": {
},
"ipWhitelist": [
"::1",
"127.0.0.1"
]
}
23 changes: 23 additions & 0 deletions Alpine.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM node:14-alpine3.15

LABEL maintainer="OriginTrail"
ENV NODE_ENV=testnet

#Install Papertrail
RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz
RUN tar xzf ./remote_syslog_linux_amd64.tar.gz && cd remote_syslog && cp ./remote_syslog /usr/local/bin

COPY config/papertrail.yml /etc/log_files.yml

#Install nodemon & forever
RUN npm install forever -g

WORKDIR /ot-node

COPY . .

#Install nppm
RUN npm install



41 changes: 41 additions & 0 deletions Ubuntu.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#base image
FROM ubuntu:20.04

MAINTAINER OriginTrail
LABEL maintainer="OriginTrail"
ENV NODE_ENV=testnet

#Install git, nodejs, mysql, python
RUN apt-get -qq update && apt-get -qq -y install curl
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get -qq update
RUN apt-get -qq -y install wget apt-transport-https
RUN apt-get -qq -y install git nodejs
RUN apt-get -qq -y install mysql-server unzip nano
RUN apt-get -qq -y install make python

#Install Papertrail
RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz
RUN tar xzf ./remote_syslog_linux_amd64.tar.gz && cd remote_syslog && cp ./remote_syslog /usr/local/bin
COPY config/papertrail.yml /etc/log_files.yml



#Install nodemon
RUN npm install -g forever


WORKDIR /ot-node

COPY . .


#Install npm
RUN npm install


#Intialize mysql
RUN usermod -d /var/lib/mysql/ mysql
RUN echo "disable_log_bin" >> /etc/mysql/mysql.conf.d/mysqld.cnf
RUN service mysql start && mysql -u root -e "CREATE DATABASE operationaldb /*\!40100 DEFAULT CHARACTER SET utf8 */; update mysql.user set plugin = 'mysql_native_password' where User='root'/*\!40100 DEFAULT CHARACTER SET utf8 */; flush privileges;" && npx sequelize --config=./config/sequelizeConfig.js db:migrate

15 changes: 15 additions & 0 deletions config/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"development": {
"appDataPath": "data",
"autoUpdate": {
"enabled": false,
"branch": "v6/develop",
Expand All @@ -16,23 +17,28 @@
}
],
"graphDatabase": {
"name": "node0",
"username": "admin",
"password": ""
},
"logLevel": "trace",
"rpcPort": 8900,
"network": {
"port": 9000,
"bootstrap": []
},
"ipWhitelist": [
"::1",
"127.0.0.1"
],
"telemetryHub": {
"enabled": false,
"packages": ["ot-telemetry-collector"],
"url": ""
}
},
"testnet": {
"appDataPath": "data",
"autoUpdate": {
"enabled": true,
"branch": "v6/release/testnet",
Expand All @@ -49,47 +55,56 @@
}
],
"graphDatabase": {
"name": "node0",
"username": "admin",
"password": ""
},
"logLevel": "trace",
"rpcPort": 8900,
"network": {
"port": 9000,
"bootstrap": [
"/ip4/165.232.122.94/tcp/9000/p2p/QmQ2zigjQikYnyYUSXZydNXrDRhBut2mubwJBaLXobMt3A",
"/ip4/46.101.111.223/tcp/9000/p2p/QmdTKEP4DDSwYzX2CHEsBfpEAKAVyE4mPq9ouh4ehZZbg5",
"/ip4/46.101.153.21/tcp/9000/p2p/QmXzmTqVT3TPUtTz4dBDN5NWSABqnX9rKXCG9WCLXMfEaM"
]
},
"ipWhitelist": [
"::1",
"127.0.0.1"
],
"telemetryHub": {
"enabled": true,
"packages": ["ot-telemetry-collector"],
"url": "https://polaris.delta.origin-trail.network/metrics/"
}
},
"mainnet": {
"appDataPath": "data",
"autoUpdate": {
"enabled": true,
"branch": "v6/release/mainnet",
"backupDirectory": "../backup"
},
"blockchain": [],
"graphDatabase": {
"name": "node0",
"username": "admin",
"password": ""
},
"logLevel": "trace",
"rpcPort": 8900,
"network": {
"port": 9000,
"bootstrap": []
},
"ipWhitelist": [
"::1",
"127.0.0.1"
],
"telemetryHub": {
"enabled": false,
"packages": ["ot-telemetry-collector"],
"url": ""
}
}
Expand Down
6 changes: 6 additions & 0 deletions config/papertrail.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
files:
- /ot-node/complete-node.log
destination:
host: logs4.papertrailapp.com
port: 39178
protocol: tls
39 changes: 39 additions & 0 deletions docker/docker-compose-alpine.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: '3'

services:
graphdb:
container_name: graphdb
image: khaller/graphdb-free:latest
network_mode: host


mysql:
container_name: mysql
image: mysql:8.0.17
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_ROOT_PASSWORD: null
MYSQL_DATABASE: operationaldb
expose:
- 3306
network_mode: host

ot-node:
container_name: ot-node
image: origintrail/ot-node:v6.0.0-beta.1-alpine
depends_on:
- graphdb
- mysql
expose:
- 8900
- 9000
command:
- '/bin/sh'
- '-c'
- '/bin/sleep 25 && npx sequelize --config=./config/sequelizeConfig.js db:migrate && forever index.js'


volumes:
- ${PWD}/.origintrail_noderc:/ot-node/.origintrail_noderc
- ~/certs/:/root/certs/
network_mode: host
26 changes: 26 additions & 0 deletions docker/docker-compose-ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: '3.8'
services:
graphdb:
container_name: graphdb
image: khaller/graphdb-free:latest
network_mode: host

ot-node:
container_name: ot-node
image: origintrail/ot-node:v6.0.0-beta.1-ubuntu
depends_on:
- graphdb
expose:
- 8900
- 9000
command: >
bash -c "
/bin/sleep 35
service mysql restart &&
forever index.js
"
volumes:
- ${PWD}/.origintrail_noderc:/ot-node/.origintrail_noderc
- ~/certs/:/root/certs/
network_mode: host

Loading

0 comments on commit e21337c

Please sign in to comment.