-
Run Docker.
-
Copy the Enterprise SDK archive (
tarantool-enterprise-sdk-<version>.tar.gz
) to thesdk
folder next toDockerfile
. -
(Optional) If you use macOS aarch64, set the platform:
$ export DOCKER_DEFAULT_PLATFORM=linux/amd64
-
Build the image:
$ docker build -t my-application .
-
Execute
docker compose up
:$ docker compose up
Wait until the cluster is run:
tarantool-1 | • Application was successfully built tarantool-1 | • Starting an instance [sharded_cluster_tcm:storage-a-002]... tarantool-1 | • Starting an instance [sharded_cluster_tcm:storage-b-001]... tarantool-1 | • Starting an instance [sharded_cluster_tcm:storage-b-002]... tarantool-1 | • Starting an instance [sharded_cluster_tcm:router-a-001]... tarantool-1 | • Starting an instance [sharded_cluster_tcm:storage-a-001]...
-
Open http://0.0.0.0:8080/.
-
Log in using generated credentials, for example:
WRN Generated super admin credentials login=admin password=tF1FAurUm5mQhsrmaeHNDUIb0LKvZQAv ...
-
Open the router's console and perform the initial cluster bootstrap:
sharded_cluster_crud:router-a-001> vshard.router.bootstrap() --- - true ...
-
To insert sample data, call
crud.insert_many()
on the router:crud.insert_many('bands', { { 1, box.NULL, 'Roxette', 1986 }, { 2, box.NULL, 'Scorpions', 1965 }, { 3, box.NULL, 'Ace of Base', 1987 }, { 4, box.NULL, 'The Beatles', 1960 }, { 5, box.NULL, 'Pink Floyd', 1965 }, { 6, box.NULL, 'The Rolling Stones', 1962 }, { 7, box.NULL, 'The Doors', 1965 }, { 8, box.NULL, 'Nirvana', 1987 }, { 9, box.NULL, 'Led Zeppelin', 1968 }, { 10, box.NULL, 'Queen', 1970 } })