jenkins-infra / helpdesk

Open your Infrastructure related issues here for the Jenkins project
https://github.com/jenkins-infra/helpdesk/issues/new/choose
17 stars 10 forks source link

[INFRA-601] Add Mac agent donated by maccloud.me #460

Closed jenkins-infra-bot closed 4 years ago

jenkins-infra-bot commented 8 years ago

I sent Tyler the connection/creds info offline.


Originally reported by abayer, imported from: Add Mac agent donated by maccloud.me
  • assignee: rtyler
  • status: Closed
  • priority: Minor
  • resolution: Won't Fix
  • resolved: 2020-08-04T17:09:32+02:00
  • imported: 2022/01/10
jenkins-infra-bot commented 8 years ago

rtyler:

Step one was to enable the appropriate agent classes on the Puppet Master, I basically added pe_repo::platform::osx_109_x86_64 to the "PE Master" node.

jenkins-infra-bot commented 8 years ago

rtyler:

It appears that our version of Puppet Enterprise doesn't support installing on this version of Mac OS X: installer: The version of OS X is too new.

jenkins-infra-bot commented 8 years ago

rtyler:

We know have a Puppet master capable of provisioning an El Capitain machine, HOORAH

jenkins-infra-bot commented 8 years ago

rtyler:

Oh it turns out it's not 10.11 (El Capitan) but 10.10 which is Mavericks I think

jenkins-infra-bot commented 8 years ago

rtyler:

green:~ sysadmin$ sudo bash install.bash 
The agent packages needed to support osx-10.10-x86_64 are not present on your master.     To add them, apply the pe_repo::platform::osx_1010_x86_64 class to your master node and then run Puppet.     The required agent packages should be retrieved when puppet runs on the master, after which you can run the install.bash script again.
green:~ sysadmin$ sudo bash install.bash 
/dev/disk3      GUID_partition_scheme   
/dev/disk3s1    Apple_HFS       /private/tmp/puppet-enterprise-installer.iBEliyd6
installer: Package name is puppet-agent
installer: Installing at base path /
installer: The install was successful.
"disk3" unmounted.
"disk3" ejected.
service { 'puppet':
  ensure => 'stopped',
}
Error: undefined method `elements' for nil:NilClass
Error: /Service[puppet]/ensure: change from stopped to running failed: undefined method `elements' for nil:NilClass
Error: Could not run: undefined method `elements' for nil:NilClass
service { 'puppet':
  ensure => 'running',
  enable => 'true',
}
Notice: /File[/usr/local/bin/facter]/ensure: created
file { '/usr/local/bin/facter':
  ensure => 'link',
  target => '/opt/puppetlabs/puppet/bin/facter',
}
Notice: /File[/usr/local/bin/puppet]/ensure: created
file { '/usr/local/bin/puppet':
  ensure => 'link',
  target => '/opt/puppetlabs/puppet/bin/puppet',
}
Notice: /File[/usr/local/bin/pe-man]/ensure: created
file { '/usr/local/bin/pe-man':
  ensure => 'link',
  target => '/opt/puppetlabs/puppet/bin/pe-man',
}
Notice: /File[/usr/local/bin/hiera]/ensure: created
file { '/usr/local/bin/hiera':
  ensure => 'link',
  target => '/opt/puppetlabs/puppet/bin/hiera',
}
green:~ sysadmin$ 
jenkins-infra-bot commented 8 years ago

rtyler:

Looks like we need to make some changes to the base profile to support OS X:

sh-3.2# puppet agent -t --verbose 
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/portage.rb: cannot load such file -- facter/util/resolution
Error: Facter: error while resolving custom fact "git_version": undefined method `strip' for nil:NilClass
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, firewall: Kernel 'Darwin' is not currently supported at /etc/puppetlabs/code/environments/production/modules/firewall/manifests/init.pp:33:7 on node tomato
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
sh-3.2# 

