Code Monkey home page Code Monkey logo

gitops-argocd-sample's Introduction

About

This project is a lab to test GitOps with ArgoCD.

You need a local environment first, with it you can install ArgoCD and the ApplicationSet manifests to test the funcionalities of this rep.

With this rep you can:

  • configure local users (to test policies)
  • configure policies
  • create project
  • create application
  • create application set

Local Environment

Install a Kubernetes local environment like Minikube

https://minikube.sigs.k8s.io/docs/start/

Minikube

minikube start

minikube dashboard

ArgoCD

Install

kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.5.8/manifests/install.yaml

kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/applicationset/master/manifests/install.yaml

Install argocd CLI

https://argo-cd.readthedocs.io/en/stable/cli_installation/

Delete

kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.5.8/manifests/install.yaml

kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/applicationset/master/manifests/install.yaml

Port-forwarding to use the UI

kubectl port-forward svc/argocd-server -n argocd 8080:443

Get the admin password

kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo

Login on argocd cli

Default login is admin

Default admin password is generated. You can get the admin login with the command above.

Now, login the admin credentials:

argocd login --port-forward  --port-forward-namespace argocd --

Alias

I reccomend make a alias to use argocd without repeatidaly put the parameters "--port-forward --port-forward-namespace argocd"

alias argocd="argocd --port-forward --port-forward-namespace argocd"

Now, all argocd commands runs these parameters automatically

Install project

kubectl apply -f argocd-projects/my-project.yaml

Application

You can apply a ArgoCD Application with:

kubectl apply -f argocd-example-apps/guestbook.yaml

It will generate 1 Application, to improve efficiency, you could use Application Set and install multiple Applications dynamically.

Application Set

See the doc on application-sets

Example of applications

The ArgoCD example apps repository have a lot of examples.

You can use manifest directly, you can use helm (inside this git or external), kustomize, etc.

https://github.com/argoproj/argocd-example-apps/tree/master

gitops-argocd-sample's People

Contributors

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