Skip to content

Deployments

This section provides guidelines and best practices for deploying your projects effectively. Whether you're deploying a web application, a mobile app, or any other type of software, following these tips can help ensure a smooth deployment process.

Tip

All applications must be deployed only to the DEV environment during the hackathon. Production deployments are not allowed. Every developer should have access to the relevant resources they need within the DEV environment. This is to avoid any disruptions to live services and ensure a controlled environment for testing and development that is already well equipped for your hackathon needs.

General Deployment Guidelines

  1. Plan Your Deployment: Before deploying, ensure you have a clear plan that includes rollback procedures in case something goes wrong.
  2. Use Version Control: Always deploy from a version-controlled branch to ensure you can track changes and revert if necessary.
  3. Automate Where Possible: Use CI/CD pipelines to automate your deployment process, reducing the risk of human error.
  4. Monitor Your Deployment: After deployment, monitor your application for any issues and performance metrics to ensure everything is functioning as expected.
  5. Communicate with Your Team: Keep your team informed about deployment schedules and any potential downtime.

Deployment Tools and Platforms

Teams are to reuse existing cloud resources in the DEV environment. Below are some commonly used deployment tools and platforms:

  • Azure Kubernetes Service (AKS) - Dedicated AKS namespaces will be designated to your team by the Hackathon organizers. Please reach out to your point of contact for assistance.
  • Azure SQL Database - You may reuse the existing DTA SQL server for your needs to utilise Pickles data. If you are missing access, please reach out to your point of contact for assistance.
  • Cloudflare Tunnels - To securely expose your frontend components (pages, UI) without exposing it to the public.
  • Flutter Mobile App - For mobile app development and deployment. We have a dedicated boilerplate framework repo readily available to be cloned to another repository. Kindly visit Pickles Backstage Portal and create a new mobile service repo accordingly.

Deployment Pipelines and Helm Config for AKS deployment

Pre-reqs

Platform team will assist in creating a common namespace and injecting the relevant Environment Variables and Kube Admin role for OIDC → Allowing you to deploy your code

Kube configuration for deployment

  1. Add devops folder into your respective repository.

  2. Add your relevant Dockerfile to build your application

  3. Add GitHub Actions workflow to your repository.

  4. Open the ci folder.

  5. Update your environment yaml of your choosing - example: https://github.com/Pickles-Australia/repo-vendor-mgmt/blob/master/ms-vendor/devops/ci/values.test.yaml

  6. Update the following keys inside the environment yaml:

a. nameOverride

b. global.nameOverride

c. global.image.repository

d. global.configmapEnv.APP_NAME → add all other relevant Environment Variables

e. Define your global.platformConfigs keys → relevant keys that are required by you

f. global.environment

# Specify the environment details - ingressClass, microservice name, domain and version
# App url will be - http://<kong-ip>/domain/microservice/version/
environment:
  name: dev
  domain: {{tribe-namespace}} // As per your tribe 
  microservice: ms-<team-name> # should be unique to your team name
  ingressClass: kong-test
  internal: true
7. global.ingress config for your Swagger endpoints (should it change from your current implementation)

Pipeline configuration

Tip

Ensure that your Kubernetes configuration is created and updated accordingly from the above guidelines. Environment allowed to deploy is “dev" only.

A sample pipeline will be provided to all teams to be used as a baseline to be built upon and updated accordingly.

  • Platform Github pipelines templates:

    Team can refer feature/Hack25-Platform branch in repo-platform-pipeline-templates repo. In .github/workflow folder we have created templates for SPA, database and microservice build and deploy templates. This templates can be used as reference. Please feel free to create your own templates as per GitHub standard.

  • Guidelines to use platform templates:

    • A workflow should be created in teams own GitHub folder to refer this templates. Environment value should be limited to “dev” only.

    • You may use the best practices in mind to build a great pipeline with the following guidelines:

    • Utilising GitHub Secrets and GitHub Environment Variables to store sensitive credentials and repeated data accordingly

    • This pipeline is a standard PAS pipeline that deploys a backend/fronend application to the DEV Backend/Frontend cluster.

  • OIDC → GitHub x Azure Authentication to deploy your applications

    • Add this section as part of your GitHub pipeline yaml file:

      - name: Azure login
              uses: azure/login@v2
              with:
              client-id: ${{ secrets.AZURE_CLIENT_ID_NON_PRD }}
              tenant-id: ${{ secrets.AZURE_TENANT_ID }}
              subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_DTA }}
      

    • Provide a high-level skeleton deployment template for the teams to configure and deploy their applications.

    • Environment variables and GitHub Secrets to set in given repo.

Special Considerations for Hackathon Projects or Missing Access

  • If certain teams require additional resources or have specific deployment needs, please reach out to your point of contact for assistance.