Building Docker images
Docker images are built in the Dockerfile script.
Procedure
Requirements
- Check that you have all of the following:
- SDL ETS 8.3 (or higher) installer
- SDL ETS Language Pair installer(s)
- SDL ETS license file for the Language Pairs above
- Check that you have the following software versions and setup:
- Docker (version 1.13.1 or newer. An older release may also work)
- Docker Compose, to test the image (version 1.17.1 or newer. An older released may also work)
- Python (2.7.x or newer, 3.5.x or newer)
- An internet connection with access to the standard Docker registry (to download the initial Ubuntu image)
Locate script directory
- The SDL ETS installer contains a directory called "docker" located at SDL_ETS_8_3_0_linux64_installer/docker/. This directory contains scripts to quickly generate Docker images. Copy the contents to a place where you have write access and:
- Build a Docker image for SDL ETS.
- Test the Docker image using Docker Compose, by running an SDL ETS cluster.
Get started
- Copy the SDL ETS 8.3 installer into the build/installer directory.
- Copy the SDL provided license file
sdl-ets.licinto the build/license directory. - Copy one or more Language Pair installers into the build/installer directory.
- Run make auto-generate, which generates the files:
build/Docker,.env,docker-compose.yaml. - Run make build to build the Docker image.
- Run docker-compose up -d to start the SDL ETS cluster under Docker Compose.
- Point the browser to http://localhost:8000. Use the following login information: User - ets@sdl.com; Password - etsdocker.
- From the upper-right corner of the SDL ETS application, select Manage > DeploymentManage / Deployment. All components should start and turn green within one minute.
Generate configuration files
- For convenience, SDL ETS provides a script which can be optionally used to generate:
- A Docker build script
- A Docker Compose configuration file
The generated files could be used as a starting point, but they could also be edited by hand afterwards. - Check the included files:
.env.example- example of a Docker Compose environment settings file (the .env file will be generated)docker-compose.yml.example- example of Docker Compose configuration file (the docker-compose.yml file will be generated)README.md- this filegen-build.yaml- configuration file used by the generatorgen-build.py- script to generate the configuration fileMakefile- convenience Makefile to facilitate running the steps required for this examplebuild/Dockerfile.example- Docker build configuration example (build/Dockerfile will be generated)build/etsbootstrap- scripts used to start SDL ETS inside the container
The file structure is shown below. The files marked GENERATED will be generated by running make generate or make auto-generate.
Prepare the Docker image
- Copy the installers and the license:
- Copy the SDL ETS 8.3 installer into build/installer directory. The file name is
setup-linux-x64.run. - Copy the Language Pair installers to the same directory. A typical name would look like
SDL_ETS_EngFra_Generic_SRV_TNM_8_1_x_0_installer. - Copy the license file provided by SDL into the build/license directory. The file name is
sdl-ets.lic.
- Copy the SDL ETS 8.3 installer into build/installer directory. The file name is
- (Optional) Edit the configuration file. The Language Pair names should match the ones you intend to install. If the installer is called
SDL_ETS_EngFra_Generic_SRV_TNM_8_1_x_0_installerfor example, the Language Pair name should beEngFra_Generic_SRV_TNM_8_1_x_0(remove the SDL_ETS_ prefix and _installer suffix). SDL ETS requires at least one Job Engine. The example provided shows how to configure two of them. Configure at least one Translation Engine. - Generate configuration files either by guessing the Language Pairs by scanning the build/installer directory, or by using the gen-build.yaml configuration file, for more customization:
- To automatically generate the configuration files without any configuration, from the root directory run make auto-generate.
- To customize the generation using
gen-build.yaml, run make generate.
This operation will callgen-build.pyand generate the following files:build/Dockerfile- the Docker configuration file used to build Docker imagesdocker-compose.yaml- the Docker Compose configuration file to run SDL ETS as a cluster.env- environment variables used by Docker Compose
- Build the Docker Image. From the root directory, run
make build.This operation will trigger a Docker build, using thebuild/Dockerfileconfiguration.- Docker will start with a
ubuntu-18.04image. - The SDL ETS dependencies will be installed using Ubuntu package manager.
- Docker will run the SDL ETS 8.3 installer.
- Docker will run all Language Pair installers specified in the
gen-build.yamlfile. - The
sdl-ets.liclicense file will be copied into the Docker image. If the Docker build is successful, the image will be tagged with the label specified in thegen-build.yamlfile (by default image: sdl-ets/ets-8.3.0).
- Docker will start with a
- Run the ETS cluster in Docker Compose. Use docker-compose up -d or make up.
This operation will start the SDL ETS cluster in Docker Compose.
- Verify that SDL ETS is running, by pointing the Web browser to http://localhost:8000. The page should show the login for the SDL ETS UI. Use the following login information: User - ets@sdl.com; Password - etsdocker.
The login information above was set-up when SDL ETS installer was run. It can be changed by editing build/Dockerfile. From the top menu bar of the SDL ETS application, select Manage > Deployment. This will display a page showing all Job Engines and Translation Engines. After a few minutes, they should all be in running state (green).