基于openstack helm在kubernetes中部署单节点openstack

helm部署单节点openstack

OpenStack-Helm 的目标是提供一系列 Helm charts,以便在 Kubernetes 上简单、弹性、灵活地部署 OpenStack 及相关服务。

OpenStack 可以在独立的 Kubernetes 集群之上运行,而不是在现有基础设施之上运行。在此设置中,OpenStack 服务作为容器部署在 Kubernetes 集群中,使组织能够利用 Kubernetes 提供的可扩展性、灵活性和易于管理性,同时仍然使用 OpenStack 来满足其云计算需求。

相关项目介绍:

  • loci项目,即openstack-helm依赖的openstack组件容器镜像制作
  • openstack-helm-images项目,即openstack-helm依赖的其它组件容器镜像制作,该项目使用loci项目来制作openstack组件容器镜像;该项目使用loci项目来制作openstack组件容器镜像
  • openstack-helm-infra项目,涉及主机配置、k8s集群部署
  • openstack-helm项目,涉及openstack相关组件chart定义、组件部署
    在这里插入图片描述

项目地址:

loci:https://github.com/openstack/loci

openstack-helm-images:https://github.com/openstack/openstack-helm-images

openstack-helm-infra:https://github.com/openstack/openstack-helm-infra

openstack-helm:https://github.com/openstack/openstack-helm

官方文档:

https://docs.openstack.org/openstack-helm/latest/

环境准备

官方文档支持单节点部署,多节点部署,以及基于NFS、Ceph的存储部署,本示例基于单节点+NFS方式进行部署。

节点规划,以1个master为例,单个网卡,单个根磁盘。

IP AddressRoleCPUMemory
192.168.72.50master1816G

操作系统及组件版本信息:

  • 操作系统:Ubuntu 22.04
  • Kubernetes:v1.27.3
  • containerd:v1.6.21
  • 网络插件:flannel

完整部署的建议最低系统要求是:

  • 16GB 内存
  • 8核
  • 48GB硬盘

本示例在已有kubernetes集群之上部署openstack,需要提前自行部署kubernetes,kubernetes节点信息如下:

root@ubuntu:~# kubectl get nodes -o wide
NAME     STATUS   ROLES           AGE   VERSION   INTERNAL-IP     EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION      CONTAINER-RUNTIME
ubuntu   Ready    control-plane   22h   v1.27.3   192.168.72.50   <none>        Ubuntu 22.04.2 LTS   5.15.0-76-generic   containerd://1.6.21

查看pods状态

root@ubuntu:~# kubectl get pods -A
NAMESPACE        NAME                                           READY   STATUS    RESTARTS      AGE
kube-flannel     kube-flannel-ds-b25hf                          1/1     Running   0             8m44s
kube-system      coredns-5d78c9869d-b5fgj                       1/1     Running   0             9m39s
kube-system      coredns-5d78c9869d-wqhth                       1/1     Running   0             9m38s
kube-system      etcd-ubuntu                                    1/1     Running   0             9m53s
kube-system      kube-apiserver-ubuntu                          1/1     Running   0             9m53s
kube-system      kube-controller-manager-ubuntu                 1/1     Running   2 (64s ago)   9m53s
kube-system      kube-proxy-klqqq                               1/1     Running   0             9m39s
kube-system      kube-scheduler-ubuntu                          1/1     Running   2 (65s ago)   9m55s

为kubernetes节点打上标签

kubectl label nodes ubuntu openstack-control-plane=enabled
kubectl label nodes ubuntu openstack-compute-node=enabled
kubectl label nodes ubuntu openvswitch=enabled

OpenStack-Helm 各个服务的 endpoints URL 都是以 *.openstack.svc.cluster.local 域名的形式,配置本地hosts解析

cat >>/etc/hosts<<EOF
192.168.72.50 keystone.openstack.svc.cluster.local
192.168.72.50 heat.openstack.svc.cluster.local
192.168.72.50 glance.openstack.svc.cluster.local
192.168.72.50 nova.openstack.svc.cluster.local
192.168.72.50 neutron.openstack.svc.cluster.local
EOF

部署前置要求

参考:https://docs.openstack.org/openstack-helm/latest/install/common-requirements.html

参考:https://docs.openstack.org/openstack-helm/latest/install/developer/requirements-and-host-config.html

在主机或主节点上,根据需要安装最新版本的 Git、CA Certs & Make

sudo apt-get update
sudo apt-get install --no-install-recommends -y \
        ca-certificates \
        git \
        make \
        jq \
        nmap \
        curl \
        uuid-runtime \
        bc \
        python3-pip

克隆包含 OpenStack-Helm chat的git仓库:

git clone https://opendev.org/openstack/openstack-helm-infra.git
git clone https://opendev.org/openstack/openstack-helm.git

定义openstack安装版本,本示例为zed

