- git clone https://github.com/m0zart89/tts-swarm-cluster.git
- cd tts-swarm-cluster/terraform
- cp terraform.tfvars.example terraform.tfvars (also set your unique project id)
- terraform init
- terraform apply --auto-approve=true
- cd ../ansible
- ansible-playbook -i inventory main.yml
- ssh -i ~/.ssh/google_compute_engine -l ubuntu <manager_ip>
- sudo docker service create --replicas 3 --name tts-backend -p 5002:5002 synesthesiam/mozillatts
- sudo docker service create --name=visualizer --publish=8080:8080/tcp --constraint=node.role==manager --mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock dockersamples/visualizer
From another host:
- sudo docker run -e AUTH_USER=admin -e AUTH_PASS=4ge7575 -e BACKEND=http://<any_worker_ip>:5002/api/tts -d -it -p 80:80 mozart89/tts-frontend
To destroy cluster:
- cd ../terraform
- terraform destroy --auto-approve=true