Skip to content

Commit

Permalink
Merge pull request #1434 from OriginTrail/prerelease/testnet
Browse files Browse the repository at this point in the history
OriginTrail Testnet Release v4.1.16
  • Loading branch information
djordjekovac authored Jan 29, 2021
2 parents 6dd9567 + b22eeb0 commit 71f6baa
Show file tree
Hide file tree
Showing 69 changed files with 3,052 additions and 451 deletions.
62 changes: 62 additions & 0 deletions Dockerfile.psql.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#base image
FROM ubuntu:16.04
MAINTAINER OriginTrail
LABEL maintainer="OriginTrail"
ARG targetEnvironment=development

ENV NODE_ENV=$targetEnvironment
ENV GRANAX_USE_SYSTEM_TOR=1
ENV OT_NODE_DISTRIBUTION=docker
ENV DB_TYPE=psql

RUN apt-get -qq update && apt-get -qq -y install curl
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash -
RUN apt-get -qq update && apt-get -qq -y install wget apt-transport-https software-properties-common build-essential git nodejs sqlite unzip nano
RUN add-apt-repository -y ppa:ethereum/ethereum && apt-get -qq update && apt-get install -y -qq ethereum geth
#ArangoDB
ADD testnet/install-arango.sh /install-arango.sh
RUN ["chmod", "+x", "/install-arango.sh"]
RUN /install-arango.sh

RUN export LC_ALL=C
RUN apt-get install -y libpq-dev
RUN apt-get update && apt install -y -qq supervisor
RUN mkdir -p /var/log/supervisor
COPY testnet/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN apt-get -y install nano wget

#PostgresDB
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |tee /etc/apt/sources.list.d/pgdg.list
RUN apt-get update && apt-get install -y python-software-properties software-properties-common postgresql-12 postgresql-client-12 postgresql-contrib-12
USER postgres
RUN /etc/init.d/postgresql start &&\
psql --command "CREATE USER root WITH SUPERUSER PASSWORD 'origintrail'" &&\
createdb -O root ot_node_db
USER root
RUN echo "host replication all 0.0.0.0/0 trust" >> /etc/postgresql/12/main/pg_hba.conf
RUN echo "listen_addresses='*'" >> /etc/postgresql/12/main/postgresql.conf
RUN echo "wal_level = replica" >> /etc/postgresql/12/main/postgresql.conf
RUN echo "max_wal_senders = 10" >> /etc/postgresql/12/main/postgresql.conf
RUN echo "wal_keep_segments = 64" >> /etc/postgresql/12/main/postgresql.conf
RUN echo "hot_standby = on" >> /etc/postgresql/12/main/postgresql.conf
EXPOSE 5432
VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
CMD ["/usr/lib/postgresql/12/bin/postgres", "-D", "/var/lib/postgresql/12/main", "-c", "config_file=/etc/postgresql/12/main/postgresql.conf"]

# Creating link
RUN mkdir -p /ot-node/init
RUN ln -s /ot-node/init /ot-node/current

# Add files
COPY . /ot-node/current
RUN /etc/init.d/postgresql start && service arangodb3 start && cd /ot-node/current && npm install

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
ADD testnet/papertrail.yml /etc/log_files.yml

WORKDIR /ot-node/current

EXPOSE 5278 8900 3000 3010
CMD ["/usr/bin/supervisord", "-c", "/ot-node/current/testnet/supervisord.conf"]
62 changes: 62 additions & 0 deletions Dockerfile.psql.mainnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#base image
FROM ubuntu:16.04
MAINTAINER OriginTrail
LABEL maintainer="OriginTrail"
ARG targetEnvironment=mainnet

ENV NODE_ENV=$targetEnvironment
ENV GRANAX_USE_SYSTEM_TOR=1
ENV OT_NODE_DISTRIBUTION=docker
ENV DB_TYPE=psql

RUN apt-get -qq update && apt-get -qq -y install curl
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash -
RUN apt-get -qq update && apt-get -qq -y install wget apt-transport-https software-properties-common build-essential git nodejs sqlite unzip nano
RUN add-apt-repository -y ppa:ethereum/ethereum && apt-get -qq update && apt-get install -y -qq ethereum geth
#ArangoDB
ADD testnet/install-arango.sh /install-arango.sh
RUN ["chmod", "+x", "/install-arango.sh"]
RUN /install-arango.sh

RUN export LC_ALL=C
RUN apt-get install -y libpq-dev
RUN apt-get update && apt install -y -qq supervisor
RUN mkdir -p /var/log/supervisor
COPY testnet/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN apt-get -y install nano wget

