Newton Collaborative Editing Server Setup Instructions
This page enlists the steps to set up the Newton Collaborative Editing Server behind the firewall and the instructions to connect it with the Confluence Data center.
Using Newton Docker Image
Pre-requisite
- Install Docker 18.09+
- Install docker-compose
- Install and configure Nginx and apply SSL certificates (the default port for redirection is 8080)
Install and run the Newton CES
Pull Docker image from Docker hub
CODEdocker pull addteq/newton:latest
- Create an environment file "excellentable.env" and add values for the below variables. All fields are required
DatabaseType={type of external database (postgres/mysql/mssql/oracle)}
DatabaseHostname={database hostname or ip}
DatabasePort={database port}
DatabaseName={database name}
DatabaseUser={database user that will be used to access database}
DatabasePassword={password for database user}
AdminUser={admin username}
AdminPassword={password for admin user}
ConfluenceUrl={confluence base url}
Set the confluence base url precisely the same as shown in confluence-admin → General config
1. Create docker-compose.yml and excellentable.env file.
With external DB
docker-compose.yml
CODE--- version: "2" services: app: image: addteq/newton:latest restart: always ports: - '8080:8080' env_file: excellentable.env
With dockerized DB (Sample docker-compose.yml , excellentable.env and db.env files for Postgres DB)
docker-compose.yml
CODE--- version: "2" services: db: image: 'postgres:9.4' restart: always ports: - '24638:5432' volumes: - ./Volumes/newton/postgres:/var/lib/postgresql/data env_file: db.env app: image: addteq/newton:latest restart: always depends_on: - "db" ports: - '8080:8080' env_file: excellentable.env
excellentable.env
YMLDatabaseType=postgres DatabaseHostname=db DatabasePort=5432 DatabaseName=confluence DatabaseUser=confluence DatabasePassword=thae0Aer AdminUser={admin username (reqired)} AdminPassword={password for admin user (required)} ConfluenceUrl={confluence base url (required)}
If you are using option "b" from above, then create a "db.env" file as well with the below variables and corresponding values.CODEPOSTGRES_USER=confluence # also the database name POSTGRES_PASSWORD=thae0Aer PGPASSWORD=thae0Aer
2. Start the newton server
docker-compose up -d
3. Tail logs using docker
docker-compose logs -f
Using Debian and RPM Package
Using Newton Debian Package
Pre-requisite
- Ubuntu 18.04 server
- Sudo permission to install the package
- Install and configure Nginx and apply SSL certificates (the default port for redirection is 8080)
Install and run the Newton CES
Download and Extract the Newton Debian package
CODEwget https://cdn.addteq.com/addteq/excellentable/newton/deb/1.0.1/addteq-newton-1.0.1.deb
Install the Newton Debian package
CODEsudo apt-get update sudo apt-get install ./addteq-newton-1.0.1.deb
You may see a similar error as below:
If you get the above error, run the following command:CODEsudo chown _apt /var/lib/update-notifier/package-data-downloads/partial/
Set the environment variables by running the script newton-setup-env.sh
CODEcd /opt/addteq-newton ./newton-setup-env.sh
Usage: The script newton-setup-env.sh is used to create the environment file required for Newton CES
There are 2 ways to run newton-setup-env.sh:
1. Interactive Mode to set variables in one go:
CODE./newton-setup-env.sh #no argument required
2. Options Mode to set variables one by one:
CODE./newton-setup-env.sh [options as listed below] Options: -h or --help ... help message -a or --admin-user ... admin username (required) -p or --admin-password ... password for admin user (required) -c or --confluence-url ... confluence base url (required) -d or --database-type ... type of external database (postgres/mysql/mssql/oracle) -l or --database-hostname ... database hostname or ip -P or --database-port ... database port -n or --database-name ... database name -u or --database-user ... database user that will be used to access database -w or --database-password ... password for database user
Make the confluence-url precisely the same as shown in confluence-admin → General config
Restart the service for newton
CODEsudo systemctl restart addteq-newton
Newton logs can be found at the location below
CODE/var/log/addteq-newton/
Using Newton RPM Package
Pre-requisite
- Centos/RedHat server
- Sudo permission to install the package
- Install and configure Nginx and apply SSL certificates (the default port for redirection is 8080)
- Database parameters are optional if the user plans to use embedded H2 databases (not recommended for production)
Install and run the Newton CES
Download and extract the Newton RPM package
CODEwget https://cdn.addteq.com/addteq/excellentable/newton/rpm/1.0.1/addteq-newton-1.0.1.rpm
Install the Newton RPM package
CODEsudo yum install addteq-newton-1.0.1.rpm
Setup the environment by running the script newton-setup-env.sh
CODEcd /opt/addteq-newton ./newton-setup-env.sh
Usage: The script newton-setup-env.sh is used to create the environment file required for the Newton CES
There are 2 ways to run newton-setup-env.sh:
1. Interactive Mode to set variables in one go:
CODE./newton-setup-env.sh #no argument required
2. Options Mode to set variables one by one:CODE./newton-setup-env.sh [options as listed below] Options: -h or --help ... help message -a or --admin-user ... admin username (required) -p or --admin-password ... password for admin user (required) -c or --confluence-url ... confluence base url (required) -d or --database-type ... type of external database (postgres/mysql/mssql/oracle) -l or --database-hostname ... database hostname or ip -P or --database-port ... database port -n or --database-name ... database name -u or --database-user ... database user that will be used to access database -w or --database-password ... password for database user
Make the confluence-url precisely the same as shown in confluence-admin → General config
Restart the service for newton
CODEsudo systemctl restart addteq-newton
Newton logs can be found at the location below
CODE/var/log/addteq-newton/