This document describes how to start and stop Techila Workers programmatically when using TDCE in the following environments:

When using TDCE, Techila Workers can be started and stopped by using the functionality included in the Techila SDK. This functionality can be accessed by using the operating system command prompt.

img1

Please note that before starting capacity, you will need to have deployed TDCE either by using AWS Marketplace or Google Marketplace. Instructions for deploying the environments can be found in the following documents:

1. Managing Capacity in Google Marketplace

Starting and stopping Techila Workerss programmatically in GCE is possible by using the GCE plugin included in the Techila SDK. Available GCE related commands and parameters can be displayed by executing the following command in Windows Command Prompt / Linux Shell:

java -jar techila.jar --plugin gce

The techila.jar is included in the Techila SDK, in folder techila\lib. When executing the CLI commands shown in this document, you will need to include the path where your Techila SDK is located.

The GCE related commands are displayed at the end of the printout, under the GCE Plugin Commands heading.

1.1. Starting Capacity

Techila Workers can be started with deployWorkers command:

java -jar techila.jar --plugin gce deployWorkers count=<Instance Count> [machinetype=<Machine Type>] [image=<Worker Image>] [prefix=<Worker Instance Name prefix>] [accountid=<Service Account Id>] [disksize=<Worker Disk Size in GBs>] [preemptible=<true|false>]

The example command below could be used to start 5 x n1-standard-4 Techila Workers that have a Windows operating system.

java -jar techila.jar --plugin gce deployWorkers count=5 machinetype=n1-standard-4 image=--compute--windows

Techila Workers that have a Linux operating system could be started by setting image=--compute—​linux:

java -jar techila.jar --plugin gce deployWorkers count=5 machinetype=n1-standard-4 image=--compute--linux

When capacity is running, you can change the number of Techila Workers by simply passing the desired number to the count parameter and executing the deployWorkers command.

1.2. Setting Idle Shutdown

The setautodeletedelay command can be used to specify an idle timeout delay for an existing Techila Worker deployment. If the Techila Workers idle for longer than the specified time, the Techila Worker instances will be automatically terminated.

The example command below could be used to set an idle timeout of 60 minutes.

java -jar techila.jar --plugin gce setautodeletedelay delay=60

1.3. Stopping Capacity

Capacity can be stopped by using the deployWorkers command and setting count=0. The example command below would shut down all Techila Workers

java -jar techila.jar --plugin gce deployWorkers count=0

1.4. Using Custom Prefixes

The prefix parameter in the deployWorkers command can be used to give a give a prefix for the Techila Workers that will be deployed. This means that you can create multiple Techila Worker deployments consisting of different instance types / operating systems as long as you use a different prefix each time you run the command.

The example commands below would deploy 7 instances in total: 5 x n1-standard-4 instances and 2 x n1-standard-8 instances

java -jar techila.jar --plugin gce deployWorkers count=5 machinetype=n1-standard-4 image=--compute--linux prefix=my-custom-prefix
java -jar techila.jar --plugin gce deployWorkers count=2 machinetype=n1-standard-8 image=--compute--linux prefix=my-secondary-prefix

The custom prefixes are used when selecting the target for any future API calls. This means that if you used custom prefixes to start capacity, you will need to use the same custom prefix to shut down the capacity.

The screenshot below illustrates how these prefixes are displayed in the Techila web interface for the example commands above.

prefix2

2. Managing Capacity in AWS Marketplace

After deploying TDCE via AWS Marketplace, starting and stopping workers programmatically is possible by using the AWS plugin included in the Techila SDK. Available AWS related commands and parameters can be displayed by executing the following command in Windows Command Prompt / Linux Shell:

java -jar techila.jar --plugin amazon

The AWS related commands are displayed at the end of the printout, under the Amazon Plugin Commands heading.

The techila.jar is included in the Techila SDK, in folder techila\lib. When executing the CLI commands shown in this document, you will need to include the path where your Techila SDK is located.

2.1. Starting Capacity

Techila Workers can be started with deployworkers command:

java -jar techila.jar --plugin amazon deployworkers amount=<Instance Count> instancetype=<Instance Type> os=Linux|Windows [amiid=<Custom AMI ID>] [idletimeout=<minutes>]

The example command below could be used to start 5 x c5.xlarge Techila Workers that have a Windows operating system.

java -jar techila.jar --plugin amazon deployworkers amount=5 instancetype=c5.xlarge os=Windows

Techila Workers that have a Linux operating system could be started by setting os=Linux:

java -jar techila.jar --plugin amazon deployworkers amount=5 instancetype=c5.xlarge os=Linux

When capacity is running, you can change the number of Techila Workers by simply passing the desired number to the amount parameter and executing the deployworkers command

It is also possible to specify an idle timeout for the Techila Workers when deploying capacity by using the idletimeout parameter. If the Techila Workers idle for longer than the specified time, the Techila Worker instances will be automatically terminated.

The example command below could be used to set an idle timout of 30 minutes.

java -jar techila.jar --plugin amazon deployworkers amount=5 instancetype=c5.xlarge os=Windows idletimeout=30

2.2. Setting Idle Shutdown

The setidletimeout command can be used to specify an idle timeout delay for an existing Techila Worker deployment. If the Techila Workers idle for longer than the specified time, the Techila Worker instances will be automatically terminated.

The example command below could be used to set an idle timeout of 60 minutes.

java -jar techila.jar --plugin amazon setidletimeout idletimeout=60

2.3. Stopping Capacity

Capacity can be stopped by using the deployworkers command and setting amount=0. The example command below would shut down all Techila Workers

java -jar techila.jar --plugin amazon deployworkers amount=0