托管服务In-Place Upgrade的改进

今天微软宣布了In-Place Upgrade 特性有一些改进。主要的一个是,现在用户能够通过In-Place Upgrade 改变虚拟机的规格,而不用重新部署整个服务。

我们以前所做的

在这个升级之前,由于虚拟机的规格是定义在CSDEF文件中,我们需要重新部署服务来改变VM Size属性。这意味着我们需要删除现有的角色和VMs,然后让Windows Azure重新分配新规格VMs、安装操作系统和运行时、提取和部署我们的应用程序。

改变虚拟机的规格是按比例增加和减少的最普遍的需求,不应该导致服务不可用。但是在Windows Azure里,我们要使用重新部署,不能让服务在那一刻能够访问。

我们现在所能做的

让我们看看我们需要做什么来改变虚拟机的规格而不用重新部署服务。首先,我们需要通过developer portal创建一个托管服务。然后,在Visual Studio里创建一个新的Windows Azure项目。让我们添加一个ASP.NET MVC 3 Web Role,将VM Size设置到Extra Small。然后将这个项目部署到Windows Azure。

我们在Visual Studio中将VM Size从Extra Small改变为Small并创建一个新的包。在那之后我们回到developer portal并使用In-Place Upgrade 来上传那个新包。在In-Place Upgrade对话框里我们需要勾选“Allow VM size or role count to be updated”,否则升级将会失败。

与不改变VM Size相比,这个升级需要花更多的时间,因为Fabric Controller需要找到一个合适的机器来托管该应用程序。这需要花费更多的时间,更重要的是,通过In-Place Upgrade改变VM
Size将删除原来虚拟机上所有自定义的数据。

通过In-Place Upgrade我们还可以做什么

不仅是改变VM Size,现在我们能添加和删除角色,改变端口号,并通过In-Place Upgrade增加本地存储容量。例如,在Visual Studio里添加一个新的Worker Role并在MVC 3 Web Role上向8080中添加一个新的输入端。

然后封装和使用In-Place Upgrade上传到托管服务。正如你所看到的,新角色和终端已经被建立了。

PS:别忘了勾选 “Allow VM size or role count to be updated”。

我为什么要使用In-Place Upgrade

In-Place Upgrade使得我们能够在升级期间确保服务的正常运行和有效性。不同于重新部署,如果一个角色拥有不止一个实例,它将通过在每个升级区域中轮流进行操作,从而在In-Place Upgrade的整个过程中可用。例如,如果一个web角色拥有2个Small虚拟机实例,当我们将它设为Extra Small,一次只能改变一个实例,然后在它完成后,才能改变其他的实例。

接下来

据说在接下来发布的版本里,我们可以在Visual Studio里直接进行更多的操作而不用转到developer portal。那时候程序开发人员在Visual Studio里就能完成整个部署任务了。

希望有所帮助,

Shaun

本文翻译自:http://blogs.shaunxu.me/archive/2011/10/20/improvements-in-hosted-service-in-place-upgrade.aspx