$ cd openstack-helm
$ cat tools/deployment/common/setup-client.sh | grep OPENSTACK_RELEASE
  -c${UPPER_CONSTRAINTS_FILE:=https://releases.openstack.org/constraints/upper/${OPENSTACK_RELEASE:-zed}} \

$ cat tools/deployment/common/get-values-overrides.sh | grep OPENSTACK_RELEASE:
: "${OPENSTACK_RELEASE:="zed"}"

提前创建命名空间

kubectl create ns openstack
kubectl create ns nfs
kubectl create ns ceph

安装openstack客户端

参考:https://docs.openstack.org/openstack-helm/latest/install/developer/kubernetes-and-common-setup.html

配置国内pip源

mkdir ~/.pip
cat > ~/.pip/pip.conf << EOF 
[global]
trusted-host=mirrors.aliyun.com
index-url=https://mirrors.aliyun.com/pypi/simple/
EOF

解决依赖包问题:x86_64-linux-gnu-gcc No such file or directory

apt install -y build-essential python3-dev

可以通过直接运行脚本来执行此步骤:

$ cd openstack-helm
$ ./tools/deployment/developer/common/020-setup-client.sh

验证客户端安装

root@ubuntu:~# openstack --version
openstack 6.0.0

安装 ingress controller

可以通过直接运行脚本来执行此步骤:

./tools/deployment/component/common/ingress.sh

查看创建的pods

root@ubuntu:~# kubectl -n openstack get pods -l application=ingress
NAME                                  READY   STATUS    RESTARTS   AGE
ingress-7ffbc58c5b-nfl7l              1/1     Running   0          20h
ingress-error-pages-7b9b69bc7-jk2dl   1/1     Running   0          20h

安装 NFS Provisioner

参考:https://docs.openstack.org/openstack-helm/latest/install/developer/deploy-with-nfs.html

可以通过直接运行脚本来执行此步骤:

./tools/deployment/developer/nfs/040-nfs-provisioner.sh

查看创建的pods

root@ubuntu:~# kubectl -n nfs get pods -l application=nfs
NAME                               READY   STATUS    RESTARTS        AGE
nfs-provisioner-544dbbb76f-8h5v2   1/1     Running   1 (5h53m ago)   16h

查看创建的storageclass

root@ubuntu:~# kubectl get sc
NAME      PROVISIONER           RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
general   nfs/nfs-provisioner   Delete          Immediate           false                  15h

所有节点安装nfs客户端

apt install -y nfs-common

安装 MariaDB

可以通过直接运行脚本来执行此步骤:

./tools/deployment/developer/nfs/050-mariadb.sh

查看部署的mariadb pods

root@ubuntu:~# kubectl -n openstack get pods -l application=mariadb
NAME                                           READY   STATUS    RESTARTS   AGE
mariadb-ingress-5bc446f46d-qd6tt               1/1     Running   0          15h
mariadb-ingress-5bc446f46d-zzhw5               1/1     Running   0          15h
mariadb-ingress-error-pages-69479bc687-vmv6n   1/1     Running   0          15h
mariadb-server-0                               1/1     Running   0          15h

安装 RabbitMQ

可以通过直接运行脚本来执行此步骤:

./tools/deployment/developer/nfs/060-rabbitmq.sh

查看部署的rabbitmq pods

root@ubuntu:~# kubectl -n openstack get pods -l application=rabbitmq
NAME                          READY   STATUS      RESTARTS   AGE
rabbitmq-cluster-wait-858b9   0/1     Completed   0          15h
rabbitmq-rabbitmq-0           1/1     Running     0          15h
rabbitmq-rabbitmq-1           1/1     Running     0          15h

安装 Memcached

可以通过直接运行脚本来执行此步骤:

./tools/deployment/developer/nfs/070-memcached.sh

查看部署的memcached pods

root@ubuntu:~# kubectl -n openstack get pods -l application=memcached
NAME                                   READY   STATUS    RESTARTS   AGE
memcached-memcached-768976ddbc-27cc2   1/1     Running   0          15h

安装 Keystone

可以通过直接运行脚本来执行此步骤:

./tools/deployment/developer/nfs/080-keystone.sh

查看部署的keystone pods

root@ubuntu:~# kubectl -n openstack get pods -l application=keystone
NAME                                    READY   STATUS      RESTARTS   AGE
keystone-api-597bff77d9-vqqbn           1/1     Running     0          15h
keystone-bootstrap-tk25v                0/1     Completed   0          15h
keystone-credential-setup-94p5r         0/1     Completed   0          15h
keystone-db-init-w9ldx                  0/1     Completed   0          15h
keystone-db-sync-2z88l                  0/1     Completed   0          15h
keystone-domain-manage-6lmwd            0/1     Completed   0          15h
keystone-fernet-rotate-28218480-4x6zw   0/1     Completed   0          7h17m
keystone-fernet-setup-tqz6q             0/1     Completed   0          15h
keystone-rabbit-init-wzjqb              0/1     Completed   0          15h

安装 Heat

可以通过直接运行脚本来执行此步骤:

./tools/deployment/developer/nfs/090-heat.sh

查看部署的heat pods

root@ubuntu:~# kubectl -n openstack get pods -l application=heat
NAME                                 READY   STATUS      RESTARTS   AGE
heat-api-785d7b9c8c-7zr6m            1/1     Running     0          14h
heat-bootstrap-6h82r                 0/1     Completed   0          14h
heat-cfn-78dd5f6977-vpbwj            1/1     Running     0          14h
heat-db-init-hr68c                   0/1     Completed   0          14h
heat-db-sync-rjlzw                   0/1     Completed   0          14h
heat-domain-ks-user-shh9q            0/1     Completed   0          14h
heat-engine-7d64d4b567-v2xdn         1/1     Running     0          14h
heat-engine-cleaner-28218905-8755q   0/1     Completed   0          13m
heat-engine-cleaner-28218910-t5xz4   0/1     Completed   0          8m19s
heat-engine-cleaner-28218915-vz2gs   0/1     Completed   0          3m19s
heat-ks-endpoints-q2qgg              0/6     Completed   0          14h
heat-ks-service-p8gml                0/2     Completed   0          14h
heat-ks-user-q5pm6                   0/1     Completed   0          14h
heat-rabbit-init-7mfd4               0/1     Completed   0          14h
heat-trustee-ks-user-lll92           0/1     Completed   0          14h
heat-trusts-p4mx5                    0/1     Completed   0          14h

安装 Horizon

可以通过直接运行脚本来执行此步骤:

./tools/deployment/developer/nfs/100-horizon.sh

查看部署的horizon pods

root@ubuntu:~# kubectl -n openstack get pods -l application=horizon
NAME                       READY   STATUS      RESTARTS   AGE
horizon-55d5cc85c9-q24gt   1/1     Running     0          14h
horizon-db-init-k9lgn      0/1     Completed   0          14h
horizon-db-sync-85dgm      0/1     Completed   0          14h
horizon-test               0/1     Completed   0          14h

horizon-int 对应的就是 Dashboard 服务,它的类型是 NodePort 而且映射的端口号是 31000

安装 Glance

可以通过直接运行脚本来执行此步骤:

./tools/deployment/developer/nfs/120-glance.sh

其中/tmp/glance.yaml定义了glance使用的存储类型,values.yaml中支持的存储类型如下

# radosgw, rbd, swift or pvc
---
storage: swift

目前 Glance 支持几种 backend storage:

  • pvc: 一个简单的 Kubernetes PVC存储后端。
  • rbd: 使用 Ceph RBD 来存储 images。
  • radosgw: 使用 Ceph RGW 来存储 images。
  • swift: 另用 OpenStack switf 所提供的对象存储来存储 images.

查看部署的glance pods

root@ubuntu:~# kubectl -n openstack get pods -l application=glance
NAME                          READY   STATUS      RESTARTS   AGE
glance-api-85459565c7-zpqs9   1/1     Running     0          14h
glance-bootstrap-4k2d5        0/1     Completed   0          14h
glance-db-init-bj5xf          0/1     Completed   0          14h
glance-db-sync-zcrxj          0/1     Completed   0          14h
glance-ks-endpoints-9nqfw     0/3     Completed   0          14h
glance-ks-service-24w7s       0/1     Completed   0          14h
glance-ks-user-5dqs7          0/1     Completed   0          14h
glance-metadefs-load-pqn75    0/1     Completed   0          14h
glance-rabbit-init-t5w9c      0/1     Completed   0          14h
glance-storage-init-pqkph     0/1     Completed   0          14h

安装 OpenvSwitch

可以通过直接运行脚本来执行此步骤:

./tools/deployment/developer/nfs/140-openvswitch.sh

查看部署的openvswitch pods

root@ubuntu:~# kubectl -n openstack get pods -l application=openvswitch
NAME                READY   STATUS    RESTARTS   AGE
openvswitch-xxjxd   2/2     Running   0          14h

安装 Libvirt

可以通过直接运行脚本来执行此步骤:

./tools/deployment/developer/nfs/150-libvirt.sh

查看部署的libvirt pods

root@ubuntu:~# kubectl -n openstack get pods -l application=libvirt
NAME                            READY   STATUS    RESTARTS   AGE
libvirt-libvirt-default-9qx8g   1/1     Running   0          14h

安装 Compute Kit (Nova and Neutron)

可以通过直接运行脚本来执行此步骤:

./tools/deployment/developer/nfs/160-compute-kit.sh

查看部署的placement pods

root@ubuntu:~# kubectl -n openstack get pods -l application=placement
NAME                             READY   STATUS      RESTARTS   AGE
placement-api-5978b49bbf-bnrk6   1/1     Running     0          14h
placement-db-init-l6wr8          0/1     Completed   0          14h
placement-db-sync-rhpcc          0/1     Completed   0          14h
placement-ks-endpoints-pgdsj     0/3     Completed   0          14h
placement-ks-service-9nl8f       0/1     Completed   0          14h
placement-ks-user-2tvzn          0/1     Completed   0          14h

查看部署的nova pods

root@ubuntu:~# kubectl -n openstack get pods -l application=nova
NAME                                  READY   STATUS      RESTARTS      AGE
nova-api-metadata-557f6d5f85-xr8k5    1/1     Running     1 (14h ago)   14h
nova-api-osapi-657dbd96b7-fjwvd       1/1     Running     0             14h
nova-bootstrap-tsx26                  0/1     Completed   0             14h
nova-cell-setup-28218780-6447w        0/1     Completed   0             141m
nova-cell-setup-28218840-npjp7        0/1     Completed   0             81m
nova-cell-setup-28218900-g65ws        0/1     Completed   0             21m
nova-cell-setup-7gvsh                 0/1     Completed   0             14h
nova-compute-default-2sc2r            1/1     Running     0             14h
nova-conductor-cf584b9bb-qhc8k        1/1     Running     0             14h
nova-db-init-k69zs                    0/3     Completed   0             14h
nova-db-sync-9ns7l                    0/1     Completed   0             14h
nova-ks-endpoints-hkr9h               0/3     Completed   0             14h
nova-ks-service-hpwct                 0/1     Completed   0             14h
nova-ks-user-dg69j                    0/1     Completed   0             14h
nova-novncproxy-58fbb5c47c-2vxgm      1/1     Running     0             14h
nova-rabbit-init-c6cxx                0/1     Completed   0             14h
nova-scheduler-666494fc78-v98tt       1/1     Running     0             14h
nova-service-cleaner-28218780-mccsr   0/1     Completed   0             141m
nova-service-cleaner-28218840-qwf6g   0/1     Completed   0             81m
nova-service-cleaner-28218900-qvbgx   0/1     Completed   0             21m

查看部署的neutron pods

root@ubuntu:~# kubectl -n openstack get pods -l application=neutron
NAME                                       READY   STATUS      RESTARTS   AGE
neutron-db-init-xx6ml                      0/1     Completed   0          14h
neutron-db-sync-5k4ts                      0/1     Completed   0          14h
neutron-dhcp-agent-default-fzcsm           1/1     Running     0          14h
neutron-ks-endpoints-cj9fc                 0/3     Completed   0          14h
neutron-ks-service-2nkrs                   0/1     Completed   0          14h
neutron-ks-user-tnk8n                      0/1     Completed   0          14h
neutron-l3-agent-default-2k2qf             1/1     Running     0          14h
neutron-metadata-agent-default-krqxh       1/1     Running     0          14h
neutron-netns-cleanup-cron-default-w8lw5   1/1     Running     0          14h
neutron-ovs-agent-default-mlp5r            1/1     Running     0          14h
neutron-rabbit-init-z7xh2                  0/1     Completed   0          14h
neutron-server-69954b8998-8q5fw            1/1     Running     0          14h

设置 public network的gateway;

安装依赖包

apt install -y net-tools

修改脚本

$ cat ./tools/deployment/developer/nfs/170-setup-gateway.sh

以下两个参数保持默认即可

: ${OSH_EXT_SUBNET:="172.24.4.0/24"}
: ${OSH_BR_EX_ADDR:="172.24.4.1/24"}

如果是containerd环境需要将docker命令换为nerdctl,如果没有nerdctl需要提前安装

setup_gateway_file="./tools/deployment/developer/nfs/170-setup-gateway.sh"
sed -i "s#sudo docker#sudo nerdctl#g" ${setup_gateway_file}

ubuntu22.04不存在/etc/kubernetes/kubelet-resolv.conf配置文件,需要改为/run/systemd/resolve/resolv.conf

sed -i "s#/etc/kubernetes/kubelet-resolv.conf#/run/systemd/resolve/resolv.conf#g" ${setup_gateway_file}

修改OPENSTACK_RELEASE参数,与主版本一致

sed -i "s#"OPENSTACK_RELEASE:=.*}"#OPENSTACK_RELEASE:=\"zed\"}#g" ${setup_gateway_file}

