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
@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>
@hodrigohamalho
hodrigohamalho / aghata-deploy.sh
Created December 10, 2018 21:22
Aghata deploy
oc new-build nodejs:8~https://github.com/hodrigohamalho/aghata.git --context-dir=codigo-fonte/cliente --name=mpog-gestaoriscos-frontend-s2i
oc new-build --name=mpog-gestaoriscos-frontend \
--docker-image=registry.access.redhat.com/rhscl/nginx-112-rhel7 \
--source-image=mpog-gestaoriscos-frontend-s2i \
--source-image-path=/opt/app-root/src/dist/:. \
--dockerfile=$'FROM rhscl/nginx-112-rhel7\nCOPY dist /opt/app-root/src\nCMD ["nginx", "-g", "daemon off;"]'
oc new-app mpog-gestaoriscos-frontend --name=mpog-gestaoriscos-frontend