Use Docker to deploy a directly available puppet server

Source: Internet
Author: User
Tags docker run

Idea: In a docker environment, directly pull down the author's image, directly start a usable container. This image provides a directly available puppet server (foreman/activemq/mcollective-client);


Description: This image has been uploaded by the author of the Spirit Sparrow cloud, detailed documentation can refer to this article and the author GitHub and The Spirit Sparrow Cloud Image address.


Files directly by the author of GitHub markdown directly copied as follows:


######################################################


Docker-foremantable of Contents
    1. Brief introduction

    2. Function description

    3. Instructions for use

    4. Parameter description

    5. Other instructions

Brief introduction

This image is currently used primarily to provide a direct-to-useforeman/puppet

Function description
    • This image package Installation section has been completed directly on the base image installation (based on library/ubuntu:14.04.3 manual installation commit)

    • This image only makes partial configuration changes on top of the underlying image, making it easy to reuse

    • This image contains directly available foreman (currently the author is mainly used to manage puppet)

    • This image contains the directly available puppet server (installed by Foreman-installer dependency)

    • This image contains the directly available Mcollective client, which has been configured to foreman on puppet run using mcollecive

    • This image contains directly available ACTIVEMQ, a template document that configures the ACTIVEMQ directly Puppetlab

    • The 1.9.2 in this image version number 1.9.2.1 is the official version of Foreman, which is the lowest. 1 Docker image version built for the author

Use the instructions to start a container to provide the puppet Server service with the following requirements:
  1. The certificate name/hostname is configured as: puppet.bw-y.com

  2. The password for configuring Mcollective and ACTIVEMQ is: Stljt1qk6co6d2aq

  3. The PSK password for configuration mcollective is: Lqtq8ci38hrsaxvy5frvy7pz

  4. Start Activemq/apache2/foreman-proxy service delivery

  5. Map the Puppet configuration directory () in the container /etc/puppet to the local directory:/opt/docker/puppet_conf

  6. Map the Puppet certificate directory () in the container /var/lib/puppet/ssl to the local directory:/opt/docker/puppet_ssl

  7. Map the Foreman database directory () in the container /var/lib/postgresql/9.3/main to the local directory:/opt/docker/foreman_db

  8. Map the following ports () within the container 80/443/8140/8443/61613 to the corresponding ports on the host:80/443/8140/8443/61613

According to the above requirements, the order is as follows
Docker run-itd--name=puppet--hostname=puppet.bw-y.com-e mco_pass=stljt1qk6co6d2aq-e PSK_PASS= Lqtq8ci38hrsaxvy5frvy7pz-v/opt/docker/puppet_conf:/etc/puppet-v/opt/docker/puppet_ssl:/var/lib/puppet/ssl-v/ Opt/docker/foreman_db:/var/lib/postgresql/9.3/main-p 80:80-p 443:443-p 8140:8140-p 8443:8443-p 61613:61613 Index.ala uda.cn/hypersroot/foreman:1.9.2.1
Parameter description --hostname

[Required] Since Puppet/foreman relies on a resolvable hostname to configure certificate correlation, this parameter must be added when Docker is started, which automatically resolves the configured domain name to the corresponding IP of the container. Default value: Empty

MCO_HOST

[optional] is used to set the address of MQ in Mcollective ( /etc/mcollective/client.cfg ) 当此地址不等于127.0.0.1或localhost时,容器不启动ActiveMQ : The default value is 127.0.0.1

MCO_PORT

[optional] is used to set the port of MQ in Mcollective ( /etc/mcollective/client.cfg ). Default value: 61613

MCO_PASS

[optional] The password configured for the server-side configuration () of the Mcollective client configuration ( /etc/mcollective/client.cfg ) and ACTIVEMQ /etc/activemq/activemq.xml . Default value: Mcopassword

PSK_PASS

[optional] is used to /etc/mcollective/client.cfg set the password field in Mcollective () plugin.psk . Default value: Mcopskstr

Other instructions
    • Default login information for Foreman page: admin/bw-y.com

    • At the first boot, the certificate and related configuration need to be regenerated due to the hostname relationship, at which point the container has been started, but the service is not configured to complete; The primary time overhead is that when the container is first started, the configuration is reset according to the parameters, the author uses the script to modify some of the configuration, the re-execution of Foreman-installer caused, so the first full boot success, it may take about 2 minutes, specific execution progress, you can directly use the command to enter the container docker exec -it [container_name] bashUse the PS aux or top command to see if the Foreman-installer has been completed in memory. When used again, the puppet configuration and the foreman database configuration file already exist, which can be very rapid. See the script:entrypoint.sh


This article from "Self-reliance" blog, declined reprint!

Deploy a directly available puppet server using Docker

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.