修改完成后,可以通过直接运行脚本来执行此步骤

./tools/deployment/developer/nfs/170-setup-gateway.sh

Exercise the Cloud

参考:https://docs.openstack.org/openstack-helm/latest/install/developer/exercise-the-cloud.html

部署 OpenStack-Helm 后,可以使用 OpenStack 客户端或validation gates中使用的相同 heat 模板来运行云。
可以通过直接运行脚本来执行此步骤:

./tools/deployment/developer/common/900-use-it.sh

查看创建的资源

查看helm charts

root@ubuntu:~# helm -n openstack ls
NAME                    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
glance                  openstack       1               2023-08-27 04:29:12.398845063 +0800 CST deployed        glance-0.4.11           v1.0.0     
heat                    openstack       3               2023-08-27 04:22:23.925115391 +0800 CST deployed        heat-0.3.5              v1.0.0     
horizon                 openstack       1               2023-08-27 04:26:37.470730839 +0800 CST deployed        horizon-0.3.11          v1.0.0     
ingress-openstack       openstack       3               2023-08-27 03:43:35.238327143 +0800 CST deployed        ingress-0.2.15          v0.42.0    
keystone                openstack       3               2023-08-27 04:04:47.314694648 +0800 CST deployed        keystone-0.3.3          v1.0.0     
libvirt                 openstack       1               2023-08-27 04:40:43.912371161 +0800 CST deployed        libvirt-0.1.21          v1.0.0     
mariadb                 openstack       1               2023-08-27 03:43:51.218554184 +0800 CST deployed        mariadb-0.2.31          v10.6.7    
memcached               openstack       1               2023-08-27 03:53:23.83252168 +0800 CST  deployed        memcached-0.1.13        v1.5.5     
neutron                 openstack       1               2023-08-27 04:47:56.961418962 +0800 CST deployed        neutron-0.3.18          v1.0.0     
nova                    openstack       1               2023-08-27 04:44:56.082746508 +0800 CST deployed        nova-0.3.16             v1.0.0     
openvswitch             openstack       1               2023-08-27 04:37:35.824852186 +0800 CST deployed        openvswitch-0.1.17      v1.0.0     
placement               openstack       1               2023-08-27 04:43:06.732705729 +0800 CST deployed        placement-0.3.7         v1.0.0     
rabbitmq                openstack       1               2023-08-27 03:51:47.759042033 +0800 CST deployed        rabbitmq-0.1.29         v3.9.0     

