Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudacademy/gitops-sandpit
Fully Functional GitOps Sandpit Environment
https://github.com/cloudacademy/gitops-sandpit
cloudacademy devops flux gitops kubernetes
Last synced: 12 days ago
JSON representation
Fully Functional GitOps Sandpit Environment
- Host: GitHub
- URL: https://github.com/cloudacademy/gitops-sandpit
- Owner: cloudacademy
- Created: 2020-09-28T06:05:21.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-28T20:49:47.000Z (over 4 years ago)
- Last Synced: 2024-11-13T18:27:29.428Z (2 months ago)
- Topics: cloudacademy, devops, flux, gitops, kubernetes
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitOps Sandpit Environment
# Background
Contains a ```Vagrantfile``` which will launch a fully functional GitOps environment which includes the following:* Kubernetes v1.19.3
* Flux v1.5.0## Install Instructions
1. Fork the https://github.com/cloudacademy/gitops-demo repo
2. Edit the ```Vagrantfile```, update the ```FORKED_GITOPS_DEMO_REPO``` variable to point to your forked copy
3. Launch the GitOps Vagrant box using ```vagrant up```
4. Extract the Flux SSH public key from the output of the previous command and then add it as a new **Deploy Key** with both read/write access for the forked repo as configured within the ```FORKED_GITOPS_DEMO_REPO``` variable
5. SSH into the new GitOps Vagrant box using ```vagrant ssh```## Vagrantfile
```
Vagrant.configure("2") do |config|
config.vm.box = "cloudacademydevops.k8s"config.vm.provision "shell", inline: <<-SHELL
kubectl create ns flux
kubectl create ns cloudacademyhelm repo add fluxcd https://charts.fluxcd.io
helm repo update#NOTE: Fork the cloudacademy/gitops-demo repo
#then update the following line with your forked version
FORKED_GITOPS_DEMO_REPO=github.com:cloudacademy/gitops-demohelm install flux --set git.url=git@$FORKED_GITOPS_DEMO_REPO --namespace flux fluxcd/flux --version 1.5.0
echo waiting for flux pods to launch...
kubectl wait --timeout=300s --for=condition=available deploy flux -n flux
kubectl wait --timeout=300s --for=condition=available deploy flux-memcached -n flux
echo flux ready!!
echo
echo ============================
echo copy this SSH key and configure as a new Deploy key in the $FORKED_GITOPS_DEMO_REPO GitHub repo
kubectl -n flux logs deployment/flux | grep identity.pub | cut -d '"' -f2 | cut -d " " -f1,2
echo ============================
echo
echo login into vagrant box:
echo vagrant ssh
echo kubectl -n flux get all
echo
echo finished!
SHELL
end
```