[OpenIndiana-discuss] Hipster and puppet

Grüninger, Andreas (LGL Extern) Andreas.Grueninger at lgl.bwl.de
Mon Jan 26 10:40:44 UTC 2015


So Chef will have the same problem.
When no other advice will be given I will use "OpenIndiana" as value for operatingsystem.

-----Ursprüngliche Nachricht-----
Von: Andrew Gabriel [mailto:illumos at cucumber.demon.co.uk] 
Gesendet: Montag, 26. Januar 2015 11:18
An: Discussion list for OpenIndiana
Betreff: Re: [OpenIndiana-discuss] Hipster and puppet

Grüninger wrote:
> Last Friday I made an installation of hipster in our corporate network.
> We use puppet for configuration management.
> Puppet set facts to classify the system and one of them is "operatingsystem".
> The value for operatingsystem is determined by evaluation of 'uname -v'.
>
> # Hipster: uname -v
> illumos-f8554bb
>
> # OpenIndiana oi151a9 : uname -v
> oi_151a9
>
> and the ruby code of puppet
>
>       def get_operatingsystem
>         output = Facter::Core::Execution.exec('uname -v')
>         if output =~ /^joyent_/
>           "SmartOS"
>         elsif output =~ /^oi_/
>           "OpenIndiana"
>         elsif output =~ /^omnios-/
>           "OmniOS"
>         elsif FileTest.exists?("/etc/debian_version")
>           "Nexenta"
>         else
>           "Solaris"
>         end
>       end
>
> IMHO this is a wrong classification as hipster will be handled like Oracle Solaris.
> And we manage OpenIndiana a151a9 and Oracle Solaris systems with puppet.
> And the test system was handled as an Oracle Solaris system.
>
> I will make a pull request to change the value but I am unsure which value to choose.
> What do you prefer?
> "OpenIndiana" as before and as recognition of a special distribution.
> "IllumOS" as a more general specification.

I would say it should be "OpenIndiana".
"Illumos" would cover several different distros with potentially different sysadmin interfaces, which is not helpful.

FYI, here's a similar selection from Chef, to narrow down the type of Solaris platform, which is all driven from contents of /etc/release. I added some of this for local use, but I didn't test all the existing options.

File.open("/etc/release") do |file|
 while line = file.gets
   case line
   when /^.*(SmartOS).*$/
     platform "smartos"
   when /^\s*(OmniOS).*r(\d+).*$/
     platform "omnios"
     platform_version $2
   when /^\s*(OpenIndiana).*oi_(\d+).*$/
     platform "openindiana"
     platform_version $2
   when /^\s*Open Storage Appliance\s+(.*)$/
     platform "nexentastor"
     platform_version $1
   when /^\s*(OpenSolaris).*snv_(\d+).*$/
     platform "opensolaris"
     platform_version $2
   when /^\s*(Oracle Solaris) (\d+)\s.*$/
     platform "solaris2"
   when /^\s*(Solaris)\s.*$/
     platform "solaris2"
   when /^\s*(NexentaCore)\s.*$/
     platform "nexentacore"
   end
 end
end

_______________________________________________
openindiana-discuss mailing list
openindiana-discuss at openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss



More information about the openindiana-discuss mailing list