Giter Club home page Giter Club logo

crossplane-argo-dslatam's Introduction

crossplane-argo-dslatam

Create GKE Cluster

To create a GKE cluster follow the next steps:

  1. Create a firewall rule to accept all incoming traffic and call it as allin
  2. Create a firewall rule to accept all outgoing traffic and call it allout
  3. Create the cluster in GCP
  4. Access the cluster
  5. Create a service account with the following commands:
gcloud iam service-accounts create dslatam --display-name="SA Demo Crossplane"
gcloud iam service-accounts add-iam-policy-binding [email protected] --member='serviceAccount:[email protected]' --role='roles/owner'


gcloud projects add-iam-policy-binding ${GCP_PROJECT_ID} \
    --member=serviceAccount:${GCP_SVC_ACC} \
    --role=roles/container.admin

  1. Create a key to be used in Crossplane:
gcloud iam service-accounts keys create key.json [email protected]

Install ArgoCD

  1. To install ArgoCD run the fullowing steps:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
  1. Access ArgoCD by running the following command:
kubectl port-forward svc/argocd-server -n argocd 8080:443
  1. Install the CLI local client:
brew install argocd
  1. Get the current admin ArgoCD password:
argocd admin initial-password -n argocd
  1. Login with the admin user and previous password and update it:
argocd login --insecure localhost:8080
argocd account update-password --insecure --server localhost:8080

Install Crossplane

To install crossplane follow the next steps:

  1. Add the helm repository:
helm repo add \
crossplane-stable https://charts.crossplane.io/stable
helm repo update
  1. Install Crossplane using helm:
helm install crossplane \
crossplane-stable/crossplane \
--namespace crossplane-system \
--create-namespace
  1. Install the GCP Provide:
cat <<EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-gcp-storage
spec:
  package: xpkg.upbound.io/upbound/provider-gcp-storage:v0.35.0
EOF
  1. Create a secret that contains the credentials
kubectl create secret \
generic gcp-secret \
-n crossplane-system \
--from-file=creds=./key.json
  1. Instance a new GCP provider using the secret:
kubectl create ns development
cat <<EOF | kubectl apply -f -
apiVersion: gcp.upbound.io/v1beta1
kind: ProviderConfig
metadata:
  name: default
spec:
  projectID: cs-nonprod
  credentials:
    source: Secret
    secretRef:
      namespace: crossplane-system
      name: gcp-secret
      key: creds
EOF

Create the initial Projects and Apps

Create the projects for this demo by running the following command:

kubectl apply -f projects/

Set permissions for Github Actions

Go to settings/actions in your repository and in Workflow permissions set

  • Read and write permissions
  • Allow GitHub Actions to create and approve pull requests

Use the workflows

  1. Create a new application
  2. Delete an application

References

crossplane-argo-dslatam's People

Contributors

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