查看pods

root@ubuntu:~# kubectl -n openstack get pods 
NAME                                           READY   STATUS      RESTARTS      AGE
glance-api-85459565c7-zpqs9                    1/1     Running     0             15h
glance-bootstrap-4k2d5                         0/1     Completed   0             15h
glance-db-init-bj5xf                           0/1     Completed   0             15h
glance-db-sync-zcrxj                           0/1     Completed   0             15h
glance-ks-endpoints-9nqfw                      0/3     Completed   0             15h
glance-ks-service-24w7s                        0/1     Completed   0             15h
glance-ks-user-5dqs7                           0/1     Completed   0             15h
glance-metadefs-load-pqn75                     0/1     Completed   0             15h
glance-rabbit-init-t5w9c                       0/1     Completed   0             15h
glance-storage-init-pqkph                      0/1     Completed   0             15h
heat-api-785d7b9c8c-7zr6m                      1/1     Running     0             15h
heat-bootstrap-6h82r                           0/1     Completed   0             15h
heat-cfn-78dd5f6977-vpbwj                      1/1     Running     0             15h
heat-db-init-hr68c                             0/1     Completed   0             15h
heat-db-sync-rjlzw                             0/1     Completed   0             15h
heat-domain-ks-user-shh9q                      0/1     Completed   0             15h
heat-engine-7d64d4b567-v2xdn                   1/1     Running     0             15h
heat-engine-cleaner-28218930-26gqf             0/1     Completed   0             10m
heat-engine-cleaner-28218935-jvxtd             0/1     Completed   0             5m34s
heat-engine-cleaner-28218940-kvgwh             0/1     Completed   0             34s
heat-ks-endpoints-q2qgg                        0/6     Completed   0             15h
heat-ks-service-p8gml                          0/2     Completed   0             15h
heat-ks-user-q5pm6                             0/1     Completed   0             15h
heat-rabbit-init-7mfd4                         0/1     Completed   0             15h
heat-trustee-ks-user-lll92                     0/1     Completed   0             15h
heat-trusts-p4mx5                              0/1     Completed   0             15h
horizon-55d5cc85c9-q24gt                       1/1     Running     0             15h
horizon-db-init-k9lgn                          0/1     Completed   0             15h
horizon-db-sync-85dgm                          0/1     Completed   0             15h
horizon-test                                   0/1     Completed   0             15h
ingress-7ffbc58c5b-nfl7l                       1/1     Running     0             15h
ingress-error-pages-7b9b69bc7-jk2dl            1/1     Running     0             15h
keystone-api-597bff77d9-vqqbn                  1/1     Running     0             15h
keystone-bootstrap-tk25v                       0/1     Completed   0             15h
keystone-credential-setup-94p5r                0/1     Completed   0             15h
keystone-db-init-w9ldx                         0/1     Completed   0             15h
keystone-db-sync-2z88l                         0/1     Completed   0             15h
keystone-domain-manage-6lmwd                   0/1     Completed   0             15h
keystone-fernet-rotate-28218480-4x6zw          0/1     Completed   0             7h40m
keystone-fernet-setup-tqz6q                    0/1     Completed   0             15h
keystone-rabbit-init-wzjqb                     0/1     Completed   0             15h
libvirt-libvirt-default-9qx8g                  1/1     Running     0             14h
mariadb-ingress-5bc446f46d-qd6tt               1/1     Running     0             15h
mariadb-ingress-5bc446f46d-zzhw5               1/1     Running     0             15h
mariadb-ingress-error-pages-69479bc687-vmv6n   1/1     Running     0             15h
mariadb-server-0                               1/1     Running     0             15h
memcached-memcached-768976ddbc-27cc2           1/1     Running     0             15h
neutron-db-init-xx6ml                          0/1     Completed   0             14h
neutron-db-sync-5k4ts                          0/1     Completed   0             14h
neutron-dhcp-agent-default-fzcsm               1/1     Running     0             14h
neutron-ks-endpoints-cj9fc                     0/3     Completed   0             14h
neutron-ks-service-2nkrs                       0/1     Completed   0             14h
neutron-ks-user-tnk8n                          0/1     Completed   0             14h
neutron-l3-agent-default-2k2qf                 1/1     Running     0             14h
neutron-metadata-agent-default-krqxh           1/1     Running     0             14h
neutron-netns-cleanup-cron-default-w8lw5       1/1     Running     0             14h
neutron-ovs-agent-default-mlp5r                1/1     Running     0             14h
neutron-rabbit-init-z7xh2                      0/1     Completed   0             14h
neutron-server-69954b8998-8q5fw                1/1     Running     0             14h
nova-api-metadata-557f6d5f85-xr8k5             1/1     Running     1 (14h ago)   14h
nova-api-osapi-657dbd96b7-fjwvd                1/1     Running     0             14h
nova-bootstrap-tsx26                           0/1     Completed   0             14h
nova-cell-setup-28218780-6447w                 0/1     Completed   0             160m
nova-cell-setup-28218840-npjp7                 0/1     Completed   0             100m
nova-cell-setup-28218900-g65ws                 0/1     Completed   0             40m
nova-cell-setup-7gvsh                          0/1     Completed   0             14h
nova-compute-default-2sc2r                     1/1     Running     0             14h
nova-conductor-cf584b9bb-qhc8k                 1/1     Running     0             14h
nova-db-init-k69zs                             0/3     Completed   0             14h
nova-db-sync-9ns7l                             0/1     Completed   0             14h
nova-ks-endpoints-hkr9h                        0/3     Completed   0             14h
nova-ks-service-hpwct                          0/1     Completed   0             14h
nova-ks-user-dg69j                             0/1     Completed   0             14h
nova-novncproxy-58fbb5c47c-2vxgm               1/1     Running     0             14h
nova-rabbit-init-c6cxx                         0/1     Completed   0             14h
nova-scheduler-666494fc78-v98tt                1/1     Running     0             14h
nova-service-cleaner-28218780-mccsr            0/1     Completed   0             160m
nova-service-cleaner-28218840-qwf6g            0/1     Completed   0             100m
nova-service-cleaner-28218900-qvbgx            0/1     Completed   0             40m
openvswitch-xxjxd                              2/2     Running     0             15h
placement-api-5978b49bbf-bnrk6                 1/1     Running     0             14h
placement-db-init-l6wr8                        0/1     Completed   0             14h
placement-db-sync-rhpcc                        0/1     Completed   0             14h
placement-ks-endpoints-pgdsj                   0/3     Completed   0             14h
placement-ks-service-9nl8f                     0/1     Completed   0             14h
placement-ks-user-2tvzn                        0/1     Completed   0             14h
rabbitmq-cluster-wait-858b9                    0/1     Completed   0             15h
rabbitmq-rabbitmq-0                            1/1     Running     0             15h
rabbitmq-rabbitmq-1                            1/1     Running     0             15h