#PostgresDB
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |tee /etc/apt/sources.list.d/pgdg.list
RUN apt-get update && apt-get install -y python-software-properties software-properties-common postgresql-12 postgresql-client-12 postgresql-contrib-12
USER postgres
RUN /etc/init.d/postgresql start &&\
psql --command "CREATE USER root WITH SUPERUSER PASSWORD 'origintrail'" &&\
createdb -O root ot_node_db
USER root
RUN echo "host replication all 0.0.0.0/0 trust" >> /etc/postgresql/12/main/pg_hba.conf
RUN echo "listen_addresses='*'" >> /etc/postgresql/12/main/postgresql.conf
RUN echo "wal_level = replica" >> /etc/postgresql/12/main/postgresql.conf
RUN echo "max_wal_senders = 10" >> /etc/postgresql/12/main/postgresql.conf
RUN echo "wal_keep_segments = 64" >> /etc/postgresql/12/main/postgresql.conf
RUN echo "hot_standby = on" >> /etc/postgresql/12/main/postgresql.conf
EXPOSE 5432
VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
CMD ["/usr/lib/postgresql/12/bin/postgres", "-D", "/var/lib/postgresql/12/main", "-c", "config_file=/etc/postgresql/12/main/postgresql.conf"]

# Creating link
RUN mkdir -p /ot-node/init
RUN ln -s /ot-node/init /ot-node/current

# Add files
COPY . /ot-node/current
RUN /etc/init.d/postgresql start && service arangodb3 start && cd /ot-node/current && npm install

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
ADD testnet/papertrail.yml /etc/log_files.yml

WORKDIR /ot-node/current

EXPOSE 5278 8900 3000 3010
CMD ["/usr/bin/supervisord", "-c", "/ot-node/current/testnet/supervisord.conf"]
62 changes: 62 additions & 0 deletions Dockerfile.psql.testnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#base image
FROM ubuntu:16.04
MAINTAINER OriginTrail
LABEL maintainer="OriginTrail"
ARG targetEnvironment=testnet

ENV NODE_ENV=$targetEnvironment
ENV GRANAX_USE_SYSTEM_TOR=1
ENV OT_NODE_DISTRIBUTION=docker
ENV DB_TYPE=psql

RUN apt-get -qq update && apt-get -qq -y install curl
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash -
RUN apt-get -qq update && apt-get -qq -y install wget apt-transport-https software-properties-common build-essential git nodejs sqlite unzip nano
RUN add-apt-repository -y ppa:ethereum/ethereum && apt-get -qq update && apt-get install -y -qq ethereum geth
#ArangoDB
ADD testnet/install-arango.sh /install-arango.sh
RUN ["chmod", "+x", "/install-arango.sh"]
RUN /install-arango.sh

RUN export LC_ALL=C
RUN apt-get install -y libpq-dev
RUN apt-get update && apt install -y -qq supervisor
RUN mkdir -p /var/log/supervisor
COPY testnet/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN apt-get -y install nano wget

#PostgresDB
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |tee /etc/apt/sources.list.d/pgdg.list
RUN apt-get update && apt-get install -y python-software-properties software-properties-common postgresql-12 postgresql-client-12 postgresql-contrib-12
USER postgres
RUN /etc/init.d/postgresql start &&\
psql --command "CREATE USER root WITH SUPERUSER PASSWORD 'origintrail'" &&\
createdb -O root ot_node_db
USER root
RUN echo "host replication all 0.0.0.0/0 trust" >> /etc/postgresql/12/main/pg_hba.conf
RUN echo "listen_addresses='*'" >> /etc/postgresql/12/main/postgresql.conf
RUN echo "wal_level = replica" >> /etc/postgresql/12/main/postgresql.conf
RUN echo "max_wal_senders = 10" >> /etc/postgresql/12/main/postgresql.conf
RUN echo "wal_keep_segments = 64" >> /etc/postgresql/12/main/postgresql.conf
RUN echo "hot_standby = on" >> /etc/postgresql/12/main/postgresql.conf
EXPOSE 5432
VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
CMD ["/usr/lib/postgresql/12/bin/postgres", "-D", "/var/lib/postgresql/12/main", "-c", "config_file=/etc/postgresql/12/main/postgresql.conf"]

# Creating link
RUN mkdir -p /ot-node/init
RUN ln -s /ot-node/init /ot-node/current

# Add files
COPY . /ot-node/current
RUN /etc/init.d/postgresql start && service arangodb3 start && cd /ot-node/current && npm install

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
ADD testnet/papertrail.yml /etc/log_files.yml

WORKDIR /ot-node/current

