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
docker pull addteq/newton:latest
CODE- 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
--- version: "2" services: app: image: addteq/newton:latest restart: always ports: - '8080:8080' env_file: excellentable.env
CODEWith dockerized DB (Sample docker-compose.yml , excellentable.env and db.env files for Postgres DB)
docker-compose.yml
--- 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
CODEexcellentable.env
DatabaseType=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)}
YML
If you are using option "b" from above, then create a "db.env" file as well with the below variables and corresponding values.POSTGRES_USER=confluence # also the database name POSTGRES_PASSWORD=thae0Aer PGPASSWORD=thae0Aer
CODE
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
wget https://cdn.addteq.com/addteq/excellentable/newton/deb/1.0.0/addteq-newton-1.0.0.deb
CODEInstall the Newton Debian package
sudo apt-get update sudo apt-get install ./addteq-newton-1.0.0.deb
CODEYou may see a similar error as below:
If you get the above error, run the following command:sudo chown _apt /var/lib/update-notifier/package-data-downloads/partial/
CODESet the environment variables by running the script newton-setup-env.sh
cd /opt/addteq-newton ./newton-setup-env.sh
CODEUsage: 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:
./newton-setup-env.sh #no argument required
CODE2. Options Mode to set variables one by one:
./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
CODEMake the confluence-url precisely the same as shown in confluence-admin → General config
Restart the service for newton
sudo systemctl restart addteq-newton
CODE
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
wget https://cdn.addteq.com/addteq/excellentable/newton/rpm/1.0.0/addteq-newton-1.0.0.rpm
CODEInstall the Newton RPM package
sudo yum install addteq-newton-1.0.0.rpm
CODESetup the environment by running the script newton-setup-env.sh
cd /opt/addteq-newton ./newton-setup-env.sh
CODEUsage: 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:
./newton-setup-env.sh #no argument required
CODE
2. Options Mode to set variables one by one:./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
CODEMake the confluence-url precisely the same as shown in confluence-admin → General config
Restart the service for newton
sudo systemctl restart addteq-newton
CODE