{"id":1251,"date":"2021-01-25T20:00:21","date_gmt":"2021-01-25T18:00:21","guid":{"rendered":"https:\/\/macadmin.cz\/?page_id=1251"},"modified":"2021-01-29T16:04:04","modified_gmt":"2021-01-29T14:04:04","slug":"applelab","status":"publish","type":"page","link":"https:\/\/macadmin.cz\/?page_id=1251&lang=en","title":{"rendered":"AppleLab"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Since 2014, I have been managing a classroom at FIT Apple designed to teach the development of applications for Apple platforms. The project is covered by my bachelor&#8217;s thesis <a href=\"https:\/\/dspace.cvut.cz\/handle\/10467\/17763\" data-type=\"URL\" data-id=\"https:\/\/dspace.cvut.cz\/handle\/10467\/17763\">CTU FIT Apple Classroom Case Study<\/a> and my diploma thesis <a href=\"https:\/\/dspace.cvut.cz\/handle\/10467\/65060\" data-type=\"URL\" data-id=\"https:\/\/dspace.cvut.cz\/handle\/10467\/65060\">Operation of the Apple Laboratory for FIT CTU<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Due to the lack of support for macOS Big Sur on the Mac mini 2012, the life of the original classroom is coming to an end. However, there is an interest in continuing teaching iOS development courses. The classroom may continue with the Apple Silicon Mac. For now let&#8217;s see how it came to life.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"http:\/\/osxadmin.cz\/wp-content\/uploads\/michal-cvut-1-of-20.jpg\" rel=\"attachment wp-att-767\"><img decoding=\"async\" src=\"https:\/\/macadmin.cz\/wp-content\/uploads\/lab880.jpg\" alt=\"AppleLab FIT \u010cVUT \"\/><\/a><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">In addition to programming for iOS, other subjects are taught in the classroom. Taking care of the classroom means to deploy macOS system and various applications. Both need to be updated from time to time. We need to adapt the configuration to the classroom environment and prevent users from doing ugly things. Ideally, solve everything from central location in a automated fashion. How about other operating systems? Not a problem. When you start your Mac mini, you choose between macOS, Linux and Windows. How did I solve it?<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">macOS management<\/h1>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright size-large\"><a href=\"http:\/\/osxadmin.cz\/wp-content\/uploads\/xcode.jpg\" rel=\"attachment wp-att-772\"><img decoding=\"async\" src=\"https:\/\/macadmin.cz\/wp-content\/uploads\/xcode350.jpg\" alt=\"Xcode v AppleLab\"\/><\/a><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">A new version of macOS is released once a year in the autumn. Soon after, I deploy it in the Apple classroom. Using <a href=\"https:\/\/github.com\/MagerValp\/AutoDMG\" data-type=\"URL\" data-id=\"https:\/\/github.com\/MagerValp\/AutoDMG\">AutoDMG<\/a>, I create an image from the macOS installer. Image contains a never booted system and add bulky software such as Mathematica or MATLAB. All computers in the classroom boot macOS over the network using <a href=\"https:\/\/en.wikipedia.org\/wiki\/NetBoot\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/NetBoot\">NetBoot<\/a>. <a href=\"http:\/\/www.deploystudio.com\" data-type=\"URL\" data-id=\"http:\/\/www.deploystudio.com\">DeployStudio<\/a> automates the deployment. All clients receive the macOS image from <a href=\"https:\/\/developer.apple.com\/library\/mac\/documentation\/Darwin\/Reference\/ManPages\/man8\/asr.8.html\" data-type=\"URL\" data-id=\"https:\/\/developer.apple.com\/library\/mac\/documentation\/Darwin\/Reference\/ManPages\/man8\/asr.8.html\">ASR<\/a> multicast transmission.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Manually managing 40 pieces of software is not something you want to do. Thankfully there is a solution for that. <a href=\"https:\/\/github.com\/autopkg\/autopkg\" data-type=\"URL\" data-id=\"https:\/\/github.com\/autopkg\/autopkg\">AutoPkg<\/a> downloads newly released versions from developers&#8217; websites and import them into the <a href=\"https:\/\/github.com\/munki\/munki\" data-type=\"URL\" data-id=\"https:\/\/github.com\/munki\/munki\">Munki<\/a> repository. Munki client downloads and installs all the necessary programs on each Mac. It can also install system updates. To control availability of Apple updates, we use <a href=\"https:\/\/github.com\/wdas\/reposado\" data-type=\"URL\" data-id=\"https:\/\/github.com\/wdas\/reposado\">Reposado<\/a>. In addition to the classic software, we install many of our own packages created through <a href=\"https:\/\/github.com\/wdas\/reposado\" data-type=\"URL\" data-id=\"https:\/\/github.com\/wdas\/reposado\">luggage<\/a>. Not to be missed are a number of other shell and Ruby scripts along with <a href=\"https:\/\/git-scm.com\" data-type=\"URL\" data-id=\"https:\/\/git-scm.com\">git<\/a> versioned documentation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">macOS is connected to several faculty services. Users log in on any Mac with their school account obtained from an LDAP server. <a href=\"http:\/\/www.apple.com\/business\/docs\/Autofs.pdf\" data-type=\"URL\" data-id=\"http:\/\/www.apple.com\/business\/docs\/Autofs.pdf\">Automount<\/a> mounts their home folder over an NFSv3 network. They can access the data from any classroom and any operating system. If the system crashes, heats up too much, or runs out of disk space, we&#8217;ll find out in <a href=\"https:\/\/www.nagios.org\" data-type=\"URL\" data-id=\"https:\/\/www.nagios.org\">Nagios<\/a>, where Macs send status information.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Classroom Server<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">There is one Mac mini sitting in the server room, on which we run VMware <a href=\"https:\/\/www.vmware.com\/products\/vsphere-hypervisor\" data-type=\"URL\" data-id=\"https:\/\/www.vmware.com\/products\/vsphere-hypervisor\">ESXi<\/a>. This solution allows us to run multiple instances of macOS at the same time without too much overhead. In addition to the production virtual machines, we can turn on several others for testing purposes. Once a day, the backup is performed automatically by the <a href=\"https:\/\/github.com\/lamw\/ghettoVCB\" data-type=\"URL\" data-id=\"https:\/\/github.com\/lamw\/ghettoVCB\">ghettoVCB<\/a> script.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The main virtual machine contains macOS with the <a href=\"http:\/\/www.apple.com\/osx\/server\/\" data-type=\"URL\" data-id=\"http:\/\/www.apple.com\/osx\/server\/\">Server<\/a> module installed. It runs the already mentioned NetBoot and <a href=\"https:\/\/www.apple.com\/support\/osxserver\/profilemanager\/\" data-type=\"URL\" data-id=\"https:\/\/www.apple.com\/support\/osxserver\/profilemanager\/\">Profile Manager<\/a> for client configuration. The administrator has at his disposal tools for service management such as DeployStudio Admin, <a href=\"https:\/\/github.com\/hjuutilainen\/munkiadmin\" data-type=\"URL\" data-id=\"https:\/\/github.com\/hjuutilainen\/munkiadmin\">MunkAdmin<\/a>, <a href=\"https:\/\/github.com\/lindegroup\/autopkgr\" data-type=\"URL\" data-id=\"https:\/\/github.com\/lindegroup\/autopkgr\">AutoPkgr<\/a> or <a href=\"https:\/\/github.com\/jessepeterson\/margarita\" data-type=\"URL\" data-id=\"https:\/\/github.com\/jessepeterson\/margarita\">Margarita<\/a>.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Support for multiple operating systems<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">The first thing the user sees after starting a Mac in the classroom is the EFI boot manager <a href=\"http:\/\/www.rodsbooks.com\/refind\/\" data-type=\"URL\" data-id=\"http:\/\/www.rodsbooks.com\/refind\/\">rEFInd<\/a>. In addition to macOS, Linux or Windows, you can also boot into the classroom installation environment commonly used on school PCs. We achieve this by using the <a href=\"http:\/\/ipxe.org\" data-type=\"URL\" data-id=\"http:\/\/ipxe.org\">iPXE<\/a> program to substitute the missing PXE support in the Mac firmware. Therefore, it can boot a diskless system over a network and deploy Windows and Linux to computer&#8217;s disk.<\/p>\n\n\n\r\n    <div>        \r\n    <video id=\"plyr6a31f4977e381\" data-poster=\"https:\/\/macadmin.cz\/share\/video\/multiboot_still.png\" controls class=\"easy-video-player no-volume no-background\">\r\n       <source src=\"https:\/\/macadmin.cz\/share\/video\/multiboot.mp4\" type=\"video\/mp4\" \/>\r\n    <\/video>\r\n    <\/div>    <script>\r\n        const evplayerplyr6a31f4977e381 = new Plyr(document.getElementById('plyr6a31f4977e381'));\r\n        evplayerplyr6a31f4977e381.ratio = '0.4625';\r\n        evplayerplyr6a31f4977e381.iconUrl = 'https:\/\/macadmin.cz\/wp-content\/plugins\/easy-video-player\/lib\/plyr.svg';\r\n        evplayerplyr6a31f4977e381.blankVideo = 'https:\/\/macadmin.cz\/wp-content\/plugins\/easy-video-player\/lib\/blank.mp4';  \r\n    <\/script>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\nngg_shortcode_0_placeholder\n<\/div><\/div>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Acknowledgement<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I thank the ICT department for cooperation in the implementation of the classroom. Especially Tom\u00e1\u0161 Kadlec, Marin B\u00edl\u00fd, Milan V\u00e1clav\u00edk and Luk\u00e1\u0161 Kudrna. I also thank Rudolf Bla\u017eek PhD and Tom\u00e1\u0161 Zahradnick\u00fd PhD, without whom the classroom would not have been established..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since 2014, I have been managing a classroom at FIT Apple designed to teach the development of applications for Apple platforms. The project is covered by my bachelor&#8217;s thesis CTU FIT Apple Classroom Case Study and my diploma thesis Operation of the Apple Laboratory for FIT CTU. Due to the lack of support for macOS &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/macadmin.cz\/?page_id=1251&#038;lang=en\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;AppleLab&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":1246,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0,"footnotes":""},"class_list":["post-1251","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/macadmin.cz\/index.php?rest_route=\/wp\/v2\/pages\/1251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/macadmin.cz\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/macadmin.cz\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/macadmin.cz\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/macadmin.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1251"}],"version-history":[{"count":5,"href":"https:\/\/macadmin.cz\/index.php?rest_route=\/wp\/v2\/pages\/1251\/revisions"}],"predecessor-version":[{"id":1399,"href":"https:\/\/macadmin.cz\/index.php?rest_route=\/wp\/v2\/pages\/1251\/revisions\/1399"}],"up":[{"embeddable":true,"href":"https:\/\/macadmin.cz\/index.php?rest_route=\/wp\/v2\/pages\/1246"}],"wp:attachment":[{"href":"https:\/\/macadmin.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}