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

host-only 联网

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

10.20.0.0/24 为 host-only 网段

制作源

1
2
3
4
# 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
1
# fuel-createmirror

bootstrap

更换国内源

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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/ 下有如下文件

1
2
3
# ls /tmp/*.tar.gz

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

导入 bootstrap

1
2
3
4
# 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

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

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

查看新增bootstrap

1
2
3
4
5
6
7
# 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更新源

1
# 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 缓存

1
# yum clean all

3. 安装 mos-playbooks

1
# yum install -y mos-updates

4. 切换到mos_playbooks/mos_mu/ 目录

1
# cd mos_playbooks/mos_mu/

5. 执行环境准备的playbook

1
# ansible-playbook playbooks/mos9_prepare_fuel.yml

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

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

7. 升级Fuel bootstrap 内核

1
# ansible-playbook playbooks/mos9_fuel_upgrade_kernel_4.4.yml

8. 确认升级成功

1
2
3
4
5
6
7
# fuel2 fuel-version
 
api: '1'
auth_required: true
feature_groups: []
openstack_version: mitaka-9.0
release: '9.2'

参考文章

Update to minor releases (9.x)

一个默默无闻的工程师的日常
Built with Hugo
主题 StackJimmy 设计