Skip to content

Instantly share code, notes, and snippets.

@roberthamel
roberthamel / log.txt
Created August 5, 2018 21:10
Reactive Hello Logs
Starting a Gradle Daemon (subsequent builds will be faster)
:compileJava
:processResources UP-TO-DATE
:classes
:bootRun
2018-08-05 17:09:43.829 DEBUG 67535 --- [ main] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'logging.register-shutdown-hook' in any property source
2018-08-05 17:09:43.833 DEBUG 67535 --- [ main] .c.l.ClasspathLoggingApplicationListener : Application started with classpath: [file:/Users/r/Sites/gs-reactive-rest-service/complete/build/classes/java/main/, file:/Users/r/Sites/gs-reactive-rest-service/complete/build/resources/main/, file:/Users/r/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-webflux/2.0.3.RELEASE/eed9177298124780a7dec0ba7a68e42268122a5f/spring-boot-starter-webflux-2.0.3.RELEASE.jar, file:/Users/r/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-json/2.0.3.RELEASE/2e389a8727588c549c28bb277f0f573f65554850/spring-boot-starter-json-2.0.3.RELEASE.jar, file:/Users/r/.gradle/caches/mo
@roberthamel
roberthamel / pipeline.yml
Created August 9, 2018 19:47
Concourse pipeline example
---
resources:
- name: source-code
type: git
check_every: 10s
source:
uri: ((gitRepository))
branch: master
- name: deploy-cf
type: cf
@roberthamel
roberthamel / credentials.yml
Created August 9, 2018 20:58
Let's Refactor
# ci/credentials.yml
gitRepository: https://github.com/<YOUR-GITHUB-USERNAME>/product-service-concourse
@roberthamel
roberthamel / credentials.yml
Created August 9, 2018 21:15
More Refactoring
# ci/credentials.yml
gitRepository: https://github.com/<YOUR-GITHUB-USERNAME>/product-service-concourse
@roberthamel
roberthamel / build.sh
Created August 9, 2018 21:34
Deploy to cf Task
#!/bin/bash
# ci/scripts/build.sh
set -eu
pushd source-code
./gradlew clean assemble
cp build/libs/product-service-1.0.0.jar ../build-output
cp manifest.yml ../build-output
popd
echo "build successful"
###############################################################
# Cart Service
###############################################################
apiVersion: v1
kind: Service
metadata:
name: carts
labels:
app: carts
visualize: "true"

Access Kubenetes Dashboard with Credentails

Kubernetes dashboard comes pre-installed on each PKS cluster. The following instructions are for how create credentials and obtain the access token. If there is an easier way, please let me know.

Install a Cluster Role Binding:

This command only needs to be run once.

cat &lt;
#!/bin/bash
wget https://gist.githubusercontent.com/roberthamel/e3a113b56d84b3516a84f9b4c4d7154a/raw/dashboard.sh
mv dashboard.sh dashboard
chmod +x dashboard
mv dashboard /usr/local/bin/kdash
management:
endpoints:
web:
exposure:
include: '*'
hystrix:
stream:
queue:
enabled: false
command:
@roberthamel
roberthamel / docker-compose.yml
Created February 10, 2019 20:28
Keycloak Docker Compose Starter
version: '3'
services:
keycloak:
image: jboss/keycloak
restart: always
ports:
- 8080:8080
networks:
- appnet