Skip to content

Instantly share code, notes, and snippets.

View arthurd2's full-sized avatar

Guilherme arthurd2

  • UFSC
  • Florianopolis - SC - Brazil
View GitHub Profile
# Criar cluster
aws eks create-cluster --name producao --role-arn ARN_DA_ROLE_AQUI --resources-vpc-config subnetIds=SUBNET_ID_1_AQUI,SUBNET_ID_2_AQUI,SUBNET_ID_3_AQUI,securityGroupIds=SECURITY_GROUP_DA_VPC_AQUI
# Instalar o aws-imam-authentication
# Pegar dados de conexao
aws eks update-kubeconfig --name NOME_CLUSTER
# Teste
kubectl get svc
#
az group create rg-teste
az aks create --name az-k8s --resource-group rg-teste --node-count 1 --location eastus --kubernetes-version 1.10.8 --generate-ssh-keys
az aks scale --node-count 3 --name az-k8s --resource-group rg-teste
az aks get-upgrades --name az-k8s --resource-group rg-teste --output table
volumes:
dados:
driver: local
driver_opts:
type: nfs
o: addr=192.168.0.1,rw,async,lock,local_lock=none,nfsvers=4.2
device: :/path
from zeep import Client
from zeep.transports import Transport
transport = Transport(session=requests.Session(), timeout=10, operation_timeout=10)
transport.session.auth = requests.auth.HTTPBasicAuth( user, pass )
SCCP = Client('https://dominio.br/xxxs/CadastroPessoaService?wsdl', transport=transport)
vinculos = SCCP.service.getPessoaGoogle( idpessoa )
vinculos = dict ( zeep.helpers.serialize_object( vinculos ) )
import requests
rest_url = 'https://dominio.br/rest/xxx/removerPessoaDefinitivamenteGoogle'
response = requests.get(rest_url, auth=( usuario , senha ), params={ 'email' : email, 'idPessoa': idpessoa } )
if response.status_code == 200:
return response.json()
return {}
def printd( o ):
for atributo in dir(o):
valor = getattr(o, atributo)
tipo = type(valor)
print(f"Atributo: {atributo}, Valor: {valor}, Tipo: {tipo}")
version: "3.5"
services:
trino:
image: trinodb/trino:426
depends_on:
- postgresql
- mongodb
ports:
- 8080:8080
configs:
deploy:
# Desabilita Routing MESH
endpoint_mode: dnsrr
# Força deploy em um determinado host
placement:
constraints:
- "node.hostname==gpu1"
systemctl disable systemd-resolved
systemctl stop systemd-resolved
rm /etc/resolv.conf
echo "nameserver 150.162.1.33" > /etc/resolv.conf
echo "nameserver 150.162.2.33" >> /etc/resolv.conf
reboot
services:
db:
image: postgres:15
command: -c shared_buffers=16GB -c max_connections=200 -c work_mem=80MB
volumes:
- /dados:/var/lib/postgresql/data
- ./sql:/docker-entrypoint-initdb.d
environment:
- POSTGRES_DB=db
- POSTGRES_PASSWORD=dbpass