Pre-Installation Tasks

Mount the Space Storage Volume

The container root directory specified by the ContainerRoot setting contains the mount points for all the containers on the Docker system.

The container root (by default /teamdrive) is the mount point for a dedicated file system that provides the requirements outlined in chapter Storage Requirements.

By default, the directory /teamdrive has already been created by the td-webportal RPM package. However, if the Docker host is not the same as the Web Portal machine, then you will have to create this directory yourself.

Note that due to restrictions of the Docker system, all data will be written to this directory as belonging to root.

Mount the file system and create the respective mount entry in /etc/fstab to enable automatic mounting of the file system at bootup. Please consult your Operating System documentation for details on how to perform this step.

Installing Docker

The Web Portal uses Docker containers to run the TeamDrive Agent. A container is started for each user that logs into the Web Portal.

The Docker containers can run on a machine or cluster that is separate from the Web Portal host which handles the login and manages the containers.

Docker can be found in the standard CentOS 7 repositories (CentOS 6 is not longer supported by Docker).

Use yum to install the package:

[root@webportal ~]# yum install docker

The Docker daemon can be started and stopped using systemctl start docker and systemctl start docker. Before starting docker the first time, configure the docker volume as described in Storage Requirements.

By default, the Docker daemon is only accessible via a local socket. The Web Portal requires TCP connectivity. This is the case, even if Docker and the Web Portal are running on the same host.

Note

In case of using a Docker Swarm setup for a clustered system, the Swarm API port (default 2377) must be used instead of the docker port 2375.

To make Docker accessible via TCP add the setting --host=tcp://0.0.0.0:2375 to the OPTIONS parameter in the /etc/sysconfig/docker file as follows:

OPTIONS="--host=tcp://0.0.0.0:2375 ..."

After restarting Docker, the Docker API will be available on port 2375.

On the client side (the Web Portal host) you will now need to set the DOCKER_HOST environment variable in order to use the docker command. Replace localhost below with the domain name of the Docker host:

[root@webportal ~]# export DOCKER_HOST=tcp://localhost:2375
[root@webportal ~]# docker images

To have this environment variable automatically set at the login, add the two lines to the bash_profile of the root user by executing:

[root@webportal ~]# echo DOCKER_HOST=tcp://localhost:2375 >> /root/.bash_profile
[root@webportal ~]# echo export DOCKER_HOST >> /root/.bash_profile

The DOCKER_HOST must also be set for the docker cronjob. Create an empty directory:

[root@webportal ~]# mkdir /usr/lib/systemd/system/docker-cleanup.service.d

and paste the following conent to the override.conf file:

[root@webportal ~]# echo '[Service]' >> /usr/lib/systemd/system/docker-cleanup.service.d/override.conf
[root@webportal ~]# echo 'Environment="DOCKER_HOST=tcp://localhost:2375"' >> /usr/lib/systemd/system/docker-cleanup.service.d/override.conf

Reload the systemd manager configuration:

[root@webportal ~]# systemctl daemon-reload

The domain name (and port if not 2375) of the Docker host is stored in the DockerHost system setting. This parameter is set during the activation process described later (see Activating the Web Portal).

Configure direct-lvm Mode

The devicemapper is the default Docker storage driver on CentOS. By default, the devicemapper uses the loop-lvm configuration mode. This is not recommended for production.

The preferred configuration for production deployments is direct-lvm. How to set this up is described in the Docker documentation:

Installing the TeamDrive Agent Docker Image

Note

In case of using a white label version of TeamDrive with own customized UI’s, colors and logo, please step over to the next chapter Creating a White Label Agent Docker Image to set the settings regarding the white label agent docker build process. Otherwise proceed with the following standard installation and skip the next chapter.

Docker container images are available from the TeamDrive public Docker repository on the docker hub. Here you will find a list of the tagged images that have been uploaded by TeamDrive:

https://hub.docker.com/r/teamdrive/agent/tags/

The current version of the Web Portal uses the image version with the 4.3.2.1655-TMDR tag name.

