Giter Club home page Giter Club logo

hello-tanzu-deployment's Introduction

Example using ytt + kbld with ArgoCD

In order to use ytt with ArgoCD, you need to install ytt on repo-server and set configManagementPlugins on argocd-cm. Here is a set of sample overlay files to achieve these. For example, when installing the Argo CD, customize it as follows.

ytt --ignore-unknown-comments=true \
    -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml \
    -f https://gist.github.com/making/6f0852541959d39c27bd238e9deb6d54/raw/7c77bd059934fea2282b368f0216a1f3b358a75a/argocd-repo-server.yml \
    -f https://gist.github.com/making/6f0852541959d39c27bd238e9deb6d54/raw/7c77bd059934fea2282b368f0216a1f3b358a75a/argocd-cm.yml \
    | kubectl apply -f-

Verify manifest to be installed on dev and prod enviroments

# Dev
ytt -f base -f dev

# Prod
ytt -f base -f prod

Given the ArgoCD server configured below

argocd login argo.orange.maki.lol --grpc-web --username admin --password $(kubectl get pod -n argocd -l app.kubernetes.io/component=server -o jsonpath='{.items[0].metadata.name}')
argocd account update-password --new-password admin --current-password $(kubectl get pod -n argocd -l app.kubernetes.io/component=server -o jsonpath='{.items[0].metadata.name}')
argocd login argo.orange.maki.lol --grpc-web --username admin --password admin 
argocd cluster add $(kubectl config current-context)

Create apps for dev and prod environment as follows

# Dev
argocd app create hello-tanzu-dev \
  --repo https://github.com/making/hello-tanzu-deployment.git \
  --path dev \
  --config-management-plugin ytt \
  --dest-server https://192.168.11.114:6443 \
  --dest-namespace demo-dev \
  --sync-policy automated \
  --auto-prune

# Prod
argocd app create hello-tanzu-prod \
  --repo https://github.com/making/hello-tanzu-deployment.git \
  --path prod \
  --config-management-plugin ytt \
  --dest-server https://192.168.11.114:6443 \
  --dest-namespace demo \
  --sync-policy automated \
  --auto-prune

You will see 2 apps in ArgoCD UI as follows

image

image

hello-tanzu-deployment's People

Contributors

making avatar

Stargazers

dancho avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

chrisludwig

hello-tanzu-deployment's Issues

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.