查看service

root@ubuntu:~# kubectl -n openstack get svc
NAME                          TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)                                  AGE
cloudformation                ClusterIP   10.96.3.158   <none>        80/TCP,443/TCP                           15h
glance                        ClusterIP   10.96.1.163   <none>        80/TCP,443/TCP                           15h
glance-api                    ClusterIP   10.96.2.14    <none>        9292/TCP                                 15h
heat                          ClusterIP   10.96.2.13    <none>        80/TCP,443/TCP                           15h
heat-api                      ClusterIP   10.96.0.122   <none>        8004/TCP                                 15h
heat-cfn                      ClusterIP   10.96.2.166   <none>        8000/TCP                                 15h
horizon                       ClusterIP   10.96.0.153   <none>        80/TCP,443/TCP                           15h
horizon-int                   NodePort    10.96.3.42    <none>        80:31000/TCP                             15h
ingress                       ClusterIP   10.96.0.175   <none>        80/TCP,443/TCP,10246/TCP                 16h
ingress-error-pages           ClusterIP   None          <none>        80/TCP                                   16h
ingress-exporter              ClusterIP   10.96.0.247   <none>        10254/TCP                                16h
keystone                      ClusterIP   10.96.0.106   <none>        80/TCP,443/TCP                           15h
keystone-api                  ClusterIP   10.96.3.225   <none>        5000/TCP                                 15h
mariadb                       ClusterIP   10.96.3.12    <none>        3306/TCP                                 16h
mariadb-discovery             ClusterIP   None          <none>        3306/TCP,4567/TCP                        16h
mariadb-ingress-error-pages   ClusterIP   None          <none>        80/TCP                                   16h
mariadb-server                ClusterIP   10.96.1.12    <none>        3306/TCP                                 16h
memcached                     ClusterIP   10.96.2.153   <none>        11211/TCP                                15h
metadata                      ClusterIP   10.96.3.25    <none>        80/TCP,443/TCP                           14h
neutron                       ClusterIP   10.96.2.233   <none>        80/TCP,443/TCP                           14h
neutron-server                ClusterIP   10.96.1.167   <none>        9696/TCP                                 14h
nova                          ClusterIP   10.96.3.15    <none>        80/TCP,443/TCP                           14h
nova-api                      ClusterIP   10.96.1.210   <none>        8774/TCP                                 14h
nova-metadata                 ClusterIP   10.96.2.29    <none>        8775/TCP                                 14h
nova-novncproxy               ClusterIP   10.96.0.192   <none>        6080/TCP                                 14h
novncproxy                    ClusterIP   10.96.3.130   <none>        80/TCP,443/TCP                           14h
placement                     ClusterIP   10.96.1.170   <none>        80/TCP,443/TCP                           15h
placement-api                 ClusterIP   10.96.2.35    <none>        8778/TCP                                 15h
rabbitmq                      ClusterIP   None          <none>        5672/TCP,25672/TCP,15672/TCP,15692/TCP   15h
rabbitmq-mgr-7b1733           ClusterIP   10.96.0.223   <none>        80/TCP,443/TCP                           15h