That said, the machine is at least running a Puppet agent and is listed under the node name "tomato" in PE Console

jenkins-infra-bot commented 8 years ago

scm_issue_link:

Code changed in jenkins
User: R. Tyler Croy
Path:
dist/profile/manifests/base.pp
spec/classes/profile/base_spec.rb
http://jenkins-ci.org/commit/jenkins-infra/2778bdf966883c19b3c0d52c2d04134e8f89519b
Log:
Make sure the base profile provisions on OS X properly

This is next to impossible to test outside of running on an /actual/ Mac
attached to an /actual/ Puppet master right now. So this is a first stab at
things to run in a user specified environment

References INFRA-601

Compare: https://github.com/jenkins-infra/jenkins-infra/compare/0874dd9b3015^...2778bdf96688

jenkins-infra-bot commented 8 years ago

scm_issue_link:

Code changed in jenkins
User: R. Tyler Croy
Path:
dist/profile/manifests/base.pp
spec/classes/profile/base_spec.rb
http://jenkins-ci.org/commit/jenkins-infra/d37cf7a3f6e2d67c0cf2929c43d3ecef3a86193e
Log:
Make sure the base profile provisions on OS X properly

This is next to impossible to test outside of running on an /actual/ Mac
attached to an /actual/ Puppet master right now. So this is a first stab at
things to run in a user specified environment

References INFRA-601

jenkins-infra-bot commented 8 years ago

rtyler:

Pretty much everything on Darwin is busted, goddamnit.

Error: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/portage.rb: cannot load such file -- facter/util/resolution
Error: Facter: error while resolving custom fact "git_version": undefined method `strip' for nil:NilClass
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, firewall: Kernel 'Darwin' is not currently supported at /etc/puppetlabs/code/environments/production/modules/firewall/manifests/init.pp:33:7 on node tomato
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
sh-3.2# puppet agent -t --verbose 
sh-3.2# puppet agent -t --verbose 
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/portage.rb: cannot load such file -- facter/util/resolution
Error: Facter: error while resolving custom fact "git_version": undefined method `strip' for nil:NilClass
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, firewall: Kernel 'Darwin' is not currently supported at /etc/puppetlabs/code/environments/production/modules/firewall/manifests/init.pp:33:7 on node tomato
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
sh-3.2# puppet agent -t --verbose --noop --environment galapagos
Info: Using configured environment 'galapagos'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/portage.rb: cannot load such file -- facter/util/resolution
Error: Facter: error while resolving custom fact "git_version": undefined method `strip' for nil:NilClass
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, The ntp module is not supported on an Darwin based system. at /etc/puppetlabs/code/environments/galapagos/modules/ntp/manifests/params.pp:300:7 on node tomato
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
sh-3.2# puppet agent -t --verbose --noop --environment galapagos
Info: Using configured environment 'galapagos'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/portage.rb: cannot load such file -- facter/util/resolution
Error: Facter: error while resolving custom fact "git_version": undefined method `strip' for nil:NilClass
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Unsupported platform: Darwin/Darwin at /etc/puppetlabs/code/environments/galapagos/modules/sudo/manifests/params.pp:122:11 on node tomato
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
sh-3.2# puppet agent -t --verbose --noop --environment galapagos
Info: Using configured environment 'galapagos'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/portage.rb: cannot load such file -- facter/util/resolution
Error: Facter: error while resolving custom fact "git_version": undefined method `strip' for nil:NilClass
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Class[datadog_agent]: Unsupported operatingsystem: Darwin at /etc/puppetlabs/code/environments/galapagos/modules/datadog_agent/manifests/params.pp:31:16 on node tomato
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
sh-3.2# puppet agent -t --verbose --noop --environment galapagos
Info: Using configured environment 'galapagos'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/portage.rb: cannot load such file -- facter/util/resolution
Error: Facter: error while resolving custom fact "git_version": undefined method `strip' for nil:NilClass
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Unsupported platform: Darwin/Darwin at /etc/puppetlabs/code/environments/galapagos/modules/ssh/manifests/params.pp:56:11 on node tomato
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
sh-3.2# puppet agent -t --verbose --noop --environment galapagos
Info: Using configured environment 'galapagos'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/portage.rb: cannot load such file -- facter/util/resolution
Error: Facter: error while resolving custom fact "git_version": undefined method `strip' for nil:NilClass
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Unsupported platform: Darwin/Darwin at /etc/puppetlabs/code/environments/galapagos/modules/ssh/manifests/params.pp:56:11 on node tomato
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
sh-3.2# puppet agent -t --verbose --noop --environment galapagos
Info: Using configured environment 'galapagos'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/portage.rb: cannot load such file -- facter/util/resolution
Error: Facter: error while resolving custom fact "git_version": undefined method `strip' for nil:NilClass
Error: Failed to apply catalog: Parameter managehome failed on User[tyler]: User provider directoryservice can not manage home directories at /etc/puppetlabs/code/environments/galapagos/modules/account/manifests/init.pp:175
sh-3.2# 
jenkins-infra-bot commented 8 years ago

