puppet

2019年必学的DevOps流行工具

这一生的挚爱 提交于 2019-12-13 13:16:43
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> DevOps是一种利用云创新、自动化和制度化来从根本上加速传统编程的改进模式。像Git、Docker、Selenium、Jenkins、Ansible等都属于2019年必学的DevOps工具。 Git Git是一种分布式版本管制系统,没有中央服务器,每个人的电脑就是一个完整的版本库。工作的时候不用联网,因为版本都在自己的电脑上。协同方法是这样的:比如说自己在电脑上改了文件A,其它人也在电脑上改了文件A,这时候,你们之间只需要把各自的修改推送给对方,这样就可以互相看到对方的修改了,Git是免费的,开源的。 Docker Docker是一个开源的应用容器引擎,让开发都可以打包他们的应用以及依赖包到一个可移植的镜像中,然后发布到任何流行的linux或windos机器上。也可以实现虚拟化,容器是完全使用沙箱机制的,相互之间不会有任何的接口。Docker使用客户端到服务端,也就是C/S架构模式,使用远程API来管理和创建Docker容器。Docker容器通过Docker镜像来创建,容器与镜像的关系类似于面向对象编程中的对象与类。 Selenium Selenium是一种开源的基于Web UI的自动化测试架构。Selenium是用于测试Web应用程序用户界面的常用框架。它是一款用于运行端到端功能测试的超强工具

Install spotify-client on Ubuntu using puppet via Apt module

柔情痞子 提交于 2019-12-13 06:47:54
问题 What puppet code do I need to install the spotify-client on Ubuntu using puppet's Apt module? The spotify installation instructions are: Add the Spotify repository signing key to be able to verify downloaded packages sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886 Add the Spotify repository echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list Update list of available packages sudo

install mysql via puppet

若如初见. 提交于 2019-12-13 05:58:00
问题 I'm trying to install mysql via puppet, using the following code: class mysql::install { package { 'mysql-client': ensure => present, require => Package["mysql-client-core-5.5"]; } service { 'mysql': ensure => running; } } node default { include mysql::install } But I received the following error message: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-dfsg-5.1/mysql-common_5.1.63-0ubuntu0.10.04.1_all.deb 404 Not Found [IP: 91.189.91.13 80] Failed to fetch http://security

Get puppet build to fail when the contained SQL script fails execution

百般思念 提交于 2019-12-13 05:17:41
问题 I am attempting to run a vagrant build which installs Oracle XE in an Ubuntu Virtualbox VM and then runs an SQL script to initialize the Oracle Schema. The vagrant build is here : https://github.com/ajorpheus/vagrant-ubuntu-oracle-xe The setup.sql is run as a part of the oracle module's init.pp (look near the end of that file or search for 'oracle-script'). I was getting an error while running this vagrant build and was just being told that the 'oracle-script' bit was not successful without

Vagrant, Symfony, chmod permit

こ雲淡風輕ζ 提交于 2019-12-13 04:59:39
问题 Host: ubuntu latest x64 vagrant 1.7.2 Configuration (puphpet) Yaml config: vagrantfile: target: local vm: box: puphpet/debian75-x64 box_url: puphpet/debian75-x64 hostname: developer memory: '1024' cpus: '1' chosen_provider: virtualbox network: private_network: 192.168.56.2 forwarded_port: vflnp_o959ky5yk541: host: '8592' guest: '22' post_up_message: '' provider: virtualbox: modifyvm: natdnshostresolver1: on showgui: '0' vmware: numvcpus: 1 parallels: cpus: 1 provision: puppet: manifests_path:

Puppet Syntax: how to include an array of objects into an ordering -> chain?

Deadly 提交于 2019-12-13 04:35:36
问题 Let's say I have: $files = ["file1", "file2"] exec { "exec1" : command => "mycommand"; } file { $files : ensure => present; } And I want to use the -> and ~> constructs to control the notify/require order of execution, like so: Exec["exec1"] -> File[$files] How do I do it? If I do the above, I get Could not find resource 'File[file1]File[file2]' (for real file paths, of course). I've played with wrapping the $files variable in quotes and {}s, but to no avail. What's the syntax for putting an

using the pe_accounts module with hiera

流过昼夜 提交于 2019-12-13 04:23:42
问题 I need to be able to manage user accounts using pe_accounts and hiera. This page: http://docs.puppetlabs.com/pe/latest/accounts_class.html#usage-example says I can create a module like site_accounts and add this text class {'pe_accounts': data_store => yaml, } to site_accounts/manifests/init.pp and then install this syntax --- sysop: locked: false comment: System Operator uid: '700' gid: '700' groups: - admin - sudonopw into a file named /var/lib/hiera/pe_accounts_users_hash.yaml and this

How can a puppet resource check for a data source on the puppetmaster without failing to compile?

≡放荡痞女 提交于 2019-12-13 03:40:37
问题 I am writing a puppet Ceph deployment module and need to generate keys on an admin node and distribute them to the monitor nodes. I have written server-side functions to retrieve the keys once they are generated, but would like to only distribute those keys once they exist. The manifest for the admin node generates the cluster keys Manifests for the monitor and management nodes need to include those keys as file resources The manifests should not fail to compile (or generate undue log volume)

Compile a node's catalog to JSON without a master?

人盡茶涼 提交于 2019-12-13 02:14:14
问题 I'm looking to improve my org's Puppet work lifecycle by comparing differences for actual node catalogs. We came across this project which compiles catalogs for nodes and creates a diff for them, but it seems to require an online master. I need to be able to do what this tool does, albeit without a master - I'd just like to compile a deterministic JSON or YAML blob which describes all of the resources that would be managed by Puppet for a given node and given a set of facts. Is there a way

sh startup.sh start tomcat with puppet module

柔情痞子 提交于 2019-12-13 01:27:09
问题 I am trying to create a puppet module which installs tomcat. I got everything else working, the module downloads tomcat tar, extracts it, removes the package and changes the settings file from template. The only problem I have it won't start tomcat automatically. How do I set it to do "sudo sh startup.sh" ? I tried with command => "sudo sh startup.sh" , but I think the problem is that it cant use sudo. Is there a way to bypass that or other solution to get tomcat start? 回答1: I suggest you to