Adding dependencies, binary autostart
This commit is contained in:
		
							
								
								
									
										4
									
								
								opencloud/charts/loki/docs/examples/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								opencloud/charts/loki/docs/examples/README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
## Introduction
 | 
			
		||||
The Helm Charts found under the examples directory are getting started examples which you can use to deploy Loki using the Simple Scalable architecture quickly. Currently, the examples include:
 | 
			
		||||
- [Deploying Grafana Enterprise Logs (Loki in Enterprise mode)](https://github.com/grafana/loki/tree/main/production/helm/loki/docs/examples/enterprise)
 | 
			
		||||
- [Deploying Loki OSS](https://github.com/grafana/loki/tree/main/production/helm/loki/docs/examples/oss)
 | 
			
		||||
							
								
								
									
										28
									
								
								opencloud/charts/loki/docs/examples/enterprise/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								opencloud/charts/loki/docs/examples/enterprise/README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
## Introduction
 | 
			
		||||
This example gives you an example or getting started overrides value file for deploying Loki (Enterprise Licensed) using the Simple Scalable architecture in GKE and using GCS.
 | 
			
		||||
 | 
			
		||||
## Installation of Helm Chart
 | 
			
		||||
These instructions assume you already have access to a Kubernetes cluster, GCS Bucket and GCP Service Account which has read/write permissions to that GCS Bucket.
 | 
			
		||||
 | 
			
		||||
### Populate Secret Values
 | 
			
		||||
Populate the [enterprise-secrets.yaml](./enterprise-secrets.yaml) so that:
 | 
			
		||||
- The `gcp_service_account.json` secret has the contents of your GCP Service Account JSON key.
 | 
			
		||||
- The `license.jwt` secret has the contents of your Grafana Enterprise Logs license key given to your by Grafana Labs.
 | 
			
		||||
 | 
			
		||||
Deploy the secrets file to your k8s cluster with the command:
 | 
			
		||||
 | 
			
		||||
`kubectl apply -f enterprise-secrets.yaml`
 | 
			
		||||
 | 
			
		||||
### Configure the Helm Chart
 | 
			
		||||
Open [overrides-enterprise-gcs.yaml](./overrides-enterprise-gcs.yaml) and replace `{YOUR_GCS_BUCKET}` with the name of your GCS bucket. If there are other things you'd like to configure, view the core [Values.yaml file](https://github.com/grafana/loki/blob/main/production/helm/loki/values.yaml) and override anything else you need to within the overrides-enterprise-gcs.yaml file.
 | 
			
		||||
 | 
			
		||||
### Install the Helm chart
 | 
			
		||||
 | 
			
		||||
`helm upgrade --install --values {PATH_TO_YOUR_OVERRIDES_YAML_FILE} {YOUR_RELEASE_NAME} grafana/loki-simple-scalable --namespace {KUBERNETES_NAMESPACE}`
 | 
			
		||||
 | 
			
		||||
### Get the Token for Grafana to connect
 | 
			
		||||
`export POD_NAME=$(kubectl get pods --namespace {KUBERNETES_NAMESPACE} -l "job-name=enterprise-logs-tokengen" -o jsonpath="{.items[0].metadata.name}")`
 | 
			
		||||
 | 
			
		||||
`kubectl --namespace {KUBERNETES_NAMESPACE} logs $POD_NAME loki | grep Token`
 | 
			
		||||
 | 
			
		||||
Take note of this token, you will need it when connecting Grafana Enterprise Logs to Grafana.
 | 
			
		||||
@@ -0,0 +1,12 @@
 | 
			
		||||
apiVersion: v1
 | 
			
		||||
kind: Secret
 | 
			
		||||
metadata:
 | 
			
		||||
  name: gel-secrets
 | 
			
		||||
type: Opaque
 | 
			
		||||
stringData:
 | 
			
		||||
  gcp_service_account.json: |
 | 
			
		||||
    {
 | 
			
		||||
      GCP_SERVICE_ACCOUNT_JSON_HERE
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  license.jwt: LICENSE_HERE
 | 
			
		||||
@@ -0,0 +1,83 @@
 | 
			
		||||
enterprise:
 | 
			
		||||
  enabled: true
 | 
			
		||||
  useExternalLicense: true
 | 
			
		||||
  externalLicenseName: gel-secrets
 | 
			
		||||
  tokengen:
 | 
			
		||||
    env:
 | 
			
		||||
      - name: GOOGLE_APPLICATION_CREDENTIALS
 | 
			
		||||
        value: "/etc/gel_secrets/gcp_service_account.json"
 | 
			
		||||
    extraVolumeMounts:
 | 
			
		||||
      - name: gel-secrets
 | 
			
		||||
        mountPath: "/etc/gel_secrets"
 | 
			
		||||
    extraVolumes:
 | 
			
		||||
      - name: gel-secrets
 | 
			
		||||
        secret:
 | 
			
		||||
          secretName: gel-secrets
 | 
			
		||||
          items:
 | 
			
		||||
          - key: license.jwt
 | 
			
		||||
            path: license.jwt
 | 
			
		||||
          - key: gcp_service_account.json
 | 
			
		||||
            path: gcp_service_account.json
 | 
			
		||||
loki:
 | 
			
		||||
  auth_enabled: true
 | 
			
		||||
 | 
			
		||||
  storage:
 | 
			
		||||
    type: gcs
 | 
			
		||||
    bucketNames:
 | 
			
		||||
      chunks: {YOUR_GCS_BUCKET}
 | 
			
		||||
      ruler: {YOUR_GCS_BUCKET}
 | 
			
		||||
      admin: {YOUR_GCS_BUCKET}
 | 
			
		||||
 | 
			
		||||
minio:
 | 
			
		||||
  enabled: false
 | 
			
		||||
 | 
			
		||||
write:
 | 
			
		||||
  extraEnv:
 | 
			
		||||
    - name: GOOGLE_APPLICATION_CREDENTIALS
 | 
			
		||||
      value: "/etc/gel_secrets/gcp_service_account.json"
 | 
			
		||||
  extraVolumeMounts:
 | 
			
		||||
    - name: gel-secrets
 | 
			
		||||
      mountPath: "/etc/gel_secrets"
 | 
			
		||||
  extraVolumes:
 | 
			
		||||
    - name: gel-secrets
 | 
			
		||||
      secret:
 | 
			
		||||
        secretName: gel-secrets
 | 
			
		||||
        items:
 | 
			
		||||
        - key: license.jwt
 | 
			
		||||
          path: license.jwt
 | 
			
		||||
        - key: gcp_service_account.json
 | 
			
		||||
          path: gcp_service_account.json
 | 
			
		||||
 | 
			
		||||
read:
 | 
			
		||||
  extraEnv:
 | 
			
		||||
    - name: GOOGLE_APPLICATION_CREDENTIALS
 | 
			
		||||
      value: "/etc/gel_secrets/gcp_service_account.json"
 | 
			
		||||
  extraVolumeMounts:
 | 
			
		||||
    - name: gel-secrets
 | 
			
		||||
      mountPath: "/etc/gel_secrets"
 | 
			
		||||
  extraVolumes:
 | 
			
		||||
    - name: gel-secrets
 | 
			
		||||
      secret:
 | 
			
		||||
        secretName: gel-secrets
 | 
			
		||||
        items:
 | 
			
		||||
        - key: license.jwt
 | 
			
		||||
          path: license.jwt
 | 
			
		||||
        - key: gcp_service_account.json
 | 
			
		||||
          path: gcp_service_account.json
 | 
			
		||||
 | 
			
		||||
gateway:
 | 
			
		||||
  extraEnv:
 | 
			
		||||
    - name: GOOGLE_APPLICATION_CREDENTIALS
 | 
			
		||||
      value: "/etc/gel_secrets/gcp_service_account.json"
 | 
			
		||||
  extraVolumeMounts:
 | 
			
		||||
    - name: gel-secrets
 | 
			
		||||
      mountPath: "/etc/gel_secrets"
 | 
			
		||||
  extraVolumes:
 | 
			
		||||
    - name: gel-secrets
 | 
			
		||||
      secret:
 | 
			
		||||
        secretName: gel-secrets
 | 
			
		||||
        items:
 | 
			
		||||
        - key: license.jwt
 | 
			
		||||
          path: license.jwt
 | 
			
		||||
        - key: gcp_service_account.json
 | 
			
		||||
          path: gcp_service_account.json
 | 
			
		||||
							
								
								
									
										20
									
								
								opencloud/charts/loki/docs/examples/oss/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								opencloud/charts/loki/docs/examples/oss/README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
## Introduction
 | 
			
		||||
This example gives you an example or getting started overrides value file for deploying Loki (OSS) using the Simple Scalable architecture in GKE and using GCS
 | 
			
		||||
 | 
			
		||||
## Installation of Helm Chart
 | 
			
		||||
These instructions assume you have already have access to a Kubernetes cluster, GCS Bucket and GCP Service Account which has read/write permissions to that GCS Bucket.
 | 
			
		||||
 | 
			
		||||
### Populate Secret Values
 | 
			
		||||
Populate the examples/enterprise/enterprise-secrets.yaml so that:
 | 
			
		||||
- The gcp_service_account.json secret has the contents of your GCP Service Account JSON key
 | 
			
		||||
 | 
			
		||||
Deploy the secrets file to your k8s cluster.
 | 
			
		||||
 | 
			
		||||
`kubectl apply -f loki-secrets.yaml`
 | 
			
		||||
 | 
			
		||||
### Configure the Helm Chart
 | 
			
		||||
Open examples/enterprise/overides-oss-gcs.yaml and replace `{YOUR_GCS_BUCKET}` with the name of your GCS bucket. If there are other things you'd like to configure, view the core [Values.yaml file](https://github.com/grafana/loki/blob/main/production/helm/loki/values.yaml) and override anything else you need to within the overrides-enterprise-gcs.yaml file.
 | 
			
		||||
 | 
			
		||||
### Install the Helm chart
 | 
			
		||||
 | 
			
		||||
`helm upgrade --install --values {PATH_TO_YOUR_OVERRIDES_YAML_FILE} {YOUR_RELEASE_NAME} grafana/loki-simple-scalable --namespace {KUBERNETES_NAMESPACE}`
 | 
			
		||||
							
								
								
									
										10
									
								
								opencloud/charts/loki/docs/examples/oss/oss-secrets.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								opencloud/charts/loki/docs/examples/oss/oss-secrets.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
apiVersion: v1
 | 
			
		||||
kind: Secret
 | 
			
		||||
metadata:
 | 
			
		||||
  name: loki-secrets
 | 
			
		||||
type: Opaque
 | 
			
		||||
stringData:
 | 
			
		||||
  gcp_service_account.json: |
 | 
			
		||||
    {
 | 
			
		||||
      GCP_SERVICE_ACCOUNT_JSON_HERE
 | 
			
		||||
    }
 | 
			
		||||
@@ -0,0 +1,77 @@
 | 
			
		||||
enterprise:
 | 
			
		||||
  enabled: false
 | 
			
		||||
  adminApi:
 | 
			
		||||
    enabled: false
 | 
			
		||||
  useExternalLicense: false
 | 
			
		||||
 | 
			
		||||
  config: |
 | 
			
		||||
    admin_client:
 | 
			
		||||
      storage:
 | 
			
		||||
        gcs:
 | 
			
		||||
          bucket_name: {YOUR_GCS_BUCKET}
 | 
			
		||||
    auth:
 | 
			
		||||
      type: trust
 | 
			
		||||
    auth_enabled: false
 | 
			
		||||
    cluster_name: loki-logs
 | 
			
		||||
 | 
			
		||||
loki:
 | 
			
		||||
  auth_enabled: false
 | 
			
		||||
 | 
			
		||||
  commonConfig:
 | 
			
		||||
    path_prefix: /var/loki
 | 
			
		||||
    replication_factor: 3
 | 
			
		||||
 | 
			
		||||
  storage:
 | 
			
		||||
    type: gcs
 | 
			
		||||
    bucketNames:
 | 
			
		||||
      chunks: {YOUR_GCS_BUCKET}
 | 
			
		||||
      ruler: {YOUR_GCS_BUCKET}
 | 
			
		||||
      admin: {YOUR_GCS_BUCKET}
 | 
			
		||||
 | 
			
		||||
minio:
 | 
			
		||||
  enabled: false
 | 
			
		||||
 | 
			
		||||
write:
 | 
			
		||||
  extraEnv:
 | 
			
		||||
    - name: GOOGLE_APPLICATION_CREDENTIALS
 | 
			
		||||
      value: "/etc/loki_secrets/gcp_service_account.json"
 | 
			
		||||
  extraVolumeMounts:
 | 
			
		||||
    - name: loki-secrets
 | 
			
		||||
      mountPath: "/etc/loki_secrets"
 | 
			
		||||
  extraVolumes:
 | 
			
		||||
    - name: loki-secrets
 | 
			
		||||
      secret:
 | 
			
		||||
        secretName: loki-secrets
 | 
			
		||||
        items:
 | 
			
		||||
        - key: gcp_service_account.json
 | 
			
		||||
          path: gcp_service_account.json
 | 
			
		||||
 | 
			
		||||
read:
 | 
			
		||||
  extraEnv:
 | 
			
		||||
    - name: GOOGLE_APPLICATION_CREDENTIALS
 | 
			
		||||
      value: "/etc/loki_secrets/gcp_service_account.json"
 | 
			
		||||
  extraVolumeMounts:
 | 
			
		||||
    - name: loki-secrets
 | 
			
		||||
      mountPath: "/etc/loki_secrets"
 | 
			
		||||
  extraVolumes:
 | 
			
		||||
    - name: loki-secrets
 | 
			
		||||
      secret:
 | 
			
		||||
        secretName: loki-secrets
 | 
			
		||||
        items:
 | 
			
		||||
        - key: gcp_service_account.json
 | 
			
		||||
          path: gcp_service_account.json
 | 
			
		||||
 | 
			
		||||
gateway:
 | 
			
		||||
  extraEnv:
 | 
			
		||||
    - name: GOOGLE_APPLICATION_CREDENTIALS
 | 
			
		||||
      value: "/etc/loki_secrets/gcp_service_account.json"
 | 
			
		||||
  extraVolumeMounts:
 | 
			
		||||
    - name: loki-secrets
 | 
			
		||||
      mountPath: "/etc/loki_secrets"
 | 
			
		||||
  extraVolumes:
 | 
			
		||||
    - name: loki-secrets
 | 
			
		||||
      secret:
 | 
			
		||||
        secretName: loki-secrets
 | 
			
		||||
        items:
 | 
			
		||||
        - key: gcp_service_account.json
 | 
			
		||||
          path: gcp_service_account.json
 | 
			
		||||
		Reference in New Issue
	
	Block a user