1 Crkmpcdmxefwpmtih8d70w

FluxCD & Bootstrap: Powering Effortless App Deployment

19th December 2023 | 3 Views

Info: This Creation is monetized via ads and affiliate links. We may earn from promoting certain products in our Creations, or when you engage with various Ad Units.

How was this Creation created: We are a completely AI-free platform, all Creations are checked to make sure content is original, human-written, and plagiarism free.

Toggle

 

In today’s rapidly evolving landscape of software development, the need for efficient and reliable deployment solutions is paramount. Enter FluxCD, a powerful GitOps tool, and Bootstrap, the renowned front-end framework. When combined, these two technologies offer a seamless and robust approach to deploying applications, bringing together the simplicity of Bootstrap’s frontend design with the automated deployment prowess of FluxCD.

1 Crkmpcdmxefwpmtih8d70w1 Crkmpcdmxefwpmtih8d70w

In this article, we’ll explore the integration of FluxCD and Bootstrap, unveiling how this amalgamation streamlines the deployment process for applications. From setting up FluxCD to harnessing the flexible design capabilities of Bootstrap, we’ll walk through the steps to achieve an automated and visually compelling application deployment

Prerequisite

· Cluster Up and Running (I am using kind)

· Docker installed.

· Helm installed.

choco install helm

· Flux installed.

choco install flux

· GitHub Environment. (For Windows Have your Clone in C Drive only, otherwise flux will not work, issue with flux Issue)

Bootstrap

I am using personal GitHub account.

flux bootstrap github --token-auth --owner=AcidBurn18 --repository=fluxcd --branch=main --path=clusters/my-cluster --personal

If you are using GitHub Organization or Enterprise, slight changes in command. Can also bootstrap using

Gitlab, AWS CodeCommit, BitBucket, Azure DevOps, Google cloud source

This will ask for GitHub Pat Token, just paste it.

Bootstrap Done.

After performing above steps, fluxcd will create directory clusters/my-cluster/fluxcd in your GitHub repo which will have 3 important files.

· Gotk-components.yaml

· Gotk-sync.yaml

· Kustomization.yaml

Gotk-components.yaml:- Contains all the important, configuration, dependencies fluxcd needs to perform its duties.

Gotk-sync.yaml:- This file defines the scope of reconciliation. Here we added another kustomization , which is looking at our application folder for reconcilation at every 1 minute inetrval.

Kustomization.yaml:- A basic standard kustomization file

Now let’s add our application manifest file and its helm chart.

Create a new folder application/helloworld, inside which we will have 4 file and 1 file in application folder.

Let’s go through those 4 manifest files first.

· Gitrepo.yaml:- This is Where we are defining where our application helm chart is stored. Here name is demo in flux-system namespace, with out github https URL, with the secretRef, that is automatically created by fluxcd when bootstrapping, this contains our github PAT Token

· Helmrelease.yaml:- here we are defining the strategy of helm release, with helm chart values passing here directly. Here name is demo in demo namespace, with the path where our chart is stored, values contains values refrenced by helm chart as variable.

· Namespace.yaml: — Standard Namespace Yaml. Creating the demo namespace.

· Kustomization.yaml: — Standard Kustomization Yaml. Privind the sequence of manifest to be executed

In the parent application folder also, there is one standard Kustomization Yaml.

Now let’s go through our Helm Chart for the Application.

So, our helm chart is also in same GitRepo as our fluxcd configuration, we can have it in different also no issue.
 
 This is a Very Standard Helm Chart, with one secret yaml file, which contains the encoded dockerconfigjson of the secret needed to pull/push with Docker hub. You can store for any registries, jfrog, Acr, google cloud etc.

Namespace Bifurcation

Flux-system: – flux component, GitRepo, kustomization

Demo:- Application, Docker hub secret, helm release.

So now we are ready, just push the changes to your GitHub repo.

Now after few minutes you will see on your cluster application being deployed, with configuration you specified in helm release and helm chart.

Now if we change the image to different version, for demo purpose we have two different applications running on port 8000, to show difference, ideally it would different version of same application, with updates.

So now image is 3.0, just do this change in helm release and do the git push. After 1 minute you will see the change being reflected in your cluster.

Next We Will Look at.

1- WeaveWork (UI for FluxCD)

2- Flagger (Deployment Strategy)

Ansh Agrawal

@Ansh-Agrawal

Following0
Followers0


Hasthags:

You may also like

Leave a Reply