• Stars
    star
    111
  • Rank 314,510 (Top 7 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A package manager that installs, upgrades, and rolls back Spring Boot applications on multiple Cloud Platforms.

Codecov

Spring Cloud Skipper Build Status

Spring Cloud Skipper

A package manager that installs, upgrades, and rolls back applications on multiple Cloud Platforms.

Supported application types are Spring Boot applications.

Supported Cloud Platforms are Cloud Foundry, Kubernetes.

For development experience, Local deployment is supported.

Skipper can be used as part of implementing the practice of Continuous Deployment. It provides a versioned "single source of truth" that defines what applications were deployed to the cloud. This enables easy rollbacks and upgrades without having to rebuild applications from source code.

Building

Clone the repo and type

$ ./mvnw clean install

which will run the tests as well.

To just create the executables, type

$./mvnw clean package -DskipTests -Dmaven.javadoc.skip=true

To generate just the RESTDocs documentation

./mvnw test -pl spring-cloud-skipper-server-core -Dtest=*Documentation*

To build just the documentation, if the RESTDocs generated from tests are already present

./mvnw -DskipTests -Pfull package -pl spring-cloud-skipper-docs

Quick Tour

There are some sample packages in the test directory that you can use to get started. Create a skipper.yml file in your home directory

spring:
  cloud:
    skipper:
      server:
        packageRepositories:
          -
            name: test
            url: "file:///home/mpollack/projects/spring-cloud-skipper/spring-cloud-skipper-server-core/src/test/resources/repositories/binaries/test/"

Where you replace /home/mpollack/projects/ to the path where you cloned spring-cloud-skipper.

Then start the Skipper server

$ java -jar spring-cloud-skipper-server/target/spring-cloud-skipper-server-1.0.0.BUILD-SNAPSHOT.jar --spring.config.additional-location=/home/mpollack/skipper.yml

Where you replace /home/mpollack/ with your own home directory.

Then launch the Skipper shell in another terminal

$ java -jar spring-cloud-skipper-shell/target/spring-cloud-skipper-shell-1.0.0.BUILD-SNAPSHOT.jar

The command package search will search for all available packages. It should then show you the following output

skipper:>package search
╔═════════════════╀═══════╀═════════════════════════════════════════════════════════════╗
β•‘      Name       β”‚Versionβ”‚                         Description                         β•‘
╠═════════════════β•ͺ═══════β•ͺ═════════════════════════════════════════════════════════════╣
β•‘helloworld-dockerβ”‚1.0.0  β”‚The hello world app says hello.                              β•‘
β•‘log              β”‚1.1.0  β”‚The log sink uses the application logger to output the data  β•‘
β•‘                 β”‚       β”‚for inspection.                                              β•‘
β•‘log              β”‚2.0.0  β”‚The log sink uses the application logger to output the data  β•‘
β•‘                 β”‚       β”‚for inspection.                                              β•‘
β•‘log              β”‚1.0.0  β”‚The log sink uses the application logger to output the data  β•‘
β•‘                 β”‚       β”‚for inspection.                                              β•‘
β•‘log-docker       β”‚1.0.0  β”‚Docker version of the log sink application version           β•‘
β•‘log-docker       β”‚2.0.0  β”‚Docker version of the log sink application                   β•‘
β•‘ticktock         β”‚1.0.0  β”‚The ticktock stream sends a time stamp and logs the value.   β•‘
β•‘time             β”‚2.0.0  β”‚The time source periodically emits a timestamp string.       β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

In another window you can run watch -n 2 jps so see which Java processes are running, since by default, the local deployer will be used to deploy packages.

Now deploy the log 1.0.0 package.

skipper:>package install --package-name log --package-version 1.0.0 --release-name mylog
Released mylog. Now at version v1.

Note that the log 1.0.0 package deploys the version 1.2.0.RC1 of the application. You should see the java app named log-sink-rabbit-1.2.0.RC1.jar running in the output of the jps command

You can ask for the status using the status command

skipper:>release status --release-name mylog
╔═══════════════╀═════════════════════════════════════════════════╗
β•‘Last Deployed  β”‚Fri Oct 27 15:44:00 IST 2017                     β•‘
β•‘Status         β”‚DEPLOYED                                         β•‘
β•‘Platform Statusβ”‚All applications have been successfully deployed.β•‘
β•‘               β”‚[mylog.log-v1], State = [mylog.log-v1-0=deployed]β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

The manifest for this release that represents the file instructions to deploy onto the platform, can be shown using the get manifest command.

skipper:>manifest get --release-name mylog

---
# Source: log.yml
apiVersion: skipper/v1
kind: SpringBootApp
metadata:
  name: log
  count: 1
  type: sink
spec:
  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit:1.2.0.RC1
  resourceMetadata: maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RC1
  applicationProperties:
  deploymentProperties:

Now update the release with a newer version

skipper:>release upgrade --release-name mylog --package-name log --package-version 2.0.0
mylog has been upgraded.  Now at version v2.

You should see the java app named log-sink-rabbit-1.2.0.RELEASE.jar running in the output of the jps command.

The status command should shortly show it has been deployed successfully. Note you can type !status to execute the last command that started with the word status

skipper:>release status --release-name mylog
╔═══════════════╀═════════════════════════════════════════════════╗
β•‘Last Deployed  β”‚Fri Oct 27 15:45:43 IST 2017                     β•‘
β•‘Status         β”‚DEPLOYED                                         β•‘
β•‘Platform Statusβ”‚All applications have been successfully deployed.β•‘
β•‘               β”‚[mylog.log-v2], State = [mylog.log-v2-0=deployed]β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Next rollback to the previous release

skipper:>release rollback --release-name mylog
mylog has been rolled back.  Now at version v3.

You should see the java app named log-sink-rabbit-1.2.0.RC1.jar running in the output of the jps command

The status command should shortly show it has been deployed successfully.

skipper:>release status --release-name mylog
╔═══════════════╀═════════════════════════════════════════════════╗
β•‘Last Deployed  β”‚Fri Oct 27 15:48:03 IST 2017                     β•‘
β•‘Status         β”‚DEPLOYED                                         β•‘
β•‘Platform Statusβ”‚All applications have been successfully deployed.β•‘
β•‘               β”‚[mylog.log-v3], State = [mylog.log-v3-0=deployed]β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

The history command shows you the various releases that were made

skipper:>release history --release-name mylog
╔═══════╀════════════════════════════╀════════╀════════════╀═══════════════╀════════════════╗
β•‘Versionβ”‚        Last updated        β”‚ Status β”‚Package Nameβ”‚Package Versionβ”‚  Description   β•‘
╠═══════β•ͺ════════════════════════════β•ͺ════════β•ͺ════════════β•ͺ═══════════════β•ͺ════════════════╣
β•‘3      β”‚Fri Oct 27 15:48:03 IST 2017β”‚DEPLOYEDβ”‚log         β”‚1.0.0          β”‚Upgrade completeβ•‘
β•‘2      β”‚Fri Oct 27 15:45:43 IST 2017β”‚DELETED β”‚log         β”‚2.0.0          β”‚Delete complete β•‘
β•‘1      β”‚Fri Oct 27 15:44:00 IST 2017β”‚DELETED β”‚log         β”‚1.0.0          β”‚Delete complete β•‘
β•šβ•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Now delete the release.

skipper:>release delete --release-name mylog
mylog has been deleted.

You should not see any log-sink-rabbit apps in the jps command.

Code formatting guidelines

  • The directory ./etc/eclipse has two files for use with code formatting, eclipse-code-formatter.xml for the majority of the code formatting rules and eclipse.importorder to order the import statements.

  • In eclipse you import these files by navigating Windows β†’ Preferences and then the menu items Preferences > Java > Code Style > Formatter and Preferences > Java > Code Style > Organize Imports respectfully.

  • In IntelliJ, install the plugin Eclipse Code Formatter. You can find it by searching the "Browse Repositories" under the plugin option within IntelliJ (Once installed you will need to reboot Intellij for it to take effect). Then navigate to Intellij IDEA > Preferences and select the Eclipse Code Formatter. Select the eclipse-code-formatter.xml file for the field Eclipse Java Formatter config file and the file eclipse.importorder for the field Import order. Enable the Eclipse code formatter by clicking Use the Eclipse code formatter then click the OK button.

    • NOTE: If you configure the Eclipse Code Formatter from File > Other Settings > Default Settings it will set this policy across all of your Intellij projects.

More Repositories

1

spring-cloud-netflix

Integration with Netflix OSS components
Java
4,866
star
2

spring-cloud-gateway

An API Gateway built on Spring Framework and Spring Boot providing routing and more.
Java
4,509
star
3

spring-cloud-kubernetes

Kubernetes integration with Spring Cloud Discovery Client, Configuration, etc...
Java
3,457
star
4

spring-cloud-config

External configuration (server and client) for Spring Cloud
Java
1,953
star
5

spring-cloud-sleuth

Distributed tracing for spring cloud
Java
1,770
star
6

spring-cloud-openfeign

Support for using OpenFeign in Spring Cloud apps
Java
1,202
star
7

spring-cloud-dataflow

A microservices-based Streaming and Batch data processing in Cloud Foundry and Kubernetes
Java
1,107
star
8

spring-cloud-function

Java
1,037
star
9

spring-cloud-stream

Framework for building Event-Driven Microservices
Java
993
star
10

spring-cloud-stream-samples

Samples for Spring Cloud Stream
Java
954
star
11

spring-cloud-release

Spring Cloud Release Train - dependency management across a wide range of Spring Cloud projects.
874
star
12

spring-cloud-consul

Spring Cloud Consul
Java
813
star
13

spring-cloud-contract

Support for Consumer Driven Contracts in Spring
Java
717
star
14

spring-cloud-commons

Common classes used in different Spring Cloud implementations
Java
706
star
15

spring-cloud-zookeeper

Spring Cloud Zookeeper
Java
555
star
16

spring-cloud-task

Short lived microservices with Spring Batch
Java
426
star
17

spring-cloud-bus

Spring Cloud event bus
Java
407
star
18

spring-cloud-circuitbreaker

Spring Cloud Circuit Breaker API and Implementations
Java
335
star
19

spring-cloud-stream-binder-kafka

Spring Cloud Stream binders for Apache Kafka and Kafka Streams
Java
330
star
20

spring-cloud-vault

Configuration Integration with HashiCorp Vault
Java
274
star
21

stream-applications

Functions and Spring Cloud Stream Applications for data driven microservices
Java
251
star
22

spring-cloud-dataflow-samples

Sample starter applications and code for use with the Spring Cloud Data Flow project
Java
223
star
23

spring-cloud-dataflow-ui

This repo provides the Dashboard application of Spring Cloud Data Flow
TypeScript
210
star
24

spring-cloud-build

Common build concerns, shared plugin configuration, etc. for Spring Cloud modules
Shell
191
star
25

spring-cloud-connectors

Library to let cloud applications connect to services
Java
185
star
26

spring-cloud-open-service-broker

Spring Cloud project for creating service brokers that conform to the Open Server Broker API specification
Java
167
star
27

spring-cloud-deployer

The Spring Cloud Deployer project defines an SPI for deploying long lived applications and short lived tasks
Java
161
star
28

spring-cloud-deployer-kubernetes

The Spring Cloud Deployer implementation for Kubernetes
Java
157
star
29

spring-cloud-cli

Spring Cloud CLI features
Java
155
star
30

spring-cloud-stream-binder-rabbit

Java
155
star
31

spring-cloud-core-tests

Integration tests for Spring Cloud (small projects testing classpath combinations)
Java
148
star
32

spring-cloud-stream-binder-aws-kinesis

Spring Cloud Stream binder for AWS Kinesis
Java
99
star
33

spring-cloud-stream-starters

Shell
98
star
34

spring-cloud-cloudfoundry

Integration between Cloudfoundry and the Spring Cloud APIs
Java
80
star
35

spring-cloud-schema-registry

A schema registry implementation for Spring Cloud Stream
Java
47
star
36

spring-cloud-bindings

A library that exposes a rich Java language-binding and auto-configuration for CNB Bindings
Java
41
star
37

spring-cloud-jenkins-jobs

Spring Cloud Jenkins Job DSL
Groovy
41
star
38

spring-cloud-deployer-local

The Spring Cloud Deployer implementation for a "local" machine
Java
39
star
39

spring-cloud-release-tools

Tools used for the Spring Cloud release process
Java
28
star
40

spring-cloud-deployer-cloudfoundry

The Spring Cloud Deployer implementation for Cloud Foundry
Java
27
star
41

spring-cloud-app-broker

Spring Cloud project for implementing service brokers that conform to the Open Server Broker API specification
Java
26
star
42

spring-cloud-static

Static resources for the Spring Cloud website
26
star
43

spring-cloud-common-security-config

A common security infrastructure used by Spring Cloud Data Flow and the projects in its ecosystem
Java
19
star
44

spring-functions-catalog

Reusable Spring Functions for data driven microservices
Java
17
star
45

spring-cloud-dataflow-acceptance-tests

Java
13
star
46

baseimage

Shell
12
star
47

spring-cloud.github.io

GH pages for spring-cloud
HTML
7
star
48

spring-cloud-dataflow-apps-plugin

Java
7
star
49

stream-applications-acceptance-tests

Shell
7
star
50

spring-cloud-stream-jenkins-jobs

Groovy
4
star
51

spring-cloud-dataflow-common

Java
2
star
52

.github

2
star
53

spring-cloud-dataflow-build

1
star