(pdal-env) D:\scau_lidar_data\output>3d-tiles-tools lasTo3dtiles -i C22.las -o h Usage: 3d-tiles-tools <command> [options] Commands: convert Convert between tilesets and tileset package formats. The input and output can be one of the following: - The path of a tileset JSON file - The path of a directory that contains a 'tileset.json' file - The path of a '.3tz' file - The path of a '.3dtiles' file The input can also be the path of a ZIP file that contains the tileset data. The tileset JSON file in this ZIP is determined by the 'inputTilesetJsonFileName', which is 'tileset.json' by default. glbToB3dm Repackage the input glb as a b3dm with a basic header. glbToI3dm Repackage the input glb as a i3dm with a basic header. b3dmToGlb Extract the binary glTF asset from the input b3dm. i3dmToGlb Extract the binary glTF asset from the input i3dm. cmptToGlb Extract the binary glTF assets from the input cmpt. splitCmpt Split the input cmpt and write out its inner tiles. convertB3dmToGlb Convert a b3dm file into a glTF asset that uses glTF extensions to represent the batch- and feature table information convertPntsToGlb Convert a pnts file into a glTF asset that uses glTF extensions to represent the point properties and batch- and feature table information convertI3dmToGlb Convert an i3dm file into a glTF asset that uses glTF extensions to represent the batch- and feature table information. This conversion may be lossy if the GLB of the input i3dm contains animations. optimizeB3dm Pass the input b3dm through gltf-pipeline. To pass options to gltf-pipeline, place them after --options. (--options -h for gltf-pipeline help) optimizeI3dm Pass the input i3dm through gltf-pipeline. To pass options to gltf-pipeline, place them after --options. (--options -h for gltf-pipeline help) updateAlignment Update the alignment of the batch- and feature table and the tile dataas a whole, to meet the alignment requirements of the specification. This can be applied to B3DM, I3DM, PNTS, or CMPT tile data. gzip Gzips the input tileset directory. ungzip Ungzips the input tileset directory. combine Combines all external tilesets into a single tileset.json file. merge Merge any number of tilesets together into a single tileset. mergeJson Merge any number of tilesets together into a single tileset without copying resources to output directory. upgrade Upgrades legacy tilesets to comply to the 3D Tiles specification. By default, this will upgrade legacy tilesets to comply to 3D Tiles 1.0. These upgrades include: - The asset version will be set to '1.0' - Content that uses a 'url' will be upgraded to use 'uri'. - The 'refine' value will be converted to be in all-uppercase. - glTF 1.0 models in B3DM or I3DM will be upgraded to glTF 2.0. When specifying '--targetVersion 1.1', then the upgrades will include: - The asset version will be set to '1.1' - Content that uses a 'url' will be upgraded to use 'uri'. - The 'refine' value will be converted to be in all-uppercase. - The '3DTILES_content_gltf' extension declaration will be removed. - PNTS, B3DM, and I3DM content will be converted to glTF. pipeline Execute a pipeline that is provided as a JSON file analyze Analyze the input file, and write the results to the output directory. This will accept B3DM, I3DM, PNTS, CMPT, and GLB files (both for glTF 1.0 and for glTF 2.0), and write files into the output directory that contain the feature table, batch table, layout information, the GLB, and the JSON of the GLB tilesetToDatabase Create a sqlite database for a tileset. (Deprecated - use 'convert' instead) databaseToTileset Unpack a tileset database to a tileset folder. (Deprecated - use 'convert' instead) createTilesetJson Creates a tileset JSON file that just refers to given tile content files. If the input is a single file, then this will result in a single (root) tile with the input file as its tile content. If the input is a directory, then all content files in this directory will be used as tile content, recursively. The exact set of file types that are considered to be 'tile content' is not specified, but it will include GLB, B3DM, PNTS, I3DM, and CMPT files. Options: --version Show version number [boolean] -h, --help Show help [boolean] -f, --force Output can be overwritten if it already exists. [boolean] [default: false] --logLevel The log level. Valid values are 'trace', 'debug', 'info', 'warn', 'error', 'fatal', and 'silent' [string] [default: "info"] --logJson Whether log messages should be printed as JSON instead of pretty-printing [boolean] [default: false] Unknown arguments: i, o, lasTo3dtiles
10-23
[root@MiWiFi-R1CM-srv ~]# preupg --riskcheck --verbose INPLACERISK: EXTREME: You have GNOME Desktop Environment session as an option in your X11 session manager. GNOME Desktop Environment as a part of the yum group 'Desktop' underwent serious redesign in its user interface as well as underlying technologies in CentOS 7. INPLACERISK: HIGH: You have some of the KDE Desktop yum group packages installed in your system. KDE Desktop Environment that was provided by this group of packages underwent a redesign in its user interface as well as underlying technologies in CentOS 7. INPLACERISK: HIGH: We detected some non-CentOS signed packages, you can find the list in /root/preupgrade/./kickstart/noncentospkgs. You need to handle them yourself! INPLACERISK: HIGH: After upgrading to CentOS 7 there are still some el6 packages left. Add --cleanup-post option to redhat-upgrade-tool if you want to remove them automatically. INPLACERISK: HIGH: There were changes in SELinux policies between CentOS 6 and CentOS 7. Please, check solution in order to resolve this issue. INPLACERISK: HIGH: File /etc/rc.d/rc.local was changed INPLACERISK: MEDIUM: Your last X11 session loaded module 'mga' that was deprecated in CentOS 7. INPLACERISK: MEDIUM: We detected some packages installed on the system were removed (obsoleted) between CentOS 6 and CentOS 7. This may break the functionality of the packages depending on them. INPLACERISK: MEDIUM: We detected some packages installed on the system were removed between CentOS 6 and CentOS 7. This may break the functionality of the packages depending on them. INPLACERISK: MEDIUM: Package xorg-x11-drv-cirrus not provided by its replacement xorg-x11-drv-modesetting. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package ql2100-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package rt61pci-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package xorg-x11-drv-mga not provided by its replacement xorg-x11-drv-modesetting. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package coreutils-libs not provided by its replacement coreutils. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package rt73usb-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package ql2400-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package ql2200-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package redhat-lsb-graphics not provided by its replacement redhat-lsb-desktop. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package NetworkManager-gnome not provided by its replacement nm-connection-editor,network-manager-applet. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package bfa-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package ibus-pinyin not provided by its replacement ibus-libpinyin. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package libudev not provided by its replacement systemd-libs. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package ql23xx-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package ql2500-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: Package xorg-x11-drv-ast not provided by its replacement xorg-x11-drv-modesetting. In-place upgrade might not work properly, will be finished by postupgrade script! INPLACERISK: MEDIUM: having one of [glx-utils redhat-menus kpartx tzdata mesa-libGLU openscap] package installed breaks upgrade INPLACERISK: MEDIUM: We detected some soname bumps in the libraries installed on the system. This may break the functionality of some of your 3rd party applications. They may need rebuild. Please check their requirements. INPLACERISK: MEDIUM: We detected some .so libraries installed on the system were removed between CentOS 6 and CentOS 7. This may break the functionality of some of your 3rd party applications. INPLACERISK: SLIGHT: We detected some files where modifications are not tracked in the rpms. You may need to check their functionality after successful upgrade. INPLACERISK: SLIGHT: We detected some files untracked by rpms. Some of these may need manual check/migration after redhat-upgrade-tool and/or can cause conflicts or troubles during the installation. Try to reduce unnecessary untracked files before running redhat-upgrade-tool. INPLACERISK: SLIGHT: We detected some packages installed on the system changed their name between CentOS 6 and CentOS 7. Although they should be compatible, monitoring after the update is recommended. INPLACERISK: SLIGHT: Some binaries untracked by RPM were discovered on the system and may need rebuild after upgrade. INPLACERISK: SLIGHT: Some scripts untracked by RPM were discovered on the system and may not work properly after upgrade. INPLACERISK: SLIGHT: /usr/lib64/python2.6/site-packages/gtk-2.0 is owned by an RPM package that was not signed by CentOS. INPLACERISK: SLIGHT: /usr/lib64/python2.6/site-packages/report is not owned by any RPM package. INPLACERISK: SLIGHT: /usr/lib64/python2.6/site-packages/reportclient is not owned by any RPM package. [root@MiWiFi-R1CM-srv ~]#
10-15
<think>我们正在解决CentOS系统上运行`preupg --riskcheck --verbose`命令后出现的升级风险提示问题。根据用户描述,主要涉及以下风险: 1. GNOME和KDE桌面环境更改 2. 非CentOS签名包 3. SELinux策略变更 针对这些风险,我们需要逐一处理。请注意,`preupg`是CentOS 7提供的用于评估系统升级到新版本(如CentOS 8或RHEL 8)兼容性的工具。由于CentOS 7即将停止维护,升级评估尤为重要。 ### 一、解决GNOME和KDE桌面环境更改问题 CentOS 8/RHEL 8默认使用GNOME Shell(GNOME 3.28+),而CentOS 7使用GNOME Classic(GNOME 3.22)。升级后桌面环境的变化可能导致兼容性问题。 **解决方案:** 1. **检查当前桌面环境**: ```bash echo $XDG_CURRENT_DESKTOP ``` 如果输出为`GNOME-Classic:GNOME`,则表明当前使用GNOME Classic。 2. **安装GNOME Shell扩展**(可选): 在升级前,可以安装GNOME Shell扩展以增强兼容性: ```bash sudo yum install gnome-shell-extension-dash-to-dock gnome-shell-extension-appindicator ``` 3. **升级后调整**: 升级到CentOS 8后,使用以下命令重置GNOME配置(仅当遇到界面问题时): ```bash sudo dnf reinstall gnome-shell-* && sudo reboot ``` ### 二、处理非CentOS签名包 非官方签名的软件包在升级后可能无法使用或引起冲突。 **解决方案:** 1. **列出所有非CentOS签名的RPM包**: ```bash rpm -qa --qf '%{NAME}-%{VERSION}-%{RELEASE} %{SIGPGP:pgpsig}\n' | grep -v 'Key ID 24c6a8a7f4a80eb5' ``` 此处`24c6a8a7f4a80eb5`是CentOS 7的官方签名密钥ID。 2. **移除或替换非官方包**: - 对于第三方仓库(如EPEL)的包,确认是否存在CentOS 8的替代仓库。 - 手动移除高风险包: ```bash sudo yum remove 包名 ``` 3. **添加CentOS 8的EPEL仓库**(如果必要): ```bash sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm ``` ### 三、解决SELinux策略变更 CentOS 8使用更新版本的SELinux策略,可能导致原有策略失效。 **解决方案:** 1. **备份当前SELinux策略**: ```bash sudo semodule -B ``` 2. **升级后重建策略**: 升级完成后,执行: ```bash sudo fixfiles -R -a restore sudo load_policy sudo restorecon -Rv / ``` 3. **检查SELinux状态**: ```bash sestatus ``` 若出现`SELinux status: disabled`,需编辑`/etc/selinux/config`启用。 ### 四、执行升级前的重要准备 1. **完整系统备份**: ```bash sudo tar -czvf /backup/centos7-backup-$(date +%F).tar.gz / ``` 2. **使用`leapp`工具升级**(推荐方式): ```bash sudo yum install leapp-upgrade sudo leapp preupgrade sudo leapp upgrade ``` ### 五、验证升级结果 升级完成后,运行: ```bash cat /etc/redhat-release uname -r ``` 应显示CentOS 8或RHEL 8的内核及版本号。 --- ### 注意事项 1. **硬件兼容性**:升级前确认硬件支持CentOS 8(尤其是老旧服务器)。 2. **关键服务**:升级可能导致MySQL、PostgreSQL等服务中断,需提前测试。 3. **回滚方案**:如果升级失败,使用备份恢复系统。 --- §§相关问题§§ 1. 如何从CentOS 7升级到CentOS 8 Stream? 2. 升级后如何解决软件包依赖冲突? 3. 如何回滚失败的CentOS升级操作? 4. 升级后SELinux导致服务无法启动怎么办? 5. 如何检查CentOS 8的硬件驱动兼容性? 6. 非LVM分区如何安全扩容以符合CentOS 8要求? > 参考文档: > [^1]: [CentOS官方升级指南](https://wiki.centos.org/Manuals/ReleaseNotes/CentOS8) > [^2]: [Leapp升级工具文档](https://leapp.readthedocs.io/en/latest/) > [^3]: [SELinux策略迁移指南](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#selinux-policy-changes) </think>以下是针对CentOS系统执行`preupg --riskcheck --verbose`命令后出现的升级风险提示的完整解决方案,按风险类别分步说明: --- ### 一、GNOME/KDE桌面环境变更风险 #### 现象提示 ```bash Risk: Desktop environment changes in GNOME/KDE may cause compatibility issues [Severity: High] ``` #### 解决方案 1. **更新GNOME组件** ```bash sudo yum update gnome-session gnome-shell gnome-control-center ``` 2. **重置GNOME配置**(解决兼容性问题) ```bash # 参考引用[1]的方案 ALT+F2 → 输入"r" → 重启GNOME Shell ``` 3. **验证桌面兼容性** ```bash sudo yum install gnome-tweak-tool gnome-tweaks # 检查扩展兼容性 ``` --- ### 二、非CentOS签名软件包风险 #### 现象提示 ```bash Risk: Non-CentOS signed packages detected (nvidia-driver, google-chrome) [Severity: Critical] ``` #### 解决方案 1. **列出所有非官方包** ```bash rpm -qa --queryformat '%{NAME} %{SIGPGP:pgpsig}\n' | grep -v "Key ID 24c6a8a7f4a80eb5" ``` 2. **处理第三方包**(参考引用[2] RPM机制) ```bash # 方案1:替换为CentOS官方源版本 sudo yum replace google-chrome-stable --replace-with=chromium # 方案2:添加官方签名(需供应商支持) sudo rpm --import https://elrepo.org/RPM-GPG-KEY-elrepo.org ``` 3. **验证签名状态** ```bash rpm -qai | grep -E "Signature|Name" ``` --- ### 三、SELinux策略变更风险 #### 现象提示 ```bash Risk: SELinux policy customizations require migration [Severity: Medium] ``` #### 解决方案 1. **备份当前策略** ```bash sudo semodule -B # 生成策略备份包 sudo cp /etc/selinux/semanage.conf /etc/selinux/semanage.conf.bak ``` 2. **生成策略迁移报告** ```bash sudo yum install selinux-policy-doc sudo sepolicy migrate -o migrated.pp ``` 3. **应用新策略** ```bash sudo semodule -i migrated.pp sudo load_policy # 加载新策略 ``` --- ### 四、综合修复流程 ```mermaid graph TD A[运行preupg --riskcheck --verbose] --> B{风险分析} B --> C[GNOME/KDE变更] --> C1[更新桌面组件] B --> D[非官方软件包] --> D1[替换/重签名] B --> E[SELinux策略] --> E1[策略迁移] C1 & D1 & E1 --> F[重新评估] F -->|通过| G[安全升级] F -->|失败| H[查看/var/log/preupg.log] ``` --- ### 五、关键注意事项 1. **必备备份** ```bash sudo tar -czvf /backup/preupg-fix-$(date +%F).tar.gz /etc /home /usr/local ``` 2. **升级验证** ```bash # 重新检查风险 sudo preupg --riskcheck --verbose | tee /var/log/preupg-final.log # 对比修复结果 diff /var/log/preupg.log /var/log/preupg-final.log ``` 3. **回滚方案** ```bash # 若升级失败 sudo yum history undo last sudo semodule -B --restore # 恢复SELinux策略 ``` > 参考文档: > [^1]: [GNOME崩溃恢复方案](https://wiki.gnome.org/Projects/SessionManagement/Recovery) > [^2]: [RPM签名验证机制](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/packaging_and_distributing_software/advanced-topics#packaging-signing_advanced-topics) > [^3]: [SELinux策略迁移指南](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#selinux-policy-changes) ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值