GithubHelp home page GithubHelp logo

mediawiki's Introduction

mediawiki-aks

Azure Setup

  • You should have a Azure Service Principle created before hand with Contributor role to create azure resources. Note its Client Id and password
az ad sp create-for-rbac --name your-spn --role Contributor --scopes /subscriptions/<sub-id>
  • Create storage account and blob to store TF state file using bash script ./storage_account.sh
    • az cli should be installed to run this or you can do the same from Azure portal or Cloud Shell

AKS Setup

# Your SPN Client iD here
servicePrincipalID
# Your SPN password here
servicePrincipalKey
# YOur AD tenant ID
tenant_id

ArgoCD

  • The Terraform pipeline will also install argocd for kubernetes manifest installation. Whenever a commit is made on perticular repo, branch and on path, the argocd will pull that updates and sync that with Kubernetes cluster. So this is a continuous deployment solution

Once Azure Pipeline runs successfully:

  • You can get its External IP or argocd from azure portal or run below command
echo "ArgocdIngress IP: $(kubectl get service -n argocd argocd-server -o=jsonpath='{.status.loadBalancer.ingress[].ip}')"
  • Login to argocd with admin username and get password from this command
 kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
  • Once you logged in, click on New App --> EDIT AS YAML and copy below. This creates application on argocd with git repo, path and branch
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: mediawiki
spec:
  destination:
    name: ''
    namespace: ''
    server: 'https://kubernetes.default.svc'
  source:
    path: mediawiki_app/dev
    repoURL: 'https://github.com/subhosmane/mediawiki-aks.git'
    targetRevision: HEAD
  sources: []
  project: default
  syncPolicy:
    automated:
      prune: false
      selfHeal: false

This creates mediawiki app and Deploys manifests to kubernetes cluster

  • Now get its Ingress IP and access Mediawiki App
kubectl get service -n mw-dev mw-svc -o json| jq -r '.status.loadBalancer.ingress[].ip'

Automation

Docker image update

  • Any commit to main branch and path mediawiki_app/Dockerfile will be triggering Dockerfile pipeline to generate a Docker image and push to ACR
trigger:
  branches:
    include:
    - main
  paths:
    include:
    - 'mediawiki_app/Dockerfile'

AKS Infra Update

  • If you want Infra automation, update trigger: <> to your branch so that pipeline will be triggered for any infra code updates but this could be destructive

App and DB Update

  • As said above this will be taken care by ArgoCD tool, any chnages to mediawiki-app will be picked by Argocd and applied to AKS

Deployment Status

  • You can look into Images for deployment status and app configuration

mediawiki's People

Contributors

subhosmane avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.