Using sunbeam to deploy openstack (by quqi99)

news2025/1/28 1:06:00

作者:张华 发表于:2023-10-15
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明(http://blog.csdn.net/quqi99)

What’s sunbeam

sunbeam是一个部署openstack的工具,它会用juju定义两个clouds(microk8s and sunbeam), microk8s用于部署openstack控制服务(位于openstack model), sunbeam用于部署sunbeam-controller(位于admin/conroller model):

  • openstack控制面部署在microk8s中
  • openstack数据面(ovn and nova-compute)用snap部署(openstack-hypervisor)

在这里插入图片描述

Deploy sunbeam

juju add sunbean && juju add-machine --series jammy --constraints "root-disk=100G mem=32G cores=8"
juju ssh 0
sudo snap install openstack --channel 2023.1
python3 -c "import socket; print(socket.getfqdn())"
sunbeam prepare-node-script | bash -x
sudo usermod -a -G snap_daemon $USER && newgrp snap_daemon
#ERROR failed to bootstrap model: machine is already provisioned
sudo remove-juju-services
sunbeam cluster bootstrap --accept-defaults
mkdir -p ~/.kube && sudo chown -R $USER ~/.kube
sudo usermod -a -G snap_microk8s $USER && newgrp snap_microk8s
microk8s.kubectl get pods --all-namespaces
microk8s.ctr --namespace k8s.io image ls
#registry.k8s.io, docker.io, registry.jujucharms.com, quay.io
##echo 'HTTPS_PROXY=http://192.168.99.186:9311' |sudo tee -a /var/snap/microk8s/current/args/containerd-env
microk8s.ctr --namespace k8s.io containers ls
alias kubectl='sudo /snap/bin/microk8s.kubectl'
source <(kubectl completion bash) && kubectl completion bash |sudo tee /etc/bash_completion.d/kubectl
sunbeam cluster list
#Unable to complete operation for new subnet. The number of DNS nameservers exceeds the limit 5.
sunbeam configure --accept-defaults --openrc demo-openrc
sunbeam openrc > admin-openrc
sunbeam launch ubuntu --name test
sudo journalctl -u snap.openstack.clusterd.service -f
openstack hypervisor list
sudo snap get openstack-hypervisor node
sudo snap logs openstack-hypervisor.hypervisor-config-service
sudo snap logs openstack-hypervisor.ovn-controller
#juju switch opensetack && juju ssh ovn-central/0
sudo microk8s.kubectl -n openstack exec -it ovn-central-0 bash
sudo microk8s.kubectl -n openstack exec -it ovn-central-0 -c ovn-northd -- ovn-sbctl --db=ssl:ovn-central-0.ovn-central-endpoints.openstack.svc.cluster.local:16642 -c /etc/ovn/cert_host -C /etc/ovn/ovn-central.crt -p /etc/ovn/key_host list
cat /var/snap/openstack-hypervisor/common/etc/nova/nova.conf

Some Info

juju ssh -m admin/controller 0
ubuntu@juju-5d90c3-sunbeam-0:~$ juju clouds |tail -n2
Only clouds with registered credentials are shown.
There are more clouds, use --all to see them.
microk8s   1        localhost  k8s     0            built-in  A Kubernetes Cluster
sunbeam    1        default    manual  0            local     
ubuntu@juju-5d90c3-sunbeam-0:~$ juju controllers |tail -n1
sunbeam-controller*  admin/controller  juju-5d90c3-sunbeam-0.cloud.sts  superuser                     2      -   -  3.2.0
ubuntu@juju-5d90c3-sunbeam-0:~$ juju models |tail -n3
Model              Cloud/Region                Type        Status     Machines  Cores  Units  Access  Last connection
admin/controller*  sunbeam/default             manual      available         1      8  4      admin   just now
openstack          sunbeam-microk8s/localhost  kubernetes  available         0      -  24     admin   1 minute ago

ubuntu@juju-5d90c3-sunbeam-0:~$ kubectl get pods --all-namespaces
NAMESPACE        NAME                                       READY   STATUS    RESTARTS        AGE
metallb-system   speaker-2rspk                              1/1     Running   0               108m
kube-system      coredns-6f5f9b5d74-ctc9d                   1/1     Running   0               109m
kube-system      calico-node-m74rh                          1/1     Running   0               107m
metallb-system   controller-9556c586f-kqslx                 1/1     Running   0               108m
kube-system      calico-kube-controllers-7457875fc6-xdst9   1/1     Running   0               106m
openstack        modeloperator-7f5fcd7474-w2f5p             1/1     Running   0               105m
openstack        cinder-ceph-mysql-router-0                 2/2     Running   0               105m
openstack        ovn-relay-0                                2/2     Running   0               105m
openstack        certificate-authority-0                    1/1     Running   0               104m
openstack        horizon-mysql-router-0                     2/2     Running   1 (101m ago)    105m
openstack        horizon-0                                  2/2     Running   0               105m
openstack        keystone-mysql-router-0                    2/2     Running   0               104m
openstack        cinder-ceph-0                              2/2     Running   0               105m
openstack        rabbitmq-0                                 2/2     Running   0               105m
openstack        placement-0                                2/2     Running   0               104m
openstack        neutron-0                                  2/2     Running   0               104m
openstack        keystone-0                                 2/2     Running   0               105m
openstack        glance-0                                   2/2     Running   1 (91m ago)     104m
openstack        traefik-0                                  2/2     Running   0               105m
openstack        cinder-mysql-router-0                      2/2     Running   2 (41m ago)     105m
openstack        neutron-mysql-router-0                     2/2     Running   2 (35m ago)     104m
openstack        nova-api-mysql-router-0                    2/2     Running   2 (10m ago)     104m
openstack        cinder-0                                   3/3     Running   1 (8m43s ago)   104m
kube-system      hostpath-provisioner-69cd9ff5b8-kdjpp      1/1     Running   5 (7m22s ago)   108m
openstack        nova-mysql-router-0                        2/2     Running   3 (7m19s ago)   105m
openstack        nova-0                                     4/4     Running   2 (7m19s ago)   103m
openstack        glance-mysql-router-0                      2/2     Running   1 (7m19s ago)   104m
openstack        ovn-central-0                              4/4     Running   2 (5m51s ago)   103m
openstack        nova-cell-mysql-router-0                   2/2     Running   1 (4m38s ago)   105m
openstack        mysql-0                                    2/2     Running   1 (3m21s ago)   104m
openstack        placement-mysql-router-0                   2/2     Running   3 (7m19s ago)   104m


ubuntu@juju-5d90c3-sunbeam-0:~$ juju switch admin/controller
sunbeam-controller:juju-5d90c3-sunbeam-0.cloud.sts/openstack -> sunbeam-controller:admin/controller
ubuntu@juju-5d90c3-sunbeam-0:~$ juju status
Model       Controller          Cloud/Region     Version  SLA          Timestamp  Notes
controller  sunbeam-controller  sunbeam/default  3.2.0    unsupported  03:50:49Z  upgrade available: 3.2.3
SAAS                   Status   Store  URL
certificate-authority  active   local  juju-5d90c3-sunbeam-0.cloud.sts/openstack.certificate-authority
keystone               waiting  local  juju-5d90c3-sunbeam-0.cloud.sts/openstack.keystone
ovn-relay              active   local  juju-5d90c3-sunbeam-0.cloud.sts/openstack.ovn-relay
rabbitmq               active   local  juju-5d90c3-sunbeam-0.cloud.sts/openstack.rabbitmq
App                   Version  Status   Scale  Charm                 Channel        Rev  Exposed  Message
controller                     active       1  juju-controller       3.2/stable      14  no       
microceph                      unknown      0  microceph             edge             9  no       
microk8s                       active       1  microk8s              legacy/stable  121  no       
openstack-hypervisor           active       1  openstack-hypervisor  2023.1/stable  105  no       
sunbeam-machine                active       1  sunbeam-machine       latest/edge      1  no       
Unit                     Workload  Agent  Machine  Public address  Ports      Message
controller/0*            active    idle   0        10.5.1.11                  
microk8s/0*              active    idle   0        10.5.1.11       16443/tcp  
openstack-hypervisor/0*  active    idle   0        10.5.1.11                  
sunbeam-machine/0*       active    idle   0        10.5.1.11                  
Machine  State    Address    Inst id  Base          AZ  Message
0        started  10.5.1.11  manual:  ubuntu@22.04      Manually provisioned machine
Offer      Application  Charm      Rev  Connected  Endpoint  Interface    Role
microceph  microceph    microceph  9    0/0        ceph      ceph-client  provider

ubuntu@juju-5d90c3-sunbeam-0:~$ juju switch openstack
sunbeam-controller:admin/controller -> sunbeam-controller:juju-5d90c3-sunbeam-0.cloud.sts/openstack
ubuntu@juju-5d90c3-sunbeam-0:~$ juju status                                                                                                                                            
Model      Controller          Cloud/Region                Version  SLA          Timestamp                                                                                             
openstack  sunbeam-controller  sunbeam-microk8s/localhost  3.2.0    unsupported  03:56:29Z
App                       Version                  Status       Scale  Charm                      Channel        Rev  Address         Exposed  Message                                 
certificate-authority                              active           1  tls-certificates-operator  latest/stable   22  10.152.183.253  no                                               
cinder                                             waiting          1  cinder-k8s                 2023.1/stable   47  10.152.183.47   no       installing agent                        
cinder-ceph                                        waiting          1  cinder-ceph-k8s            2023.1/stable   38  10.152.183.65   no       installing agent                        
cinder-ceph-mysql-router  8.0.34-0ubuntu0.22.04.1  active           1  mysql-router-k8s           8.0/candidate   64  10.152.183.165  no                                               
cinder-mysql-router       8.0.34-0ubuntu0.22.04.1  active           1  mysql-router-k8s           8.0/candidate   64  10.152.183.124  no                                               
glance                                             active           1  glance-k8s                 2023.1/stable   59  10.152.183.202  no                                               
glance-mysql-router       8.0.34-0ubuntu0.22.04.1  active           1  mysql-router-k8s           8.0/candidate   64  10.152.183.77   no                                               
horizon                                            active           1  horizon-k8s                2023.1/stable   56  10.152.183.234  no       http://10.20.21.10/openstack-horizon    
horizon-mysql-router      8.0.34-0ubuntu0.22.04.1  active           1  mysql-router-k8s           8.0/candidate   64  10.152.183.218  no                                               
keystone                                           waiting          1  keystone-k8s               2023.1/stable  125  10.152.183.123  no       installing agent                        
keystone-mysql-router     8.0.34-0ubuntu0.22.04.1  active           1  mysql-router-k8s           8.0/candidate   64  10.152.183.78   no                                               
mysql                     8.0.34-0ubuntu0.22.04.1  active           1  mysql-k8s                  8.0/candidate   99  10.152.183.183  no                                               
neutron                                            waiting          1  neutron-k8s                2023.1/stable   53  10.152.183.187  no       installing agent                        
neutron-mysql-router      8.0.34-0ubuntu0.22.04.1  active           1  mysql-router-k8s           8.0/candidate   64  10.152.183.45   no                                               
nova                                               waiting          1  nova-k8s                   2023.1/stable   48  10.152.183.59   no       installing agent                        
nova-api-mysql-router     8.0.34-0ubuntu0.22.04.1  active           1  mysql-router-k8s           8.0/candidate   64  10.152.183.46   no                                               
nova-cell-mysql-router    8.0.34-0ubuntu0.22.04.1  active           1  mysql-router-k8s           8.0/candidate   64  10.152.183.194  no                                               
nova-mysql-router         8.0.34-0ubuntu0.22.04.1  active           1  mysql-router-k8s           8.0/candidate   64  10.152.183.110  no                                               
ovn-central                                        active           1  ovn-central-k8s            23.03/stable    61  10.152.183.195  no                                               
ovn-relay                                          active           1  ovn-relay-k8s              23.03/stable    49  10.20.21.11     no                                               
placement                                          active           1  placement-k8s              2023.1/stable   43  10.152.183.90   no       
placement-mysql-router    8.0.34-0ubuntu0.22.04.1  active           1  mysql-router-k8s           8.0/candidate   64  10.152.183.210  no       
rabbitmq                  3.9.13                   active           1  rabbitmq-k8s               3.9/stable      30  10.20.21.12     no       
traefik                   2.10.4                   maintenance      1  traefik-k8s                1.0/candidate  148  10.20.21.10     no       updating ingress configuration for 'ingress:48'
Unit                         Workload     Agent  Address      Ports  Message
certificate-authority/0*     active       idle   10.1.105.20         
cinder-ceph-mysql-router/0*  active       idle   10.1.105.9          
cinder-ceph/0*               blocked      idle   10.1.105.12         (ceph) integration missing
cinder-mysql-router/0*       active       idle   10.1.105.7          
cinder/0*                    waiting      idle   10.1.105.30         (workload) Not all relations are ready
glance-mysql-router/0*       active       idle   10.1.105.19         
glance/0*                    active       idle   10.1.105.35         
horizon-mysql-router/0*      active       idle   10.1.105.11         
horizon/0*                   active       idle   10.1.105.13         
keystone-mysql-router/0*     active       idle   10.1.105.25         
keystone/0*                  waiting      idle   10.1.105.22         (workload) Not all relations are ready
mysql/0*                     active       idle   10.1.105.36         Primary
neutron-mysql-router/0*      active       idle   10.1.105.26         
neutron/0*                   waiting      idle   10.1.105.29         (workload) Not all relations are ready
nova-api-mysql-router/0*     active       idle   10.1.105.21         
nova-cell-mysql-router/0*    active       idle   10.1.105.18         
nova-mysql-router/0*         active       idle   10.1.105.8          
nova/0*                      waiting      idle   10.1.105.31         (workload) Not all relations are ready
ovn-central/0*               active       idle   10.1.105.37         
ovn-relay/0*                 active       idle   10.1.105.10         
placement-mysql-router/0*    active       idle   10.1.105.28         
placement/0*                 active       idle   10.1.105.27         
rabbitmq/0*                  active       idle   10.1.105.23         
traefik/0*                   maintenance  idle   10.1.105.24         updating ingress configuration for 'ingress:48'
Offer                  Application            Charm                      Rev  Connected  Endpoint              Interface             Role
certificate-authority  certificate-authority  tls-certificates-operator  22   1/1        certificates          tls-certificates      provider
keystone               keystone               keystone-k8s               125  1/1        identity-credentials  keystone-credentials  provider
ovn-relay              ovn-relay              ovn-relay-k8s              49   1/1        ovsdb-cms-relay       ovsdb-cms             provider
rabbitmq               rabbitmq               rabbitmq-k8s               30   1/1        amqp                  rabbitmq              provider

Reference

[1] Sunbeam underlying projects - https://discourse.ubuntu.com/t/sunbeam-underlying-projects/37526

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

利用ChatGPT练习口语

目录 ChatGPT 这两天发布了一个激动人心的新功能&#xff0c;App端&#xff08;包括iOS和Android&#xff09;开始支持语音对话以及图片识别功能。 这两个功能一如既往的优先开放给Plus用户使用&#xff0c;现在将App更新到最新版本&#xff0c;就能体验。 为什么说激动人心&a…

Android组件通信——PendingIntent(二十八)

1. PendingIntent 1.1 知识点 &#xff08;1&#xff09;了解PendingIntent与Intent的区别&#xff1b; &#xff08;2&#xff09;可以完成Notification功能的开发&#xff1b; &#xff08;3&#xff09;可以使用PendingIntent进行短信的发送&#xff1b; 1.2 具体内容 …

mysql作业(牛客60-80)

文章目录 606162636465666768697071727374757677787980 60 select cust_id from Customers;61 select distinct prod_id from OrderItems;62 select * from Customers;63 小小的脑袋大大的疑惑&#xff0c;按字母排&#xff1f;order by select cust_name from Customers orde…

计算机网络第2章-DNS(3)

DNS&#xff1a;因特网的目录服务 在因特网上&#xff0c;主机和人类都一样&#xff0c;可以用很多种方式进行标识&#xff0c;主机的一种标识方法是它的主机名。 但是主机名一般是用IP来表示&#xff0c;IP是由四个字节组成&#xff0c;并且有严格的层次结构&#xff0c;不利…

不止硬件,苹果的软件也是频出问题!iOS 17.0.3使iPhone在一夜之间随机开关机

就在我们以为iPhone的问题已经解决了一段时间的时候&#xff0c;一个新的问题似乎突然出现了。在Reddit和其他网站上&#xff0c;人们报告说&#xff0c;他们的iPhone在一夜之间莫名其妙地断电&#xff0c;有时会导致错过警报。 目前尚不清楚是什么原因导致了这个问题&#xf…

python利用多线程让http请求异步返回

嗨喽~大家好呀&#xff0c;这里是魔王呐 ❤ ~! python更多源码/资料/解答/教程等 点击此处跳转文末名片免费获取 有时我们可能会碰到这样一种情况&#xff1a; 我们有一个功能&#xff0c;这个功能对外提供了一个http接口&#xff0c; 我们需要对这个http接口发起请求才能启…

Liunx中日志分析与网络设置(极其粗糙版)

liunx系统日志的管理 系统日志&#xff1a;操作系统本身和大部分服务器程序的日志文件 日志是记录系统所产生的各种事故&#xff0c;在某个时间节点发生了什么&#xff0c;发生的原因 liunx的路径是/var/log下 /var/log/messages&#xff1a;内核日志还有公共信息日志(所有…

冒泡排序(学习笔记)

冒泡排序&#xff08;基于交换的排序&#xff0c;每一轮确定一个数的位置&#xff09; 哨兵举例&#xff1a; 待排序序列&#xff1a;6 3 1 2 5 第一轮排列&#xff1a; 3 6 1 2 5 3 1 6 2 5 3 1 2 6 5 3 1 2 5 6&#xff08;最大的数移动到了正确的位置&#xff09; 第二轮排列…

Mall脚手架总结(五) —— SpringBoot整合MinIO实现文件管理

前言 在项目中我们经常有资源的上传和下载的功能需求&#xff0c;比如用户头像、产品图片、配置文件等等&#xff0c;大数据量的文件存储无疑需要更高性能的数据存储服务&#xff0c;对于无需对结构实现复杂查询的文件对象来说&#xff0c;对象存储服务无疑是一个较好的选择&am…

并查集路径压缩

我们来看看如果要是100个数&#xff0c;往20个数的集合合并如何 那么我们应该&#xff0c;把数据量小的集合往数据量大的合并 解决另一种极端场景的路径压缩

限制条件加入构造范围:Gym - 102832L

https://vjudge.net/contest/587311#problem/D 场上列方程求首项&#xff0c;假设是全部加1&#xff0c;然后一部分&#xff08;后缀&#xff09;减去 k 1 k1 k1&#xff0c;就用到了以下两个条件&#xff1a; 但在这两种情况符合情况下&#xff0c;这个条件不一定满足 然后…

【软件测试】 初识软件测试

文章目录 &#x1f334;什么是软件测试&#x1f38b;软件测试和开发的区别&#x1f6a9;软件测试与调试的区别 &#x1f333;软件测试的发展&#x1f384;软件测试岗位&#x1f340;软件测试在不同类型公司的定位&#x1f38d;一个优秀的软件测试人员具备的素质&#x1f332;软…

105AspectRatio调整宽高比组件_flutter

AspectRatio组件 AspectRatio 的作用是根据设置调整子元素 child 的宽高比。 AspectRatio 首先会在布局限制条件允许的范围内尽可能的扩展&#xff0c;widget 的高度是由宽 度和比率决定的&#xff0c;类似于 BoxFit 中的 contain&#xff0c;按照固定比率去尽量占满区域。 …

【Redis】Java Spring操作redis

目录 引入Redis依赖StringRedisTemplate使用String使用List使用Set使用hash使用zset 引入Redis依赖 StringRedisTemplate 此处RedisTemplate是把这些操作Redis的方法&#xff0c;分成了几个类别&#xff0c;分门别类的来组织的。 此处提供的一些接口风格&#xff0c;和原生的Re…

利达卓越:发挥金融力量,促进团队发展

随着中国经济的快速增长和金融改革的逐步深化&#xff0c;我国金融业取得了令人瞩目的发展。作为经济的重要支柱&#xff0c;我国金融业的规模和实力不断扩大&#xff0c;已经成为全球最大的金融市场之一。利达卓越是一支由管理精英组成的团队&#xff0c;专注于金融行业的投资…

Empowering Low-Light Image Enhancer through Customized Learnable Priors 论文阅读笔记

中科大、西安交大、南开大学发表在ICCV2023的论文&#xff0c;作者里有李重仪老师和中科大的Jie Huang&#xff08;ECCV2022的FEC CVPR2022的ENC和CVPR2023的ERL的一作&#xff09;喔&#xff0c;看来可能是和Jie Huang同一个课题组的&#xff0c;而且同样代码是开源的&#xf…

解密人工智能:KNN | K-均值 | 降维算法 | 梯度Boosting算法 | AdaBoosting算法

文章目录 一、机器学习算法简介1.1 机器学习算法包含的两个步骤1.2 机器学习算法的分类 二、KNN三、K-均值四、降维算法五、梯度Boosting算法和AdaBoosting算法六、结语 一、机器学习算法简介 机器学习算法是一种基于数据和经验的算法&#xff0c;通过对大量数据的学习和分析&…

数据结构与算法-(8)---队列(Queue)

&#x1f308;write in front&#x1f308; &#x1f9f8;大家好&#xff0c;我是Aileen&#x1f9f8;.希望你看完之后&#xff0c;能对你有所帮助&#xff0c;不足请指正&#xff01;共同学习交流. &#x1f194;本文由Aileen_0v0&#x1f9f8; 原创 CSDN首发&#x1f412; 如…

若依 ruoyi 路径 地址 # 井号去除

export default new Router({mode: history, // history 去掉url中的# 、hash 包含#号scrollBehavior: () > ({ y: 0 }),routes: constantRoutes })

嘉立创专业版新建元件

以2*24&#xff08;2mm&#xff09;排母为例 文件-新建-元件 新建器件 填上元件的基本信息&#xff0c;保存 选择库设计 填好参数&#xff0c;生成符号 给元件添加封装 需要先设计一个封装 选择header-V 填写参数&#xff0c;生成符号 保存即可。 再次进入元件的封装管理…