Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎻 Conductor #20

Merged
merged 34 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7e1f174
initial commit
MitchellShiell Sep 20, 2024
1c0a535
updated with docker profiles + profile specific automation
MitchellShiell Sep 20, 2024
dec119b
renamed deployment directory to deploymentScripts
MitchellShiell Sep 20, 2024
d385df2
added arrangerDev profile
MitchellShiell Sep 20, 2024
e16d197
added maestroDev profile
MitchellShiell Sep 20, 2024
0c18601
re-renamed scripts folders, updated scripts accordingly
MitchellShiell Sep 20, 2024
b2b72ab
added songDev profile
MitchellShiell Sep 20, 2024
252f34e
added scoreDev profile
MitchellShiell Sep 20, 2024
edab084
updated make file and added a .bat file for windows users
MitchellShiell Sep 20, 2024
ad42f4c
update to readme
MitchellShiell Sep 23, 2024
afc2219
partial update to scripts removed unnecessary env variables
MitchellShiell Sep 27, 2024
45d48bb
updated scripts and improved logging
MitchellShiell Oct 1, 2024
d005302
spacing
MitchellShiell Oct 1, 2024
342bf65
minor updates
MitchellShiell Oct 1, 2024
dd09733
updated updated host port on songDb
MitchellShiell Oct 7, 2024
5987124
updated updated host port on songDb
MitchellShiell Oct 7, 2024
886630e
updated script for generating empty postgres directories
MitchellShiell Oct 7, 2024
8667609
fixed port and songDev script
MitchellShiell Oct 7, 2024
a8f19a2
added healthcheck file removal at startup
MitchellShiell Oct 7, 2024
d7c0dd8
minor fix to deployment scripts and compose comment
MitchellShiell Oct 8, 2024
bac5ef8
minor fix to maestro log
MitchellShiell Oct 10, 2024
2ea8ab1
update & tested maestroDev & platform kafka configuration
MitchellShiell Oct 29, 2024
c08a60d
updated persistent storage inline with main branch
MitchellShiell Nov 4, 2024
cee3173
one less file
MitchellShiell Nov 4, 2024
c33e938
Update make.bat
MitchellShiell Nov 4, 2024
83c9b46
Update conductorScripts/services/kafkaSetup.sh
MitchellShiell Nov 4, 2024
3367809
Update conductorScripts/services/healthcheckCleanup.sh
MitchellShiell Nov 4, 2024
6abb1fd
Update conductorScripts/deployments/scoreDev.sh
MitchellShiell Nov 4, 2024
5176039
Update conductorScripts/deployments/maestroDev.sh
MitchellShiell Nov 4, 2024
59a380b
Update README.md
MitchellShiell Nov 4, 2024
92aec4d
Update README.md
MitchellShiell Nov 4, 2024
fe7c544
minor indentation fix
MitchellShiell Nov 4, 2024
1aa9a69
added gitattributes for CRLF to LF conversion on windows
MitchellShiell Nov 4, 2024
7830070
Update .gitattributes
MitchellShiell Nov 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
conductorscripts/**/*.sh text eol=lf
MitchellShiell marked this conversation as resolved.
Show resolved Hide resolved
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
platform:
PROFILE=platform docker compose --profile platform up --attach conductor

stageDev:
PROFILE=stageDev docker compose --profile stageDev up --attach conductor

arrangerDev:
PROFILE=arrangerDev docker compose --profile arrangerDev up --attach conductor

maestroDev:
PROFILE=maestroDev docker compose --profile maestroDev up --attach conductor

songDev:
PROFILE=songDev docker compose --profile songDev up --attach conductor

scoreDev:
PROFILE=scoreDev docker compose --profile scoreDev up --attach conductor

down:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lazy question: does this work for all of the above? hoping the answer is yes, otherwise we'll need to rename it "platform down", and add "up" to all others (possibly with their own downs) or just remove this one to keep things consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it does, and I was happy to figure out it did, it's super convenient

PROFILE=platform docker compose --profile platform down
74 changes: 55 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,69 @@
# Overture QuickStart
# Conductor

The Overture QuickStart provides those interested in gaining hands-on experience using an Overture platform a fast and frictionless local installation.
Conductor is a flexible Docker Compose setup that simplifies the process of spinning up Overture development and deployment configurations using Docker profiles and extensible scripting events.

