Skip to content

Instantly share code, notes, and snippets.

View jovemfelix's full-sized avatar

RENATO ALVES FELIX jovemfelix

View GitHub Profile
---
# https://access.redhat.com/solutions/3771241
apiVersion: apps/v1
kind: Deployment
metadata:
name: test
namespace: curl
spec:
replicas: 1
selector:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<offline>false</offline>
<proxies>
<!-- ### configured http proxy ### -->
</proxies>

Get Credentials

HOST

❯ REDIS_HOSTS=$(oc -n iib-3scale-apim extract secret/backend-redis --keys=REDIS_STORAGE_SENTINEL_HOSTS --to=-)
# REDIS_STORAGE_SENTINEL_HOSTSecho $REDIS_HOSTS
redis://redis-storage-01.hm.example.com.br:26379,redis://redis-storage-02.hm.example.com.br:26379,redis://redis-storage-03.hm.example.com.br:26379

entrar num projeto

oc project XXX

criar um pod para executar as atividades

cat <<EOF | oc apply -f -
---
apiVersion: v1

Example to Purge Backend Errors from 3scale

Enviroment version used

Openshift 4.10.22

Red Hat 3scale : 2.11

VARIABLES

Deploy the imagem to test your gRPC connections

Remember to select the namespace you desire to deploy!

Deployment

---
apiVersion: apps/v1
kind: Deployment
metadata:
@jovemfelix
jovemfelix / Run-AsciidocFX-From-Command-Line-on-Mac.sh
Last active February 1, 2023 14:50
Using the https://asciidocfx.com/ to manage .adoc files from the command line
# To install a used: https://asciidocfx.com/#how-to-install-asciidocfx
# After installation a created this alias
alias ascii='/Applications/AsciidocFX/AsciidocFX.app/Contents/MacOS/JavaApplicationStub -q $PWD/README.adoc'
# now go to folder that has your README.adoc files
@jovemfelix
jovemfelix / deployment-ose-cli.yaml
Created March 15, 2023 20:15
Testar Conectividade no Openshift 4.11
apiVersion: apps/v1
kind: Deployment
metadata:
name: ose-cli
namespace: openshift-migration
spec:
replicas: 1
selector:
matchLabels:
app: support-tools
@jovemfelix
jovemfelix / Ansible-host-local-install-Kubernetes_Python_Client.md
Created March 16, 2023 18:04
Resolved: "Failed to import the required Python library (kubernetes) on rfelix-mac's Python /usr/local/opt/[email protected]/bin/python3.11. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansibl…

To resolve the error Failed to import the required Python library (kubernetes) on rfelix-mac's Python /usr/local/opt/[email protected]/bin/python3.11. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter" I had just to install Kubernetes Python Client like bellow:

Solution

➜  pip3 install kubernetes
Collecting kubernetes
  Downloading kubernetes-26.1.0-py2.py3-none-any.whl (1.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 385.9 kB/s eta 0:00:00
Collecting certifi>=14.05.14
THIS_SCRIPT=$(basename -- "$0")
WORKDIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
echo Running $THIS_SCRIPT at $WORKDIR
alias mta='/Users/rfelix/redhat/products/MTA/mta-cli-6.0.1.GA-redhat-00006/bin/windup-cli'
INPUT_DIR=${WORKDIR}/jars
OUTPUT_DIR=${WORKDIR}/report
CLOUD_DIR=${OUTPUT_DIR}/cloud-readiness