From 06db6bd1d11d744085fd921b949516baadf12045 Mon Sep 17 00:00:00 2001
From: Helmut Hutzler <helmut.hutzler@th-nuernberg.de>
Date: Thu, 15 Sep 2022 16:57:34 +0200
Subject: [PATCH] Updating git-lab agent Readme by adding helm commands

---
 GITLAB_Runner/README.md | 126 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 126 insertions(+)
 create mode 100644 GITLAB_Runner/README.md

diff --git a/GITLAB_Runner/README.md b/GITLAB_Runner/README.md
new file mode 100644
index 0000000..57f41de
--- /dev/null
+++ b/GITLAB_Runner/README.md
@@ -0,0 +1,126 @@
+# gitlab-agent
+
+
+
+## Getting started
+
+To make it easy for you to get started with GitLab, here's a list of recommended next steps.
+
+Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
+
+## Add your files
+
+- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
+- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
+
+```
+cd existing_repo
+git remote add origin https://git.informatik.fh-nuernberg.de/HutzlerHe/gitlab-agent.git
+git branch -M main
+git push -uf origin main
+```
+## Install new Gitlab Runner
+- [ ] Create a new namespact and secret
+# gitlab-agent
+
+
+
+## Getting started
+
+To make it easy for you to get started with GitLab, here's a list of recommended next steps.
+
+Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
+
+## Add your files
+
+- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
+- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
+
+```
+cd existing_repo
+git remote add origin https://git.informatik.fh-nuernberg.de/HutzlerHe/gitlab-agent.git
+git branch -M main
+git push -uf origin main
+```
+## Install new Gitlab-Agent
+- [ ] Our gitlab-agent is named  gitlab-agent
+- [ ] All Yaml files deployed to directory /deployments/ in Gitlab project HutzlerHe/gitlab-agent will be deployed at our Kubernetes cluster
+- [ ] => Config file needs to be named :  .gitlab/agents/gitlab-agent/config.yaml
+- [ ] Initial Content
+```
+gitops:
+manifest_projects:
+- id: HutzlerHe/gitlab-agent
+  default_namespace: testing
+  paths:
+  # Read all YAML files from this directory.
+    - glob: '/deployments/*.yaml'
+      # Read all .yaml files from team2/apps and all subdirectories.
+  #- glob: '/team2/apps/**/*.yaml'
+  # If 'paths' is not specified or is an empty list, the configuration below is used.
+  #- glob: '/**/*.{yaml,yml,json}'
+  reconcile_timeout: 3600s
+  dry_run_strategy: none
+  prune: true
+  prune_timeout: 3600s
+  prune_propagation_policy: foreground
+  inventory_policy: must_match
+```
+- [ ] helm commands to install Agent
+```
+# helm repo add gitlab https://charts.gitlab.io
+  "gitlab" already exists with the same configuration, skipping
+
+# helm repo update
+  Hang tight while we grab the latest from your chart repositories...
+  ...Successfully got an update from the "harbor" chart repository
+  ...Successfully got an update from the "kasten" chart repository
+  ...Successfully got an update from the "vmware-tanzu" chart repository
+  ...Successfully got an update from the "bitnami" chart repository
+  ...Successfully got an update from the "prometheus-community" chart repository
+  ...Successfully got an update from the "gitlab" chart repository
+  ...Successfully got an update from the "bitnami-ibm" chart repository
+
+# export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
+# helm upgrade --install gitlab-agent gitlab/gitlab-agent \
+     --namespace gitlab-agent \
+     --create-namespace \
+     --set image.tag=v15.3.0 \
+     --set config.token=FS..................................... \
+     --set config.kasAddress=wss://git.informatik.fh-nuernberg.de/-/kubernetes-agent/
+Release "gitlab-agent" does not exist. Installing it now.
+NAME: gitlab-agent
+LAST DEPLOYED: Wed Sep  7 13:06:13 2022
+NAMESPACE: gitlab-agent
+STATUS: deployed
+REVISION: 1
+TEST SUITE: None
+```
+
+For a detail description adding a new Kubernetes cluster to your project read
+
+- [ ] [Add Gitlab Agent description](https://team.informatik.fh-nuernberg.de/confluence/display/KUB/Gitlab+Agent+Install)
+
+## Add new repositories
+- [ ] All Yaml files deployed to directory /deployments/ in Gitlab project HutzlerHe/gitlab-agent will be deployed at our Kubernetes cluster
+- [ ] => Config file needs to be named :  .gitlab/agents/gitlab-agent/config.yaml
+- [ ] Initial Content
+```
+gitops:
+manifest_projects:
+- id: HutzlerHe/gitlab-agent
+  default_namespace: testing
+  paths:
+  # Read all YAML files from this directory.
+    - glob: '/deployments/*.yaml'    
+  reconcile_timeout: 3600s
+  dry_run_strategy: none
+  prune: true
+  prune_timeout: 3600s
+  prune_propagation_policy: foreground
+  inventory_policy: must_match
+```
+For adding a new Kubernetes cluster to your project read
+
+- [ ] [Add Gitlab Agent description](https://team.informatik.fh-nuernberg.de/confluence/display/KUB/Gitlab+Agent+Install)
+## Add new repositories
-- 
GitLab