Openstack all-in-one_ironic 部署测试

1. 基础环境
apt update
apt install git python3-dev libffi-dev gcc libssl-dev
apt install python3-venv
2. 设置虚拟环境变量
root@controller01:~# python3 -m venv /deploy/venv
root@controller01:~# source /deploy/venv/bin/activate
(venv) root@controller01:~#
(venv) root@controller01:~# pip install -U pip
(venv) root@controller01:~# pip install 'ansible>=4,<6'

3.安装Kolla-ansible
pip install git+https://opendev.org/openstack/kolla-ansible@unmaintained/yoga
sudo mkdir -p /etc/kolla
sudo chown $USER:$USER /etc/kolla
cp -r /deploy/venv/share/kolla-ansible/etc_examples/kolla/* /etc/kolla
cp /deploy/venv/share/kolla-ansible/ansible/inventory/* .

#虚拟环境变量需要在inventory中增加下面配置

localhost ansible_python_interpreter=python

```
(venv) root@controller01:/deploy# egrep -v '#|^$' all-in-one |more
[control]
localhost       ansible_connection=local ansible_python_interpreter=python
[network]
localhost       ansible_connection=local ansible_python_interpreter=python
[compute]
localhost       ansible_connection=local ansible_python_interpreter=python
[storage]
localhost       ansible_connection=local ansible_python_interpreter=python
[monitoring]
localhost       ansible_connection=local ansible_python_interpreter=python
[deployment]
localhost       ansible_connection=local ansible_python_interpreter=python
4. 配置globals.yml
#测试是否OK
ansible -i all-in-one all -m ping

#globals.yml配置
(venv) root@controller01:/deploy# egrep -v '#|^$' /etc/kolla/globals.yml 
---
kolla_base_distro: "debian"
kolla_install_type: "source"
openstack_release: "yoga"
kolla_internal_vip_address: "100.192.1.23"
kolla_external_vip_address: "{{ kolla_internal_vip_address }}"
kolla_sysctl_conf_path: /etc/sysctl.conf
network_interface: "eth0"
neutron_external_interface: "eth1"
neutron_plugin_agent: "linuxbridge"
enable_haproxy: "no"
enable_cinder: "yes"
enable_cinder_backend_lvm: "yes"
enable_neutron_provider_networks: "yes"
nova_compute_virt_type: "kvm"


enable_neutron_qos: "yes"
enable_fluentd: "no"
neutron_tenant_network_types: "vlan"
enable_ironic: "yes"
ironic_dnsmasq_interface: "eth1"
ironic_dnsmasq_dhcp_range:  "100.2.24.21,100.2.24.30,255.255.255.0"
ironic_dnsmasq_default_gateway: "100.2.24.1"
ironic_cleaning_network: pxe_999
ironic_dnsmasq_boot_file: "pxelinux.0"
ironic_dnsmasq_serve_ipxe: "no"
ironic_dnsmasq_dnsserver: "8.8.8.8,8.8.4.4"
ironic_inspector_kernel_cmdline_extras: ['ipa-lldp-timeout=30.0', 'ipa-collect-lldp=1', 'ipa-ntp-server=pool.ntp.org', 'ipa-debug=1']
5. 创建cinder-volumes卷
(venv) root@controller01:/deploy# pvremove /dev/sdd 
  Labels on physical volume "/dev/sdd" successfully wiped.
(venv) root@controller01:/deploy# pvcreate /dev/sdd
  Physical volume "/dev/sdd" successfully created.
(venv) root@controller01:/deploy# vgcreate cinder-volumes /dev/sdd
  Volume group "cinder-volumes" successfully created
(venv) root@controller01:/deploy#
6.开始部署
kolla-ansible install-deps
kolla-ansible -i ./all-in-one bootstrap-servers
kolla-ansible -i ./all-in-one prechecks
kolla-ansible -i ./all-in-one deploy
#生成openrc文件
kolla-ansible post-deploy

7. 设置source 环境变量
venv) root@controller01:~# cp /etc/kolla/admin-openrc.sh /root/

#安装
apt install python3-openstackclient

(venv) root@controller01:~# openstack compute service list 
+----+----------------+--------------+----------+---------+-------+----------------------------+
| ID | Binary         | Host         | Zone     | Status  | State | Updated At                 |
+----+----------------+--------------+----------+---------+-------+----------------------------+
|  1 | nova-scheduler | controller01 | internal | enabled | up    | 2024-05-25T11:39:18.000000 |
|  1 | nova-conductor | controller01 | internal | enabled | up    | 2024-05-25T11:39:10.000000 |
|  6 | nova-compute   | controller01 | nova     | enabled | up    | 2024-05-25T11:39:18.000000 |
+----+----------------+--------------+----------+---------+-------+----------------------------+
(venv) root@controller01:~#

8. 尝试清除缓存,重新执行
kolla-ansible destroy -i ./all-in-one --yes-i-really-really-mean-it
9.效果 

  • 5
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

石兴稳

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值