Install (and updating) an image on your Docker host will be done using the upgrade command. Start yvva and execute upgrade_now;;:

[root@webportal ~]# yvva
Welcome to yvva shell (version 1.3.8).
Enter "go" or end the line with ';;' to execute submitted code.
For a list of commands enter "help".


UPGRADE COMMANDS:
-----------------
To upgrade from the command line, execute:
yvva --call=upgrade_now --config-file="/etc/yvva.conf"

upgrade_now;;
Perform upgrade changes to the Docker image and/or database (this command cannot be undone).

Leave the yvva shell by type in quit.

Note

If outgoing requests has to use a proxy server, follow the docker documentation https://docs.docker.com/engine/admin/systemd/#http-proxy to set a proxy for docker. Restart the docker service after adding the proxy configuration.

Creating a White Label Agent Docker Image

To install or update a white label docker image, your white label TeamDrive Agent tar archive is required and the following white label settings must be defined (see White Label for details):

  • Set UseWhiteLabelDockerImage to true
  • Set your 4 letter WhiteLabelProviderCode
  • Set your WhiteLabelProductName
  • Optional set the WhiteLabelDISTRIBUTOR content. This is the content of the DISTRIBUTOR file in the agent tar.gz package. If empty, the update process will extract the file from the tar.gz package. If you need special client settings for the web portal agent, you should place the complete content in this setting.
  • Set a WhiteLabelDockerBuildFolder which is necessary for the docker container build process. Place your white label Agent tar archive file in this folder. If no agent can be found, an automatic download from our download portal will be done using the URL in WhiteLabelAgentDownloadURL (the placeholders in the URL will be replaced with your parameters).

After the white label specific parameters are set, you can use the same upgrade_now;; call in the yvva command line as described above. The build process will check the teamdrive docker hub for the latest published version and will try to download and build this version with your white label tar.gz package. If this version can not be found (for e.g. if your white label version has a different version number which might be the case for white label builds), the build process will look for an agent .tar.gz file with a higher version number in the WhiteLabelDockerBuildFolder. In this case you have to manually download and place you white label Agent into this folder and the automatic download step will be skipped.

Installing SSL certificates

The default Apache HTTP Server installation ships with self-signed SSL certificates for testing purposes. We strongly recommend to purchase and install proper SSL certificates and keys and to adjust the configuration in file /etc/httpd/conf.d/ssl.conf accordingly before moving the server into production.

The exact installation process depends on how you obtain or create the SSL key and certificate, please refer to the respective installation instructions provided by your certificate issuer.

Starting the Web Portal

After all configuration steps have been performed, we can start the TeamDrive Web Portal to conclude the initial installation/configuration.

Starting td-webportal

To activate the yvvad-based td-webportal background task you have to start the service using the provided init script.

The configuration file /etc/td-hosting.conf defines how this process is run. You usually don’t have to modify these settings.

To start the td-webportal program, use the service command as user root:

[root@webportal ~]# service td-webportal start
Starting TeamDrive Web Portal:                       [  OK  ]

Use the status option to the service command to verify that the service has started:

[root@webportal ~]# service td-webportal status
yvvad (pid  2506) is running...

If td-webportal does not start (process yvvad is not running), check the log file /var/log/td-webportal.log for errors. See chapter Troubleshooting for details.

Starting the Apache HTTP Server

Now the Apache HTTP Server can be started, which provides the TeamDrive Web Portal functionality via mod_yvva.

You can start the service manually using the following command:

[root@webportal ~]# service httpd start

Warning

At this point, the Web Portal’s web server is answering incoming requests from any web client that can connect to its address. For security purposes, you should not make it accessible from the public Internet until you have concluded the initial configuration, e.g. by blocking external accesses using a firewall.

Check the log file /var/log/httpd/error_log and /var/log/td-webportal.log for startup messages and possible errors:

[notice] Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured
-- resuming normal operations
[notice] mod_yvva 1.3.1 (Jan 15 2016 12:56:45) loaded
[notice] Logging (=error) to: /var/log/td-webportal.log

Please consult chapter Troubleshooting if there is an error when starting the service.