首页 数据库 mysql教程 Upgrading from Casper 8.73 to 9.32_MySQL

Upgrading from Casper 8.73 to 9.32_MySQL

May 31, 2016 am 08:50 AM

Since Casper 9.x was first released, I’ve been preparing for my shop’s own upgrade from Casper 8.x to 9.x. As of the morning of Saturday, June 28th, those preparations have ended with my shop’s successful upgrade to Casper 9.32. When I mentioned this on Twitter, I heard from a few folks who mentioned that they were planning to also do this in the near future and@theycallmebauerasked if I was going to post about my experience.

Screen Shot 2014-06-28 at 3.48.47 PM

I thought that was a good idea, so please see below the jump for the details.

The biggest lessons I took away from the experience were these:

1. Having a test environment is essential.

I have two Casper test environments to help with me with my testing. The first was a Casper 9.x server hosted at my home. It did not replicate my work environment, but it allowed me to test new Casper 9.x releases on a small scale. If something blew up, it was no big deal as the only things affected were the VMs I was testing with.

The second was my test environment at work. This used a Casper 9.x server that replicated as closely as possible my production environment. If something didn’t blow up in my home test environment, the next step was to try it in my work test environment.

Between the two environments, I must have installed every version of Casper 9.x at least once.I also must have rolled back my work test environment to 8.73about three or four times to help me practice upgrading to various versions of 9.x.

2. Surprises are bad. Test as much as you can to find issues.

I found a few things that worked in Casper 8.73 that either didn’t work or didn’t work like I expected them to. For example, in Casper 8.73 you can have a message pop up once Self Service policies are finished running. You can also have messages be displayed when policies are run in Casper 9.x, but for whatever reason, they won’t appear when those policies are run through Self Service.

Since I like to have “Hey, this is done,” messages appear for my users when Self Service policies finish running, I needed to figure out a way to have the messages appear in Casper 9.x. After some work, the answer I preferred was to have a script like the one below set to run after the Self Service policy’s main action:

#!/bin/bash# This script displays a message that lets the user know that # a printer setup policy has finished. It is set to the lowest# priority to ensure that it runs last after all other scripts# and policy actions.printer_name="$4"/usr/sbin/jamf displayMessage -message "The $printer_name printer has now been set up on your Mac."exit 0
登录后复制

In this case,$4would pass along a name which I had set on the Casper server’s end. That worked fine, until I discovered that thejamf displayMessage -messagecommand didn’t appear to work right in Casper 9.32 on 10.5.x and 10.6.x Macs. After discussing it with JAMF’s support, I decided to usejamfHelperfor my 10.5.x and 10.6.x Macs, while usingjamf displayMessage -messageon 10.7.x and higher. With an OS check thrown in, my updated message script looked like this:

#!/bin/bash# This script displays a message that lets the user know that # a printer setup policy has finished. It is set to the lowest# priority to ensure that it runs last after all other scripts# and policy actions.# Determine OS versionosvers=$(sw_vers -productVersion | awk -F. '{print $2}')printer_name="$4"dialog="The $printer_name printer has now been set up on your Mac."description=`echo "$dialog"`button1="OK"jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"icon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertNoteIcon.icns"if [[ ${osvers} -lt 7 ]]; then"$jamfHelper" -windowType utility -description "$description" -button1 "$button1" -icon "$icon"fiif [[ ${osvers} -ge 7 ]]; thenjamf displayMessage -message "$dialog"fiexit 0
登录后复制

For those interested, I have my message scripts posted to GitHub at the following address:

https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/Casper_Scripts/message_display_scripts

Another issue I found in 9.32 was with how Casper-passed parameters were interpreted. In particular, I saw an issue in Casper 9.32 where Parameter 6 is seemingly being read as Parameter 7 in scripts. I verified that the problem did not happen on Casper 8.73 with the identical script used with an identical policy.

Script used:

https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/Casper_Scripts/install_company_xerox_printer_drivers

Blog post that explains how the script is used with Parameters 6 and 7:

