Skip to content

reagul/spring-cloud-spinnaker

Repository files navigation

Spring Cloud Spinnaker

Spring Cloud Spinnaker is a Spring Boot web application used to deploy all the parts of Spinnaker to a pre-selected space in PCF.

Running Spring Cloud Spinnaker

To run the app locally on your machine, you have to follow a few steps.

Requirements:

  • Either a Mac or Unix based system. (Building the Spinnaker components on Windows won’t work, and Cygwin has yet to be tested)

  • Java 8 SDK

  • git

Building Spinnaker

Before you can run this application, you have to build Spinnaker’s modules.

  1. Clone this repository

  2. Run git submodule init

  3. Run git submodule update

  4. Run ./build_spinnaker.sh

    Warning
    Do NOT interrupt build_spinnaker.sh in mid process. Due to the nature of Spinnaker’s nebula gradle plugin, the components cannot be built inside a git submodule. The script temporarily moves each module into /tmp, builds it, then moves it back. Any interruptions would require reseting the state of your cloned repository.

Targeting your deployment environment

This app uses the Spring Cloud Deployer for Cloud Foundry library. To support it, you need to create a key file:

src/main/resources/application-dev.yml
spring:
  cloud:
    deployer:
      cloudfoundry:
        username: <your username>
        password: <your password>
        organization: <your CF org>
        space: <your CF space>
        apiEndpoint: <your API endpoint>
        domain: <default domain of your CF org>
        skipSslValidation: true
Note
Don’t worry! application-dev.yml is listed as a file to NOT put under source control inside .gitignore.

With src/main/resources/application-dev.yml in place, you are now ready to run Spring Cloud Spinnaker.

SPRING_PROFILES_ACTIVE=dev ./mvnw clean spring-boot:run

Visit localhost:8080 and login using the credentials specified in application.yml.

Deploying Spinnaker

The app is designed to mimic a PCF tile. There is a tab for settings, and another for deploying and undeploying the modules.

Requirements:

  • Create a Redis service in your target PCF space

Settings

Table 1. Settings
Setting Purpose

Redis Service

Name of the Redis service you created

Account Name

Account name for Spinnaker to use when logging into PCF

Account Password

Account password for Spinnaker to use when logging into PCF

Repository Name/Access Code

If you are pulling deployment artifacts from an http-based repository, put your username. If s3, put your access code

NOTE: If your repository isn’t secured, leave blank

Repository Password/Secret Code

If you are pulling deployment artifacts from an http-based repository, put your password. If s3, put your secret code

NOTE: If your repository isn’t secured, leave blank

Spring Config Location

Override path location of your own set of Spinnaker configuration files.

With your settings filled in, click on the Status tab.

Deploying

On the Status tab, you have the ability to check each module, or deal with them all.

  1. Click on Deploy All.

  2. Sit back and sip on a cup of coffee. This will take some time.

Next Steps

After getting Spinnaker up and running, you should be able to access deck, the UI for Spinnaker, by visiting https://deck.<your domain>