puppet

开源的自动化部署工具探索

落花浮王杯 提交于 2019-12-05 04:11:56
1 前言 即使是在传统的企业当中,日常的备份、服务器状态监控和日志,通过手动的方式来进行的效率也很低,是一种人力的浪费。因此,自动化早已是每个运维都必须掌握的看家本领。 在不同的企业中,自动化的规模、需求与实现方式都各不相同,因此在技术细节层面,运维之间很难将别的企业的方法整个套用过来。然而在很多情况下,自动化的思路是有共通之处的。 运维自动化前三阶段 ◆纯手工阶段:手工操作重复地进行软件部署和运维。 ◆脚本阶段:通过编写脚本、方便地进行软件部署和运维。 ◆工具阶段:借助第三方工具高效、方便地进行软件部署和运维。 这几个阶段是随着运维知识、经验、教训不断积累而不断演进的。而且,第2个阶段和第3个阶段可以说是齐头并进,Linux下的第三方工具虽说已经不少了,但是Linux下的脚本编写对运维工作的促进作用是绝对不可以忽视的。 在DevOps出现之前,运维工作者在工作中还是以这两种方式为主。 下面的研究,都是一些linux下开源的第三方工具,借助第三方工具高效、方便地进行软件部署和运维。 2 业界开源的自动化部署工具 2.1 chef Chef 是一款自动化服务器配置管理工具,可以对所管理的对象实行自动化配置,如系统管理,安装软件,基于ruby语言编写的。 2.1.1 Chef的架构 2.1.2 Chef的工作原理: Chef 由三大组件组成:Chef Server、Chef

What ports does pip use?

旧时模样 提交于 2019-12-05 02:11:04
This is hopefully a quick one to answer, I'm trying to provision a box on AWS with puppet and one of the steps involves a pip install from a requirements file. Something like this: - /usr/local/venv/ostcms/bin/pip install -r /vagrant/requirements.txt The step basically fails because it can't find any of the packages in the requirements file, but when I open the AWS box's security group up to allow "All Traffic" the pip step works. I'm trying to find the port that pip uses so I can basically have that port, http and ssh open on the box and live happily ever after. Pip runs on 3128 so make sure

Duplicate declaration of same resource defined in separate classes

孤街浪徒 提交于 2019-12-05 01:46:10
I have a class definition which requires the build-essential package: class erlang($version = '17.3') { package { "build-essential": ensure => installed } ... } Another class in a different module also requires the build-essential package: class icu { package { "build-essential": ensure => installed } ... } However, when I try to perform puppet apply, the error I receive is: Error: Duplicate declaration: Package[build-essential] is already declared in file /vagrant/modules/erlang/manifests/init.pp:18; cannot redeclare at /vagrant/modules/libicu/manifests/init.pp:17 on node vagrant-ubuntu

Iterate over a hash key/values in Puppet

允我心安 提交于 2019-12-04 23:34:20
问题 I'm dabbling with Puppet to update an arbitrary list of appsettings in an ASP.NET web.config (for deployment purpose) and I'm in a dilemma, mostly because I'm a real n00b in puppet. I have this yaml file (hiera) --- appSettings: setting1: "hello" setting2: "world!" setting3: "lalala" the number of setting[x] can span arbitrarily (one appSetting) and I would like to loop through the hash keys/value to update the corresponding appSetting/add in the web.config (using exec with powershell) the

PhotoShop 高级应用: Puppet Warp - 操控变形

非 Y 不嫁゛ 提交于 2019-12-04 21:49:28
一: Puppet Warp - 操控变形 【人像图像进行类似肌肉骨骼的多点调整:】 1.编辑选项卡--->操控变形- 【操控变形支持智能对象】 二.操控变形实例:人物图像的运动·重影效果 1.扣取人物图像,对扣取人物图像的图层进行重合调整, 2. 对扣取的人物图像进行操控变形,再对图像进行滤镜:动感模糊操作 · 操控变形需确定变形锚点,所定的锚点越多越容易控制 来源: https://my.oschina.net/u/4050043/blog/3131035

How to create separated XML nodes with “set” in Puppet using Augeas?

落花浮王杯 提交于 2019-12-04 20:20:14
I am using the Augeas tool for Puppet 3.2 and I am trying to create an XML file. I want to be able to add multiple fields with the same name into my XML doc. For instance, I want to separate node2/location2 from node1/location1 by placing it in its own "node" field. This is my code: augeas { "update template": lens => "Xml.lns", require => File["${buildpath}/tempfile.xml"], incl => "${buildpath}/tempfile.xml", changes => [ "set member/acceptors[#attribute]/node[#attribute]/nodeIdentity[#attribute]/#text node2", "set member/acceptors/node/nodeLocation[#attribute]/#text location2", "set member

Puppet iteration string/array

∥☆過路亽.° 提交于 2019-12-04 19:45:38
Can you think of a way to solve this problem in Puppet? I have a custom fact with generates a string of IP addresses depending on the domain it is run on, it can resolve to have 1 to n addresses. "10.1.29.1" "10.1.29.1,10.1.29.5" "10.1.29.1,10.1.29.5,10.1.29.7" etc I want to add these to the host file with a generated server names of servernameX for example; 10.1.29.1 myservername1 10.1.29.5 myservername2 10.1.29.7 myservername3 So how can you do this as puppet doesn't have an array iterator like "for each"? Sadly, even if you go about and use a custom "define" to iterate over an array upon

Using Vagrant, why is puppet provisioning better than a custom packaged box?

ぃ、小莉子 提交于 2019-12-04 18:32:08
问题 I'm creating a virtual machine to mimic our production web server so that I can share it with new developers to get them up to speed as quickly as possible. I've been through the Vagrant docs however I do not understand the advantage of using a generic base box and provisioning everything with Puppet versus packaging a custom box with everything already installed and configured. All I can think of is; Advantages of using Puppet vs custom packaged box Easy to keep everyone up to date - Ability

How can I stop and delete a docker container launched with restart always option?

有些话、适合烂在心里 提交于 2019-12-04 17:56:07
问题 I run some containers with the option --restart always . It works good, so good, that I have now difficulties to stop these containers now :) I tried : sudo docker stop container && sudo docker rm -f container But the container still restarts. The docker documentation explains the restart policies, but I didn't find anything to resolve this issue. 回答1: Just sudo docker rm -f container will kill the process if it is running and remove the container, in one step. That said, I couldn't replicate

Using Vagrant to manage development and production environments?

我的未来我决定 提交于 2019-12-04 17:44:16
问题 How are people handling simple automation (with puppet) for dev / prod environments with vagrant (ideally from the same vagrantfile)? Use case I'm trying to solve I would love to spin up the the production machine with vagrant if it isn't created. I would love to reload nginx or apache confs on production with vagrant if they were tweaked in the puppet files for my dev environment. The Problem When you call vagrant up with a provider like AWS or Digital Ocean, it becomes the active provider