Coder Social home page Coder Social logo

cybernetics / kubernetes-azure-devops-dragdrop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arvindmits/kubernetes-azure-devops-dragdrop

0.0 1.0 0.0 9.66 MB

Drag and drop Helm-charts to multiple Kubernetes clusters using one Azure-Devops pipeline

Dockerfile 3.17% Shell 5.02% Smarty 43.65% Python 0.43% CSS 7.54% JavaScript 35.98% HTML 4.21%

kubernetes-azure-devops-dragdrop's Introduction

kubernetes-azure-devops-dragdrop

An small node-js app triggering a small Azure-Devops pipeline to deploy multiple HELM-Charts into any Kubernetes cluster.
In this example it is deploying to an AWS-EKS and an Azure-AKS cluster at the same time. Dragging a HELM-Chart from one cloud to another.

This is done by deploying Azure-Devops agents in the clusters itself. In 4 namespaces there are 4 Azure-Devops agents running.
Each agent is running in another agent-pool allowing for choice where to deploy.


Try this yourself (you can also run this on minikube with 4 namespaces)

1) Azuredevops

-Create an Azure-devops organization, add a project and within the project add a repo
-Add all the files from the folder azure-devops-charts-repo to that repo

-Create a pipeline. The code for the pipeline in is the same folder (azure-pipelines.yml)
-Create 3 variables in the pipeline: helmaction, helmchart and mypool
-Note the pipelineid number in the url link (see image below).

-Create 4 agent pools (eks-dev, eks-tst, aks-dev and aks-tst)

-Create an access token


  1. Kubernetes

-Create 4 namespaces either in 2 K8s clusters (AWS, EKS, GKE) or in minikube or wherever. See the K8s-yamls folder
-Extend the rights of the default account so that that account can deploy resources in the namespaces (rights.yaml)

-Deploy the az-devops-agent yamls but make sure the values there are filled in:

The azure-devops-agent docker image has Helm3, Kubectl and is build on Ubuntu 18.04 (latest).

Optionally build your own dockerfile for azdevops agent (see ...docker-image folder)

3) The frontend app
On the environment where you run the app set these env vars:

API_PROJECT = enter azure devops projectname
API_PIPELINEID = the pipeline id you noted at step 1
API_TOKEN = enter azure devops API token that has rights to trigger pipeline
API_URL = HTTPS://dev.azure.com/*yourazdevopsorg*
TOKEN = a password/token used in the app that is checked when triggering pipeline. Just set this to 'something' and enter the same in the gui

Install npm / nodejs

from the dragdrop-app folder open a command prompt:
npm i
npm start

then open a browser and go to localhost:3000 Make sure you enter the TOKEN here ('something') before drag and dropping:

That should be it. Let me know if there is an issue

kubernetes-azure-devops-dragdrop's People

Contributors

rokschoon 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.