查看pvc

root@ubuntu:~# kubectl -n openstack get pvc
NAME                                STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
glance-images                       Bound    pvc-7d9a7656-24fd-4472-b966-0a7a5ba3caf3   2Gi        RWO            general        15h
mysql-data-mariadb-server-0         Bound    pvc-c41c7d34-e175-47c0-a555-a710ecd9553f   5Gi        RWO            general        15h
rabbitmq-data-rabbitmq-rabbitmq-0   Bound    pvc-36681105-6785-4331-b868-b8b38ba4a0ba   768Mi      RWO            general        15h
rabbitmq-data-rabbitmq-rabbitmq-1   Bound    pvc-36ff02b0-93c9-41f7-bd0f-fe6ba9f71304   768Mi      RWO            general        15h

查看ingress

root@ubuntu:~# kubectl get ingress -A
NAMESPACE   NAME                          CLASS    HOSTS                                                                                               ADDRESS         PORTS   AGE
ceph        ceph-ingress-ceph             <none>   *.ceph.svc.cluster.local                                                                            192.168.72.50   80      15h
openstack   cloudformation                <none>   cloudformation,cloudformation.openstack,cloudformation.openstack.svc.cluster.local                  192.168.72.50   80      15h
openstack   glance                        <none>   glance,glance.openstack,glance.openstack.svc.cluster.local                                          192.168.72.50   80      15h
openstack   heat                          <none>   heat,heat.openstack,heat.openstack.svc.cluster.local                                                192.168.72.50   80      15h
openstack   horizon                       <none>   horizon,horizon.openstack,horizon.openstack.svc.cluster.local                                       192.168.72.50   80      15h
openstack   keystone                      <none>   keystone,keystone.openstack,keystone.openstack.svc.cluster.local                                    192.168.72.50   80      15h
openstack   metadata                      <none>   metadata,metadata.openstack,metadata.openstack.svc.cluster.local                                    192.168.72.50   80      14h
openstack   neutron                       <none>   neutron,neutron.openstack,neutron.openstack.svc.cluster.local                                       192.168.72.50   80      14h
openstack   nova                          <none>   nova,nova.openstack,nova.openstack.svc.cluster.local                                                192.168.72.50   80      14h
openstack   novncproxy                    <none>   novncproxy,novncproxy.openstack,novncproxy.openstack.svc.cluster.local                              192.168.72.50   80      14h
openstack   openstack-ingress-openstack   <none>   *.openstack.svc.cluster.local                                                                       192.168.72.50   80      15h
openstack   placement                     <none>   placement,placement.openstack,placement.openstack.svc.cluster.local                                 192.168.72.50   80      14h
openstack   rabbitmq-mgr-7b1733           <none>   rabbitmq-mgr-7b1733,rabbitmq-mgr-7b1733.openstack,rabbitmq-mgr-7b1733.openstack.svc.cluster.local   192.168.72.50   80      15h