rtyler:

Error: /Stage[main]/Profile::Accounts/Account[tyler]/User[tyler]/ensure: change from absent to present failed: OS X versions > 10.7 require a Salted SHA512 PBKDF2 password hash of 256 characters. Please check your password and try again.

SO CLOSE. Not being able to virtualize a damned thing sucks.

jenkins-infra-bot commented 8 years ago

scm_issue_link:

Code changed in jenkins
User: R. Tyler Croy
Path:
dist/profile/manifests/buildslave.pp
dist/role/manifests/buildnode.pp
dist/role/manifests/buildnode/mac.pp
manifests/site.pp
spec/classes/profile/buildslave_spec.rb
spec/classes/role/buildnode/mac_spec.rb
spec/classes/role/buildnode_spec.rb
http://jenkins-ci.org/commit/jenkins-infra/eca6e9a59288600b80ac43d9d3ad497fe97a3273
Log:
Introduce a Mac buildnode role.

This is the first role that doesn't have a vegetable associated with it. As we
move towards more of a cloud-based infrastructure, our roles need to slowly
morph into the roles for a node instead of our "pet" machines we have right now.

This commit makes provisioning Docker on a profile::buildslave optional, since
Mac OS X is not going to run docker.

[FIX INFRA-601]

jenkins-infra-bot commented 8 years ago

rtyler:

Stupid bot closed this

jenkins-infra-bot commented 8 years ago

rtyler:

Another module bites the dust

