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 / 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
@hodrigohamalho
hodrigohamalho / amq-streams-demo.adoc
Last active January 20, 2020 12:57
AMQ Streams Demo

AMQ Streams (Aka Strimzi) (Aka Kafka on Kubernetes)

Setup

To use another project different than myproject (livedemo)

sed -i '' 's/namespace: .*/namespace: livedemo/' install/cluster-operator/*RoleBinding*.yaml
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<profiles>
<profile>
<repositories>
<repository>
<releases>
<updatePolicy>never</updatePolicy>
@hodrigohamalho
hodrigohamalho / build-increase-memory.sh
Created May 28, 2018 14:05
Increase build memory openshift
oc patch bc/cookbook --patch '{"spec":{"resources":{"limits":{"memory":"1Gi"}}}}'
buildconfig "cookbook" patched
@hodrigohamalho
hodrigohamalho / nodejs-openshift-deploy.sh
Created April 24, 2018 20:52
NodeJS Nginx Chained Build
oc create -f https://github.com/sclorg/s2i-nodejs-container/blob/master/imagestreams/nodejs-rhel7.json -n openshift
oc new-project app-nodejs
oc new-build nodejs:8~https://github.com/hodrigohamalho/sal-frontend --name=sal-frontend-s2i
oc new-build --name=sal-frontend-nginx \
--docker-image=registry.access.redhat.com/rhscl/nginx-112-rhel7 \
--source-image=sal-frontend-s2i \
--source-image-path=/opt/app-root/src/dist/:. \
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<profiles>
<profile>
<repositories>
<repository>
<releases>
<updatePolicy>never</updatePolicy>
@hodrigohamalho
hodrigohamalho / jboss-deployment-structure.xml
Created April 3, 2018 18:24
jboss-deployment-structure.xml
<?xml version="1.0"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<deployment>
<dependencies>
<module name="org.keycloak.keycloak-server-spi-private" />
</dependencies>
</deployment>
@hodrigohamalho
hodrigohamalho / gist:8114722ac0916ee487e50188ecdc3382
Last active December 14, 2017 13:30 — forked from davivcgarcia/gist:bcc330b9c886d97290f4d81af3e2319a
Red Hat Training - OpenShift Advanced Deployment (v3.7), Lab 1
[OSEv3:vars]
timeout=60
ansible_ssh_user=ec2-user
ansible_become=true
deployment_type=openshift-enterprise
openshift_release=3.7
openshift_clock_enabled=true
openshift_master_cluster_method=native
@hodrigohamalho
hodrigohamalho / create-pvs.sh
Created December 12, 2017 12:22
lab01 - create pvs
# NFS Server Host - CHANGE the GUID!
HOST=support1.54d2.internal
ROOT_NFS=/exports
NFS_CONFIG_FILE=/etc/exports.d/openshift-ansible.exports
create-pv () {
DIR=$1
SIZE=$2
ACCESS_MODE=$3
RECLAIM_POLICY=$4