### Initial Steps Install Minikube Install Tekton Install Kubectl ### Docker Compose to Kubernetes Objects **Secret for .dockerjsonconfig** **Deployment** - API - Volumes - /etc/gensynth (EmptyDir) - /gensynth/downloads (EmptyDir) - /var/lib/gensynth (EmptyDir) - /gensynth/workspace (EmptyDir) - /etc/odbc.ini (ConfigMap) - /usr/gensynthapi/app.config.json (ConfigMap) - DB - ImagePullSecret - Frontend **Service to Frontend** **ConfigMaps** - /etc/odbc.ini (RO) - /usr/gensynthapi/app.config.json ```shell kubectl create configmap gensynthodbc --from-file=./etc/odbc.ini kubectl create configmap gensynthappconfig --from-file=./gensynth-config/app.config.json ``` ### Create Tekton Resources Create Tasks - Deploy Gensynth - Use image as params - Test Gensynth - Python Task Create Pipeline - with Deploy, Test Tasks ```yaml= apiVersion: apps/v1 kind: Deployment metadata: name: gensynth labels: app: gensynth spec: selector: matchLabels: app: gensynth replicas: 1 template: metadata: labels: app: gensynth spec: containers: - name: pkgtest-postgres image: docker.io/darwinai/gensynth-qa:schema_development-pg env: - name: POSTGRES_USER value: gensynth - name: POSTGRES_PASSWORD value: passw0rd - name: POSTGRES_DB value: gs_platform ports: - containerPort: 5432 - name: pkgtest-api image: docker.io/darwinai/gensynth-qa:api_development-gpu env: - name: DB_POLL_CHRON value : "*/15 * * * * *" - name: JOB_POLL_CHRON value: "*/15 * * * * *" - name: CONFIG_FOLDER value: "/var/lib/gensynth/config" - name: API_LOGFILE value: "/gensynth/workspace/log/gensynth_api.log" - name: API_LOGLEVEL value: "DEBUG" - name: GENSYNTH_WORKSPACE_PATH value: "/gensynth/workspace" - name: PYTHONPATH value: "/gensynth/workspace" - name: TZ value: "America/Toronto" ports: - containerPort: 3000 # depends on DB securityContext: runAsUser: 1000 runAsGroup: 1000 volumeMounts: - name: etc mountPath: /etc/gensynth - name: downloads mounthPath: /gensynth/downloads - name: workspace mounthPath: /gensynth/workspace - name: varlib mountPath: /var/lib/gensynth - name: odbc mountPath: /etc/ - name: appconfig mountPath: /etc/ #- image: docker.io/darwinai/gensynth-qa:web_development imagePullSecrets: - name: regcred restartPolicy: Always volumes: - name: etc emptyDir: {} - name: varlib emptyDir: {} - name: downloads emptyDir: {} - name: workspace emptyDir: {} - name: odbc configMap: name: gensynthodbc - name: appconfig configMap: name: gensynthappconfig ``` ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: gensynth labels: app: gensynth spec: selector: matchLabels: app: gensynth replicas: 1 template: metadata: labels: app: gensynth spec: containers: - name: pkgtest-postgres image: docker.io/darwinai/gensynth-qa:schema_development-pg env: - name: POSTGRES_USER value: gensynth - name: POSTGRES_PASSWORD value: passw0rd - name: POSTGRES_DB value: gs_platform ports: - containerPort: 5432 - name: pkgtest-api image: docker.io/darwinai/gensynth-qa:api_development-gpu env: - name: DB_POLL_CHRON value : "*/15 * * * * *" - name: JOB_POLL_CHRON value: "*/15 * * * * *" - name: CONFIG_FOLDER value: "/var/lib/gensynth/config" - name: API_LOGFILE value: "/gensynth/workspace/log/gensynth_api.log" - name: API_LOGLEVEL value: "DEBUG" - name: GENSYNTH_WORKSPACE_PATH value: "/gensynth/workspace" - name: PYTHONPATH value: "/gensynth/workspace" - name: TZ value: "America/Toronto" ports: - containerPort: 3000 securityContext: runAsUser: 1000 runAsGroup: 1000 volumeMounts: - name: etc mountPath: /etc/gensynth - name: downloads mountPath: /gensynth/downloads - name: workspace mountPath: /gensynth/workspace - name: varlib mountPath: /var/lib/gensynth - name: odbcappconfig mountPath: /etc/ imagePullSecrets: - name: regcred restartPolicy: Always volumes: - name: etc emptyDir: {} - name: varlib emptyDir: {} - name: downloads emptyDir: {} - name: workspace emptyDir: {} - name: odbcappconfig configMap: name: gensynthodbcappconfig ```