项目作者: Kupenstack

项目描述 :
Helm charts generated from openstack-helm project
高级语言:
项目地址: git://github.com/Kupenstack/osh-charts.git
创建时间: 2021-08-10T00:55:18Z
项目社区:https://github.com/Kupenstack/osh-charts

开源协议:Apache License 2.0

下载


Add this helm repo:

  1. helm repo add osh https://charts.kupenstack.io

OSH-Charts

OpenStack-Helm charts repository.

Generated using upstream repository:


The Openstack-Helm project provides a collection of Helm charts that simply, resiliently, and flexibly deploy OpenStack as containers on Kubernetes. KupenStack uses Openstack-Helm charts for deploying and managing Openstack cluster. In this page we will look at how to manually deploy these helm charts to deploy Openstack cluster on Kubernetes.

Tabel of contents:

Before we begin

Before we begin, we need to have a kubernetes cluster on top of which we will deploy Openstack. For this tutorail we will use kind for deploying k8s cluster. Also, note that we are using k8s version 1.19.

Deploy k8s cluster using command:

  1. kind create cluster --image kindest/node:v1.21.1

Now, we will add few labels to our k8s nodes:

We will add label openstack-control-plane=enabled to all control nodes we want to keep. linuxbridge=enabled label to nodes that we want to keep linux bridge as provider for networking. And openstack-compute-node=enabled label to all nodes we want to keep as compute node.

In our case for single node kind cluster the commands will be as follow:

  1. kubectl label node kind-control-plane openstack-control-plane=enabled;
  2. kubectl label node kind-control-plane linuxbridge=enabled;
  3. kubectl label node kind-control-plane openstack-compute-node=enabled

Deploy Ingress

First we start by deploying ingress,

Deploy ingress in namespace kube-system:

  1. helm upgrade --install ingresskubesystem osh/ingress --namespace kube-system --values ingressKubeSystem.yaml

Where ingressKubesystem.yaml has values:

  1. deployment:
  2. mode: cluster
  3. type: DaemonSet
  4. network:
  5. host_namespace: true

Create Openstack namespace:

  1. kubectl create ns openstack

Deploy ingress in our openstack namespace:

  1. helm upgrade --install ingress osh/ingress --namespace openstack

Deploy Mariadb

mariadb.yaml:

  1. pod:
  2. replicas:
  3. server: 1
  4. ingress: 1
  5. volume:
  6. enabled: false
  7. use_local_path_for_single_pod_cluster:
  8. enabled: true
  1. helm upgrade --install mariadb osh/mariadb --namespace openstack --values mariadb.yaml

Deploy Memcached

  1. helm upgrade --install memcached osh/memcached --namespace openstack

Deploy RabbitMQ

rabbitmq.yaml:

  1. pod:
  2. replicas:
  3. server: 1
  4. volume:
  5. enabled: false
  1. helm upgrade --install rabbitmq osh/rabbitmq --namespace openstack --values rabbitmq.yaml

Deploy Keystone

keystone.yaml:

  1. pod:
  2. replicas:
  3. api: 1
  1. helm upgrade --install keystone osh/keystone --namespace openstack --values keystone.yaml

Deploy Glance

First we will have to create PV for glance to use:

glance-pv.yaml:

  1. apiVersion: v1
  2. kind: PersistentVolume
  3. metadata:
  4. name: glance-pv
  5. spec:
  6. storageClassName: general
  7. capacity:
  8. storage: 2Gi
  9. accessModes:
  10. - ReadWriteOnce
  11. hostPath:
  12. path: "/mnt/glance"
  1. kubectl apply -f glance-pv.yaml

Then we install glance helm chart with values:

glance.yaml

  1. storage: pvc
  2. pod:
  3. replicas:
  4. api: 1
  5. registry: 1
  1. helm upgrade --install glance osh/glance --namespace openstack --values glance.yaml

Deploy Horizon

horizon.yaml:

  1. pod:
  2. replicas:
  3. server: 1
  1. helm upgrade --install horizon osh/horizon --namespace openstack --values horizon.yaml

Let’s add a nodeport to view horizon dashboard from outside the cluster.

  1. kind: Service
  2. apiVersion: v1
  3. metadata:
  4. name: horizon-nodeport
  5. namespace: openstack
  6. spec:
  7. type: NodePort
  8. ports:
  9. - port: 80
  10. nodePort: 32020
  11. selector:
  12. application: horizon
  13. component: server
  1. kubectl apply -f horizon-nodeport.yaml

Deploy Libvirt, Neutron, Nova, Placement

libvirt.yaml:

  1. network:
  2. backend:
  3. - linuxbridge
  4. conf:
  5. ceph:
  6. enabled: false
  1. helm upgrade --install libvirt osh/libvirt --namespace openstack --values libvirt.yaml

neutron.yaml:

  1. network:
  2. backend:
  3. - linuxbridge
  4. conf:
  5. neutron:
  6. DEFAULT:
  7. interface_driver: linuxbridge
  8. dhcp_agent:
  9. DEFAULT:
  10. interface_driver: linuxbridge
  11. l3_agent:
  12. DEFAULT:
  13. interface_driver: linuxbridge
  1. helm upgrade --install neutron osh/neutron --namespace openstack --values neutron.yaml

nova.yaml:

  1. network:
  2. backend:
  3. - linuxbridge
  4. pod:
  5. replicas:
  6. osapi: 1
  7. conductor: 1
  8. consoleauth: 1
  9. bootstrap:
  10. wait_for_computes:
  11. enabled: true
  12. conf:
  13. ceph:
  14. enabled: false
  15. nova:
  16. libvirt:
  17. virt_type: qemu
  18. cpu_mode: none
  19. manifests:
  20. cron_job_cell_setup: false
  21. cron_job_service_cleaner: false
  22. statefulset_compute_ironic: false
  23. deployment_placement: false
  24. ingress_placement: false
  25. job_db_init_placement: false
  26. job_ks_placement_endpoints: false
  27. job_ks_placement_service: false
  28. job_ks_placement_user: false
  29. pdb_placement: false
  30. secret_keystone_placement: false
  31. service_ingress_placement: false
  32. service_placement: false
  1. helm upgrade --install nova osh/nova --namespace openstack --values nova.yaml

placement.yaml:

  1. pod:
  2. replicas:
  3. api: 1
  1. helm upgrade --install placement osh/placement --namespace openstack --values placement.yaml

Using Horizon Dashboard

Now our Openstack deployment is complete and we can use it. For viewing horizon in web browser we can view it on nodeIP:PortNumber which in our case we can get by:

  1. kubectl get nodes -o wide
  2. NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
  3. kind-control-plane Ready master 166m v1.19.1 172.18.0.2 <none> Ubuntu Groovy Gorilla (development branch) 5.13.0-40-generic containerd://1.4.0

Open 172.18.0.2:32020 in browser to see horizon dashboard:

img

To login use:

Domain: default

Username: admin

Password: password