项目作者: bosh-loki

项目描述 :
Loki BOSH Release
高级语言: Shell
项目地址: git://github.com/bosh-loki/loki-boshrelease.git
创建时间: 2019-04-19T09:55:36Z
项目社区:https://github.com/bosh-loki/loki-boshrelease

开源协议:Apache License 2.0

下载


Loki BOSH Release

This is a BOSH release for Loki, and Grafana.

Get Started

Assuming you’ve installed BOSH CLI and had a running BOSH Director.

For example:

  1. $ bosh --version
  2. version 5.5.1-7850ac98-2019-05-21T22:28:39Z
  3. Succeeded
  4. $ bosh env
  5. Using environment '10.197.81.30' as client 'admin'
  6. Name bosh-1
  7. UUID a1dc5a23-b10d-40ba-8391-085d612f90e0
  8. Version 270.2.0 (00000000)
  9. Director Stemcell ubuntu-xenial/315.64
  10. CPI vsphere_cpi
  11. Features compiled_package_cache: disabled
  12. config_server: enabled
  13. local_dns: enabled
  14. power_dns: disabled
  15. snapshots: disabled
  16. User admin
  17. Succeeded

Note: please follow the docs here for how to spin up a BOSH Director.

Install Loki BOSH Release

  1. $ git clone https://github.com/bosh-loki/loki-boshrelease.git
  2. $ pushd loki-boshrelease \
  3. && bosh create-release --force && bosh upload-release \
  4. && bosh -d loki deploy manifests/loki.yml \
  5. && popd
  6. $ bosh -d loki vms
  7. Using environment '10.197.81.30' as client 'admin'
  8. Task 318. Done
  9. Deployment 'loki'
  10. Instance Process State AZ IPs VM CID VM Type Active
  11. database/82519de7-f196-4e15-a8fa-bef7d69a1134 running z1 10.197.81.51 vm-3d21f0d7-e944-4f59-871b-0c6e213cb1ea default true
  12. grafana/b897d579-b610-43ab-a2f3-ba82d8d1e286 running z1 10.197.81.52 vm-d6a5c669-b0ad-4255-b6c1-765640f1ee87 default true
  13. loki/b96a577d-9e4c-48e3-a019-27c8a2b89e81 running z1 10.197.81.50 vm-ee071874-d04a-422b-847a-a44c172d53b8 default true
  14. 3 vms
  15. Succeeded

Access Loki Grafana

Access it through: http://<GRAFANA_IP>:3000.
So in my case it’s: http://10.197.81.52:3000/

But what’s the login credential?
Well, above deployment indicates that the BOSH Director has integrated with the Credential Management tool — in my case, it’s CredHub.

So let’s get back the generated credentials:

  1. $ credhub find | grep loki
  2. - name: /bosh-1/loki/grafana_secret_key
  3. - name: /bosh-1/loki/grafana_password
  4. - name: /bosh-1/loki/postgres_grafana_password
  5. - name: /bosh-1/loki/prometheus_password
  6. $ credhub get -n /bosh-1/loki/grafana_password
  7. id: 618369c9-f446-48b7-a218-30f6cfad8f19
  8. name: /bosh-1/loki/grafana_password
  9. type: password
  10. value: YEWlKixs72Hfx886xNvJv9sU2I5Z8K
  11. version_created_at: "2019-07-31T05:59:08Z"

So you can login Grafana by: admin/YEWlKixs72Hfx886xNvJv9sU2I5Z8K

Note: Of course, you can set your own credentials by either of the two ways:

  1. (Recommended) Set them in CredHub first, by using commands like credhub set -n /bosh-1/loki/grafana_password -t password, and the deployment will just use them without the need to generate;
  2. Set them directly through the bosh -d loki deploy xxx -v grafana_password=MySuperPassword. But it’s not recommended as these credentails can be retrieved back in plain text if you run bosh -d loki manifest.

Tear Down

To remove the deployment:

  1. $ bosh -d loki delete-deployment