Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into gatewayapi
Browse files Browse the repository at this point in the history
  • Loading branch information
sulochan committed Mar 19, 2024
2 parents aba7336 + 1fc182c commit f007004
Show file tree
Hide file tree
Showing 18 changed files with 2,630 additions and 48 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/kustomize-prometheus-postgres-exporter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Kustomize GitHub Actions for Prometheus PostgresSQL exporter

on:
pull_request:
paths:
- kustomize/prometheus-postgres-exporter/**
- .github/workflows/kustomize-prometheus-postgres-exporter.yaml
jobs:
kustomize:
name: Kustomize
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: azure/setup-helm@v3
with:
version: latest
token: "${{ secrets.GITHUB_TOKEN }}"
id: helm
- name: Kustomize Install
working-directory: /usr/local/bin/
run: |
if [ ! -f /usr/local/bin/kustomize ]; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
fi
- name: Run Kustomize Build
run: |
kustomize build kustomize/prometheus-postgres-exporter/ --enable-helm --helm-command ${{ steps.helm.outputs.helm-path }} > /tmp/rendered.yaml
- name: Return Kustomize Build
uses: actions/upload-artifact@v2
with:
name: kustomize-prometheus-postgres-exporter-artifact
path: /tmp/rendered.yaml
6 changes: 3 additions & 3 deletions docs/genestack-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

# What is Genestack?

Genestack is a complete operations and deployment ecosystem for Kubernetes and OpenStack. The purpose is of
Genestack is a complete operations and deployment ecosystem for Kubernetes and OpenStack. The purpose of
this project is to allow hobbyists, operators, and cloud service providers the ability to build, scale, and
leverage Open-Infrastructure in new and exciting ways.

Genestack’s inner workings are a blend dark magic — crafted with [Kustomize](https://kustomize.io) and
Genestack’s inner workings are a blend of dark magic — crafted with [Kustomize](https://kustomize.io) and
[Helm](https://helm.sh). It’s like cooking with cloud. Want to spice things up? Tweak the
`kustomization.yaml` files or add those extra 'toppings' using Helm's style overrides. However, the
platform is ready to go with batteries included.
Expand All @@ -18,7 +18,7 @@ to manage cloud infrastructure in the way you need it.

## Getting Started

Before you can do anything we need to get the code. Because we've sold our soul to the submodule devil, you're going to need to recursively clone the repo into your location.
Before you can do anything, you need to get the code. Because we've sold our soul to the submodule devil, you're going to need to recursively clone the repo into your location.

!!! info

Expand Down
80 changes: 80 additions & 0 deletions docs/openstack-ceilometer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Deploy Ceilometer

## Create Secrets

```shell
kubectl --namespace openstack create secret generic ceilometer-keystone-admin-password \
--type Opaque \
--from-literal=password="$(< /dev/urandom tr -dc _A-Za-z0-9 | head -c${1:-32};echo;)"
kubectl --namespace openstack create secret generic ceilometer-keystone-test-password \
--type Opaque \
--from-literal=password="$(< /dev/urandom tr -dc _A-Za-z0-9 | head -c${1:-32};echo;)"
kubectl --namespace openstack create secret generic ceilometer-rabbitmq-password \
--type Opaque \
--from-literal=password="$(< /dev/urandom tr -dc _A-Za-z0-9 | head -c${1:-32};echo;)"
```

## Run the package deployment

```shell
cd /opt/genestack/submodules/openstack-helm
helm upgrade --install ceilometer ./ceilometer \
--namespace=openstack \
--wait \
--timeout 10m \
-f /opt/genestack/helm-configs/ceilometer/ceilometer-helm-overrides.yaml \
--set endpoints.identity.auth.admin.password="$(kubectl --namespace openstack get secret keystone-admin -o jsonpath='{.data.password}' | base64 -d)" \
--set endpoints.identity.auth.ceilometer.password="$(kubectl --namespace openstack get secret ceilometer-keystone-admin-password -o jsonpath='{.data.password}' | base64 -d)" \
--set endpoints.identity.auth.test.password="$(kubectl --namespace openstack get secret ceilometer-keystone-test-password -o jsonpath='{.data.password}' | base64 -d)" \
--set endpoints.oslo_messaging.auth.admin.username="$(kubectl --namespace openstack get secret rabbitmq-default-user -o jsonpath='{.data.username}' | base64 -d)" \
--set endpoints.oslo_messaging.auth.admin.password="$(kubectl --namespace openstack get secret rabbitmq-default-user -o jsonpath='{.data.password}' | base64 -d)" \
--set endpoints.oslo_messaging.auth.ceilometer.password="$(kubectl --namespace openstack get secret ceilometer-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)" \
--set conf.ceilometer.oslo_messaging_notifications.transport_url="\
rabbit://ceilometer:$(kubectl --namespace openstack get secret ceilometer-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)@rabbitmq.openstack.svc.cluster.local:5672/ceilometer"\
--set conf.ceilometer.notification.messaging_urls.values="{\
rabbit://ceilometer:$(kubectl --namespace openstack get secret ceilometer-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)@rabbitmq.openstack.svc.cluster.local:5672/ceilometer,\
rabbit://cinder:$(kubectl --namespace openstack get secret cinder-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)@rabbitmq.openstack.svc.cluster.local:5672/cinder,\
rabbit://glance:$(kubectl --namespace openstack get secret glance-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)@rabbitmq.openstack.svc.cluster.local:5672/glance,\
rabbit://heat:$(kubectl --namespace openstack get secret heat-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)@rabbitmq.openstack.svc.cluster.local:5672/heat,\
rabbit://keystone:$(kubectl --namespace openstack get secret keystone-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)@rabbitmq.openstack.svc.cluster.local:5672/keystone,\
rabbit://neutron:$(kubectl --namespace openstack get secret neutron-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)@rabbitmq.openstack.svc.cluster.local:5672/neutron,\
rabbit://nova:$(kubectl --namespace openstack get secret nova-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)@rabbitmq.openstack.svc.cluster.local:5672/nova}"
```

!!! tip

In a production like environment you may need to include production specific files like the example variable file found in `helm-configs/prod-example-openstack-overrides.yaml`.

## Verify Ceilometer Workers

As there is no Ceilometer API, we will do a quick validation against the
Gnocchi API via a series of `openstack metric` commands to confirm that
Ceilometer workers are ingesting metric and event data then persisting them
storage.

### Verify metric resource types exist

The Ceilomter db-sync job will create the various resource types in Gnocchi.
Without them, metrics can't be stored, so let's verify they exist. The
output should include named resource types and some attributes for resources
like `instance`, `instance_disk`, `network`, `volume`, etc.

```shell
kubectl exec -it openstack-admin-client -n openstack -- openstack metric resource-type list
```

### Verify metric resources

Confirm that resources are populating in Gnocchi

```shell
kubectl exec -it openstack-admin-client -n openstack -- openstack metric resource list
```

### Verify metrics

Confirm that metrics can be retrieved from Gnocchi

```shell
kubectl exec -it openstack-admin-client -n openstack -- openstack metric list
```
18 changes: 18 additions & 0 deletions docs/prometheus-postgres-exporter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# PostgresSQL Exporter

PostgresSQL Exporter is used to expose metrics from a running PostgresSQL deployment.

!!! note

To deploy metric exporters you will first need to deploy the Prometheus Operator, see: ([Deploy Prometheus](prometheus.md)).

## Installation

Install the PostgresSQL Exporter

``` shell
kubectl kustomize --enable-helm /opt/genestack/kustomize/prometheus-postgres-exporter | kubectl -n openstack apply -f -
```

!!! success
If the installation is successful, you should see the exporter pod in the openstack namespace.
3 changes: 1 addition & 2 deletions docs/prometheus-rabbitmq-exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ RabbitMQ Exporter is used to expose metrics from a running RabbitMQ deployment.
Install the RabbitMQ Exporter

``` shell
kubectl kustomize --enable-helm /opt/genestack/kustomize/prometheus-rabbitmq-exporter | \
kubectl -n openstack apply --server-side -f -
kubectl kustomize --enable-helm /opt/genestack/kustomize/prometheus-rabbitmq-exporter | kubectl -n openstack apply --server-side -f -
```

!!! success
Expand Down
Loading

0 comments on commit f007004

Please sign in to comment.