TAXI stands for Translation Automation eXchange Interface.
gem install bundler:2.1.4
bundle install
DEV_ENV=true bundle exec bin/taxi --help
Setting the environment variable DEV_ENV
will load .env
at startup.
There are 3 stages in the translation workflow:
- open: ready to be translated by the translation agency
- deploy: translated and ready to be deployed
- done: deployed in production
Overall file structure:
SFTP/
- user1/
- 1_open/
- 2_deploy/
- 3_done/
- user2/
- 1_open/
- 2_deploy/
- 3_done/
For each category, a folder in the format <name>-<from>-<to>
has to be present:
- 1_open/
- <name>-<from>-<to>-<date>/
- wirecard-en_US-ru_RU-20200506/
So the complete identifier for a package is <name>-<from>-<to>-<date>
, where the root folder open
is the status.
Using taxi
, an example workflow would be:
taxi package make
taxi package translate
- Translation (or
taxi package mv
for testing purposes) taxi package deploy
You can use taxi package status all|open|deploy|done
to check the status of packages.
taxi package make <name> <path> [--bucket=<bucket>]
Arguments:
name
: name of the package (free to choose any name)path
: path to the resources on S3 (results ins3://<bucket>/<path>
)- OPTIONAL
bucket
: name of the bucket (Default:$AWS_DEFAULT_BUCKET
)
taxi package translate <name> [<from>] <to> --agency=<agency>
Arguments:
name
: name of the package (must match thename
specified inpackage make
)- OPTIONAL
from
: original language (Default: en_US) to
: target language (e.g. ru_RU)agency
: name of the agency which will get the translation package (AKA user name for SFTP)
taxi package deploy <name> <path> [<from>] <to> [--bucket=<bucket>] --agency=<agency>
Arguments:
name
: name of the package (must match thename
specified inpackage make
)path
: path to the resources on S3 (results ins3://<bucket>/<path>
)- OPTIONAL
from
: original language (Default: en_US) to
: target language (e.g. ru_RU)- OPTIONAL
bucket
: name of the bucket (Default:$AWS_DEFAULT_BUCKET
) agency
: name of the agency which translated the package (AKA user name for SFTP)
taxi package status <phase> --agency=<agency>
Arguments:
phase
: one ofopen
,deploy
,done
orall
agency
: name of the agency (AKA user name for SFTP)
This section describes the setup of a development environment.
Run once: Generate SSH keys for the users and setup folder structure
cd dev/
./init.sh
Start infrastructure
docker-compose -f dev/docker-compose.yml up
Stop infrastructure
docker-compose -f dev/docker-compose.yml down --remove-orphans
Login via Terminal, e.g. as agency2
sftp -P 2222 -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -i dev/sftp-keys/agency2/rsa_key agency2@localhost
Access the Administration Interface
open http://localhost:9000
Directly access files in your-bucket through the webserver
open http://localhost:8888/your-name/path/to/document
AWS CLI setup for minio, see https://docs.min.io/docs/aws-cli-with-minio.html
The credentials that need to be used for aws configure --profile minio-admin
are:
- Access Key ID:
minio
- Secret Access Key:
letmeinplease
- Region: eu-central-1
The credentials that need to be used for aws configure --profile minio
are:
- Access Key ID:
myuser
- Secret Access Key:
myuserletmein
- Region: eu-central-1
Add to your ~/.aws/config
[profile minio]
region = eu-central-1
output = text
signature_version = s3v4
[profile minio-myuser]
source_profile = minio
region = eu-central-1
output = text
Add to your ~/.aws/credentials
[minio]
aws_access_key_id = minio
aws_secret_access_key = letmeinplease
[minio-myuser]
aws_access_key_id = myuser
aws_secret_access_key = myuserletmein
Once the AWS CLI has been configured, create a bucket:
- First, create a bucket
aws s3 --endpoint-url http://localhost:9000 --profile minio mb s3://mybucket
- Then, upload documents
aws s3 --endpoint-url http://localhost:9000 --profile minio cp /tmp/build/html s3://mybucket --recursive
- List the documents just created
aws s3 --endpoint-url http://localhost:9000 --profile minio ls s3://mybucket
Assume Role
Test the configuration:
aws --endpoint-url http://localhost:9000 --profile minio sts assume-role --role-arn arn:xxx:xxx:xxx:xxxx --role-session-name term_session --output json
At this point, both the SFTP server and the S3 clone are up and running.
You may create more buckets and add more content at this point.
taxi
will use the environment variables specified in .env
if DEV_ENV=1
.
These variables will set up taxi
to use the local infrastructure from dev/docker-compose.yml
.
Check the status of source code documentation by running:
bundle exec rake doc:suggest
- SFTP: Add multiple users (via
users.conf
) - SFTP: Mount user config file for users, and generate the keys according to the user names in that config