OS X – Page 3 – jozefmares.com
Home Tags Posts tagged with "OS X"
Tag:

OS X

Previous posthave covered basic Puppet install. Now it is time to move to first module.

I created very basic module which will use appdmg provider. This is good to remember as on OS X this is standard packaging method of software distribution. To be honest, it is not very elegant nor efficient as Linux RPM or DEB packaging methods – but it is all I have. :)

Unfortunately as there are no repositories (yes, I know about ports, homebrew) and so on but there are not used to distribute software like VMWare, Firefox etc. Enough bullshit, let’s see some code!

class osx-firefox {

package { 'Firefox':
provider  => appdmg,
source    => "http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/latest/mac/en-US/Firefox%2019.0.dmg",
ensure    => installed,
}

}

You can see I named module osx-firefox as I have every app as separate module. Why is this useful? If I want to include for example package osx-vmware to node “hack-pro” but not to “macbook-air” node I can with simple:

include osx-vmware

This code is stored in file init.pp which is in $module_path/osx-firefox/manifests/init.pp

You can do test run by removing Firefox and running (this, with –noop option is simple method to test modules):

puppet apply path_to_init.pp

Hooray, my first module works like a charm and installed Firefox for me.

Puppet is cool automation and configuration management tool. I’m really happy with it since day I discovered it – and there is not so much tools that are that useful.

I have puppetized all kind of tasks on my servers like user management, service installation and configuration but on desktop there was nothing puppetized and automated. It’s time to change it.

I’m going to cover installation only in this post, next posts will cover application management, plist management and I hope I will find a way how to interact with keychain.

Installation is pretty simple compared to older days. :) Just visit Puppet labs download page and install latest versions of Puppet, Hiera and Facter.

You should install Facter first as Puppet need it.

Next step is to create group and user by running:

sudo puppet resource group puppet ensure=present
sudo puppet resource user puppet ensure=present gid=puppet shell='/sbin/nologin'

If you want puppet to run in master/client setup add these plist files to your system. They will ensure that Puppet master and Puppet itself will start-up during boot:

wget http://docs.puppetlabs.com/guides/files/com.puppetlabs.puppetmaster.plist
wget http://docs.puppetlabs.com/guides/files/com.puppetlabs.puppet.plist

Move plists to /Library/LaunchDaemons, set rights and let launchd let know about them:

sudo chown root:wheel /Library/LaunchDaemons/com.puppetlabs.puppet.plist
sudo chmod 644 /Library/LaunchDaemons/com.puppetlabs.puppet.plist
sudo chown root:wheel /Library/LaunchDaemons/com.puppetlabs.puppetmaster.plist
sudo chmod 644 /Library/LaunchDaemons/com.puppetlabs.puppetmaster.plist

sudo launchctl load -w /Library/LaunchDaemons/com.puppetlabs.puppet.plist
sudo launchctl load -w /Library/LaunchDaemons/com.puppetlabs.puppetmaster.plist

You should also let know system where Puppet master is, for this basic setup you can just add this to your /etc/hosts:

127.0.0.1 puppet

For OS X I prefer standalone setup, but this will be covered in next post.

In my previous post was covered my hardware setup. It’s time to install some basic software like OS X.

Once I was pretty sure it is possible to install OS X on my hardware I visited Tony Mac X86 site and looked for some how-to.

I used this how-to and I was following pretty much everything mentioned on site.

But not everything was that straight! OS X won’t boot into install screen, after some time screen just went blank and there was no option left only to cold cycle computer. To fix this issue i had to go to UEFI and change primary screen adapter from discrete Geforce to integrated Intel graphic adapter. After this computer booted into install and i followed how-to.

After install my OS X won’t boot into setup finish (part when you add user and so on), and I had to add this option to bootloader:

GraphicsEnabler=No

This parameter fixed problem with graphic card. Without this there was only spinning wheel and no setup finish.

After this step my hackintosh has been installed. Only few steps needed to go, right? Wrong. There was problem with network adapter, bootloader, wifi card and sound card – none of them works out of the box.

You need to download Unibeast for Mountain Lion (login required) and install appropriate driver (kext – kernel extension).

For my motherboard I needed to install and enable these drivers/settings:
* UserDSDT or DSDT-Free installation
* Audio – ALC892
* TRIM Enabler with 10.8.1+ TRIM Patch
* FakeSMC Plugins
* Realtek – Lnx2Mac’s RealtekRTL81xx v0.0.90
* Patched AppleIntelCPUPowerManagement
* Boot Options – GraphicsEnabler=No and 1080p display
* System definitions for Mac Pro 5,1

Next part will cover usual problems and how to fix them. Happy hacking.