sh-3.2# puppet agent -t --verbose --noop --environment galapagos
Info: Using configured environment 'galapagos'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/portage.rb: cannot load such file -- facter/util/resolution
Error: Facter: error while resolving custom fact "git_version": undefined method `strip' for nil:NilClass
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Unsupported OS family: Darwin at /etc/puppetlabs/code/environments/galapagos/modules/ruby/manifests/params.pp:67:7 on node tomato
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
sh-3.2# 
jenkins-infra-bot commented 8 years ago

rtyler:

Hot dog, I've got a change that at least appears to provision some accounts including the build node one

sh-3.2# puppet agent -t --verbose --noop --environment galapagos
Info: Using configured environment 'galapagos'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/portage.rb: cannot load such file -- facter/util/resolution
Error: Facter: error while resolving custom fact "git_version": undefined method `strip' for nil:NilClass
Info: Applying configuration version '1460135475'
Notice: /Stage[main]/Git/Package[git]/ensure: current_value absent, should be present (noop)
Notice: Class[Git]: Would have triggered 'refresh' from 1 events
Notice: /Stage[main]/Profile::Buildslave/Sshkey[github-rsa]/ensure: current_value absent, should be present (noop)
Notice: /Stage[main]/Profile::Accounts/Account[tyler]/User[tyler]/password: current_value [old password hash redacted], should be [new password hash redacted] (noop)
Notice: /Stage[main]/Profile::Accounts/Account[tyler]/User[tyler]/groups: current_value , should be atlassian-admins,sudo (noop)
Notice: /Stage[main]/Profile::Accounts/Account[tyler]/File[tyler_home]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[tyler]/File[tyler_sshdir]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[tyler]/Ssh_authorized_key[tyler-kiwi]/ensure: current_value absent, should be present (noop)
Notice: Account[tyler]: Would have triggered 'refresh' from 5 events
Notice: /Stage[main]/Profile::Accounts/Account[kohsuke]/User[kohsuke]/password: current_value [old password hash redacted], should be [new password hash redacted] (noop)
Notice: /Stage[main]/Profile::Accounts/Account[kohsuke]/User[kohsuke]/groups: current_value , should be atlassian-admins,sudo (noop)
Notice: /Stage[main]/Profile::Accounts/Account[kohsuke]/File[kohsuke_home]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[kohsuke]/File[kohsuke_sshdir]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[kohsuke]/Ssh_authorized_key[kohsuke-giffon]/ensure: current_value absent, should be present (noop)
Notice: /Stage[main]/Profile::Accounts/Account[kohsuke]/Ssh_authorized_key[kohsuke-sol]/ensure: current_value absent, should be present (noop)
Notice: /Stage[main]/Profile::Accounts/Account[kohsuke]/Ssh_authorized_key[kohsuke-cucumber]/ensure: current_value absent, should be present (noop)
Notice: Account[kohsuke]: Would have triggered 'refresh' from 7 events
Notice: /Stage[main]/Profile::Accounts/Account[abayer]/User[abayer]/password: current_value [old password hash redacted], should be [new password hash redacted] (noop)
Notice: /Stage[main]/Profile::Accounts/Account[abayer]/User[abayer]/groups: current_value , should be atlassian-admins,sudo (noop)
Notice: /Stage[main]/Profile::Accounts/Account[abayer]/File[abayer_home]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[abayer]/File[abayer_sshdir]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[abayer]/Ssh_authorized_key[abayer-abayer_laptop]/ensure: current_value absent, should be present (noop)
Notice: Account[abayer]: Would have triggered 'refresh' from 5 events
Notice: /Stage[main]/Profile::Accounts/Account[danielbeck]/User[danielbeck]/password: current_value [old password hash redacted], should be [new password hash redacted] (noop)
Notice: /Stage[main]/Profile::Accounts/Account[danielbeck]/User[danielbeck]/groups: current_value , should be atlassian-admins,sudo (noop)
Notice: /Stage[main]/Profile::Accounts/Account[danielbeck]/File[danielbeck_home]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[danielbeck]/File[danielbeck_sshdir]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[danielbeck]/Ssh_authorized_key[danielbeck-danielbeck]/ensure: current_value absent, should be present (noop)
Notice: Account[danielbeck]: Would have triggered 'refresh' from 5 events
Notice: /Stage[main]/Profile::Accounts/Account[aheritier]/User[aheritier]/password: current_value [old password hash redacted], should be [new password hash redacted] (noop)
Notice: /Stage[main]/Profile::Accounts/Account[aheritier]/User[aheritier]/groups: current_value , should be atlassian-admins,sudo (noop)
Notice: /Stage[main]/Profile::Accounts/Account[aheritier]/File[aheritier_home]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[aheritier]/File[aheritier_sshdir]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[aheritier]/Ssh_authorized_key[aheritier-aheritier]/ensure: current_value absent, should be present (noop)
Notice: Account[aheritier]: Would have triggered 'refresh' from 5 events
Notice: /Stage[main]/Profile::Accounts/Account[orrc]/User[orrc]/password: current_value [old password hash redacted], should be [new password hash redacted] (noop)
Notice: /Stage[main]/Profile::Accounts/Account[orrc]/User[orrc]/groups: current_value , should be atlassian-admins (noop)
Notice: /Stage[main]/Profile::Accounts/Account[orrc]/File[orrc_home]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[orrc]/File[orrc_sshdir]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[orrc]/Ssh_authorized_key[orrc-rebigulator]/ensure: current_value absent, should be present (noop)
Notice: Account[orrc]: Would have triggered 'refresh' from 5 events
Notice: /Stage[main]/Profile::Accounts/Account[lshatzer]/User[lshatzer]/password: current_value [old password hash redacted], should be [new password hash redacted] (noop)
Notice: /Stage[main]/Profile::Accounts/Account[lshatzer]/User[lshatzer]/groups: current_value , should be atlassian-admins (noop)
Notice: /Stage[main]/Profile::Accounts/Account[lshatzer]/File[lshatzer_home]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[lshatzer]/File[lshatzer_sshdir]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Accounts/Account[lshatzer]/Ssh_authorized_key[lshatzer-lshatzer]/ensure: current_value absent, should be present (noop)
Notice: Account[lshatzer]: Would have triggered 'refresh' from 5 events
Notice: Class[Profile::Accounts]: Would have triggered 'refresh' from 7 events
Notice: /Stage[main]/Profile::Buildslave/Account[jenkins]/Group[jenkins]/ensure: current_value absent, should be present (noop)
Notice: /Stage[main]/Profile::Buildslave/Account[jenkins]/User[jenkins]/ensure: current_value absent, should be present (noop)
Notice: /Stage[main]/Profile::Buildslave/Account[jenkins]/File[jenkins_home]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Buildslave/Account[jenkins]/File[jenkins_sshdir]/ensure: current_value absent, should be directory (noop)
Notice: /Stage[main]/Profile::Buildslave/Account[jenkins]/Ssh_authorized_key[jenkins-cucumber]/ensure: current_value absent, should be present (noop)
Notice: /Stage[main]/Profile::Buildslave/Account[jenkins]/Ssh_authorized_key[jenkins-celery]/ensure: current_value absent, should be present (noop)
Notice: Account[jenkins]: Would have triggered 'refresh' from 6 events
Notice: /Stage[main]/Profile::Buildslave/File[/home/jenkins/.ssh/id_rsa]/ensure: current_value absent, should be file (noop)
Notice: Class[Profile::Buildslave]: Would have triggered 'refresh' from 3 events
Notice: Stage[main]: Would have triggered 'refresh' from 3 events
Notice: Applied catalog in 10.28 seconds
sh-3.2# 
jenkins-infra-bot commented 8 years ago