访问horizon

在web中访问以下地址,用户名密码为:admin/password,域为default

http://192.168.72.50:31000

登陆horizon
在这里插入图片描述

查看实例
在这里插入图片描述
查看网络拓扑
在这里插入图片描述
本地配置hosts解析

192.168.72.50 novncproxy.openstack.svc.cluster.local

点击打开实例控制台,测试访问外网
在这里插入图片描述

openstack命令

临时配置

export OS_CLOUD=openstack_helm
openstack compute service list

查看clouds.yaml配置

root@ubuntu:~# cat /etc/openstack/clouds.yaml 
  clouds:
    openstack_helm:
      region_name: RegionOne
      identity_api_version: 3
      auth:
        username: 'admin'
        password: 'password'
        project_name: 'admin'
        project_domain_name: 'default'
        user_domain_name: 'default'
        auth_url: 'http://keystone.openstack.svc.cluster.local/v3'

永久配置

cat >/etc/profile.d/adminrc.sh<<EOF
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=password
export OS_AUTH_URL=http://keystone.openstack.svc.cluster.local/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
EOF
source /etc/profile

测试命令

root@ubuntu:~# openstack user list
+----------------------------------+-------+
| ID                               | Name  |
+----------------------------------+-------+
| 14a19983d32b431494ce690a8a29df0a | admin |
+----------------------------------+-------+

查看service

root@ubuntu:~# openstack service list
+----------------------------------+-----------+----------------+
| ID                               | Name      | Type           |
+----------------------------------+-----------+----------------+
| 008f44fdbc5d462786e6563df768ec38 | neutron   | network        |
| 556287ed138f45309fe201818912687b | glance    | image          |
| ba006d48fc094179b336e402a1a21114 | heat      | orchestration  |
| c536e3eb8c8941369937977d22627775 | keystone  | identity       |
| dcc2e06909244bbbbc80c62dcf9494ee | placement | placement      |
| e090b288846a40a189ee9f242e7dea2c | nova      | compute        |
| ff8604dcf5aa49469474fc3467b1569f | heat-cfn  | cloudformation |
+----------------------------------+-----------+----------------+

查看stack

root@ubuntu:~# openstack stack list
+--------------------------------------+-----------------------------+----------------------------------+-----------------+----------------------+--------------+
| ID                                   | Stack Name                  | Project                          | Stack Status    | Creation Time        | Updated Time |
+--------------------------------------+-----------------------------+----------------------------------+-----------------+----------------------+--------------+
| 30a666fa-c512-4b84-b167-7443a13c38d2 | heat-basic-vm-deployment    | 4e71287d807e4f9fa530874c3471a67b | CREATE_COMPLETE | 2023-08-27T05:22:51Z | None         |
| 346176f1-3bca-4f03-9c6c-e45c44d5c9a0 | heat-subnet-pool-deployment | 4e71287d807e4f9fa530874c3471a67b | CREATE_COMPLETE | 2023-08-27T05:22:36Z | None         |
| fc07a5cf-3e88-4528-aa46-5c16e4ceac05 | heat-public-net-deployment  | 4e71287d807e4f9fa530874c3471a67b | CREATE_COMPLETE | 2023-08-27T05:22:27Z | None         |
+--------------------------------------+-----------------------------+----------------------------------+-----------------+----------------------+--------------+

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/92643.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【小沐学Unity3d】3ds Max 骨骼动画制作(Physique 修改器)

文章目录 1、简介2、Physique 工作流程3、Physique 对象类型4、Physique 增加骨骼5、Physique 应用和初始化6、Physique 顶点子对象7、Physique 封套子对象8、设置关键点和自动关键点模式的区别8.1 自动关键点8.2 设置关键点 结语 1、简介 官方网址&#xff1a; https://help.…

计算机毕设 基于机器学习与大数据的糖尿病预测

文章目录 1 课题背景2 数据导入处理3 数据可视化分析4 特征选择4.1 通过相关性进行筛选4.2 多重共线性4.3 RFE&#xff08;递归特征消除法&#xff09;4.4 正则化 5 机器学习模型建立与评价5.1 评价方式的选择5.2 模型的建立与评价5.3 模型参数调优5.4 将调参过后的模型重新进行…

<C++>泛型编程-模板

1.泛型编程 如何实现一个通用的交换函数呢&#xff1f;可以使用函数重载 void Swap(int &left, int &right) {int temp left;left right;right temp; }void Swap(double &left, double &right) {double temp left;left right;right temp; }void Swap(c…

Sentinel流量控制与熔断降级

&#x1f4dd; 学技术、更要掌握学习的方法&#xff0c;一起学习&#xff0c;让进步发生 &#x1f469;&#x1f3fb; 作者&#xff1a;一只IT攻城狮 &#xff0c;关注我&#xff0c;不迷路 。 &#x1f490;学习建议&#xff1a;1、养成习惯&#xff0c;学习java的任何一个技术…

[MyBatis系列③]动态SQL

目录 1、简介 2、if标签 3、foreach标签 4、SQL抽取 ⭐MyBatis系列①&#xff1a;增删改查 ⭐MyBatis系列②&#xff1a;两种Dao开发方式 1、简介 开发中在MyBatis映射文件配置SQL语句&#xff0c;但是前面配置的都是比较简单的&#xff0c;不涉及稍复杂的业务场景。想要应…

函数式编程-Stream流学习第二节-中间操作

1 Stream流概述 java8使用的是函数式编程模式,如同它的名字一样&#xff0c;它可以用来对集合或者数组进行链状流式操作&#xff0c;让我们更方便的对集合或者数组进行操作。 2 案例准备工作 我们首先创建2个类一个作家类&#xff0c;一个图书类 package com.stream.model;…