## Getting Started
## Key Features

**1. Download and configure Docker Desktop**
- **Profile-based Deployments**: Uses Docker profiles to manage different environment setups.
- **Conductor-driven Execution**: The Conductor service executes ordered scripts based on the `PROFILE` environment variable.

In Docker Desktop click the cog icon , then resources. We recommend at minimum setting your CPU limit to 8, memory to 8GB, swap to 2GB, with64GB of virtual disk space available. If you have Docker already installed ensure it is up to date.
## Getting Started

**2. Clone the QuickStart Repository**
**1. Clone the repo's `main` branch**

```bash
git clone https://github.com/overture-stack/composer.git && cd composer
```
git clone -b concerto https://github.com/overture-stack/composer.git && cd composer
```

**2. Run one of the following commands to spin up different environments:**

| Environment | Unix/macOS | Windows |
|-------------|------------|---------|
| Overture Platform | `make platform` | `make.bat platform` |
| Stage Dev | `make stageDev` | `make.bat stageDev` |
| Arranger Dev | `make arrangerDev` | `make.bat arrangerDev` |
| Maestro Dev | `make maestroDev` | `make.bat maestroDev` |
| Song Dev | `make songDev` | `make.bat songDev` |
| Score Dev | `make scoreDev` | `make.bat scoreDev` |

**3. Run the Docker Compose with attach mode enabled**
Each command spins up complementary services for the specified development environment.

```bash
docker compose up --attach conductor
## Repository Structure

```
.
├── conductorScripts/
│ ├── deployments
│ └── services
├── configurationFiles/
│ ├── arrangerConfigs
│ ├── elasticsearchConfigs
│ └── keycloakConfigs
├── guideMaterials
├── persistentStorage/
│ ├── data-keycloak-db
│ ├── data-minio
│ └── data-song-db
├── Makefile
└── make.bat
```

Your portal will be accessible from your `localhost:3000`
- **`conductorScripts/`** Contains scripts for orchestrating the deployment process.
- `deployments/`: Scripts that execute service scripts sequentially based on the deployment configuration. These also include custom post-deployment logs with essential next steps for the deployment scenario.
- `services/`: Modular scripts for individual service setup tasks. Each file is named according to its purpose, with inline comments documenting the code.

- **`configurationFiles/`** Stores all required configuration files, including:
- `arrangerConfigs/`: Configuration files specific to Arranger.
- `elasticsearchConfigs/`: Configuration files for Elasticsearch, encompassing indexing mappings and documents for seeding data.
- `keycloakConfigs/`: Configuration files for Keycloak, including preconfigured realm files and Overture API key provider details.

