设为首页 收藏本站
查看: 1057|回复: 0

[经验分享] aix puppet agent

[复制链接]
发表于 2015-9-16 10:28:57 | 显示全部楼层 |阅读模式
demo控制脚本tel,150 5519 8367
Running Puppet on AIX
  Puppet on AIX is… not officially supported, yet still useful (at least one site has it deployed in a production environment). It doesn’t work with the ruby packages that are available from bull at http://www.bullfreeware.com/, as they lack socket functionality, however it does when ruby is built from source with openssl support (at least on 5.2 and 5.3! On early versions, mileage may very etc). Currently, as at 0.22.4 there is still some big holes in functionality, specifically:

  • Mount doesn’t work. Thank you, IBM!
  • Cron jobs mysteriously fail with ‘crontab: cannot access’. Bug 2798
  • Service management via init works, however AIX by default uses something else for internal packages Feature 2864
  • Package support for installing/removing packages via NIM and local directory Bug 2805
  
Service Management
  Most things on AIX are handled using the system resource controller (SRC).
  lssrc -a list all services available and their state
  startsrc -s sshd start a subsystem
  stopsrc -s sshd stop a subsystem
  refresh -s sshd refresh a subsystem (does not work on all subsystems, ssh for instance).
  You can also pass -g instead of -s to start/stop a group of systems (such as NFS).
  Services to be managed via the SRC can be defined with the mkssys command. The example adds the sshd subsystem and the ssh group to the SRC. In the example the binaries reside in /usr. The -a flag allows passing of arguments.
  /usr/bin/mkssys -s sshd -p /usr/sbin/sshd -a ‘-D’ -u 0 -S -f 9 -n 15 -R -G ssh
  The so generated subsystem sshd can be started with the above mentioned commands.
  
Package Maintenance
  Packages are installed one or two ways. Locally using a local collection of .bff files (native BFF filesets) or remotely using Network Install Manager (NIM), which is similar to kickstart or jump start, plus there’s client management after the fact. NIM has the ability to remotely run simple scripts, reinstalling the OS, or making a system backup (mksysb).
  
NIM installation
  The way that seems to be most common is to deploy packages with NIM. The client is configured to communicate with the NIM server using the niminit command. This can be run on the client or server. In most cases the entry on the server should be created first.
  niminit -a name=HOSTNAME -a master=NIM_SERVER_FQDN -a connect=nimsh
  Packages can then be installed using the nimclient command with the CUSTomize operation.
  nimclient -o cust -a lpp_source=LPP_NAME -a filesets=“package1 package2 package3”
  LPP_NAME is the name of the package repository on the server, you can discover the available sources with nimclient -l -t lpp_source.
  
Local Installation
  If the packages are local (or on NFS) they can be installed with the installp command.
  installp -acgXY -d /usr/sys/inst.images package1 package2 package3
  -a means to apply packages (install)
  -c (optional) commit packages to the system, cannot be rejected after this
  -g (optional) process dependencies. If depends are not met, install fails.
  -X automatically extend filesystems if needed.
  -Y automatically accept License agreements.
  -d dir use install source location
  Before packages can be installed from a local repository, an index of metadata must be created. This is done with the inutoc command. This generates a .toc file in the directory that installp uses to know what packages are where. The filenames of the packages are irrelevant.
  
Handling mounts
  Mounts are dynamically created/removed by commands, instead of modifying /etc/filesystems directly.
  lsfs, list filesystems with their attributes
  mkfs, creates a filesystem and adds it to /etc/filesystems
  rmfs, removes a filesystem (and underlying block device unless the filesystem is not JFS or JFS2)
  mknfsmnt, create an NFS mount in /etc/filesystems
  rmnfsmnt, remove an NFS mount from /etc/filesystems
  chfs, change the mountpoint, attributes, mounting groups, etc. of a filesystem (example: chfs -An /usr causes /usr to not mount on boot)
  Mounts are handled exclusively via command line or smitty, using the above commands or importvg/exportvg.
  
Inittab
  /etc/inittab is managed by {ch,ls,mk,rm}itab commands. Do not write changes to this as a text file.

  pup-zlib-1.2.5-1.32.puppet.local.aix5.3.ppc.rpm (73.146 KB) Vincent Lin, 07/10/2012 10:41
  pup-facter-1.6.3-1.puppet.local.aix5.3.noarch.rpm (63.178 KB) Vincent Lin, 07/10/2012 10:41
  pup-openssl-1.0.0e-2.32.puppet.local.aix5.3.ppc.rpm (3.118 MB) Vincent Lin, 07/10/2012 10:41
  pup-puppet-2.7.6-1.local.aix5.3.ppc.rpm (970.885 KB) Vincent Lin, 07/10/2012 10:41
  pup-puppet-conf-0.1-1.local.aix5.3.noarch.rpm (1.618 KB) Vincent Lin, 07/10/2012 10:41
  pup-ruby-1.8.7-p352.1.32.puppet.local.aix5.3.ppc.rpm (3.527 MB) Vincent Lin, 07/10/2012 10:41

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-114352-1-1.html 上篇帖子: [翻译]用 Puppet 搭建易管理的服务器基础架构(1) 下篇帖子: RHEL 6.3下学习puppet(安装篇)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表