This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
ext { | |
springBootVersion = '2.0.5.RELEASE' | |
} | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: monitoring.coreos.com/v1 | |
kind: ServiceMonitor | |
metadata: | |
labels: | |
k8s-app: spring-boot-actuator-monitor | |
name: spring-boot-actuator-monitor | |
namespace: monitoring | |
spec: | |
endpoints: | |
- interval: 30s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Automating https://blog.dekstroza.io/ulimit-shenanigans-on-osx-el-capitan/ | |
echo "Updating the ulimits on OSX to be able to run RHAMT tests." | |
sudo bash -c 'cat >/Library/LaunchDaemons/limit.maxfiles.plist <<EOF | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: BuildConfig | |
metadata: | |
name: inventory-spring-boot-maven-pipeline-complex | |
spec: | |
strategy: | |
jenkinsPipelineStrategy: | |
jenkinsfile: |- | |
// Don't forget to run the commands to create the dev project, and grant the needed roles to the service accounts | |
// $ oc create sa cicd-central-jenkins -n cicd-ext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export PROJECT_NAME="fruits-97" | |
export MY_DATABASE_SERVICE_HOST="my-database.${PROJECT_NAME}" | |
export MY_DATABASE_SERVICE_PORT=5432 | |
export DB_USERNAME=luke | |
export DB_PASSWORD=secret | |
mvn spring-boot:run -Dspring-boot.run.profiles=openshift -Popenshift -DskipTests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.redhat.his.service; | |
import ... | |
@Configuration | |
public class KafkaConfig { | |
@Value("${kafka.bootstrap-servers}") | |
private String kafkaBrokers; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ... | |
public class HL7ToEvents extends RouteBuilder { | |
@Override | |
public void configure() throws Exception { | |
from("kafka:{{kafka.from.topic}}?brokers={{kafka.bootstrap-servers}}&groupId={{kafka.groupId}}") | |
.routeId("hl7-to-patient-info") | |
.onException(Exception.class) | |
.handled(true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ... | |
public class EventsToTelegramBot extends RouteBuilder { | |
@Override | |
public void configure() throws Exception { | |
from("kafka:{{kafka.from.topic}}?brokers={{kafka.bootstrap-servers}}&groupId={{kafka.groupId}}") | |
.routeId("events-to-bot") | |
.onException(Exception.class) | |
.handled(true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get odo for linux | |
$ curl -OL https://mirror.openshift.com/pub/openshift-v4/clients/odo/v2.0.0/odo-linux-amd64 && mv odo-linux-amd64 odo && chmod u+x odo | |
$ export PATH=$PATH:$(pwd) | |
$ odo version | |
# Use git to check out the .NET Core application | |
$ git clone https://github.com/redhat-developer/s2i-dotnetcore-ex | |
$ cd s2i-dotnetcore-ex/app | |
$ git checkout dotnetcore-3.1 |