Difference between revisions of "InContext Server Installation"
(→InContext Server Files) |
(→Backup the database) |
||
(73 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
+ | = InContext Server = |
||
+ | The typical G11n system will be installed using a Docker-based method. |
||
− | == |
+ | ==Hardware & Software Requirements== |
+ | The following sections describe the hardware and software requirements for Incontext Server. |
||
− | The InContext Server requires the following: |
||
− | * Tomcat 8.5.x |
||
− | * Java 8 |
||
− | * MySQL 5.5.3+ |
||
+ | ===Hardware Requirements === |
||
− | Since the Lingoport Suite already requires Java and MySQL, the only additional requirement for the InContext Server is Tomcat. |
||
+ | {| border="1" class="wikitable" style="width=50%" |
||
+ | ! Element |
||
+ | ! Minimum |
||
+ | ! Recommended |
||
+ | |- |
||
+ | ! CPU |
||
+ | | 2 || 4 |
||
+ | |- |
||
+ | ! Memory |
||
+ | | 16 GB |
||
+ | | 16 GB |
||
+ | |- |
||
+ | ! Disk |
||
+ | | 160 GB |
||
+ | | 500 GB |
||
+ | |} |
||
+ | ===Software requirements=== |
||
− | == InContext Server Files == |
||
− | There are three files that comprise the InContext Server: |
||
− | * incontext-server.war |
||
− | * incontext-server.sh |
||
− | * IncontextServerConfig.groovy |
||
+ | Since this is a Docker installation, most of the containers will be managed by Docker. However, volumes will be mounted on the Linux virtual machine and a database configuration file will reside on the VM: This requires Linux and a Docker installation. |
||
− | The war file must be placed under the <b>tomcat</b>/webapps directory. <br> |
||
− | The incontext-server.sh file must be configured and placed in the <b>tomcat</b> directory. <br> |
||
− | The IncontextServerConfig.groovy file must be configured and placed in the <b>tomcat</b> directory. |
||
+ | === Support Browsers and Versions === |
||
− | == Installation Steps == |
||
+ | The following browsers are supported: |
||
+ | * Chrome: 117+ |
||
+ | * Edge: 117+ |
||
+ | * Firefox: 71+ |
||
+ | ==Access and Ports / Firewall== |
||
− | 1. Download and install the latest Tomcat 8.5.x from <b>https://tomcat.apache.org/download-80</b> and place it in, for example, /usr/local/tomcat, which I will refer to as <b>tomcat</b>. |
||
+ | InContext Server may need to be accessible by Lingoport and customer personnel to configure jobs, check the console if any problem arise, run jobs if necessary. InContext Server may to be accessible by many customer actors, including development teams, management, and QA, Lingoport, Translation Vendors. |
||
− | 2. Modify <b>tomcat</b>/conf/server.xml and change the port number from 8080 (used by Jenkins) to 8081 |
||
+ | === Ports === |
||
− | 3. Create an empty MySQL database. You may use <b>incontext</b> or any database name you would like: |
||
− | shell> mysql -u root –p<your_password> |
||
− | mysql> CREATE DATABASE <b>incontext</b> DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; |
||
+ | ===== Internal to company network ===== |
||
− | 4. Create a database user and password, replacing dbuser and dbpass with your configured values: |
||
− | shell> mysql -u root –p<your_password> |
||
− | mysql> GRANT ALL PRIVILEGES ON *.* TO '<b>dbuser</b>'@'localhost' IDENTIFIED BY '<b>dbpass</b>' WITH GRANT OPTION; |
||
− | mysql> GRANT ALL PRIVILEGES ON *.* TO '<b>dbuser</b>'@'%' IDENTIFIED BY '<b>dbpass</b>' WITH GRANT OPTION; |
||
+ | {| border="1" class="wikitable" style="text-align:left; width=50%;" |
||
− | 5. Configure the following values in the <b>incontext-server.sh</b> file for your environment and place the file in the <b>tomcat</b> directory: |
||
+ | !Services!!Ports!!Inbound (session)!!Outbound (session)!!Notes |
||
− | * export CATALINA_HOME=<b>/usr/local/tomcat</b> |
||
+ | |- |
||
− | * export JAVA_HOME="<b>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre</b>" |
||
+ | |SSH (for system config/maintenance)|| 22 || Y || N || System configuration and maintenance |
||
− | * export JRE_HOME="<b>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre</b>" |
||
+ | |- |
||
+ | |InContext Server || 8085 (HTTP) and/or 443 (HTTPS) || Y || N || Default 8085 (configurable at install time) HTTPS requires reverse proxy Ex: Apache and Installation of SSL certificate. |
||
+ | |} |
||
+ | ==== External access ==== |
||
− | 6. Configure the following values in the <b>IncontextServerConfig.groovy</b> file for your environment and place the file in the <b>tomcat</b> directory: |
||
− | * String dbname = "<b>incontext</b>" |
||
− | * String dbuser = "<b>dbuser</b>" |
||
− | * String dbpass = "<b>dbpass</b>" |
||
+ | {| border="1" class="wikitable" style="text-align:left; width=50%;" |
||
− | 7. Copy the <b>incontext-server.war</b> file to the <b>tomcat</b>/webapps directory |
||
+ | !Services!!Ports!!Inbound!!Outbound!!Notes |
||
+ | |- |
||
+ | |Lingoport SSH access || 22 || Y || N || Optional. Recommended for ease of upgrades and maintenance. |
||
+ | |- |
||
+ | |InContext Server || 8085 (HTTP) and/or 443 (HTTPS) || Y || N || Default 8085 (configurable at install time) HTTPS requires reverse proxy Ex: Apache and Installation of SSL certificate. |
||
+ | |- |
||
+ | |RHEL/CentOS/Ubuntu Packages || 80 (Debian) 443 (RHEL) || N || Y || Operating system packages access (Most likely external, but could be managed internally as well) |
||
+ | |- |
||
+ | |hub.docker.com || 80 and 443 || N || Y || InContext Server Image location |
||
+ | |} |
||
+ | ==HTTPS== |
||
− | 8. Launch the server: |
||
− | > cd <b>tomcat</b> |
||
− | > ./incontext-server.sh start |
||
+ | HTTPS is recommended but not necessary for the Incontext Server installation. HTTPS may already be set up or your IT may have a standard on how to set up HTTPS. If that's the case, go the next section. |
||
− | The InContext Server should be launched and you can browse to: http://yourserverurl:8081/incontext-server |
||
+ | |||
+ | Otherwise, follow the below link for a suggested HTTPS configuration: |
||
+ | <BR> |
||
+ | Note this link describes a configuration for Command Center. Some modifications would be necessary for InContext Server with regards to the ports and the URL. The port by default would be 8085 and the URL would contain "incontext-server" instead of "command-center" |
||
+ | <BR> |
||
+ | * [[ HTTPS configuration | HTTPS Configuration ]] |
||
+ | |||
+ | == Checking Installation for Docker-based Systems == |
||
+ | For systems intending to use the Docker-based installation, check if the Docker container for the InContext Server is running with: |
||
+ | <pre> |
||
+ | $ sudo docker ps | grep incontext-server |
||
+ | </pre> |
||
+ | If there's no output, the container is not running, indicating the InContext Server needs to be set up or there is an issue that needs to be addressed. |
||
+ | Users in the 'docker' group may optionally omit use of sudo. |
||
+ | |||
+ | = Installation of InContext Server via Docker = |
||
+ | For a new, simplified deployment process, the InContext Server can be installed using Docker. This section outlines the Docker-based installation process. |
||
+ | |||
+ | == Pre-Requisites == |
||
+ | |||
+ | === OS Requirements === |
||
+ | This requires Linux and a Docker installation. |
||
+ | The details on the installation of Docker itself on the Linux vm can be found [[ Command_Center_Installation#Docker_Install|here. ]] |
||
+ | Most of the containers will be managed by Docker. However, volumes will be mounted on the Linux virtual machine and a database configuration file will reside on the VM |
||
+ | |||
+ | === User Account Requirements === |
||
+ | Create sudo user if needed on the VM |
||
+ | * A user, such as centos or ec2-user, with sudo privileges is required as the user under which to install InContext Server |
||
+ | |||
+ | === Installation Files === |
||
+ | The installation files for InContext are located in the same place as the ones for Command Center. |
||
+ | |||
+ | Clone the public repo in the home directory of your user with sudo rights. |
||
+ | * The public repo can be found at the https://github.com/Lingoport/CommandCenterConfig |
||
+ | |||
+ | Once cloned create a new directory in the home directory called IncontextInstall (It can be named anything you wish) |
||
+ | |||
+ | Copy the contents from CommandCenterConfig/Incontext/ to the new directory |
||
+ | |||
+ | Go into the directory (cd) and make all of the shell scripts executable |
||
+ | |||
+ | cd ~/IncontextInstall |
||
+ | chmod +x ./*.sh |
||
+ | |||
+ | Open the install.conf with your editor as there are a couple of items in the file that will need to be modified |
||
+ | |||
+ | * Set the home_directory to the home directory of the current user |
||
+ | * Set the incontext_image_version to the current version of InContext-Server. If unsure what the version is, it can be found [https://hub.docker.com/repository/docker/lingoport/incontext_pro/general Here ] |
||
+ | * Optionally change the serverPort if desired or leave it at the default |
||
+ | * Set the database_root_password to a password that you want to use for the root user on the database. Note this should be a good password so something from a random generator is a good idea of significant length. |
||
+ | * The other items in the file should not be required to be modified. |
||
+ | |||
+ | == Installation Process == |
||
+ | Modify the `install.conf` file with your specific configurations, including Docker Hub credentials (account with read access to the InContext Image will be shared by Lingoport), MySQL root password (to be created with an associated MySQL 8 container), and desired server port. |
||
+ | |||
+ | Execute the `InstallIncontext.sh` script with sudo privileges. |
||
+ | <pre> |
||
+ | $ sudo ./InstallIncontext.sh |
||
+ | </pre> |
||
+ | This script will: |
||
+ | * Create necessary Docker network and volumes |
||
+ | * Pull the Lingoport InContext Server image from Docker Hub |
||
+ | * Start the InContext Server and MySQL containers with appropriate configurations |
||
+ | You may be prompted if there is missing info in the install.conf. Ensure you follow any prompts provided by the script for a successful installation. |
||
+ | |||
+ | The script will download all the Docker images that are required and perform the docker based installation. |
||
+ | |||
+ | Once installed it will also start the InContext Server |
||
+ | |||
+ | To confirm that Incontext is running use the below Docker command |
||
+ | <pre> |
||
+ | sudo docker container ls |
||
+ | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
||
+ | d29515f5f979 lingoport/incontext_pro:1.5.0_2 "catalina.sh run" 2 minutes ago Up 2 minutes 0.0.0.0:8085->8080/tcp, :::8085->8080/tcp angry_tu |
||
+ | 4d323af14731 mysql:8.0 "docker-entrypoint.s…" 2 minutes ago Up 2 minutes 3306/tcp, 33060/tcp incontextDatabase |
||
+ | </pre> |
||
+ | |||
+ | The output will show both the running Incontext server as well as the MySQL db that is used by Incontext |
||
+ | |||
+ | At this point, the base system should be up and running. |
||
+ | |||
+ | Verify the installation by checking the Docker container status and accessing the InContext Server through the web browser. |
||
+ | |||
+ | Go to [[ InContext_Server_Users_Guide|User Guide ]] to log in for the first time and perform the base configuration. |
||
+ | |||
+ | == Backup the database == |
||
+ | You don't have to backup the current version of the database before proceeding to the update to the new version of the system, because the Update script will backup your current database automatically before updating. If you want to do the backup manually, you can use the BackupIncontextDatabase.sh script |
||
+ | |||
+ | chmod +x *.sh |
||
+ | sudo ./BackupIncontextDatabase.sh |
||
+ | |||
+ | The database backup sql file will be under $home_directory/incontext/backup folder, named incontext_backup_$current_date.sql |
||
+ | |||
+ | To backup the database periodically, schedule to run <code>BackupIncontextDatabase.sh</code>, for instance with cron services. |
||
+ | |||
+ | === Note: Restoring the database === |
||
+ | |||
+ | If later, at some point, the database needs to be restored, the following shows how to do so: |
||
+ | |||
+ | chmod +x *.sh |
||
+ | sudo ./RestoreIncontextDatabase.sh YYYY-MM-DD |
||
+ | |||
+ | Check your database backup sql file under '''$home_directory/incontext/backup''' folder, they are named '''incontext_backup_$current_date.s'''ql, for example, if you backup the database on 2023 September 20th, you will see a incontext_backup_2023-09-20.sql file, and you can use below command to restore it |
||
+ | |||
+ | sudo ./RestoreIncontextDatabase.sh 2023-09-20 |
||
+ | |||
+ | = Next Steps = |
||
+ | The next steps involve configuring and using the InContext Server for your localization needs. For more details on post-installation setup and usage, refer to the InContext Server Users Guide. |
||
+ | |||
+ | [[InContext_Capture_Installation | InContext Capture Installation]] provides additional resources for setting up InContext for Translation. |
||
+ | |||
+ | For information on how to proceed after installation, please see the: |
||
+ | [[InContext Server Users Guide]] |
Latest revision as of 21:13, 24 June 2024
InContext Server
The typical G11n system will be installed using a Docker-based method.
Hardware & Software Requirements
The following sections describe the hardware and software requirements for Incontext Server.
Hardware Requirements
Element | Minimum | Recommended |
---|---|---|
CPU | 2 | 4 |
Memory | 16 GB | 16 GB |
Disk | 160 GB | 500 GB |
Software requirements
Since this is a Docker installation, most of the containers will be managed by Docker. However, volumes will be mounted on the Linux virtual machine and a database configuration file will reside on the VM: This requires Linux and a Docker installation.
Support Browsers and Versions
The following browsers are supported:
- Chrome: 117+
- Edge: 117+
- Firefox: 71+
Access and Ports / Firewall
InContext Server may need to be accessible by Lingoport and customer personnel to configure jobs, check the console if any problem arise, run jobs if necessary. InContext Server may to be accessible by many customer actors, including development teams, management, and QA, Lingoport, Translation Vendors.
Ports
Internal to company network
Services | Ports | Inbound (session) | Outbound (session) | Notes |
---|---|---|---|---|
SSH (for system config/maintenance) | 22 | Y | N | System configuration and maintenance |
InContext Server | 8085 (HTTP) and/or 443 (HTTPS) | Y | N | Default 8085 (configurable at install time) HTTPS requires reverse proxy Ex: Apache and Installation of SSL certificate. |
External access
Services | Ports | Inbound | Outbound | Notes |
---|---|---|---|---|
Lingoport SSH access | 22 | Y | N | Optional. Recommended for ease of upgrades and maintenance. |
InContext Server | 8085 (HTTP) and/or 443 (HTTPS) | Y | N | Default 8085 (configurable at install time) HTTPS requires reverse proxy Ex: Apache and Installation of SSL certificate. |
RHEL/CentOS/Ubuntu Packages | 80 (Debian) 443 (RHEL) | N | Y | Operating system packages access (Most likely external, but could be managed internally as well) |
hub.docker.com | 80 and 443 | N | Y | InContext Server Image location |
HTTPS
HTTPS is recommended but not necessary for the Incontext Server installation. HTTPS may already be set up or your IT may have a standard on how to set up HTTPS. If that's the case, go the next section.
Otherwise, follow the below link for a suggested HTTPS configuration:
Note this link describes a configuration for Command Center. Some modifications would be necessary for InContext Server with regards to the ports and the URL. The port by default would be 8085 and the URL would contain "incontext-server" instead of "command-center"
Checking Installation for Docker-based Systems
For systems intending to use the Docker-based installation, check if the Docker container for the InContext Server is running with:
$ sudo docker ps | grep incontext-server
If there's no output, the container is not running, indicating the InContext Server needs to be set up or there is an issue that needs to be addressed. Users in the 'docker' group may optionally omit use of sudo.
Installation of InContext Server via Docker
For a new, simplified deployment process, the InContext Server can be installed using Docker. This section outlines the Docker-based installation process.
Pre-Requisites
OS Requirements
This requires Linux and a Docker installation. The details on the installation of Docker itself on the Linux vm can be found here. Most of the containers will be managed by Docker. However, volumes will be mounted on the Linux virtual machine and a database configuration file will reside on the VM
User Account Requirements
Create sudo user if needed on the VM
- A user, such as centos or ec2-user, with sudo privileges is required as the user under which to install InContext Server
Installation Files
The installation files for InContext are located in the same place as the ones for Command Center.
Clone the public repo in the home directory of your user with sudo rights.
- The public repo can be found at the https://github.com/Lingoport/CommandCenterConfig
Once cloned create a new directory in the home directory called IncontextInstall (It can be named anything you wish)
Copy the contents from CommandCenterConfig/Incontext/ to the new directory
Go into the directory (cd) and make all of the shell scripts executable
cd ~/IncontextInstall chmod +x ./*.sh
Open the install.conf with your editor as there are a couple of items in the file that will need to be modified
- Set the home_directory to the home directory of the current user
- Set the incontext_image_version to the current version of InContext-Server. If unsure what the version is, it can be found Here
- Optionally change the serverPort if desired or leave it at the default
- Set the database_root_password to a password that you want to use for the root user on the database. Note this should be a good password so something from a random generator is a good idea of significant length.
- The other items in the file should not be required to be modified.
Installation Process
Modify the `install.conf` file with your specific configurations, including Docker Hub credentials (account with read access to the InContext Image will be shared by Lingoport), MySQL root password (to be created with an associated MySQL 8 container), and desired server port.
Execute the `InstallIncontext.sh` script with sudo privileges.
$ sudo ./InstallIncontext.sh
This script will:
- Create necessary Docker network and volumes
- Pull the Lingoport InContext Server image from Docker Hub
- Start the InContext Server and MySQL containers with appropriate configurations
You may be prompted if there is missing info in the install.conf. Ensure you follow any prompts provided by the script for a successful installation.
The script will download all the Docker images that are required and perform the docker based installation.
Once installed it will also start the InContext Server
To confirm that Incontext is running use the below Docker command
sudo docker container ls CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d29515f5f979 lingoport/incontext_pro:1.5.0_2 "catalina.sh run" 2 minutes ago Up 2 minutes 0.0.0.0:8085->8080/tcp, :::8085->8080/tcp angry_tu 4d323af14731 mysql:8.0 "docker-entrypoint.s…" 2 minutes ago Up 2 minutes 3306/tcp, 33060/tcp incontextDatabase
The output will show both the running Incontext server as well as the MySQL db that is used by Incontext
At this point, the base system should be up and running.
Verify the installation by checking the Docker container status and accessing the InContext Server through the web browser.
Go to User Guide to log in for the first time and perform the base configuration.
Backup the database
You don't have to backup the current version of the database before proceeding to the update to the new version of the system, because the Update script will backup your current database automatically before updating. If you want to do the backup manually, you can use the BackupIncontextDatabase.sh script
chmod +x *.sh sudo ./BackupIncontextDatabase.sh
The database backup sql file will be under $home_directory/incontext/backup folder, named incontext_backup_$current_date.sql
To backup the database periodically, schedule to run BackupIncontextDatabase.sh
, for instance with cron services.
Note: Restoring the database
If later, at some point, the database needs to be restored, the following shows how to do so:
chmod +x *.sh sudo ./RestoreIncontextDatabase.sh YYYY-MM-DD
Check your database backup sql file under $home_directory/incontext/backup folder, they are named incontext_backup_$current_date.sql, for example, if you backup the database on 2023 September 20th, you will see a incontext_backup_2023-09-20.sql file, and you can use below command to restore it
sudo ./RestoreIncontextDatabase.sh 2023-09-20
Next Steps
The next steps involve configuring and using the InContext Server for your localization needs. For more details on post-installation setup and usage, refer to the InContext Server Users Guide.
InContext Capture Installation provides additional resources for setting up InContext for Translation.
For information on how to proceed after installation, please see the: InContext Server Users Guide