- Allow users to query a shortcode and pay for their electricity meter bill
- Allow users to query their meter balance
- API : Akka
- DB : Firestore
- Mobile Money : Safaricom API
| steps: | |
| # build the container image | |
| - name: "gcr.io/cloud-builders/docker" | |
| args: ["build", "-t", "gcr.io/vivo-ussd-november-26th-2019/bboxxapi", "."] | |
| # push container image | |
| - name: "gcr.io/cloud-builders/docker" | |
| args: ["push", "gcr.io/vivo-ussd-november-26th-2019/bboxxapi"] | |
| # deploy container image to GKE |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: bboxx-deployment | |
| labels: | |
| app: bboxx | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: |
| apiVersion: autoscaling/v2beta2 | |
| kind: HorizontalPodAutoscaler | |
| metadata: | |
| name: bboxx-horizontal-pod-autoscaler | |
| spec: | |
| scaleTargetRef: | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| name: bboxx-deployment | |
| minReplicas: 1 |
| apiVersion: networking.k8s.io/v1beta1 | |
| kind: Ingress | |
| metadata: | |
| name: bboxx-ingress | |
| annotations: | |
| kubernetes.io/ingress.class: nginx | |
| spec: | |
| rules: | |
| - host: "payments.bboxx.clients.decoded.africa" | |
| http: |
| apiVersion: networking.k8s.io/v1beta1 | |
| kind: Ingress | |
| metadata: | |
| name: bboxx-ingress | |
| annotations: | |
| kubernetes.io/ingress.class: nginx | |
| cert-manager.io/cluster-issuer: letsencrypt-prod | |
| spec: | |
| tls: | |
| - hosts: |
| apiVersion: cert-manager.io/v1 | |
| kind: ClusterIssuer | |
| metadata: | |
| name: letsencrypt-prod | |
| spec: | |
| acme: | |
| # Email address used for ACME registration | |
| email: graham@decoded.africa | |
| server: https://acme-v02.api.letsencrypt.org/directory | |
| privateKeySecretRef: |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: bboxx-service | |
| spec: | |
| type: ClusterIP | |
| ports: | |
| - port: 80 | |
| targetPort: 7500 | |
| selector: |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: ussd-deployment | |
| labels: | |
| app: ussd | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: |
| FROM openjdk:8 as stage0 | |
| LABEL snp-multi-stage="intermediate" | |
| LABEL snp-multi-stage-id="52ff43b3-42bb-43db-a05f-231396a6736c" | |
| WORKDIR /opt/docker | |
| COPY 1/opt /1/opt | |
| COPY 2/opt /2/opt | |
| USER root | |
| RUN ["chmod", "-R", "u=rX,g=rX", "/1/opt/docker"] | |
| RUN ["chmod", "-R", "u=rX,g=rX", "/2/opt/docker"] | |
| RUN ["chmod", "u+x,g+x", "/1/opt/docker/bin/utility-ussd"] |