http://derflounder.wordpress.com/2014/02/10/deploying-xerox-print-drivers-on-a-per-os-basis-via-caspers-self-service/

Where the parameters were coming into play was that Xerox provided several different versions of their print driver that I was using in my shop:

For 10.5.x – Xerox Print Driver 2.94.3

For 10.6.x – Xerox Print Driver 2.112.0

For 10.7.x through 10.9.x – Xerox Print Driver 2.113.0

When I ran my Casper 9.32 printer setup policy on a 10.6.x Mac, it reported that it did not detect that Xerox Print Driver 2.113.0 was installed and triggered a second policy to install drivers before the original policy proceeded with setting up the printer. The second policy correctly installed Xerox Print Driver 2.112.0 because that was the only option available for 10.6.x Macs. If the Casper 9.32 printer setup policy was re-run, it again reported that it did not detect that Xerox Print Driver 2.113.0 was installed and triggers the second policy to install the 2.112.0 drivers again.

Replacing the$6value in the script with a hard-coded “2.112.0” allowed the script to correctly detect that Xerox Print Driver 2.112.0 is installed. An identical Casper 8.73 policy and identical script worked properly and passed along$6as being2.112.0.

JAMF Support confirmed that they were seeing the same issue and that the solution for now was to hard-code it.

Screen Shot 2014-06-28 at 4.39.42 PM  

3. You don’t have to do everything at once.

As I found issues in testing, or learned about new functions and features, I tried to see if I could incorporate them into my existing Casper 8.73 setup. A good example of this had to do with MySQL. When I started the process, my Casper server was running the following:

Red Hat Enterprise Linux Server release 6.0 (Santiago)

MySQL 5.1.47

However, I looked ahead to Casper 9.x and saw the following versions of MySQL were now listed as being required:

MySQL Enterprise Edition 5.5 or later, or MySQL Community Server 5.5 or later

Since I didn’t want to deal with a MySQL upgrade at the same time that I was doing an upgrade to Casper 9.x,I went ahead and upgraded my Casper production server to use MySQL 5.5.

Another example of prior preparation had to do with the messages in Self Service. The nice thing there was that all of the scripts worked fine in 8.73 as well. Instead of having to do all the work of updating my scripts as part of the upgrade process, I could update my Self Service policies to use the scripts in Casper 8.73 and have both the policies and the scripts all be brought into Casper 9.x when I upgraded.

The Upgrade Process

When the time came to actually do the upgrade to Casper 9.32, here’s what I did to make the process go smoothly:

Pre-upgrade work:

  • Made a snapshot backup of my work’s Casper production VM
  • Verified that the previous night’s automated database backup ran successfully
  • Purged all Casper database logs older than one week
  • Performed a manual backup of the Casper database using the JSS Database Utility
  • Rebooted the Casper production VM

Upgrade work:

  • Ran the Casper 9.32 Linux installer on my RHEL VM to upgrade Casper from 8.73 to 9.32
  • Migrated the Casper installer repository using Casper Admin to compress non-flat packages and move scripts from the repo to their new storage location in the Casper database.
  • Created new Casper QuickAdd installer package with Casper Recon

Post-upgrade work:

  • Verified that a sampling of workstations running 10.5.8 through 10.9.3 had upgraded themselves to the 9.32 Casper agent.
  • Verified that a sampling of workstations running 10.5.8 through 10.9.3 were all able to run an inventory update and send it to the upgraded Casper 9.32 server.
  • Verified thatCasperCheckwas able to detect and download the new QuickAdd installer package.
  • Verified that my policies were running as expected and that the Self Service messages were popping up as appropriate.

I’m indebted to those folks who went before me, as they helped find and fix a number of issues that I didn’t have to deal with as part of my upgrade process with 9.32. For those who have yet to upgrade to Casper 9.x, hopefully this information helps you out in your own upgrade process.

本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

AI Hentai Generator

AI Hentai Generator

免费生成ai无尽的。

热门文章

