Getting Set Up for Spinnaker Development
Overview
This page describes the steps a Developer should take to fetch Spinnaker’s codebase and get set up to work on it.
Follow the contributing guidelines if you plan to submit your work as a patch to the open source project.
System Requirements
This guide assumes you have access to a machine with a minimum specification of:
- At least 16 GB of RAM
- At least 6 cores CPU
MacOS
These are some tools but install additional as needed the tools for your needs
- homebrew: Not required but useful - can be installed via here
- Docker: either docker desktop or rancher. CAUTION: Spinnaker uses TestContainers heavily and you’ll potentially need to adjust settings for test containers which is out of the scope of this guide.
- git: Installed usually via Xcode Command Line Tools - often by trying to run git from a terminal
- curl:
brew install curl- not required explicitly but useful for testing - JDK 17: A JDK is required since we’re building from source. This can be done using sdkman or any other installation tool.
- node/npm: (version >=16)
- yarn:
npm install -g yarnor guide - mysql:
docker run -e MYSQL_ROOT_PASSWORD=changeit -it --rm mysql:8 --verboseis a good basic example but will need the databases configured as documented in the storage configuration . Adjust the docker command to persist if you want to keep your data between runs. - redis:
docker run -d --rm --name redis -p 0.0.0.0:6379:6739 valkey/valkey:8as an example. -
Set up your cloud provider of choice
. Locally these providers would be added to
~/.spinnaker/clouddriver-local.ymlfiles - Add the other sql/redis/other configuration to your
~/.spinnaker/*.ymlfiles for development
Next, clone the spinnaker monorepo . You can now start spinnaker assuming you’ve configured the necessary settings locally for sql/redis.
cd spinnaker
./gradlew run
This starts up ALL the spinnaker services service via a single gradle task. Services can be started independently as needed. Keep in mind that there is a dependency tree for services that will mean that things won’t start unless a dependent service is up and running. Front50 is a common base service dependency for all the other spinnaker services.
Making Changes to Spinnaker
Once you have a working LocalGit deployment you can begin to make changes to the codebase. After you’ve made edits in the code of a service you can see those changes reflected by restarting the services as needed.
Configuring an IDE
IntelliJ
Import the project into IntelliJ:
- Select
New>Project from Existing Sources - Navigating to the
build.gradlefile (i.e.,~/dev/spinnaker/build.gradle)
Debugging
Each Java service can be configured to listen for a debugger. To start the JVM in debug
mode, set the Java system property DEBUG=true.
The JVM will then listen for a debugger to be attached on a port specific to that service. The service-specific debug ports are as follows:
| Service | Port |
|---|---|
| Gate | 8184 |
| Orca | 8183 |
| Clouddriver | 7102 |
| Front50 | 8180 |
| Rosco | 8187 |
| Igor | 8188 |
| Echo | 8189 |
The JVM will not wait for the debugger to be attached before starting a service; the relevant
JVM arguments can be seen and modified as needed in the service’s build.gradle file.
Next steps
- If you haven’t done so already, read through the Spinnaker Architecture reference to learn more about the individual services’ responsibilities, their dependencies on each other, and their port mappings.
- Consider working on one of the issues marked “beginner-friendly” to start learning and contributing to Spinnaker right away.
- Sign up for Spinnaker’s Slack community and join the #dev channel to ask questions and get feedback while developing Spinnaker.
- Read through the New Stage guide to add new stages and steps
- Read about extending spinnaker with CRD handling