By default, docker-compose.yml uses the master-auto-setup tag which tracks the latest development version. For production or stable environments, use a specific release:
# Install MySQLbrew install mysql# Start MySQL servicebrew services start mysql# Create Cadence usermysql -u root <<EOFCREATE USER 'uber'@'%' IDENTIFIED BY 'uber';GRANT ALL PRIVILEGES ON *.* TO 'uber'@'%';FLUSH PRIVILEGES;EOF
# Install PostgreSQLbrew install postgresql@14# Start PostgreSQL servicebrew services start postgresql@14# Create Cadence user and databasepsql postgres <<EOFCREATE USER postgres WITH PASSWORD 'cadence';ALTER USER postgres WITH SUPERUSER;EOF
# Install Gobrew install go# Verify Go installationgo version # Should be 1.21+# Set up GOPATH if not already setecho 'export PATH=$PATH:$GOPATH/bin' >> ~/.zshrcsource ~/.zshrc
For active development, set up the full development environment:
1
Start dependencies
Choose your database and start it with Docker:
# Cassandradocker compose -f ./docker/dev/cassandra.yml up -d# Or MySQLdocker compose -f ./docker/dev/mysql.yml up -d# Or PostgreSQLdocker compose -f ./docker/dev/postgres.yml up -d
2
Install schema
# For Cassandramake install-schema# For MySQLmake install-schema-mysql# For PostgreSQLmake install-schema-postgres# For SQLite (no external DB needed)make install-schema-sqlite
3
Run the server
# Cassandra./cadence-server start# MySQL./cadence-server --zone mysql start# PostgreSQL./cadence-server --zone postgres start# SQLite (no external DB)./cadence-server --zone sqlite start
For production deployments with large workflow volumes, set up advanced visibility:
Elasticsearch
OpenSearch
# Start Elasticsearch with Kafkadocker compose -f docker/dev/cassandra-esv7-kafka.yml up -d# Install Elasticsearch schemamake install-schema-es-v7# Start server with ES configuration./cadence-server --zone es_v7 start
Benefits:
Full-text search on workflow attributes
Custom search attributes
Complex query capabilities
Better performance at scale
# Start OpenSearch with Kafkadocker compose -f docker/dev/cassandra-opensearch-kafka.yml up -d# Install OpenSearch schemamake install-schema-es-opensearch# Start server./cadence-server --zone es_opensearch start
git submodule update --init --recursivego mod download
Schema installation fails
Ensure your database is running and accessible:
# For Cassandracqlsh -e "DESCRIBE KEYSPACES;"# For MySQLmysql -u uber -puber -e "SHOW DATABASES;"# For PostgreSQLpsql -U postgres -c "\l"
Server won't start
Check the configuration file and logs:
# Verify config syntax./cadence-server --config config/development.yaml validate# Check server logs./cadence-server start 2>&1 | tee server.log
Port already in use
Find and stop the process using required ports:
# Find process on port 7933lsof -ti:7933 | xargs kill -9# Or change ports in config
For production deployments, refer to the comprehensive operations documentation for best practices on scaling, monitoring, and maintaining Cadence clusters.