fuel 9.0 制作本地源、bootstrap以及升级9.2

host-only 联网

iptables -t nat -A POSTROUTING -s 10.20.0.0/24 -j MASQUERADE

10.20.0.0/24 为 host-only 网段

制作源

# vim /usr/share/fuel-mirror/ubuntu.yaml
- ubuntu_baseurl: &ubuntu_baseurl http://archive.ubuntu.com/ubuntu
+ ubuntu_baseurl: &ubuntu_baseurl http://mirrors.aliyun.com/ubuntu
mos_baseurl: &mos_baseurl http://mirror.fuel-infra.org/mos-repos/ubuntu/$mos_version
# fuel-createmirror

bootstrap

更换国内源

# vim /etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml

repos:
- name: ubuntu
section: "main universe multiverse"
- uri: "http://archive.ubuntu.com/ubuntu"
+ uri: "http://mirrors.aliyun.com/ubuntu"
priority:
suite: trusty
type: deb
- name: ubuntu-updates
section: "main universe multiverse"
- uri: "http://archive.ubuntu.com/ubuntu"
+ uri: "http://mirrors.aliyun.com/ubuntu"
priority:
suite: trusty-updates
type: deb
- name: ubuntu-security
section: "main universe multiverse"
- uri: "http://archive.ubuntu.com/ubuntu"
+ uri: "http://mirrors.aliyun.com/ubuntu"
priority:
suite: trusty-security
type: deb

开始制作 bootstrap

# fuel-bootstrap build

……
Building initramfs
Building squashfs
squashfs_image clean-up
Creating archive: /tmp/59129ecd-cccd-4a13-943b-ed6000d2aa02.tar.gz
--- Building bootstrap image END (do_mkbootstrap) ---
Cleanup chroot
Bootstrap image 59129ecd-cccd-4a13-943b-ed6000d2aa02 has been built: /tmp/59129ecd-cccd-4a13-943b-ed6000d2aa02.tar.gz

导入 bootstrap

成功后在 /tmp/ 下有如下文件

# ls /tmp/*.tar.gz

/tmp/59129ecd-cccd-4a13-943b-ed6000d2aa02.tar.gz

导入 bootstrap

# fuel-bootstrap import /tmp/59129ecd-cccd-4a13-943b-ed6000d2aa02.tar.gz

Try extract /tmp/59129ecd-cccd-4a13-943b-ed6000d2aa02.tar.gz to /tmp/tmpnixoNM
Bootstrap image 59129ecd-cccd-4a13-943b-ed6000d2aa02 has been imported.

激活 bootstrap

# fuel-bootstrap activate 59129ecd-cccd-4a13-943b-ed6000d2aa02

Bootstrap image 59129ecd-cccd-4a13-943b-ed6000d2aa02 has been activated.

查看新增bootstrap

# fuel-bootstrap list

+--------------------------------------+--------------------------------------+--------+
| uuid | label | status |
+--------------------------------------+--------------------------------------+--------+
| 59129ecd-cccd-4a13-943b-ed6000d2aa02 | 59129ecd-cccd-4a13-943b-ed6000d2aa02 | active |
+--------------------------------------+--------------------------------------+--------+

升级 Mirantis OpenStack 9.x 到 9.2

1. 添加mos92-updates更新源

# yum install -y http://mirror.fuel-infra.org/mos-repos/centos/mos9.0-centos7/9.2-updates/x86_64/Packages/mos-release-9.2-1.el7.x86_64.rpm

2. 清除 yum 缓存

# yum clean all

3. 安装 mos-playbooks

# yum install -y mos-updates

4. 切换到mos_playbooks/mos_mu/ 目录

# cd mos_playbooks/mos_mu/

5. 执行环境准备的playbook

# ansible-playbook playbooks/mos9_prepare_fuel.yml

6. 升级Fuel 节点上的包、服务、配置,期间各服务都会重启

# ansible-playbook playbooks/update_fuel.yml -e '{"rebuild_bootstrap":false}'

7. 升级Fuel bootstrap 内核

# ansible-playbook playbooks/mos9_fuel_upgrade_kernel_4.4.yml

8. 确认升级成功

# fuel2 fuel-version

api: '1'
auth_required: true
feature_groups: []
openstack_version: mitaka-9.0
release: '9.2'

参考文章

Update to minor releases (9.x)

-------------本文结束感谢阅读-------------
0%