Admin

Administrations
Oracle Clients
Oracle Clients
Listener / Tnsname.ora 1# Check if listner is present 2ps -edf | grep lsn 3 4# Prompt Listner 5lsnrctl 6LSNRCTL> help 7The following operations are available 8An asterisk (*) denotes a modifier or extended command: 9 10start stop status services 11version reload save_config trace 12spawn quit exit set* 13show* 14 15lsnrctl status 16lsnrctl start 17 18# Logs 19less /opt/oracle/product/12c/db/network/admin/listener.ora Local Listner 1# in Oracle prompt 2show parameter listener; 3NAME TYPE VALUE 4------------------------------------ ----------- ------------------------------ 5listener_networks string 6local_listener string LISTENER_TOTO 7remote_listener string First LISTENER_TOTO must be defined in the tnsnames.ora. 1# in Oracle prompt 2alter system set local_listener='LISTENER_TOTO' scope=both; 3alter system register; 1lsnrctl status 2 3LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 29-APR-2021 18:58:48 4Copyright (c) 1991, 2016, Oracle. All rights reserved. 5Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) 6STATUS of the LISTENER 7------------------------ 8Alias LISTENER 9Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production 10Start Date 29-APR-2021 18:11:13 11Uptime 0 days 0 hr. 47 min. 34 sec 12Trace Level off 13Security ON: Local OS Authentication 14SNMP OFF 15Listener Log File /u01/oracle/base/diag/tnslsnr/myhost/listener/alert/log.xml 16Listening Endpoints Summary... 17 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myhost.example.com)(PORT=1521))) 18Services Summary... 19Service "+ASM" has 1 instance(s). 20 Instance "+ASM", status READY, has 1 handler(s) for this service... 21Service "+ASM_DATA" has 1 instance(s). 22 Instance "+ASM", status READY, has 1 handler(s) for this service... 23Service "+ASM_FRA" has 1 instance(s). 24 Instance "+ASM", status READY, has 1 handler(s) for this service... 25Service "IANA" has 1 instance(s). 26 Instance "IANA", status READY, has 1 handler(s) for this service... 27Service "IANAXDB" has 1 instance(s). 28 Instance "IANA", status READY, has 1 handler(s) for this service... 29The command completed successfully Static Listner: TNSnames.ORA Services have to be listed in tnsnames.ora of client hosts.
🎡 Helm
🎡 Helm
Admnistration See what is currently installed 1helm list -A 2NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION 3nesux3 default 1 2022-08-12 20:01:16.0982324 +0200 CEST deployed nexus3-1.0.6 3.37.3 Install/Uninstall 1helm status nesux3 2helm uninstall nesux3 3helm install nexus3 4helm history nexus3 5 6# work even if already installed 7helm upgrade --install ingress-nginx ${DIR}/helm/ingress-nginx \ 8 --namespace=ingress-nginx \ 9 --create-namespace \ 10 -f $helm {DIR}/helm/ingress-values.yml 11 12#Make helm unsee an apps (it does not delete the apps) 13kubectl delete secret -l owner=helm,name=argo-cd Handle Helm Repo and Charts 1#Handle repo 2helm repo list 3helm repo add gitlab https://charts.gitlab.io/ 4helm repo update 5 6#Pretty usefull to configure 7helm show values elastic/eck-operator 8helm show values grafana/grafana --version 8.5.1 9 10#See different version available 11helm search repo hashicorp/vault 12helm search repo hashicorp/vault -l 13 14# download a chart 15helm fetch ingress/ingress-nginx --untar Tips List all images needed in helm charts (but not the one with no tags) 1helm template -g longhorn-1.4.1.tgz |yq -N '..|.image? | select(. == "*" and . != null)'|sort|uniq|grep ":"|egrep -v '*:[[:blank:]]' || echo ""
🎲 Kubectl
🎲 Kubectl
Connexion to k8s cluster Kubeconfig Define KUBECONFIG in your profile 1# Default one 2KUBECONFIG=~/.kube/config 3 4# Several context - to keep splited 5KUBECONFIG=~/.kube/k3sup-lab:~/.kube/k3s-dev 6 7# Or can be specified in command 8kubectl get pods --kubeconfig=admin-kube-config View and Set 1kubectl config view 2kubectl config current-context 3 4kubectl config set-context \ 5dev-context \ 6--namespace=dev-namespace \ 7--cluster=docker-desktop \ 8--user=dev-user 9 10kubectl config use-context lab Switch context 1#set Namespace 2kubectl config set-context --current --namespace=nexus3 3kubectl config get-contexts Kubecm The problem with the kubeconfig is that it get nexted in one kubeconfig and difficult to manage on long term. The best way to install it, is with Arkade arkade get kubecm - see arkade.