Skip to content

Commit

Permalink
Add horizon charts
Browse files Browse the repository at this point in the history
  • Loading branch information
fightdou committed Jul 31, 2022
1 parent 6962aae commit 736baec
Show file tree
Hide file tree
Showing 17 changed files with 945 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/install-openstack-horizon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Install horizon Chart

on:
pull_request:
paths:
- 'charts/horizon/**'

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Fetch history
run: git fetch --prune --unshallow

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.1

- name: Create kind cluster
uses: helm/kind-action@v1.2.0

- name: Run chart-testing (install)
run: ct install --target-branch main --charts charts/horizon --debug
23 changes: 23 additions & 0 deletions charts/horizon/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v2
description: Openstack horizon service
name: horizon
version: 1.0.0
home: https://github.com/kungze/kolla-helm
maintainers:
- name: Kungze
dependencies:
- name: common
repository: https://kungze.github.io/kolla-helm
version: 1.x.x
38 changes: 38 additions & 0 deletions charts/horizon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# horizon

The chart used to deploy openstack horizon project

## TL;DR

```shell
$ helm repo add kolla-helm https://kungze.github.io/kolla-helm
$ helm install horizon kolla-helm/horizon
```

## Parameters

### Cluster Paramters

| Name | Form title | Description | Value |
| ----------------------- | --------------------- | -------------------------------------------- | --------------- |
| `cluster_domain_suffix` | Cluster Domain Suffix | The doamin suffix of the current k8s cluster | `cluster.local` |


### Image Parameters

| Name | Form title | Description | Value |
| ---------------- | ----------------- | ----------------------------------------------- | -------------- |
| `imageRegistry` | Image Registry | The registry address of openstack kolla image | `docker.io` |
| `imageNamespace` | Image Namespace | The registry namespace of openstack kolla image | `kolla` |
| `openstackTag` | Openstack version | The openstack version | `yoga` |
| `pullPolicy` | Pull Policy | The image pull policy | `IfNotPresent` |


### Deployment Parameters

| Name | Form title | Description | Value |
| ---------------------- | ----------------------- | ------------------------------------------------------------------------ | --------- |
| `replicaCount` | | Number of cinder replicas to deploy (requires ReadWriteMany PVC support) | `1` |
| `serviceAccountName` | | ServiceAccount name | `horizon` |
| `enableLivenessProbe` | Enable Liveness Probe | Whether or not enable liveness probe | `true` |
| `enableReadinessProbe` | Enable Readliness Probe | Whether or not enable readiness probe | `true` |
9 changes: 9 additions & 0 deletions charts/horizon/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{/* vim: set filetype=mustache: */}}

{{/*
Return the proper glance api image name
*/}}
{{- define "horizon.image" -}}
{{ $repository := "ubuntu-binary-horizon" }}
{{- include "common.images.image" (dict "registry" .Values.imageRegistry "namespace" .Values.imageNamespace "repository" $repository "tag" .Values.openstackTag) }}
{{- end -}}
Empty file.
31 changes: 31 additions & 0 deletions charts/horizon/templates/conf/_horizon.conf.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Listen 0.0.0.0:8181

ServerSignature Off
ServerTokens Prod
TraceEnable off

<VirtualHost *:8181>
LogLevel warn
ErrorLog /var/log/kolla/horizon/horizon.log
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
CustomLog /var/log/kolla/horizon/horizon-access.log logformat

WSGIScriptReloading On
WSGIDaemonProcess horizon-http processes=5 threads=1 user=horizon group=horizon display-name=%{GROUP} python-path=/usr/share/openstack-dashboard
WSGIProcessGroup horizon-http
WSGIScriptAlias /horizon /usr/share/openstack-dashboard/openstack_dashboard/wsgi.py
WSGIPassAuthorization On
WSGIApplicationGroup %{GLOBAL}
Alias /horizon/static /var/lib/openstack-dashboard/static


<Location "/">
Require all granted
</Location>

Alias /static /var/lib/openstack-dashboard/static
<Location "/static">
SetHandler None
</Location>

</VirtualHost>
23 changes: 23 additions & 0 deletions charts/horizon/templates/conf/_horizon.json.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"command": "/usr/sbin/apache2 -DFOREGROUND",
"config_files": [
{
"source": "/var/lib/kolla/config_files/horizon.conf",
"dest": "/etc/apache2/conf-enabled/000-default.conf",
"owner": "horizon",
"perm": "0600"
},
{
"source": "/var/lib/kolla/config_files/local_settings",
"dest": "/etc/openstack-dashboard/local_settings",
"owner": "horizon",
"perm": "0600"
},
{
"source": "/var/lib/kolla/config_files/custom_local_settings",
"dest": "/etc/openstack-dashboard/custom_local_settings",
"owner": "horizon",
"perm": "0600"
}
]
}
Loading

0 comments on commit 736baec

Please sign in to comment.