Skip to content

Developer Setup

Mitchell Shiell edited this page May 31, 2023 · 18 revisions

There are two ways to set up a song-server in a development environment: ​

Standalone song-server

Clone the Song Repository

Clone the Song repository to your local computer:

git clone https://github.com/overture-stack/SONG.git

Build

JDK11 and Maven3 are required to set up this service. ​ To build the song-server run the following command from the Song directory:

mvn clean install

Start the server

Before running your song-server, ensure that your local machine is connected and running the following dependent services: ​

  • Song database (default localhost:5432)
  • Kafka (default localhost:9092)
  • If the secure Spring profile is enabled, Ego server is required
  • If the score-client-cred Spring profile is enabled the Score server is required ​ The default configuration can be found in ./application.yml. ​ Run the following command to start the song-server: ​
cd song-server/
mvn spring-boot:run -Dspring-boot.run.profiles=noSecurityDev,kafka

Warning: This guide is meant to demonstrate the configuration and usage of SONG for development purposes and is not intended for production. If you ignore this warning and use this in any public or production environment, please remember to use Spring profiles accordingly. For production, use the following profiles: Kafka,prod,secure,score-client-cred,default.

Docker for Song

Several make targets are provided for locally deploying the dependent services using Docker. As the developer, you can replicate a live environment for song-server and song-client. Using Docker allows you to develop locally, test submissions, create manifests, publish, unpublish and test score uploads/downloads in an isolated environment. ​ For more information on the different targets, run make help or read the comments above each target for a description. ​

Note: We will need an internet connection for the make command, which may take several minutes to build. No external services are required for the make command.

Start song-server and all dependencies.

To start song-server and all dependencies, use the following command: ​

make clean start-song-server

Start the song-server (Mac M1 Users)

On a Mac M1 you must set the Docker BuildKit environment variable to the legacy builder. ​

DOCKER_BUILDKIT=0 make clean start-song-server

Stop song-server and clean up

To clean everything, including killing all services, maven cleaning, and removing generated files/directories, use the following command: ​

make clean

Warning Docker for Song is meant to demonstrate the configuration and usage of Song, and is not intended for production. If you ignore this warning and use this in any public or production environment, please remember to change the passwords, accessKeys, and secretKeys.