Skip to content

Instantly share code, notes, and snippets.

View hodrigohamalho's full-sized avatar
💭
let's code!

Rodrigo Ramalho hodrigohamalho

💭
let's code!
View GitHub Profile

Route.java

rest("/orders").description("Content Base Router Example")
.get("/")
    .route().routeId("get-all-orders")
    .log("processing your request")
    .wireTap("direct:process-request")
    .setBody().simple("processing your request");
@hodrigohamalho
hodrigohamalho / day-in-the-life.adoc
Last active February 5, 2020 18:18
Day in the life workshop

Day in the life workshop

In the local machine (REMEBER TO CHANGE TO YOURS)

export GUID=latam-f81b

On the remote machine

Connect and download the workshop:

@hodrigohamalho
hodrigohamalho / opendata.json
Last active May 31, 2019 17:35
opendata.json
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Open Data API",
"description": "The Open Data API specifications allow API providers (e.g. banks, building societies and ATM providers) to develop API endpoints which can then be accessed by API users (e.g. third party developers) to build mobile and web applications for banking customers.",
"contact": {}
},
"host": "api.openbankproject.com",
"basePath": "/obp/v3.1.0",
@hodrigohamalho
hodrigohamalho / run-with-gateway.sh
Created May 3, 2019 05:27
Run emergency response locally using 3Scale Gateways
#!/usr/bin/env bash
# export PORT=4200
export INCIDENT="https://incidents-api-3scale-apicast-production.apps.753d.openshift.opentlc.com"
export ALERT="http://alert-service-naps-emergency-response.apps.753d.openshift.opentlc.com"
export RESPONDER="https://responder-api-3scale-apicast-production.apps.753d.openshift.opentlc.com"
export MISSION="https://mission-api-3scale-apicast-production.apps.753d.openshift.opentlc.com"
export PROCESS_VIEWER="http://process-viewer-naps-emergency-response.apps.753d.openshift.opentlc.com"
export AUTH_URL="https://sso-naps-emergency-response.apps.753d.openshift.opentlc.com/auth"
export KEYCLOAK="true"
@hodrigohamalho
hodrigohamalho / rhsso-workshop.adoc
Last active February 20, 2019 12:56
Red Hat Single Sign On (aka Keycloak) Workshop

RH SSO Workshop

URL de acesso deste documento: https://bit.ly/2Gxq0AJ

Acesso a internet

  • SSID: REGUS

Selecione a opção "Tenho um número de reserva" e informe o código abaixo:

spec:
replicas: 1
template:
spec:
containers:
-
resources:
requests:
cpu: "0.2"
memory: 256Mi
@hodrigohamalho
hodrigohamalho / setup-pipeline.sh
Created February 10, 2019 22:02
setup-pipeline
# setup dev env
oc import-image wildfly --from=openshift/wildfly-120-centos7 --confirm -n ${DEV_PROJECT}
# dev
oc new-build --name=tasks --image-stream=wildfly:latest --binary=true -n ${DEV_PROJECT}
oc new-app tasks:latest --allow-missing-images -n ${DEV_PROJECT}
oc set triggers dc -l app=tasks --containers=tasks --from-image=tasks:latest --manual -n ${DEV_PROJECT}
# stage
oc new-app tasks:stage --allow-missing-images -n ${STAGE_PROJECT}
@hodrigohamalho
hodrigohamalho / ons-plataforma-ocp.sh
Last active January 28, 2019 03:07
ONS Plataforma deploy Openshift
oc login -u system:admin
oc new-project ons-poc
oc policy add-role-to-user admin developer -n ons-poc
# Setup AMQ 7.x (Based on Artemis Community Project)
# - Image streams
oc create -f https://raw.githubusercontent.com/jboss-container-images/jboss-amq-7-broker-openshift-image/amq-broker-72/amq-broker-7-image-streams.yaml -n openshift
oc create -f https://raw.githubusercontent.com/jboss-container-images/jboss-amq-7-broker-openshift-image/amq-broker-72/amq-broker-7-scaledown-controller-image-streams.yaml -n openshift
oc create -f https://raw.githubusercontent.com/jboss-container-images/jboss-amq-7-broker-openshift-image/amq-broker-72/templates/amq-broker-72-persistence.yaml -n openshift
# - Template
@hodrigohamalho
hodrigohamalho / homepage.html
Created January 15, 2019 13:53
3scale Homepage
<header class="jumbotron page-header">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1>Echo API</h1>
</div>
</div>
</div>
</header>