Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Rafael T. C. Soares (A.K.A Tuelho) rafaeltuelho

🎯
Focusing
Block or report user

Report or block rafaeltuelho

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rafaeltuelho
rafaeltuelho / jbpm-mass-process-loader.md
Last active Sep 6, 2019
Creates some number of process instances into a Kie Process Server using REST API
View jbpm-mass-process-loader.md

To start/create instances

for i in {1..100}; do \
   echo "-"; \
   http --verify=no --json --auth user:pass POST \
      https://kie-server-url/services/rest/server/containers/DEPLOYMENT_ID/processes/PROCESS_ID/instances \
      JSON_KEY=VALUE; \
done
View openshift-jenkinsfile-tasks-app-example.groovy
// Set your project Prefix using your GUID
def prefix = "user22"
// Routes
def clusterDomain = "apps.cluster-19ae.sandbox478.opentlc.com"
def tasksDevRoute = "tasks-${prefix}-tasks-dev.${clusterDomain}"
def ocpRegistryRoute = "default-route-openshift-image-registry.${clusterDomain}"
def nexusRegistryRoute = "nexus-registry-${prefix}-cicd.${clusterDomain}"
// Set variable globally to be available in all stages
View reset-docker-storage.yaml
---
- name: Reset docker storage
hosts: ocp*
become: yes
tasks:
- name: stop docker
service:
name: docker
state: stopped
View add-docker-option-regexp.yaml
---
- name: Append Docker OPTION
hosts: localhost
tasks:
- name: apply regex
replace:
backup: yes
dest: /etc/sysconfig/docker
regexp: '^(OPTIONS.*)(\S)$'
replace: '\1 --authorization-plugin=docker-novolume-plugin\2'
View windup-rhamt-cli-batch.sh
#!/bin/sh
export JAVA_HOME=/usr/lib/java
export MAX_MEMORY=4096m
export RHAMT_HOME=/opt/rhamt-cli-4.2.0.Final
rhamt_exec=$RHAMT_HOME/bin/rhamt-cli
INPUT_DIR=$RHAMT_HOME/apps
OUTPUT_DIR=$RHAMT_HOME/reports
PKG_LIST="br gov util"
EXCLUDE_TAGS="resin jrun jonas jni"
@rafaeltuelho
rafaeltuelho / openshift-dev-starter-workshop-manual-provisioning.sh
Last active Dec 26, 2018
Openshift workshop material resource manual provisioning
View openshift-dev-starter-workshop-manual-provisioning.sh
#!/bin/bash
#To copy the ca.cert from your cluster and put into the serviceaccount, follow:
#When you're connected to the cluster:
#oc get pod
#oc rsh ANYPOD
#cat /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
#copy the text into serviceaccount/ca.crt
_cluster="https://openshift-master-url"
View some_useful_configs.vimrc
# config autoident with two spaces for yaml files
autocmd FileType yaml setlocal ai ts=2 sw=2 et
@rafaeltuelho
rafaeltuelho / sample-pipeline.groovy
Last active Sep 26, 2018
Sample Jenkins Pipeline for Openshift CI/CD demos
View sample-pipeline.groovy
def version, mvnCmd = "mvn -s configuration/cicd-settings-nexus3.xml"
pipeline {
agent {
label 'maven'
}
stages {
stage('Build App') {
steps {
// if your Git server uses an TLS self signed cetificate ...
You can’t perform that action at this time.