R.E.P.O.能量晶体解释及其做什么(黄色晶体)
1 个月前 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳图形设置
1 个月前 By 尊渡假赌尊渡假赌尊渡假赌
威尔R.E.P.O.有交叉游戏吗?
1 个月前 By 尊渡假赌尊渡假赌尊渡假赌

热工具

记事本++7.3.1

记事本++7.3.1

好用且免费的代码编辑器

SublimeText3汉化版

SublimeText3汉化版

中文版,非常好用

禅工作室 13.0.1

禅工作室 13.0.1

功能强大的PHP集成开发环境

Dreamweaver CS6

Dreamweaver CS6

视觉化网页开发工具

SublimeText3 Mac版

SublimeText3 Mac版

神级代码编辑软件(SublimeText3)

说明InnoDB全文搜索功能。 说明InnoDB全文搜索功能。 Apr 02, 2025 pm 06:09 PM

InnoDB的全文搜索功能非常强大,能够显着提高数据库查询效率和处理大量文本数据的能力。 1)InnoDB通过倒排索引实现全文搜索,支持基本和高级搜索查询。 2)使用MATCH和AGAINST关键字进行搜索,支持布尔模式和短语搜索。 3)优化方法包括使用分词技术、定期重建索引和调整缓存大小,以提升性能和准确性。

如何使用Alter Table语句在MySQL中更改表? 如何使用Alter Table语句在MySQL中更改表? Mar 19, 2025 pm 03:51 PM

本文讨论了使用MySQL的Alter Table语句修改表,包括添加/删除列,重命名表/列以及更改列数据类型。

可以在 Windows 7 上安装 mysql 吗 可以在 Windows 7 上安装 mysql 吗 Apr 08, 2025 pm 03:21 PM

是的,可以在 Windows 7 上安装 MySQL,虽然微软已停止支持 Windows 7,但 MySQL 仍兼容它。不过,安装过程中需要注意以下几点:下载适用于 Windows 的 MySQL 安装程序。选择合适的 MySQL 版本(社区版或企业版)。安装过程中选择适当的安装目录和字符集。设置 root 用户密码,并妥善保管。连接数据库进行测试。注意 Windows 7 上的兼容性问题和安全性问题,建议升级到受支持的操作系统。

与MySQL中使用索引相比,全表扫描何时可以更快? 与MySQL中使用索引相比,全表扫描何时可以更快? Apr 09, 2025 am 12:05 AM

全表扫描在MySQL中可能比使用索引更快,具体情况包括:1)数据量较小时;2)查询返回大量数据时;3)索引列不具备高选择性时;4)复杂查询时。通过分析查询计划、优化索引、避免过度索引和定期维护表,可以在实际应用中做出最优选择。

如何为MySQL连接配置SSL/TLS加密? 如何为MySQL连接配置SSL/TLS加密? Mar 18, 2025 pm 12:01 PM

文章讨论了为MySQL配置SSL/TLS加密,包括证书生成和验证。主要问题是使用自签名证书的安全含义。[角色计数:159]

哪些流行的MySQL GUI工具(例如MySQL Workbench,PhpMyAdmin)是什么? 哪些流行的MySQL GUI工具(例如MySQL Workbench,PhpMyAdmin)是什么? Mar 21, 2025 pm 06:28 PM

文章讨论了流行的MySQL GUI工具,例如MySQL Workbench和PhpMyAdmin,比较了它们对初学者和高级用户的功能和适合性。[159个字符]

InnoDB中的聚类索引和非簇索引(次级索引)之间的差异。 InnoDB中的聚类索引和非簇索引(次级索引)之间的差异。 Apr 02, 2025 pm 06:25 PM

聚集索引和非聚集索引的区别在于:1.聚集索引将数据行存储在索引结构中,适合按主键查询和范围查询。2.非聚集索引存储索引键值和数据行的指针,适用于非主键列查询。

您如何处理MySQL中的大型数据集? 您如何处理MySQL中的大型数据集? Mar 21, 2025 pm 12:15 PM

文章讨论了处理MySQL中大型数据集的策略,包括分区,碎片,索引和查询优化。

See all articles