Before setting up the PiDualTx application, ensure you have the following installed:
Clone the PiDualTx repository from GitHub:
git clone https://github.com/KOSASIH/pidualtx.git
cd pidualtx
Navigate to the root of the project and build the Docker images for the backend services and frontend application:
# Build backend services
cd backend
docker-compose build
# Build frontend application
cd ../frontend
npm install
npm run build
Create a namespace for the PiDualTx application:
kubectl create namespace monitoring
kubectl create namespace pidualtx
Deploy Redis for caching:
kubectl apply -f kubernetes/redis-deployment.yaml
Deploy the backend services:
kubectl apply -f kubernetes/rate-service.yaml
kubectl apply -f kubernetes/ai-service.yaml
kubectl apply -f kubernetes/smartcontract-service.yaml
Deploy the frontend application:
kubectl apply -f kubernetes/frontend-deployment.yaml
Deploy the Ingress resource to manage external access:
kubectl apply -f kubernetes/ingress.yaml
Deploy Prometheus and Grafana for monitoring:
kubectl apply -f kubernetes/monitoring/prometheus.yaml
kubectl apply -f kubernetes/monitoring/grafana.yaml
Retrieve the external IP address for the Ingress:
kubectl get ingress -n pidualtx
Open your web browser and navigate to:
http://<INGRESS_IP>
To access Grafana, use the same Ingress IP with the Grafana path (if configured):
http://<INGRESS_IP>/grafana
Log in with the default credentials:
admin
admin
Ensure all services are running correctly:
kubectl get pods -n pidualtx
kubectl get pods -n monitoring
Check the logs for any issues:
kubectl logs <pod-name> -n pidualtx
kubectl logs <pod-name> -n monitoring
kubectl get events -n pidualtx
kubectl get events -n monitoring
This setup guide is intended for developers and system administrators looking to deploy the PiDualTx application in a Kubernetes environment. ```