【BUG】解决安装oracle11g或12C中无法访问临时位置的问题

项目场景&#xff1a; 安装oracle时&#xff0c;到第二步出现oracle11g或12C中无法访问临时位置的问题。 解决方案&#xff1a; 针对客户端安装&#xff0c;在cmd中执行命令&#xff1a;前面加实际路径setup.exe -ignorePrereq -J"-Doracle.install.client.validate.cli…

RHCE——八、DNS域名解析服务器

RHCE 一、概述1、产生原因2、作用3、连接方式4、因特网的域名结构4.1 拓扑4.2 分类4.3 域名服务器类型划分 二、DNS域名解析过程1、分类2、解析图&#xff1a;2.1 图&#xff1a;2.2 过程分析 三、搭建DNS域名解析服务器1、概述2、安装软件3、/bind服务中三个关键文件4、配置文…

原生微信小程序 动态(横向,纵向)公告(广告)栏

先看一下动态效果 Y轴滚动公告的原理是swiper组件在页面中的Y轴滚动&#xff0c;属性vertical&#xff0c;其余属性也设置一下autoplay circular interval"3000" X轴滚动的原理是&#xff0c;利用动画效果&#xff0c;将内容从右往左过渡过去 wxml&#xff1a; &l…

DBi Tech Studio Controls for .NET Crack

DBi Tech Studio Controls for .NET Crack Studio Controls for.NET为企业开发人员提供了一套全面的Windows布局和信息表示软件元素&#xff0c;面向搜索业务分析商业调度和UI表示控制器的程序员。Studio Controls for.NET包含17个免版税的.NET Windows窗体控件&#xff0c;用于…

高精度地图定位在高速公路自动驾驶系统中的应用

近年来随着汽车保有量不断增加&#xff0c;随之而来的是: ( 1) 严重的交通拥堵&#xff0c;通行效率低下&#xff0c;用在通行上的时间不断增加; ( 2) 交通事故频发&#xff0c;交通事故导致的伤亡人数和费用不断增加&#xff0c;而且绝大多数事故是由人为因素导致的; ( 3) 大气…

3.2 数据的表现形式及其运算

3.2.1 常量和变量 在计算机高级语言中&#xff0c;数据有两种表现形式&#xff1a;常量和变量。 1.常量 在程序运行过程中&#xff0c;其值不能被改变的量称为常量。如例3.1程序中的5,9,32和例3.2程序中的1000,0.0036,0.0225,0.0198是常量。数值常量就是数学中的常数。 常用的…

lnmp架构-mysql

1.MySQL数据库编译 make完之后是这样的 mysql 初始化 所有这种默认不在系统环境中的路径里 就这样加 这样就可以直接调用 不用输入路径调用 2.初始化 重置密码 3.mysql主从复制 配置master 配置slave 当master 端中还没有插入数据时 在server2 上配slave 此时master 还没进…

在云原生环境中构建可扩展的大数据平台:方法和策略

文章目录 1. **选择适当的云提供商&#xff1a;**2. **采用容器化和微服务架构&#xff1a;**3. **分层架构设计&#xff1a;**4. **弹性计算资源&#xff1a;**5. **使用分布式计算框架&#xff1a;**6. **数据分区和分片&#xff1a;**7. **使用列式存储&#xff1a;**8. **缓…

002微信小程序云开发API数据库-迁移状态查询/更新索引

文章目录 微信小程序云开发API数据库-迁移状态查询案例代码微信小程序云开发API数据库-更新索引案例代码 微信小程序云开发API数据库-迁移状态查询 在微信小程序中&#xff0c;云开发API数据库是一种方便快捷的数据库解决方案。但是&#xff0c;有时候我们可能需要将云开发数据…

C++笔记之rolling counter(滚动计数器)

C笔记之rolling counter&#xff08;滚动计数器&#xff09; 一个 rolling counter&#xff08;滚动计数器&#xff09;是一个计数器&#xff0c;可以在给定的范围内不断增加&#xff0c;当达到最大值时会从最小值重新开始。 code review! 文章目录 C笔记之rolling counter&…

Python|爬虫和测试|selenium框架模拟登录示例(一)

前言&#xff1a; 上一篇文章Python|爬虫和测试|selenium框架的安装和初步使用&#xff08;一&#xff09;_晚风_END的博客-CSDN博客 大概介绍了一下selenium的安装和初步使用&#xff0c;主要是打开某个网站的主页&#xff0c;基本是最基础的东西&#xff0c;那么&#xff0c;…

redis在linux和windows上的安装配置(解决问题:没有可用软件包 redis)

linux系统 安装 yum install redis安装 在终端输入yum install redis安装。 报错&#xff1a;没有可用软件包 redis。 解决&#xff1a; 运行以下命令更新软件包信息&#xff1a; sudo yum clean all sudo yum update 然后继续尝试yum install redis。 如果还不成功&a…

Redis—Redis介绍(是什么/为什么快/为什么做MySQL缓存等)

一、Redis是什么 Redis 是一种基于内存的数据库&#xff0c;对数据的读写操作都是在内存中完成&#xff0c;因此读写速度非常快&#xff0c;常用于缓存&#xff0c;消息队列、分布式锁等场景。 Redis 提供了多种数据类型来支持不同的业务场景&#xff0c;比如 String(字符串)、…

快速排序笔记

一、quick_sort方法中如果 il,jr 会死循环的分析 1、示例代码 void quick_sort(int a[],int l,int r){if(l>r) return;int il,jr; //此处设置会导致死循环int x num[(lr)>>1];while(i<j){while(a[i] <x); //死循环的地方while(a[--j] >x);if(i<j) swap(a…