This is a Node.js application that provides utility tools for managing and supporting Payconnect operations.
- Node.js
child_processused to executekubectlcommands. - kubectl Commands:
- get pod, logs, exec - cat
(to read the switch.log comms)
-
2FA Authenticator
Tool used for generating two-factor OTP codes.
-
Kubernetes Logs Downloader
Utility for downloading logs from Rancher environments for troubleshooting and monitoring.
- Install Node Js.
- Install Kubectl.
- Download Link: https://nodejs.org/en/download
- Verify Installation
node --version or node -v
-
Open the command prompt and run
curl.exe -LO "https://dl.k8s.io/release/v1.32.0/bin/windows/amd64/kubectl.exe"
-
Download the kubectl checksum file
curl.exe -LO "https://dl.k8s.io/v1.32.0/bin/windows/amd64/kubectl.exe.sha256"
-
Verify the checksum file
CertUtil -hashfile kubectl.exe SHA256
-
Verify installation.
kubectl version
-
Open or create a new directory:
mkdir <DIRECTORY> #create folder cd <DIRECTORY>
-
Initialize Git and clone this project:
git init git clone <REPOSITORY_URL> cd <REPOSITORY_FOLDER>
-
Install packages:
npm install || npm i -
Setup Kube Config. Kube config files are untracked for security purposes. Create a directory named
kube-config/inside thesrc/folder,. Download the kubeconfig files from your Rancher accounts, then rename them as follows:Note: These configs can be downloaded or copied from your Rancher accounts.
kube-config/am1-aks-sbx.txt #(Payconnect Test AM1-AKS, rancher-sbx) kube-config/am1-aks.txt #(Payconnect RBGI Test & Sandbox AM1-ASK) kube-config/vm2-aks.txt #(Payconnect Sandbox & Prod VM2-AKS)
-
Create
account.jsfile inside'src/data/'directory.let payconnect = { users: [{ username: 'payconnect-user', password: 'password', app: 'Payconnect 3', secret_key: 'YOUR_ACCOUNT_SECREY_KEY_HERE', interval: 60, environment: ['sbx'] }] } export default payconnect
-
Execute this commands:
npm run start || node ./src/server.js# OR -> Run the start.sh or start.bat files, it will execute the command above. :) -
Open the browser and go to:
http://localhost:4000/ or http://127.0.0.1:4000/
