Giter Site home page Giter Site logo

flux-workshop-2023's Introduction

flux-workshop-2023

Prerequisites

Kubernetes

You will need a Kubernetes cluster version 1.24 or newer. For a quick local test, you can use Kubernetes kind. Any other Kubernetes setup will work as well though.

Create a cluster called staging with the kind CLI:

kind create cluster --name staging

Flux CLI

Install the Flux CLI on MacOS or Linux using Homebrew:

brew install fluxcd/tap/flux

For other installation methods please see fluxcd.io/flux/installation.

GitHub Personal Access Token

In order to follow the workshop you'll need a GitHub account and a personal access token that can create repositories (check all permissions under repo).

Add the GitHub PAT and username to your shell environment:

export GITHUB_TOKEN=<your-token>
export GITHUB_USER=<your-username>

GitHub Repository

Fork the workshop repository on your personal account and clone it locally:

git clone https://github.com/${GITHUB_USER}/flux-workshop-2023.git
cd flux-workshop-2023

Bootstrap

Install the Flux controllers on the staging cluster:

flux bootstrap github \
    --owner=${GITHUB_USER} \
    --repository=flux-workshop-2023 \
    --branch=main \
    --personal \
    --path=clusters/staging

Pull the changes locally:

git pull

Inspect the Flux manifests generated in the repo:

tree ./clusters

Install the Flux UI

Rename the infrastructure.yaml.x to infrastructure.yaml in the clusters/staging directory, then commit the changes and push them upstream.

Wait for Flux to reconcile the infra Kustomizations:

flux get kustomizations --watch

To access the Flux UI, first start port forwarding with:

kubectl -n flux-system port-forward svc/weave-gitops 9001:9001

Navigate to http://localhost:9001 and login using the username admin and the password flux.

Install the demo app

Rename the apps.yaml.x to apps.yaml in the clusters/staging directory, then commit the changes and push them upstream.

Wait for Flux to reconcile the apps Kustomizations:

flux get kustomizations --watch

Enable continuous deployment

Edit the podinfo.yaml file from the apps directory, and change the tag: 6.4.0 to semver: 6.4.x. Commit the changes and push them upstream.

Navigate to Applications > podinfo in the Flux UI and watch the app being upgraded to the latest version.

flux-workshop-2023's People

Contributors

stefanprodan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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