rtyler:

Okie doke, the profile::buildslave class fits mostly inside the role::buildnode::mac, the two things blocking us from being able to provision this node to a modicum of functionality:

jenkins-infra-bot commented 8 years ago

scm_issue_link:

Code changed in jenkins
User: R. Tyler Croy
Path:
dist/profile/manifests/buildslave.pp
dist/role/manifests/buildnode.pp
dist/role/manifests/buildnode/mac.pp
manifests/site.pp
spec/classes/profile/buildslave_spec.rb
spec/classes/role/buildnode/mac_spec.rb
spec/classes/role/buildnode_spec.rb
http://jenkins-ci.org/commit/jenkins-infra/a1006fac4135e0bdad83649a03909489ba6a4c98
Log:
Introduce a Mac buildnode role.

This is the first role that doesn't have a vegetable associated with it. As we
move towards more of a cloud-based infrastructure, our roles need to slowly
morph into the roles for a node instead of our "pet" machines we have right now.

This commit makes provisioning Docker on a profile::buildslave optional, since
Mac OS X is not going to run docker.

[FIX INFRA-601]

jenkins-infra-bot commented 4 years ago

olblak:

Not relevant anymore

jenkins-infra-bot commented 2 years ago

[Depends on: INFRA-576]

jenkins-infra-bot commented 2 years ago

[Blocks: INFRA-910]