Documentation Center

Building Docker images

Docker images are built in the Dockerfile script.

Procedure

Requirements

  1. 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
  2. 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

  1. 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:
    1. Build a Docker image for SDL ETS.
    2. Test the Docker image using Docker Compose, by running an SDL ETS cluster.

Get started

  1. Copy the SDL ETS 8.3 installer into the build/installer directory.
  2. Copy the SDL provided license file sdl-ets.lic into the build/license directory.
  3. Copy one or more Language Pair installers into the build/installer directory.
  4. Run make auto-generate, which generates the files: build/Docker, .env, docker-compose.yaml.
  5. Run make build to build the Docker image.
  6. Run docker-compose up -d to start the SDL ETS cluster under Docker Compose.
  7. Point the browser to http://localhost:8000. Use the following login information: User - ets@sdl.com; Password - etsdocker.
  8. 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

  1. 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.
  2. 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 file
    • gen-build.yaml - configuration file used by the generator
    • gen-build.py - script to generate the configuration file
    • Makefile - convenience Makefile to facilitate running the steps required for this example
    • build/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.Docker file structure

Prepare the Docker image

  1. 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.
  2. (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_installer for example, the Language Pair name should be EngFra_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.
  3. 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 call gen-build.py and generate the following files:
    • build/Dockerfile - the Docker configuration file used to build Docker images
    • docker-compose.yaml - the Docker Compose configuration file to run SDL ETS as a cluster
    • .env - environment variables used by Docker Compose
  4. Build the Docker Image. From the root directory, run make build.
    This operation will trigger a Docker build, using the build/Dockerfile configuration.
    • Docker will start with a ubuntu-18.04 image.
    • 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.yaml file.
    • The sdl-ets.lic license file will be copied into the Docker image. If the Docker build is successful, the image will be tagged with the label specified in the gen-build.yaml file (by default image: sdl-ets/ets-8.3.0).
  5. 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.
  6. 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).