EXPOSE 5278 8900 3000 3010
CMD ["/usr/bin/supervisord", "-c", "/ot-node/current/testnet/supervisord.conf"]
105 changes: 99 additions & 6 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@
"port": 8529,
"database": "origintrail-develop",
"host": "localhost",
"max_path_length": 1000
"max_path_length": 1000,
"replication_info": {
"endpoint": "",
"username": "",
"password": "",
"port": "8529"
}
},
"blockchain": {
"blockchain_title": "Ethereum",
Expand Down Expand Up @@ -79,6 +85,7 @@
"remoteWhitelist": ["54.93.223.161", "127.0.0.1"],
"solutionDifficulty": 8,
"identityDifficulty": 8,
"routing_table_validity_period_in_hours": 24,
"churnPlugin": {
"cooldownBaseTimeout": "5m",
"cooldownMultiplier": 2,
Expand Down Expand Up @@ -109,7 +116,31 @@
"requireApproval": false,
"litigationEnabled": true,
"commandExecutorVerboseLoggingEnabled": false,
"reputationWindowInMinutes": 129600
"reputationWindowInMinutes": 129600,
"high_availability": {
"enabled": false,
"hostnames": ["10.1.0.4","10.1.0.5"],
"private_ip_address": "",
"remote_hostname": "",
"remote_ip_address": "",
"remote_operational_db_username": "ot_node",
"remote_operational_db_password": "origintrail",
"fallback_sync_attempts_number": 3,
"fallback_sync_attempts_delay": 60000,
"active_node_data_sync_interval_in_hours": 12,
"active_node_data_sync_use_ssl": false,
"is_remote_node_available_attempts_number": 3,
"is_remote_node_available_attempts_delay": 2000,
"is_remote_node_available_attempts_timeout": 3000
},
"operational_db": {
"database": "ot_node_db",
"host": "localhost",
"port": 5432,
"username": "ot_node",
"password": "origintrail",
"root_user_password": "origintrail"
}
},
"testnet": {
"identity": null,
Expand Down Expand Up @@ -157,7 +188,13 @@
"port": 8529,
"database": "origintrail",
"host": "localhost",
"max_path_length": 1000
"max_path_length": 1000,
"replication_info": {
"endpoint": "",
"username": "",
"password": "",
"port": "8529"
}
},
"blockchain": {
"blockchain_title": "Ethereum",
Expand Down Expand Up @@ -195,6 +232,7 @@
"remoteWhitelist": ["127.0.0.1", "localhost"],
"solutionDifficulty": 14,
"identityDifficulty": 12,
"routing_table_validity_period_in_hours": 24,
"churnPlugin": {
"cooldownBaseTimeout": "5m",
"cooldownMultiplier": 2,
Expand Down Expand Up @@ -225,7 +263,31 @@
"requireApproval": false,
"litigationEnabled": true,
"commandExecutorVerboseLoggingEnabled": false,
"reputationWindowInMinutes": 129600
"reputationWindowInMinutes": 129600,
"high_availability": {
"enabled": false,
"hostnames": ["10.1.0.4","10.1.0.5"],
"private_ip_address": "",
"remote_hostname": "",
"remote_ip_address": "",
"remote_operational_db_username": "ot_node",
"remote_operational_db_password": "origintrail",
"fallback_sync_attempts_number": 3,
"fallback_sync_attempts_delay": 60000,
"active_node_data_sync_interval_in_hours": 12,
"active_node_data_sync_use_ssl": true,
"is_remote_node_available_attempts_number": 3,
"is_remote_node_available_attempts_delay": 2000,
"is_remote_node_available_attempts_timeout": 3000
},
"operational_db": {
"database": "ot_node_db",
"host": "localhost",
"port": 5432,
"username": "ot_node",
"password": "origintrail",
"root_user_password": "origintrail"
}
},
"mainnet": {
"identity": null,
Expand Down Expand Up @@ -273,7 +335,13 @@
"port": 8529,
"database": "origintrail",
"host": "localhost",
"max_path_length": 1000
"max_path_length": 1000,
"replication_info": {
"endpoint": "10.1.0.5",
"username": "root",
"password": "",
"port": "8529"
}
},
"blockchain": {
"blockchain_title": "Ethereum",
Expand Down Expand Up @@ -313,6 +381,7 @@
"remoteWhitelist": ["127.0.0.1"],
"solutionDifficulty": 14,
"identityDifficulty": 12,
"routing_table_validity_period_in_hours": 24,
"churnPlugin": {
"cooldownBaseTimeout": "5m",
"cooldownMultiplier": 2,
Expand Down Expand Up @@ -343,6 +412,30 @@
"requireApproval": false,
"litigationEnabled": true,
"commandExecutorVerboseLoggingEnabled": false,
"reputationWindowInMinutes": 129600
"reputationWindowInMinutes": 129600,
"high_availability": {
"enabled": false,
"hostnames": ["10.1.0.4","10.1.0.5"],
"private_ip_address": "",
"remote_hostname": "",
"remote_ip_address": "",
"remote_operational_db_username": "ot_node",
"remote_operational_db_password": "origintrail",
"fallback_sync_attempts_number": 3,
"fallback_sync_attempts_delay": 60000,
"active_node_data_sync_interval_in_hours": 12,
"active_node_data_sync_use_ssl": true,
"is_remote_node_available_attempts_number": 3,
"is_remote_node_available_attempts_delay": 2000,
"is_remote_node_available_attempts_timeout": 3000
},
"operational_db": {
"database": "ot_node_db",
"host": "localhost",
"port": 5432,
"username": "ot_node",
"password": "origintrail",
"root_user_password": "origintrail"
}
}
}
Loading

0 comments on commit 71f6baa

Please sign in to comment.