Pergunta

I have Jenkins, Artifactory and 3 environments (development, test and production).

When a developer commits something from the development-environment it's compiled and tested in the test-environment. And the builds and artifacts of it are stored in Artifactory.

Now I wanna go the next step and with the help of puppet manage the environments and deploy the artifacts from Artifactory to the production-environment.

But I need some hints to start:

  1. Where is the best place to install puppet? On the same server as artifactory as they work togehter? Puppet configures the environments as well.. so not sure if there is something that has to be consider.

  2. Are there any configurations I need to keep in mind before or during the installation of puppet? Especially in context with artifactory and jenkins.

Thanks for any hint/ help.

Foi útil?

Solução

Disclaimer: This is just how I do it :)

I don't see any benefit to putting Artifactory on the same server as Puppet Master, and that seems like a bad idea.

In Artifactory I have a virutal repository that includes only our product artifacts that I care about. I have a separate generic web server that hosts various things puppet nodes and sometimes people in our company need to download. That server is also a forward proxy to the virtual repo in artifactory.

The local web server syncs to an external aws server nightly. Internally, nodes that need to download bits get them from our local server. Externally, they download from the cloud server (really an auto-scaling cluster).

This makes it fairly straightforward to write puppet manifests/custom types that can download, md5, and install artifacts on nodes. Even slicker for Linux would be to build packages, but I don't currently.

I also use Foreman as a Puppet ENC. Versions of software are configured as Foreman parameters on a global, group, and, if need-be, node level. To deploy a new version of of an application war, someone just logs into Foreman, sets the parameter, and waits for Puppet to do its job (or logs into the node and forces a Puppet run if they need to).

Hope that gives you some ideas.

Outras dicas

To start with, your first decision needs to be whether you want to run puppet in master-agent (client/server) mode, or in "masterless" mode. The getting started documentation over at puppetlabs.com is solid and it is worth a following the tutorials.

Regardless of your decision, you will need to install puppet on every server that runs puppet - the same binary runs master, agent, apply, etc.

Puppet 101 masterless example assuming redhat-ish OS:

# Install puppet
sudo yum install puppet -y

# Create basic manifest
 echo "notify {'hello world':}" > hello.pp

# Run masterless scenario:
sudo puppet apply hello.pp

Expected result:

notice: hello world
notice: /Stage[main]//Notify[hello world]/message: defined 'message' as 'hello world'
notice: Finished catalog run in 0.03 seconds
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top