DevOps Maturity

Focus on Continuous Deployment

Article from Andreas Rehn, Tobias Palmborg and Patrik Boström, published on InfoQ

The Continuous Delivery Maturity Model

The principles and methods of Continuous Delivery are rapidly gaining recognition as a successful strategy for true business agility. For many organizations the question is no longer “why?”, but rather “how?” How do you start with Continuous Delivery, and how do you transform your organization to ensure sustainable results. This Maturity Model aims to give structure and understanding to some of the key aspects you need to consider when adopting Continuous Delivery in your organization.

[Read More]

Discord Script

Discord Script usage

Usage:

  • Copy the script at the root of your project (as send.sh)
  • Define a global variable for WEBHOOK_URL
  • Create according jobs for notifications
  • Modify/Create rules for execution of each notification job

Example notification stage

stages:
  - notification
success_notification:
  stage: notification
  script:
    - chmod +x send.sh
    - ./send.sh success $WEBHOOK_URL
  when: on_success
failure_notification:
  stage: notification
  script:
    - chmod +x send.sh
    - ./send.sh failure $WEBHOOK_URL
  when: on_failure

Discord Script to be used in pipeline

[Read More]

Dokku

Dokku and mi-git usage

Deployment

.gitlab-ci.yml (extract)

# Name of the job
deploy-job:
  # Stage of the job execution 
  stage: deploy
  # Image to use for job. Here we use the officila dokku image,
  # https://dokku.com/docs/deployment/continuous-integration/gitlab-ci/
  image: dokku/ci-docker-image:0.15.1
  # Setting some variables, local to the job
  variables:
    # We don't need history, just the last version
    GIT_DEPTH: 0
    # The name of our application, here we use something for our preprod
    # It will result in https://$APP_NAME.dokku.tecture.de as URL
    APP_NAME: geisel-spring-app-staging
  # Restrict the job to dev branch
  only:
    - dev
  # The script of the job. Here we deploy
  script: 
    - dokku-deploy

system.properties (needed at the application root to define the right java version)

[Read More]

Session 3 - TD

26/03/2026

TD

Prérequis

  • Environments
    • Master
    • Develop

ToDos Environments

  • Add surveillance to application

    • Trace/Track page calls
    • Only track deployed applications (once verified locally)
  • Add a Page with a long running call

  • Add a Page with an exception

  • Adapt the pages to have a different behavior on dev/prod

Resources

APM Infos

  • server_url=https://apm.m2.tecture.de
  • service_name=You define it
  • secret_token=****
  • environment=dev or prod
  • application_packages=your.application.package
  • log_level=INFO (or DEBUG if you need to see what happens)

Example configurations

application.properties

[Read More]

Spring

Resources for Spring

Spring

Initialization

Im1

Thymeleaf

Running a specific environment

Config files

Examples:

application-production.properties

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/db
spring.datasource.username=root
spring.datasource.password=root

application-staging.properties

spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1
spring.datasource.username=sa
spring.datasource.password=sa

pom.xml

	<profiles>
		<profile>
			<id>dev</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.springframework.boot</groupId>
						<artifactId>spring-boot-maven-plugin</artifactId>
						<configuration>
							<profiles>
								<profile>dev</profile>
							</profiles>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>prod</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.springframework.boot</groupId>
						<artifactId>spring-boot-maven-plugin</artifactId>
						<configuration>
							<profiles>
								<profile>prod</profile>
							</profiles>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

Running specific

Dev environment

  • Locally with spring-boot:run
    • $ mvn spring-boot:run -Pdev
  • Locally with the produced jar
    • $ java -jar -Dspring.profiles.active=dev myapp.jar

Production environment

[Read More]

Unleash

Resources for unleash

Unleash

pom.xml

		<dependencies>
			<dependency>
				<plugin>
					<groupId>io.getunleash</groupId>
					<artifactId>unleash-client-java</artifactId>
					<version>9.1.0</version>
				</plugin>
			</dependency>
		</dependencies>

Code examples

UnleashConfig config = UnleashConfig.builder()
        .appName("my.java-app") // name of your running environment (e.g. activeProfile)
        .instanceId("InstanceID_FROM_GUTLAB")
        .unleashAPI("API_URL_FROM_GITLAB")
        .build();

Unleash unleash = new DefaultUnleash(config);
if(unleash.isEnabled("AwesomeFeature")) {
  //do some magic
} else {
  //do old boring stuff
}

Other Resources