Skip to content

Commit

Permalink
Add horizon charts
Browse files Browse the repository at this point in the history
  • Loading branch information
fightdou committed Aug 1, 2022
1 parent 6962aae commit 4d2a5fc
Show file tree
Hide file tree
Showing 17 changed files with 1,012 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/install-openstack-horizon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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: Install password chart
run:
helm install openstack-password charts/password --namespace openstack-keystone

- name: Install openstack-dep chart
run: |
helm dependency build charts/openstack-dep
helm install openstack-dependency charts/openstack-dep --namespace openstack-keystone --wait --timeout 600s
- name: Install keystone chart
run: |
helm dependency build charts/keystone
helm install openstack-keystone charts/keystone --namespace openstack-keystone --wait --timeout 600s
- name: Run chart-testing (install)
run: ct install --target-branch main --charts charts/horizon --namespace openstack-keystone --debug --helm-extra-args "--timeout 600s"
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
56 changes: 56 additions & 0 deletions charts/horizon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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` |


### Dependency Parameters

| Name | Form title | Description | Value |
| --------------------- | --------------------- | --------------------------------------- | ---------------------- |
| `openstackDepRelease` | Openstack-dep Release | The release name of openstack-dep chart | `openstack-dependency` |
| `passwordRelease` | Password Release | The release name of password chart | `openstack-password` |
| `keystoneRelease` | keystone Release | The release name of keystone chart | `openstack-keystone` |


### Image Parameters

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


### Deployment Parameters

| Name | Form title | Description | Value |
| ---------------------- | ----------------------- | ------------------------------------------------------------------------ | --------- |
| `replicaCount` | Replica Number | Number of cinder replicas to deploy (requires ReadWriteMany PVC support) | `1` |
| `serviceAccountName` | ServiceAccount name | 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` |


### Ingress Parameters

| Name | Form title | Description | Value |
| ---------------------- | ------------- | --------------------------------------------------------------------------------------- | ----------------- |
| `ingress.enabled` | Ingress | Whether or not create ingress for keystone service | `true` |
| `ingress.ingressClass` | Ingress Class | Ingress Class Name | `openstack-nginx` |
| `ingress.path` | Path Prefix | Ingress will match the path prefix, and forward the matched request to keystone service | `horizon` |
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 4d2a5fc

Please sign in to comment.