- **`guideMaterials/`** Supplementary folders and files for use with the [Overture guides](https://www.overture.bio/documentation/guides/).

## Rational
- **`persistentStorage/`** Directory for storing persistent data during container startups and restarts. These folders come pre-loaded with mock data.
- `data-keycloak-db/`: Persistent local storage for the Keycloak database.
- `data-minio/`: Persistent local storage for MinIO object storage.
- `data-song-db/`: Persistent local storage for the Song database.

With Overture we want to provide new users the following:
- **`Makefile`** Contains [`make` commands](https://www.gnu.org/software/make/manual/make.html#Overview-of-make) for Unix-based systems (macOS, Linux) to streamline Docker operations.

|Purpose|Solution|
|---|---|
| **A way to look at it**|[Overture Demo Portal](https://demo.overture.bio/)|
| **A way to try it**| Overture QuickStart |
| **A way to own it**| [Product Documentation](https://www.overture.bio/documentation/) *and* [Platform Guides](https://github.com/overture-stack/website/pull/385)|
- **`make.bat`** Windows equivalent of the Makefile, featuring batch commands tailored for Windows systems.
43 changes: 43 additions & 0 deletions conductorScripts/deployments/arrangerDev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/sh

# Welcome
echo -e "\033[1;36m╔═════════════════════════════════════════╗\033[0m"
echo -e "\033[1;36m║ Welcome to the ArrangerDev QuickStart ║\033[0m"
echo -e "\033[1;36m╚═════════════════════════════════════════╝\033[0m"

# rs = "Run Script" a simple function to apply permissions and run scripts
rs() {
chmod +x "$1" && "$1"
}

# Elasticsearch Setup
echo -e "\033[1;35m[1/2]\033[0m Setting up Elasticsearch"
rs /scripts/services/elasticSearchSetup.sh

# Update Conductor to Healthy Status
echo "healthy" > /health/conductor_health
echo -e "\033[1;36mConductor:\033[0m Updating Container Status. Health check file created"

# Check Stage
echo -e "\033[1;35m[2/2]\033[0m Checking Stage"
rs /scripts/services/stageCheck.sh

# Remove Health Check File
rm /health/conductor_health

# Success and Next Steps
echo -e "\033[1;36m╔════════════════════════════════════════╗\033[0m"
echo -e "\033[1;36m║ Arranger Dev Service Setup Complete ║\033[0m"
echo -e "\033[1;36m╚════════════════════════════════════════╝\033[0m\n"
echo -e "\033[1m1️⃣ To run Arranger locally, start by cloning the repo:\033[0m\n"
echo -e " \033[1;32mgit clone https://github.com/overture-stack/arranger.git\033[0m\n"
echo -e "\033[1m2️⃣ Navigate to the cloned directory:\033[0m\n"
echo -e " \033[1;32mcd arranger\033[0m\n"
echo -e "\033[1m3️⃣ Copy the example environment file:\033[0m\n"
echo -e " \033[1;32mcp .env.arrangerDev .env\033[0m\n"
echo -e "\033[1m4️⃣ Install the dependencies:\033[0m\n"
echo -e " \033[1;32mnpm ci\033[0m\n"
echo -e "\033[1m5️⃣ Bootstrap the project:\033[0m\n"
echo -e " \033[1;32mnpm run bootstrap\033[0m\n"
echo -e "\033[1m6️⃣ Run the development server:\033[0m\n"
echo -e " \033[1;32mnpm run server\033[0m\n"
56 changes: 56 additions & 0 deletions conductorScripts/deployments/maestroDev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/sh

# Welcome
echo -e "\033[1;36m╔════════════════════════════════════════╗\033[0m"
echo -e "\033[1;36m║ Welcome to the MaestroDev QuickStart ║\033[0m"
echo -e "\033[1;36m╚════════════════════════════════════════╝\033[0m"

# rs = "Run Script" a simple function to apply permissions and run scripts
rs() {
chmod +x "$1" && "$1"
}

# Keycloak and Song Db Setup
echo -e "\033[1;35m[1/6]\033[0m Setting up Song & Keycloak databases"
rs /scripts/services/keycloakDbSetup.sh
rs /scripts/services/songDbSetup.sh

# Minio Check
echo -e "\033[1;35m[2/6]\033[0m Checking Minio Object Storage"
rs /scripts/services/minioCheck.sh

# Score Setup
echo -e "\033[1;35m[3/6]\033[0m Checking on Score"
rs /scripts/services/scoreCheck.sh

# Song Check
echo -e "\033[1;35m[4/6]\033[0m Checking Song"
rs /scripts/services/songCheck.sh

# Elasticsearch Setup
echo -e "\033[1;35m[5/6]\033[0m Setting up Elasticsearch"
rs /scripts/services/elasticsearchSetup.sh

# Check Keycloak
echo -e "\033[1;35m[6/6]\033[0m Checking Keycloak"
rs /scripts/services/keycloakCheck.sh

# Success and Next Steps
echo -e "\033[1;36m╔══════════════════════════════════════╗\033[0m"
echo -e "\033[1;36m║ MaestroDev Service Setup Complete ║\033[0m"
echo -e "\033[1;36m╚══════════════════════════════════════╝\033[0m\n"

echo -e "\033[1m1️⃣ To run Score locally, start by cloning the repo:\033[0m\n"
echo -e " \033[1;32mgit clone https://github.com/overture-stack/maestro.git\033[0m\n"

echo -e "\033[1m2️⃣ Navigate to the cloned directory:\033[0m\n"
echo -e " \033[1;32mcd maestro\033[0m\n"

echo -e "\033[1m3️⃣ Build the application \033[1;34m(requires JDK11 & Maven3)\033[0m:\033[0m\n"
echo -e " \033[1;32m./mvnw clean install -DskipTests\033[0m\n"

echo -e "\033[1m4️⃣ Start the development server:\033[0m\n"
echo -e " \033[1;32m./mvnw spring-boot:run -pl maestro-app\033[0m\n"

echo -e "\033[1mMaestro's Swagger UI can be accessed from:\n"
echo -e " \033[1;32mhttp://localhost:11235/api-docs\033[0m\n"
71 changes: 71 additions & 0 deletions conductorScripts/deployments/platform.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/bin/sh

# Welcome
echo -e "\033[1;36m╔═══════════════════════════════════════════════════╗\033[0m"
echo -e "\033[1;36m║ Welcome to the Overture Platform QuickStart ║\033[0m"
echo -e "\033[1;36m╚═══════════════════════════════════════════════════╝\033[0m"

# rs = "Run Script" a simple function to apply permissions and run scripts
rs() {
chmod +x "$1" && "$1"
}

# Cleanup any existing healthcheck file
rs scripts/services/healthcheckCleanup.sh

# Database Setups
echo -e "\033[1;35m[1/9]\033[0m Setting up Song & Keycloak databases"
rs /scripts/services/songDbSetup.sh
rs /scripts/services/keycloakDbSetup.sh

# Minio Check
echo -e "\033[1;35m[2/9]\033[0m Checking Minio Object Storage"
rs /scripts/services/minioCheck.sh

# Score Setup
echo -e "\033[1;35m[3/9]\033[0m Checking on Score"
rs /scripts/services/scoreCheck.sh

# Song Setup
echo -e "\033[1;35m[4/9]\033[0m Checking on Song"
rs /scripts/services/songCheck.sh

# Elasticsearch Setup
echo -e "\033[1;35m[5/9]\033[0m Setting up Elasticsearch"
rs /scripts/services/elasticSearchSetup.sh

# Update Conductor to Healthy Status, this signals search and exploration services (maestro, arranger, stage) to startup
echo "healthy" > /health/conductor_health
echo -e "\033[1;36mConductor:\033[0m Updating Container Status. Health check file created"

# Check Stage
echo -e "\033[1;35m[7/9]\033[0m Checking Stage"
rs /scripts/services/stageCheck.sh

# Check Arranger
echo -e "\033[1;35m[6/9]\033[0m Checking Arranger"
rs /scripts/services/arrangerCheck.sh

# Check Maestro
echo -e "\033[1;35m[8/9]\033[0m Checking Maestro"
rs /scripts/services/maestroCheck.sh

# Check Keycloak
echo -e "\033[1;35m[9/9]\033[0m Checking Keycloak"
rs /scripts/services/keycloakCheck.sh

# Remove Health Check File
rm /health/conductor_health

# Success and Next Steps
echo -e "\033[1;36m╔══════════════════════════════════════════╗\033[0m"
echo -e "\033[1;36m║ Overture QuickStart Setup Complete ║\033[0m"
echo -e "\033[1;36m╚══════════════════════════════════════════╝\033[0m"
echo -e "\n"
echo -e "\033[1m🌐 Front-end Portal:\033[0m"
echo -e " \033[1;32mhttp://localhost:3000\033[0m\n"
echo -e "\033[1m📚 Overture Platform Guides:\033[0m"
echo -e " \033[1;32mhttps://www.overture.bio/documentation/guides/\033[0m\n"
echo -e "\033[1m🛠️ QuickStart Information:\033[0m"
echo -e " Check the \033[1;33mdocker-compose.yml\033[0m file for details on this QuickStart,"
echo -e " including links to relevant sections of our deployment guide.\n"
48 changes: 48 additions & 0 deletions conductorScripts/deployments/scoreDev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/sh

# Welcome
echo -e "\033[1;36m╔════════════════════════════════════╗\033[0m"
echo -e "\033[1;36m║ Welcome to the ScoreDev QuickStart ║\033[0m"
echo -e "\033[1;36m╚════════════════════════════════════╝\033[0m"

# rs = "Run Script" a simple function to apply permissions and run scripts
rs() {
chmod +x "$1" && "$1"
}

# Keycloak and Song Db Setup
echo -e "\033[1;35m[1/4]\033[0m Setting up Song & Keycloak databases"
rs /scripts/services/keycloakDbSetup.sh
rs /scripts/services/songDbSetup.sh

# Minio Check
echo -e "\033[1;35m[2/4]\033[0m Checking Minio Object Storage"
rs /scripts/services/minioCheck.sh

# Song Setup
echo -e "\033[1;35m[3/6]\033[0m Checking Song"
rs /scripts/services/songCheck.sh

# Keycloak Check
echo -e "\033[1;35m[4/4]\033[0m Checking Keycloak"
rs /scripts/services/keycloakCheck.sh

# Success and Next Steps
echo -e "\033[1;36m╔══════════════════════════════════════╗\033[0m"
echo -e "\033[1;36m║ ScoreDev Service Setup Complete ║\033[0m"
echo -e "\033[1;36m╚══════════════════════════════════════╝\033[0m\n"

echo -e "\033[1m1️⃣ To run Score locally, start by cloning the repo:\033[0m\n"
echo -e " \033[1;32mgit clone https://github.com/overture-stack/score.git\033[0m\n"

echo -e "\033[1m2️⃣ Navigate to the cloned directory:\033[0m\n"
echo -e " \033[1;32mcd score\033[0m\n"

echo -e "\033[1m3️⃣ Build the application \033[1;34m(requires JDK11 & Maven3)\033[0m:\033[0m\n"
echo -e " \033[1;32m./mvnw clean install -DskipTests\033[0m\n"

echo -e "\033[1m4️⃣ Start the development server:\033[0m\n"
echo -e " \033[1;32m./mvnw spring-boot:run -Dspring-boot.run.profiles=default,s3,secure,dev -pl score-server\033[0m\n"

echo -e "\033[1mScores Swagger UI can be accessed from:\n"
echo -e " \033[1;32mhttp://localhost:8087/swagger-ui.html\033[0m\n"
48 changes: 48 additions & 0 deletions conductorScripts/deployments/songDev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/sh

# Welcome
echo -e "\033[1;36m╔═════════════════════════════════════╗\033[0m"
echo -e "\033[1;36m║ Welcome to the SongDev QuickStart ║\033[0m"
echo -e "\033[1;36m╚═════════════════════════════════════╝\033[0m"

# rs = "Run Script" a simple function to apply permissions and run scripts
rs() {
chmod +x "$1" && "$1"
}

# Keycloak and Song Db Setup
echo -e "\033[1;35m[1/4]\033[0m Setting up Song and Keycloak databases"
rs /scripts/services/keycloakDbSetup.sh
rs /scripts/services/songDbSetup.sh

# Minio Check
echo -e "\033[1;35m[2/4]\033[0m Checking Minio Object Storage"
rs /scripts/services/minioCheck.sh

# Score Setup
echo -e "\033[1;35m[3/4]\033[0m Checking Score"
rs /scripts/services/scoreCheck.sh

# Keycloak Check
echo -e "\033[1;35m[4/4]\033[0m Checking Keycloak"
rs /scripts/services/keycloakCheck.sh

# Success and Next Steps
echo -e "\033[1;36m╔══════════════════════════════════════╗\033[0m"
echo -e "\033[1;36m║ SongDev Service Setup Complete ║\033[0m"
echo -e "\033[1;36m╚══════════════════════════════════════╝\033[0m\n"

echo -e "\033[1m1️⃣ To run Song locally, start by cloning the repo:\033[0m\n"
echo -e " \033[1;32mgit clone https://github.com/overture-stack/song.git\033[0m\n"

echo -e "\033[1m2️⃣ Navigate to the cloned directory:\033[0m\n"
echo -e " \033[1;32mcd song\033[0m\n"

echo -e "\033[1m3️⃣ Build the application \033[1;34m(Requires JDK11)\033[0m:\033[0m\n"
echo -e " \033[1;32m./mvnw clean install -DskipTests\033[0m\n"

echo -e "\033[1m4️⃣ Start the development server:\033[0m\n"
echo -e " \033[1;32m./mvnw spring-boot:run -Dspring-boot.run.profiles=default,dev,secure -pl song-server\033[0m\n"

echo -e "\033[1mSongs Swagger UI can be accessed from:\n"
echo -e " \033[1;32mhttp://localhost:8080/swagger-ui.html\033[0m\n"
Loading